@visactor/vtable-plugins 1.19.0-alpha.0 → 1.19.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.
- package/cjs/fillHandleUtils/autoFillHandle.d.ts +11 -0
- package/cjs/fillHandleUtils/autoFillHandle.js +112 -0
- package/cjs/fillHandleUtils/autoFillHandle.js.map +1 -0
- package/cjs/fillHandleUtils/translateRowObj.d.ts +5 -0
- package/cjs/fillHandleUtils/translateRowObj.js +15 -0
- package/cjs/fillHandleUtils/translateRowObj.js.map +1 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/wps-fill-handle.d.ts +21 -0
- package/cjs/wps-fill-handle.js +100 -0
- package/cjs/wps-fill-handle.js.map +1 -0
- package/dist/vtable-plugins.js +3611 -128
- package/dist/vtable-plugins.min.js +1 -1
- package/es/fillHandleUtils/autoFillHandle.d.ts +11 -0
- package/es/fillHandleUtils/autoFillHandle.js +106 -0
- package/es/fillHandleUtils/autoFillHandle.js.map +1 -0
- package/es/fillHandleUtils/translateRowObj.d.ts +5 -0
- package/es/fillHandleUtils/translateRowObj.js +8 -0
- package/es/fillHandleUtils/translateRowObj.js.map +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es/wps-fill-handle.d.ts +21 -0
- package/es/wps-fill-handle.js +69 -0
- package/es/wps-fill-handle.js.map +1 -0
- package/package.json +9 -6
package/dist/vtable-plugins.js
CHANGED
|
@@ -745,22 +745,22 @@
|
|
|
745
745
|
class Application {}
|
|
746
746
|
const application = new Application();
|
|
747
747
|
|
|
748
|
+
let idx = 0;
|
|
748
749
|
class PerformanceRAF {
|
|
749
750
|
constructor() {
|
|
750
|
-
this.nextAnimationFrameCbs =
|
|
751
|
+
this.nextAnimationFrameCbs = new Map(), this._rafHandle = null, this.runAnimationFrame = time => {
|
|
751
752
|
this._rafHandle = null;
|
|
752
753
|
const cbs = this.nextAnimationFrameCbs;
|
|
753
|
-
this.nextAnimationFrameCbs =
|
|
754
|
-
for (let i = 0; i < cbs.length; i++) cbs[i] && cbs[i](time);
|
|
754
|
+
this.nextAnimationFrameCbs = new Map(), cbs.forEach(cb => cb(time));
|
|
755
755
|
}, this.tryRunAnimationFrameNextFrame = () => {
|
|
756
|
-
null === this._rafHandle && 0 !== this.nextAnimationFrameCbs.
|
|
756
|
+
null === this._rafHandle && 0 !== this.nextAnimationFrameCbs.size && (this._rafHandle = application.global.getRequestAnimationFrame()(this.runAnimationFrame));
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
759
|
addAnimationFrameCb(callback) {
|
|
760
|
-
return this.nextAnimationFrameCbs.
|
|
760
|
+
return this.nextAnimationFrameCbs.set(++idx, callback), this.tryRunAnimationFrameNextFrame(), idx;
|
|
761
761
|
}
|
|
762
762
|
removeAnimationFrameCb(index) {
|
|
763
|
-
return
|
|
763
|
+
return !!this.nextAnimationFrameCbs.has(index) && (this.nextAnimationFrameCbs.delete(index), !0);
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
|
|
@@ -1032,6 +1032,8 @@
|
|
|
1032
1032
|
MeasureModeEnum[MeasureModeEnum.estimate = 0] = "estimate", MeasureModeEnum[MeasureModeEnum.actualBounding = 1] = "actualBounding", MeasureModeEnum[MeasureModeEnum.fontBounding = 2] = "fontBounding";
|
|
1033
1033
|
}(MeasureModeEnum || (MeasureModeEnum = {}));
|
|
1034
1034
|
|
|
1035
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1036
|
+
|
|
1035
1037
|
function getDefaultExportFromCjs (x) {
|
|
1036
1038
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1037
1039
|
}
|
|
@@ -1359,8 +1361,8 @@
|
|
|
1359
1361
|
const isBoolean = (value, fuzzy = !1) => fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$1(value, "Boolean");
|
|
1360
1362
|
var isBoolean$1 = isBoolean;
|
|
1361
1363
|
|
|
1362
|
-
const isFunction = value => "function" == typeof value;
|
|
1363
|
-
var isFunction$
|
|
1364
|
+
const isFunction$3 = value => "function" == typeof value;
|
|
1365
|
+
var isFunction$4 = isFunction$3;
|
|
1364
1366
|
|
|
1365
1367
|
const isNil = value => null == value;
|
|
1366
1368
|
var isNil$1 = isNil;
|
|
@@ -1368,17 +1370,17 @@
|
|
|
1368
1370
|
const isValid$2 = value => null != value;
|
|
1369
1371
|
var isValid$3 = isValid$2;
|
|
1370
1372
|
|
|
1371
|
-
const isObject$
|
|
1373
|
+
const isObject$5 = value => {
|
|
1372
1374
|
const type = typeof value;
|
|
1373
1375
|
return null !== value && "object" === type || "function" === type;
|
|
1374
1376
|
};
|
|
1375
|
-
var isObject$
|
|
1377
|
+
var isObject$6 = isObject$5;
|
|
1376
1378
|
|
|
1377
|
-
const isObjectLike = value => "object" == typeof value && null !== value;
|
|
1378
|
-
var isObjectLike$
|
|
1379
|
+
const isObjectLike$6 = value => "object" == typeof value && null !== value;
|
|
1380
|
+
var isObjectLike$7 = isObjectLike$6;
|
|
1379
1381
|
|
|
1380
1382
|
const isPlainObject = function (value) {
|
|
1381
|
-
if (!isObjectLike$
|
|
1383
|
+
if (!isObjectLike$7(value) || !isType$1(value, "Object")) return !1;
|
|
1382
1384
|
if (null === Object.getPrototypeOf(value)) return !0;
|
|
1383
1385
|
let proto = value;
|
|
1384
1386
|
for (; null !== Object.getPrototypeOf(proto);) proto = Object.getPrototypeOf(proto);
|
|
@@ -1395,21 +1397,21 @@
|
|
|
1395
1397
|
};
|
|
1396
1398
|
var isString$1 = isString;
|
|
1397
1399
|
|
|
1398
|
-
const isArray = value => Array.isArray ? Array.isArray(value) : isType$1(value, "Array");
|
|
1399
|
-
var isArray$
|
|
1400
|
+
const isArray$4 = value => Array.isArray ? Array.isArray(value) : isType$1(value, "Array");
|
|
1401
|
+
var isArray$5 = isArray$4;
|
|
1400
1402
|
|
|
1401
|
-
const isArrayLike = function (value) {
|
|
1403
|
+
const isArrayLike$2 = function (value) {
|
|
1402
1404
|
return null !== value && "function" != typeof value && Number.isFinite(value.length);
|
|
1403
1405
|
};
|
|
1404
|
-
var isArrayLike$
|
|
1406
|
+
var isArrayLike$3 = isArrayLike$2;
|
|
1405
1407
|
|
|
1406
|
-
const isNumber$
|
|
1408
|
+
const isNumber$3 = (value, fuzzy = !1) => {
|
|
1407
1409
|
const type = typeof value;
|
|
1408
1410
|
return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
|
|
1409
1411
|
};
|
|
1410
|
-
var isNumber$
|
|
1412
|
+
var isNumber$4 = isNumber$3;
|
|
1411
1413
|
|
|
1412
|
-
const isValidNumber = value => isNumber$
|
|
1414
|
+
const isValidNumber = value => isNumber$4(value) && Number.isFinite(value);
|
|
1413
1415
|
var isValidNumber$1 = isValidNumber;
|
|
1414
1416
|
|
|
1415
1417
|
const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
@@ -1421,26 +1423,26 @@
|
|
|
1421
1423
|
const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
|
|
1422
1424
|
var getType$1 = getType;
|
|
1423
1425
|
|
|
1424
|
-
const objectProto = Object.prototype,
|
|
1425
|
-
isPrototype = function (value) {
|
|
1426
|
+
const objectProto$c = Object.prototype,
|
|
1427
|
+
isPrototype$2 = function (value) {
|
|
1426
1428
|
const Ctor = value && value.constructor;
|
|
1427
|
-
return value === ("function" == typeof Ctor && Ctor.prototype || objectProto);
|
|
1429
|
+
return value === ("function" == typeof Ctor && Ctor.prototype || objectProto$c);
|
|
1428
1430
|
};
|
|
1429
|
-
var isPrototype$
|
|
1431
|
+
var isPrototype$3 = isPrototype$2;
|
|
1430
1432
|
|
|
1431
|
-
const hasOwnProperty$
|
|
1433
|
+
const hasOwnProperty$a = Object.prototype.hasOwnProperty;
|
|
1432
1434
|
function isEmpty(value) {
|
|
1433
1435
|
if (isNil$1(value)) return !0;
|
|
1434
|
-
if (isArrayLike$
|
|
1436
|
+
if (isArrayLike$3(value)) return !value.length;
|
|
1435
1437
|
const type = getType$1(value);
|
|
1436
1438
|
if ("Map" === type || "Set" === type) return !value.size;
|
|
1437
|
-
if (isPrototype$
|
|
1438
|
-
for (const key in value) if (hasOwnProperty$
|
|
1439
|
+
if (isPrototype$3(value)) return !Object.keys(value).length;
|
|
1440
|
+
for (const key in value) if (hasOwnProperty$a.call(value, key)) return !1;
|
|
1439
1441
|
return !0;
|
|
1440
1442
|
}
|
|
1441
1443
|
|
|
1442
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
1443
|
-
has = (object, key) => null != object && hasOwnProperty.call(object, key);
|
|
1444
|
+
const hasOwnProperty$9 = Object.prototype.hasOwnProperty,
|
|
1445
|
+
has = (object, key) => null != object && hasOwnProperty$9.call(object, key);
|
|
1444
1446
|
var has$1 = has;
|
|
1445
1447
|
|
|
1446
1448
|
function baseMerge(target, source, shallowArray = !1, skipTargetArray = !1) {
|
|
@@ -1456,7 +1458,7 @@
|
|
|
1456
1458
|
propIndex = -1;
|
|
1457
1459
|
for (; length--;) {
|
|
1458
1460
|
const key = props[++propIndex];
|
|
1459
|
-
!isValid$3(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$
|
|
1461
|
+
!isValid$3(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$5(target[key]) ? assignMergeValue(target, key, iterable[key]) : baseMergeDeep(target, source, key, shallowArray, skipTargetArray);
|
|
1460
1462
|
}
|
|
1461
1463
|
}
|
|
1462
1464
|
}
|
|
@@ -1466,8 +1468,8 @@
|
|
|
1466
1468
|
srcValue = source[key];
|
|
1467
1469
|
let newValue = source[key],
|
|
1468
1470
|
isCommon = !0;
|
|
1469
|
-
if (isArray$
|
|
1470
|
-
if (shallowArray) newValue = [];else if (isArray$
|
|
1471
|
+
if (isArray$5(srcValue)) {
|
|
1472
|
+
if (shallowArray) newValue = [];else if (isArray$5(objValue)) newValue = objValue;else if (isArrayLike$3(objValue)) {
|
|
1471
1473
|
newValue = new Array(objValue.length);
|
|
1472
1474
|
let index = -1;
|
|
1473
1475
|
const length = objValue.length;
|
|
@@ -1477,9 +1479,9 @@
|
|
|
1477
1479
|
isCommon && baseMerge(newValue, srcValue, shallowArray, skipTargetArray), assignMergeValue(target, key, newValue);
|
|
1478
1480
|
}
|
|
1479
1481
|
function assignMergeValue(target, key, value) {
|
|
1480
|
-
(void 0 !== value && !eq(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
|
|
1482
|
+
(void 0 !== value && !eq$3(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
|
|
1481
1483
|
}
|
|
1482
|
-
function eq(value, other) {
|
|
1484
|
+
function eq$3(value, other) {
|
|
1483
1485
|
return value === other || Number.isNaN(value) && Number.isNaN(other);
|
|
1484
1486
|
}
|
|
1485
1487
|
function merge(target, ...sources) {
|
|
@@ -1492,7 +1494,7 @@
|
|
|
1492
1494
|
}
|
|
1493
1495
|
|
|
1494
1496
|
function arrayEqual(a, b) {
|
|
1495
|
-
if (!isArray$
|
|
1497
|
+
if (!isArray$5(a) || !isArray$5(b)) return !1;
|
|
1496
1498
|
if (a.length !== b.length) return !1;
|
|
1497
1499
|
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return !1;
|
|
1498
1500
|
return !0;
|
|
@@ -1509,7 +1511,7 @@
|
|
|
1509
1511
|
}(LoggerLevel || (LoggerLevel = {}));
|
|
1510
1512
|
class Logger {
|
|
1511
1513
|
static getInstance(level, method) {
|
|
1512
|
-
return Logger._instance && isNumber$
|
|
1514
|
+
return Logger._instance && isNumber$4(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
|
|
1513
1515
|
}
|
|
1514
1516
|
static setInstance(logger) {
|
|
1515
1517
|
return Logger._instance = logger;
|
|
@@ -1639,7 +1641,7 @@
|
|
|
1639
1641
|
}
|
|
1640
1642
|
return void 0 === timerId && (timerId = startTimer(timerExpired, wait)), result;
|
|
1641
1643
|
}
|
|
1642
|
-
return wait = +wait || 0, isObject$
|
|
1644
|
+
return wait = +wait || 0, isObject$6(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(isValidNumber$1(options.maxWait) ? options.maxWait : 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), debounced.cancel = function () {
|
|
1643
1645
|
void 0 !== timerId && function (id) {
|
|
1644
1646
|
if (useRAF) return cancelAnimationFrame(id);
|
|
1645
1647
|
clearTimeout(id);
|
|
@@ -1656,7 +1658,7 @@
|
|
|
1656
1658
|
let leading = !0,
|
|
1657
1659
|
trailing = !0;
|
|
1658
1660
|
if ("function" != typeof func) throw new TypeError("Expected a function");
|
|
1659
|
-
return isObject$
|
|
1661
|
+
return isObject$6(options) && (leading = "leading" in options ? !!options.leading : leading, trailing = "trailing" in options ? !!options.trailing : trailing), debounce$1(func, wait, {
|
|
1660
1662
|
leading: leading,
|
|
1661
1663
|
trailing: trailing,
|
|
1662
1664
|
maxWait: wait
|
|
@@ -1699,10 +1701,10 @@
|
|
|
1699
1701
|
return this.x = x, this.y = y, this;
|
|
1700
1702
|
}
|
|
1701
1703
|
add(point) {
|
|
1702
|
-
return isNumber$
|
|
1704
|
+
return isNumber$4(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
1703
1705
|
}
|
|
1704
1706
|
sub(point) {
|
|
1705
|
-
return isNumber$
|
|
1707
|
+
return isNumber$4(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
1706
1708
|
}
|
|
1707
1709
|
multi(point) {
|
|
1708
1710
|
throw new Error("暂不支持");
|
|
@@ -2066,7 +2068,7 @@
|
|
|
2066
2068
|
height: 0
|
|
2067
2069
|
};
|
|
2068
2070
|
if (isNil$1(text)) return defaultResult;
|
|
2069
|
-
if (isArray$
|
|
2071
|
+
if (isArray$5(text)) {
|
|
2070
2072
|
const textArr = text.filter(isValid$3).map(s => s.toString());
|
|
2071
2073
|
return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
|
|
2072
2074
|
width: textArr.reduce((maxWidth, cur) => Math.max(maxWidth, processor(cur).width), 0),
|
|
@@ -2146,7 +2148,7 @@
|
|
|
2146
2148
|
return x < this.x1 && (this.x1 = x), y < this.y1 && (this.y1 = y), x > this.x2 && (this.x2 = x), y > this.y2 && (this.y2 = y), this;
|
|
2147
2149
|
}
|
|
2148
2150
|
expand(d = 0) {
|
|
2149
|
-
return isArray$
|
|
2151
|
+
return isArray$5(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
|
|
2150
2152
|
}
|
|
2151
2153
|
round() {
|
|
2152
2154
|
return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
|
|
@@ -2424,7 +2426,7 @@
|
|
|
2424
2426
|
|
|
2425
2427
|
function normalizePadding(padding) {
|
|
2426
2428
|
if (isValidNumber$1(padding)) return [padding, padding, padding, padding];
|
|
2427
|
-
if (isArray$
|
|
2429
|
+
if (isArray$5(padding)) {
|
|
2428
2430
|
const length = padding.length;
|
|
2429
2431
|
if (1 === length) {
|
|
2430
2432
|
const paddingValue = padding[0];
|
|
@@ -2440,7 +2442,7 @@
|
|
|
2440
2442
|
}
|
|
2441
2443
|
if (4 === length) return padding;
|
|
2442
2444
|
}
|
|
2443
|
-
if (isObject$
|
|
2445
|
+
if (isObject$6(padding)) {
|
|
2444
2446
|
const {
|
|
2445
2447
|
top = 0,
|
|
2446
2448
|
right = 0,
|
|
@@ -4126,7 +4128,7 @@
|
|
|
4126
4128
|
opacity: 1
|
|
4127
4129
|
});
|
|
4128
4130
|
|
|
4129
|
-
const parse = function () {
|
|
4131
|
+
const parse$1 = function () {
|
|
4130
4132
|
const tokens = {
|
|
4131
4133
|
linearGradient: /^(linear\-gradient)/i,
|
|
4132
4134
|
radialGradient: /^(radial\-gradient)/i,
|
|
@@ -4279,7 +4281,7 @@
|
|
|
4279
4281
|
}
|
|
4280
4282
|
static Parse(c) {
|
|
4281
4283
|
if (GradientParser.IsGradientStr(c)) try {
|
|
4282
|
-
const datum = parse(c)[0];
|
|
4284
|
+
const datum = parse$1(c)[0];
|
|
4283
4285
|
if (datum) {
|
|
4284
4286
|
if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
|
|
4285
4287
|
if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
|
|
@@ -4370,7 +4372,7 @@
|
|
|
4370
4372
|
var _a, _b, _c, _d;
|
|
4371
4373
|
if (!c || !0 === c) return "black";
|
|
4372
4374
|
let result, color;
|
|
4373
|
-
if (isArray$
|
|
4375
|
+
if (isArray$5(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
|
|
4374
4376
|
if (color = GradientParser.Parse(color), "string" == typeof color) return color;
|
|
4375
4377
|
if (params.AABBBounds && (!params.attribute || 0 !== params.attribute.scaleX || 0 !== params.attribute.scaleY)) {
|
|
4376
4378
|
const bounds = params.AABBBounds;
|
|
@@ -4844,7 +4846,7 @@
|
|
|
4844
4846
|
function isNotAroundZero(val) {
|
|
4845
4847
|
return val > EPSILON || val < -EPSILON;
|
|
4846
4848
|
}
|
|
4847
|
-
function isNumber(data) {
|
|
4849
|
+
function isNumber$2(data) {
|
|
4848
4850
|
return "number" == typeof data && Number.isFinite(data);
|
|
4849
4851
|
}
|
|
4850
4852
|
const _v0 = [0, 0],
|
|
@@ -5954,26 +5956,26 @@
|
|
|
5954
5956
|
return this.removeChild(child);
|
|
5955
5957
|
}
|
|
5956
5958
|
addEventListener(type, listener, options) {
|
|
5957
|
-
const capture = isBoolean$1(options, !0) && options || isObject$
|
|
5958
|
-
once = isObject$
|
|
5959
|
-
context = isFunction$
|
|
5960
|
-
return type = capture ? `${type}capture` : type, listener = isFunction$
|
|
5959
|
+
const capture = isBoolean$1(options, !0) && options || isObject$6(options) && options.capture,
|
|
5960
|
+
once = isObject$6(options) && options.once,
|
|
5961
|
+
context = isFunction$4(listener) ? void 0 : listener;
|
|
5962
|
+
return type = capture ? `${type}capture` : type, listener = isFunction$4(listener) ? listener : listener.handleEvent, once ? super.once(type, listener, context) : super.on(type, listener, context), this;
|
|
5961
5963
|
}
|
|
5962
5964
|
on(type, listener, options) {
|
|
5963
5965
|
return this.addEventListener(type, listener, options);
|
|
5964
5966
|
}
|
|
5965
5967
|
removeEventListener(type, listener, options) {
|
|
5966
|
-
const capture = isBoolean$1(options, !0) && options || isObject$
|
|
5967
|
-
context = isFunction$
|
|
5968
|
-
type = capture ? `${type}capture` : type, listener = isFunction$
|
|
5969
|
-
const once = isObject$
|
|
5968
|
+
const capture = isBoolean$1(options, !0) && options || isObject$6(options) && options.capture,
|
|
5969
|
+
context = isFunction$4(listener) ? void 0 : listener;
|
|
5970
|
+
type = capture ? `${type}capture` : type, listener = isFunction$4(listener) ? listener : listener.handleEvent;
|
|
5971
|
+
const once = isObject$6(options) && options.once;
|
|
5970
5972
|
return super.off(type, listener, context, once), this;
|
|
5971
5973
|
}
|
|
5972
5974
|
off(type, listener, options) {
|
|
5973
5975
|
return this.removeEventListener(type, listener, options);
|
|
5974
5976
|
}
|
|
5975
5977
|
once(type, listener, options) {
|
|
5976
|
-
return isObject$
|
|
5978
|
+
return isObject$6(options) ? (options.once = !0, this.addEventListener(type, listener, options)) : this.addEventListener(type, listener, {
|
|
5977
5979
|
once: !0
|
|
5978
5980
|
});
|
|
5979
5981
|
}
|
|
@@ -6059,7 +6061,7 @@
|
|
|
6059
6061
|
try {
|
|
6060
6062
|
this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.preventDefault();
|
|
6061
6063
|
} catch (err) {
|
|
6062
|
-
this.nativeEvent.preventDefault && isFunction$
|
|
6064
|
+
this.nativeEvent.preventDefault && isFunction$4(this.nativeEvent.preventDefault) && this.nativeEvent.preventDefault();
|
|
6063
6065
|
}
|
|
6064
6066
|
this.defaultPrevented = !0;
|
|
6065
6067
|
}
|
|
@@ -6070,7 +6072,7 @@
|
|
|
6070
6072
|
try {
|
|
6071
6073
|
this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.stopPropagation();
|
|
6072
6074
|
} catch (err) {
|
|
6073
|
-
this.nativeEvent.stopPropagation && isFunction$
|
|
6075
|
+
this.nativeEvent.stopPropagation && isFunction$4(this.nativeEvent.stopPropagation) && this.nativeEvent.stopPropagation();
|
|
6074
6076
|
}
|
|
6075
6077
|
this.propagationStopped = !0;
|
|
6076
6078
|
}
|
|
@@ -6723,7 +6725,7 @@
|
|
|
6723
6725
|
Edge[Edge.Top = 1] = "Top", Edge[Edge.Right = 2] = "Right", Edge[Edge.Bottom = 4] = "Bottom", Edge[Edge.Left = 8] = "Left", Edge[Edge.ALL = 15] = "ALL";
|
|
6724
6726
|
}(Edge || (Edge = {}));
|
|
6725
6727
|
const _paddingVec4 = [0, 0, 0, 0];
|
|
6726
|
-
const parsePadding = padding => padding ? isArray$
|
|
6728
|
+
const parsePadding = padding => padding ? isArray$5(padding) ? 0 === padding.length ? 0 : 1 === padding.length ? padding[0] : 2 === padding.length ? (_paddingVec4[0] = padding[0], _paddingVec4[2] = padding[0], _paddingVec4[1] = padding[1], _paddingVec4[3] = padding[1], _paddingVec4) : padding : padding : 0;
|
|
6727
6729
|
const _coords = [{
|
|
6728
6730
|
x: 0,
|
|
6729
6731
|
y: 0
|
|
@@ -6792,7 +6794,7 @@
|
|
|
6792
6794
|
return points;
|
|
6793
6795
|
}
|
|
6794
6796
|
function getAttributeFromDefaultAttrList(attr, key) {
|
|
6795
|
-
if (isArray$
|
|
6797
|
+
if (isArray$5(attr)) {
|
|
6796
6798
|
let val;
|
|
6797
6799
|
for (let i = 0; i < attr.length && void 0 === val; i++) val = attr[i][key];
|
|
6798
6800
|
return val;
|
|
@@ -6812,13 +6814,13 @@
|
|
|
6812
6814
|
|
|
6813
6815
|
class BaseSymbol {
|
|
6814
6816
|
bounds(size, bounds) {
|
|
6815
|
-
if (isNumber$
|
|
6817
|
+
if (isNumber$4(size)) {
|
|
6816
6818
|
const halfS = size / 2;
|
|
6817
6819
|
bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
|
|
6818
6820
|
} else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
|
|
6819
6821
|
}
|
|
6820
6822
|
parseSize(size) {
|
|
6821
|
-
return isNumber$
|
|
6823
|
+
return isNumber$4(size) ? size : Math.min(size[0], size[1]);
|
|
6822
6824
|
}
|
|
6823
6825
|
}
|
|
6824
6826
|
|
|
@@ -7234,10 +7236,10 @@
|
|
|
7234
7236
|
super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
|
|
7235
7237
|
}
|
|
7236
7238
|
draw(ctx, size, x, y) {
|
|
7237
|
-
return isNumber$
|
|
7239
|
+
return isNumber$4(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
|
|
7238
7240
|
}
|
|
7239
7241
|
drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
|
|
7240
|
-
isNumber$
|
|
7242
|
+
isNumber$4(size) && (size = [size, size / 2]);
|
|
7241
7243
|
const drawLength = 2 * (size[0] + size[1]) * clipRange,
|
|
7242
7244
|
points = [{
|
|
7243
7245
|
x: x + size[0] / 2,
|
|
@@ -7269,7 +7271,7 @@
|
|
|
7269
7271
|
return !1;
|
|
7270
7272
|
}
|
|
7271
7273
|
drawOffset(ctx, size, x, y, offset) {
|
|
7272
|
-
return isNumber$
|
|
7274
|
+
return isNumber$4(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
|
|
7273
7275
|
}
|
|
7274
7276
|
}
|
|
7275
7277
|
var rect = new RectSymbol();
|
|
@@ -7277,7 +7279,7 @@
|
|
|
7277
7279
|
const tempBounds = new AABBBounds();
|
|
7278
7280
|
class CustomSymbolClass {
|
|
7279
7281
|
constructor(type, path, isSvg = !1) {
|
|
7280
|
-
this.pathStr = "", this.type = type, isArray$
|
|
7282
|
+
this.pathStr = "", this.type = type, isArray$5(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
|
|
7281
7283
|
}
|
|
7282
7284
|
drawOffset(ctx, size, x, y, offset, z, cb) {
|
|
7283
7285
|
return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
|
|
@@ -7288,7 +7290,7 @@
|
|
|
7288
7290
|
return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
|
|
7289
7291
|
}
|
|
7290
7292
|
parseSize(size) {
|
|
7291
|
-
return isNumber$
|
|
7293
|
+
return isNumber$4(size) ? size : Math.min(size[0], size[1]);
|
|
7292
7294
|
}
|
|
7293
7295
|
drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
|
|
7294
7296
|
return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
|
|
@@ -8101,7 +8103,7 @@
|
|
|
8101
8103
|
svg: svg
|
|
8102
8104
|
} = parser.parse(symbolType);
|
|
8103
8105
|
if (!svg) return null;
|
|
8104
|
-
const path = isArray$
|
|
8106
|
+
const path = isArray$5(svg.path) ? svg.path : [svg.path];
|
|
8105
8107
|
_tempBounds.clear();
|
|
8106
8108
|
const cacheList = [];
|
|
8107
8109
|
path.forEach(item => {
|
|
@@ -8406,7 +8408,7 @@
|
|
|
8406
8408
|
}
|
|
8407
8409
|
removeState(stateName, hasAnimation) {
|
|
8408
8410
|
if (this.currentStates) {
|
|
8409
|
-
const filter = isArray$
|
|
8411
|
+
const filter = isArray$5(stateName) ? s => !stateName.includes(s) : s => s !== stateName,
|
|
8410
8412
|
newStates = this.currentStates.filter(filter);
|
|
8411
8413
|
newStates.length !== this.currentStates.length && this.useStates(newStates, hasAnimation);
|
|
8412
8414
|
}
|
|
@@ -8584,7 +8586,7 @@
|
|
|
8584
8586
|
data: "init",
|
|
8585
8587
|
state: null
|
|
8586
8588
|
};
|
|
8587
|
-
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$
|
|
8589
|
+
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$6(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
|
|
8588
8590
|
}
|
|
8589
8591
|
setShadowGraphic(graphic) {
|
|
8590
8592
|
if (graphic) {
|
|
@@ -9025,7 +9027,7 @@
|
|
|
9025
9027
|
}
|
|
9026
9028
|
function runStroke(stroke, lineWidth) {
|
|
9027
9029
|
let s;
|
|
9028
|
-
return s = isArray$
|
|
9030
|
+
return s = isArray$5(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
|
|
9029
9031
|
}
|
|
9030
9032
|
function fillVisible(opacity, fillOpacity, fill) {
|
|
9031
9033
|
return fill && opacity * fillOpacity > 0;
|
|
@@ -9179,12 +9181,12 @@
|
|
|
9179
9181
|
textBaseline: textBaseline
|
|
9180
9182
|
} = attribute;
|
|
9181
9183
|
if (null != attribute.forceBoundsHeight) {
|
|
9182
|
-
const h = isNumber$
|
|
9184
|
+
const h = isNumber$4(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
|
|
9183
9185
|
dy = textLayoutOffsetY(textBaseline, h, h);
|
|
9184
9186
|
aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
|
|
9185
9187
|
}
|
|
9186
9188
|
if (null != attribute.forceBoundsWidth) {
|
|
9187
|
-
const w = isNumber$
|
|
9189
|
+
const w = isNumber$4(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
|
|
9188
9190
|
dx = textDrawOffsetX(textAlign, w);
|
|
9189
9191
|
aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
|
|
9190
9192
|
}
|
|
@@ -9481,7 +9483,7 @@
|
|
|
9481
9483
|
const {
|
|
9482
9484
|
text: text
|
|
9483
9485
|
} = this.attribute;
|
|
9484
|
-
return isArray$
|
|
9486
|
+
return isArray$5(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
|
|
9485
9487
|
}
|
|
9486
9488
|
getGraphicTheme() {
|
|
9487
9489
|
return getTheme(this).text;
|
|
@@ -9636,7 +9638,7 @@
|
|
|
9636
9638
|
lineHeight: lineHeight
|
|
9637
9639
|
},
|
|
9638
9640
|
layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure),
|
|
9639
|
-
lines = isArray$
|
|
9641
|
+
lines = isArray$5(text) ? text.map(l => l.toString()) : [text.toString()],
|
|
9640
9642
|
linesLayout = [],
|
|
9641
9643
|
bboxWH = [0, 0];
|
|
9642
9644
|
let lineCountLimit = 1 / 0;
|
|
@@ -9864,7 +9866,7 @@
|
|
|
9864
9866
|
};
|
|
9865
9867
|
|
|
9866
9868
|
const SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
9867
|
-
let Symbol$
|
|
9869
|
+
let Symbol$5 = class Symbol extends Graphic {
|
|
9868
9870
|
constructor(params = {
|
|
9869
9871
|
symbolType: "circle"
|
|
9870
9872
|
}) {
|
|
@@ -9891,7 +9893,7 @@
|
|
|
9891
9893
|
const {
|
|
9892
9894
|
size: size
|
|
9893
9895
|
} = this.attribute;
|
|
9894
|
-
return isArray$
|
|
9896
|
+
return isArray$5(size) ? 2 === size.length && size.every(this._validNumber) : this._validNumber(size);
|
|
9895
9897
|
}
|
|
9896
9898
|
doUpdateParsedPath() {
|
|
9897
9899
|
const {
|
|
@@ -9918,7 +9920,7 @@
|
|
|
9918
9920
|
const {
|
|
9919
9921
|
size = symbolTheme.size
|
|
9920
9922
|
} = attribute;
|
|
9921
|
-
if (isArray$
|
|
9923
|
+
if (isArray$5(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);else {
|
|
9922
9924
|
const halfWH = size / 2;
|
|
9923
9925
|
aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);
|
|
9924
9926
|
}
|
|
@@ -9939,7 +9941,7 @@
|
|
|
9939
9941
|
toCustomPath() {
|
|
9940
9942
|
const symbolInstance = this.getParsedPath(),
|
|
9941
9943
|
size = this.attribute.size,
|
|
9942
|
-
formattedSize = isArray$
|
|
9944
|
+
formattedSize = isArray$5(size) ? size : [size, size];
|
|
9943
9945
|
return symbolInstance.path ? new CustomPath2D().fromCustomPath2D(symbolInstance.path, 0, 0, formattedSize[0], formattedSize[1]) : new CustomPath2D().fromString(symbolInstance.pathStr, 0, 0, formattedSize[0], formattedSize[1]);
|
|
9944
9946
|
}
|
|
9945
9947
|
clone() {
|
|
@@ -9949,11 +9951,11 @@
|
|
|
9949
9951
|
return Symbol.NOWORK_ANIMATE_ATTR;
|
|
9950
9952
|
}
|
|
9951
9953
|
};
|
|
9952
|
-
Symbol$
|
|
9954
|
+
Symbol$5.NOWORK_ANIMATE_ATTR = Object.assign({
|
|
9953
9955
|
symbolType: 1
|
|
9954
9956
|
}, NOWORK_ANIMATE_ATTR);
|
|
9955
9957
|
function createSymbol(attributes) {
|
|
9956
|
-
return new Symbol$
|
|
9958
|
+
return new Symbol$5(attributes);
|
|
9957
9959
|
}
|
|
9958
9960
|
|
|
9959
9961
|
const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", "curveTension", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
@@ -10702,7 +10704,7 @@
|
|
|
10702
10704
|
const halfPi = pi / 2;
|
|
10703
10705
|
function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
|
|
10704
10706
|
let cornerRadius;
|
|
10705
|
-
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$
|
|
10707
|
+
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$4(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
10706
10708
|
const cornerRadiusArr = rectCornerRadius;
|
|
10707
10709
|
let cr0, cr1;
|
|
10708
10710
|
switch (cornerRadiusArr.length) {
|
|
@@ -10804,7 +10806,7 @@
|
|
|
10804
10806
|
nextX = x + sign * d,
|
|
10805
10807
|
nextY = y + sign * d,
|
|
10806
10808
|
dw = 2 * d;
|
|
10807
|
-
if (0 === cornerRadius || isArray$
|
|
10809
|
+
if (0 === cornerRadius || isArray$5(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width - sign * dw, height - sign * dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - sign * dw, height - sign * dw, cornerRadius, "bevel" !== cornerType)), context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, borderStyle, rectAttribute[key]);else if (doStroke) {
|
|
10808
10810
|
const lastOpacity = rectAttribute[key].opacity;
|
|
10809
10811
|
rectAttribute[key].opacity = opacity, context.setStrokeStyle(rect, borderStyle, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute[key]), rectAttribute[key].opacity = lastOpacity, context.stroke();
|
|
10810
10812
|
}
|
|
@@ -10843,7 +10845,7 @@
|
|
|
10843
10845
|
height: height
|
|
10844
10846
|
} = rect.attribute;
|
|
10845
10847
|
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
|
|
10846
|
-
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$
|
|
10848
|
+
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$5(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
10847
10849
|
let lastStroke,
|
|
10848
10850
|
lastStrokeI = 0;
|
|
10849
10851
|
return createRectPath(context, x, y, width, height, cornerRadius, "bevel" !== cornerType, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
@@ -11265,7 +11267,7 @@
|
|
|
11265
11267
|
offsetX: offsetX,
|
|
11266
11268
|
offsetY: offsetY,
|
|
11267
11269
|
offsetZ: z
|
|
11268
|
-
}), line.cache && !isArray$
|
|
11270
|
+
}), line.cache && !isArray$5(line.cache) && line.cache.curves.every(c => c.defined) && line.attribute.curveType && line.attribute.curveType.includes("Closed") && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(line, attribute, defaultAttribute);
|
|
11269
11271
|
const {
|
|
11270
11272
|
x: originX = 0,
|
|
11271
11273
|
x: originY = 0
|
|
@@ -11505,7 +11507,7 @@
|
|
|
11505
11507
|
const {
|
|
11506
11508
|
stroke = areaAttribute && areaAttribute.stroke
|
|
11507
11509
|
} = area.attribute;
|
|
11508
|
-
if (isArray$
|
|
11510
|
+
if (isArray$5(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1]) if (context.beginPath(), stroke[0]) {
|
|
11509
11511
|
context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
|
|
11510
11512
|
for (let i = 1; i < points.length; i++) {
|
|
11511
11513
|
const p = points[i];
|
|
@@ -11683,7 +11685,7 @@
|
|
|
11683
11685
|
const {
|
|
11684
11686
|
stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke
|
|
11685
11687
|
} = attribute;
|
|
11686
|
-
isArray$
|
|
11688
|
+
isArray$5(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction.ROW ? "x" : "y", {
|
|
11687
11689
|
offsetX: offsetX,
|
|
11688
11690
|
offsetY: offsetY,
|
|
11689
11691
|
offsetZ: offsetZ
|
|
@@ -11744,7 +11746,7 @@
|
|
|
11744
11746
|
if (!rect.valid || !visible) return;
|
|
11745
11747
|
if (!doFill && !doStroke) return;
|
|
11746
11748
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
11747
|
-
0 === cornerRadius || isArray$
|
|
11749
|
+
0 === cornerRadius || isArray$5(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, "bevel" !== cornerType));
|
|
11748
11750
|
const doFillOrStroke = {
|
|
11749
11751
|
doFill: doFill,
|
|
11750
11752
|
doStroke: doStroke
|
|
@@ -11816,7 +11818,7 @@
|
|
|
11816
11818
|
const camera = context.camera;
|
|
11817
11819
|
if (keepDirIn3d && camera && context.project) {
|
|
11818
11820
|
const p = context.project(x, y, z);
|
|
11819
|
-
context.camera = null, isArray$
|
|
11821
|
+
context.camera = null, isArray$5(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, _x = p.x, _y = p.y, _z = void 0;
|
|
11820
11822
|
}
|
|
11821
11823
|
!1 === parsedPath.draw(context, size, _x, _y, _z, (p, a) => {
|
|
11822
11824
|
var _a, _b, _c, _d;
|
|
@@ -11894,7 +11896,7 @@
|
|
|
11894
11896
|
};
|
|
11895
11897
|
let b;
|
|
11896
11898
|
"richtext" === graphic.type && (matrix = context.currentMatrix.clone(), context.restore(), context.save(), context.setTransformForCurrent());
|
|
11897
|
-
const shouldReCalBounds = isObject$
|
|
11899
|
+
const shouldReCalBounds = isObject$6(background) && background.background,
|
|
11898
11900
|
onlyTranslate = graphic.transMatrix.onlyTranslate();
|
|
11899
11901
|
if (shouldReCalBounds) {
|
|
11900
11902
|
const _b = graphic.AABBBounds,
|
|
@@ -12148,7 +12150,7 @@
|
|
|
12148
12150
|
context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
|
|
12149
12151
|
drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
|
|
12150
12152
|
}), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
|
|
12151
|
-
} else 0 === cornerRadius || isArray$
|
|
12153
|
+
} else 0 === cornerRadius || isArray$5(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, "bevel" !== cornerType));
|
|
12152
12154
|
this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
|
|
12153
12155
|
const doFillOrStroke = {
|
|
12154
12156
|
doFill: doFill,
|
|
@@ -12891,7 +12893,7 @@
|
|
|
12891
12893
|
}) : foreach(group, DefaultAttribute.zIndex, item => {
|
|
12892
12894
|
drawContext.break || (item.isContainer ? this.renderGroup(item, drawContext, nextM) : this.renderItem(item, drawContext));
|
|
12893
12895
|
}, !1, !!(null === (_a = drawContext.context) || void 0 === _a ? void 0 : _a.camera));
|
|
12894
|
-
}, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, isArray$
|
|
12896
|
+
}, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, isArray$5(this.contributions) || (this.contributions = [this.contributions]), this.init();
|
|
12895
12897
|
}
|
|
12896
12898
|
reInit() {
|
|
12897
12899
|
this.init(), this.contributions.forEach(item => {
|
|
@@ -14086,7 +14088,7 @@
|
|
|
14086
14088
|
}
|
|
14087
14089
|
function mapToCanvasPointForCanvas(nativeEvent) {
|
|
14088
14090
|
var _a;
|
|
14089
|
-
if (isNumber(nativeEvent._canvasX) && isNumber(nativeEvent._canvasY)) return {
|
|
14091
|
+
if (isNumber$2(nativeEvent._canvasX) && isNumber$2(nativeEvent._canvasY)) return {
|
|
14090
14092
|
x: nativeEvent._canvasX,
|
|
14091
14093
|
y: nativeEvent._canvasY
|
|
14092
14094
|
};
|
|
@@ -14150,7 +14152,7 @@
|
|
|
14150
14152
|
[key]: value
|
|
14151
14153
|
}, this.attribute, key, context);
|
|
14152
14154
|
if (params) return this._setAttributes(params, forceUpdateTag);
|
|
14153
|
-
isPlainObject$1(this.attribute[key]) && isPlainObject$1(value) && !isFunction$
|
|
14155
|
+
isPlainObject$1(this.attribute[key]) && isPlainObject$1(value) && !isFunction$4(this.attribute[key]) && !isFunction$4(value) ? merge(this.attribute[key], value) : this.attribute[key] = value, this._skipRenderAttributes.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
|
|
14154
14156
|
}
|
|
14155
14157
|
setAttributes(params, forceUpdateTag, context) {
|
|
14156
14158
|
return params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this._setAttributes(params, forceUpdateTag);
|
|
@@ -14163,7 +14165,7 @@
|
|
|
14163
14165
|
isNil$1(keys) && (keys = Object.keys(params));
|
|
14164
14166
|
for (let i = 0; i < keys.length; i++) {
|
|
14165
14167
|
const key = keys[i];
|
|
14166
|
-
!isPlainObject$1(this.attribute[key]) || isFunction$
|
|
14168
|
+
!isPlainObject$1(this.attribute[key]) || isFunction$4(this.attribute[key]) || isFunction$4(params[key]) ? this.attribute[key] = params[key] : merge(this.attribute[key], params[key]);
|
|
14167
14169
|
}
|
|
14168
14170
|
}
|
|
14169
14171
|
bindEvents() {}
|
|
@@ -14176,6 +14178,18 @@
|
|
|
14176
14178
|
const changeEvent = new CustomEvent(eventName, details);
|
|
14177
14179
|
changeEvent.manager = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventSystem.manager, this.dispatchEvent(changeEvent);
|
|
14178
14180
|
}
|
|
14181
|
+
eventPosToStagePos(e) {
|
|
14182
|
+
var _a, _b;
|
|
14183
|
+
const result = {
|
|
14184
|
+
x: 0,
|
|
14185
|
+
y: 0
|
|
14186
|
+
},
|
|
14187
|
+
stagePoints = null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventPointTransform(e)) && void 0 !== _b ? _b : {
|
|
14188
|
+
x: 0,
|
|
14189
|
+
y: 0
|
|
14190
|
+
};
|
|
14191
|
+
return this.globalTransMatrix.transformPoint(stagePoints, result), result;
|
|
14192
|
+
}
|
|
14179
14193
|
}
|
|
14180
14194
|
|
|
14181
14195
|
const MathPickerContribution = Symbol.for("MathPickerContribution");
|
|
@@ -14245,7 +14259,7 @@
|
|
|
14245
14259
|
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
14246
14260
|
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
14247
14261
|
let picked = !0;
|
|
14248
|
-
if (!onlyTranslate || rect.shadowRoot || isNumber$
|
|
14262
|
+
if (!onlyTranslate || rect.shadowRoot || isNumber$4(cornerRadius, !0) && 0 !== cornerRadius || isArray$5(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
14249
14263
|
if (picked) return !0;
|
|
14250
14264
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
14251
14265
|
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
@@ -14924,7 +14938,7 @@
|
|
|
14924
14938
|
const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3],
|
|
14925
14939
|
titleVisible = isValid$3(title) && !1 !== visible,
|
|
14926
14940
|
titleAttrs = Object.assign(Object.assign({
|
|
14927
|
-
text: isArray$
|
|
14941
|
+
text: isArray$5(title) ? title : [title],
|
|
14928
14942
|
visible: titleVisible,
|
|
14929
14943
|
wrap: !0
|
|
14930
14944
|
}, titleStyle), {
|
|
@@ -14943,7 +14957,7 @@
|
|
|
14943
14957
|
titleVisible || (height = 0);
|
|
14944
14958
|
const contentVisible = isValid$3(content) && !1 !== visible,
|
|
14945
14959
|
contentAttrs = Object.assign(Object.assign({
|
|
14946
|
-
text: isArray$
|
|
14960
|
+
text: isArray$5(content) ? content : [content],
|
|
14947
14961
|
visible: contentVisible,
|
|
14948
14962
|
wrap: !0
|
|
14949
14963
|
}, contentStyle), {
|
|
@@ -14978,7 +14992,7 @@
|
|
|
14978
14992
|
});
|
|
14979
14993
|
}
|
|
14980
14994
|
const symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12,
|
|
14981
|
-
spaceSize = isArray$
|
|
14995
|
+
spaceSize = isArray$5(symbolSize) ? [symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0)] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0),
|
|
14982
14996
|
lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1,
|
|
14983
14997
|
range = this.stage ? [null !== (_f = this.stage.viewWidth) && void 0 !== _f ? _f : this.stage.width, null !== (_g = this.stage.viewHeight) && void 0 !== _g ? _g : this.stage.height] : void 0;
|
|
14984
14998
|
if (range) {
|
|
@@ -14986,27 +15000,27 @@
|
|
|
14986
15000
|
leftWidth = null !== (_h = this.attribute.x) && void 0 !== _h ? _h : b.x1,
|
|
14987
15001
|
rightWidth = range[0] - b.x1;
|
|
14988
15002
|
let maxSpace = Math.max(leftWidth, rightWidth);
|
|
14989
|
-
const buf = (isArray$
|
|
15003
|
+
const buf = (isArray$5(symbolSize) ? symbolSize[0] : 12) + 3;
|
|
14990
15004
|
if (maxSpace = Math.min(maxSpace - buf, maxSpace * maxWidthPercent), maxSpace < popTipWidth) {
|
|
14991
15005
|
popTipWidth = maxSpace;
|
|
14992
15006
|
const buf = parsedPadding[1] + parsedPadding[3];
|
|
14993
15007
|
titleShape.setAttribute("maxLineWidth", maxSpace - buf), contentShape.setAttribute("maxLineWidth", maxSpace - buf), poptipHeight = parsedPadding[0] + parsedPadding[2], titleVisible && (poptipHeight += titleShape.AABBBounds.height() + space), poptipHeight += contentShape.AABBBounds.height();
|
|
14994
15008
|
}
|
|
14995
15009
|
}
|
|
14996
|
-
const layout = "auto" === position || isArray$
|
|
14997
|
-
positionList = isArray$
|
|
15010
|
+
const layout = "auto" === position || isArray$5(position),
|
|
15011
|
+
positionList = isArray$5(position) ? position : this.positionList;
|
|
14998
15012
|
let maxBBoxI,
|
|
14999
15013
|
maxBBoxSize = -1 / 0;
|
|
15000
15014
|
for (let i = 0; i < positionList.length + 1; i++) {
|
|
15001
15015
|
const p = layout ? positionList[i === positionList.length ? maxBBoxI : i] : position;
|
|
15002
15016
|
let symbolType = "arrow2Left",
|
|
15003
|
-
offsetX = (isArray$
|
|
15017
|
+
offsetX = (isArray$5(symbolSize) ? symbolSize[0] : symbolSize) / 4,
|
|
15004
15018
|
offsetY = 0;
|
|
15005
|
-
"top" === p || "bottom" === p || "left" === p || "right" === p ? symbolType = "arrow2Left" : "concise" === triangleMode && (symbolType = conciseSymbolMap[p], offsetX = ["tl", "bl", "rt", "rb"].includes(p) ? (isArray$
|
|
15019
|
+
"top" === p || "bottom" === p || "left" === p || "right" === p ? symbolType = "arrow2Left" : "concise" === triangleMode && (symbolType = conciseSymbolMap[p], offsetX = ["tl", "bl", "rt", "rb"].includes(p) ? (isArray$5(symbolSize) ? symbolSize[0] : symbolSize) / 2 : -(isArray$5(symbolSize) ? symbolSize[0] : symbolSize) / 2, offsetY = ["tl", "tr", "lb", "rb"].includes(p) ? -(isArray$5(symbolSize) ? symbolSize[1] : symbolSize) / 2 : (isArray$5(symbolSize) ? symbolSize[1] : symbolSize) / 2);
|
|
15006
15020
|
const {
|
|
15007
15021
|
angle: angle,
|
|
15008
15022
|
offset: offset
|
|
15009
|
-
} = this.getAngleAndOffset(p, popTipWidth, poptipHeight, isArray$
|
|
15023
|
+
} = this.getAngleAndOffset(p, popTipWidth, poptipHeight, isArray$5(spaceSize) ? spaceSize : [spaceSize, spaceSize - lineWidth], symbolType);
|
|
15010
15024
|
let bgSymbol,
|
|
15011
15025
|
anchorPoint = {
|
|
15012
15026
|
x: 0,
|
|
@@ -15051,7 +15065,7 @@
|
|
|
15051
15065
|
const {
|
|
15052
15066
|
size = 12
|
|
15053
15067
|
} = logoSymbol,
|
|
15054
|
-
sizeArray = isArray$
|
|
15068
|
+
sizeArray = isArray$5(size) ? size : [size, size];
|
|
15055
15069
|
"auto" === sizeArray[1] && (sizeArray[1] = poptipHeight), "auto" === sizeArray[0] && (sizeArray[0] = poptipHeight);
|
|
15056
15070
|
const sizeW = sizeArray[0];
|
|
15057
15071
|
group.createOrUpdateChild("poptip-logo", Object.assign(Object.assign({}, logoSymbol), {
|
|
@@ -15092,7 +15106,7 @@
|
|
|
15092
15106
|
let mainDirectionOverlap = !1;
|
|
15093
15107
|
if (isVerticalPosition ? mainDirectionOverlap = "top" === p && b.y1 < 0 || "bottom" === p && b.y2 > stageBounds.y2 : isHorizontalPosition && (mainDirectionOverlap = "left" === p && b.x1 < 0 || "right" === p && b.x2 > stageBounds.x2), !mainDirectionOverlap) {
|
|
15094
15108
|
let secondaryOffset = 0;
|
|
15095
|
-
const szNumber = (isArray$
|
|
15109
|
+
const szNumber = (isArray$5(symbolSize) ? symbolSize[1] : symbolSize) / 2;
|
|
15096
15110
|
isVerticalPosition ? (b.x1 < 0 ? secondaryOffset = -b.x1 : b.x2 > stageBounds.x2 && (secondaryOffset = stageBounds.x2 - b.x2), group.setAttribute("x", group.attribute.x + secondaryOffset), bgSymbol.setAttribute("dx", min(max(bgSymbol.attribute.dx - secondaryOffset, szNumber), b.width() - szNumber))) : isHorizontalPosition && (b.y1 < 0 ? secondaryOffset = -b.y1 : b.y2 > stageBounds.y2 && (secondaryOffset = stageBounds.y2 - b.y2), group.setAttribute("y", group.attribute.y + secondaryOffset), bgSymbol.setAttribute("dy", min(max(bgSymbol.attribute.dy - secondaryOffset, szNumber), b.height() - szNumber)));
|
|
15097
15111
|
break;
|
|
15098
15112
|
}
|
|
@@ -17887,7 +17901,7 @@
|
|
|
17887
17901
|
}
|
|
17888
17902
|
function computeRowsCountByRecordDateForCompact(gantt, record) {
|
|
17889
17903
|
var _a;
|
|
17890
|
-
if (!record.children ||
|
|
17904
|
+
if (!record.children || record.children.length <= 1) return 1 === (null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) ? record.children[0].vtable_gantt_showIndex = 0 : record.vtable_gantt_showIndex = 0, 1;
|
|
17891
17905
|
const sortedChildren = record.children.slice().sort((a, b) => {
|
|
17892
17906
|
const {
|
|
17893
17907
|
startDate: aStartDate
|
|
@@ -17924,7 +17938,7 @@
|
|
|
17924
17938
|
}
|
|
17925
17939
|
function computeRowsCountByRecordDate(gantt, record) {
|
|
17926
17940
|
var _a;
|
|
17927
|
-
if (!record.children ||
|
|
17941
|
+
if (!record.children || record.children.length <= 1) return 1 === (null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) ? record.children[0].vtable_gantt_showIndex = 0 : record.vtable_gantt_showIndex = 0, 1;
|
|
17928
17942
|
const rows = [];
|
|
17929
17943
|
for (let i = 0; i <= record.children.length - 1; i++) {
|
|
17930
17944
|
const newRecord = record.children[i],
|
|
@@ -18428,13 +18442,14 @@
|
|
|
18428
18442
|
isMilestone = taskRecord.type === TaskType.MILESTONE;
|
|
18429
18443
|
if (isMilestone && !startDate || !isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime())) return null;
|
|
18430
18444
|
const {
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
taskbarHeight = taskBarStyle.width
|
|
18437
|
-
|
|
18445
|
+
unit: unit,
|
|
18446
|
+
step: step
|
|
18447
|
+
} = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];
|
|
18448
|
+
let taskBarSize = computeCountToTimeScale(endDate, startDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;
|
|
18449
|
+
const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex),
|
|
18450
|
+
taskbarHeight = taskBarStyle.width;
|
|
18451
|
+
isValid$1(taskBarStyle.minSize) && (taskBarSize = Math.max(taskBarSize, taskBarStyle.minSize));
|
|
18452
|
+
const oneTaskHeigth = this._scene._gantt.parsedOptions.rowHeight,
|
|
18438
18453
|
milestoneTaskBarHeight = this._scene._gantt.parsedOptions.taskBarMilestoneStyle.width,
|
|
18439
18454
|
x = computeCountToTimeScale(startDate, this._scene._gantt.parsedOptions.minDate, unit, step) * this._scene._gantt.parsedOptions.timelineColWidth - (isMilestone ? milestoneTaskBarHeight / 2 : 0),
|
|
18440
18455
|
y = this._scene._gantt.getRowsHeightByIndex(0, index - 1) + (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ? (null !== (_a = childIndex) && void 0 !== _a ? _a : 0) * oneTaskHeigth : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange || this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact ? taskRecord.vtable_gantt_showIndex * oneTaskHeigth : 0) + (oneTaskHeigth - (isMilestone ? milestoneTaskBarHeight : taskbarHeight)) / 2,
|
|
@@ -19075,7 +19090,7 @@
|
|
|
19075
19090
|
}), this.group.appendChild(this.linkLinesContainer), null === (_a = this._scene._gantt.records) || void 0 === _a ? void 0 : _a.length) for (let i = 0; i < this._scene._gantt.parsedOptions.dependencyLinks.length; i++) this.initLinkLine(i);
|
|
19076
19091
|
}
|
|
19077
19092
|
initLinkLine(index) {
|
|
19078
|
-
var _a, _b;
|
|
19093
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
19079
19094
|
const {
|
|
19080
19095
|
taskKeyField: taskKeyField,
|
|
19081
19096
|
dependencyLinks: dependencyLinks
|
|
@@ -19141,16 +19156,16 @@
|
|
|
19141
19156
|
lineStyle = this._scene._gantt.parsedOptions.dependencyLinkLineStyle,
|
|
19142
19157
|
lineObj = createLine({
|
|
19143
19158
|
pickable: !0,
|
|
19144
|
-
stroke: lineStyle.lineColor,
|
|
19145
|
-
lineWidth: lineStyle.lineWidth,
|
|
19146
|
-
lineDash: lineStyle.lineDash,
|
|
19159
|
+
stroke: null !== (_d = null === (_c = link.linkLineStyle) || void 0 === _c ? void 0 : _c.lineColor) && void 0 !== _d ? _d : lineStyle.lineColor,
|
|
19160
|
+
lineWidth: null !== (_f = null === (_e = link.linkLineStyle) || void 0 === _e ? void 0 : _e.lineWidth) && void 0 !== _f ? _f : lineStyle.lineWidth,
|
|
19161
|
+
lineDash: null !== (_h = null === (_g = link.linkLineStyle) || void 0 === _g ? void 0 : _g.lineDash) && void 0 !== _h ? _h : lineStyle.lineDash,
|
|
19147
19162
|
points: linePoints,
|
|
19148
19163
|
pickStrokeBuffer: 3,
|
|
19149
19164
|
vtable_link: link
|
|
19150
19165
|
});
|
|
19151
19166
|
this.linkLinesContainer.appendChild(lineObj), link.vtable_gantt_linkLineNode = lineObj;
|
|
19152
19167
|
const arrow = new Polygon({
|
|
19153
|
-
fill: lineStyle.lineColor,
|
|
19168
|
+
fill: null !== (_k = null === (_j = link.linkLineStyle) || void 0 === _j ? void 0 : _j.lineColor) && void 0 !== _k ? _k : lineStyle.lineColor,
|
|
19154
19169
|
points: arrowPoints
|
|
19155
19170
|
});
|
|
19156
19171
|
this.linkLinesContainer.appendChild(arrow), link.vtable_gantt_linkArrowNode = arrow;
|
|
@@ -19897,7 +19912,7 @@
|
|
|
19897
19912
|
}
|
|
19898
19913
|
};
|
|
19899
19914
|
const isIt = (v, type) => judgeType(v) === type;
|
|
19900
|
-
const isObject = v => isIt(v, "object");
|
|
19915
|
+
const isObject$4 = v => isIt(v, "object");
|
|
19901
19916
|
|
|
19902
19917
|
function debounce(func, wait, options) {
|
|
19903
19918
|
let lastArgs,
|
|
@@ -19935,7 +19950,7 @@
|
|
|
19935
19950
|
return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
19936
19951
|
}(time));
|
|
19937
19952
|
}
|
|
19938
|
-
return wait = +wait || 0, isObject(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(+options.maxWait || 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), function (...args) {
|
|
19953
|
+
return wait = +wait || 0, isObject$4(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(+options.maxWait || 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), function (...args) {
|
|
19939
19954
|
const time = Date.now(),
|
|
19940
19955
|
isInvoking = shouldInvoke(time);
|
|
19941
19956
|
if (lastArgs = args, lastThis = this, lastCallTime = time, isInvoking) {
|
|
@@ -21382,6 +21397,7 @@
|
|
|
21382
21397
|
const listTable_options = {},
|
|
21383
21398
|
needPutInListTableKeys = ["container", "records", "rowSeriesNumber", "overscrollBehavior", "pixelRatio", "eventOptions"];
|
|
21384
21399
|
for (const key in this.options) needPutInListTableKeys.indexOf(key) >= 0 && (listTable_options[key] = this.options[key]);
|
|
21400
|
+
listTable_options.defaultRowHeight = this.options.rowHeight;
|
|
21385
21401
|
for (const key in this.options.taskListTable) {
|
|
21386
21402
|
if (listTable_options[key] = this.options.taskListTable[key], "columns" === key && (listTable_options[key][listTable_options[key].length - 1].disableColumnResize = !0, this.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline || this.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate || this.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange || this.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact)) for (let i = 0; i < listTable_options.columns.length; i++) listTable_options.columns[i].tree && (listTable_options.columns[i].tree = !1);
|
|
21387
21403
|
"hierarchyExpandLevel" !== key || this.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Inline && this.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Separate && this.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Arrange && this.parsedOptions.tasksShowMode !== TasksShowMode.Sub_Tasks_Compact || delete listTable_options[key];
|
|
@@ -21460,21 +21476,27 @@
|
|
|
21460
21476
|
} = args,
|
|
21461
21477
|
record = table.getRecordByRowCol(0, row);
|
|
21462
21478
|
if (record) return ((null === (_a = record.children) || void 0 === _a ? void 0 : _a.length) || 1) * this.parsedOptions.rowHeight;
|
|
21463
|
-
}, listTable_options.defaultRowHeight = "auto"
|
|
21479
|
+
}, listTable_options.defaultRowHeight = "auto", listTable_options.customConfig = {
|
|
21480
|
+
forceComputeAllRowHeight: !0
|
|
21481
|
+
}) : this.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact ? (listTable_options.customComputeRowHeight = args => {
|
|
21464
21482
|
const {
|
|
21465
21483
|
row: row,
|
|
21466
21484
|
table: table
|
|
21467
21485
|
} = args,
|
|
21468
21486
|
record = table.getRecordByRowCol(0, row);
|
|
21469
21487
|
if (record) return computeRowsCountByRecordDateForCompact(this, record) * this.parsedOptions.rowHeight;
|
|
21470
|
-
}, listTable_options.defaultRowHeight = "auto"
|
|
21488
|
+
}, listTable_options.defaultRowHeight = "auto", listTable_options.customConfig = {
|
|
21489
|
+
forceComputeAllRowHeight: !0
|
|
21490
|
+
}) : this.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ? (listTable_options.customComputeRowHeight = args => {
|
|
21471
21491
|
const {
|
|
21472
21492
|
row: row,
|
|
21473
21493
|
table: table
|
|
21474
21494
|
} = args,
|
|
21475
21495
|
record = table.getRecordByRowCol(0, row);
|
|
21476
21496
|
if (record) return computeRowsCountByRecordDate(this, record) * this.parsedOptions.rowHeight;
|
|
21477
|
-
}, listTable_options.defaultRowHeight = "auto"
|
|
21497
|
+
}, listTable_options.defaultRowHeight = "auto", listTable_options.customConfig = {
|
|
21498
|
+
forceComputeAllRowHeight: !0
|
|
21499
|
+
}) : listTable_options.defaultRowHeight = null !== (_41 = this.options.rowHeight) && void 0 !== _41 ? _41 : 40, listTable_options.clearDOM = !1, listTable_options;
|
|
21478
21500
|
}
|
|
21479
21501
|
getElement() {
|
|
21480
21502
|
return this.element;
|
|
@@ -21898,6 +21920,3466 @@
|
|
|
21898
21920
|
}
|
|
21899
21921
|
}
|
|
21900
21922
|
|
|
21923
|
+
/*
|
|
21924
|
+
* big.js v6.2.2
|
|
21925
|
+
* A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.
|
|
21926
|
+
* Copyright (c) 2024 Michael Mclaughlin
|
|
21927
|
+
* https://github.com/MikeMcl/big.js/LICENCE.md
|
|
21928
|
+
*/
|
|
21929
|
+
|
|
21930
|
+
/************************************** EDITABLE DEFAULTS *****************************************/
|
|
21931
|
+
|
|
21932
|
+
// The default values below must be integers within the stated ranges.
|
|
21933
|
+
|
|
21934
|
+
/*
|
|
21935
|
+
* The maximum number of decimal places (DP) of the results of operations involving division:
|
|
21936
|
+
* div and sqrt, and pow with negative exponents.
|
|
21937
|
+
*/
|
|
21938
|
+
var DP = 20,
|
|
21939
|
+
// 0 to MAX_DP
|
|
21940
|
+
|
|
21941
|
+
/*
|
|
21942
|
+
* The rounding mode (RM) used when rounding to the above decimal places.
|
|
21943
|
+
*
|
|
21944
|
+
* 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)
|
|
21945
|
+
* 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)
|
|
21946
|
+
* 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)
|
|
21947
|
+
* 3 Away from zero. (ROUND_UP)
|
|
21948
|
+
*/
|
|
21949
|
+
RM = 1,
|
|
21950
|
+
// 0, 1, 2 or 3
|
|
21951
|
+
|
|
21952
|
+
// The maximum value of DP and Big.DP.
|
|
21953
|
+
MAX_DP = 1E6,
|
|
21954
|
+
// 0 to 1000000
|
|
21955
|
+
|
|
21956
|
+
// The maximum magnitude of the exponent argument to the pow method.
|
|
21957
|
+
MAX_POWER = 1E6,
|
|
21958
|
+
// 1 to 1000000
|
|
21959
|
+
|
|
21960
|
+
/*
|
|
21961
|
+
* The negative exponent (NE) at and beneath which toString returns exponential notation.
|
|
21962
|
+
* (JavaScript numbers: -7)
|
|
21963
|
+
* -1000000 is the minimum recommended exponent value of a Big.
|
|
21964
|
+
*/
|
|
21965
|
+
NE = -7,
|
|
21966
|
+
// 0 to -1000000
|
|
21967
|
+
|
|
21968
|
+
/*
|
|
21969
|
+
* The positive exponent (PE) at and above which toString returns exponential notation.
|
|
21970
|
+
* (JavaScript numbers: 21)
|
|
21971
|
+
* 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.
|
|
21972
|
+
*/
|
|
21973
|
+
PE = 21,
|
|
21974
|
+
// 0 to 1000000
|
|
21975
|
+
|
|
21976
|
+
/*
|
|
21977
|
+
* When true, an error will be thrown if a primitive number is passed to the Big constructor,
|
|
21978
|
+
* or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a
|
|
21979
|
+
* primitive number without a loss of precision.
|
|
21980
|
+
*/
|
|
21981
|
+
STRICT = false,
|
|
21982
|
+
// true or false
|
|
21983
|
+
|
|
21984
|
+
/**************************************************************************************************/
|
|
21985
|
+
|
|
21986
|
+
// Error messages.
|
|
21987
|
+
NAME = '[big.js] ',
|
|
21988
|
+
INVALID = NAME + 'Invalid ',
|
|
21989
|
+
INVALID_DP = INVALID + 'decimal places',
|
|
21990
|
+
INVALID_RM = INVALID + 'rounding mode',
|
|
21991
|
+
DIV_BY_ZERO = NAME + 'Division by zero',
|
|
21992
|
+
// The shared prototype object.
|
|
21993
|
+
P = {},
|
|
21994
|
+
UNDEFINED = void 0,
|
|
21995
|
+
NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
21996
|
+
|
|
21997
|
+
/*
|
|
21998
|
+
* Create and return a Big constructor.
|
|
21999
|
+
*/
|
|
22000
|
+
function _Big_() {
|
|
22001
|
+
/*
|
|
22002
|
+
* The Big constructor and exported function.
|
|
22003
|
+
* Create and return a new instance of a Big number object.
|
|
22004
|
+
*
|
|
22005
|
+
* n {number|string|Big} A numeric value.
|
|
22006
|
+
*/
|
|
22007
|
+
function Big(n) {
|
|
22008
|
+
var x = this;
|
|
22009
|
+
|
|
22010
|
+
// Enable constructor usage without new.
|
|
22011
|
+
if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);
|
|
22012
|
+
|
|
22013
|
+
// Duplicate.
|
|
22014
|
+
if (n instanceof Big) {
|
|
22015
|
+
x.s = n.s;
|
|
22016
|
+
x.e = n.e;
|
|
22017
|
+
x.c = n.c.slice();
|
|
22018
|
+
} else {
|
|
22019
|
+
if (typeof n !== 'string') {
|
|
22020
|
+
if (Big.strict === true && typeof n !== 'bigint') {
|
|
22021
|
+
throw TypeError(INVALID + 'value');
|
|
22022
|
+
}
|
|
22023
|
+
|
|
22024
|
+
// Minus zero?
|
|
22025
|
+
n = n === 0 && 1 / n < 0 ? '-0' : String(n);
|
|
22026
|
+
}
|
|
22027
|
+
parse(x, n);
|
|
22028
|
+
}
|
|
22029
|
+
|
|
22030
|
+
// Retain a reference to this Big constructor.
|
|
22031
|
+
// Shadow Big.prototype.constructor which points to Object.
|
|
22032
|
+
x.constructor = Big;
|
|
22033
|
+
}
|
|
22034
|
+
Big.prototype = P;
|
|
22035
|
+
Big.DP = DP;
|
|
22036
|
+
Big.RM = RM;
|
|
22037
|
+
Big.NE = NE;
|
|
22038
|
+
Big.PE = PE;
|
|
22039
|
+
Big.strict = STRICT;
|
|
22040
|
+
Big.roundDown = 0;
|
|
22041
|
+
Big.roundHalfUp = 1;
|
|
22042
|
+
Big.roundHalfEven = 2;
|
|
22043
|
+
Big.roundUp = 3;
|
|
22044
|
+
return Big;
|
|
22045
|
+
}
|
|
22046
|
+
|
|
22047
|
+
/*
|
|
22048
|
+
* Parse the number or string value passed to a Big constructor.
|
|
22049
|
+
*
|
|
22050
|
+
* x {Big} A Big number instance.
|
|
22051
|
+
* n {number|string} A numeric value.
|
|
22052
|
+
*/
|
|
22053
|
+
function parse(x, n) {
|
|
22054
|
+
var e, i, nl;
|
|
22055
|
+
if (!NUMERIC.test(n)) {
|
|
22056
|
+
throw Error(INVALID + 'number');
|
|
22057
|
+
}
|
|
22058
|
+
|
|
22059
|
+
// Determine sign.
|
|
22060
|
+
x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;
|
|
22061
|
+
|
|
22062
|
+
// Decimal point?
|
|
22063
|
+
if ((e = n.indexOf('.')) > -1) n = n.replace('.', '');
|
|
22064
|
+
|
|
22065
|
+
// Exponential form?
|
|
22066
|
+
if ((i = n.search(/e/i)) > 0) {
|
|
22067
|
+
// Determine exponent.
|
|
22068
|
+
if (e < 0) e = i;
|
|
22069
|
+
e += +n.slice(i + 1);
|
|
22070
|
+
n = n.substring(0, i);
|
|
22071
|
+
} else if (e < 0) {
|
|
22072
|
+
// Integer.
|
|
22073
|
+
e = n.length;
|
|
22074
|
+
}
|
|
22075
|
+
nl = n.length;
|
|
22076
|
+
|
|
22077
|
+
// Determine leading zeros.
|
|
22078
|
+
for (i = 0; i < nl && n.charAt(i) == '0';) ++i;
|
|
22079
|
+
if (i == nl) {
|
|
22080
|
+
// Zero.
|
|
22081
|
+
x.c = [x.e = 0];
|
|
22082
|
+
} else {
|
|
22083
|
+
// Determine trailing zeros.
|
|
22084
|
+
for (; nl > 0 && n.charAt(--nl) == '0';);
|
|
22085
|
+
x.e = e - i - 1;
|
|
22086
|
+
x.c = [];
|
|
22087
|
+
|
|
22088
|
+
// Convert string to array of digits without leading/trailing zeros.
|
|
22089
|
+
for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);
|
|
22090
|
+
}
|
|
22091
|
+
return x;
|
|
22092
|
+
}
|
|
22093
|
+
|
|
22094
|
+
/*
|
|
22095
|
+
* Round Big x to a maximum of sd significant digits using rounding mode rm.
|
|
22096
|
+
*
|
|
22097
|
+
* x {Big} The Big to round.
|
|
22098
|
+
* sd {number} Significant digits: integer, 0 to MAX_DP inclusive.
|
|
22099
|
+
* rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
22100
|
+
* [more] {boolean} Whether the result of division was truncated.
|
|
22101
|
+
*/
|
|
22102
|
+
function round(x, sd, rm, more) {
|
|
22103
|
+
var xc = x.c;
|
|
22104
|
+
if (rm === UNDEFINED) rm = x.constructor.RM;
|
|
22105
|
+
if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {
|
|
22106
|
+
throw Error(INVALID_RM);
|
|
22107
|
+
}
|
|
22108
|
+
if (sd < 1) {
|
|
22109
|
+
more = rm === 3 && (more || !!xc[0]) || sd === 0 && (rm === 1 && xc[0] >= 5 || rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED)));
|
|
22110
|
+
xc.length = 1;
|
|
22111
|
+
if (more) {
|
|
22112
|
+
// 1, 0.1, 0.01, 0.001, 0.0001 etc.
|
|
22113
|
+
x.e = x.e - sd + 1;
|
|
22114
|
+
xc[0] = 1;
|
|
22115
|
+
} else {
|
|
22116
|
+
// Zero.
|
|
22117
|
+
xc[0] = x.e = 0;
|
|
22118
|
+
}
|
|
22119
|
+
} else if (sd < xc.length) {
|
|
22120
|
+
// xc[sd] is the digit after the digit that may be rounded up.
|
|
22121
|
+
more = rm === 1 && xc[sd] >= 5 || rm === 2 && (xc[sd] > 5 || xc[sd] === 5 && (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) || rm === 3 && (more || !!xc[0]);
|
|
22122
|
+
|
|
22123
|
+
// Remove any digits after the required precision.
|
|
22124
|
+
xc.length = sd;
|
|
22125
|
+
|
|
22126
|
+
// Round up?
|
|
22127
|
+
if (more) {
|
|
22128
|
+
// Rounding up may mean the previous digit has to be rounded up.
|
|
22129
|
+
for (; ++xc[--sd] > 9;) {
|
|
22130
|
+
xc[sd] = 0;
|
|
22131
|
+
if (sd === 0) {
|
|
22132
|
+
++x.e;
|
|
22133
|
+
xc.unshift(1);
|
|
22134
|
+
break;
|
|
22135
|
+
}
|
|
22136
|
+
}
|
|
22137
|
+
}
|
|
22138
|
+
|
|
22139
|
+
// Remove trailing zeros.
|
|
22140
|
+
for (sd = xc.length; !xc[--sd];) xc.pop();
|
|
22141
|
+
}
|
|
22142
|
+
return x;
|
|
22143
|
+
}
|
|
22144
|
+
|
|
22145
|
+
/*
|
|
22146
|
+
* Return a string representing the value of Big x in normal or exponential notation.
|
|
22147
|
+
* Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.
|
|
22148
|
+
*/
|
|
22149
|
+
function stringify(x, doExponential, isNonzero) {
|
|
22150
|
+
var e = x.e,
|
|
22151
|
+
s = x.c.join(''),
|
|
22152
|
+
n = s.length;
|
|
22153
|
+
|
|
22154
|
+
// Exponential notation?
|
|
22155
|
+
if (doExponential) {
|
|
22156
|
+
s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;
|
|
22157
|
+
|
|
22158
|
+
// Normal notation.
|
|
22159
|
+
} else if (e < 0) {
|
|
22160
|
+
for (; ++e;) s = '0' + s;
|
|
22161
|
+
s = '0.' + s;
|
|
22162
|
+
} else if (e > 0) {
|
|
22163
|
+
if (++e > n) {
|
|
22164
|
+
for (e -= n; e--;) s += '0';
|
|
22165
|
+
} else if (e < n) {
|
|
22166
|
+
s = s.slice(0, e) + '.' + s.slice(e);
|
|
22167
|
+
}
|
|
22168
|
+
} else if (n > 1) {
|
|
22169
|
+
s = s.charAt(0) + '.' + s.slice(1);
|
|
22170
|
+
}
|
|
22171
|
+
return x.s < 0 && isNonzero ? '-' + s : s;
|
|
22172
|
+
}
|
|
22173
|
+
|
|
22174
|
+
// Prototype/instance methods
|
|
22175
|
+
|
|
22176
|
+
/*
|
|
22177
|
+
* Return a new Big whose value is the absolute value of this Big.
|
|
22178
|
+
*/
|
|
22179
|
+
P.abs = function () {
|
|
22180
|
+
var x = new this.constructor(this);
|
|
22181
|
+
x.s = 1;
|
|
22182
|
+
return x;
|
|
22183
|
+
};
|
|
22184
|
+
|
|
22185
|
+
/*
|
|
22186
|
+
* Return 1 if the value of this Big is greater than the value of Big y,
|
|
22187
|
+
* -1 if the value of this Big is less than the value of Big y, or
|
|
22188
|
+
* 0 if they have the same value.
|
|
22189
|
+
*/
|
|
22190
|
+
P.cmp = function (y) {
|
|
22191
|
+
var isneg,
|
|
22192
|
+
x = this,
|
|
22193
|
+
xc = x.c,
|
|
22194
|
+
yc = (y = new x.constructor(y)).c,
|
|
22195
|
+
i = x.s,
|
|
22196
|
+
j = y.s,
|
|
22197
|
+
k = x.e,
|
|
22198
|
+
l = y.e;
|
|
22199
|
+
|
|
22200
|
+
// Either zero?
|
|
22201
|
+
if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i;
|
|
22202
|
+
|
|
22203
|
+
// Signs differ?
|
|
22204
|
+
if (i != j) return i;
|
|
22205
|
+
isneg = i < 0;
|
|
22206
|
+
|
|
22207
|
+
// Compare exponents.
|
|
22208
|
+
if (k != l) return k > l ^ isneg ? 1 : -1;
|
|
22209
|
+
j = (k = xc.length) < (l = yc.length) ? k : l;
|
|
22210
|
+
|
|
22211
|
+
// Compare digit by digit.
|
|
22212
|
+
for (i = -1; ++i < j;) {
|
|
22213
|
+
if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;
|
|
22214
|
+
}
|
|
22215
|
+
|
|
22216
|
+
// Compare lengths.
|
|
22217
|
+
return k == l ? 0 : k > l ^ isneg ? 1 : -1;
|
|
22218
|
+
};
|
|
22219
|
+
|
|
22220
|
+
/*
|
|
22221
|
+
* Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,
|
|
22222
|
+
* if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
|
|
22223
|
+
*/
|
|
22224
|
+
P.div = function (y) {
|
|
22225
|
+
var x = this,
|
|
22226
|
+
Big = x.constructor,
|
|
22227
|
+
a = x.c,
|
|
22228
|
+
// dividend
|
|
22229
|
+
b = (y = new Big(y)).c,
|
|
22230
|
+
// divisor
|
|
22231
|
+
k = x.s == y.s ? 1 : -1,
|
|
22232
|
+
dp = Big.DP;
|
|
22233
|
+
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
22234
|
+
throw Error(INVALID_DP);
|
|
22235
|
+
}
|
|
22236
|
+
|
|
22237
|
+
// Divisor is zero?
|
|
22238
|
+
if (!b[0]) {
|
|
22239
|
+
throw Error(DIV_BY_ZERO);
|
|
22240
|
+
}
|
|
22241
|
+
|
|
22242
|
+
// Dividend is 0? Return +-0.
|
|
22243
|
+
if (!a[0]) {
|
|
22244
|
+
y.s = k;
|
|
22245
|
+
y.c = [y.e = 0];
|
|
22246
|
+
return y;
|
|
22247
|
+
}
|
|
22248
|
+
var bl,
|
|
22249
|
+
bt,
|
|
22250
|
+
n,
|
|
22251
|
+
cmp,
|
|
22252
|
+
ri,
|
|
22253
|
+
bz = b.slice(),
|
|
22254
|
+
ai = bl = b.length,
|
|
22255
|
+
al = a.length,
|
|
22256
|
+
r = a.slice(0, bl),
|
|
22257
|
+
// remainder
|
|
22258
|
+
rl = r.length,
|
|
22259
|
+
q = y,
|
|
22260
|
+
// quotient
|
|
22261
|
+
qc = q.c = [],
|
|
22262
|
+
qi = 0,
|
|
22263
|
+
p = dp + (q.e = x.e - y.e) + 1; // precision of the result
|
|
22264
|
+
|
|
22265
|
+
q.s = k;
|
|
22266
|
+
k = p < 0 ? 0 : p;
|
|
22267
|
+
|
|
22268
|
+
// Create version of divisor with leading zero.
|
|
22269
|
+
bz.unshift(0);
|
|
22270
|
+
|
|
22271
|
+
// Add zeros to make remainder as long as divisor.
|
|
22272
|
+
for (; rl++ < bl;) r.push(0);
|
|
22273
|
+
do {
|
|
22274
|
+
// n is how many times the divisor goes into current remainder.
|
|
22275
|
+
for (n = 0; n < 10; n++) {
|
|
22276
|
+
// Compare divisor and remainder.
|
|
22277
|
+
if (bl != (rl = r.length)) {
|
|
22278
|
+
cmp = bl > rl ? 1 : -1;
|
|
22279
|
+
} else {
|
|
22280
|
+
for (ri = -1, cmp = 0; ++ri < bl;) {
|
|
22281
|
+
if (b[ri] != r[ri]) {
|
|
22282
|
+
cmp = b[ri] > r[ri] ? 1 : -1;
|
|
22283
|
+
break;
|
|
22284
|
+
}
|
|
22285
|
+
}
|
|
22286
|
+
}
|
|
22287
|
+
|
|
22288
|
+
// If divisor < remainder, subtract divisor from remainder.
|
|
22289
|
+
if (cmp < 0) {
|
|
22290
|
+
// Remainder can't be more than 1 digit longer than divisor.
|
|
22291
|
+
// Equalise lengths using divisor with extra leading zero?
|
|
22292
|
+
for (bt = rl == bl ? b : bz; rl;) {
|
|
22293
|
+
if (r[--rl] < bt[rl]) {
|
|
22294
|
+
ri = rl;
|
|
22295
|
+
for (; ri && !r[--ri];) r[ri] = 9;
|
|
22296
|
+
--r[ri];
|
|
22297
|
+
r[rl] += 10;
|
|
22298
|
+
}
|
|
22299
|
+
r[rl] -= bt[rl];
|
|
22300
|
+
}
|
|
22301
|
+
for (; !r[0];) r.shift();
|
|
22302
|
+
} else {
|
|
22303
|
+
break;
|
|
22304
|
+
}
|
|
22305
|
+
}
|
|
22306
|
+
|
|
22307
|
+
// Add the digit n to the result array.
|
|
22308
|
+
qc[qi++] = cmp ? n : ++n;
|
|
22309
|
+
|
|
22310
|
+
// Update the remainder.
|
|
22311
|
+
if (r[0] && cmp) r[rl] = a[ai] || 0;else r = [a[ai]];
|
|
22312
|
+
} while ((ai++ < al || r[0] !== UNDEFINED) && k--);
|
|
22313
|
+
|
|
22314
|
+
// Leading zero? Do not remove if result is simply zero (qi == 1).
|
|
22315
|
+
if (!qc[0] && qi != 1) {
|
|
22316
|
+
// There can't be more than one zero.
|
|
22317
|
+
qc.shift();
|
|
22318
|
+
q.e--;
|
|
22319
|
+
p--;
|
|
22320
|
+
}
|
|
22321
|
+
|
|
22322
|
+
// Round?
|
|
22323
|
+
if (qi > p) round(q, p, Big.RM, r[0] !== UNDEFINED);
|
|
22324
|
+
return q;
|
|
22325
|
+
};
|
|
22326
|
+
|
|
22327
|
+
/*
|
|
22328
|
+
* Return true if the value of this Big is equal to the value of Big y, otherwise return false.
|
|
22329
|
+
*/
|
|
22330
|
+
P.eq = function (y) {
|
|
22331
|
+
return this.cmp(y) === 0;
|
|
22332
|
+
};
|
|
22333
|
+
|
|
22334
|
+
/*
|
|
22335
|
+
* Return true if the value of this Big is greater than the value of Big y, otherwise return
|
|
22336
|
+
* false.
|
|
22337
|
+
*/
|
|
22338
|
+
P.gt = function (y) {
|
|
22339
|
+
return this.cmp(y) > 0;
|
|
22340
|
+
};
|
|
22341
|
+
|
|
22342
|
+
/*
|
|
22343
|
+
* Return true if the value of this Big is greater than or equal to the value of Big y, otherwise
|
|
22344
|
+
* return false.
|
|
22345
|
+
*/
|
|
22346
|
+
P.gte = function (y) {
|
|
22347
|
+
return this.cmp(y) > -1;
|
|
22348
|
+
};
|
|
22349
|
+
|
|
22350
|
+
/*
|
|
22351
|
+
* Return true if the value of this Big is less than the value of Big y, otherwise return false.
|
|
22352
|
+
*/
|
|
22353
|
+
P.lt = function (y) {
|
|
22354
|
+
return this.cmp(y) < 0;
|
|
22355
|
+
};
|
|
22356
|
+
|
|
22357
|
+
/*
|
|
22358
|
+
* Return true if the value of this Big is less than or equal to the value of Big y, otherwise
|
|
22359
|
+
* return false.
|
|
22360
|
+
*/
|
|
22361
|
+
P.lte = function (y) {
|
|
22362
|
+
return this.cmp(y) < 1;
|
|
22363
|
+
};
|
|
22364
|
+
|
|
22365
|
+
/*
|
|
22366
|
+
* Return a new Big whose value is the value of this Big minus the value of Big y.
|
|
22367
|
+
*/
|
|
22368
|
+
P.minus = P.sub = function (y) {
|
|
22369
|
+
var i,
|
|
22370
|
+
j,
|
|
22371
|
+
t,
|
|
22372
|
+
xlty,
|
|
22373
|
+
x = this,
|
|
22374
|
+
Big = x.constructor,
|
|
22375
|
+
a = x.s,
|
|
22376
|
+
b = (y = new Big(y)).s;
|
|
22377
|
+
|
|
22378
|
+
// Signs differ?
|
|
22379
|
+
if (a != b) {
|
|
22380
|
+
y.s = -b;
|
|
22381
|
+
return x.plus(y);
|
|
22382
|
+
}
|
|
22383
|
+
var xc = x.c.slice(),
|
|
22384
|
+
xe = x.e,
|
|
22385
|
+
yc = y.c,
|
|
22386
|
+
ye = y.e;
|
|
22387
|
+
|
|
22388
|
+
// Either zero?
|
|
22389
|
+
if (!xc[0] || !yc[0]) {
|
|
22390
|
+
if (yc[0]) {
|
|
22391
|
+
y.s = -b;
|
|
22392
|
+
} else if (xc[0]) {
|
|
22393
|
+
y = new Big(x);
|
|
22394
|
+
} else {
|
|
22395
|
+
y.s = 1;
|
|
22396
|
+
}
|
|
22397
|
+
return y;
|
|
22398
|
+
}
|
|
22399
|
+
|
|
22400
|
+
// Determine which is the bigger number. Prepend zeros to equalise exponents.
|
|
22401
|
+
if (a = xe - ye) {
|
|
22402
|
+
if (xlty = a < 0) {
|
|
22403
|
+
a = -a;
|
|
22404
|
+
t = xc;
|
|
22405
|
+
} else {
|
|
22406
|
+
ye = xe;
|
|
22407
|
+
t = yc;
|
|
22408
|
+
}
|
|
22409
|
+
t.reverse();
|
|
22410
|
+
for (b = a; b--;) t.push(0);
|
|
22411
|
+
t.reverse();
|
|
22412
|
+
} else {
|
|
22413
|
+
// Exponents equal. Check digit by digit.
|
|
22414
|
+
j = ((xlty = xc.length < yc.length) ? xc : yc).length;
|
|
22415
|
+
for (a = b = 0; b < j; b++) {
|
|
22416
|
+
if (xc[b] != yc[b]) {
|
|
22417
|
+
xlty = xc[b] < yc[b];
|
|
22418
|
+
break;
|
|
22419
|
+
}
|
|
22420
|
+
}
|
|
22421
|
+
}
|
|
22422
|
+
|
|
22423
|
+
// x < y? Point xc to the array of the bigger number.
|
|
22424
|
+
if (xlty) {
|
|
22425
|
+
t = xc;
|
|
22426
|
+
xc = yc;
|
|
22427
|
+
yc = t;
|
|
22428
|
+
y.s = -y.s;
|
|
22429
|
+
}
|
|
22430
|
+
|
|
22431
|
+
/*
|
|
22432
|
+
* Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only
|
|
22433
|
+
* needs to start at yc.length.
|
|
22434
|
+
*/
|
|
22435
|
+
if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0;
|
|
22436
|
+
|
|
22437
|
+
// Subtract yc from xc.
|
|
22438
|
+
for (b = i; j > a;) {
|
|
22439
|
+
if (xc[--j] < yc[j]) {
|
|
22440
|
+
for (i = j; i && !xc[--i];) xc[i] = 9;
|
|
22441
|
+
--xc[i];
|
|
22442
|
+
xc[j] += 10;
|
|
22443
|
+
}
|
|
22444
|
+
xc[j] -= yc[j];
|
|
22445
|
+
}
|
|
22446
|
+
|
|
22447
|
+
// Remove trailing zeros.
|
|
22448
|
+
for (; xc[--b] === 0;) xc.pop();
|
|
22449
|
+
|
|
22450
|
+
// Remove leading zeros and adjust exponent accordingly.
|
|
22451
|
+
for (; xc[0] === 0;) {
|
|
22452
|
+
xc.shift();
|
|
22453
|
+
--ye;
|
|
22454
|
+
}
|
|
22455
|
+
if (!xc[0]) {
|
|
22456
|
+
// n - n = +0
|
|
22457
|
+
y.s = 1;
|
|
22458
|
+
|
|
22459
|
+
// Result must be zero.
|
|
22460
|
+
xc = [ye = 0];
|
|
22461
|
+
}
|
|
22462
|
+
y.c = xc;
|
|
22463
|
+
y.e = ye;
|
|
22464
|
+
return y;
|
|
22465
|
+
};
|
|
22466
|
+
|
|
22467
|
+
/*
|
|
22468
|
+
* Return a new Big whose value is the value of this Big modulo the value of Big y.
|
|
22469
|
+
*/
|
|
22470
|
+
P.mod = function (y) {
|
|
22471
|
+
var ygtx,
|
|
22472
|
+
x = this,
|
|
22473
|
+
Big = x.constructor,
|
|
22474
|
+
a = x.s,
|
|
22475
|
+
b = (y = new Big(y)).s;
|
|
22476
|
+
if (!y.c[0]) {
|
|
22477
|
+
throw Error(DIV_BY_ZERO);
|
|
22478
|
+
}
|
|
22479
|
+
x.s = y.s = 1;
|
|
22480
|
+
ygtx = y.cmp(x) == 1;
|
|
22481
|
+
x.s = a;
|
|
22482
|
+
y.s = b;
|
|
22483
|
+
if (ygtx) return new Big(x);
|
|
22484
|
+
a = Big.DP;
|
|
22485
|
+
b = Big.RM;
|
|
22486
|
+
Big.DP = Big.RM = 0;
|
|
22487
|
+
x = x.div(y);
|
|
22488
|
+
Big.DP = a;
|
|
22489
|
+
Big.RM = b;
|
|
22490
|
+
return this.minus(x.times(y));
|
|
22491
|
+
};
|
|
22492
|
+
|
|
22493
|
+
/*
|
|
22494
|
+
* Return a new Big whose value is the value of this Big negated.
|
|
22495
|
+
*/
|
|
22496
|
+
P.neg = function () {
|
|
22497
|
+
var x = new this.constructor(this);
|
|
22498
|
+
x.s = -x.s;
|
|
22499
|
+
return x;
|
|
22500
|
+
};
|
|
22501
|
+
|
|
22502
|
+
/*
|
|
22503
|
+
* Return a new Big whose value is the value of this Big plus the value of Big y.
|
|
22504
|
+
*/
|
|
22505
|
+
P.plus = P.add = function (y) {
|
|
22506
|
+
var e,
|
|
22507
|
+
k,
|
|
22508
|
+
t,
|
|
22509
|
+
x = this,
|
|
22510
|
+
Big = x.constructor;
|
|
22511
|
+
y = new Big(y);
|
|
22512
|
+
|
|
22513
|
+
// Signs differ?
|
|
22514
|
+
if (x.s != y.s) {
|
|
22515
|
+
y.s = -y.s;
|
|
22516
|
+
return x.minus(y);
|
|
22517
|
+
}
|
|
22518
|
+
var xe = x.e,
|
|
22519
|
+
xc = x.c,
|
|
22520
|
+
ye = y.e,
|
|
22521
|
+
yc = y.c;
|
|
22522
|
+
|
|
22523
|
+
// Either zero?
|
|
22524
|
+
if (!xc[0] || !yc[0]) {
|
|
22525
|
+
if (!yc[0]) {
|
|
22526
|
+
if (xc[0]) {
|
|
22527
|
+
y = new Big(x);
|
|
22528
|
+
} else {
|
|
22529
|
+
y.s = x.s;
|
|
22530
|
+
}
|
|
22531
|
+
}
|
|
22532
|
+
return y;
|
|
22533
|
+
}
|
|
22534
|
+
xc = xc.slice();
|
|
22535
|
+
|
|
22536
|
+
// Prepend zeros to equalise exponents.
|
|
22537
|
+
// Note: reverse faster than unshifts.
|
|
22538
|
+
if (e = xe - ye) {
|
|
22539
|
+
if (e > 0) {
|
|
22540
|
+
ye = xe;
|
|
22541
|
+
t = yc;
|
|
22542
|
+
} else {
|
|
22543
|
+
e = -e;
|
|
22544
|
+
t = xc;
|
|
22545
|
+
}
|
|
22546
|
+
t.reverse();
|
|
22547
|
+
for (; e--;) t.push(0);
|
|
22548
|
+
t.reverse();
|
|
22549
|
+
}
|
|
22550
|
+
|
|
22551
|
+
// Point xc to the longer array.
|
|
22552
|
+
if (xc.length - yc.length < 0) {
|
|
22553
|
+
t = yc;
|
|
22554
|
+
yc = xc;
|
|
22555
|
+
xc = t;
|
|
22556
|
+
}
|
|
22557
|
+
e = yc.length;
|
|
22558
|
+
|
|
22559
|
+
// Only start adding at yc.length - 1 as the further digits of xc can be left as they are.
|
|
22560
|
+
for (k = 0; e; xc[e] %= 10) k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;
|
|
22561
|
+
|
|
22562
|
+
// No need to check for zero, as +x + +y != 0 && -x + -y != 0
|
|
22563
|
+
|
|
22564
|
+
if (k) {
|
|
22565
|
+
xc.unshift(k);
|
|
22566
|
+
++ye;
|
|
22567
|
+
}
|
|
22568
|
+
|
|
22569
|
+
// Remove trailing zeros.
|
|
22570
|
+
for (e = xc.length; xc[--e] === 0;) xc.pop();
|
|
22571
|
+
y.c = xc;
|
|
22572
|
+
y.e = ye;
|
|
22573
|
+
return y;
|
|
22574
|
+
};
|
|
22575
|
+
|
|
22576
|
+
/*
|
|
22577
|
+
* Return a Big whose value is the value of this Big raised to the power n.
|
|
22578
|
+
* If n is negative, round to a maximum of Big.DP decimal places using rounding
|
|
22579
|
+
* mode Big.RM.
|
|
22580
|
+
*
|
|
22581
|
+
* n {number} Integer, -MAX_POWER to MAX_POWER inclusive.
|
|
22582
|
+
*/
|
|
22583
|
+
P.pow = function (n) {
|
|
22584
|
+
var x = this,
|
|
22585
|
+
one = new x.constructor('1'),
|
|
22586
|
+
y = one,
|
|
22587
|
+
isneg = n < 0;
|
|
22588
|
+
if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {
|
|
22589
|
+
throw Error(INVALID + 'exponent');
|
|
22590
|
+
}
|
|
22591
|
+
if (isneg) n = -n;
|
|
22592
|
+
for (;;) {
|
|
22593
|
+
if (n & 1) y = y.times(x);
|
|
22594
|
+
n >>= 1;
|
|
22595
|
+
if (!n) break;
|
|
22596
|
+
x = x.times(x);
|
|
22597
|
+
}
|
|
22598
|
+
return isneg ? one.div(y) : y;
|
|
22599
|
+
};
|
|
22600
|
+
|
|
22601
|
+
/*
|
|
22602
|
+
* Return a new Big whose value is the value of this Big rounded to a maximum precision of sd
|
|
22603
|
+
* significant digits using rounding mode rm, or Big.RM if rm is not specified.
|
|
22604
|
+
*
|
|
22605
|
+
* sd {number} Significant digits: integer, 1 to MAX_DP inclusive.
|
|
22606
|
+
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
22607
|
+
*/
|
|
22608
|
+
P.prec = function (sd, rm) {
|
|
22609
|
+
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
|
|
22610
|
+
throw Error(INVALID + 'precision');
|
|
22611
|
+
}
|
|
22612
|
+
return round(new this.constructor(this), sd, rm);
|
|
22613
|
+
};
|
|
22614
|
+
|
|
22615
|
+
/*
|
|
22616
|
+
* Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places
|
|
22617
|
+
* using rounding mode rm, or Big.RM if rm is not specified.
|
|
22618
|
+
* If dp is negative, round to an integer which is a multiple of 10**-dp.
|
|
22619
|
+
* If dp is not specified, round to 0 decimal places.
|
|
22620
|
+
*
|
|
22621
|
+
* dp? {number} Integer, -MAX_DP to MAX_DP inclusive.
|
|
22622
|
+
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
22623
|
+
*/
|
|
22624
|
+
P.round = function (dp, rm) {
|
|
22625
|
+
if (dp === UNDEFINED) dp = 0;else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {
|
|
22626
|
+
throw Error(INVALID_DP);
|
|
22627
|
+
}
|
|
22628
|
+
return round(new this.constructor(this), dp + this.e + 1, rm);
|
|
22629
|
+
};
|
|
22630
|
+
|
|
22631
|
+
/*
|
|
22632
|
+
* Return a new Big whose value is the square root of the value of this Big, rounded, if
|
|
22633
|
+
* necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
|
|
22634
|
+
*/
|
|
22635
|
+
P.sqrt = function () {
|
|
22636
|
+
var r,
|
|
22637
|
+
c,
|
|
22638
|
+
t,
|
|
22639
|
+
x = this,
|
|
22640
|
+
Big = x.constructor,
|
|
22641
|
+
s = x.s,
|
|
22642
|
+
e = x.e,
|
|
22643
|
+
half = new Big('0.5');
|
|
22644
|
+
|
|
22645
|
+
// Zero?
|
|
22646
|
+
if (!x.c[0]) return new Big(x);
|
|
22647
|
+
|
|
22648
|
+
// Negative?
|
|
22649
|
+
if (s < 0) {
|
|
22650
|
+
throw Error(NAME + 'No square root');
|
|
22651
|
+
}
|
|
22652
|
+
|
|
22653
|
+
// Estimate.
|
|
22654
|
+
s = Math.sqrt(+stringify(x, true, true));
|
|
22655
|
+
|
|
22656
|
+
// Math.sqrt underflow/overflow?
|
|
22657
|
+
// Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.
|
|
22658
|
+
if (s === 0 || s === 1 / 0) {
|
|
22659
|
+
c = x.c.join('');
|
|
22660
|
+
if (!(c.length + e & 1)) c += '0';
|
|
22661
|
+
s = Math.sqrt(c);
|
|
22662
|
+
e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);
|
|
22663
|
+
r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);
|
|
22664
|
+
} else {
|
|
22665
|
+
r = new Big(s + '');
|
|
22666
|
+
}
|
|
22667
|
+
e = r.e + (Big.DP += 4);
|
|
22668
|
+
|
|
22669
|
+
// Newton-Raphson iteration.
|
|
22670
|
+
do {
|
|
22671
|
+
t = r;
|
|
22672
|
+
r = half.times(t.plus(x.div(t)));
|
|
22673
|
+
} while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));
|
|
22674
|
+
return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);
|
|
22675
|
+
};
|
|
22676
|
+
|
|
22677
|
+
/*
|
|
22678
|
+
* Return a new Big whose value is the value of this Big times the value of Big y.
|
|
22679
|
+
*/
|
|
22680
|
+
P.times = P.mul = function (y) {
|
|
22681
|
+
var c,
|
|
22682
|
+
x = this,
|
|
22683
|
+
Big = x.constructor,
|
|
22684
|
+
xc = x.c,
|
|
22685
|
+
yc = (y = new Big(y)).c,
|
|
22686
|
+
a = xc.length,
|
|
22687
|
+
b = yc.length,
|
|
22688
|
+
i = x.e,
|
|
22689
|
+
j = y.e;
|
|
22690
|
+
|
|
22691
|
+
// Determine sign of result.
|
|
22692
|
+
y.s = x.s == y.s ? 1 : -1;
|
|
22693
|
+
|
|
22694
|
+
// Return signed 0 if either 0.
|
|
22695
|
+
if (!xc[0] || !yc[0]) {
|
|
22696
|
+
y.c = [y.e = 0];
|
|
22697
|
+
return y;
|
|
22698
|
+
}
|
|
22699
|
+
|
|
22700
|
+
// Initialise exponent of result as x.e + y.e.
|
|
22701
|
+
y.e = i + j;
|
|
22702
|
+
|
|
22703
|
+
// If array xc has fewer digits than yc, swap xc and yc, and lengths.
|
|
22704
|
+
if (a < b) {
|
|
22705
|
+
c = xc;
|
|
22706
|
+
xc = yc;
|
|
22707
|
+
yc = c;
|
|
22708
|
+
j = a;
|
|
22709
|
+
a = b;
|
|
22710
|
+
b = j;
|
|
22711
|
+
}
|
|
22712
|
+
|
|
22713
|
+
// Initialise coefficient array of result with zeros.
|
|
22714
|
+
for (c = new Array(j = a + b); j--;) c[j] = 0;
|
|
22715
|
+
|
|
22716
|
+
// Multiply.
|
|
22717
|
+
|
|
22718
|
+
// i is initially xc.length.
|
|
22719
|
+
for (i = b; i--;) {
|
|
22720
|
+
b = 0;
|
|
22721
|
+
|
|
22722
|
+
// a is yc.length.
|
|
22723
|
+
for (j = a + i; j > i;) {
|
|
22724
|
+
// Current sum of products at this digit position, plus carry.
|
|
22725
|
+
b = c[j] + yc[i] * xc[j - i - 1] + b;
|
|
22726
|
+
c[j--] = b % 10;
|
|
22727
|
+
|
|
22728
|
+
// carry
|
|
22729
|
+
b = b / 10 | 0;
|
|
22730
|
+
}
|
|
22731
|
+
c[j] = b;
|
|
22732
|
+
}
|
|
22733
|
+
|
|
22734
|
+
// Increment result exponent if there is a final carry, otherwise remove leading zero.
|
|
22735
|
+
if (b) ++y.e;else c.shift();
|
|
22736
|
+
|
|
22737
|
+
// Remove trailing zeros.
|
|
22738
|
+
for (i = c.length; !c[--i];) c.pop();
|
|
22739
|
+
y.c = c;
|
|
22740
|
+
return y;
|
|
22741
|
+
};
|
|
22742
|
+
|
|
22743
|
+
/*
|
|
22744
|
+
* Return a string representing the value of this Big in exponential notation rounded to dp fixed
|
|
22745
|
+
* decimal places using rounding mode rm, or Big.RM if rm is not specified.
|
|
22746
|
+
*
|
|
22747
|
+
* dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.
|
|
22748
|
+
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
22749
|
+
*/
|
|
22750
|
+
P.toExponential = function (dp, rm) {
|
|
22751
|
+
var x = this,
|
|
22752
|
+
n = x.c[0];
|
|
22753
|
+
if (dp !== UNDEFINED) {
|
|
22754
|
+
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
22755
|
+
throw Error(INVALID_DP);
|
|
22756
|
+
}
|
|
22757
|
+
x = round(new x.constructor(x), ++dp, rm);
|
|
22758
|
+
for (; x.c.length < dp;) x.c.push(0);
|
|
22759
|
+
}
|
|
22760
|
+
return stringify(x, true, !!n);
|
|
22761
|
+
};
|
|
22762
|
+
|
|
22763
|
+
/*
|
|
22764
|
+
* Return a string representing the value of this Big in normal notation rounded to dp fixed
|
|
22765
|
+
* decimal places using rounding mode rm, or Big.RM if rm is not specified.
|
|
22766
|
+
*
|
|
22767
|
+
* dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.
|
|
22768
|
+
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
22769
|
+
*
|
|
22770
|
+
* (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
|
|
22771
|
+
* (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
|
|
22772
|
+
*/
|
|
22773
|
+
P.toFixed = function (dp, rm) {
|
|
22774
|
+
var x = this,
|
|
22775
|
+
n = x.c[0];
|
|
22776
|
+
if (dp !== UNDEFINED) {
|
|
22777
|
+
if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {
|
|
22778
|
+
throw Error(INVALID_DP);
|
|
22779
|
+
}
|
|
22780
|
+
x = round(new x.constructor(x), dp + x.e + 1, rm);
|
|
22781
|
+
|
|
22782
|
+
// x.e may have changed if the value is rounded up.
|
|
22783
|
+
for (dp = dp + x.e + 1; x.c.length < dp;) x.c.push(0);
|
|
22784
|
+
}
|
|
22785
|
+
return stringify(x, false, !!n);
|
|
22786
|
+
};
|
|
22787
|
+
|
|
22788
|
+
/*
|
|
22789
|
+
* Return a string representing the value of this Big.
|
|
22790
|
+
* Return exponential notation if this Big has a positive exponent equal to or greater than
|
|
22791
|
+
* Big.PE, or a negative exponent equal to or less than Big.NE.
|
|
22792
|
+
* Omit the sign for negative zero.
|
|
22793
|
+
*/
|
|
22794
|
+
P[Symbol.for('nodejs.util.inspect.custom')] = P.toJSON = P.toString = function () {
|
|
22795
|
+
var x = this,
|
|
22796
|
+
Big = x.constructor;
|
|
22797
|
+
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);
|
|
22798
|
+
};
|
|
22799
|
+
|
|
22800
|
+
/*
|
|
22801
|
+
* Return the value of this Big as a primitve number.
|
|
22802
|
+
*/
|
|
22803
|
+
P.toNumber = function () {
|
|
22804
|
+
var n = +stringify(this, true, true);
|
|
22805
|
+
if (this.constructor.strict === true && !this.eq(n.toString())) {
|
|
22806
|
+
throw Error(NAME + 'Imprecise conversion');
|
|
22807
|
+
}
|
|
22808
|
+
return n;
|
|
22809
|
+
};
|
|
22810
|
+
|
|
22811
|
+
/*
|
|
22812
|
+
* Return a string representing the value of this Big rounded to sd significant digits using
|
|
22813
|
+
* rounding mode rm, or Big.RM if rm is not specified.
|
|
22814
|
+
* Use exponential notation if sd is less than the number of digits necessary to represent
|
|
22815
|
+
* the integer part of the value in normal notation.
|
|
22816
|
+
*
|
|
22817
|
+
* sd {number} Significant digits: integer, 1 to MAX_DP inclusive.
|
|
22818
|
+
* rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).
|
|
22819
|
+
*/
|
|
22820
|
+
P.toPrecision = function (sd, rm) {
|
|
22821
|
+
var x = this,
|
|
22822
|
+
Big = x.constructor,
|
|
22823
|
+
n = x.c[0];
|
|
22824
|
+
if (sd !== UNDEFINED) {
|
|
22825
|
+
if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {
|
|
22826
|
+
throw Error(INVALID + 'precision');
|
|
22827
|
+
}
|
|
22828
|
+
x = round(new Big(x), sd, rm);
|
|
22829
|
+
for (; x.c.length < sd;) x.c.push(0);
|
|
22830
|
+
}
|
|
22831
|
+
return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);
|
|
22832
|
+
};
|
|
22833
|
+
|
|
22834
|
+
/*
|
|
22835
|
+
* Return a string representing the value of this Big.
|
|
22836
|
+
* Return exponential notation if this Big has a positive exponent equal to or greater than
|
|
22837
|
+
* Big.PE, or a negative exponent equal to or less than Big.NE.
|
|
22838
|
+
* Include the sign for negative zero.
|
|
22839
|
+
*/
|
|
22840
|
+
P.valueOf = function () {
|
|
22841
|
+
var x = this,
|
|
22842
|
+
Big = x.constructor;
|
|
22843
|
+
if (Big.strict === true) {
|
|
22844
|
+
throw Error(NAME + 'valueOf disallowed');
|
|
22845
|
+
}
|
|
22846
|
+
return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);
|
|
22847
|
+
};
|
|
22848
|
+
|
|
22849
|
+
// Export
|
|
22850
|
+
|
|
22851
|
+
var Big = _Big_();
|
|
22852
|
+
|
|
22853
|
+
/**
|
|
22854
|
+
* Removes all key-value entries from the list cache.
|
|
22855
|
+
*
|
|
22856
|
+
* @private
|
|
22857
|
+
* @name clear
|
|
22858
|
+
* @memberOf ListCache
|
|
22859
|
+
*/
|
|
22860
|
+
function listCacheClear$1() {
|
|
22861
|
+
this.__data__ = [];
|
|
22862
|
+
this.size = 0;
|
|
22863
|
+
}
|
|
22864
|
+
var _listCacheClear = listCacheClear$1;
|
|
22865
|
+
|
|
22866
|
+
/**
|
|
22867
|
+
* Performs a
|
|
22868
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
22869
|
+
* comparison between two values to determine if they are equivalent.
|
|
22870
|
+
*
|
|
22871
|
+
* @static
|
|
22872
|
+
* @memberOf _
|
|
22873
|
+
* @since 4.0.0
|
|
22874
|
+
* @category Lang
|
|
22875
|
+
* @param {*} value The value to compare.
|
|
22876
|
+
* @param {*} other The other value to compare.
|
|
22877
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
22878
|
+
* @example
|
|
22879
|
+
*
|
|
22880
|
+
* var object = { 'a': 1 };
|
|
22881
|
+
* var other = { 'a': 1 };
|
|
22882
|
+
*
|
|
22883
|
+
* _.eq(object, object);
|
|
22884
|
+
* // => true
|
|
22885
|
+
*
|
|
22886
|
+
* _.eq(object, other);
|
|
22887
|
+
* // => false
|
|
22888
|
+
*
|
|
22889
|
+
* _.eq('a', 'a');
|
|
22890
|
+
* // => true
|
|
22891
|
+
*
|
|
22892
|
+
* _.eq('a', Object('a'));
|
|
22893
|
+
* // => false
|
|
22894
|
+
*
|
|
22895
|
+
* _.eq(NaN, NaN);
|
|
22896
|
+
* // => true
|
|
22897
|
+
*/
|
|
22898
|
+
function eq$2(value, other) {
|
|
22899
|
+
return value === other || value !== value && other !== other;
|
|
22900
|
+
}
|
|
22901
|
+
var eq_1 = eq$2;
|
|
22902
|
+
|
|
22903
|
+
var eq$1 = eq_1;
|
|
22904
|
+
|
|
22905
|
+
/**
|
|
22906
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
22907
|
+
*
|
|
22908
|
+
* @private
|
|
22909
|
+
* @param {Array} array The array to inspect.
|
|
22910
|
+
* @param {*} key The key to search for.
|
|
22911
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
22912
|
+
*/
|
|
22913
|
+
function assocIndexOf$4(array, key) {
|
|
22914
|
+
var length = array.length;
|
|
22915
|
+
while (length--) {
|
|
22916
|
+
if (eq$1(array[length][0], key)) {
|
|
22917
|
+
return length;
|
|
22918
|
+
}
|
|
22919
|
+
}
|
|
22920
|
+
return -1;
|
|
22921
|
+
}
|
|
22922
|
+
var _assocIndexOf = assocIndexOf$4;
|
|
22923
|
+
|
|
22924
|
+
var assocIndexOf$3 = _assocIndexOf;
|
|
22925
|
+
|
|
22926
|
+
/** Used for built-in method references. */
|
|
22927
|
+
var arrayProto = Array.prototype;
|
|
22928
|
+
|
|
22929
|
+
/** Built-in value references. */
|
|
22930
|
+
var splice = arrayProto.splice;
|
|
22931
|
+
|
|
22932
|
+
/**
|
|
22933
|
+
* Removes `key` and its value from the list cache.
|
|
22934
|
+
*
|
|
22935
|
+
* @private
|
|
22936
|
+
* @name delete
|
|
22937
|
+
* @memberOf ListCache
|
|
22938
|
+
* @param {string} key The key of the value to remove.
|
|
22939
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
22940
|
+
*/
|
|
22941
|
+
function listCacheDelete$1(key) {
|
|
22942
|
+
var data = this.__data__,
|
|
22943
|
+
index = assocIndexOf$3(data, key);
|
|
22944
|
+
if (index < 0) {
|
|
22945
|
+
return false;
|
|
22946
|
+
}
|
|
22947
|
+
var lastIndex = data.length - 1;
|
|
22948
|
+
if (index == lastIndex) {
|
|
22949
|
+
data.pop();
|
|
22950
|
+
} else {
|
|
22951
|
+
splice.call(data, index, 1);
|
|
22952
|
+
}
|
|
22953
|
+
--this.size;
|
|
22954
|
+
return true;
|
|
22955
|
+
}
|
|
22956
|
+
var _listCacheDelete = listCacheDelete$1;
|
|
22957
|
+
|
|
22958
|
+
var assocIndexOf$2 = _assocIndexOf;
|
|
22959
|
+
|
|
22960
|
+
/**
|
|
22961
|
+
* Gets the list cache value for `key`.
|
|
22962
|
+
*
|
|
22963
|
+
* @private
|
|
22964
|
+
* @name get
|
|
22965
|
+
* @memberOf ListCache
|
|
22966
|
+
* @param {string} key The key of the value to get.
|
|
22967
|
+
* @returns {*} Returns the entry value.
|
|
22968
|
+
*/
|
|
22969
|
+
function listCacheGet$1(key) {
|
|
22970
|
+
var data = this.__data__,
|
|
22971
|
+
index = assocIndexOf$2(data, key);
|
|
22972
|
+
return index < 0 ? undefined : data[index][1];
|
|
22973
|
+
}
|
|
22974
|
+
var _listCacheGet = listCacheGet$1;
|
|
22975
|
+
|
|
22976
|
+
var assocIndexOf$1 = _assocIndexOf;
|
|
22977
|
+
|
|
22978
|
+
/**
|
|
22979
|
+
* Checks if a list cache value for `key` exists.
|
|
22980
|
+
*
|
|
22981
|
+
* @private
|
|
22982
|
+
* @name has
|
|
22983
|
+
* @memberOf ListCache
|
|
22984
|
+
* @param {string} key The key of the entry to check.
|
|
22985
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
22986
|
+
*/
|
|
22987
|
+
function listCacheHas$1(key) {
|
|
22988
|
+
return assocIndexOf$1(this.__data__, key) > -1;
|
|
22989
|
+
}
|
|
22990
|
+
var _listCacheHas = listCacheHas$1;
|
|
22991
|
+
|
|
22992
|
+
var assocIndexOf = _assocIndexOf;
|
|
22993
|
+
|
|
22994
|
+
/**
|
|
22995
|
+
* Sets the list cache `key` to `value`.
|
|
22996
|
+
*
|
|
22997
|
+
* @private
|
|
22998
|
+
* @name set
|
|
22999
|
+
* @memberOf ListCache
|
|
23000
|
+
* @param {string} key The key of the value to set.
|
|
23001
|
+
* @param {*} value The value to set.
|
|
23002
|
+
* @returns {Object} Returns the list cache instance.
|
|
23003
|
+
*/
|
|
23004
|
+
function listCacheSet$1(key, value) {
|
|
23005
|
+
var data = this.__data__,
|
|
23006
|
+
index = assocIndexOf(data, key);
|
|
23007
|
+
if (index < 0) {
|
|
23008
|
+
++this.size;
|
|
23009
|
+
data.push([key, value]);
|
|
23010
|
+
} else {
|
|
23011
|
+
data[index][1] = value;
|
|
23012
|
+
}
|
|
23013
|
+
return this;
|
|
23014
|
+
}
|
|
23015
|
+
var _listCacheSet = listCacheSet$1;
|
|
23016
|
+
|
|
23017
|
+
var listCacheClear = _listCacheClear,
|
|
23018
|
+
listCacheDelete = _listCacheDelete,
|
|
23019
|
+
listCacheGet = _listCacheGet,
|
|
23020
|
+
listCacheHas = _listCacheHas,
|
|
23021
|
+
listCacheSet = _listCacheSet;
|
|
23022
|
+
|
|
23023
|
+
/**
|
|
23024
|
+
* Creates an list cache object.
|
|
23025
|
+
*
|
|
23026
|
+
* @private
|
|
23027
|
+
* @constructor
|
|
23028
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
23029
|
+
*/
|
|
23030
|
+
function ListCache$4(entries) {
|
|
23031
|
+
var index = -1,
|
|
23032
|
+
length = entries == null ? 0 : entries.length;
|
|
23033
|
+
this.clear();
|
|
23034
|
+
while (++index < length) {
|
|
23035
|
+
var entry = entries[index];
|
|
23036
|
+
this.set(entry[0], entry[1]);
|
|
23037
|
+
}
|
|
23038
|
+
}
|
|
23039
|
+
|
|
23040
|
+
// Add methods to `ListCache`.
|
|
23041
|
+
ListCache$4.prototype.clear = listCacheClear;
|
|
23042
|
+
ListCache$4.prototype['delete'] = listCacheDelete;
|
|
23043
|
+
ListCache$4.prototype.get = listCacheGet;
|
|
23044
|
+
ListCache$4.prototype.has = listCacheHas;
|
|
23045
|
+
ListCache$4.prototype.set = listCacheSet;
|
|
23046
|
+
var _ListCache = ListCache$4;
|
|
23047
|
+
|
|
23048
|
+
var ListCache$3 = _ListCache;
|
|
23049
|
+
|
|
23050
|
+
/**
|
|
23051
|
+
* Removes all key-value entries from the stack.
|
|
23052
|
+
*
|
|
23053
|
+
* @private
|
|
23054
|
+
* @name clear
|
|
23055
|
+
* @memberOf Stack
|
|
23056
|
+
*/
|
|
23057
|
+
function stackClear$1() {
|
|
23058
|
+
this.__data__ = new ListCache$3();
|
|
23059
|
+
this.size = 0;
|
|
23060
|
+
}
|
|
23061
|
+
var _stackClear = stackClear$1;
|
|
23062
|
+
|
|
23063
|
+
/**
|
|
23064
|
+
* Removes `key` and its value from the stack.
|
|
23065
|
+
*
|
|
23066
|
+
* @private
|
|
23067
|
+
* @name delete
|
|
23068
|
+
* @memberOf Stack
|
|
23069
|
+
* @param {string} key The key of the value to remove.
|
|
23070
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
23071
|
+
*/
|
|
23072
|
+
function stackDelete$1(key) {
|
|
23073
|
+
var data = this.__data__,
|
|
23074
|
+
result = data['delete'](key);
|
|
23075
|
+
this.size = data.size;
|
|
23076
|
+
return result;
|
|
23077
|
+
}
|
|
23078
|
+
var _stackDelete = stackDelete$1;
|
|
23079
|
+
|
|
23080
|
+
/**
|
|
23081
|
+
* Gets the stack value for `key`.
|
|
23082
|
+
*
|
|
23083
|
+
* @private
|
|
23084
|
+
* @name get
|
|
23085
|
+
* @memberOf Stack
|
|
23086
|
+
* @param {string} key The key of the value to get.
|
|
23087
|
+
* @returns {*} Returns the entry value.
|
|
23088
|
+
*/
|
|
23089
|
+
function stackGet$1(key) {
|
|
23090
|
+
return this.__data__.get(key);
|
|
23091
|
+
}
|
|
23092
|
+
var _stackGet = stackGet$1;
|
|
23093
|
+
|
|
23094
|
+
/**
|
|
23095
|
+
* Checks if a stack value for `key` exists.
|
|
23096
|
+
*
|
|
23097
|
+
* @private
|
|
23098
|
+
* @name has
|
|
23099
|
+
* @memberOf Stack
|
|
23100
|
+
* @param {string} key The key of the entry to check.
|
|
23101
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
23102
|
+
*/
|
|
23103
|
+
function stackHas$1(key) {
|
|
23104
|
+
return this.__data__.has(key);
|
|
23105
|
+
}
|
|
23106
|
+
var _stackHas = stackHas$1;
|
|
23107
|
+
|
|
23108
|
+
/** Detect free variable `global` from Node.js. */
|
|
23109
|
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
23110
|
+
var _freeGlobal = freeGlobal$1;
|
|
23111
|
+
|
|
23112
|
+
var freeGlobal = _freeGlobal;
|
|
23113
|
+
|
|
23114
|
+
/** Detect free variable `self`. */
|
|
23115
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
23116
|
+
|
|
23117
|
+
/** Used as a reference to the global object. */
|
|
23118
|
+
var root$8 = freeGlobal || freeSelf || Function('return this')();
|
|
23119
|
+
var _root = root$8;
|
|
23120
|
+
|
|
23121
|
+
var root$7 = _root;
|
|
23122
|
+
|
|
23123
|
+
/** Built-in value references. */
|
|
23124
|
+
var Symbol$4 = root$7.Symbol;
|
|
23125
|
+
var _Symbol = Symbol$4;
|
|
23126
|
+
|
|
23127
|
+
var Symbol$3 = _Symbol;
|
|
23128
|
+
|
|
23129
|
+
/** Used for built-in method references. */
|
|
23130
|
+
var objectProto$b = Object.prototype;
|
|
23131
|
+
|
|
23132
|
+
/** Used to check objects for own properties. */
|
|
23133
|
+
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
23134
|
+
|
|
23135
|
+
/**
|
|
23136
|
+
* Used to resolve the
|
|
23137
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
23138
|
+
* of values.
|
|
23139
|
+
*/
|
|
23140
|
+
var nativeObjectToString$1 = objectProto$b.toString;
|
|
23141
|
+
|
|
23142
|
+
/** Built-in value references. */
|
|
23143
|
+
var symToStringTag$1 = Symbol$3 ? Symbol$3.toStringTag : undefined;
|
|
23144
|
+
|
|
23145
|
+
/**
|
|
23146
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
23147
|
+
*
|
|
23148
|
+
* @private
|
|
23149
|
+
* @param {*} value The value to query.
|
|
23150
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
23151
|
+
*/
|
|
23152
|
+
function getRawTag$1(value) {
|
|
23153
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
|
|
23154
|
+
tag = value[symToStringTag$1];
|
|
23155
|
+
try {
|
|
23156
|
+
value[symToStringTag$1] = undefined;
|
|
23157
|
+
var unmasked = true;
|
|
23158
|
+
} catch (e) {}
|
|
23159
|
+
var result = nativeObjectToString$1.call(value);
|
|
23160
|
+
if (unmasked) {
|
|
23161
|
+
if (isOwn) {
|
|
23162
|
+
value[symToStringTag$1] = tag;
|
|
23163
|
+
} else {
|
|
23164
|
+
delete value[symToStringTag$1];
|
|
23165
|
+
}
|
|
23166
|
+
}
|
|
23167
|
+
return result;
|
|
23168
|
+
}
|
|
23169
|
+
var _getRawTag = getRawTag$1;
|
|
23170
|
+
|
|
23171
|
+
/** Used for built-in method references. */
|
|
23172
|
+
var objectProto$a = Object.prototype;
|
|
23173
|
+
|
|
23174
|
+
/**
|
|
23175
|
+
* Used to resolve the
|
|
23176
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
23177
|
+
* of values.
|
|
23178
|
+
*/
|
|
23179
|
+
var nativeObjectToString = objectProto$a.toString;
|
|
23180
|
+
|
|
23181
|
+
/**
|
|
23182
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
23183
|
+
*
|
|
23184
|
+
* @private
|
|
23185
|
+
* @param {*} value The value to convert.
|
|
23186
|
+
* @returns {string} Returns the converted string.
|
|
23187
|
+
*/
|
|
23188
|
+
function objectToString$1(value) {
|
|
23189
|
+
return nativeObjectToString.call(value);
|
|
23190
|
+
}
|
|
23191
|
+
var _objectToString = objectToString$1;
|
|
23192
|
+
|
|
23193
|
+
var Symbol$2 = _Symbol,
|
|
23194
|
+
getRawTag = _getRawTag,
|
|
23195
|
+
objectToString = _objectToString;
|
|
23196
|
+
|
|
23197
|
+
/** `Object#toString` result references. */
|
|
23198
|
+
var nullTag = '[object Null]',
|
|
23199
|
+
undefinedTag = '[object Undefined]';
|
|
23200
|
+
|
|
23201
|
+
/** Built-in value references. */
|
|
23202
|
+
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
23203
|
+
|
|
23204
|
+
/**
|
|
23205
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
23206
|
+
*
|
|
23207
|
+
* @private
|
|
23208
|
+
* @param {*} value The value to query.
|
|
23209
|
+
* @returns {string} Returns the `toStringTag`.
|
|
23210
|
+
*/
|
|
23211
|
+
function baseGetTag$5(value) {
|
|
23212
|
+
if (value == null) {
|
|
23213
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
23214
|
+
}
|
|
23215
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
23216
|
+
}
|
|
23217
|
+
var _baseGetTag = baseGetTag$5;
|
|
23218
|
+
|
|
23219
|
+
/**
|
|
23220
|
+
* Checks if `value` is the
|
|
23221
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
23222
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
23223
|
+
*
|
|
23224
|
+
* @static
|
|
23225
|
+
* @memberOf _
|
|
23226
|
+
* @since 0.1.0
|
|
23227
|
+
* @category Lang
|
|
23228
|
+
* @param {*} value The value to check.
|
|
23229
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
23230
|
+
* @example
|
|
23231
|
+
*
|
|
23232
|
+
* _.isObject({});
|
|
23233
|
+
* // => true
|
|
23234
|
+
*
|
|
23235
|
+
* _.isObject([1, 2, 3]);
|
|
23236
|
+
* // => true
|
|
23237
|
+
*
|
|
23238
|
+
* _.isObject(_.noop);
|
|
23239
|
+
* // => true
|
|
23240
|
+
*
|
|
23241
|
+
* _.isObject(null);
|
|
23242
|
+
* // => false
|
|
23243
|
+
*/
|
|
23244
|
+
function isObject$2(value) {
|
|
23245
|
+
var type = typeof value;
|
|
23246
|
+
return value != null && (type == 'object' || type == 'function');
|
|
23247
|
+
}
|
|
23248
|
+
var isObject_1 = isObject$2;
|
|
23249
|
+
var isObject$3 = /*@__PURE__*/getDefaultExportFromCjs(isObject_1);
|
|
23250
|
+
|
|
23251
|
+
var baseGetTag$4 = _baseGetTag,
|
|
23252
|
+
isObject$1 = isObject_1;
|
|
23253
|
+
|
|
23254
|
+
/** `Object#toString` result references. */
|
|
23255
|
+
var asyncTag = '[object AsyncFunction]',
|
|
23256
|
+
funcTag$1 = '[object Function]',
|
|
23257
|
+
genTag = '[object GeneratorFunction]',
|
|
23258
|
+
proxyTag = '[object Proxy]';
|
|
23259
|
+
|
|
23260
|
+
/**
|
|
23261
|
+
* Checks if `value` is classified as a `Function` object.
|
|
23262
|
+
*
|
|
23263
|
+
* @static
|
|
23264
|
+
* @memberOf _
|
|
23265
|
+
* @since 0.1.0
|
|
23266
|
+
* @category Lang
|
|
23267
|
+
* @param {*} value The value to check.
|
|
23268
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
23269
|
+
* @example
|
|
23270
|
+
*
|
|
23271
|
+
* _.isFunction(_);
|
|
23272
|
+
* // => true
|
|
23273
|
+
*
|
|
23274
|
+
* _.isFunction(/abc/);
|
|
23275
|
+
* // => false
|
|
23276
|
+
*/
|
|
23277
|
+
function isFunction$2(value) {
|
|
23278
|
+
if (!isObject$1(value)) {
|
|
23279
|
+
return false;
|
|
23280
|
+
}
|
|
23281
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
23282
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
23283
|
+
var tag = baseGetTag$4(value);
|
|
23284
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
23285
|
+
}
|
|
23286
|
+
var isFunction_1 = isFunction$2;
|
|
23287
|
+
|
|
23288
|
+
var root$6 = _root;
|
|
23289
|
+
|
|
23290
|
+
/** Used to detect overreaching core-js shims. */
|
|
23291
|
+
var coreJsData$1 = root$6['__core-js_shared__'];
|
|
23292
|
+
var _coreJsData = coreJsData$1;
|
|
23293
|
+
|
|
23294
|
+
var coreJsData = _coreJsData;
|
|
23295
|
+
|
|
23296
|
+
/** Used to detect methods masquerading as native. */
|
|
23297
|
+
var maskSrcKey = function () {
|
|
23298
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
23299
|
+
return uid ? 'Symbol(src)_1.' + uid : '';
|
|
23300
|
+
}();
|
|
23301
|
+
|
|
23302
|
+
/**
|
|
23303
|
+
* Checks if `func` has its source masked.
|
|
23304
|
+
*
|
|
23305
|
+
* @private
|
|
23306
|
+
* @param {Function} func The function to check.
|
|
23307
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
23308
|
+
*/
|
|
23309
|
+
function isMasked$1(func) {
|
|
23310
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
23311
|
+
}
|
|
23312
|
+
var _isMasked = isMasked$1;
|
|
23313
|
+
|
|
23314
|
+
/** Used for built-in method references. */
|
|
23315
|
+
var funcProto$1 = Function.prototype;
|
|
23316
|
+
|
|
23317
|
+
/** Used to resolve the decompiled source of functions. */
|
|
23318
|
+
var funcToString$1 = funcProto$1.toString;
|
|
23319
|
+
|
|
23320
|
+
/**
|
|
23321
|
+
* Converts `func` to its source code.
|
|
23322
|
+
*
|
|
23323
|
+
* @private
|
|
23324
|
+
* @param {Function} func The function to convert.
|
|
23325
|
+
* @returns {string} Returns the source code.
|
|
23326
|
+
*/
|
|
23327
|
+
function toSource$2(func) {
|
|
23328
|
+
if (func != null) {
|
|
23329
|
+
try {
|
|
23330
|
+
return funcToString$1.call(func);
|
|
23331
|
+
} catch (e) {}
|
|
23332
|
+
try {
|
|
23333
|
+
return func + '';
|
|
23334
|
+
} catch (e) {}
|
|
23335
|
+
}
|
|
23336
|
+
return '';
|
|
23337
|
+
}
|
|
23338
|
+
var _toSource = toSource$2;
|
|
23339
|
+
|
|
23340
|
+
var isFunction$1 = isFunction_1,
|
|
23341
|
+
isMasked = _isMasked,
|
|
23342
|
+
isObject = isObject_1,
|
|
23343
|
+
toSource$1 = _toSource;
|
|
23344
|
+
|
|
23345
|
+
/**
|
|
23346
|
+
* Used to match `RegExp`
|
|
23347
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
23348
|
+
*/
|
|
23349
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
23350
|
+
|
|
23351
|
+
/** Used to detect host constructors (Safari). */
|
|
23352
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
23353
|
+
|
|
23354
|
+
/** Used for built-in method references. */
|
|
23355
|
+
var funcProto = Function.prototype,
|
|
23356
|
+
objectProto$9 = Object.prototype;
|
|
23357
|
+
|
|
23358
|
+
/** Used to resolve the decompiled source of functions. */
|
|
23359
|
+
var funcToString = funcProto.toString;
|
|
23360
|
+
|
|
23361
|
+
/** Used to check objects for own properties. */
|
|
23362
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
23363
|
+
|
|
23364
|
+
/** Used to detect if a method is native. */
|
|
23365
|
+
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
23366
|
+
|
|
23367
|
+
/**
|
|
23368
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
23369
|
+
*
|
|
23370
|
+
* @private
|
|
23371
|
+
* @param {*} value The value to check.
|
|
23372
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
23373
|
+
* else `false`.
|
|
23374
|
+
*/
|
|
23375
|
+
function baseIsNative$1(value) {
|
|
23376
|
+
if (!isObject(value) || isMasked(value)) {
|
|
23377
|
+
return false;
|
|
23378
|
+
}
|
|
23379
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
23380
|
+
return pattern.test(toSource$1(value));
|
|
23381
|
+
}
|
|
23382
|
+
var _baseIsNative = baseIsNative$1;
|
|
23383
|
+
|
|
23384
|
+
/**
|
|
23385
|
+
* Gets the value at `key` of `object`.
|
|
23386
|
+
*
|
|
23387
|
+
* @private
|
|
23388
|
+
* @param {Object} [object] The object to query.
|
|
23389
|
+
* @param {string} key The key of the property to get.
|
|
23390
|
+
* @returns {*} Returns the property value.
|
|
23391
|
+
*/
|
|
23392
|
+
function getValue$1(object, key) {
|
|
23393
|
+
return object == null ? undefined : object[key];
|
|
23394
|
+
}
|
|
23395
|
+
var _getValue = getValue$1;
|
|
23396
|
+
|
|
23397
|
+
var baseIsNative = _baseIsNative,
|
|
23398
|
+
getValue = _getValue;
|
|
23399
|
+
|
|
23400
|
+
/**
|
|
23401
|
+
* Gets the native function at `key` of `object`.
|
|
23402
|
+
*
|
|
23403
|
+
* @private
|
|
23404
|
+
* @param {Object} object The object to query.
|
|
23405
|
+
* @param {string} key The key of the method to get.
|
|
23406
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
23407
|
+
*/
|
|
23408
|
+
function getNative$6(object, key) {
|
|
23409
|
+
var value = getValue(object, key);
|
|
23410
|
+
return baseIsNative(value) ? value : undefined;
|
|
23411
|
+
}
|
|
23412
|
+
var _getNative = getNative$6;
|
|
23413
|
+
|
|
23414
|
+
var getNative$5 = _getNative,
|
|
23415
|
+
root$5 = _root;
|
|
23416
|
+
|
|
23417
|
+
/* Built-in method references that are verified to be native. */
|
|
23418
|
+
var Map$4 = getNative$5(root$5, 'Map');
|
|
23419
|
+
var _Map = Map$4;
|
|
23420
|
+
|
|
23421
|
+
var getNative$4 = _getNative;
|
|
23422
|
+
|
|
23423
|
+
/* Built-in method references that are verified to be native. */
|
|
23424
|
+
var nativeCreate$4 = getNative$4(Object, 'create');
|
|
23425
|
+
var _nativeCreate = nativeCreate$4;
|
|
23426
|
+
|
|
23427
|
+
var nativeCreate$3 = _nativeCreate;
|
|
23428
|
+
|
|
23429
|
+
/**
|
|
23430
|
+
* Removes all key-value entries from the hash.
|
|
23431
|
+
*
|
|
23432
|
+
* @private
|
|
23433
|
+
* @name clear
|
|
23434
|
+
* @memberOf Hash
|
|
23435
|
+
*/
|
|
23436
|
+
function hashClear$1() {
|
|
23437
|
+
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
23438
|
+
this.size = 0;
|
|
23439
|
+
}
|
|
23440
|
+
var _hashClear = hashClear$1;
|
|
23441
|
+
|
|
23442
|
+
/**
|
|
23443
|
+
* Removes `key` and its value from the hash.
|
|
23444
|
+
*
|
|
23445
|
+
* @private
|
|
23446
|
+
* @name delete
|
|
23447
|
+
* @memberOf Hash
|
|
23448
|
+
* @param {Object} hash The hash to modify.
|
|
23449
|
+
* @param {string} key The key of the value to remove.
|
|
23450
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
23451
|
+
*/
|
|
23452
|
+
function hashDelete$1(key) {
|
|
23453
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
23454
|
+
this.size -= result ? 1 : 0;
|
|
23455
|
+
return result;
|
|
23456
|
+
}
|
|
23457
|
+
var _hashDelete = hashDelete$1;
|
|
23458
|
+
|
|
23459
|
+
var nativeCreate$2 = _nativeCreate;
|
|
23460
|
+
|
|
23461
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
23462
|
+
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
23463
|
+
|
|
23464
|
+
/** Used for built-in method references. */
|
|
23465
|
+
var objectProto$8 = Object.prototype;
|
|
23466
|
+
|
|
23467
|
+
/** Used to check objects for own properties. */
|
|
23468
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
23469
|
+
|
|
23470
|
+
/**
|
|
23471
|
+
* Gets the hash value for `key`.
|
|
23472
|
+
*
|
|
23473
|
+
* @private
|
|
23474
|
+
* @name get
|
|
23475
|
+
* @memberOf Hash
|
|
23476
|
+
* @param {string} key The key of the value to get.
|
|
23477
|
+
* @returns {*} Returns the entry value.
|
|
23478
|
+
*/
|
|
23479
|
+
function hashGet$1(key) {
|
|
23480
|
+
var data = this.__data__;
|
|
23481
|
+
if (nativeCreate$2) {
|
|
23482
|
+
var result = data[key];
|
|
23483
|
+
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
23484
|
+
}
|
|
23485
|
+
return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
|
|
23486
|
+
}
|
|
23487
|
+
var _hashGet = hashGet$1;
|
|
23488
|
+
|
|
23489
|
+
var nativeCreate$1 = _nativeCreate;
|
|
23490
|
+
|
|
23491
|
+
/** Used for built-in method references. */
|
|
23492
|
+
var objectProto$7 = Object.prototype;
|
|
23493
|
+
|
|
23494
|
+
/** Used to check objects for own properties. */
|
|
23495
|
+
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
23496
|
+
|
|
23497
|
+
/**
|
|
23498
|
+
* Checks if a hash value for `key` exists.
|
|
23499
|
+
*
|
|
23500
|
+
* @private
|
|
23501
|
+
* @name has
|
|
23502
|
+
* @memberOf Hash
|
|
23503
|
+
* @param {string} key The key of the entry to check.
|
|
23504
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
23505
|
+
*/
|
|
23506
|
+
function hashHas$1(key) {
|
|
23507
|
+
var data = this.__data__;
|
|
23508
|
+
return nativeCreate$1 ? data[key] !== undefined : hasOwnProperty$5.call(data, key);
|
|
23509
|
+
}
|
|
23510
|
+
var _hashHas = hashHas$1;
|
|
23511
|
+
|
|
23512
|
+
var nativeCreate = _nativeCreate;
|
|
23513
|
+
|
|
23514
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
23515
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
23516
|
+
|
|
23517
|
+
/**
|
|
23518
|
+
* Sets the hash `key` to `value`.
|
|
23519
|
+
*
|
|
23520
|
+
* @private
|
|
23521
|
+
* @name set
|
|
23522
|
+
* @memberOf Hash
|
|
23523
|
+
* @param {string} key The key of the value to set.
|
|
23524
|
+
* @param {*} value The value to set.
|
|
23525
|
+
* @returns {Object} Returns the hash instance.
|
|
23526
|
+
*/
|
|
23527
|
+
function hashSet$1(key, value) {
|
|
23528
|
+
var data = this.__data__;
|
|
23529
|
+
this.size += this.has(key) ? 0 : 1;
|
|
23530
|
+
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value;
|
|
23531
|
+
return this;
|
|
23532
|
+
}
|
|
23533
|
+
var _hashSet = hashSet$1;
|
|
23534
|
+
|
|
23535
|
+
var hashClear = _hashClear,
|
|
23536
|
+
hashDelete = _hashDelete,
|
|
23537
|
+
hashGet = _hashGet,
|
|
23538
|
+
hashHas = _hashHas,
|
|
23539
|
+
hashSet = _hashSet;
|
|
23540
|
+
|
|
23541
|
+
/**
|
|
23542
|
+
* Creates a hash object.
|
|
23543
|
+
*
|
|
23544
|
+
* @private
|
|
23545
|
+
* @constructor
|
|
23546
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
23547
|
+
*/
|
|
23548
|
+
function Hash$1(entries) {
|
|
23549
|
+
var index = -1,
|
|
23550
|
+
length = entries == null ? 0 : entries.length;
|
|
23551
|
+
this.clear();
|
|
23552
|
+
while (++index < length) {
|
|
23553
|
+
var entry = entries[index];
|
|
23554
|
+
this.set(entry[0], entry[1]);
|
|
23555
|
+
}
|
|
23556
|
+
}
|
|
23557
|
+
|
|
23558
|
+
// Add methods to `Hash`.
|
|
23559
|
+
Hash$1.prototype.clear = hashClear;
|
|
23560
|
+
Hash$1.prototype['delete'] = hashDelete;
|
|
23561
|
+
Hash$1.prototype.get = hashGet;
|
|
23562
|
+
Hash$1.prototype.has = hashHas;
|
|
23563
|
+
Hash$1.prototype.set = hashSet;
|
|
23564
|
+
var _Hash = Hash$1;
|
|
23565
|
+
|
|
23566
|
+
var Hash = _Hash,
|
|
23567
|
+
ListCache$2 = _ListCache,
|
|
23568
|
+
Map$3 = _Map;
|
|
23569
|
+
|
|
23570
|
+
/**
|
|
23571
|
+
* Removes all key-value entries from the map.
|
|
23572
|
+
*
|
|
23573
|
+
* @private
|
|
23574
|
+
* @name clear
|
|
23575
|
+
* @memberOf MapCache
|
|
23576
|
+
*/
|
|
23577
|
+
function mapCacheClear$1() {
|
|
23578
|
+
this.size = 0;
|
|
23579
|
+
this.__data__ = {
|
|
23580
|
+
'hash': new Hash(),
|
|
23581
|
+
'map': new (Map$3 || ListCache$2)(),
|
|
23582
|
+
'string': new Hash()
|
|
23583
|
+
};
|
|
23584
|
+
}
|
|
23585
|
+
var _mapCacheClear = mapCacheClear$1;
|
|
23586
|
+
|
|
23587
|
+
/**
|
|
23588
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
23589
|
+
*
|
|
23590
|
+
* @private
|
|
23591
|
+
* @param {*} value The value to check.
|
|
23592
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
23593
|
+
*/
|
|
23594
|
+
function isKeyable$1(value) {
|
|
23595
|
+
var type = typeof value;
|
|
23596
|
+
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
|
|
23597
|
+
}
|
|
23598
|
+
var _isKeyable = isKeyable$1;
|
|
23599
|
+
|
|
23600
|
+
var isKeyable = _isKeyable;
|
|
23601
|
+
|
|
23602
|
+
/**
|
|
23603
|
+
* Gets the data for `map`.
|
|
23604
|
+
*
|
|
23605
|
+
* @private
|
|
23606
|
+
* @param {Object} map The map to query.
|
|
23607
|
+
* @param {string} key The reference key.
|
|
23608
|
+
* @returns {*} Returns the map data.
|
|
23609
|
+
*/
|
|
23610
|
+
function getMapData$4(map, key) {
|
|
23611
|
+
var data = map.__data__;
|
|
23612
|
+
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
|
|
23613
|
+
}
|
|
23614
|
+
var _getMapData = getMapData$4;
|
|
23615
|
+
|
|
23616
|
+
var getMapData$3 = _getMapData;
|
|
23617
|
+
|
|
23618
|
+
/**
|
|
23619
|
+
* Removes `key` and its value from the map.
|
|
23620
|
+
*
|
|
23621
|
+
* @private
|
|
23622
|
+
* @name delete
|
|
23623
|
+
* @memberOf MapCache
|
|
23624
|
+
* @param {string} key The key of the value to remove.
|
|
23625
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
23626
|
+
*/
|
|
23627
|
+
function mapCacheDelete$1(key) {
|
|
23628
|
+
var result = getMapData$3(this, key)['delete'](key);
|
|
23629
|
+
this.size -= result ? 1 : 0;
|
|
23630
|
+
return result;
|
|
23631
|
+
}
|
|
23632
|
+
var _mapCacheDelete = mapCacheDelete$1;
|
|
23633
|
+
|
|
23634
|
+
var getMapData$2 = _getMapData;
|
|
23635
|
+
|
|
23636
|
+
/**
|
|
23637
|
+
* Gets the map value for `key`.
|
|
23638
|
+
*
|
|
23639
|
+
* @private
|
|
23640
|
+
* @name get
|
|
23641
|
+
* @memberOf MapCache
|
|
23642
|
+
* @param {string} key The key of the value to get.
|
|
23643
|
+
* @returns {*} Returns the entry value.
|
|
23644
|
+
*/
|
|
23645
|
+
function mapCacheGet$1(key) {
|
|
23646
|
+
return getMapData$2(this, key).get(key);
|
|
23647
|
+
}
|
|
23648
|
+
var _mapCacheGet = mapCacheGet$1;
|
|
23649
|
+
|
|
23650
|
+
var getMapData$1 = _getMapData;
|
|
23651
|
+
|
|
23652
|
+
/**
|
|
23653
|
+
* Checks if a map value for `key` exists.
|
|
23654
|
+
*
|
|
23655
|
+
* @private
|
|
23656
|
+
* @name has
|
|
23657
|
+
* @memberOf MapCache
|
|
23658
|
+
* @param {string} key The key of the entry to check.
|
|
23659
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
23660
|
+
*/
|
|
23661
|
+
function mapCacheHas$1(key) {
|
|
23662
|
+
return getMapData$1(this, key).has(key);
|
|
23663
|
+
}
|
|
23664
|
+
var _mapCacheHas = mapCacheHas$1;
|
|
23665
|
+
|
|
23666
|
+
var getMapData = _getMapData;
|
|
23667
|
+
|
|
23668
|
+
/**
|
|
23669
|
+
* Sets the map `key` to `value`.
|
|
23670
|
+
*
|
|
23671
|
+
* @private
|
|
23672
|
+
* @name set
|
|
23673
|
+
* @memberOf MapCache
|
|
23674
|
+
* @param {string} key The key of the value to set.
|
|
23675
|
+
* @param {*} value The value to set.
|
|
23676
|
+
* @returns {Object} Returns the map cache instance.
|
|
23677
|
+
*/
|
|
23678
|
+
function mapCacheSet$1(key, value) {
|
|
23679
|
+
var data = getMapData(this, key),
|
|
23680
|
+
size = data.size;
|
|
23681
|
+
data.set(key, value);
|
|
23682
|
+
this.size += data.size == size ? 0 : 1;
|
|
23683
|
+
return this;
|
|
23684
|
+
}
|
|
23685
|
+
var _mapCacheSet = mapCacheSet$1;
|
|
23686
|
+
|
|
23687
|
+
var mapCacheClear = _mapCacheClear,
|
|
23688
|
+
mapCacheDelete = _mapCacheDelete,
|
|
23689
|
+
mapCacheGet = _mapCacheGet,
|
|
23690
|
+
mapCacheHas = _mapCacheHas,
|
|
23691
|
+
mapCacheSet = _mapCacheSet;
|
|
23692
|
+
|
|
23693
|
+
/**
|
|
23694
|
+
* Creates a map cache object to store key-value pairs.
|
|
23695
|
+
*
|
|
23696
|
+
* @private
|
|
23697
|
+
* @constructor
|
|
23698
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
23699
|
+
*/
|
|
23700
|
+
function MapCache$2(entries) {
|
|
23701
|
+
var index = -1,
|
|
23702
|
+
length = entries == null ? 0 : entries.length;
|
|
23703
|
+
this.clear();
|
|
23704
|
+
while (++index < length) {
|
|
23705
|
+
var entry = entries[index];
|
|
23706
|
+
this.set(entry[0], entry[1]);
|
|
23707
|
+
}
|
|
23708
|
+
}
|
|
23709
|
+
|
|
23710
|
+
// Add methods to `MapCache`.
|
|
23711
|
+
MapCache$2.prototype.clear = mapCacheClear;
|
|
23712
|
+
MapCache$2.prototype['delete'] = mapCacheDelete;
|
|
23713
|
+
MapCache$2.prototype.get = mapCacheGet;
|
|
23714
|
+
MapCache$2.prototype.has = mapCacheHas;
|
|
23715
|
+
MapCache$2.prototype.set = mapCacheSet;
|
|
23716
|
+
var _MapCache = MapCache$2;
|
|
23717
|
+
|
|
23718
|
+
var ListCache$1 = _ListCache,
|
|
23719
|
+
Map$2 = _Map,
|
|
23720
|
+
MapCache$1 = _MapCache;
|
|
23721
|
+
|
|
23722
|
+
/** Used as the size to enable large array optimizations. */
|
|
23723
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
23724
|
+
|
|
23725
|
+
/**
|
|
23726
|
+
* Sets the stack `key` to `value`.
|
|
23727
|
+
*
|
|
23728
|
+
* @private
|
|
23729
|
+
* @name set
|
|
23730
|
+
* @memberOf Stack
|
|
23731
|
+
* @param {string} key The key of the value to set.
|
|
23732
|
+
* @param {*} value The value to set.
|
|
23733
|
+
* @returns {Object} Returns the stack cache instance.
|
|
23734
|
+
*/
|
|
23735
|
+
function stackSet$1(key, value) {
|
|
23736
|
+
var data = this.__data__;
|
|
23737
|
+
if (data instanceof ListCache$1) {
|
|
23738
|
+
var pairs = data.__data__;
|
|
23739
|
+
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
23740
|
+
pairs.push([key, value]);
|
|
23741
|
+
this.size = ++data.size;
|
|
23742
|
+
return this;
|
|
23743
|
+
}
|
|
23744
|
+
data = this.__data__ = new MapCache$1(pairs);
|
|
23745
|
+
}
|
|
23746
|
+
data.set(key, value);
|
|
23747
|
+
this.size = data.size;
|
|
23748
|
+
return this;
|
|
23749
|
+
}
|
|
23750
|
+
var _stackSet = stackSet$1;
|
|
23751
|
+
|
|
23752
|
+
var ListCache = _ListCache,
|
|
23753
|
+
stackClear = _stackClear,
|
|
23754
|
+
stackDelete = _stackDelete,
|
|
23755
|
+
stackGet = _stackGet,
|
|
23756
|
+
stackHas = _stackHas,
|
|
23757
|
+
stackSet = _stackSet;
|
|
23758
|
+
|
|
23759
|
+
/**
|
|
23760
|
+
* Creates a stack cache object to store key-value pairs.
|
|
23761
|
+
*
|
|
23762
|
+
* @private
|
|
23763
|
+
* @constructor
|
|
23764
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
23765
|
+
*/
|
|
23766
|
+
function Stack$1(entries) {
|
|
23767
|
+
var data = this.__data__ = new ListCache(entries);
|
|
23768
|
+
this.size = data.size;
|
|
23769
|
+
}
|
|
23770
|
+
|
|
23771
|
+
// Add methods to `Stack`.
|
|
23772
|
+
Stack$1.prototype.clear = stackClear;
|
|
23773
|
+
Stack$1.prototype['delete'] = stackDelete;
|
|
23774
|
+
Stack$1.prototype.get = stackGet;
|
|
23775
|
+
Stack$1.prototype.has = stackHas;
|
|
23776
|
+
Stack$1.prototype.set = stackSet;
|
|
23777
|
+
var _Stack = Stack$1;
|
|
23778
|
+
|
|
23779
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
23780
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
23781
|
+
|
|
23782
|
+
/**
|
|
23783
|
+
* Adds `value` to the array cache.
|
|
23784
|
+
*
|
|
23785
|
+
* @private
|
|
23786
|
+
* @name add
|
|
23787
|
+
* @memberOf SetCache
|
|
23788
|
+
* @alias push
|
|
23789
|
+
* @param {*} value The value to cache.
|
|
23790
|
+
* @returns {Object} Returns the cache instance.
|
|
23791
|
+
*/
|
|
23792
|
+
function setCacheAdd$1(value) {
|
|
23793
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
23794
|
+
return this;
|
|
23795
|
+
}
|
|
23796
|
+
var _setCacheAdd = setCacheAdd$1;
|
|
23797
|
+
|
|
23798
|
+
/**
|
|
23799
|
+
* Checks if `value` is in the array cache.
|
|
23800
|
+
*
|
|
23801
|
+
* @private
|
|
23802
|
+
* @name has
|
|
23803
|
+
* @memberOf SetCache
|
|
23804
|
+
* @param {*} value The value to search for.
|
|
23805
|
+
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
23806
|
+
*/
|
|
23807
|
+
function setCacheHas$1(value) {
|
|
23808
|
+
return this.__data__.has(value);
|
|
23809
|
+
}
|
|
23810
|
+
var _setCacheHas = setCacheHas$1;
|
|
23811
|
+
|
|
23812
|
+
var MapCache = _MapCache,
|
|
23813
|
+
setCacheAdd = _setCacheAdd,
|
|
23814
|
+
setCacheHas = _setCacheHas;
|
|
23815
|
+
|
|
23816
|
+
/**
|
|
23817
|
+
*
|
|
23818
|
+
* Creates an array cache object to store unique values.
|
|
23819
|
+
*
|
|
23820
|
+
* @private
|
|
23821
|
+
* @constructor
|
|
23822
|
+
* @param {Array} [values] The values to cache.
|
|
23823
|
+
*/
|
|
23824
|
+
function SetCache$1(values) {
|
|
23825
|
+
var index = -1,
|
|
23826
|
+
length = values == null ? 0 : values.length;
|
|
23827
|
+
this.__data__ = new MapCache();
|
|
23828
|
+
while (++index < length) {
|
|
23829
|
+
this.add(values[index]);
|
|
23830
|
+
}
|
|
23831
|
+
}
|
|
23832
|
+
|
|
23833
|
+
// Add methods to `SetCache`.
|
|
23834
|
+
SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
|
|
23835
|
+
SetCache$1.prototype.has = setCacheHas;
|
|
23836
|
+
var _SetCache = SetCache$1;
|
|
23837
|
+
|
|
23838
|
+
/**
|
|
23839
|
+
* A specialized version of `_.some` for arrays without support for iteratee
|
|
23840
|
+
* shorthands.
|
|
23841
|
+
*
|
|
23842
|
+
* @private
|
|
23843
|
+
* @param {Array} [array] The array to iterate over.
|
|
23844
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
23845
|
+
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
23846
|
+
* else `false`.
|
|
23847
|
+
*/
|
|
23848
|
+
function arraySome$1(array, predicate) {
|
|
23849
|
+
var index = -1,
|
|
23850
|
+
length = array == null ? 0 : array.length;
|
|
23851
|
+
while (++index < length) {
|
|
23852
|
+
if (predicate(array[index], index, array)) {
|
|
23853
|
+
return true;
|
|
23854
|
+
}
|
|
23855
|
+
}
|
|
23856
|
+
return false;
|
|
23857
|
+
}
|
|
23858
|
+
var _arraySome = arraySome$1;
|
|
23859
|
+
|
|
23860
|
+
/**
|
|
23861
|
+
* Checks if a `cache` value for `key` exists.
|
|
23862
|
+
*
|
|
23863
|
+
* @private
|
|
23864
|
+
* @param {Object} cache The cache to query.
|
|
23865
|
+
* @param {string} key The key of the entry to check.
|
|
23866
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
23867
|
+
*/
|
|
23868
|
+
function cacheHas$1(cache, key) {
|
|
23869
|
+
return cache.has(key);
|
|
23870
|
+
}
|
|
23871
|
+
var _cacheHas = cacheHas$1;
|
|
23872
|
+
|
|
23873
|
+
var SetCache = _SetCache,
|
|
23874
|
+
arraySome = _arraySome,
|
|
23875
|
+
cacheHas = _cacheHas;
|
|
23876
|
+
|
|
23877
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
23878
|
+
var COMPARE_PARTIAL_FLAG$3 = 1,
|
|
23879
|
+
COMPARE_UNORDERED_FLAG$1 = 2;
|
|
23880
|
+
|
|
23881
|
+
/**
|
|
23882
|
+
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
23883
|
+
* partial deep comparisons.
|
|
23884
|
+
*
|
|
23885
|
+
* @private
|
|
23886
|
+
* @param {Array} array The array to compare.
|
|
23887
|
+
* @param {Array} other The other array to compare.
|
|
23888
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
23889
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
23890
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
23891
|
+
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
23892
|
+
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
23893
|
+
*/
|
|
23894
|
+
function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
|
|
23895
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
|
|
23896
|
+
arrLength = array.length,
|
|
23897
|
+
othLength = other.length;
|
|
23898
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
23899
|
+
return false;
|
|
23900
|
+
}
|
|
23901
|
+
// Check that cyclic values are equal.
|
|
23902
|
+
var arrStacked = stack.get(array);
|
|
23903
|
+
var othStacked = stack.get(other);
|
|
23904
|
+
if (arrStacked && othStacked) {
|
|
23905
|
+
return arrStacked == other && othStacked == array;
|
|
23906
|
+
}
|
|
23907
|
+
var index = -1,
|
|
23908
|
+
result = true,
|
|
23909
|
+
seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : undefined;
|
|
23910
|
+
stack.set(array, other);
|
|
23911
|
+
stack.set(other, array);
|
|
23912
|
+
|
|
23913
|
+
// Ignore non-index properties.
|
|
23914
|
+
while (++index < arrLength) {
|
|
23915
|
+
var arrValue = array[index],
|
|
23916
|
+
othValue = other[index];
|
|
23917
|
+
if (customizer) {
|
|
23918
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
23919
|
+
}
|
|
23920
|
+
if (compared !== undefined) {
|
|
23921
|
+
if (compared) {
|
|
23922
|
+
continue;
|
|
23923
|
+
}
|
|
23924
|
+
result = false;
|
|
23925
|
+
break;
|
|
23926
|
+
}
|
|
23927
|
+
// Recursively compare arrays (susceptible to call stack limits).
|
|
23928
|
+
if (seen) {
|
|
23929
|
+
if (!arraySome(other, function (othValue, othIndex) {
|
|
23930
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
23931
|
+
return seen.push(othIndex);
|
|
23932
|
+
}
|
|
23933
|
+
})) {
|
|
23934
|
+
result = false;
|
|
23935
|
+
break;
|
|
23936
|
+
}
|
|
23937
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
23938
|
+
result = false;
|
|
23939
|
+
break;
|
|
23940
|
+
}
|
|
23941
|
+
}
|
|
23942
|
+
stack['delete'](array);
|
|
23943
|
+
stack['delete'](other);
|
|
23944
|
+
return result;
|
|
23945
|
+
}
|
|
23946
|
+
var _equalArrays = equalArrays$2;
|
|
23947
|
+
|
|
23948
|
+
var root$4 = _root;
|
|
23949
|
+
|
|
23950
|
+
/** Built-in value references. */
|
|
23951
|
+
var Uint8Array$1 = root$4.Uint8Array;
|
|
23952
|
+
var _Uint8Array = Uint8Array$1;
|
|
23953
|
+
|
|
23954
|
+
/**
|
|
23955
|
+
* Converts `map` to its key-value pairs.
|
|
23956
|
+
*
|
|
23957
|
+
* @private
|
|
23958
|
+
* @param {Object} map The map to convert.
|
|
23959
|
+
* @returns {Array} Returns the key-value pairs.
|
|
23960
|
+
*/
|
|
23961
|
+
function mapToArray$1(map) {
|
|
23962
|
+
var index = -1,
|
|
23963
|
+
result = Array(map.size);
|
|
23964
|
+
map.forEach(function (value, key) {
|
|
23965
|
+
result[++index] = [key, value];
|
|
23966
|
+
});
|
|
23967
|
+
return result;
|
|
23968
|
+
}
|
|
23969
|
+
var _mapToArray = mapToArray$1;
|
|
23970
|
+
|
|
23971
|
+
/**
|
|
23972
|
+
* Converts `set` to an array of its values.
|
|
23973
|
+
*
|
|
23974
|
+
* @private
|
|
23975
|
+
* @param {Object} set The set to convert.
|
|
23976
|
+
* @returns {Array} Returns the values.
|
|
23977
|
+
*/
|
|
23978
|
+
function setToArray$1(set) {
|
|
23979
|
+
var index = -1,
|
|
23980
|
+
result = Array(set.size);
|
|
23981
|
+
set.forEach(function (value) {
|
|
23982
|
+
result[++index] = value;
|
|
23983
|
+
});
|
|
23984
|
+
return result;
|
|
23985
|
+
}
|
|
23986
|
+
var _setToArray = setToArray$1;
|
|
23987
|
+
|
|
23988
|
+
var Symbol$1 = _Symbol,
|
|
23989
|
+
Uint8Array = _Uint8Array,
|
|
23990
|
+
eq = eq_1,
|
|
23991
|
+
equalArrays$1 = _equalArrays,
|
|
23992
|
+
mapToArray = _mapToArray,
|
|
23993
|
+
setToArray = _setToArray;
|
|
23994
|
+
|
|
23995
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
23996
|
+
var COMPARE_PARTIAL_FLAG$2 = 1,
|
|
23997
|
+
COMPARE_UNORDERED_FLAG = 2;
|
|
23998
|
+
|
|
23999
|
+
/** `Object#toString` result references. */
|
|
24000
|
+
var boolTag$1 = '[object Boolean]',
|
|
24001
|
+
dateTag$1 = '[object Date]',
|
|
24002
|
+
errorTag$1 = '[object Error]',
|
|
24003
|
+
mapTag$2 = '[object Map]',
|
|
24004
|
+
numberTag$2 = '[object Number]',
|
|
24005
|
+
regexpTag$1 = '[object RegExp]',
|
|
24006
|
+
setTag$2 = '[object Set]',
|
|
24007
|
+
stringTag$1 = '[object String]',
|
|
24008
|
+
symbolTag = '[object Symbol]';
|
|
24009
|
+
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
24010
|
+
dataViewTag$2 = '[object DataView]';
|
|
24011
|
+
|
|
24012
|
+
/** Used to convert symbols to primitives and strings. */
|
|
24013
|
+
var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
|
|
24014
|
+
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
24015
|
+
|
|
24016
|
+
/**
|
|
24017
|
+
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
24018
|
+
* the same `toStringTag`.
|
|
24019
|
+
*
|
|
24020
|
+
* **Note:** This function only supports comparing values with tags of
|
|
24021
|
+
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
24022
|
+
*
|
|
24023
|
+
* @private
|
|
24024
|
+
* @param {Object} object The object to compare.
|
|
24025
|
+
* @param {Object} other The other object to compare.
|
|
24026
|
+
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
24027
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
24028
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
24029
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
24030
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
24031
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
24032
|
+
*/
|
|
24033
|
+
function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
24034
|
+
switch (tag) {
|
|
24035
|
+
case dataViewTag$2:
|
|
24036
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
24037
|
+
return false;
|
|
24038
|
+
}
|
|
24039
|
+
object = object.buffer;
|
|
24040
|
+
other = other.buffer;
|
|
24041
|
+
case arrayBufferTag$1:
|
|
24042
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
|
24043
|
+
return false;
|
|
24044
|
+
}
|
|
24045
|
+
return true;
|
|
24046
|
+
case boolTag$1:
|
|
24047
|
+
case dateTag$1:
|
|
24048
|
+
case numberTag$2:
|
|
24049
|
+
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
24050
|
+
// Invalid dates are coerced to `NaN`.
|
|
24051
|
+
return eq(+object, +other);
|
|
24052
|
+
case errorTag$1:
|
|
24053
|
+
return object.name == other.name && object.message == other.message;
|
|
24054
|
+
case regexpTag$1:
|
|
24055
|
+
case stringTag$1:
|
|
24056
|
+
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
24057
|
+
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
24058
|
+
// for more details.
|
|
24059
|
+
return object == other + '';
|
|
24060
|
+
case mapTag$2:
|
|
24061
|
+
var convert = mapToArray;
|
|
24062
|
+
case setTag$2:
|
|
24063
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
|
|
24064
|
+
convert || (convert = setToArray);
|
|
24065
|
+
if (object.size != other.size && !isPartial) {
|
|
24066
|
+
return false;
|
|
24067
|
+
}
|
|
24068
|
+
// Assume cyclic values are equal.
|
|
24069
|
+
var stacked = stack.get(object);
|
|
24070
|
+
if (stacked) {
|
|
24071
|
+
return stacked == other;
|
|
24072
|
+
}
|
|
24073
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
24074
|
+
|
|
24075
|
+
// Recursively compare objects (susceptible to call stack limits).
|
|
24076
|
+
stack.set(object, other);
|
|
24077
|
+
var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
24078
|
+
stack['delete'](object);
|
|
24079
|
+
return result;
|
|
24080
|
+
case symbolTag:
|
|
24081
|
+
if (symbolValueOf) {
|
|
24082
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
24083
|
+
}
|
|
24084
|
+
}
|
|
24085
|
+
return false;
|
|
24086
|
+
}
|
|
24087
|
+
var _equalByTag = equalByTag$1;
|
|
24088
|
+
|
|
24089
|
+
/**
|
|
24090
|
+
* Appends the elements of `values` to `array`.
|
|
24091
|
+
*
|
|
24092
|
+
* @private
|
|
24093
|
+
* @param {Array} array The array to modify.
|
|
24094
|
+
* @param {Array} values The values to append.
|
|
24095
|
+
* @returns {Array} Returns `array`.
|
|
24096
|
+
*/
|
|
24097
|
+
function arrayPush$1(array, values) {
|
|
24098
|
+
var index = -1,
|
|
24099
|
+
length = values.length,
|
|
24100
|
+
offset = array.length;
|
|
24101
|
+
while (++index < length) {
|
|
24102
|
+
array[offset + index] = values[index];
|
|
24103
|
+
}
|
|
24104
|
+
return array;
|
|
24105
|
+
}
|
|
24106
|
+
var _arrayPush = arrayPush$1;
|
|
24107
|
+
|
|
24108
|
+
/**
|
|
24109
|
+
* Checks if `value` is classified as an `Array` object.
|
|
24110
|
+
*
|
|
24111
|
+
* @static
|
|
24112
|
+
* @memberOf _
|
|
24113
|
+
* @since 0.1.0
|
|
24114
|
+
* @category Lang
|
|
24115
|
+
* @param {*} value The value to check.
|
|
24116
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
24117
|
+
* @example
|
|
24118
|
+
*
|
|
24119
|
+
* _.isArray([1, 2, 3]);
|
|
24120
|
+
* // => true
|
|
24121
|
+
*
|
|
24122
|
+
* _.isArray(document.body.children);
|
|
24123
|
+
* // => false
|
|
24124
|
+
*
|
|
24125
|
+
* _.isArray('abc');
|
|
24126
|
+
* // => false
|
|
24127
|
+
*
|
|
24128
|
+
* _.isArray(_.noop);
|
|
24129
|
+
* // => false
|
|
24130
|
+
*/
|
|
24131
|
+
var isArray$3 = Array.isArray;
|
|
24132
|
+
var isArray_1 = isArray$3;
|
|
24133
|
+
|
|
24134
|
+
var arrayPush = _arrayPush,
|
|
24135
|
+
isArray$2 = isArray_1;
|
|
24136
|
+
|
|
24137
|
+
/**
|
|
24138
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
24139
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
24140
|
+
* symbols of `object`.
|
|
24141
|
+
*
|
|
24142
|
+
* @private
|
|
24143
|
+
* @param {Object} object The object to query.
|
|
24144
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
24145
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
24146
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
24147
|
+
*/
|
|
24148
|
+
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
24149
|
+
var result = keysFunc(object);
|
|
24150
|
+
return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
24151
|
+
}
|
|
24152
|
+
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
24153
|
+
|
|
24154
|
+
/**
|
|
24155
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
24156
|
+
* iteratee shorthands.
|
|
24157
|
+
*
|
|
24158
|
+
* @private
|
|
24159
|
+
* @param {Array} [array] The array to iterate over.
|
|
24160
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
24161
|
+
* @returns {Array} Returns the new filtered array.
|
|
24162
|
+
*/
|
|
24163
|
+
function arrayFilter$1(array, predicate) {
|
|
24164
|
+
var index = -1,
|
|
24165
|
+
length = array == null ? 0 : array.length,
|
|
24166
|
+
resIndex = 0,
|
|
24167
|
+
result = [];
|
|
24168
|
+
while (++index < length) {
|
|
24169
|
+
var value = array[index];
|
|
24170
|
+
if (predicate(value, index, array)) {
|
|
24171
|
+
result[resIndex++] = value;
|
|
24172
|
+
}
|
|
24173
|
+
}
|
|
24174
|
+
return result;
|
|
24175
|
+
}
|
|
24176
|
+
var _arrayFilter = arrayFilter$1;
|
|
24177
|
+
|
|
24178
|
+
/**
|
|
24179
|
+
* This method returns a new empty array.
|
|
24180
|
+
*
|
|
24181
|
+
* @static
|
|
24182
|
+
* @memberOf _
|
|
24183
|
+
* @since 4.13.0
|
|
24184
|
+
* @category Util
|
|
24185
|
+
* @returns {Array} Returns the new empty array.
|
|
24186
|
+
* @example
|
|
24187
|
+
*
|
|
24188
|
+
* var arrays = _.times(2, _.stubArray);
|
|
24189
|
+
*
|
|
24190
|
+
* console.log(arrays);
|
|
24191
|
+
* // => [[], []]
|
|
24192
|
+
*
|
|
24193
|
+
* console.log(arrays[0] === arrays[1]);
|
|
24194
|
+
* // => false
|
|
24195
|
+
*/
|
|
24196
|
+
function stubArray$1() {
|
|
24197
|
+
return [];
|
|
24198
|
+
}
|
|
24199
|
+
var stubArray_1 = stubArray$1;
|
|
24200
|
+
|
|
24201
|
+
var arrayFilter = _arrayFilter,
|
|
24202
|
+
stubArray = stubArray_1;
|
|
24203
|
+
|
|
24204
|
+
/** Used for built-in method references. */
|
|
24205
|
+
var objectProto$6 = Object.prototype;
|
|
24206
|
+
|
|
24207
|
+
/** Built-in value references. */
|
|
24208
|
+
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
24209
|
+
|
|
24210
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
24211
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
24212
|
+
|
|
24213
|
+
/**
|
|
24214
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
24215
|
+
*
|
|
24216
|
+
* @private
|
|
24217
|
+
* @param {Object} object The object to query.
|
|
24218
|
+
* @returns {Array} Returns the array of symbols.
|
|
24219
|
+
*/
|
|
24220
|
+
var getSymbols$1 = !nativeGetSymbols ? stubArray : function (object) {
|
|
24221
|
+
if (object == null) {
|
|
24222
|
+
return [];
|
|
24223
|
+
}
|
|
24224
|
+
object = Object(object);
|
|
24225
|
+
return arrayFilter(nativeGetSymbols(object), function (symbol) {
|
|
24226
|
+
return propertyIsEnumerable$1.call(object, symbol);
|
|
24227
|
+
});
|
|
24228
|
+
};
|
|
24229
|
+
var _getSymbols = getSymbols$1;
|
|
24230
|
+
|
|
24231
|
+
/**
|
|
24232
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
24233
|
+
* or max array length checks.
|
|
24234
|
+
*
|
|
24235
|
+
* @private
|
|
24236
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
24237
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
24238
|
+
* @returns {Array} Returns the array of results.
|
|
24239
|
+
*/
|
|
24240
|
+
function baseTimes$1(n, iteratee) {
|
|
24241
|
+
var index = -1,
|
|
24242
|
+
result = Array(n);
|
|
24243
|
+
while (++index < n) {
|
|
24244
|
+
result[index] = iteratee(index);
|
|
24245
|
+
}
|
|
24246
|
+
return result;
|
|
24247
|
+
}
|
|
24248
|
+
var _baseTimes = baseTimes$1;
|
|
24249
|
+
|
|
24250
|
+
/**
|
|
24251
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
24252
|
+
* and has a `typeof` result of "object".
|
|
24253
|
+
*
|
|
24254
|
+
* @static
|
|
24255
|
+
* @memberOf _
|
|
24256
|
+
* @since 4.0.0
|
|
24257
|
+
* @category Lang
|
|
24258
|
+
* @param {*} value The value to check.
|
|
24259
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
24260
|
+
* @example
|
|
24261
|
+
*
|
|
24262
|
+
* _.isObjectLike({});
|
|
24263
|
+
* // => true
|
|
24264
|
+
*
|
|
24265
|
+
* _.isObjectLike([1, 2, 3]);
|
|
24266
|
+
* // => true
|
|
24267
|
+
*
|
|
24268
|
+
* _.isObjectLike(_.noop);
|
|
24269
|
+
* // => false
|
|
24270
|
+
*
|
|
24271
|
+
* _.isObjectLike(null);
|
|
24272
|
+
* // => false
|
|
24273
|
+
*/
|
|
24274
|
+
function isObjectLike$5(value) {
|
|
24275
|
+
return value != null && typeof value == 'object';
|
|
24276
|
+
}
|
|
24277
|
+
var isObjectLike_1 = isObjectLike$5;
|
|
24278
|
+
|
|
24279
|
+
var baseGetTag$3 = _baseGetTag,
|
|
24280
|
+
isObjectLike$4 = isObjectLike_1;
|
|
24281
|
+
|
|
24282
|
+
/** `Object#toString` result references. */
|
|
24283
|
+
var argsTag$2 = '[object Arguments]';
|
|
24284
|
+
|
|
24285
|
+
/**
|
|
24286
|
+
* The base implementation of `_.isArguments`.
|
|
24287
|
+
*
|
|
24288
|
+
* @private
|
|
24289
|
+
* @param {*} value The value to check.
|
|
24290
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
24291
|
+
*/
|
|
24292
|
+
function baseIsArguments$1(value) {
|
|
24293
|
+
return isObjectLike$4(value) && baseGetTag$3(value) == argsTag$2;
|
|
24294
|
+
}
|
|
24295
|
+
var _baseIsArguments = baseIsArguments$1;
|
|
24296
|
+
|
|
24297
|
+
var baseIsArguments = _baseIsArguments,
|
|
24298
|
+
isObjectLike$3 = isObjectLike_1;
|
|
24299
|
+
|
|
24300
|
+
/** Used for built-in method references. */
|
|
24301
|
+
var objectProto$5 = Object.prototype;
|
|
24302
|
+
|
|
24303
|
+
/** Used to check objects for own properties. */
|
|
24304
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
24305
|
+
|
|
24306
|
+
/** Built-in value references. */
|
|
24307
|
+
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
|
|
24308
|
+
|
|
24309
|
+
/**
|
|
24310
|
+
* Checks if `value` is likely an `arguments` object.
|
|
24311
|
+
*
|
|
24312
|
+
* @static
|
|
24313
|
+
* @memberOf _
|
|
24314
|
+
* @since 0.1.0
|
|
24315
|
+
* @category Lang
|
|
24316
|
+
* @param {*} value The value to check.
|
|
24317
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
24318
|
+
* else `false`.
|
|
24319
|
+
* @example
|
|
24320
|
+
*
|
|
24321
|
+
* _.isArguments(function() { return arguments; }());
|
|
24322
|
+
* // => true
|
|
24323
|
+
*
|
|
24324
|
+
* _.isArguments([1, 2, 3]);
|
|
24325
|
+
* // => false
|
|
24326
|
+
*/
|
|
24327
|
+
var isArguments$1 = baseIsArguments(function () {
|
|
24328
|
+
return arguments;
|
|
24329
|
+
}()) ? baseIsArguments : function (value) {
|
|
24330
|
+
return isObjectLike$3(value) && hasOwnProperty$4.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
|
24331
|
+
};
|
|
24332
|
+
var isArguments_1 = isArguments$1;
|
|
24333
|
+
|
|
24334
|
+
var isBuffer$2 = {exports: {}};
|
|
24335
|
+
|
|
24336
|
+
/**
|
|
24337
|
+
* This method returns `false`.
|
|
24338
|
+
*
|
|
24339
|
+
* @static
|
|
24340
|
+
* @memberOf _
|
|
24341
|
+
* @since 4.13.0
|
|
24342
|
+
* @category Util
|
|
24343
|
+
* @returns {boolean} Returns `false`.
|
|
24344
|
+
* @example
|
|
24345
|
+
*
|
|
24346
|
+
* _.times(2, _.stubFalse);
|
|
24347
|
+
* // => [false, false]
|
|
24348
|
+
*/
|
|
24349
|
+
function stubFalse() {
|
|
24350
|
+
return false;
|
|
24351
|
+
}
|
|
24352
|
+
var stubFalse_1 = stubFalse;
|
|
24353
|
+
|
|
24354
|
+
isBuffer$2.exports;
|
|
24355
|
+
(function (module, exports) {
|
|
24356
|
+
var root = _root,
|
|
24357
|
+
stubFalse = stubFalse_1;
|
|
24358
|
+
|
|
24359
|
+
/** Detect free variable `exports`. */
|
|
24360
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
24361
|
+
|
|
24362
|
+
/** Detect free variable `module`. */
|
|
24363
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
24364
|
+
|
|
24365
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
24366
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
24367
|
+
|
|
24368
|
+
/** Built-in value references. */
|
|
24369
|
+
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
24370
|
+
|
|
24371
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
24372
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
24373
|
+
|
|
24374
|
+
/**
|
|
24375
|
+
* Checks if `value` is a buffer.
|
|
24376
|
+
*
|
|
24377
|
+
* @static
|
|
24378
|
+
* @memberOf _
|
|
24379
|
+
* @since 4.3.0
|
|
24380
|
+
* @category Lang
|
|
24381
|
+
* @param {*} value The value to check.
|
|
24382
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
24383
|
+
* @example
|
|
24384
|
+
*
|
|
24385
|
+
* _.isBuffer(new Buffer(2));
|
|
24386
|
+
* // => true
|
|
24387
|
+
*
|
|
24388
|
+
* _.isBuffer(new Uint8Array(2));
|
|
24389
|
+
* // => false
|
|
24390
|
+
*/
|
|
24391
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
24392
|
+
module.exports = isBuffer;
|
|
24393
|
+
})(isBuffer$2, isBuffer$2.exports);
|
|
24394
|
+
var isBufferExports = isBuffer$2.exports;
|
|
24395
|
+
|
|
24396
|
+
/** Used as references for various `Number` constants. */
|
|
24397
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
24398
|
+
|
|
24399
|
+
/** Used to detect unsigned integer values. */
|
|
24400
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
24401
|
+
|
|
24402
|
+
/**
|
|
24403
|
+
* Checks if `value` is a valid array-like index.
|
|
24404
|
+
*
|
|
24405
|
+
* @private
|
|
24406
|
+
* @param {*} value The value to check.
|
|
24407
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
24408
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
24409
|
+
*/
|
|
24410
|
+
function isIndex$1(value, length) {
|
|
24411
|
+
var type = typeof value;
|
|
24412
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
24413
|
+
return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
24414
|
+
}
|
|
24415
|
+
var _isIndex = isIndex$1;
|
|
24416
|
+
|
|
24417
|
+
/** Used as references for various `Number` constants. */
|
|
24418
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
24419
|
+
|
|
24420
|
+
/**
|
|
24421
|
+
* Checks if `value` is a valid array-like length.
|
|
24422
|
+
*
|
|
24423
|
+
* **Note:** This method is loosely based on
|
|
24424
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
24425
|
+
*
|
|
24426
|
+
* @static
|
|
24427
|
+
* @memberOf _
|
|
24428
|
+
* @since 4.0.0
|
|
24429
|
+
* @category Lang
|
|
24430
|
+
* @param {*} value The value to check.
|
|
24431
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
24432
|
+
* @example
|
|
24433
|
+
*
|
|
24434
|
+
* _.isLength(3);
|
|
24435
|
+
* // => true
|
|
24436
|
+
*
|
|
24437
|
+
* _.isLength(Number.MIN_VALUE);
|
|
24438
|
+
* // => false
|
|
24439
|
+
*
|
|
24440
|
+
* _.isLength(Infinity);
|
|
24441
|
+
* // => false
|
|
24442
|
+
*
|
|
24443
|
+
* _.isLength('3');
|
|
24444
|
+
* // => false
|
|
24445
|
+
*/
|
|
24446
|
+
function isLength$2(value) {
|
|
24447
|
+
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
24448
|
+
}
|
|
24449
|
+
var isLength_1 = isLength$2;
|
|
24450
|
+
|
|
24451
|
+
var baseGetTag$2 = _baseGetTag,
|
|
24452
|
+
isLength$1 = isLength_1,
|
|
24453
|
+
isObjectLike$2 = isObjectLike_1;
|
|
24454
|
+
|
|
24455
|
+
/** `Object#toString` result references. */
|
|
24456
|
+
var argsTag$1 = '[object Arguments]',
|
|
24457
|
+
arrayTag$1 = '[object Array]',
|
|
24458
|
+
boolTag = '[object Boolean]',
|
|
24459
|
+
dateTag = '[object Date]',
|
|
24460
|
+
errorTag = '[object Error]',
|
|
24461
|
+
funcTag = '[object Function]',
|
|
24462
|
+
mapTag$1 = '[object Map]',
|
|
24463
|
+
numberTag$1 = '[object Number]',
|
|
24464
|
+
objectTag$2 = '[object Object]',
|
|
24465
|
+
regexpTag = '[object RegExp]',
|
|
24466
|
+
setTag$1 = '[object Set]',
|
|
24467
|
+
stringTag = '[object String]',
|
|
24468
|
+
weakMapTag$1 = '[object WeakMap]';
|
|
24469
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
24470
|
+
dataViewTag$1 = '[object DataView]',
|
|
24471
|
+
float32Tag = '[object Float32Array]',
|
|
24472
|
+
float64Tag = '[object Float64Array]',
|
|
24473
|
+
int8Tag = '[object Int8Array]',
|
|
24474
|
+
int16Tag = '[object Int16Array]',
|
|
24475
|
+
int32Tag = '[object Int32Array]',
|
|
24476
|
+
uint8Tag = '[object Uint8Array]',
|
|
24477
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
24478
|
+
uint16Tag = '[object Uint16Array]',
|
|
24479
|
+
uint32Tag = '[object Uint32Array]';
|
|
24480
|
+
|
|
24481
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
24482
|
+
var typedArrayTags = {};
|
|
24483
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
24484
|
+
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
24485
|
+
|
|
24486
|
+
/**
|
|
24487
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
24488
|
+
*
|
|
24489
|
+
* @private
|
|
24490
|
+
* @param {*} value The value to check.
|
|
24491
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
24492
|
+
*/
|
|
24493
|
+
function baseIsTypedArray$1(value) {
|
|
24494
|
+
return isObjectLike$2(value) && isLength$1(value.length) && !!typedArrayTags[baseGetTag$2(value)];
|
|
24495
|
+
}
|
|
24496
|
+
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
24497
|
+
|
|
24498
|
+
/**
|
|
24499
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
24500
|
+
*
|
|
24501
|
+
* @private
|
|
24502
|
+
* @param {Function} func The function to cap arguments for.
|
|
24503
|
+
* @returns {Function} Returns the new capped function.
|
|
24504
|
+
*/
|
|
24505
|
+
function baseUnary$1(func) {
|
|
24506
|
+
return function (value) {
|
|
24507
|
+
return func(value);
|
|
24508
|
+
};
|
|
24509
|
+
}
|
|
24510
|
+
var _baseUnary = baseUnary$1;
|
|
24511
|
+
|
|
24512
|
+
var _nodeUtil = {exports: {}};
|
|
24513
|
+
|
|
24514
|
+
_nodeUtil.exports;
|
|
24515
|
+
(function (module, exports) {
|
|
24516
|
+
var freeGlobal = _freeGlobal;
|
|
24517
|
+
|
|
24518
|
+
/** Detect free variable `exports`. */
|
|
24519
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
24520
|
+
|
|
24521
|
+
/** Detect free variable `module`. */
|
|
24522
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
24523
|
+
|
|
24524
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
24525
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
24526
|
+
|
|
24527
|
+
/** Detect free variable `process` from Node.js. */
|
|
24528
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
24529
|
+
|
|
24530
|
+
/** Used to access faster Node.js helpers. */
|
|
24531
|
+
var nodeUtil = function () {
|
|
24532
|
+
try {
|
|
24533
|
+
// Use `util.types` for Node.js 10+.
|
|
24534
|
+
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
24535
|
+
if (types) {
|
|
24536
|
+
return types;
|
|
24537
|
+
}
|
|
24538
|
+
|
|
24539
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
24540
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
24541
|
+
} catch (e) {}
|
|
24542
|
+
}();
|
|
24543
|
+
module.exports = nodeUtil;
|
|
24544
|
+
})(_nodeUtil, _nodeUtil.exports);
|
|
24545
|
+
var _nodeUtilExports = _nodeUtil.exports;
|
|
24546
|
+
|
|
24547
|
+
var baseIsTypedArray = _baseIsTypedArray,
|
|
24548
|
+
baseUnary = _baseUnary,
|
|
24549
|
+
nodeUtil = _nodeUtilExports;
|
|
24550
|
+
|
|
24551
|
+
/* Node.js helper references. */
|
|
24552
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
24553
|
+
|
|
24554
|
+
/**
|
|
24555
|
+
* Checks if `value` is classified as a typed array.
|
|
24556
|
+
*
|
|
24557
|
+
* @static
|
|
24558
|
+
* @memberOf _
|
|
24559
|
+
* @since 3.0.0
|
|
24560
|
+
* @category Lang
|
|
24561
|
+
* @param {*} value The value to check.
|
|
24562
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
24563
|
+
* @example
|
|
24564
|
+
*
|
|
24565
|
+
* _.isTypedArray(new Uint8Array);
|
|
24566
|
+
* // => true
|
|
24567
|
+
*
|
|
24568
|
+
* _.isTypedArray([]);
|
|
24569
|
+
* // => false
|
|
24570
|
+
*/
|
|
24571
|
+
var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
24572
|
+
var isTypedArray_1 = isTypedArray$2;
|
|
24573
|
+
|
|
24574
|
+
var baseTimes = _baseTimes,
|
|
24575
|
+
isArguments = isArguments_1,
|
|
24576
|
+
isArray$1 = isArray_1,
|
|
24577
|
+
isBuffer$1 = isBufferExports,
|
|
24578
|
+
isIndex = _isIndex,
|
|
24579
|
+
isTypedArray$1 = isTypedArray_1;
|
|
24580
|
+
|
|
24581
|
+
/** Used for built-in method references. */
|
|
24582
|
+
var objectProto$4 = Object.prototype;
|
|
24583
|
+
|
|
24584
|
+
/** Used to check objects for own properties. */
|
|
24585
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
24586
|
+
|
|
24587
|
+
/**
|
|
24588
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
24589
|
+
*
|
|
24590
|
+
* @private
|
|
24591
|
+
* @param {*} value The value to query.
|
|
24592
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
24593
|
+
* @returns {Array} Returns the array of property names.
|
|
24594
|
+
*/
|
|
24595
|
+
function arrayLikeKeys$1(value, inherited) {
|
|
24596
|
+
var isArr = isArray$1(value),
|
|
24597
|
+
isArg = !isArr && isArguments(value),
|
|
24598
|
+
isBuff = !isArr && !isArg && isBuffer$1(value),
|
|
24599
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
|
|
24600
|
+
skipIndexes = isArr || isArg || isBuff || isType,
|
|
24601
|
+
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
24602
|
+
length = result.length;
|
|
24603
|
+
for (var key in value) {
|
|
24604
|
+
if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && (
|
|
24605
|
+
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
24606
|
+
key == 'length' ||
|
|
24607
|
+
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
24608
|
+
isBuff && (key == 'offset' || key == 'parent') ||
|
|
24609
|
+
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
24610
|
+
isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
|
|
24611
|
+
// Skip index properties.
|
|
24612
|
+
isIndex(key, length)))) {
|
|
24613
|
+
result.push(key);
|
|
24614
|
+
}
|
|
24615
|
+
}
|
|
24616
|
+
return result;
|
|
24617
|
+
}
|
|
24618
|
+
var _arrayLikeKeys = arrayLikeKeys$1;
|
|
24619
|
+
|
|
24620
|
+
/** Used for built-in method references. */
|
|
24621
|
+
var objectProto$3 = Object.prototype;
|
|
24622
|
+
|
|
24623
|
+
/**
|
|
24624
|
+
* Checks if `value` is likely a prototype object.
|
|
24625
|
+
*
|
|
24626
|
+
* @private
|
|
24627
|
+
* @param {*} value The value to check.
|
|
24628
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
24629
|
+
*/
|
|
24630
|
+
function isPrototype$1(value) {
|
|
24631
|
+
var Ctor = value && value.constructor,
|
|
24632
|
+
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$3;
|
|
24633
|
+
return value === proto;
|
|
24634
|
+
}
|
|
24635
|
+
var _isPrototype = isPrototype$1;
|
|
24636
|
+
|
|
24637
|
+
/**
|
|
24638
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
24639
|
+
*
|
|
24640
|
+
* @private
|
|
24641
|
+
* @param {Function} func The function to wrap.
|
|
24642
|
+
* @param {Function} transform The argument transform.
|
|
24643
|
+
* @returns {Function} Returns the new function.
|
|
24644
|
+
*/
|
|
24645
|
+
function overArg$1(func, transform) {
|
|
24646
|
+
return function (arg) {
|
|
24647
|
+
return func(transform(arg));
|
|
24648
|
+
};
|
|
24649
|
+
}
|
|
24650
|
+
var _overArg = overArg$1;
|
|
24651
|
+
|
|
24652
|
+
var overArg = _overArg;
|
|
24653
|
+
|
|
24654
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
24655
|
+
var nativeKeys$1 = overArg(Object.keys, Object);
|
|
24656
|
+
var _nativeKeys = nativeKeys$1;
|
|
24657
|
+
|
|
24658
|
+
var isPrototype = _isPrototype,
|
|
24659
|
+
nativeKeys = _nativeKeys;
|
|
24660
|
+
|
|
24661
|
+
/** Used for built-in method references. */
|
|
24662
|
+
var objectProto$2 = Object.prototype;
|
|
24663
|
+
|
|
24664
|
+
/** Used to check objects for own properties. */
|
|
24665
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
24666
|
+
|
|
24667
|
+
/**
|
|
24668
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
24669
|
+
*
|
|
24670
|
+
* @private
|
|
24671
|
+
* @param {Object} object The object to query.
|
|
24672
|
+
* @returns {Array} Returns the array of property names.
|
|
24673
|
+
*/
|
|
24674
|
+
function baseKeys$1(object) {
|
|
24675
|
+
if (!isPrototype(object)) {
|
|
24676
|
+
return nativeKeys(object);
|
|
24677
|
+
}
|
|
24678
|
+
var result = [];
|
|
24679
|
+
for (var key in Object(object)) {
|
|
24680
|
+
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
24681
|
+
result.push(key);
|
|
24682
|
+
}
|
|
24683
|
+
}
|
|
24684
|
+
return result;
|
|
24685
|
+
}
|
|
24686
|
+
var _baseKeys = baseKeys$1;
|
|
24687
|
+
|
|
24688
|
+
var isFunction = isFunction_1,
|
|
24689
|
+
isLength = isLength_1;
|
|
24690
|
+
|
|
24691
|
+
/**
|
|
24692
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
24693
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
24694
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
24695
|
+
*
|
|
24696
|
+
* @static
|
|
24697
|
+
* @memberOf _
|
|
24698
|
+
* @since 4.0.0
|
|
24699
|
+
* @category Lang
|
|
24700
|
+
* @param {*} value The value to check.
|
|
24701
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
24702
|
+
* @example
|
|
24703
|
+
*
|
|
24704
|
+
* _.isArrayLike([1, 2, 3]);
|
|
24705
|
+
* // => true
|
|
24706
|
+
*
|
|
24707
|
+
* _.isArrayLike(document.body.children);
|
|
24708
|
+
* // => true
|
|
24709
|
+
*
|
|
24710
|
+
* _.isArrayLike('abc');
|
|
24711
|
+
* // => true
|
|
24712
|
+
*
|
|
24713
|
+
* _.isArrayLike(_.noop);
|
|
24714
|
+
* // => false
|
|
24715
|
+
*/
|
|
24716
|
+
function isArrayLike$1(value) {
|
|
24717
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
24718
|
+
}
|
|
24719
|
+
var isArrayLike_1 = isArrayLike$1;
|
|
24720
|
+
|
|
24721
|
+
var arrayLikeKeys = _arrayLikeKeys,
|
|
24722
|
+
baseKeys = _baseKeys,
|
|
24723
|
+
isArrayLike = isArrayLike_1;
|
|
24724
|
+
|
|
24725
|
+
/**
|
|
24726
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
24727
|
+
*
|
|
24728
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
24729
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
24730
|
+
* for more details.
|
|
24731
|
+
*
|
|
24732
|
+
* @static
|
|
24733
|
+
* @since 0.1.0
|
|
24734
|
+
* @memberOf _
|
|
24735
|
+
* @category Object
|
|
24736
|
+
* @param {Object} object The object to query.
|
|
24737
|
+
* @returns {Array} Returns the array of property names.
|
|
24738
|
+
* @example
|
|
24739
|
+
*
|
|
24740
|
+
* function Foo() {
|
|
24741
|
+
* this.a = 1;
|
|
24742
|
+
* this.b = 2;
|
|
24743
|
+
* }
|
|
24744
|
+
*
|
|
24745
|
+
* Foo.prototype.c = 3;
|
|
24746
|
+
*
|
|
24747
|
+
* _.keys(new Foo);
|
|
24748
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
24749
|
+
*
|
|
24750
|
+
* _.keys('hi');
|
|
24751
|
+
* // => ['0', '1']
|
|
24752
|
+
*/
|
|
24753
|
+
function keys$1(object) {
|
|
24754
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
24755
|
+
}
|
|
24756
|
+
var keys_1 = keys$1;
|
|
24757
|
+
|
|
24758
|
+
var baseGetAllKeys = _baseGetAllKeys,
|
|
24759
|
+
getSymbols = _getSymbols,
|
|
24760
|
+
keys = keys_1;
|
|
24761
|
+
|
|
24762
|
+
/**
|
|
24763
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
24764
|
+
*
|
|
24765
|
+
* @private
|
|
24766
|
+
* @param {Object} object The object to query.
|
|
24767
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
24768
|
+
*/
|
|
24769
|
+
function getAllKeys$1(object) {
|
|
24770
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
24771
|
+
}
|
|
24772
|
+
var _getAllKeys = getAllKeys$1;
|
|
24773
|
+
|
|
24774
|
+
var getAllKeys = _getAllKeys;
|
|
24775
|
+
|
|
24776
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
24777
|
+
var COMPARE_PARTIAL_FLAG$1 = 1;
|
|
24778
|
+
|
|
24779
|
+
/** Used for built-in method references. */
|
|
24780
|
+
var objectProto$1 = Object.prototype;
|
|
24781
|
+
|
|
24782
|
+
/** Used to check objects for own properties. */
|
|
24783
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
24784
|
+
|
|
24785
|
+
/**
|
|
24786
|
+
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
24787
|
+
* partial deep comparisons.
|
|
24788
|
+
*
|
|
24789
|
+
* @private
|
|
24790
|
+
* @param {Object} object The object to compare.
|
|
24791
|
+
* @param {Object} other The other object to compare.
|
|
24792
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
24793
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
24794
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
24795
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
24796
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
24797
|
+
*/
|
|
24798
|
+
function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
24799
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
|
|
24800
|
+
objProps = getAllKeys(object),
|
|
24801
|
+
objLength = objProps.length,
|
|
24802
|
+
othProps = getAllKeys(other),
|
|
24803
|
+
othLength = othProps.length;
|
|
24804
|
+
if (objLength != othLength && !isPartial) {
|
|
24805
|
+
return false;
|
|
24806
|
+
}
|
|
24807
|
+
var index = objLength;
|
|
24808
|
+
while (index--) {
|
|
24809
|
+
var key = objProps[index];
|
|
24810
|
+
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
24811
|
+
return false;
|
|
24812
|
+
}
|
|
24813
|
+
}
|
|
24814
|
+
// Check that cyclic values are equal.
|
|
24815
|
+
var objStacked = stack.get(object);
|
|
24816
|
+
var othStacked = stack.get(other);
|
|
24817
|
+
if (objStacked && othStacked) {
|
|
24818
|
+
return objStacked == other && othStacked == object;
|
|
24819
|
+
}
|
|
24820
|
+
var result = true;
|
|
24821
|
+
stack.set(object, other);
|
|
24822
|
+
stack.set(other, object);
|
|
24823
|
+
var skipCtor = isPartial;
|
|
24824
|
+
while (++index < objLength) {
|
|
24825
|
+
key = objProps[index];
|
|
24826
|
+
var objValue = object[key],
|
|
24827
|
+
othValue = other[key];
|
|
24828
|
+
if (customizer) {
|
|
24829
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
24830
|
+
}
|
|
24831
|
+
// Recursively compare objects (susceptible to call stack limits).
|
|
24832
|
+
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
24833
|
+
result = false;
|
|
24834
|
+
break;
|
|
24835
|
+
}
|
|
24836
|
+
skipCtor || (skipCtor = key == 'constructor');
|
|
24837
|
+
}
|
|
24838
|
+
if (result && !skipCtor) {
|
|
24839
|
+
var objCtor = object.constructor,
|
|
24840
|
+
othCtor = other.constructor;
|
|
24841
|
+
|
|
24842
|
+
// Non `Object` object instances with different constructors are not equal.
|
|
24843
|
+
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
24844
|
+
result = false;
|
|
24845
|
+
}
|
|
24846
|
+
}
|
|
24847
|
+
stack['delete'](object);
|
|
24848
|
+
stack['delete'](other);
|
|
24849
|
+
return result;
|
|
24850
|
+
}
|
|
24851
|
+
var _equalObjects = equalObjects$1;
|
|
24852
|
+
|
|
24853
|
+
var getNative$3 = _getNative,
|
|
24854
|
+
root$3 = _root;
|
|
24855
|
+
|
|
24856
|
+
/* Built-in method references that are verified to be native. */
|
|
24857
|
+
var DataView$1 = getNative$3(root$3, 'DataView');
|
|
24858
|
+
var _DataView = DataView$1;
|
|
24859
|
+
|
|
24860
|
+
var getNative$2 = _getNative,
|
|
24861
|
+
root$2 = _root;
|
|
24862
|
+
|
|
24863
|
+
/* Built-in method references that are verified to be native. */
|
|
24864
|
+
var Promise$2 = getNative$2(root$2, 'Promise');
|
|
24865
|
+
var _Promise = Promise$2;
|
|
24866
|
+
|
|
24867
|
+
var getNative$1 = _getNative,
|
|
24868
|
+
root$1 = _root;
|
|
24869
|
+
|
|
24870
|
+
/* Built-in method references that are verified to be native. */
|
|
24871
|
+
var Set$2 = getNative$1(root$1, 'Set');
|
|
24872
|
+
var _Set = Set$2;
|
|
24873
|
+
|
|
24874
|
+
var getNative = _getNative,
|
|
24875
|
+
root = _root;
|
|
24876
|
+
|
|
24877
|
+
/* Built-in method references that are verified to be native. */
|
|
24878
|
+
var WeakMap$2 = getNative(root, 'WeakMap');
|
|
24879
|
+
var _WeakMap = WeakMap$2;
|
|
24880
|
+
|
|
24881
|
+
var DataView = _DataView,
|
|
24882
|
+
Map$1 = _Map,
|
|
24883
|
+
Promise$1 = _Promise,
|
|
24884
|
+
Set$1 = _Set,
|
|
24885
|
+
WeakMap$1 = _WeakMap,
|
|
24886
|
+
baseGetTag$1 = _baseGetTag,
|
|
24887
|
+
toSource = _toSource;
|
|
24888
|
+
|
|
24889
|
+
/** `Object#toString` result references. */
|
|
24890
|
+
var mapTag = '[object Map]',
|
|
24891
|
+
objectTag$1 = '[object Object]',
|
|
24892
|
+
promiseTag = '[object Promise]',
|
|
24893
|
+
setTag = '[object Set]',
|
|
24894
|
+
weakMapTag = '[object WeakMap]';
|
|
24895
|
+
var dataViewTag = '[object DataView]';
|
|
24896
|
+
|
|
24897
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
24898
|
+
var dataViewCtorString = toSource(DataView),
|
|
24899
|
+
mapCtorString = toSource(Map$1),
|
|
24900
|
+
promiseCtorString = toSource(Promise$1),
|
|
24901
|
+
setCtorString = toSource(Set$1),
|
|
24902
|
+
weakMapCtorString = toSource(WeakMap$1);
|
|
24903
|
+
|
|
24904
|
+
/**
|
|
24905
|
+
* Gets the `toStringTag` of `value`.
|
|
24906
|
+
*
|
|
24907
|
+
* @private
|
|
24908
|
+
* @param {*} value The value to query.
|
|
24909
|
+
* @returns {string} Returns the `toStringTag`.
|
|
24910
|
+
*/
|
|
24911
|
+
var getTag$1 = baseGetTag$1;
|
|
24912
|
+
|
|
24913
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
24914
|
+
if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) {
|
|
24915
|
+
getTag$1 = function (value) {
|
|
24916
|
+
var result = baseGetTag$1(value),
|
|
24917
|
+
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
24918
|
+
ctorString = Ctor ? toSource(Ctor) : '';
|
|
24919
|
+
if (ctorString) {
|
|
24920
|
+
switch (ctorString) {
|
|
24921
|
+
case dataViewCtorString:
|
|
24922
|
+
return dataViewTag;
|
|
24923
|
+
case mapCtorString:
|
|
24924
|
+
return mapTag;
|
|
24925
|
+
case promiseCtorString:
|
|
24926
|
+
return promiseTag;
|
|
24927
|
+
case setCtorString:
|
|
24928
|
+
return setTag;
|
|
24929
|
+
case weakMapCtorString:
|
|
24930
|
+
return weakMapTag;
|
|
24931
|
+
}
|
|
24932
|
+
}
|
|
24933
|
+
return result;
|
|
24934
|
+
};
|
|
24935
|
+
}
|
|
24936
|
+
var _getTag = getTag$1;
|
|
24937
|
+
|
|
24938
|
+
var Stack = _Stack,
|
|
24939
|
+
equalArrays = _equalArrays,
|
|
24940
|
+
equalByTag = _equalByTag,
|
|
24941
|
+
equalObjects = _equalObjects,
|
|
24942
|
+
getTag = _getTag,
|
|
24943
|
+
isArray = isArray_1,
|
|
24944
|
+
isBuffer = isBufferExports,
|
|
24945
|
+
isTypedArray = isTypedArray_1;
|
|
24946
|
+
|
|
24947
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
24948
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
24949
|
+
|
|
24950
|
+
/** `Object#toString` result references. */
|
|
24951
|
+
var argsTag = '[object Arguments]',
|
|
24952
|
+
arrayTag = '[object Array]',
|
|
24953
|
+
objectTag = '[object Object]';
|
|
24954
|
+
|
|
24955
|
+
/** Used for built-in method references. */
|
|
24956
|
+
var objectProto = Object.prototype;
|
|
24957
|
+
|
|
24958
|
+
/** Used to check objects for own properties. */
|
|
24959
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
24960
|
+
|
|
24961
|
+
/**
|
|
24962
|
+
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
24963
|
+
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
24964
|
+
* references to be compared.
|
|
24965
|
+
*
|
|
24966
|
+
* @private
|
|
24967
|
+
* @param {Object} object The object to compare.
|
|
24968
|
+
* @param {Object} other The other object to compare.
|
|
24969
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
24970
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
24971
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
24972
|
+
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
24973
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
24974
|
+
*/
|
|
24975
|
+
function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
24976
|
+
var objIsArr = isArray(object),
|
|
24977
|
+
othIsArr = isArray(other),
|
|
24978
|
+
objTag = objIsArr ? arrayTag : getTag(object),
|
|
24979
|
+
othTag = othIsArr ? arrayTag : getTag(other);
|
|
24980
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
24981
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
24982
|
+
var objIsObj = objTag == objectTag,
|
|
24983
|
+
othIsObj = othTag == objectTag,
|
|
24984
|
+
isSameTag = objTag == othTag;
|
|
24985
|
+
if (isSameTag && isBuffer(object)) {
|
|
24986
|
+
if (!isBuffer(other)) {
|
|
24987
|
+
return false;
|
|
24988
|
+
}
|
|
24989
|
+
objIsArr = true;
|
|
24990
|
+
objIsObj = false;
|
|
24991
|
+
}
|
|
24992
|
+
if (isSameTag && !objIsObj) {
|
|
24993
|
+
stack || (stack = new Stack());
|
|
24994
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
24995
|
+
}
|
|
24996
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
24997
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
24998
|
+
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
24999
|
+
if (objIsWrapped || othIsWrapped) {
|
|
25000
|
+
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
25001
|
+
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
25002
|
+
stack || (stack = new Stack());
|
|
25003
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
25004
|
+
}
|
|
25005
|
+
}
|
|
25006
|
+
if (!isSameTag) {
|
|
25007
|
+
return false;
|
|
25008
|
+
}
|
|
25009
|
+
stack || (stack = new Stack());
|
|
25010
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
25011
|
+
}
|
|
25012
|
+
var _baseIsEqualDeep = baseIsEqualDeep$1;
|
|
25013
|
+
|
|
25014
|
+
var baseIsEqualDeep = _baseIsEqualDeep,
|
|
25015
|
+
isObjectLike$1 = isObjectLike_1;
|
|
25016
|
+
|
|
25017
|
+
/**
|
|
25018
|
+
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
25019
|
+
* and tracks traversed objects.
|
|
25020
|
+
*
|
|
25021
|
+
* @private
|
|
25022
|
+
* @param {*} value The value to compare.
|
|
25023
|
+
* @param {*} other The other value to compare.
|
|
25024
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
25025
|
+
* 1 - Unordered comparison
|
|
25026
|
+
* 2 - Partial comparison
|
|
25027
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
25028
|
+
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
25029
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
25030
|
+
*/
|
|
25031
|
+
function baseIsEqual$1(value, other, bitmask, customizer, stack) {
|
|
25032
|
+
if (value === other) {
|
|
25033
|
+
return true;
|
|
25034
|
+
}
|
|
25035
|
+
if (value == null || other == null || !isObjectLike$1(value) && !isObjectLike$1(other)) {
|
|
25036
|
+
return value !== value && other !== other;
|
|
25037
|
+
}
|
|
25038
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack);
|
|
25039
|
+
}
|
|
25040
|
+
var _baseIsEqual = baseIsEqual$1;
|
|
25041
|
+
|
|
25042
|
+
var baseIsEqual = _baseIsEqual;
|
|
25043
|
+
|
|
25044
|
+
/**
|
|
25045
|
+
* Performs a deep comparison between two values to determine if they are
|
|
25046
|
+
* equivalent.
|
|
25047
|
+
*
|
|
25048
|
+
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
25049
|
+
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
25050
|
+
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
25051
|
+
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
25052
|
+
* nodes are compared by strict equality, i.e. `===`.
|
|
25053
|
+
*
|
|
25054
|
+
* @static
|
|
25055
|
+
* @memberOf _
|
|
25056
|
+
* @since 0.1.0
|
|
25057
|
+
* @category Lang
|
|
25058
|
+
* @param {*} value The value to compare.
|
|
25059
|
+
* @param {*} other The other value to compare.
|
|
25060
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
25061
|
+
* @example
|
|
25062
|
+
*
|
|
25063
|
+
* var object = { 'a': 1 };
|
|
25064
|
+
* var other = { 'a': 1 };
|
|
25065
|
+
*
|
|
25066
|
+
* _.isEqual(object, other);
|
|
25067
|
+
* // => true
|
|
25068
|
+
*
|
|
25069
|
+
* object === other;
|
|
25070
|
+
* // => false
|
|
25071
|
+
*/
|
|
25072
|
+
function isEqual(value, other) {
|
|
25073
|
+
return baseIsEqual(value, other);
|
|
25074
|
+
}
|
|
25075
|
+
var isEqual_1 = isEqual;
|
|
25076
|
+
var isEqual$1 = /*@__PURE__*/getDefaultExportFromCjs(isEqual_1);
|
|
25077
|
+
|
|
25078
|
+
var baseGetTag = _baseGetTag,
|
|
25079
|
+
isObjectLike = isObjectLike_1;
|
|
25080
|
+
|
|
25081
|
+
/** `Object#toString` result references. */
|
|
25082
|
+
var numberTag = '[object Number]';
|
|
25083
|
+
|
|
25084
|
+
/**
|
|
25085
|
+
* Checks if `value` is classified as a `Number` primitive or object.
|
|
25086
|
+
*
|
|
25087
|
+
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
|
|
25088
|
+
* classified as numbers, use the `_.isFinite` method.
|
|
25089
|
+
*
|
|
25090
|
+
* @static
|
|
25091
|
+
* @memberOf _
|
|
25092
|
+
* @since 0.1.0
|
|
25093
|
+
* @category Lang
|
|
25094
|
+
* @param {*} value The value to check.
|
|
25095
|
+
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
|
|
25096
|
+
* @example
|
|
25097
|
+
*
|
|
25098
|
+
* _.isNumber(3);
|
|
25099
|
+
* // => true
|
|
25100
|
+
*
|
|
25101
|
+
* _.isNumber(Number.MIN_VALUE);
|
|
25102
|
+
* // => true
|
|
25103
|
+
*
|
|
25104
|
+
* _.isNumber(Infinity);
|
|
25105
|
+
* // => true
|
|
25106
|
+
*
|
|
25107
|
+
* _.isNumber('3');
|
|
25108
|
+
* // => false
|
|
25109
|
+
*/
|
|
25110
|
+
function isNumber(value) {
|
|
25111
|
+
return typeof value == 'number' || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
25112
|
+
}
|
|
25113
|
+
var isNumber_1 = isNumber;
|
|
25114
|
+
var isNumber$1 = /*@__PURE__*/getDefaultExportFromCjs(isNumber_1);
|
|
25115
|
+
|
|
25116
|
+
function translateRowObjToArray(dataSource, columns) {
|
|
25117
|
+
return dataSource.map(item => {
|
|
25118
|
+
return columns.map(column => {
|
|
25119
|
+
return item[column.field];
|
|
25120
|
+
});
|
|
25121
|
+
});
|
|
25122
|
+
}
|
|
25123
|
+
function translateRowArrayToObj(dataSource, columns) {
|
|
25124
|
+
return dataSource.map(item => {
|
|
25125
|
+
return columns.reduce((pre, cur, index) => {
|
|
25126
|
+
pre[cur.field] = item[index];
|
|
25127
|
+
return pre;
|
|
25128
|
+
}, {});
|
|
25129
|
+
});
|
|
25130
|
+
}
|
|
25131
|
+
|
|
25132
|
+
const bigFunc = (a, b, func) => {
|
|
25133
|
+
if (typeof a !== 'number') {
|
|
25134
|
+
a = Number(a);
|
|
25135
|
+
}
|
|
25136
|
+
if (typeof b !== 'number') {
|
|
25137
|
+
b = Number(b);
|
|
25138
|
+
}
|
|
25139
|
+
if (Number.isNaN(a) || Number.isNaN(b)) {
|
|
25140
|
+
throw new Error(`${func}(a, b), a or b is NaN`);
|
|
25141
|
+
}
|
|
25142
|
+
const bigA = new Big(a);
|
|
25143
|
+
return bigA[func](b).toNumber();
|
|
25144
|
+
};
|
|
25145
|
+
const add = (a = 0, b = 0) => bigFunc(a, b, 'plus');
|
|
25146
|
+
const minus = (a = 0, b = 0) => bigFunc(a, b, 'minus');
|
|
25147
|
+
function splitOnLastNumber(str) {
|
|
25148
|
+
const regex = /((\d+)(\.\d+)?)(?!.*(\d+)(\.\d+)?)/;
|
|
25149
|
+
const match = str.match(regex);
|
|
25150
|
+
if (!match || match.index === undefined) {
|
|
25151
|
+
return [str];
|
|
25152
|
+
}
|
|
25153
|
+
const index = match.index;
|
|
25154
|
+
const number = match[0];
|
|
25155
|
+
const prefix = str.slice(0, index);
|
|
25156
|
+
const suffix = str.slice(index + number.length);
|
|
25157
|
+
return [prefix, number, suffix].filter(item => item !== '');
|
|
25158
|
+
}
|
|
25159
|
+
const parseValue = (value) => {
|
|
25160
|
+
if (typeof value === 'number') {
|
|
25161
|
+
return { prefix: '', number: value, full: value };
|
|
25162
|
+
}
|
|
25163
|
+
const match = splitOnLastNumber(value);
|
|
25164
|
+
const numberIndex = match.findIndex(str => {
|
|
25165
|
+
return !isNaN(Number(str)) && str !== '' && !isNaN(parseFloat(str)) && isFinite(Number(str));
|
|
25166
|
+
});
|
|
25167
|
+
if (match.length === 1) {
|
|
25168
|
+
if (numberIndex === 0) {
|
|
25169
|
+
return { prefix: '', number: Number(match[0]), suffix: '', full: value };
|
|
25170
|
+
}
|
|
25171
|
+
return { prefix: value, number: null, suffix: '', full: value };
|
|
25172
|
+
}
|
|
25173
|
+
else if (match.length > 1) {
|
|
25174
|
+
if (numberIndex === 0) {
|
|
25175
|
+
return { prefix: '', number: Number(match[0]), suffix: match[1], full: value };
|
|
25176
|
+
}
|
|
25177
|
+
return { prefix: match[0], number: Number(match[1]), suffix: match?.[2], full: value };
|
|
25178
|
+
}
|
|
25179
|
+
return { prefix: null, number: null, suffix: null, full: value };
|
|
25180
|
+
};
|
|
25181
|
+
const generateAutoFillData = (originalData, columns, startRange, currentEnd) => {
|
|
25182
|
+
if (!originalData || originalData.length < startRange.endRow - 1) {
|
|
25183
|
+
return [];
|
|
25184
|
+
}
|
|
25185
|
+
let newData = [];
|
|
25186
|
+
if (Array.isArray(originalData?.[0])) {
|
|
25187
|
+
newData = originalData.map(row => [...row]);
|
|
25188
|
+
}
|
|
25189
|
+
else if (columns.length && isObject$3(originalData?.[0])) {
|
|
25190
|
+
newData = translateRowObjToArray(originalData, columns);
|
|
25191
|
+
}
|
|
25192
|
+
if (!newData?.length) {
|
|
25193
|
+
return originalData;
|
|
25194
|
+
}
|
|
25195
|
+
const verticalDelta = currentEnd.row - startRange.endRow;
|
|
25196
|
+
const horizontalDelta = currentEnd.col - startRange.endCol;
|
|
25197
|
+
const isVertical = Math.abs(verticalDelta) >= Math.abs(horizontalDelta);
|
|
25198
|
+
const fillSteps = isVertical ? verticalDelta : horizontalDelta;
|
|
25199
|
+
const [sampleStartRow, sampleEndRow] = [startRange.startRow, startRange.endRow].sort((a, b) => a - b);
|
|
25200
|
+
const [sampleStartCol, sampleEndCol] = [startRange.startCol, startRange.endCol].sort((a, b) => a - b);
|
|
25201
|
+
const sampleValues = [];
|
|
25202
|
+
for (let r = sampleStartRow; r <= sampleEndRow; r++) {
|
|
25203
|
+
for (let c = sampleStartCol; c <= sampleEndCol; c++) {
|
|
25204
|
+
sampleValues.push(newData[r][c]);
|
|
25205
|
+
}
|
|
25206
|
+
}
|
|
25207
|
+
const samples = sampleValues.map(parseValue);
|
|
25208
|
+
const validSequence = samples.every(s => s.number !== null) &&
|
|
25209
|
+
samples.slice(1).every((s, i) => s.prefix === samples[i].prefix) &&
|
|
25210
|
+
samples.length < 3 &&
|
|
25211
|
+
!(samples.length === 2 && isEqual$1(samples[0], samples[1]));
|
|
25212
|
+
let step;
|
|
25213
|
+
if (samples.length === 1 && samples[0].number !== null) {
|
|
25214
|
+
step = 1;
|
|
25215
|
+
}
|
|
25216
|
+
else if (validSequence && samples.length > 1) {
|
|
25217
|
+
const numbers = samples.map(s => s.number);
|
|
25218
|
+
step = minus(numbers[numbers.length - 1], numbers[numbers.length - 2]);
|
|
25219
|
+
}
|
|
25220
|
+
const positionInEdges = (curPos) => {
|
|
25221
|
+
if (isVertical && verticalDelta > 0) {
|
|
25222
|
+
return curPos.row <= currentEnd.row;
|
|
25223
|
+
}
|
|
25224
|
+
else if (isVertical && verticalDelta < 0) {
|
|
25225
|
+
return curPos.row >= currentEnd.row;
|
|
25226
|
+
}
|
|
25227
|
+
else if (!isVertical && horizontalDelta > 0) {
|
|
25228
|
+
return curPos.col <= currentEnd.col;
|
|
25229
|
+
}
|
|
25230
|
+
else if (!isVertical && horizontalDelta < 0) {
|
|
25231
|
+
return curPos.col >= currentEnd.col;
|
|
25232
|
+
}
|
|
25233
|
+
return false;
|
|
25234
|
+
};
|
|
25235
|
+
const totalSteps = Math.abs(fillSteps);
|
|
25236
|
+
const direction = fillSteps > 0 ? 1 : -1;
|
|
25237
|
+
const sampLength = samples.length;
|
|
25238
|
+
if (samples.length === 1) {
|
|
25239
|
+
const sample = samples[0];
|
|
25240
|
+
for (let i = 1; i <= totalSteps; i++) {
|
|
25241
|
+
const pos = {
|
|
25242
|
+
row: isVertical ? startRange.endRow + direction * i : startRange.startRow,
|
|
25243
|
+
col: isVertical ? startRange.startCol : startRange.endCol + direction * i
|
|
25244
|
+
};
|
|
25245
|
+
if (pos.row >= 0 && pos.col >= 0 && positionInEdges(pos)) {
|
|
25246
|
+
let tempRes = isNumber$1(sample.number)
|
|
25247
|
+
? `${sample.prefix || ''}${(sample?.number || 0) + (direction > 0 ? i : -i)}${sample.suffix || ''}`
|
|
25248
|
+
: sample.full;
|
|
25249
|
+
if (isNumber$1(sample.full)) {
|
|
25250
|
+
tempRes = (sample?.number || 0) + (direction > 0 ? i : -i);
|
|
25251
|
+
}
|
|
25252
|
+
newData[pos.row][pos.col] = tempRes;
|
|
25253
|
+
}
|
|
25254
|
+
}
|
|
25255
|
+
}
|
|
25256
|
+
else if (samples.length >= 2) {
|
|
25257
|
+
for (let i = 1; i <= totalSteps; i++) {
|
|
25258
|
+
let sample;
|
|
25259
|
+
const pos = { row: 0, col: 0 };
|
|
25260
|
+
if (direction === 1) {
|
|
25261
|
+
pos.row = isVertical ? startRange.endRow + direction * i : startRange.endRow;
|
|
25262
|
+
pos.col = isVertical ? startRange.endCol : startRange.endCol + direction * i;
|
|
25263
|
+
sample = samples[(i - 1) % sampLength];
|
|
25264
|
+
}
|
|
25265
|
+
else {
|
|
25266
|
+
pos.row = isVertical ? startRange.startRow + direction * i : startRange.startRow;
|
|
25267
|
+
pos.col = isVertical ? startRange.startCol : startRange.startCol + direction * i;
|
|
25268
|
+
sample = samples[Math.abs(sampLength - i) % sampLength];
|
|
25269
|
+
}
|
|
25270
|
+
if (pos.row >= 0 && pos.col >= 0 && positionInEdges(pos)) {
|
|
25271
|
+
let tempRes;
|
|
25272
|
+
if (isNumber$1(sample.full) || (Number(sample.full) === Number(sample.number) && sampLength === 2)) {
|
|
25273
|
+
const deltaLength = sampLength + Math.floor((i - 1) / sampLength) * sampLength;
|
|
25274
|
+
tempRes = add(sample?.number || 0, direction > 0 ? (step || 1) * deltaLength : -(step || 1) * deltaLength);
|
|
25275
|
+
}
|
|
25276
|
+
else {
|
|
25277
|
+
tempRes = validSequence
|
|
25278
|
+
? `${sample.prefix || ''}${add(sample?.number || 0, direction > 0 ? (step || 1) * sampLength : -(step || 1) * sampLength)}${sample.suffix || ''}`
|
|
25279
|
+
: isNumber$1(sample?.number)
|
|
25280
|
+
? `${sample.prefix || ''}${add(sample?.number || 0, direction > 0 ? Math.floor((i - 1) / sampLength) + 1 : -(Math.floor((i - 1) / sampLength) + 1))}${sample.suffix || ''}`
|
|
25281
|
+
: sample.full;
|
|
25282
|
+
}
|
|
25283
|
+
newData[pos.row][pos.col] = tempRes;
|
|
25284
|
+
}
|
|
25285
|
+
}
|
|
25286
|
+
}
|
|
25287
|
+
if (Array.isArray(originalData?.[0])) {
|
|
25288
|
+
return newData;
|
|
25289
|
+
}
|
|
25290
|
+
return translateRowArrayToObj(newData, columns);
|
|
25291
|
+
};
|
|
25292
|
+
|
|
25293
|
+
class WpsFillHandlePlugin {
|
|
25294
|
+
id = `wps-fill-handle-${Date.now()}`;
|
|
25295
|
+
name = 'WPS Fill Handle';
|
|
25296
|
+
runTime = [VTable__namespace.TABLE_EVENT_TYPE.MOUSEDOWN_FILL_HANDLE, VTable__namespace.TABLE_EVENT_TYPE.DRAG_FILL_HANDLE_END];
|
|
25297
|
+
table;
|
|
25298
|
+
pluginOptions;
|
|
25299
|
+
beforeDragMinCol = 0;
|
|
25300
|
+
beforeDragMinRow = 0;
|
|
25301
|
+
beforeDragMaxCol = 0;
|
|
25302
|
+
beforeDragMaxRow = 0;
|
|
25303
|
+
constructor(pluginOptions) {
|
|
25304
|
+
this.id = pluginOptions?.id ?? this.id;
|
|
25305
|
+
this.pluginOptions = pluginOptions;
|
|
25306
|
+
}
|
|
25307
|
+
run(...args) {
|
|
25308
|
+
if (args[1] === VTable__namespace.TABLE_EVENT_TYPE.MOUSEDOWN_FILL_HANDLE) {
|
|
25309
|
+
args[0];
|
|
25310
|
+
const table = args[2];
|
|
25311
|
+
this.table = table;
|
|
25312
|
+
const startSelectCellRange = this.table?.getSelectedCellRanges()[0];
|
|
25313
|
+
if (!startSelectCellRange) {
|
|
25314
|
+
return;
|
|
25315
|
+
}
|
|
25316
|
+
this.beforeDragMaxCol = Math.max(startSelectCellRange.start.col, startSelectCellRange.end.col);
|
|
25317
|
+
this.beforeDragMinCol = Math.min(startSelectCellRange.start.col, startSelectCellRange.end.col);
|
|
25318
|
+
this.beforeDragMaxRow = Math.max(startSelectCellRange.start.row, startSelectCellRange.end.row);
|
|
25319
|
+
this.beforeDragMinRow = Math.min(startSelectCellRange.start.row, startSelectCellRange.end.row);
|
|
25320
|
+
}
|
|
25321
|
+
else if (args[1] === VTable__namespace.TABLE_EVENT_TYPE.DRAG_FILL_HANDLE_END) {
|
|
25322
|
+
const direction = args[0].direction;
|
|
25323
|
+
let endChangeCellCol;
|
|
25324
|
+
let endChangeCellRow;
|
|
25325
|
+
const endSelectCellRange = this.table?.getSelectedCellRanges()[0];
|
|
25326
|
+
if (!endSelectCellRange) {
|
|
25327
|
+
return;
|
|
25328
|
+
}
|
|
25329
|
+
if (direction === 'bottom') {
|
|
25330
|
+
endChangeCellCol = this.beforeDragMaxCol;
|
|
25331
|
+
endChangeCellRow = endSelectCellRange.end.row;
|
|
25332
|
+
}
|
|
25333
|
+
else if (direction === 'right') {
|
|
25334
|
+
endChangeCellCol = endSelectCellRange.end.col;
|
|
25335
|
+
endChangeCellRow = this.beforeDragMaxRow;
|
|
25336
|
+
}
|
|
25337
|
+
else if (direction === 'top') {
|
|
25338
|
+
endChangeCellCol = this.beforeDragMaxCol;
|
|
25339
|
+
endChangeCellRow = endSelectCellRange.end.row;
|
|
25340
|
+
}
|
|
25341
|
+
else if (direction === 'left') {
|
|
25342
|
+
endChangeCellCol = endSelectCellRange.end.col;
|
|
25343
|
+
endChangeCellRow = this.beforeDragMaxRow;
|
|
25344
|
+
}
|
|
25345
|
+
const rowDatas = this.table?.records;
|
|
25346
|
+
const tableColumns = this.table?.getAllColumnHeaderCells() || [];
|
|
25347
|
+
let highestColumns = [];
|
|
25348
|
+
if (tableColumns?.length) {
|
|
25349
|
+
highestColumns = tableColumns[tableColumns.length - 1];
|
|
25350
|
+
}
|
|
25351
|
+
const newDatas = generateAutoFillData(rowDatas, highestColumns, {
|
|
25352
|
+
startRow: this.beforeDragMinRow - tableColumns.length,
|
|
25353
|
+
startCol: this.beforeDragMinCol,
|
|
25354
|
+
endRow: this.beforeDragMaxRow - tableColumns.length,
|
|
25355
|
+
endCol: this.beforeDragMaxCol
|
|
25356
|
+
}, {
|
|
25357
|
+
row: endChangeCellRow - tableColumns.length,
|
|
25358
|
+
col: endChangeCellCol
|
|
25359
|
+
});
|
|
25360
|
+
this.table?.setRecords(newDatas);
|
|
25361
|
+
}
|
|
25362
|
+
}
|
|
25363
|
+
handleKeyDown() {
|
|
25364
|
+
if (this.table.editorManager) {
|
|
25365
|
+
const startSelectCellRange = this.table?.getSelectedCellRanges()[0];
|
|
25366
|
+
if (!startSelectCellRange) {
|
|
25367
|
+
return;
|
|
25368
|
+
}
|
|
25369
|
+
this.beforeDragMaxCol = Math.max(startSelectCellRange.start.col, startSelectCellRange.end.col);
|
|
25370
|
+
this.beforeDragMinCol = Math.min(startSelectCellRange.start.col, startSelectCellRange.end.col);
|
|
25371
|
+
this.beforeDragMaxRow = Math.max(startSelectCellRange.start.row, startSelectCellRange.end.row);
|
|
25372
|
+
this.beforeDragMinRow = Math.min(startSelectCellRange.start.row, startSelectCellRange.end.row);
|
|
25373
|
+
}
|
|
25374
|
+
}
|
|
25375
|
+
release() {
|
|
25376
|
+
this.beforeDragMinCol = 0;
|
|
25377
|
+
this.beforeDragMinRow = 0;
|
|
25378
|
+
this.beforeDragMaxCol = 0;
|
|
25379
|
+
this.beforeDragMaxRow = 0;
|
|
25380
|
+
}
|
|
25381
|
+
}
|
|
25382
|
+
|
|
21901
25383
|
exports.AddRowColumnPlugin = AddRowColumnPlugin;
|
|
21902
25384
|
exports.CarouselAnimationPlugin = CarouselAnimationPlugin;
|
|
21903
25385
|
exports.ColumnSeriesPlugin = ColumnSeriesPlugin;
|
|
@@ -21910,6 +25392,7 @@
|
|
|
21910
25392
|
exports.RotateTablePlugin = RotateTablePlugin;
|
|
21911
25393
|
exports.RowSeriesPlugin = RowSeriesPlugin;
|
|
21912
25394
|
exports.TableCarouselAnimationPlugin = TableCarouselAnimationPlugin;
|
|
25395
|
+
exports.WpsFillHandlePlugin = WpsFillHandlePlugin;
|
|
21913
25396
|
exports.cancelTransform = cancelTransform;
|
|
21914
25397
|
exports.rotate90WithTransform = rotate90WithTransform;
|
|
21915
25398
|
|