@hpcc-js/common 2.71.11 → 2.71.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +1793 -984
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +15666 -14857
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +19 -19
- package/src/Utility.ts +10 -4
- package/src/__package__.ts +2 -2
- package/types/FAChar.d.ts +1 -1
- package/types/FAChar.d.ts.map +1 -1
- package/types/Utility.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types-3.4/FAChar.d.ts +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,72 +1,77 @@
|
|
|
1
1
|
import { classID2Meta, hashSum, isArray } from '@hpcc-js/util';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/common";
|
|
4
|
-
var PKG_VERSION = "2.71.
|
|
5
|
-
var BUILD_VERSION = "2.104.
|
|
6
|
-
|
|
7
|
-
/******************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise */
|
|
22
|
-
|
|
23
|
-
var extendStatics = function(d, b) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
var __assign = function() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
function __decorate(decorators, target, key, desc) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function __metadata(metadataKey, metadataValue) {
|
|
57
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function __spreadArray(to, from, pack) {
|
|
61
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
62
|
-
if (ar || !(i in from)) {
|
|
63
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
64
|
-
ar[i] = from[i];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4
|
+
var PKG_VERSION = "2.71.13";
|
|
5
|
+
var BUILD_VERSION = "2.104.32";
|
|
6
|
+
|
|
7
|
+
/******************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
22
|
+
|
|
23
|
+
var extendStatics = function(d, b) {
|
|
24
|
+
extendStatics = Object.setPrototypeOf ||
|
|
25
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
|
+
return extendStatics(d, b);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function __extends(d, b) {
|
|
31
|
+
if (typeof b !== "function" && b !== null)
|
|
32
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
|
+
extendStatics(d, b);
|
|
34
|
+
function __() { this.constructor = d; }
|
|
35
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
var __assign = function() {
|
|
39
|
+
__assign = Object.assign || function __assign(t) {
|
|
40
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
41
|
+
s = arguments[i];
|
|
42
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
return __assign.apply(this, arguments);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
function __decorate(decorators, target, key, desc) {
|
|
50
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
51
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
52
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
53
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
54
|
}
|
|
69
55
|
|
|
56
|
+
function __metadata(metadataKey, metadataValue) {
|
|
57
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function __spreadArray(to, from, pack) {
|
|
61
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
62
|
+
if (ar || !(i in from)) {
|
|
63
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
64
|
+
ar[i] = from[i];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
71
|
+
var e = new Error(message);
|
|
72
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
73
|
+
};
|
|
74
|
+
|
|
70
75
|
var xhtml = "http://www.w3.org/1999/xhtml";
|
|
71
76
|
|
|
72
77
|
var namespaces = {
|
|
@@ -1411,34 +1416,34 @@ function selection_interrupt(name) {
|
|
|
1411
1416
|
});
|
|
1412
1417
|
}
|
|
1413
1418
|
|
|
1414
|
-
function define$
|
|
1419
|
+
function define$3(constructor, factory, prototype) {
|
|
1415
1420
|
constructor.prototype = factory.prototype = prototype;
|
|
1416
1421
|
prototype.constructor = constructor;
|
|
1417
1422
|
}
|
|
1418
1423
|
|
|
1419
|
-
function extend$
|
|
1424
|
+
function extend$3(parent, definition) {
|
|
1420
1425
|
var prototype = Object.create(parent.prototype);
|
|
1421
1426
|
for (var key in definition) prototype[key] = definition[key];
|
|
1422
1427
|
return prototype;
|
|
1423
1428
|
}
|
|
1424
1429
|
|
|
1425
|
-
function Color$
|
|
1430
|
+
function Color$3() {}
|
|
1426
1431
|
|
|
1427
|
-
var darker$
|
|
1428
|
-
var brighter$
|
|
1432
|
+
var darker$3 = 0.7;
|
|
1433
|
+
var brighter$3 = 1 / darker$3;
|
|
1429
1434
|
|
|
1430
|
-
var reI$
|
|
1431
|
-
reN$
|
|
1432
|
-
reP$
|
|
1433
|
-
reHex$
|
|
1434
|
-
reRgbInteger$
|
|
1435
|
-
reRgbPercent$
|
|
1436
|
-
reRgbaInteger$
|
|
1437
|
-
reRgbaPercent$
|
|
1438
|
-
reHslPercent$
|
|
1439
|
-
reHslaPercent$
|
|
1435
|
+
var reI$3 = "\\s*([+-]?\\d+)\\s*",
|
|
1436
|
+
reN$3 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
1437
|
+
reP$3 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
1438
|
+
reHex$3 = /^#([0-9a-f]{3,8})$/,
|
|
1439
|
+
reRgbInteger$3 = new RegExp("^rgb\\(" + [reI$3, reI$3, reI$3] + "\\)$"),
|
|
1440
|
+
reRgbPercent$3 = new RegExp("^rgb\\(" + [reP$3, reP$3, reP$3] + "\\)$"),
|
|
1441
|
+
reRgbaInteger$3 = new RegExp("^rgba\\(" + [reI$3, reI$3, reI$3, reN$3] + "\\)$"),
|
|
1442
|
+
reRgbaPercent$3 = new RegExp("^rgba\\(" + [reP$3, reP$3, reP$3, reN$3] + "\\)$"),
|
|
1443
|
+
reHslPercent$3 = new RegExp("^hsl\\(" + [reN$3, reP$3, reP$3] + "\\)$"),
|
|
1444
|
+
reHslaPercent$3 = new RegExp("^hsla\\(" + [reN$3, reP$3, reP$3, reN$3] + "\\)$");
|
|
1440
1445
|
|
|
1441
|
-
var named$
|
|
1446
|
+
var named$3 = {
|
|
1442
1447
|
aliceblue: 0xf0f8ff,
|
|
1443
1448
|
antiquewhite: 0xfaebd7,
|
|
1444
1449
|
aqua: 0x00ffff,
|
|
@@ -1589,86 +1594,86 @@ var named$1 = {
|
|
|
1589
1594
|
yellowgreen: 0x9acd32
|
|
1590
1595
|
};
|
|
1591
1596
|
|
|
1592
|
-
define$
|
|
1597
|
+
define$3(Color$3, color$3, {
|
|
1593
1598
|
copy: function(channels) {
|
|
1594
1599
|
return Object.assign(new this.constructor, this, channels);
|
|
1595
1600
|
},
|
|
1596
1601
|
displayable: function() {
|
|
1597
1602
|
return this.rgb().displayable();
|
|
1598
1603
|
},
|
|
1599
|
-
hex: color_formatHex$
|
|
1600
|
-
formatHex: color_formatHex$
|
|
1601
|
-
formatHsl: color_formatHsl$
|
|
1602
|
-
formatRgb: color_formatRgb$
|
|
1603
|
-
toString: color_formatRgb$
|
|
1604
|
+
hex: color_formatHex$3, // Deprecated! Use color.formatHex.
|
|
1605
|
+
formatHex: color_formatHex$3,
|
|
1606
|
+
formatHsl: color_formatHsl$3,
|
|
1607
|
+
formatRgb: color_formatRgb$3,
|
|
1608
|
+
toString: color_formatRgb$3
|
|
1604
1609
|
});
|
|
1605
1610
|
|
|
1606
|
-
function color_formatHex$
|
|
1611
|
+
function color_formatHex$3() {
|
|
1607
1612
|
return this.rgb().formatHex();
|
|
1608
1613
|
}
|
|
1609
1614
|
|
|
1610
|
-
function color_formatHsl$
|
|
1611
|
-
return hslConvert$
|
|
1615
|
+
function color_formatHsl$3() {
|
|
1616
|
+
return hslConvert$3(this).formatHsl();
|
|
1612
1617
|
}
|
|
1613
1618
|
|
|
1614
|
-
function color_formatRgb$
|
|
1619
|
+
function color_formatRgb$3() {
|
|
1615
1620
|
return this.rgb().formatRgb();
|
|
1616
1621
|
}
|
|
1617
1622
|
|
|
1618
|
-
function color$
|
|
1623
|
+
function color$3(format) {
|
|
1619
1624
|
var m, l;
|
|
1620
1625
|
format = (format + "").trim().toLowerCase();
|
|
1621
|
-
return (m = reHex$
|
|
1622
|
-
: l === 3 ? new Rgb$
|
|
1623
|
-
: l === 8 ? rgba$
|
|
1624
|
-
: l === 4 ? rgba$
|
|
1626
|
+
return (m = reHex$3.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$3(m) // #ff0000
|
|
1627
|
+
: l === 3 ? new Rgb$3((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
1628
|
+
: l === 8 ? rgba$3(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
1629
|
+
: l === 4 ? rgba$3((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
1625
1630
|
: null) // invalid hex
|
|
1626
|
-
: (m = reRgbInteger$
|
|
1627
|
-
: (m = reRgbPercent$
|
|
1628
|
-
: (m = reRgbaInteger$
|
|
1629
|
-
: (m = reRgbaPercent$
|
|
1630
|
-
: (m = reHslPercent$
|
|
1631
|
-
: (m = reHslaPercent$
|
|
1632
|
-
: named$
|
|
1633
|
-
: format === "transparent" ? new Rgb$
|
|
1631
|
+
: (m = reRgbInteger$3.exec(format)) ? new Rgb$3(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
1632
|
+
: (m = reRgbPercent$3.exec(format)) ? new Rgb$3(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
1633
|
+
: (m = reRgbaInteger$3.exec(format)) ? rgba$3(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
1634
|
+
: (m = reRgbaPercent$3.exec(format)) ? rgba$3(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
1635
|
+
: (m = reHslPercent$3.exec(format)) ? hsla$3(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
1636
|
+
: (m = reHslaPercent$3.exec(format)) ? hsla$3(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
1637
|
+
: named$3.hasOwnProperty(format) ? rgbn$3(named$3[format]) // eslint-disable-line no-prototype-builtins
|
|
1638
|
+
: format === "transparent" ? new Rgb$3(NaN, NaN, NaN, 0)
|
|
1634
1639
|
: null;
|
|
1635
1640
|
}
|
|
1636
1641
|
|
|
1637
|
-
function rgbn$
|
|
1638
|
-
return new Rgb$
|
|
1642
|
+
function rgbn$3(n) {
|
|
1643
|
+
return new Rgb$3(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
1639
1644
|
}
|
|
1640
1645
|
|
|
1641
|
-
function rgba$
|
|
1646
|
+
function rgba$3(r, g, b, a) {
|
|
1642
1647
|
if (a <= 0) r = g = b = NaN;
|
|
1643
|
-
return new Rgb$
|
|
1648
|
+
return new Rgb$3(r, g, b, a);
|
|
1644
1649
|
}
|
|
1645
1650
|
|
|
1646
|
-
function rgbConvert$
|
|
1647
|
-
if (!(o instanceof Color$
|
|
1648
|
-
if (!o) return new Rgb$
|
|
1651
|
+
function rgbConvert$3(o) {
|
|
1652
|
+
if (!(o instanceof Color$3)) o = color$3(o);
|
|
1653
|
+
if (!o) return new Rgb$3;
|
|
1649
1654
|
o = o.rgb();
|
|
1650
|
-
return new Rgb$
|
|
1655
|
+
return new Rgb$3(o.r, o.g, o.b, o.opacity);
|
|
1651
1656
|
}
|
|
1652
1657
|
|
|
1653
|
-
function rgb$
|
|
1654
|
-
return arguments.length === 1 ? rgbConvert$
|
|
1658
|
+
function rgb$3(r, g, b, opacity) {
|
|
1659
|
+
return arguments.length === 1 ? rgbConvert$3(r) : new Rgb$3(r, g, b, opacity == null ? 1 : opacity);
|
|
1655
1660
|
}
|
|
1656
1661
|
|
|
1657
|
-
function Rgb$
|
|
1662
|
+
function Rgb$3(r, g, b, opacity) {
|
|
1658
1663
|
this.r = +r;
|
|
1659
1664
|
this.g = +g;
|
|
1660
1665
|
this.b = +b;
|
|
1661
1666
|
this.opacity = +opacity;
|
|
1662
1667
|
}
|
|
1663
1668
|
|
|
1664
|
-
define$
|
|
1669
|
+
define$3(Rgb$3, rgb$3, extend$3(Color$3, {
|
|
1665
1670
|
brighter: function(k) {
|
|
1666
|
-
k = k == null ? brighter$
|
|
1667
|
-
return new Rgb$
|
|
1671
|
+
k = k == null ? brighter$3 : Math.pow(brighter$3, k);
|
|
1672
|
+
return new Rgb$3(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1668
1673
|
},
|
|
1669
1674
|
darker: function(k) {
|
|
1670
|
-
k = k == null ? darker$
|
|
1671
|
-
return new Rgb$
|
|
1675
|
+
k = k == null ? darker$3 : Math.pow(darker$3, k);
|
|
1676
|
+
return new Rgb$3(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1672
1677
|
},
|
|
1673
1678
|
rgb: function() {
|
|
1674
1679
|
return this;
|
|
@@ -1679,17 +1684,17 @@ define$1(Rgb$1, rgb$1, extend$1(Color$1, {
|
|
|
1679
1684
|
&& (-0.5 <= this.b && this.b < 255.5)
|
|
1680
1685
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
1681
1686
|
},
|
|
1682
|
-
hex: rgb_formatHex$
|
|
1683
|
-
formatHex: rgb_formatHex$
|
|
1684
|
-
formatRgb: rgb_formatRgb$
|
|
1685
|
-
toString: rgb_formatRgb$
|
|
1687
|
+
hex: rgb_formatHex$3, // Deprecated! Use color.formatHex.
|
|
1688
|
+
formatHex: rgb_formatHex$3,
|
|
1689
|
+
formatRgb: rgb_formatRgb$3,
|
|
1690
|
+
toString: rgb_formatRgb$3
|
|
1686
1691
|
}));
|
|
1687
1692
|
|
|
1688
|
-
function rgb_formatHex$
|
|
1689
|
-
return "#" + hex$
|
|
1693
|
+
function rgb_formatHex$3() {
|
|
1694
|
+
return "#" + hex$3(this.r) + hex$3(this.g) + hex$3(this.b);
|
|
1690
1695
|
}
|
|
1691
1696
|
|
|
1692
|
-
function rgb_formatRgb$
|
|
1697
|
+
function rgb_formatRgb$3() {
|
|
1693
1698
|
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
1694
1699
|
return (a === 1 ? "rgb(" : "rgba(")
|
|
1695
1700
|
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
@@ -1698,23 +1703,23 @@ function rgb_formatRgb$1() {
|
|
|
1698
1703
|
+ (a === 1 ? ")" : ", " + a + ")");
|
|
1699
1704
|
}
|
|
1700
1705
|
|
|
1701
|
-
function hex$
|
|
1706
|
+
function hex$3(value) {
|
|
1702
1707
|
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
1703
1708
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
1704
1709
|
}
|
|
1705
1710
|
|
|
1706
|
-
function hsla$
|
|
1711
|
+
function hsla$3(h, s, l, a) {
|
|
1707
1712
|
if (a <= 0) h = s = l = NaN;
|
|
1708
1713
|
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
1709
1714
|
else if (s <= 0) h = NaN;
|
|
1710
|
-
return new Hsl$
|
|
1715
|
+
return new Hsl$3(h, s, l, a);
|
|
1711
1716
|
}
|
|
1712
1717
|
|
|
1713
|
-
function hslConvert$
|
|
1714
|
-
if (o instanceof Hsl$
|
|
1715
|
-
if (!(o instanceof Color$
|
|
1716
|
-
if (!o) return new Hsl$
|
|
1717
|
-
if (o instanceof Hsl$
|
|
1718
|
+
function hslConvert$3(o) {
|
|
1719
|
+
if (o instanceof Hsl$3) return new Hsl$3(o.h, o.s, o.l, o.opacity);
|
|
1720
|
+
if (!(o instanceof Color$3)) o = color$3(o);
|
|
1721
|
+
if (!o) return new Hsl$3;
|
|
1722
|
+
if (o instanceof Hsl$3) return o;
|
|
1718
1723
|
o = o.rgb();
|
|
1719
1724
|
var r = o.r / 255,
|
|
1720
1725
|
g = o.g / 255,
|
|
@@ -1733,28 +1738,28 @@ function hslConvert$1(o) {
|
|
|
1733
1738
|
} else {
|
|
1734
1739
|
s = l > 0 && l < 1 ? 0 : h;
|
|
1735
1740
|
}
|
|
1736
|
-
return new Hsl$
|
|
1741
|
+
return new Hsl$3(h, s, l, o.opacity);
|
|
1737
1742
|
}
|
|
1738
1743
|
|
|
1739
|
-
function hsl$
|
|
1740
|
-
return arguments.length === 1 ? hslConvert$
|
|
1744
|
+
function hsl$5(h, s, l, opacity) {
|
|
1745
|
+
return arguments.length === 1 ? hslConvert$3(h) : new Hsl$3(h, s, l, opacity == null ? 1 : opacity);
|
|
1741
1746
|
}
|
|
1742
1747
|
|
|
1743
|
-
function Hsl$
|
|
1748
|
+
function Hsl$3(h, s, l, opacity) {
|
|
1744
1749
|
this.h = +h;
|
|
1745
1750
|
this.s = +s;
|
|
1746
1751
|
this.l = +l;
|
|
1747
1752
|
this.opacity = +opacity;
|
|
1748
1753
|
}
|
|
1749
1754
|
|
|
1750
|
-
define$
|
|
1755
|
+
define$3(Hsl$3, hsl$5, extend$3(Color$3, {
|
|
1751
1756
|
brighter: function(k) {
|
|
1752
|
-
k = k == null ? brighter$
|
|
1753
|
-
return new Hsl$
|
|
1757
|
+
k = k == null ? brighter$3 : Math.pow(brighter$3, k);
|
|
1758
|
+
return new Hsl$3(this.h, this.s, this.l * k, this.opacity);
|
|
1754
1759
|
},
|
|
1755
1760
|
darker: function(k) {
|
|
1756
|
-
k = k == null ? darker$
|
|
1757
|
-
return new Hsl$
|
|
1761
|
+
k = k == null ? darker$3 : Math.pow(darker$3, k);
|
|
1762
|
+
return new Hsl$3(this.h, this.s, this.l * k, this.opacity);
|
|
1758
1763
|
},
|
|
1759
1764
|
rgb: function() {
|
|
1760
1765
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
@@ -1762,10 +1767,10 @@ define$1(Hsl$1, hsl$3, extend$1(Color$1, {
|
|
|
1762
1767
|
l = this.l,
|
|
1763
1768
|
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
1764
1769
|
m1 = 2 * l - m2;
|
|
1765
|
-
return new Rgb$
|
|
1766
|
-
hsl2rgb$
|
|
1767
|
-
hsl2rgb$
|
|
1768
|
-
hsl2rgb$
|
|
1770
|
+
return new Rgb$3(
|
|
1771
|
+
hsl2rgb$3(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
1772
|
+
hsl2rgb$3(h, m1, m2),
|
|
1773
|
+
hsl2rgb$3(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
1769
1774
|
this.opacity
|
|
1770
1775
|
);
|
|
1771
1776
|
},
|
|
@@ -1785,15 +1790,15 @@ define$1(Hsl$1, hsl$3, extend$1(Color$1, {
|
|
|
1785
1790
|
}));
|
|
1786
1791
|
|
|
1787
1792
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
1788
|
-
function hsl2rgb$
|
|
1793
|
+
function hsl2rgb$3(h, m1, m2) {
|
|
1789
1794
|
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
1790
1795
|
: h < 180 ? m2
|
|
1791
1796
|
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
1792
1797
|
: m1) * 255;
|
|
1793
1798
|
}
|
|
1794
1799
|
|
|
1795
|
-
var deg2rad = Math.PI / 180;
|
|
1796
|
-
var rad2deg = 180 / Math.PI;
|
|
1800
|
+
var deg2rad$2 = Math.PI / 180;
|
|
1801
|
+
var rad2deg$2 = 180 / Math.PI;
|
|
1797
1802
|
|
|
1798
1803
|
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
1799
1804
|
var K$1 = 18,
|
|
@@ -1808,7 +1813,7 @@ var K$1 = 18,
|
|
|
1808
1813
|
function labConvert$1(o) {
|
|
1809
1814
|
if (o instanceof Lab$1) return new Lab$1(o.l, o.a, o.b, o.opacity);
|
|
1810
1815
|
if (o instanceof Hcl$1) return hcl2lab$1(o);
|
|
1811
|
-
if (!(o instanceof Rgb$
|
|
1816
|
+
if (!(o instanceof Rgb$3)) o = rgbConvert$3(o);
|
|
1812
1817
|
var r = rgb2lrgb$1(o.r),
|
|
1813
1818
|
g = rgb2lrgb$1(o.g),
|
|
1814
1819
|
b = rgb2lrgb$1(o.b),
|
|
@@ -1831,7 +1836,7 @@ function Lab$1(l, a, b, opacity) {
|
|
|
1831
1836
|
this.opacity = +opacity;
|
|
1832
1837
|
}
|
|
1833
1838
|
|
|
1834
|
-
define$
|
|
1839
|
+
define$3(Lab$1, lab$2, extend$3(Color$3, {
|
|
1835
1840
|
brighter: function(k) {
|
|
1836
1841
|
return new Lab$1(this.l + K$1 * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
1837
1842
|
},
|
|
@@ -1845,7 +1850,7 @@ define$1(Lab$1, lab$2, extend$1(Color$1, {
|
|
|
1845
1850
|
x = Xn$1 * lab2xyz$1(x);
|
|
1846
1851
|
y = Yn$1 * lab2xyz$1(y);
|
|
1847
1852
|
z = Zn$1 * lab2xyz$1(z);
|
|
1848
|
-
return new Rgb$
|
|
1853
|
+
return new Rgb$3(
|
|
1849
1854
|
lrgb2rgb$1( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
1850
1855
|
lrgb2rgb$1(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
1851
1856
|
lrgb2rgb$1( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
@@ -1874,7 +1879,7 @@ function hclConvert$1(o) {
|
|
|
1874
1879
|
if (o instanceof Hcl$1) return new Hcl$1(o.h, o.c, o.l, o.opacity);
|
|
1875
1880
|
if (!(o instanceof Lab$1)) o = labConvert$1(o);
|
|
1876
1881
|
if (o.a === 0 && o.b === 0) return new Hcl$1(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
1877
|
-
var h = Math.atan2(o.b, o.a) * rad2deg;
|
|
1882
|
+
var h = Math.atan2(o.b, o.a) * rad2deg$2;
|
|
1878
1883
|
return new Hcl$1(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
1879
1884
|
}
|
|
1880
1885
|
|
|
@@ -1891,11 +1896,11 @@ function Hcl$1(h, c, l, opacity) {
|
|
|
1891
1896
|
|
|
1892
1897
|
function hcl2lab$1(o) {
|
|
1893
1898
|
if (isNaN(o.h)) return new Lab$1(o.l, 0, 0, o.opacity);
|
|
1894
|
-
var h = o.h * deg2rad;
|
|
1899
|
+
var h = o.h * deg2rad$2;
|
|
1895
1900
|
return new Lab$1(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
1896
1901
|
}
|
|
1897
1902
|
|
|
1898
|
-
define$
|
|
1903
|
+
define$3(Hcl$1, hcl$3, extend$3(Color$3, {
|
|
1899
1904
|
brighter: function(k) {
|
|
1900
1905
|
return new Hcl$1(this.h, this.c, this.l + K$1 * (k == null ? 1 : k), this.opacity);
|
|
1901
1906
|
},
|
|
@@ -1907,59 +1912,59 @@ define$1(Hcl$1, hcl$3, extend$1(Color$1, {
|
|
|
1907
1912
|
}
|
|
1908
1913
|
}));
|
|
1909
1914
|
|
|
1910
|
-
var A$
|
|
1911
|
-
B$
|
|
1912
|
-
C$
|
|
1913
|
-
D$
|
|
1914
|
-
E$
|
|
1915
|
-
ED$
|
|
1916
|
-
EB$
|
|
1917
|
-
BC_DA$
|
|
1918
|
-
|
|
1919
|
-
function cubehelixConvert$
|
|
1920
|
-
if (o instanceof Cubehelix$
|
|
1921
|
-
if (!(o instanceof Rgb$
|
|
1915
|
+
var A$2 = -0.14861,
|
|
1916
|
+
B$2 = +1.78277,
|
|
1917
|
+
C$2 = -0.29227,
|
|
1918
|
+
D$2 = -0.90649,
|
|
1919
|
+
E$2 = +1.97294,
|
|
1920
|
+
ED$2 = E$2 * D$2,
|
|
1921
|
+
EB$2 = E$2 * B$2,
|
|
1922
|
+
BC_DA$2 = B$2 * C$2 - D$2 * A$2;
|
|
1923
|
+
|
|
1924
|
+
function cubehelixConvert$2(o) {
|
|
1925
|
+
if (o instanceof Cubehelix$2) return new Cubehelix$2(o.h, o.s, o.l, o.opacity);
|
|
1926
|
+
if (!(o instanceof Rgb$3)) o = rgbConvert$3(o);
|
|
1922
1927
|
var r = o.r / 255,
|
|
1923
1928
|
g = o.g / 255,
|
|
1924
1929
|
b = o.b / 255,
|
|
1925
|
-
l = (BC_DA$
|
|
1930
|
+
l = (BC_DA$2 * b + ED$2 * r - EB$2 * g) / (BC_DA$2 + ED$2 - EB$2),
|
|
1926
1931
|
bl = b - l,
|
|
1927
|
-
k = (E$
|
|
1928
|
-
s = Math.sqrt(k * k + bl * bl) / (E$
|
|
1929
|
-
h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;
|
|
1930
|
-
return new Cubehelix$
|
|
1932
|
+
k = (E$2 * (g - l) - C$2 * bl) / D$2,
|
|
1933
|
+
s = Math.sqrt(k * k + bl * bl) / (E$2 * l * (1 - l)), // NaN if l=0 or l=1
|
|
1934
|
+
h = s ? Math.atan2(k, bl) * rad2deg$2 - 120 : NaN;
|
|
1935
|
+
return new Cubehelix$2(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
1931
1936
|
}
|
|
1932
1937
|
|
|
1933
|
-
function cubehelix$
|
|
1934
|
-
return arguments.length === 1 ? cubehelixConvert$
|
|
1938
|
+
function cubehelix$5(h, s, l, opacity) {
|
|
1939
|
+
return arguments.length === 1 ? cubehelixConvert$2(h) : new Cubehelix$2(h, s, l, opacity == null ? 1 : opacity);
|
|
1935
1940
|
}
|
|
1936
1941
|
|
|
1937
|
-
function Cubehelix$
|
|
1942
|
+
function Cubehelix$2(h, s, l, opacity) {
|
|
1938
1943
|
this.h = +h;
|
|
1939
1944
|
this.s = +s;
|
|
1940
1945
|
this.l = +l;
|
|
1941
1946
|
this.opacity = +opacity;
|
|
1942
1947
|
}
|
|
1943
1948
|
|
|
1944
|
-
define$
|
|
1949
|
+
define$3(Cubehelix$2, cubehelix$5, extend$3(Color$3, {
|
|
1945
1950
|
brighter: function(k) {
|
|
1946
|
-
k = k == null ? brighter$
|
|
1947
|
-
return new Cubehelix$
|
|
1951
|
+
k = k == null ? brighter$3 : Math.pow(brighter$3, k);
|
|
1952
|
+
return new Cubehelix$2(this.h, this.s, this.l * k, this.opacity);
|
|
1948
1953
|
},
|
|
1949
1954
|
darker: function(k) {
|
|
1950
|
-
k = k == null ? darker$
|
|
1951
|
-
return new Cubehelix$
|
|
1955
|
+
k = k == null ? darker$3 : Math.pow(darker$3, k);
|
|
1956
|
+
return new Cubehelix$2(this.h, this.s, this.l * k, this.opacity);
|
|
1952
1957
|
},
|
|
1953
1958
|
rgb: function() {
|
|
1954
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,
|
|
1959
|
+
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad$2,
|
|
1955
1960
|
l = +this.l,
|
|
1956
1961
|
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
1957
1962
|
cosh = Math.cos(h),
|
|
1958
1963
|
sinh = Math.sin(h);
|
|
1959
|
-
return new Rgb$
|
|
1960
|
-
255 * (l + a * (A$
|
|
1961
|
-
255 * (l + a * (C$
|
|
1962
|
-
255 * (l + a * (E$
|
|
1964
|
+
return new Rgb$3(
|
|
1965
|
+
255 * (l + a * (A$2 * cosh + B$2 * sinh)),
|
|
1966
|
+
255 * (l + a * (C$2 * cosh + D$2 * sinh)),
|
|
1967
|
+
255 * (l + a * (E$2 * cosh)),
|
|
1963
1968
|
this.opacity
|
|
1964
1969
|
);
|
|
1965
1970
|
}
|
|
@@ -2035,7 +2040,7 @@ var interpolateRgb = (function rgbGamma(y) {
|
|
|
2035
2040
|
var color = gamma(y);
|
|
2036
2041
|
|
|
2037
2042
|
function rgb(start, end) {
|
|
2038
|
-
var r = color((start = rgb$
|
|
2043
|
+
var r = color((start = rgb$3(start)).r, (end = rgb$3(end)).r),
|
|
2039
2044
|
g = color(start.g, end.g),
|
|
2040
2045
|
b = color(start.b, end.b),
|
|
2041
2046
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2061,7 +2066,7 @@ function rgbSpline(spline) {
|
|
|
2061
2066
|
b = new Array(n),
|
|
2062
2067
|
i, color;
|
|
2063
2068
|
for (i = 0; i < n; ++i) {
|
|
2064
|
-
color = rgb$
|
|
2069
|
+
color = rgb$3(colors[i]);
|
|
2065
2070
|
r[i] = color.r || 0;
|
|
2066
2071
|
g[i] = color.g || 0;
|
|
2067
2072
|
b[i] = color.b || 0;
|
|
@@ -2219,8 +2224,8 @@ function interpolate$1(a, b) {
|
|
|
2219
2224
|
var t = typeof b, c;
|
|
2220
2225
|
return b == null || t === "boolean" ? constant$5(b)
|
|
2221
2226
|
: (t === "number" ? reinterpolate$1
|
|
2222
|
-
: t === "string" ? ((c = color$
|
|
2223
|
-
: b instanceof color$
|
|
2227
|
+
: t === "string" ? ((c = color$3(b)) ? (b = c, interpolateRgb) : interpolateString)
|
|
2228
|
+
: b instanceof color$3 ? interpolateRgb
|
|
2224
2229
|
: b instanceof Date ? date$1
|
|
2225
2230
|
: isNumberArray(b) ? numberArray
|
|
2226
2231
|
: Array.isArray(b) ? genericArray
|
|
@@ -2249,7 +2254,7 @@ function interpolateRound(a, b) {
|
|
|
2249
2254
|
};
|
|
2250
2255
|
}
|
|
2251
2256
|
|
|
2252
|
-
var degrees
|
|
2257
|
+
var degrees = 180 / Math.PI;
|
|
2253
2258
|
|
|
2254
2259
|
var identity$4 = {
|
|
2255
2260
|
translateX: 0,
|
|
@@ -2269,8 +2274,8 @@ function decompose(a, b, c, d, e, f) {
|
|
|
2269
2274
|
return {
|
|
2270
2275
|
translateX: e,
|
|
2271
2276
|
translateY: f,
|
|
2272
|
-
rotate: Math.atan2(b, a) * degrees
|
|
2273
|
-
skewX: Math.atan(skewX) * degrees
|
|
2277
|
+
rotate: Math.atan2(b, a) * degrees,
|
|
2278
|
+
skewX: Math.atan(skewX) * degrees,
|
|
2274
2279
|
scaleX: scaleX,
|
|
2275
2280
|
scaleY: scaleY
|
|
2276
2281
|
};
|
|
@@ -2426,9 +2431,9 @@ function interpolateZoom(p0, p1) {
|
|
|
2426
2431
|
return i;
|
|
2427
2432
|
}
|
|
2428
2433
|
|
|
2429
|
-
function hsl$
|
|
2434
|
+
function hsl$3(hue) {
|
|
2430
2435
|
return function(start, end) {
|
|
2431
|
-
var h = hue((start = hsl$
|
|
2436
|
+
var h = hue((start = hsl$5(start)).h, (end = hsl$5(end)).h),
|
|
2432
2437
|
s = nogamma(start.s, end.s),
|
|
2433
2438
|
l = nogamma(start.l, end.l),
|
|
2434
2439
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2442,8 +2447,8 @@ function hsl$1(hue) {
|
|
|
2442
2447
|
}
|
|
2443
2448
|
}
|
|
2444
2449
|
|
|
2445
|
-
var hsl$
|
|
2446
|
-
var hslLong = hsl$
|
|
2450
|
+
var hsl$4 = hsl$3(hue$1);
|
|
2451
|
+
var hslLong = hsl$3(nogamma);
|
|
2447
2452
|
|
|
2448
2453
|
function lab$1(start, end) {
|
|
2449
2454
|
var l = nogamma((start = lab$2(start)).l, (end = lab$2(end)).l),
|
|
@@ -2478,12 +2483,12 @@ function hcl$1(hue) {
|
|
|
2478
2483
|
var hcl$2 = hcl$1(hue$1);
|
|
2479
2484
|
var hclLong = hcl$1(nogamma);
|
|
2480
2485
|
|
|
2481
|
-
function cubehelix$
|
|
2486
|
+
function cubehelix$3(hue) {
|
|
2482
2487
|
return (function cubehelixGamma(y) {
|
|
2483
2488
|
y = +y;
|
|
2484
2489
|
|
|
2485
2490
|
function cubehelix(start, end) {
|
|
2486
|
-
var h = hue((start = cubehelix$
|
|
2491
|
+
var h = hue((start = cubehelix$5(start)).h, (end = cubehelix$5(end)).h),
|
|
2487
2492
|
s = nogamma(start.s, end.s),
|
|
2488
2493
|
l = nogamma(start.l, end.l),
|
|
2489
2494
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2502,8 +2507,8 @@ function cubehelix$2(hue) {
|
|
|
2502
2507
|
})(1);
|
|
2503
2508
|
}
|
|
2504
2509
|
|
|
2505
|
-
var cubehelix$
|
|
2506
|
-
var cubehelixLong = cubehelix$
|
|
2510
|
+
var cubehelix$4 = cubehelix$3(hue$1);
|
|
2511
|
+
var cubehelixLong = cubehelix$3(nogamma);
|
|
2507
2512
|
|
|
2508
2513
|
function piecewise(interpolate, values) {
|
|
2509
2514
|
var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
|
|
@@ -2600,729 +2605,1110 @@ function tweenValue(transition, name, value) {
|
|
|
2600
2605
|
};
|
|
2601
2606
|
}
|
|
2602
2607
|
|
|
2603
|
-
function
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
: b instanceof color$1 ? interpolateRgb
|
|
2607
|
-
: (c = color$1(b)) ? (b = c, interpolateRgb)
|
|
2608
|
-
: interpolateString)(a, b);
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
function attrRemove(name) {
|
|
2612
|
-
return function() {
|
|
2613
|
-
this.removeAttribute(name);
|
|
2614
|
-
};
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
function attrRemoveNS(fullname) {
|
|
2618
|
-
return function() {
|
|
2619
|
-
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2620
|
-
};
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
function attrConstant(name, interpolate, value1) {
|
|
2624
|
-
var string00,
|
|
2625
|
-
string1 = value1 + "",
|
|
2626
|
-
interpolate0;
|
|
2627
|
-
return function() {
|
|
2628
|
-
var string0 = this.getAttribute(name);
|
|
2629
|
-
return string0 === string1 ? null
|
|
2630
|
-
: string0 === string00 ? interpolate0
|
|
2631
|
-
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2632
|
-
};
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
function attrConstantNS(fullname, interpolate, value1) {
|
|
2636
|
-
var string00,
|
|
2637
|
-
string1 = value1 + "",
|
|
2638
|
-
interpolate0;
|
|
2639
|
-
return function() {
|
|
2640
|
-
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2641
|
-
return string0 === string1 ? null
|
|
2642
|
-
: string0 === string00 ? interpolate0
|
|
2643
|
-
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2644
|
-
};
|
|
2645
|
-
}
|
|
2646
|
-
|
|
2647
|
-
function attrFunction(name, interpolate, value) {
|
|
2648
|
-
var string00,
|
|
2649
|
-
string10,
|
|
2650
|
-
interpolate0;
|
|
2651
|
-
return function() {
|
|
2652
|
-
var string0, value1 = value(this), string1;
|
|
2653
|
-
if (value1 == null) return void this.removeAttribute(name);
|
|
2654
|
-
string0 = this.getAttribute(name);
|
|
2655
|
-
string1 = value1 + "";
|
|
2656
|
-
return string0 === string1 ? null
|
|
2657
|
-
: string0 === string00 && string1 === string10 ? interpolate0
|
|
2658
|
-
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2659
|
-
};
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
function attrFunctionNS(fullname, interpolate, value) {
|
|
2663
|
-
var string00,
|
|
2664
|
-
string10,
|
|
2665
|
-
interpolate0;
|
|
2666
|
-
return function() {
|
|
2667
|
-
var string0, value1 = value(this), string1;
|
|
2668
|
-
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
2669
|
-
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2670
|
-
string1 = value1 + "";
|
|
2671
|
-
return string0 === string1 ? null
|
|
2672
|
-
: string0 === string00 && string1 === string10 ? interpolate0
|
|
2673
|
-
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2674
|
-
};
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
function transition_attr(name, value) {
|
|
2678
|
-
var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate;
|
|
2679
|
-
return this.attrTween(name, typeof value === "function"
|
|
2680
|
-
? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value))
|
|
2681
|
-
: value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
|
|
2682
|
-
: (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
function attrInterpolate(name, i) {
|
|
2686
|
-
return function(t) {
|
|
2687
|
-
this.setAttribute(name, i.call(this, t));
|
|
2688
|
-
};
|
|
2608
|
+
function define$2(constructor, factory, prototype) {
|
|
2609
|
+
constructor.prototype = factory.prototype = prototype;
|
|
2610
|
+
prototype.constructor = constructor;
|
|
2689
2611
|
}
|
|
2690
2612
|
|
|
2691
|
-
function
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2613
|
+
function extend$2(parent, definition) {
|
|
2614
|
+
var prototype = Object.create(parent.prototype);
|
|
2615
|
+
for (var key in definition) prototype[key] = definition[key];
|
|
2616
|
+
return prototype;
|
|
2695
2617
|
}
|
|
2696
2618
|
|
|
2697
|
-
function
|
|
2698
|
-
var t0, i0;
|
|
2699
|
-
function tween() {
|
|
2700
|
-
var i = value.apply(this, arguments);
|
|
2701
|
-
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
2702
|
-
return t0;
|
|
2703
|
-
}
|
|
2704
|
-
tween._value = value;
|
|
2705
|
-
return tween;
|
|
2706
|
-
}
|
|
2619
|
+
function Color$2() {}
|
|
2707
2620
|
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
function tween() {
|
|
2711
|
-
var i = value.apply(this, arguments);
|
|
2712
|
-
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
2713
|
-
return t0;
|
|
2714
|
-
}
|
|
2715
|
-
tween._value = value;
|
|
2716
|
-
return tween;
|
|
2717
|
-
}
|
|
2621
|
+
var darker$2 = 0.7;
|
|
2622
|
+
var brighter$2 = 1 / darker$2;
|
|
2718
2623
|
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2624
|
+
var reI$2 = "\\s*([+-]?\\d+)\\s*",
|
|
2625
|
+
reN$2 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
2626
|
+
reP$2 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
2627
|
+
reHex$2 = /^#([0-9a-f]{3,8})$/,
|
|
2628
|
+
reRgbInteger$2 = new RegExp("^rgb\\(" + [reI$2, reI$2, reI$2] + "\\)$"),
|
|
2629
|
+
reRgbPercent$2 = new RegExp("^rgb\\(" + [reP$2, reP$2, reP$2] + "\\)$"),
|
|
2630
|
+
reRgbaInteger$2 = new RegExp("^rgba\\(" + [reI$2, reI$2, reI$2, reN$2] + "\\)$"),
|
|
2631
|
+
reRgbaPercent$2 = new RegExp("^rgba\\(" + [reP$2, reP$2, reP$2, reN$2] + "\\)$"),
|
|
2632
|
+
reHslPercent$2 = new RegExp("^hsl\\(" + [reN$2, reP$2, reP$2] + "\\)$"),
|
|
2633
|
+
reHslaPercent$2 = new RegExp("^hsla\\(" + [reN$2, reP$2, reP$2, reN$2] + "\\)$");
|
|
2727
2634
|
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2635
|
+
var named$2 = {
|
|
2636
|
+
aliceblue: 0xf0f8ff,
|
|
2637
|
+
antiquewhite: 0xfaebd7,
|
|
2638
|
+
aqua: 0x00ffff,
|
|
2639
|
+
aquamarine: 0x7fffd4,
|
|
2640
|
+
azure: 0xf0ffff,
|
|
2641
|
+
beige: 0xf5f5dc,
|
|
2642
|
+
bisque: 0xffe4c4,
|
|
2643
|
+
black: 0x000000,
|
|
2644
|
+
blanchedalmond: 0xffebcd,
|
|
2645
|
+
blue: 0x0000ff,
|
|
2646
|
+
blueviolet: 0x8a2be2,
|
|
2647
|
+
brown: 0xa52a2a,
|
|
2648
|
+
burlywood: 0xdeb887,
|
|
2649
|
+
cadetblue: 0x5f9ea0,
|
|
2650
|
+
chartreuse: 0x7fff00,
|
|
2651
|
+
chocolate: 0xd2691e,
|
|
2652
|
+
coral: 0xff7f50,
|
|
2653
|
+
cornflowerblue: 0x6495ed,
|
|
2654
|
+
cornsilk: 0xfff8dc,
|
|
2655
|
+
crimson: 0xdc143c,
|
|
2656
|
+
cyan: 0x00ffff,
|
|
2657
|
+
darkblue: 0x00008b,
|
|
2658
|
+
darkcyan: 0x008b8b,
|
|
2659
|
+
darkgoldenrod: 0xb8860b,
|
|
2660
|
+
darkgray: 0xa9a9a9,
|
|
2661
|
+
darkgreen: 0x006400,
|
|
2662
|
+
darkgrey: 0xa9a9a9,
|
|
2663
|
+
darkkhaki: 0xbdb76b,
|
|
2664
|
+
darkmagenta: 0x8b008b,
|
|
2665
|
+
darkolivegreen: 0x556b2f,
|
|
2666
|
+
darkorange: 0xff8c00,
|
|
2667
|
+
darkorchid: 0x9932cc,
|
|
2668
|
+
darkred: 0x8b0000,
|
|
2669
|
+
darksalmon: 0xe9967a,
|
|
2670
|
+
darkseagreen: 0x8fbc8f,
|
|
2671
|
+
darkslateblue: 0x483d8b,
|
|
2672
|
+
darkslategray: 0x2f4f4f,
|
|
2673
|
+
darkslategrey: 0x2f4f4f,
|
|
2674
|
+
darkturquoise: 0x00ced1,
|
|
2675
|
+
darkviolet: 0x9400d3,
|
|
2676
|
+
deeppink: 0xff1493,
|
|
2677
|
+
deepskyblue: 0x00bfff,
|
|
2678
|
+
dimgray: 0x696969,
|
|
2679
|
+
dimgrey: 0x696969,
|
|
2680
|
+
dodgerblue: 0x1e90ff,
|
|
2681
|
+
firebrick: 0xb22222,
|
|
2682
|
+
floralwhite: 0xfffaf0,
|
|
2683
|
+
forestgreen: 0x228b22,
|
|
2684
|
+
fuchsia: 0xff00ff,
|
|
2685
|
+
gainsboro: 0xdcdcdc,
|
|
2686
|
+
ghostwhite: 0xf8f8ff,
|
|
2687
|
+
gold: 0xffd700,
|
|
2688
|
+
goldenrod: 0xdaa520,
|
|
2689
|
+
gray: 0x808080,
|
|
2690
|
+
green: 0x008000,
|
|
2691
|
+
greenyellow: 0xadff2f,
|
|
2692
|
+
grey: 0x808080,
|
|
2693
|
+
honeydew: 0xf0fff0,
|
|
2694
|
+
hotpink: 0xff69b4,
|
|
2695
|
+
indianred: 0xcd5c5c,
|
|
2696
|
+
indigo: 0x4b0082,
|
|
2697
|
+
ivory: 0xfffff0,
|
|
2698
|
+
khaki: 0xf0e68c,
|
|
2699
|
+
lavender: 0xe6e6fa,
|
|
2700
|
+
lavenderblush: 0xfff0f5,
|
|
2701
|
+
lawngreen: 0x7cfc00,
|
|
2702
|
+
lemonchiffon: 0xfffacd,
|
|
2703
|
+
lightblue: 0xadd8e6,
|
|
2704
|
+
lightcoral: 0xf08080,
|
|
2705
|
+
lightcyan: 0xe0ffff,
|
|
2706
|
+
lightgoldenrodyellow: 0xfafad2,
|
|
2707
|
+
lightgray: 0xd3d3d3,
|
|
2708
|
+
lightgreen: 0x90ee90,
|
|
2709
|
+
lightgrey: 0xd3d3d3,
|
|
2710
|
+
lightpink: 0xffb6c1,
|
|
2711
|
+
lightsalmon: 0xffa07a,
|
|
2712
|
+
lightseagreen: 0x20b2aa,
|
|
2713
|
+
lightskyblue: 0x87cefa,
|
|
2714
|
+
lightslategray: 0x778899,
|
|
2715
|
+
lightslategrey: 0x778899,
|
|
2716
|
+
lightsteelblue: 0xb0c4de,
|
|
2717
|
+
lightyellow: 0xffffe0,
|
|
2718
|
+
lime: 0x00ff00,
|
|
2719
|
+
limegreen: 0x32cd32,
|
|
2720
|
+
linen: 0xfaf0e6,
|
|
2721
|
+
magenta: 0xff00ff,
|
|
2722
|
+
maroon: 0x800000,
|
|
2723
|
+
mediumaquamarine: 0x66cdaa,
|
|
2724
|
+
mediumblue: 0x0000cd,
|
|
2725
|
+
mediumorchid: 0xba55d3,
|
|
2726
|
+
mediumpurple: 0x9370db,
|
|
2727
|
+
mediumseagreen: 0x3cb371,
|
|
2728
|
+
mediumslateblue: 0x7b68ee,
|
|
2729
|
+
mediumspringgreen: 0x00fa9a,
|
|
2730
|
+
mediumturquoise: 0x48d1cc,
|
|
2731
|
+
mediumvioletred: 0xc71585,
|
|
2732
|
+
midnightblue: 0x191970,
|
|
2733
|
+
mintcream: 0xf5fffa,
|
|
2734
|
+
mistyrose: 0xffe4e1,
|
|
2735
|
+
moccasin: 0xffe4b5,
|
|
2736
|
+
navajowhite: 0xffdead,
|
|
2737
|
+
navy: 0x000080,
|
|
2738
|
+
oldlace: 0xfdf5e6,
|
|
2739
|
+
olive: 0x808000,
|
|
2740
|
+
olivedrab: 0x6b8e23,
|
|
2741
|
+
orange: 0xffa500,
|
|
2742
|
+
orangered: 0xff4500,
|
|
2743
|
+
orchid: 0xda70d6,
|
|
2744
|
+
palegoldenrod: 0xeee8aa,
|
|
2745
|
+
palegreen: 0x98fb98,
|
|
2746
|
+
paleturquoise: 0xafeeee,
|
|
2747
|
+
palevioletred: 0xdb7093,
|
|
2748
|
+
papayawhip: 0xffefd5,
|
|
2749
|
+
peachpuff: 0xffdab9,
|
|
2750
|
+
peru: 0xcd853f,
|
|
2751
|
+
pink: 0xffc0cb,
|
|
2752
|
+
plum: 0xdda0dd,
|
|
2753
|
+
powderblue: 0xb0e0e6,
|
|
2754
|
+
purple: 0x800080,
|
|
2755
|
+
rebeccapurple: 0x663399,
|
|
2756
|
+
red: 0xff0000,
|
|
2757
|
+
rosybrown: 0xbc8f8f,
|
|
2758
|
+
royalblue: 0x4169e1,
|
|
2759
|
+
saddlebrown: 0x8b4513,
|
|
2760
|
+
salmon: 0xfa8072,
|
|
2761
|
+
sandybrown: 0xf4a460,
|
|
2762
|
+
seagreen: 0x2e8b57,
|
|
2763
|
+
seashell: 0xfff5ee,
|
|
2764
|
+
sienna: 0xa0522d,
|
|
2765
|
+
silver: 0xc0c0c0,
|
|
2766
|
+
skyblue: 0x87ceeb,
|
|
2767
|
+
slateblue: 0x6a5acd,
|
|
2768
|
+
slategray: 0x708090,
|
|
2769
|
+
slategrey: 0x708090,
|
|
2770
|
+
snow: 0xfffafa,
|
|
2771
|
+
springgreen: 0x00ff7f,
|
|
2772
|
+
steelblue: 0x4682b4,
|
|
2773
|
+
tan: 0xd2b48c,
|
|
2774
|
+
teal: 0x008080,
|
|
2775
|
+
thistle: 0xd8bfd8,
|
|
2776
|
+
tomato: 0xff6347,
|
|
2777
|
+
turquoise: 0x40e0d0,
|
|
2778
|
+
violet: 0xee82ee,
|
|
2779
|
+
wheat: 0xf5deb3,
|
|
2780
|
+
white: 0xffffff,
|
|
2781
|
+
whitesmoke: 0xf5f5f5,
|
|
2782
|
+
yellow: 0xffff00,
|
|
2783
|
+
yellowgreen: 0x9acd32
|
|
2784
|
+
};
|
|
2733
2785
|
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2786
|
+
define$2(Color$2, color$2, {
|
|
2787
|
+
copy: function(channels) {
|
|
2788
|
+
return Object.assign(new this.constructor, this, channels);
|
|
2789
|
+
},
|
|
2790
|
+
displayable: function() {
|
|
2791
|
+
return this.rgb().displayable();
|
|
2792
|
+
},
|
|
2793
|
+
hex: color_formatHex$2, // Deprecated! Use color.formatHex.
|
|
2794
|
+
formatHex: color_formatHex$2,
|
|
2795
|
+
formatHsl: color_formatHsl$2,
|
|
2796
|
+
formatRgb: color_formatRgb$2,
|
|
2797
|
+
toString: color_formatRgb$2
|
|
2798
|
+
});
|
|
2739
2799
|
|
|
2740
|
-
function
|
|
2741
|
-
|
|
2800
|
+
function color_formatHex$2() {
|
|
2801
|
+
return this.rgb().formatHex();
|
|
2802
|
+
}
|
|
2742
2803
|
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
? delayFunction
|
|
2746
|
-
: delayConstant)(id, value))
|
|
2747
|
-
: get(this.node(), id).delay;
|
|
2804
|
+
function color_formatHsl$2() {
|
|
2805
|
+
return hslConvert$2(this).formatHsl();
|
|
2748
2806
|
}
|
|
2749
2807
|
|
|
2750
|
-
function
|
|
2751
|
-
return
|
|
2752
|
-
set$1(this, id).duration = +value.apply(this, arguments);
|
|
2753
|
-
};
|
|
2808
|
+
function color_formatRgb$2() {
|
|
2809
|
+
return this.rgb().formatRgb();
|
|
2754
2810
|
}
|
|
2755
2811
|
|
|
2756
|
-
function
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2812
|
+
function color$2(format) {
|
|
2813
|
+
var m, l;
|
|
2814
|
+
format = (format + "").trim().toLowerCase();
|
|
2815
|
+
return (m = reHex$2.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$2(m) // #ff0000
|
|
2816
|
+
: l === 3 ? new Rgb$2((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
2817
|
+
: l === 8 ? rgba$2(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
2818
|
+
: l === 4 ? rgba$2((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
2819
|
+
: null) // invalid hex
|
|
2820
|
+
: (m = reRgbInteger$2.exec(format)) ? new Rgb$2(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
2821
|
+
: (m = reRgbPercent$2.exec(format)) ? new Rgb$2(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
2822
|
+
: (m = reRgbaInteger$2.exec(format)) ? rgba$2(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
2823
|
+
: (m = reRgbaPercent$2.exec(format)) ? rgba$2(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
2824
|
+
: (m = reHslPercent$2.exec(format)) ? hsla$2(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
2825
|
+
: (m = reHslaPercent$2.exec(format)) ? hsla$2(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
2826
|
+
: named$2.hasOwnProperty(format) ? rgbn$2(named$2[format]) // eslint-disable-line no-prototype-builtins
|
|
2827
|
+
: format === "transparent" ? new Rgb$2(NaN, NaN, NaN, 0)
|
|
2828
|
+
: null;
|
|
2760
2829
|
}
|
|
2761
2830
|
|
|
2762
|
-
function
|
|
2763
|
-
|
|
2831
|
+
function rgbn$2(n) {
|
|
2832
|
+
return new Rgb$2(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
2833
|
+
}
|
|
2764
2834
|
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
: durationConstant)(id, value))
|
|
2769
|
-
: get(this.node(), id).duration;
|
|
2835
|
+
function rgba$2(r, g, b, a) {
|
|
2836
|
+
if (a <= 0) r = g = b = NaN;
|
|
2837
|
+
return new Rgb$2(r, g, b, a);
|
|
2770
2838
|
}
|
|
2771
2839
|
|
|
2772
|
-
function
|
|
2773
|
-
if (
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2840
|
+
function rgbConvert$2(o) {
|
|
2841
|
+
if (!(o instanceof Color$2)) o = color$2(o);
|
|
2842
|
+
if (!o) return new Rgb$2;
|
|
2843
|
+
o = o.rgb();
|
|
2844
|
+
return new Rgb$2(o.r, o.g, o.b, o.opacity);
|
|
2777
2845
|
}
|
|
2778
2846
|
|
|
2779
|
-
function
|
|
2780
|
-
|
|
2847
|
+
function rgb$2(r, g, b, opacity) {
|
|
2848
|
+
return arguments.length === 1 ? rgbConvert$2(r) : new Rgb$2(r, g, b, opacity == null ? 1 : opacity);
|
|
2849
|
+
}
|
|
2781
2850
|
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2851
|
+
function Rgb$2(r, g, b, opacity) {
|
|
2852
|
+
this.r = +r;
|
|
2853
|
+
this.g = +g;
|
|
2854
|
+
this.b = +b;
|
|
2855
|
+
this.opacity = +opacity;
|
|
2785
2856
|
}
|
|
2786
2857
|
|
|
2787
|
-
|
|
2788
|
-
|
|
2858
|
+
define$2(Rgb$2, rgb$2, extend$2(Color$2, {
|
|
2859
|
+
brighter: function(k) {
|
|
2860
|
+
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
|
2861
|
+
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2862
|
+
},
|
|
2863
|
+
darker: function(k) {
|
|
2864
|
+
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
|
2865
|
+
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2866
|
+
},
|
|
2867
|
+
rgb: function() {
|
|
2868
|
+
return this;
|
|
2869
|
+
},
|
|
2870
|
+
displayable: function() {
|
|
2871
|
+
return (-0.5 <= this.r && this.r < 255.5)
|
|
2872
|
+
&& (-0.5 <= this.g && this.g < 255.5)
|
|
2873
|
+
&& (-0.5 <= this.b && this.b < 255.5)
|
|
2874
|
+
&& (0 <= this.opacity && this.opacity <= 1);
|
|
2875
|
+
},
|
|
2876
|
+
hex: rgb_formatHex$2, // Deprecated! Use color.formatHex.
|
|
2877
|
+
formatHex: rgb_formatHex$2,
|
|
2878
|
+
formatRgb: rgb_formatRgb$2,
|
|
2879
|
+
toString: rgb_formatRgb$2
|
|
2880
|
+
}));
|
|
2789
2881
|
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
subgroup.push(node);
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2882
|
+
function rgb_formatHex$2() {
|
|
2883
|
+
return "#" + hex$2(this.r) + hex$2(this.g) + hex$2(this.b);
|
|
2884
|
+
}
|
|
2797
2885
|
|
|
2798
|
-
|
|
2886
|
+
function rgb_formatRgb$2() {
|
|
2887
|
+
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2888
|
+
return (a === 1 ? "rgb(" : "rgba(")
|
|
2889
|
+
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
2890
|
+
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
2891
|
+
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
2892
|
+
+ (a === 1 ? ")" : ", " + a + ")");
|
|
2799
2893
|
}
|
|
2800
2894
|
|
|
2801
|
-
function
|
|
2802
|
-
|
|
2895
|
+
function hex$2(value) {
|
|
2896
|
+
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
2897
|
+
return (value < 16 ? "0" : "") + value.toString(16);
|
|
2898
|
+
}
|
|
2803
2899
|
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
}
|
|
2900
|
+
function hsla$2(h, s, l, a) {
|
|
2901
|
+
if (a <= 0) h = s = l = NaN;
|
|
2902
|
+
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
2903
|
+
else if (s <= 0) h = NaN;
|
|
2904
|
+
return new Hsl$2(h, s, l, a);
|
|
2905
|
+
}
|
|
2811
2906
|
|
|
2812
|
-
|
|
2813
|
-
|
|
2907
|
+
function hslConvert$2(o) {
|
|
2908
|
+
if (o instanceof Hsl$2) return new Hsl$2(o.h, o.s, o.l, o.opacity);
|
|
2909
|
+
if (!(o instanceof Color$2)) o = color$2(o);
|
|
2910
|
+
if (!o) return new Hsl$2;
|
|
2911
|
+
if (o instanceof Hsl$2) return o;
|
|
2912
|
+
o = o.rgb();
|
|
2913
|
+
var r = o.r / 255,
|
|
2914
|
+
g = o.g / 255,
|
|
2915
|
+
b = o.b / 255,
|
|
2916
|
+
min = Math.min(r, g, b),
|
|
2917
|
+
max = Math.max(r, g, b),
|
|
2918
|
+
h = NaN,
|
|
2919
|
+
s = max - min,
|
|
2920
|
+
l = (max + min) / 2;
|
|
2921
|
+
if (s) {
|
|
2922
|
+
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
2923
|
+
else if (g === max) h = (b - r) / s + 2;
|
|
2924
|
+
else h = (r - g) / s + 4;
|
|
2925
|
+
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
2926
|
+
h *= 60;
|
|
2927
|
+
} else {
|
|
2928
|
+
s = l > 0 && l < 1 ? 0 : h;
|
|
2814
2929
|
}
|
|
2815
|
-
|
|
2816
|
-
return new Transition$1(merges, this._parents, this._name, this._id);
|
|
2930
|
+
return new Hsl$2(h, s, l, o.opacity);
|
|
2817
2931
|
}
|
|
2818
2932
|
|
|
2819
|
-
function
|
|
2820
|
-
return
|
|
2821
|
-
var i = t.indexOf(".");
|
|
2822
|
-
if (i >= 0) t = t.slice(0, i);
|
|
2823
|
-
return !t || t === "start";
|
|
2824
|
-
});
|
|
2933
|
+
function hsl$2(h, s, l, opacity) {
|
|
2934
|
+
return arguments.length === 1 ? hslConvert$2(h) : new Hsl$2(h, s, l, opacity == null ? 1 : opacity);
|
|
2825
2935
|
}
|
|
2826
2936
|
|
|
2827
|
-
function
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2937
|
+
function Hsl$2(h, s, l, opacity) {
|
|
2938
|
+
this.h = +h;
|
|
2939
|
+
this.s = +s;
|
|
2940
|
+
this.l = +l;
|
|
2941
|
+
this.opacity = +opacity;
|
|
2942
|
+
}
|
|
2832
2943
|
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2944
|
+
define$2(Hsl$2, hsl$2, extend$2(Color$2, {
|
|
2945
|
+
brighter: function(k) {
|
|
2946
|
+
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
|
2947
|
+
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
|
2948
|
+
},
|
|
2949
|
+
darker: function(k) {
|
|
2950
|
+
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
|
2951
|
+
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
|
2952
|
+
},
|
|
2953
|
+
rgb: function() {
|
|
2954
|
+
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2955
|
+
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2956
|
+
l = this.l,
|
|
2957
|
+
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
2958
|
+
m1 = 2 * l - m2;
|
|
2959
|
+
return new Rgb$2(
|
|
2960
|
+
hsl2rgb$2(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
2961
|
+
hsl2rgb$2(h, m1, m2),
|
|
2962
|
+
hsl2rgb$2(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
2963
|
+
this.opacity
|
|
2964
|
+
);
|
|
2965
|
+
},
|
|
2966
|
+
displayable: function() {
|
|
2967
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
2968
|
+
&& (0 <= this.l && this.l <= 1)
|
|
2969
|
+
&& (0 <= this.opacity && this.opacity <= 1);
|
|
2970
|
+
},
|
|
2971
|
+
formatHsl: function() {
|
|
2972
|
+
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2973
|
+
return (a === 1 ? "hsl(" : "hsla(")
|
|
2974
|
+
+ (this.h || 0) + ", "
|
|
2975
|
+
+ (this.s || 0) * 100 + "%, "
|
|
2976
|
+
+ (this.l || 0) * 100 + "%"
|
|
2977
|
+
+ (a === 1 ? ")" : ", " + a + ")");
|
|
2978
|
+
}
|
|
2979
|
+
}));
|
|
2837
2980
|
|
|
2838
|
-
|
|
2839
|
-
|
|
2981
|
+
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2982
|
+
function hsl2rgb$2(h, m1, m2) {
|
|
2983
|
+
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
2984
|
+
: h < 180 ? m2
|
|
2985
|
+
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
2986
|
+
: m1) * 255;
|
|
2840
2987
|
}
|
|
2841
2988
|
|
|
2842
|
-
function
|
|
2843
|
-
var
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
:
|
|
2989
|
+
function interpolate(a, b) {
|
|
2990
|
+
var c;
|
|
2991
|
+
return (typeof b === "number" ? reinterpolate$1
|
|
2992
|
+
: b instanceof color$2 ? interpolateRgb
|
|
2993
|
+
: (c = color$2(b)) ? (b = c, interpolateRgb)
|
|
2994
|
+
: interpolateString)(a, b);
|
|
2848
2995
|
}
|
|
2849
2996
|
|
|
2850
|
-
function
|
|
2997
|
+
function attrRemove(name) {
|
|
2851
2998
|
return function() {
|
|
2852
|
-
|
|
2853
|
-
for (var i in this.__transition) if (+i !== id) return;
|
|
2854
|
-
if (parent) parent.removeChild(this);
|
|
2999
|
+
this.removeAttribute(name);
|
|
2855
3000
|
};
|
|
2856
3001
|
}
|
|
2857
3002
|
|
|
2858
|
-
function
|
|
2859
|
-
return
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
function transition_select(select) {
|
|
2863
|
-
var name = this._name,
|
|
2864
|
-
id = this._id;
|
|
2865
|
-
|
|
2866
|
-
if (typeof select !== "function") select = selector(select);
|
|
2867
|
-
|
|
2868
|
-
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
2869
|
-
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
2870
|
-
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
2871
|
-
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
2872
|
-
subgroup[i] = subnode;
|
|
2873
|
-
schedule(subgroup[i], name, id, i, subgroup, get(node, id));
|
|
2874
|
-
}
|
|
2875
|
-
}
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
return new Transition$1(subgroups, this._parents, name, id);
|
|
2879
|
-
}
|
|
2880
|
-
|
|
2881
|
-
function transition_selectAll(select) {
|
|
2882
|
-
var name = this._name,
|
|
2883
|
-
id = this._id;
|
|
2884
|
-
|
|
2885
|
-
if (typeof select !== "function") select = selectorAll(select);
|
|
2886
|
-
|
|
2887
|
-
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
2888
|
-
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
2889
|
-
if (node = group[i]) {
|
|
2890
|
-
for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {
|
|
2891
|
-
if (child = children[k]) {
|
|
2892
|
-
schedule(child, name, id, k, children, inherit);
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
subgroups.push(children);
|
|
2896
|
-
parents.push(node);
|
|
2897
|
-
}
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
|
|
2901
|
-
return new Transition$1(subgroups, parents, name, id);
|
|
2902
|
-
}
|
|
2903
|
-
|
|
2904
|
-
var Selection$1 = selection.prototype.constructor;
|
|
2905
|
-
|
|
2906
|
-
function transition_selection() {
|
|
2907
|
-
return new Selection$1(this._groups, this._parents);
|
|
3003
|
+
function attrRemoveNS(fullname) {
|
|
3004
|
+
return function() {
|
|
3005
|
+
this.removeAttributeNS(fullname.space, fullname.local);
|
|
3006
|
+
};
|
|
2908
3007
|
}
|
|
2909
3008
|
|
|
2910
|
-
function
|
|
3009
|
+
function attrConstant(name, interpolate, value1) {
|
|
2911
3010
|
var string00,
|
|
2912
|
-
|
|
3011
|
+
string1 = value1 + "",
|
|
2913
3012
|
interpolate0;
|
|
2914
3013
|
return function() {
|
|
2915
|
-
var string0 =
|
|
2916
|
-
string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3014
|
+
var string0 = this.getAttribute(name);
|
|
2917
3015
|
return string0 === string1 ? null
|
|
2918
|
-
: string0 === string00
|
|
2919
|
-
: interpolate0 = interpolate(string00 = string0,
|
|
2920
|
-
};
|
|
2921
|
-
}
|
|
2922
|
-
|
|
2923
|
-
function styleRemove(name) {
|
|
2924
|
-
return function() {
|
|
2925
|
-
this.style.removeProperty(name);
|
|
3016
|
+
: string0 === string00 ? interpolate0
|
|
3017
|
+
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2926
3018
|
};
|
|
2927
3019
|
}
|
|
2928
3020
|
|
|
2929
|
-
function
|
|
3021
|
+
function attrConstantNS(fullname, interpolate, value1) {
|
|
2930
3022
|
var string00,
|
|
2931
3023
|
string1 = value1 + "",
|
|
2932
3024
|
interpolate0;
|
|
2933
3025
|
return function() {
|
|
2934
|
-
var string0 =
|
|
3026
|
+
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2935
3027
|
return string0 === string1 ? null
|
|
2936
3028
|
: string0 === string00 ? interpolate0
|
|
2937
3029
|
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2938
3030
|
};
|
|
2939
3031
|
}
|
|
2940
3032
|
|
|
2941
|
-
function
|
|
3033
|
+
function attrFunction(name, interpolate, value) {
|
|
2942
3034
|
var string00,
|
|
2943
3035
|
string10,
|
|
2944
3036
|
interpolate0;
|
|
2945
3037
|
return function() {
|
|
2946
|
-
var string0 =
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
3038
|
+
var string0, value1 = value(this), string1;
|
|
3039
|
+
if (value1 == null) return void this.removeAttribute(name);
|
|
3040
|
+
string0 = this.getAttribute(name);
|
|
3041
|
+
string1 = value1 + "";
|
|
2950
3042
|
return string0 === string1 ? null
|
|
2951
3043
|
: string0 === string00 && string1 === string10 ? interpolate0
|
|
2952
3044
|
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2953
3045
|
};
|
|
2954
3046
|
}
|
|
2955
3047
|
|
|
2956
|
-
function
|
|
2957
|
-
var
|
|
3048
|
+
function attrFunctionNS(fullname, interpolate, value) {
|
|
3049
|
+
var string00,
|
|
3050
|
+
string10,
|
|
3051
|
+
interpolate0;
|
|
2958
3052
|
return function() {
|
|
2959
|
-
var
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
2967
|
-
|
|
2968
|
-
schedule.on = on1;
|
|
3053
|
+
var string0, value1 = value(this), string1;
|
|
3054
|
+
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
3055
|
+
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
3056
|
+
string1 = value1 + "";
|
|
3057
|
+
return string0 === string1 ? null
|
|
3058
|
+
: string0 === string00 && string1 === string10 ? interpolate0
|
|
3059
|
+
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2969
3060
|
};
|
|
2970
3061
|
}
|
|
2971
3062
|
|
|
2972
|
-
function
|
|
2973
|
-
var
|
|
2974
|
-
return
|
|
2975
|
-
.
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value)))
|
|
2979
|
-
.each(styleMaybeRemove(this._id, name))
|
|
2980
|
-
: this
|
|
2981
|
-
.styleTween(name, styleConstant(name, i, value), priority)
|
|
2982
|
-
.on("end.style." + name, null);
|
|
3063
|
+
function transition_attr(name, value) {
|
|
3064
|
+
var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate;
|
|
3065
|
+
return this.attrTween(name, typeof value === "function"
|
|
3066
|
+
? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value))
|
|
3067
|
+
: value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
|
|
3068
|
+
: (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
|
|
2983
3069
|
}
|
|
2984
3070
|
|
|
2985
|
-
function
|
|
3071
|
+
function attrInterpolate(name, i) {
|
|
2986
3072
|
return function(t) {
|
|
2987
|
-
this.
|
|
3073
|
+
this.setAttribute(name, i.call(this, t));
|
|
2988
3074
|
};
|
|
2989
3075
|
}
|
|
2990
3076
|
|
|
2991
|
-
function
|
|
2992
|
-
|
|
3077
|
+
function attrInterpolateNS(fullname, i) {
|
|
3078
|
+
return function(t) {
|
|
3079
|
+
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
3080
|
+
};
|
|
3081
|
+
}
|
|
3082
|
+
|
|
3083
|
+
function attrTweenNS(fullname, value) {
|
|
3084
|
+
var t0, i0;
|
|
2993
3085
|
function tween() {
|
|
2994
3086
|
var i = value.apply(this, arguments);
|
|
2995
|
-
if (i !== i0)
|
|
2996
|
-
return
|
|
3087
|
+
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
3088
|
+
return t0;
|
|
2997
3089
|
}
|
|
2998
3090
|
tween._value = value;
|
|
2999
3091
|
return tween;
|
|
3000
3092
|
}
|
|
3001
3093
|
|
|
3002
|
-
function
|
|
3003
|
-
var
|
|
3094
|
+
function attrTween(name, value) {
|
|
3095
|
+
var t0, i0;
|
|
3096
|
+
function tween() {
|
|
3097
|
+
var i = value.apply(this, arguments);
|
|
3098
|
+
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
3099
|
+
return t0;
|
|
3100
|
+
}
|
|
3101
|
+
tween._value = value;
|
|
3102
|
+
return tween;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
function transition_attrTween(name, value) {
|
|
3106
|
+
var key = "attr." + name;
|
|
3004
3107
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
3005
3108
|
if (value == null) return this.tween(key, null);
|
|
3006
3109
|
if (typeof value !== "function") throw new Error;
|
|
3007
|
-
|
|
3110
|
+
var fullname = namespace(name);
|
|
3111
|
+
return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
|
|
3008
3112
|
}
|
|
3009
3113
|
|
|
3010
|
-
function
|
|
3114
|
+
function delayFunction(id, value) {
|
|
3011
3115
|
return function() {
|
|
3012
|
-
this.
|
|
3116
|
+
init(this, id).delay = +value.apply(this, arguments);
|
|
3013
3117
|
};
|
|
3014
3118
|
}
|
|
3015
3119
|
|
|
3016
|
-
function
|
|
3017
|
-
return function() {
|
|
3018
|
-
|
|
3019
|
-
this.textContent = value1 == null ? "" : value1;
|
|
3120
|
+
function delayConstant(id, value) {
|
|
3121
|
+
return value = +value, function() {
|
|
3122
|
+
init(this, id).delay = value;
|
|
3020
3123
|
};
|
|
3021
3124
|
}
|
|
3022
3125
|
|
|
3023
|
-
function
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3126
|
+
function transition_delay(value) {
|
|
3127
|
+
var id = this._id;
|
|
3128
|
+
|
|
3129
|
+
return arguments.length
|
|
3130
|
+
? this.each((typeof value === "function"
|
|
3131
|
+
? delayFunction
|
|
3132
|
+
: delayConstant)(id, value))
|
|
3133
|
+
: get(this.node(), id).delay;
|
|
3027
3134
|
}
|
|
3028
3135
|
|
|
3029
|
-
function
|
|
3030
|
-
return function(
|
|
3031
|
-
this.
|
|
3136
|
+
function durationFunction(id, value) {
|
|
3137
|
+
return function() {
|
|
3138
|
+
set$1(this, id).duration = +value.apply(this, arguments);
|
|
3032
3139
|
};
|
|
3033
3140
|
}
|
|
3034
3141
|
|
|
3035
|
-
function
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
3040
|
-
return t0;
|
|
3041
|
-
}
|
|
3042
|
-
tween._value = value;
|
|
3043
|
-
return tween;
|
|
3142
|
+
function durationConstant(id, value) {
|
|
3143
|
+
return value = +value, function() {
|
|
3144
|
+
set$1(this, id).duration = value;
|
|
3145
|
+
};
|
|
3044
3146
|
}
|
|
3045
3147
|
|
|
3046
|
-
function
|
|
3047
|
-
var
|
|
3048
|
-
|
|
3049
|
-
|
|
3148
|
+
function transition_duration(value) {
|
|
3149
|
+
var id = this._id;
|
|
3150
|
+
|
|
3151
|
+
return arguments.length
|
|
3152
|
+
? this.each((typeof value === "function"
|
|
3153
|
+
? durationFunction
|
|
3154
|
+
: durationConstant)(id, value))
|
|
3155
|
+
: get(this.node(), id).duration;
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
function easeConstant(id, value) {
|
|
3050
3159
|
if (typeof value !== "function") throw new Error;
|
|
3051
|
-
return
|
|
3160
|
+
return function() {
|
|
3161
|
+
set$1(this, id).ease = value;
|
|
3162
|
+
};
|
|
3052
3163
|
}
|
|
3053
3164
|
|
|
3054
|
-
function
|
|
3055
|
-
var
|
|
3056
|
-
id0 = this._id,
|
|
3057
|
-
id1 = newId();
|
|
3165
|
+
function transition_ease(value) {
|
|
3166
|
+
var id = this._id;
|
|
3058
3167
|
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3168
|
+
return arguments.length
|
|
3169
|
+
? this.each(easeConstant(id, value))
|
|
3170
|
+
: get(this.node(), id).ease;
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
function transition_filter(match) {
|
|
3174
|
+
if (typeof match !== "function") match = matcher(match);
|
|
3175
|
+
|
|
3176
|
+
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3177
|
+
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
3178
|
+
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
3179
|
+
subgroup.push(node);
|
|
3069
3180
|
}
|
|
3070
3181
|
}
|
|
3071
3182
|
}
|
|
3072
3183
|
|
|
3073
|
-
return new Transition$1(
|
|
3184
|
+
return new Transition$1(subgroups, this._parents, this._name, this._id);
|
|
3074
3185
|
}
|
|
3075
3186
|
|
|
3076
|
-
function
|
|
3077
|
-
|
|
3078
|
-
return new Promise(function(resolve, reject) {
|
|
3079
|
-
var cancel = {value: reject},
|
|
3080
|
-
end = {value: function() { if (--size === 0) resolve(); }};
|
|
3081
|
-
|
|
3082
|
-
that.each(function() {
|
|
3083
|
-
var schedule = set$1(this, id),
|
|
3084
|
-
on = schedule.on;
|
|
3187
|
+
function transition_merge(transition) {
|
|
3188
|
+
if (transition._id !== this._id) throw new Error;
|
|
3085
3189
|
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
on1 = (on0 = on).copy();
|
|
3091
|
-
on1._.cancel.push(cancel);
|
|
3092
|
-
on1._.interrupt.push(cancel);
|
|
3093
|
-
on1._.end.push(end);
|
|
3190
|
+
for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
3191
|
+
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
3192
|
+
if (node = group0[i] || group1[i]) {
|
|
3193
|
+
merge[i] = node;
|
|
3094
3194
|
}
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3095
3197
|
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
var id = 0;
|
|
3102
|
-
|
|
3103
|
-
function Transition$1(groups, parents, name, id) {
|
|
3104
|
-
this._groups = groups;
|
|
3105
|
-
this._parents = parents;
|
|
3106
|
-
this._name = name;
|
|
3107
|
-
this._id = id;
|
|
3108
|
-
}
|
|
3198
|
+
for (; j < m0; ++j) {
|
|
3199
|
+
merges[j] = groups0[j];
|
|
3200
|
+
}
|
|
3109
3201
|
|
|
3110
|
-
|
|
3111
|
-
return selection().transition(name);
|
|
3202
|
+
return new Transition$1(merges, this._parents, this._name, this._id);
|
|
3112
3203
|
}
|
|
3113
3204
|
|
|
3114
|
-
function
|
|
3115
|
-
return
|
|
3205
|
+
function start(name) {
|
|
3206
|
+
return (name + "").trim().split(/^|\s+/).every(function(t) {
|
|
3207
|
+
var i = t.indexOf(".");
|
|
3208
|
+
if (i >= 0) t = t.slice(0, i);
|
|
3209
|
+
return !t || t === "start";
|
|
3210
|
+
});
|
|
3116
3211
|
}
|
|
3117
3212
|
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
selectAll: transition_selectAll,
|
|
3124
|
-
filter: transition_filter,
|
|
3125
|
-
merge: transition_merge,
|
|
3126
|
-
selection: transition_selection,
|
|
3127
|
-
transition: transition_transition,
|
|
3128
|
-
call: selection_prototype.call,
|
|
3129
|
-
nodes: selection_prototype.nodes,
|
|
3130
|
-
node: selection_prototype.node,
|
|
3131
|
-
size: selection_prototype.size,
|
|
3132
|
-
empty: selection_prototype.empty,
|
|
3133
|
-
each: selection_prototype.each,
|
|
3134
|
-
on: transition_on,
|
|
3135
|
-
attr: transition_attr,
|
|
3136
|
-
attrTween: transition_attrTween,
|
|
3137
|
-
style: transition_style,
|
|
3138
|
-
styleTween: transition_styleTween,
|
|
3139
|
-
text: transition_text,
|
|
3140
|
-
textTween: transition_textTween,
|
|
3141
|
-
remove: transition_remove,
|
|
3142
|
-
tween: transition_tween,
|
|
3143
|
-
delay: transition_delay,
|
|
3144
|
-
duration: transition_duration,
|
|
3145
|
-
ease: transition_ease,
|
|
3146
|
-
end: transition_end
|
|
3147
|
-
};
|
|
3148
|
-
|
|
3149
|
-
function linear$1(t) {
|
|
3150
|
-
return +t;
|
|
3151
|
-
}
|
|
3213
|
+
function onFunction(id, name, listener) {
|
|
3214
|
+
var on0, on1, sit = start(name) ? init : set$1;
|
|
3215
|
+
return function() {
|
|
3216
|
+
var schedule = sit(this, id),
|
|
3217
|
+
on = schedule.on;
|
|
3152
3218
|
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3219
|
+
// If this node shared a dispatch with the previous node,
|
|
3220
|
+
// just assign the updated shared dispatch and we’re done!
|
|
3221
|
+
// Otherwise, copy-on-write.
|
|
3222
|
+
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
3156
3223
|
|
|
3157
|
-
|
|
3158
|
-
|
|
3224
|
+
schedule.on = on1;
|
|
3225
|
+
};
|
|
3159
3226
|
}
|
|
3160
3227
|
|
|
3161
|
-
function
|
|
3162
|
-
|
|
3163
|
-
}
|
|
3228
|
+
function transition_on(name, listener) {
|
|
3229
|
+
var id = this._id;
|
|
3164
3230
|
|
|
3165
|
-
|
|
3166
|
-
|
|
3231
|
+
return arguments.length < 2
|
|
3232
|
+
? get(this.node(), id).on.on(name)
|
|
3233
|
+
: this.each(onFunction(id, name, listener));
|
|
3167
3234
|
}
|
|
3168
3235
|
|
|
3169
|
-
function
|
|
3170
|
-
return
|
|
3236
|
+
function removeFunction(id) {
|
|
3237
|
+
return function() {
|
|
3238
|
+
var parent = this.parentNode;
|
|
3239
|
+
for (var i in this.__transition) if (+i !== id) return;
|
|
3240
|
+
if (parent) parent.removeChild(this);
|
|
3241
|
+
};
|
|
3171
3242
|
}
|
|
3172
3243
|
|
|
3173
|
-
function
|
|
3174
|
-
return (
|
|
3244
|
+
function transition_remove() {
|
|
3245
|
+
return this.on("end.remove", removeFunction(this._id));
|
|
3175
3246
|
}
|
|
3176
3247
|
|
|
3177
|
-
|
|
3248
|
+
function transition_select(select) {
|
|
3249
|
+
var name = this._name,
|
|
3250
|
+
id = this._id;
|
|
3178
3251
|
|
|
3179
|
-
|
|
3180
|
-
e = +e;
|
|
3252
|
+
if (typeof select !== "function") select = selector(select);
|
|
3181
3253
|
|
|
3182
|
-
|
|
3183
|
-
|
|
3254
|
+
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3255
|
+
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
3256
|
+
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
3257
|
+
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
3258
|
+
subgroup[i] = subnode;
|
|
3259
|
+
schedule(subgroup[i], name, id, i, subgroup, get(node, id));
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3184
3262
|
}
|
|
3185
3263
|
|
|
3186
|
-
|
|
3264
|
+
return new Transition$1(subgroups, this._parents, name, id);
|
|
3265
|
+
}
|
|
3187
3266
|
|
|
3188
|
-
|
|
3189
|
-
|
|
3267
|
+
function transition_selectAll(select) {
|
|
3268
|
+
var name = this._name,
|
|
3269
|
+
id = this._id;
|
|
3190
3270
|
|
|
3191
|
-
|
|
3192
|
-
e = +e;
|
|
3271
|
+
if (typeof select !== "function") select = selectorAll(select);
|
|
3193
3272
|
|
|
3194
|
-
|
|
3195
|
-
|
|
3273
|
+
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
3274
|
+
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3275
|
+
if (node = group[i]) {
|
|
3276
|
+
for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {
|
|
3277
|
+
if (child = children[k]) {
|
|
3278
|
+
schedule(child, name, id, k, children, inherit);
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
subgroups.push(children);
|
|
3282
|
+
parents.push(node);
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3196
3285
|
}
|
|
3197
3286
|
|
|
3198
|
-
|
|
3287
|
+
return new Transition$1(subgroups, parents, name, id);
|
|
3288
|
+
}
|
|
3199
3289
|
|
|
3200
|
-
|
|
3201
|
-
})(exponent$1);
|
|
3202
|
-
|
|
3203
|
-
var polyInOut = (function custom(e) {
|
|
3204
|
-
e = +e;
|
|
3205
|
-
|
|
3206
|
-
function polyInOut(t) {
|
|
3207
|
-
return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
polyInOut.exponent = custom;
|
|
3211
|
-
|
|
3212
|
-
return polyInOut;
|
|
3213
|
-
})(exponent$1);
|
|
3290
|
+
var Selection$1 = selection.prototype.constructor;
|
|
3214
3291
|
|
|
3215
|
-
|
|
3216
|
-
|
|
3292
|
+
function transition_selection() {
|
|
3293
|
+
return new Selection$1(this._groups, this._parents);
|
|
3294
|
+
}
|
|
3217
3295
|
|
|
3218
|
-
function
|
|
3219
|
-
|
|
3296
|
+
function styleNull(name, interpolate) {
|
|
3297
|
+
var string00,
|
|
3298
|
+
string10,
|
|
3299
|
+
interpolate0;
|
|
3300
|
+
return function() {
|
|
3301
|
+
var string0 = styleValue(this, name),
|
|
3302
|
+
string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3303
|
+
return string0 === string1 ? null
|
|
3304
|
+
: string0 === string00 && string1 === string10 ? interpolate0
|
|
3305
|
+
: interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
3306
|
+
};
|
|
3220
3307
|
}
|
|
3221
3308
|
|
|
3222
|
-
function
|
|
3223
|
-
return
|
|
3309
|
+
function styleRemove(name) {
|
|
3310
|
+
return function() {
|
|
3311
|
+
this.style.removeProperty(name);
|
|
3312
|
+
};
|
|
3224
3313
|
}
|
|
3225
3314
|
|
|
3226
|
-
function
|
|
3227
|
-
|
|
3315
|
+
function styleConstant(name, interpolate, value1) {
|
|
3316
|
+
var string00,
|
|
3317
|
+
string1 = value1 + "",
|
|
3318
|
+
interpolate0;
|
|
3319
|
+
return function() {
|
|
3320
|
+
var string0 = styleValue(this, name);
|
|
3321
|
+
return string0 === string1 ? null
|
|
3322
|
+
: string0 === string00 ? interpolate0
|
|
3323
|
+
: interpolate0 = interpolate(string00 = string0, value1);
|
|
3324
|
+
};
|
|
3228
3325
|
}
|
|
3229
3326
|
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3327
|
+
function styleFunction(name, interpolate, value) {
|
|
3328
|
+
var string00,
|
|
3329
|
+
string10,
|
|
3330
|
+
interpolate0;
|
|
3331
|
+
return function() {
|
|
3332
|
+
var string0 = styleValue(this, name),
|
|
3333
|
+
value1 = value(this),
|
|
3334
|
+
string1 = value1 + "";
|
|
3335
|
+
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3336
|
+
return string0 === string1 ? null
|
|
3337
|
+
: string0 === string00 && string1 === string10 ? interpolate0
|
|
3338
|
+
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
3339
|
+
};
|
|
3233
3340
|
}
|
|
3234
3341
|
|
|
3235
|
-
function
|
|
3236
|
-
|
|
3342
|
+
function styleMaybeRemove(id, name) {
|
|
3343
|
+
var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;
|
|
3344
|
+
return function() {
|
|
3345
|
+
var schedule = set$1(this, id),
|
|
3346
|
+
on = schedule.on,
|
|
3347
|
+
listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
|
|
3348
|
+
|
|
3349
|
+
// If this node shared a dispatch with the previous node,
|
|
3350
|
+
// just assign the updated shared dispatch and we’re done!
|
|
3351
|
+
// Otherwise, copy-on-write.
|
|
3352
|
+
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
3353
|
+
|
|
3354
|
+
schedule.on = on1;
|
|
3355
|
+
};
|
|
3237
3356
|
}
|
|
3238
3357
|
|
|
3239
|
-
function
|
|
3240
|
-
|
|
3358
|
+
function transition_style(name, value, priority) {
|
|
3359
|
+
var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
|
|
3360
|
+
return value == null ? this
|
|
3361
|
+
.styleTween(name, styleNull(name, i))
|
|
3362
|
+
.on("end.style." + name, styleRemove(name))
|
|
3363
|
+
: typeof value === "function" ? this
|
|
3364
|
+
.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value)))
|
|
3365
|
+
.each(styleMaybeRemove(this._id, name))
|
|
3366
|
+
: this
|
|
3367
|
+
.styleTween(name, styleConstant(name, i, value), priority)
|
|
3368
|
+
.on("end.style." + name, null);
|
|
3241
3369
|
}
|
|
3242
3370
|
|
|
3243
|
-
function
|
|
3244
|
-
return (
|
|
3371
|
+
function styleInterpolate(name, i, priority) {
|
|
3372
|
+
return function(t) {
|
|
3373
|
+
this.style.setProperty(name, i.call(this, t), priority);
|
|
3374
|
+
};
|
|
3245
3375
|
}
|
|
3246
3376
|
|
|
3247
|
-
function
|
|
3248
|
-
|
|
3377
|
+
function styleTween(name, value, priority) {
|
|
3378
|
+
var t, i0;
|
|
3379
|
+
function tween() {
|
|
3380
|
+
var i = value.apply(this, arguments);
|
|
3381
|
+
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
3382
|
+
return t;
|
|
3383
|
+
}
|
|
3384
|
+
tween._value = value;
|
|
3385
|
+
return tween;
|
|
3249
3386
|
}
|
|
3250
3387
|
|
|
3251
|
-
function
|
|
3252
|
-
|
|
3388
|
+
function transition_styleTween(name, value, priority) {
|
|
3389
|
+
var key = "style." + (name += "");
|
|
3390
|
+
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
3391
|
+
if (value == null) return this.tween(key, null);
|
|
3392
|
+
if (typeof value !== "function") throw new Error;
|
|
3393
|
+
return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
|
|
3253
3394
|
}
|
|
3254
3395
|
|
|
3255
|
-
function
|
|
3256
|
-
return (
|
|
3396
|
+
function textConstant(value) {
|
|
3397
|
+
return function() {
|
|
3398
|
+
this.textContent = value;
|
|
3399
|
+
};
|
|
3257
3400
|
}
|
|
3258
3401
|
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
b7 = 15 / 16,
|
|
3266
|
-
b8 = 21 / 22,
|
|
3267
|
-
b9 = 63 / 64,
|
|
3268
|
-
b0 = 1 / b1 / b1;
|
|
3402
|
+
function textFunction(value) {
|
|
3403
|
+
return function() {
|
|
3404
|
+
var value1 = value(this);
|
|
3405
|
+
this.textContent = value1 == null ? "" : value1;
|
|
3406
|
+
};
|
|
3407
|
+
}
|
|
3269
3408
|
|
|
3270
|
-
function
|
|
3271
|
-
return
|
|
3409
|
+
function transition_text(value) {
|
|
3410
|
+
return this.tween("text", typeof value === "function"
|
|
3411
|
+
? textFunction(tweenValue(this, "text", value))
|
|
3412
|
+
: textConstant(value == null ? "" : value + ""));
|
|
3272
3413
|
}
|
|
3273
3414
|
|
|
3274
|
-
function
|
|
3275
|
-
return (t
|
|
3415
|
+
function textInterpolate(i) {
|
|
3416
|
+
return function(t) {
|
|
3417
|
+
this.textContent = i.call(this, t);
|
|
3418
|
+
};
|
|
3276
3419
|
}
|
|
3277
3420
|
|
|
3278
|
-
function
|
|
3279
|
-
|
|
3421
|
+
function textTween(value) {
|
|
3422
|
+
var t0, i0;
|
|
3423
|
+
function tween() {
|
|
3424
|
+
var i = value.apply(this, arguments);
|
|
3425
|
+
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
3426
|
+
return t0;
|
|
3427
|
+
}
|
|
3428
|
+
tween._value = value;
|
|
3429
|
+
return tween;
|
|
3280
3430
|
}
|
|
3281
3431
|
|
|
3282
|
-
|
|
3432
|
+
function transition_textTween(value) {
|
|
3433
|
+
var key = "text";
|
|
3434
|
+
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
3435
|
+
if (value == null) return this.tween(key, null);
|
|
3436
|
+
if (typeof value !== "function") throw new Error;
|
|
3437
|
+
return this.tween(key, textTween(value));
|
|
3438
|
+
}
|
|
3283
3439
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3440
|
+
function transition_transition() {
|
|
3441
|
+
var name = this._name,
|
|
3442
|
+
id0 = this._id,
|
|
3443
|
+
id1 = newId();
|
|
3286
3444
|
|
|
3287
|
-
|
|
3288
|
-
|
|
3445
|
+
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3446
|
+
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3447
|
+
if (node = group[i]) {
|
|
3448
|
+
var inherit = get(node, id0);
|
|
3449
|
+
schedule(node, name, id1, i, group, {
|
|
3450
|
+
time: inherit.time + inherit.delay + inherit.duration,
|
|
3451
|
+
delay: 0,
|
|
3452
|
+
duration: inherit.duration,
|
|
3453
|
+
ease: inherit.ease
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3289
3457
|
}
|
|
3290
3458
|
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
return backIn;
|
|
3294
|
-
})(overshoot);
|
|
3295
|
-
|
|
3296
|
-
var backOut = (function custom(s) {
|
|
3297
|
-
s = +s;
|
|
3459
|
+
return new Transition$1(groups, this._parents, name, id1);
|
|
3460
|
+
}
|
|
3298
3461
|
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3462
|
+
function transition_end() {
|
|
3463
|
+
var on0, on1, that = this, id = that._id, size = that.size();
|
|
3464
|
+
return new Promise(function(resolve, reject) {
|
|
3465
|
+
var cancel = {value: reject},
|
|
3466
|
+
end = {value: function() { if (--size === 0) resolve(); }};
|
|
3302
3467
|
|
|
3303
|
-
|
|
3468
|
+
that.each(function() {
|
|
3469
|
+
var schedule = set$1(this, id),
|
|
3470
|
+
on = schedule.on;
|
|
3304
3471
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3472
|
+
// If this node shared a dispatch with the previous node,
|
|
3473
|
+
// just assign the updated shared dispatch and we’re done!
|
|
3474
|
+
// Otherwise, copy-on-write.
|
|
3475
|
+
if (on !== on0) {
|
|
3476
|
+
on1 = (on0 = on).copy();
|
|
3477
|
+
on1._.cancel.push(cancel);
|
|
3478
|
+
on1._.interrupt.push(cancel);
|
|
3479
|
+
on1._.end.push(end);
|
|
3480
|
+
}
|
|
3307
3481
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3482
|
+
schedule.on = on1;
|
|
3483
|
+
});
|
|
3484
|
+
});
|
|
3485
|
+
}
|
|
3310
3486
|
|
|
3311
|
-
|
|
3312
|
-
return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
|
|
3313
|
-
}
|
|
3487
|
+
var id = 0;
|
|
3314
3488
|
|
|
3315
|
-
|
|
3489
|
+
function Transition$1(groups, parents, name, id) {
|
|
3490
|
+
this._groups = groups;
|
|
3491
|
+
this._parents = parents;
|
|
3492
|
+
this._name = name;
|
|
3493
|
+
this._id = id;
|
|
3494
|
+
}
|
|
3316
3495
|
|
|
3317
|
-
|
|
3318
|
-
|
|
3496
|
+
function transition(name) {
|
|
3497
|
+
return selection().transition(name);
|
|
3498
|
+
}
|
|
3319
3499
|
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3500
|
+
function newId() {
|
|
3501
|
+
return ++id;
|
|
3502
|
+
}
|
|
3323
3503
|
|
|
3324
|
-
var
|
|
3325
|
-
|
|
3504
|
+
var selection_prototype = selection.prototype;
|
|
3505
|
+
|
|
3506
|
+
Transition$1.prototype = transition.prototype = {
|
|
3507
|
+
constructor: Transition$1,
|
|
3508
|
+
select: transition_select,
|
|
3509
|
+
selectAll: transition_selectAll,
|
|
3510
|
+
filter: transition_filter,
|
|
3511
|
+
merge: transition_merge,
|
|
3512
|
+
selection: transition_selection,
|
|
3513
|
+
transition: transition_transition,
|
|
3514
|
+
call: selection_prototype.call,
|
|
3515
|
+
nodes: selection_prototype.nodes,
|
|
3516
|
+
node: selection_prototype.node,
|
|
3517
|
+
size: selection_prototype.size,
|
|
3518
|
+
empty: selection_prototype.empty,
|
|
3519
|
+
each: selection_prototype.each,
|
|
3520
|
+
on: transition_on,
|
|
3521
|
+
attr: transition_attr,
|
|
3522
|
+
attrTween: transition_attrTween,
|
|
3523
|
+
style: transition_style,
|
|
3524
|
+
styleTween: transition_styleTween,
|
|
3525
|
+
text: transition_text,
|
|
3526
|
+
textTween: transition_textTween,
|
|
3527
|
+
remove: transition_remove,
|
|
3528
|
+
tween: transition_tween,
|
|
3529
|
+
delay: transition_delay,
|
|
3530
|
+
duration: transition_duration,
|
|
3531
|
+
ease: transition_ease,
|
|
3532
|
+
end: transition_end
|
|
3533
|
+
};
|
|
3534
|
+
|
|
3535
|
+
function linear$1(t) {
|
|
3536
|
+
return +t;
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
function quadIn(t) {
|
|
3540
|
+
return t * t;
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
function quadOut(t) {
|
|
3544
|
+
return t * (2 - t);
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
function quadInOut(t) {
|
|
3548
|
+
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
|
|
3549
|
+
}
|
|
3550
|
+
|
|
3551
|
+
function cubicIn(t) {
|
|
3552
|
+
return t * t * t;
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
function cubicOut(t) {
|
|
3556
|
+
return --t * t * t + 1;
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3559
|
+
function cubicInOut(t) {
|
|
3560
|
+
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
var exponent$1 = 3;
|
|
3564
|
+
|
|
3565
|
+
var polyIn = (function custom(e) {
|
|
3566
|
+
e = +e;
|
|
3567
|
+
|
|
3568
|
+
function polyIn(t) {
|
|
3569
|
+
return Math.pow(t, e);
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
polyIn.exponent = custom;
|
|
3573
|
+
|
|
3574
|
+
return polyIn;
|
|
3575
|
+
})(exponent$1);
|
|
3576
|
+
|
|
3577
|
+
var polyOut = (function custom(e) {
|
|
3578
|
+
e = +e;
|
|
3579
|
+
|
|
3580
|
+
function polyOut(t) {
|
|
3581
|
+
return 1 - Math.pow(1 - t, e);
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
polyOut.exponent = custom;
|
|
3585
|
+
|
|
3586
|
+
return polyOut;
|
|
3587
|
+
})(exponent$1);
|
|
3588
|
+
|
|
3589
|
+
var polyInOut = (function custom(e) {
|
|
3590
|
+
e = +e;
|
|
3591
|
+
|
|
3592
|
+
function polyInOut(t) {
|
|
3593
|
+
return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
polyInOut.exponent = custom;
|
|
3597
|
+
|
|
3598
|
+
return polyInOut;
|
|
3599
|
+
})(exponent$1);
|
|
3600
|
+
|
|
3601
|
+
var pi = Math.PI,
|
|
3602
|
+
halfPi = pi / 2;
|
|
3603
|
+
|
|
3604
|
+
function sinIn(t) {
|
|
3605
|
+
return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
function sinOut(t) {
|
|
3609
|
+
return Math.sin(t * halfPi);
|
|
3610
|
+
}
|
|
3611
|
+
|
|
3612
|
+
function sinInOut(t) {
|
|
3613
|
+
return (1 - Math.cos(pi * t)) / 2;
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
// tpmt is two power minus ten times t scaled to [0,1]
|
|
3617
|
+
function tpmt(x) {
|
|
3618
|
+
return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3621
|
+
function expIn(t) {
|
|
3622
|
+
return tpmt(1 - +t);
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
function expOut(t) {
|
|
3626
|
+
return 1 - tpmt(t);
|
|
3627
|
+
}
|
|
3628
|
+
|
|
3629
|
+
function expInOut(t) {
|
|
3630
|
+
return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3633
|
+
function circleIn(t) {
|
|
3634
|
+
return 1 - Math.sqrt(1 - t * t);
|
|
3635
|
+
}
|
|
3636
|
+
|
|
3637
|
+
function circleOut(t) {
|
|
3638
|
+
return Math.sqrt(1 - --t * t);
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
function circleInOut(t) {
|
|
3642
|
+
return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
var b1 = 4 / 11,
|
|
3646
|
+
b2 = 6 / 11,
|
|
3647
|
+
b3 = 8 / 11,
|
|
3648
|
+
b4 = 3 / 4,
|
|
3649
|
+
b5 = 9 / 11,
|
|
3650
|
+
b6 = 10 / 11,
|
|
3651
|
+
b7 = 15 / 16,
|
|
3652
|
+
b8 = 21 / 22,
|
|
3653
|
+
b9 = 63 / 64,
|
|
3654
|
+
b0 = 1 / b1 / b1;
|
|
3655
|
+
|
|
3656
|
+
function bounceIn(t) {
|
|
3657
|
+
return 1 - bounceOut(1 - t);
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
function bounceOut(t) {
|
|
3661
|
+
return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3664
|
+
function bounceInOut(t) {
|
|
3665
|
+
return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
|
|
3666
|
+
}
|
|
3667
|
+
|
|
3668
|
+
var overshoot = 1.70158;
|
|
3669
|
+
|
|
3670
|
+
var backIn = (function custom(s) {
|
|
3671
|
+
s = +s;
|
|
3672
|
+
|
|
3673
|
+
function backIn(t) {
|
|
3674
|
+
return (t = +t) * t * (s * (t - 1) + t);
|
|
3675
|
+
}
|
|
3676
|
+
|
|
3677
|
+
backIn.overshoot = custom;
|
|
3678
|
+
|
|
3679
|
+
return backIn;
|
|
3680
|
+
})(overshoot);
|
|
3681
|
+
|
|
3682
|
+
var backOut = (function custom(s) {
|
|
3683
|
+
s = +s;
|
|
3684
|
+
|
|
3685
|
+
function backOut(t) {
|
|
3686
|
+
return --t * t * ((t + 1) * s + t) + 1;
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
backOut.overshoot = custom;
|
|
3690
|
+
|
|
3691
|
+
return backOut;
|
|
3692
|
+
})(overshoot);
|
|
3693
|
+
|
|
3694
|
+
var backInOut = (function custom(s) {
|
|
3695
|
+
s = +s;
|
|
3696
|
+
|
|
3697
|
+
function backInOut(t) {
|
|
3698
|
+
return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
|
|
3699
|
+
}
|
|
3700
|
+
|
|
3701
|
+
backInOut.overshoot = custom;
|
|
3702
|
+
|
|
3703
|
+
return backInOut;
|
|
3704
|
+
})(overshoot);
|
|
3705
|
+
|
|
3706
|
+
var tau = 2 * Math.PI,
|
|
3707
|
+
amplitude = 1,
|
|
3708
|
+
period = 0.3;
|
|
3709
|
+
|
|
3710
|
+
var elasticIn = (function custom(a, p) {
|
|
3711
|
+
var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
|
|
3326
3712
|
|
|
3327
3713
|
function elasticIn(t) {
|
|
3328
3714
|
return a * tpmt(-(--t)) * Math.sin((s - t) / p);
|
|
@@ -7231,11 +7617,17 @@ function textSize(_text, fontName, fontSize, bold) {
|
|
|
7231
7617
|
var hash = "".concat(bold, "::").concat(fontSize, "::").concat(fontName, "::").concat(text.join("::"));
|
|
7232
7618
|
var retVal = g_fontSizeContextCache[hash];
|
|
7233
7619
|
if (!retVal) {
|
|
7620
|
+
retVal = { width: 0, height: 0 };
|
|
7234
7621
|
g_fontSizeContext.font = "".concat(bold ? "bold " : "").concat(fontSize, "px ").concat(fontName);
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7622
|
+
text.forEach(function (line) {
|
|
7623
|
+
var textMeasurement = g_fontSizeContext.measureText("" + line);
|
|
7624
|
+
var width = textMeasurement.width;
|
|
7625
|
+
var height = (textMeasurement.fontBoundingBoxDescent + textMeasurement.fontBoundingBoxAscent) * text.length;
|
|
7626
|
+
g_fontSizeContextCache[hash] = retVal = {
|
|
7627
|
+
width: width > retVal.width ? width : retVal.width,
|
|
7628
|
+
height: height > retVal.height ? height : retVal.height
|
|
7629
|
+
};
|
|
7630
|
+
});
|
|
7239
7631
|
}
|
|
7240
7632
|
return retVal;
|
|
7241
7633
|
}
|
|
@@ -7325,39 +7717,39 @@ function safeRaise(domNode) {
|
|
|
7325
7717
|
}
|
|
7326
7718
|
|
|
7327
7719
|
var Utility = /*#__PURE__*/Object.freeze({
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7720
|
+
__proto__: null,
|
|
7721
|
+
SelectionBase: SelectionBase,
|
|
7722
|
+
SelectionBag: SelectionBag,
|
|
7723
|
+
SimpleSelection: SimpleSelection,
|
|
7724
|
+
SimpleSelectionMixin: SimpleSelectionMixin,
|
|
7725
|
+
faKeys: faKeys,
|
|
7726
|
+
fa5Class: fa5Class,
|
|
7727
|
+
faChar: faChar,
|
|
7728
|
+
faCode: faCode,
|
|
7729
|
+
removeHTMLFromString: removeHTMLFromString,
|
|
7730
|
+
templateFields: templateFields,
|
|
7731
|
+
template: template,
|
|
7732
|
+
naturalSort: naturalSort,
|
|
7733
|
+
multiSort: multiSort,
|
|
7734
|
+
Selection: Selection,
|
|
7735
|
+
urlParams: urlParams,
|
|
7736
|
+
endsWith: endsWith,
|
|
7737
|
+
d3ArrayAdapter: d3ArrayAdapter,
|
|
7738
|
+
downloadBlob: downloadBlob,
|
|
7739
|
+
timestamp: timestamp,
|
|
7740
|
+
downloadString: downloadString,
|
|
7741
|
+
widgetPath: widgetPath,
|
|
7742
|
+
parseClassID: parseClassID,
|
|
7743
|
+
checksum: checksum,
|
|
7744
|
+
getTime: getTime,
|
|
7745
|
+
mixin: mixin,
|
|
7746
|
+
exists: exists,
|
|
7747
|
+
logStringify: logStringify,
|
|
7748
|
+
debounce: debounce,
|
|
7749
|
+
parseVersionString: parseVersionString,
|
|
7750
|
+
textSize: textSize,
|
|
7751
|
+
textRect: textRect,
|
|
7752
|
+
safeRaise: safeRaise
|
|
7361
7753
|
});
|
|
7362
7754
|
|
|
7363
7755
|
var d3Aggr = {
|
|
@@ -8128,11 +8520,11 @@ function isUSState(cell) {
|
|
|
8128
8520
|
}
|
|
8129
8521
|
|
|
8130
8522
|
var Database = /*#__PURE__*/Object.freeze({
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8523
|
+
__proto__: null,
|
|
8524
|
+
Field: Field,
|
|
8525
|
+
Grid: Grid,
|
|
8526
|
+
LegacyView: LegacyView,
|
|
8527
|
+
RollupView: RollupView
|
|
8136
8528
|
});
|
|
8137
8529
|
|
|
8138
8530
|
function styleInject(css, ref) {
|
|
@@ -8949,34 +9341,34 @@ var CanvasWidget = /** @class */ (function (_super) {
|
|
|
8949
9341
|
}(HTMLWidget));
|
|
8950
9342
|
CanvasWidget.prototype._class += " common_CanvasWidget";
|
|
8951
9343
|
|
|
8952
|
-
function define(constructor, factory, prototype) {
|
|
9344
|
+
function define$1(constructor, factory, prototype) {
|
|
8953
9345
|
constructor.prototype = factory.prototype = prototype;
|
|
8954
9346
|
prototype.constructor = constructor;
|
|
8955
9347
|
}
|
|
8956
9348
|
|
|
8957
|
-
function extend(parent, definition) {
|
|
9349
|
+
function extend$1(parent, definition) {
|
|
8958
9350
|
var prototype = Object.create(parent.prototype);
|
|
8959
9351
|
for (var key in definition) prototype[key] = definition[key];
|
|
8960
9352
|
return prototype;
|
|
8961
9353
|
}
|
|
8962
9354
|
|
|
8963
|
-
function Color() {}
|
|
9355
|
+
function Color$1() {}
|
|
8964
9356
|
|
|
8965
|
-
var darker = 0.7;
|
|
8966
|
-
var brighter = 1 / darker;
|
|
9357
|
+
var darker$1 = 0.7;
|
|
9358
|
+
var brighter$1 = 1 / darker$1;
|
|
8967
9359
|
|
|
8968
|
-
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
8969
|
-
reN = "\\s*([+-]
|
|
8970
|
-
reP = "\\s*([+-]
|
|
8971
|
-
reHex = /^#([0-9a-f]{3,8})$/,
|
|
8972
|
-
reRgbInteger = new RegExp(
|
|
8973
|
-
reRgbPercent = new RegExp(
|
|
8974
|
-
reRgbaInteger = new RegExp(
|
|
8975
|
-
reRgbaPercent = new RegExp(
|
|
8976
|
-
reHslPercent = new RegExp(
|
|
8977
|
-
reHslaPercent = new RegExp(
|
|
9360
|
+
var reI$1 = "\\s*([+-]?\\d+)\\s*",
|
|
9361
|
+
reN$1 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
9362
|
+
reP$1 = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
9363
|
+
reHex$1 = /^#([0-9a-f]{3,8})$/,
|
|
9364
|
+
reRgbInteger$1 = new RegExp("^rgb\\(" + [reI$1, reI$1, reI$1] + "\\)$"),
|
|
9365
|
+
reRgbPercent$1 = new RegExp("^rgb\\(" + [reP$1, reP$1, reP$1] + "\\)$"),
|
|
9366
|
+
reRgbaInteger$1 = new RegExp("^rgba\\(" + [reI$1, reI$1, reI$1, reN$1] + "\\)$"),
|
|
9367
|
+
reRgbaPercent$1 = new RegExp("^rgba\\(" + [reP$1, reP$1, reP$1, reN$1] + "\\)$"),
|
|
9368
|
+
reHslPercent$1 = new RegExp("^hsl\\(" + [reN$1, reP$1, reP$1] + "\\)$"),
|
|
9369
|
+
reHslaPercent$1 = new RegExp("^hsla\\(" + [reN$1, reP$1, reP$1, reN$1] + "\\)$");
|
|
8978
9370
|
|
|
8979
|
-
var named = {
|
|
9371
|
+
var named$1 = {
|
|
8980
9372
|
aliceblue: 0xf0f8ff,
|
|
8981
9373
|
antiquewhite: 0xfaebd7,
|
|
8982
9374
|
aqua: 0x00ffff,
|
|
@@ -9127,149 +9519,132 @@ var named = {
|
|
|
9127
9519
|
yellowgreen: 0x9acd32
|
|
9128
9520
|
};
|
|
9129
9521
|
|
|
9130
|
-
define(Color, color, {
|
|
9131
|
-
copy(channels) {
|
|
9522
|
+
define$1(Color$1, color$1, {
|
|
9523
|
+
copy: function(channels) {
|
|
9132
9524
|
return Object.assign(new this.constructor, this, channels);
|
|
9133
9525
|
},
|
|
9134
|
-
displayable() {
|
|
9526
|
+
displayable: function() {
|
|
9135
9527
|
return this.rgb().displayable();
|
|
9136
9528
|
},
|
|
9137
|
-
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
9138
|
-
formatHex: color_formatHex,
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
toString: color_formatRgb
|
|
9529
|
+
hex: color_formatHex$1, // Deprecated! Use color.formatHex.
|
|
9530
|
+
formatHex: color_formatHex$1,
|
|
9531
|
+
formatHsl: color_formatHsl$1,
|
|
9532
|
+
formatRgb: color_formatRgb$1,
|
|
9533
|
+
toString: color_formatRgb$1
|
|
9143
9534
|
});
|
|
9144
9535
|
|
|
9145
|
-
function color_formatHex() {
|
|
9536
|
+
function color_formatHex$1() {
|
|
9146
9537
|
return this.rgb().formatHex();
|
|
9147
9538
|
}
|
|
9148
9539
|
|
|
9149
|
-
function
|
|
9150
|
-
return this
|
|
9540
|
+
function color_formatHsl$1() {
|
|
9541
|
+
return hslConvert$1(this).formatHsl();
|
|
9151
9542
|
}
|
|
9152
9543
|
|
|
9153
|
-
function
|
|
9154
|
-
return
|
|
9544
|
+
function color_formatRgb$1() {
|
|
9545
|
+
return this.rgb().formatRgb();
|
|
9155
9546
|
}
|
|
9156
9547
|
|
|
9157
|
-
function
|
|
9158
|
-
return this.rgb().formatRgb();
|
|
9159
|
-
}
|
|
9160
|
-
|
|
9161
|
-
function color(format) {
|
|
9548
|
+
function color$1(format) {
|
|
9162
9549
|
var m, l;
|
|
9163
9550
|
format = (format + "").trim().toLowerCase();
|
|
9164
|
-
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
|
|
9165
|
-
: l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
9166
|
-
: l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
9167
|
-
: l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
9551
|
+
return (m = reHex$1.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$1(m) // #ff0000
|
|
9552
|
+
: l === 3 ? new Rgb$1((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
9553
|
+
: l === 8 ? rgba$1(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
9554
|
+
: l === 4 ? rgba$1((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
9168
9555
|
: null) // invalid hex
|
|
9169
|
-
: (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
9170
|
-
: (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
9171
|
-
: (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
9172
|
-
: (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
9173
|
-
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
9174
|
-
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
9175
|
-
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
9176
|
-
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
9556
|
+
: (m = reRgbInteger$1.exec(format)) ? new Rgb$1(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
9557
|
+
: (m = reRgbPercent$1.exec(format)) ? new Rgb$1(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
9558
|
+
: (m = reRgbaInteger$1.exec(format)) ? rgba$1(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
9559
|
+
: (m = reRgbaPercent$1.exec(format)) ? rgba$1(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
9560
|
+
: (m = reHslPercent$1.exec(format)) ? hsla$1(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
9561
|
+
: (m = reHslaPercent$1.exec(format)) ? hsla$1(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
9562
|
+
: named$1.hasOwnProperty(format) ? rgbn$1(named$1[format]) // eslint-disable-line no-prototype-builtins
|
|
9563
|
+
: format === "transparent" ? new Rgb$1(NaN, NaN, NaN, 0)
|
|
9177
9564
|
: null;
|
|
9178
9565
|
}
|
|
9179
9566
|
|
|
9180
|
-
function rgbn(n) {
|
|
9181
|
-
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
9567
|
+
function rgbn$1(n) {
|
|
9568
|
+
return new Rgb$1(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
9182
9569
|
}
|
|
9183
9570
|
|
|
9184
|
-
function rgba(r, g, b, a) {
|
|
9571
|
+
function rgba$1(r, g, b, a) {
|
|
9185
9572
|
if (a <= 0) r = g = b = NaN;
|
|
9186
|
-
return new Rgb(r, g, b, a);
|
|
9573
|
+
return new Rgb$1(r, g, b, a);
|
|
9187
9574
|
}
|
|
9188
9575
|
|
|
9189
|
-
function rgbConvert(o) {
|
|
9190
|
-
if (!(o instanceof Color)) o = color(o);
|
|
9191
|
-
if (!o) return new Rgb;
|
|
9576
|
+
function rgbConvert$1(o) {
|
|
9577
|
+
if (!(o instanceof Color$1)) o = color$1(o);
|
|
9578
|
+
if (!o) return new Rgb$1;
|
|
9192
9579
|
o = o.rgb();
|
|
9193
|
-
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
9580
|
+
return new Rgb$1(o.r, o.g, o.b, o.opacity);
|
|
9194
9581
|
}
|
|
9195
9582
|
|
|
9196
|
-
function rgb(r, g, b, opacity) {
|
|
9197
|
-
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
9583
|
+
function rgb$1(r, g, b, opacity) {
|
|
9584
|
+
return arguments.length === 1 ? rgbConvert$1(r) : new Rgb$1(r, g, b, opacity == null ? 1 : opacity);
|
|
9198
9585
|
}
|
|
9199
9586
|
|
|
9200
|
-
function Rgb(r, g, b, opacity) {
|
|
9587
|
+
function Rgb$1(r, g, b, opacity) {
|
|
9201
9588
|
this.r = +r;
|
|
9202
9589
|
this.g = +g;
|
|
9203
9590
|
this.b = +b;
|
|
9204
9591
|
this.opacity = +opacity;
|
|
9205
9592
|
}
|
|
9206
9593
|
|
|
9207
|
-
define(Rgb, rgb, extend(Color, {
|
|
9208
|
-
brighter(k) {
|
|
9209
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
9210
|
-
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9594
|
+
define$1(Rgb$1, rgb$1, extend$1(Color$1, {
|
|
9595
|
+
brighter: function(k) {
|
|
9596
|
+
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9597
|
+
return new Rgb$1(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9211
9598
|
},
|
|
9212
|
-
darker(k) {
|
|
9213
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
9214
|
-
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9599
|
+
darker: function(k) {
|
|
9600
|
+
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9601
|
+
return new Rgb$1(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9215
9602
|
},
|
|
9216
|
-
rgb() {
|
|
9603
|
+
rgb: function() {
|
|
9217
9604
|
return this;
|
|
9218
9605
|
},
|
|
9219
|
-
|
|
9220
|
-
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
9221
|
-
},
|
|
9222
|
-
displayable() {
|
|
9606
|
+
displayable: function() {
|
|
9223
9607
|
return (-0.5 <= this.r && this.r < 255.5)
|
|
9224
9608
|
&& (-0.5 <= this.g && this.g < 255.5)
|
|
9225
9609
|
&& (-0.5 <= this.b && this.b < 255.5)
|
|
9226
9610
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
9227
9611
|
},
|
|
9228
|
-
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
9229
|
-
formatHex: rgb_formatHex,
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
toString: rgb_formatRgb
|
|
9612
|
+
hex: rgb_formatHex$1, // Deprecated! Use color.formatHex.
|
|
9613
|
+
formatHex: rgb_formatHex$1,
|
|
9614
|
+
formatRgb: rgb_formatRgb$1,
|
|
9615
|
+
toString: rgb_formatRgb$1
|
|
9233
9616
|
}));
|
|
9234
9617
|
|
|
9235
|
-
function rgb_formatHex() {
|
|
9236
|
-
return
|
|
9237
|
-
}
|
|
9238
|
-
|
|
9239
|
-
function rgb_formatHex8() {
|
|
9240
|
-
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
9241
|
-
}
|
|
9242
|
-
|
|
9243
|
-
function rgb_formatRgb() {
|
|
9244
|
-
const a = clampa(this.opacity);
|
|
9245
|
-
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
|
9246
|
-
}
|
|
9247
|
-
|
|
9248
|
-
function clampa(opacity) {
|
|
9249
|
-
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
9618
|
+
function rgb_formatHex$1() {
|
|
9619
|
+
return "#" + hex$1(this.r) + hex$1(this.g) + hex$1(this.b);
|
|
9250
9620
|
}
|
|
9251
9621
|
|
|
9252
|
-
function
|
|
9253
|
-
|
|
9622
|
+
function rgb_formatRgb$1() {
|
|
9623
|
+
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
9624
|
+
return (a === 1 ? "rgb(" : "rgba(")
|
|
9625
|
+
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
9626
|
+
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
9627
|
+
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
9628
|
+
+ (a === 1 ? ")" : ", " + a + ")");
|
|
9254
9629
|
}
|
|
9255
9630
|
|
|
9256
|
-
function hex(value) {
|
|
9257
|
-
value =
|
|
9631
|
+
function hex$1(value) {
|
|
9632
|
+
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
9258
9633
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
9259
9634
|
}
|
|
9260
9635
|
|
|
9261
|
-
function hsla(h, s, l, a) {
|
|
9636
|
+
function hsla$1(h, s, l, a) {
|
|
9262
9637
|
if (a <= 0) h = s = l = NaN;
|
|
9263
9638
|
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
9264
9639
|
else if (s <= 0) h = NaN;
|
|
9265
|
-
return new Hsl(h, s, l, a);
|
|
9640
|
+
return new Hsl$1(h, s, l, a);
|
|
9266
9641
|
}
|
|
9267
9642
|
|
|
9268
|
-
function hslConvert(o) {
|
|
9269
|
-
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
9270
|
-
if (!(o instanceof Color)) o = color(o);
|
|
9271
|
-
if (!o) return new Hsl;
|
|
9272
|
-
if (o instanceof Hsl) return o;
|
|
9643
|
+
function hslConvert$1(o) {
|
|
9644
|
+
if (o instanceof Hsl$1) return new Hsl$1(o.h, o.s, o.l, o.opacity);
|
|
9645
|
+
if (!(o instanceof Color$1)) o = color$1(o);
|
|
9646
|
+
if (!o) return new Hsl$1;
|
|
9647
|
+
if (o instanceof Hsl$1) return o;
|
|
9273
9648
|
o = o.rgb();
|
|
9274
9649
|
var r = o.r / 255,
|
|
9275
9650
|
g = o.g / 255,
|
|
@@ -9288,78 +9663,70 @@ function hslConvert(o) {
|
|
|
9288
9663
|
} else {
|
|
9289
9664
|
s = l > 0 && l < 1 ? 0 : h;
|
|
9290
9665
|
}
|
|
9291
|
-
return new Hsl(h, s, l, o.opacity);
|
|
9666
|
+
return new Hsl$1(h, s, l, o.opacity);
|
|
9292
9667
|
}
|
|
9293
9668
|
|
|
9294
|
-
function hsl(h, s, l, opacity) {
|
|
9295
|
-
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
9669
|
+
function hsl$1(h, s, l, opacity) {
|
|
9670
|
+
return arguments.length === 1 ? hslConvert$1(h) : new Hsl$1(h, s, l, opacity == null ? 1 : opacity);
|
|
9296
9671
|
}
|
|
9297
9672
|
|
|
9298
|
-
function Hsl(h, s, l, opacity) {
|
|
9673
|
+
function Hsl$1(h, s, l, opacity) {
|
|
9299
9674
|
this.h = +h;
|
|
9300
9675
|
this.s = +s;
|
|
9301
9676
|
this.l = +l;
|
|
9302
9677
|
this.opacity = +opacity;
|
|
9303
9678
|
}
|
|
9304
9679
|
|
|
9305
|
-
define(Hsl, hsl, extend(Color, {
|
|
9306
|
-
brighter(k) {
|
|
9307
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
9308
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
9680
|
+
define$1(Hsl$1, hsl$1, extend$1(Color$1, {
|
|
9681
|
+
brighter: function(k) {
|
|
9682
|
+
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9683
|
+
return new Hsl$1(this.h, this.s, this.l * k, this.opacity);
|
|
9309
9684
|
},
|
|
9310
|
-
darker(k) {
|
|
9311
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
9312
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
9685
|
+
darker: function(k) {
|
|
9686
|
+
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9687
|
+
return new Hsl$1(this.h, this.s, this.l * k, this.opacity);
|
|
9313
9688
|
},
|
|
9314
|
-
rgb() {
|
|
9689
|
+
rgb: function() {
|
|
9315
9690
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
9316
9691
|
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
9317
9692
|
l = this.l,
|
|
9318
9693
|
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
9319
9694
|
m1 = 2 * l - m2;
|
|
9320
|
-
return new Rgb(
|
|
9321
|
-
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
9322
|
-
hsl2rgb(h, m1, m2),
|
|
9323
|
-
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
9695
|
+
return new Rgb$1(
|
|
9696
|
+
hsl2rgb$1(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
9697
|
+
hsl2rgb$1(h, m1, m2),
|
|
9698
|
+
hsl2rgb$1(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
9324
9699
|
this.opacity
|
|
9325
9700
|
);
|
|
9326
9701
|
},
|
|
9327
|
-
|
|
9328
|
-
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
9329
|
-
},
|
|
9330
|
-
displayable() {
|
|
9702
|
+
displayable: function() {
|
|
9331
9703
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
9332
9704
|
&& (0 <= this.l && this.l <= 1)
|
|
9333
9705
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
9334
9706
|
},
|
|
9335
|
-
formatHsl() {
|
|
9336
|
-
|
|
9337
|
-
return
|
|
9707
|
+
formatHsl: function() {
|
|
9708
|
+
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
9709
|
+
return (a === 1 ? "hsl(" : "hsla(")
|
|
9710
|
+
+ (this.h || 0) + ", "
|
|
9711
|
+
+ (this.s || 0) * 100 + "%, "
|
|
9712
|
+
+ (this.l || 0) * 100 + "%"
|
|
9713
|
+
+ (a === 1 ? ")" : ", " + a + ")");
|
|
9338
9714
|
}
|
|
9339
9715
|
}));
|
|
9340
9716
|
|
|
9341
|
-
function clamph(value) {
|
|
9342
|
-
value = (value || 0) % 360;
|
|
9343
|
-
return value < 0 ? value + 360 : value;
|
|
9344
|
-
}
|
|
9345
|
-
|
|
9346
|
-
function clampt(value) {
|
|
9347
|
-
return Math.max(0, Math.min(1, value || 0));
|
|
9348
|
-
}
|
|
9349
|
-
|
|
9350
9717
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
9351
|
-
function hsl2rgb(h, m1, m2) {
|
|
9718
|
+
function hsl2rgb$1(h, m1, m2) {
|
|
9352
9719
|
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
9353
9720
|
: h < 180 ? m2
|
|
9354
9721
|
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
9355
9722
|
: m1) * 255;
|
|
9356
9723
|
}
|
|
9357
9724
|
|
|
9358
|
-
|
|
9359
|
-
|
|
9725
|
+
var deg2rad$1 = Math.PI / 180;
|
|
9726
|
+
var rad2deg$1 = 180 / Math.PI;
|
|
9360
9727
|
|
|
9361
9728
|
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
9362
|
-
|
|
9729
|
+
var K = 18,
|
|
9363
9730
|
Xn = 0.96422,
|
|
9364
9731
|
Yn = 1,
|
|
9365
9732
|
Zn = 0.82521,
|
|
@@ -9371,7 +9738,7 @@ const K = 18,
|
|
|
9371
9738
|
function labConvert(o) {
|
|
9372
9739
|
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
9373
9740
|
if (o instanceof Hcl) return hcl2lab(o);
|
|
9374
|
-
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
9741
|
+
if (!(o instanceof Rgb$1)) o = rgbConvert$1(o);
|
|
9375
9742
|
var r = rgb2lrgb(o.r),
|
|
9376
9743
|
g = rgb2lrgb(o.g),
|
|
9377
9744
|
b = rgb2lrgb(o.b),
|
|
@@ -9398,21 +9765,21 @@ function Lab(l, a, b, opacity) {
|
|
|
9398
9765
|
this.opacity = +opacity;
|
|
9399
9766
|
}
|
|
9400
9767
|
|
|
9401
|
-
define(Lab, lab, extend(Color, {
|
|
9402
|
-
brighter(k) {
|
|
9768
|
+
define$1(Lab, lab, extend$1(Color$1, {
|
|
9769
|
+
brighter: function(k) {
|
|
9403
9770
|
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
9404
9771
|
},
|
|
9405
|
-
darker(k) {
|
|
9772
|
+
darker: function(k) {
|
|
9406
9773
|
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
9407
9774
|
},
|
|
9408
|
-
rgb() {
|
|
9775
|
+
rgb: function() {
|
|
9409
9776
|
var y = (this.l + 16) / 116,
|
|
9410
9777
|
x = isNaN(this.a) ? y : y + this.a / 500,
|
|
9411
9778
|
z = isNaN(this.b) ? y : y - this.b / 200;
|
|
9412
9779
|
x = Xn * lab2xyz(x);
|
|
9413
9780
|
y = Yn * lab2xyz(y);
|
|
9414
9781
|
z = Zn * lab2xyz(z);
|
|
9415
|
-
return new Rgb(
|
|
9782
|
+
return new Rgb$1(
|
|
9416
9783
|
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
9417
9784
|
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
9418
9785
|
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
@@ -9441,7 +9808,7 @@ function hclConvert(o) {
|
|
|
9441
9808
|
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
9442
9809
|
if (!(o instanceof Lab)) o = labConvert(o);
|
|
9443
9810
|
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
9444
|
-
var h = Math.atan2(o.b, o.a) *
|
|
9811
|
+
var h = Math.atan2(o.b, o.a) * rad2deg$1;
|
|
9445
9812
|
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
9446
9813
|
}
|
|
9447
9814
|
|
|
@@ -9462,75 +9829,75 @@ function Hcl(h, c, l, opacity) {
|
|
|
9462
9829
|
|
|
9463
9830
|
function hcl2lab(o) {
|
|
9464
9831
|
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
9465
|
-
var h = o.h *
|
|
9832
|
+
var h = o.h * deg2rad$1;
|
|
9466
9833
|
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
9467
9834
|
}
|
|
9468
9835
|
|
|
9469
|
-
define(Hcl, hcl, extend(Color, {
|
|
9470
|
-
brighter(k) {
|
|
9836
|
+
define$1(Hcl, hcl, extend$1(Color$1, {
|
|
9837
|
+
brighter: function(k) {
|
|
9471
9838
|
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
9472
9839
|
},
|
|
9473
|
-
darker(k) {
|
|
9840
|
+
darker: function(k) {
|
|
9474
9841
|
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
9475
9842
|
},
|
|
9476
|
-
rgb() {
|
|
9843
|
+
rgb: function() {
|
|
9477
9844
|
return hcl2lab(this).rgb();
|
|
9478
9845
|
}
|
|
9479
9846
|
}));
|
|
9480
9847
|
|
|
9481
|
-
var A = -0.14861,
|
|
9482
|
-
B = +1.78277,
|
|
9483
|
-
C = -0.29227,
|
|
9484
|
-
D = -0.90649,
|
|
9485
|
-
E = +1.97294,
|
|
9486
|
-
ED = E * D,
|
|
9487
|
-
EB = E * B,
|
|
9488
|
-
BC_DA = B * C - D * A;
|
|
9848
|
+
var A$1 = -0.14861,
|
|
9849
|
+
B$1 = +1.78277,
|
|
9850
|
+
C$1 = -0.29227,
|
|
9851
|
+
D$1 = -0.90649,
|
|
9852
|
+
E$1 = +1.97294,
|
|
9853
|
+
ED$1 = E$1 * D$1,
|
|
9854
|
+
EB$1 = E$1 * B$1,
|
|
9855
|
+
BC_DA$1 = B$1 * C$1 - D$1 * A$1;
|
|
9489
9856
|
|
|
9490
|
-
function cubehelixConvert(o) {
|
|
9491
|
-
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
|
|
9492
|
-
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
9857
|
+
function cubehelixConvert$1(o) {
|
|
9858
|
+
if (o instanceof Cubehelix$1) return new Cubehelix$1(o.h, o.s, o.l, o.opacity);
|
|
9859
|
+
if (!(o instanceof Rgb$1)) o = rgbConvert$1(o);
|
|
9493
9860
|
var r = o.r / 255,
|
|
9494
9861
|
g = o.g / 255,
|
|
9495
9862
|
b = o.b / 255,
|
|
9496
|
-
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
|
|
9863
|
+
l = (BC_DA$1 * b + ED$1 * r - EB$1 * g) / (BC_DA$1 + ED$1 - EB$1),
|
|
9497
9864
|
bl = b - l,
|
|
9498
|
-
k = (E * (g - l) - C * bl) / D,
|
|
9499
|
-
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
|
|
9500
|
-
h = s ? Math.atan2(k, bl) *
|
|
9501
|
-
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
9865
|
+
k = (E$1 * (g - l) - C$1 * bl) / D$1,
|
|
9866
|
+
s = Math.sqrt(k * k + bl * bl) / (E$1 * l * (1 - l)), // NaN if l=0 or l=1
|
|
9867
|
+
h = s ? Math.atan2(k, bl) * rad2deg$1 - 120 : NaN;
|
|
9868
|
+
return new Cubehelix$1(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
9502
9869
|
}
|
|
9503
9870
|
|
|
9504
|
-
function cubehelix$
|
|
9505
|
-
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
|
|
9871
|
+
function cubehelix$2(h, s, l, opacity) {
|
|
9872
|
+
return arguments.length === 1 ? cubehelixConvert$1(h) : new Cubehelix$1(h, s, l, opacity == null ? 1 : opacity);
|
|
9506
9873
|
}
|
|
9507
9874
|
|
|
9508
|
-
function Cubehelix(h, s, l, opacity) {
|
|
9875
|
+
function Cubehelix$1(h, s, l, opacity) {
|
|
9509
9876
|
this.h = +h;
|
|
9510
9877
|
this.s = +s;
|
|
9511
9878
|
this.l = +l;
|
|
9512
9879
|
this.opacity = +opacity;
|
|
9513
9880
|
}
|
|
9514
9881
|
|
|
9515
|
-
define(Cubehelix, cubehelix$
|
|
9516
|
-
brighter(k) {
|
|
9517
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
9518
|
-
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
9882
|
+
define$1(Cubehelix$1, cubehelix$2, extend$1(Color$1, {
|
|
9883
|
+
brighter: function(k) {
|
|
9884
|
+
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9885
|
+
return new Cubehelix$1(this.h, this.s, this.l * k, this.opacity);
|
|
9519
9886
|
},
|
|
9520
|
-
darker(k) {
|
|
9521
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
9522
|
-
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
9887
|
+
darker: function(k) {
|
|
9888
|
+
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9889
|
+
return new Cubehelix$1(this.h, this.s, this.l * k, this.opacity);
|
|
9523
9890
|
},
|
|
9524
|
-
rgb() {
|
|
9525
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) *
|
|
9891
|
+
rgb: function() {
|
|
9892
|
+
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad$1,
|
|
9526
9893
|
l = +this.l,
|
|
9527
9894
|
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
9528
9895
|
cosh = Math.cos(h),
|
|
9529
9896
|
sinh = Math.sin(h);
|
|
9530
|
-
return new Rgb(
|
|
9531
|
-
255 * (l + a * (A * cosh + B * sinh)),
|
|
9532
|
-
255 * (l + a * (C * cosh + D * sinh)),
|
|
9533
|
-
255 * (l + a * (E * cosh)),
|
|
9897
|
+
return new Rgb$1(
|
|
9898
|
+
255 * (l + a * (A$1 * cosh + B$1 * sinh)),
|
|
9899
|
+
255 * (l + a * (C$1 * cosh + D$1 * sinh)),
|
|
9900
|
+
255 * (l + a * (E$1 * cosh)),
|
|
9534
9901
|
this.opacity
|
|
9535
9902
|
);
|
|
9536
9903
|
}
|
|
@@ -9647,12 +10014,12 @@ Math.sign = Math.sign || function (x) {
|
|
|
9647
10014
|
};
|
|
9648
10015
|
|
|
9649
10016
|
var Platform = /*#__PURE__*/Object.freeze({
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
10017
|
+
__proto__: null,
|
|
10018
|
+
version: version,
|
|
10019
|
+
ieVersion: ieVersion,
|
|
10020
|
+
isIE: isIE,
|
|
10021
|
+
svgMarkerGlitch: svgMarkerGlitch,
|
|
10022
|
+
getScrollbarWidth: getScrollbarWidth
|
|
9656
10023
|
});
|
|
9657
10024
|
|
|
9658
10025
|
var Transition = /** @class */ (function () {
|
|
@@ -9794,11 +10161,11 @@ var SVGGlowFilter = /** @class */ (function () {
|
|
|
9794
10161
|
.attr("mode", "normal");
|
|
9795
10162
|
}
|
|
9796
10163
|
SVGGlowFilter.prototype.rgb2ColorMatrix = function (color) {
|
|
9797
|
-
var rgb
|
|
10164
|
+
var rgb = rgb$1(color);
|
|
9798
10165
|
return [
|
|
9799
|
-
rgb
|
|
9800
|
-
0, rgb
|
|
9801
|
-
0, 0, rgb
|
|
10166
|
+
rgb.r / 255, 0, 0, 0, rgb.r ? 1 : 0,
|
|
10167
|
+
0, rgb.g / 255, 0, 0, rgb.g ? 1 : 0,
|
|
10168
|
+
0, 0, rgb.b / 255, 0, rgb.b ? 1 : 0,
|
|
9802
10169
|
0, 0, 0, 1, 0
|
|
9803
10170
|
].join(" ");
|
|
9804
10171
|
};
|
|
@@ -10656,8 +11023,8 @@ var index = {
|
|
|
10656
11023
|
};
|
|
10657
11024
|
|
|
10658
11025
|
var _colorbrewer = /*#__PURE__*/Object.freeze({
|
|
10659
|
-
|
|
10660
|
-
|
|
11026
|
+
__proto__: null,
|
|
11027
|
+
'default': index
|
|
10661
11028
|
});
|
|
10662
11029
|
|
|
10663
11030
|
var array = Array.prototype;
|
|
@@ -11486,13 +11853,455 @@ var d3SchemeCategory20c = colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0
|
|
|
11486
11853
|
|
|
11487
11854
|
var d3SchemeCategory20 = colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");
|
|
11488
11855
|
|
|
11489
|
-
|
|
11856
|
+
function define(constructor, factory, prototype) {
|
|
11857
|
+
constructor.prototype = factory.prototype = prototype;
|
|
11858
|
+
prototype.constructor = constructor;
|
|
11859
|
+
}
|
|
11860
|
+
|
|
11861
|
+
function extend(parent, definition) {
|
|
11862
|
+
var prototype = Object.create(parent.prototype);
|
|
11863
|
+
for (var key in definition) prototype[key] = definition[key];
|
|
11864
|
+
return prototype;
|
|
11865
|
+
}
|
|
11866
|
+
|
|
11867
|
+
function Color() {}
|
|
11868
|
+
|
|
11869
|
+
var darker = 0.7;
|
|
11870
|
+
var brighter = 1 / darker;
|
|
11871
|
+
|
|
11872
|
+
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
11873
|
+
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
11874
|
+
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
11875
|
+
reHex = /^#([0-9a-f]{3,8})$/,
|
|
11876
|
+
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
11877
|
+
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
11878
|
+
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
11879
|
+
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
11880
|
+
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
11881
|
+
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
11882
|
+
|
|
11883
|
+
var named = {
|
|
11884
|
+
aliceblue: 0xf0f8ff,
|
|
11885
|
+
antiquewhite: 0xfaebd7,
|
|
11886
|
+
aqua: 0x00ffff,
|
|
11887
|
+
aquamarine: 0x7fffd4,
|
|
11888
|
+
azure: 0xf0ffff,
|
|
11889
|
+
beige: 0xf5f5dc,
|
|
11890
|
+
bisque: 0xffe4c4,
|
|
11891
|
+
black: 0x000000,
|
|
11892
|
+
blanchedalmond: 0xffebcd,
|
|
11893
|
+
blue: 0x0000ff,
|
|
11894
|
+
blueviolet: 0x8a2be2,
|
|
11895
|
+
brown: 0xa52a2a,
|
|
11896
|
+
burlywood: 0xdeb887,
|
|
11897
|
+
cadetblue: 0x5f9ea0,
|
|
11898
|
+
chartreuse: 0x7fff00,
|
|
11899
|
+
chocolate: 0xd2691e,
|
|
11900
|
+
coral: 0xff7f50,
|
|
11901
|
+
cornflowerblue: 0x6495ed,
|
|
11902
|
+
cornsilk: 0xfff8dc,
|
|
11903
|
+
crimson: 0xdc143c,
|
|
11904
|
+
cyan: 0x00ffff,
|
|
11905
|
+
darkblue: 0x00008b,
|
|
11906
|
+
darkcyan: 0x008b8b,
|
|
11907
|
+
darkgoldenrod: 0xb8860b,
|
|
11908
|
+
darkgray: 0xa9a9a9,
|
|
11909
|
+
darkgreen: 0x006400,
|
|
11910
|
+
darkgrey: 0xa9a9a9,
|
|
11911
|
+
darkkhaki: 0xbdb76b,
|
|
11912
|
+
darkmagenta: 0x8b008b,
|
|
11913
|
+
darkolivegreen: 0x556b2f,
|
|
11914
|
+
darkorange: 0xff8c00,
|
|
11915
|
+
darkorchid: 0x9932cc,
|
|
11916
|
+
darkred: 0x8b0000,
|
|
11917
|
+
darksalmon: 0xe9967a,
|
|
11918
|
+
darkseagreen: 0x8fbc8f,
|
|
11919
|
+
darkslateblue: 0x483d8b,
|
|
11920
|
+
darkslategray: 0x2f4f4f,
|
|
11921
|
+
darkslategrey: 0x2f4f4f,
|
|
11922
|
+
darkturquoise: 0x00ced1,
|
|
11923
|
+
darkviolet: 0x9400d3,
|
|
11924
|
+
deeppink: 0xff1493,
|
|
11925
|
+
deepskyblue: 0x00bfff,
|
|
11926
|
+
dimgray: 0x696969,
|
|
11927
|
+
dimgrey: 0x696969,
|
|
11928
|
+
dodgerblue: 0x1e90ff,
|
|
11929
|
+
firebrick: 0xb22222,
|
|
11930
|
+
floralwhite: 0xfffaf0,
|
|
11931
|
+
forestgreen: 0x228b22,
|
|
11932
|
+
fuchsia: 0xff00ff,
|
|
11933
|
+
gainsboro: 0xdcdcdc,
|
|
11934
|
+
ghostwhite: 0xf8f8ff,
|
|
11935
|
+
gold: 0xffd700,
|
|
11936
|
+
goldenrod: 0xdaa520,
|
|
11937
|
+
gray: 0x808080,
|
|
11938
|
+
green: 0x008000,
|
|
11939
|
+
greenyellow: 0xadff2f,
|
|
11940
|
+
grey: 0x808080,
|
|
11941
|
+
honeydew: 0xf0fff0,
|
|
11942
|
+
hotpink: 0xff69b4,
|
|
11943
|
+
indianred: 0xcd5c5c,
|
|
11944
|
+
indigo: 0x4b0082,
|
|
11945
|
+
ivory: 0xfffff0,
|
|
11946
|
+
khaki: 0xf0e68c,
|
|
11947
|
+
lavender: 0xe6e6fa,
|
|
11948
|
+
lavenderblush: 0xfff0f5,
|
|
11949
|
+
lawngreen: 0x7cfc00,
|
|
11950
|
+
lemonchiffon: 0xfffacd,
|
|
11951
|
+
lightblue: 0xadd8e6,
|
|
11952
|
+
lightcoral: 0xf08080,
|
|
11953
|
+
lightcyan: 0xe0ffff,
|
|
11954
|
+
lightgoldenrodyellow: 0xfafad2,
|
|
11955
|
+
lightgray: 0xd3d3d3,
|
|
11956
|
+
lightgreen: 0x90ee90,
|
|
11957
|
+
lightgrey: 0xd3d3d3,
|
|
11958
|
+
lightpink: 0xffb6c1,
|
|
11959
|
+
lightsalmon: 0xffa07a,
|
|
11960
|
+
lightseagreen: 0x20b2aa,
|
|
11961
|
+
lightskyblue: 0x87cefa,
|
|
11962
|
+
lightslategray: 0x778899,
|
|
11963
|
+
lightslategrey: 0x778899,
|
|
11964
|
+
lightsteelblue: 0xb0c4de,
|
|
11965
|
+
lightyellow: 0xffffe0,
|
|
11966
|
+
lime: 0x00ff00,
|
|
11967
|
+
limegreen: 0x32cd32,
|
|
11968
|
+
linen: 0xfaf0e6,
|
|
11969
|
+
magenta: 0xff00ff,
|
|
11970
|
+
maroon: 0x800000,
|
|
11971
|
+
mediumaquamarine: 0x66cdaa,
|
|
11972
|
+
mediumblue: 0x0000cd,
|
|
11973
|
+
mediumorchid: 0xba55d3,
|
|
11974
|
+
mediumpurple: 0x9370db,
|
|
11975
|
+
mediumseagreen: 0x3cb371,
|
|
11976
|
+
mediumslateblue: 0x7b68ee,
|
|
11977
|
+
mediumspringgreen: 0x00fa9a,
|
|
11978
|
+
mediumturquoise: 0x48d1cc,
|
|
11979
|
+
mediumvioletred: 0xc71585,
|
|
11980
|
+
midnightblue: 0x191970,
|
|
11981
|
+
mintcream: 0xf5fffa,
|
|
11982
|
+
mistyrose: 0xffe4e1,
|
|
11983
|
+
moccasin: 0xffe4b5,
|
|
11984
|
+
navajowhite: 0xffdead,
|
|
11985
|
+
navy: 0x000080,
|
|
11986
|
+
oldlace: 0xfdf5e6,
|
|
11987
|
+
olive: 0x808000,
|
|
11988
|
+
olivedrab: 0x6b8e23,
|
|
11989
|
+
orange: 0xffa500,
|
|
11990
|
+
orangered: 0xff4500,
|
|
11991
|
+
orchid: 0xda70d6,
|
|
11992
|
+
palegoldenrod: 0xeee8aa,
|
|
11993
|
+
palegreen: 0x98fb98,
|
|
11994
|
+
paleturquoise: 0xafeeee,
|
|
11995
|
+
palevioletred: 0xdb7093,
|
|
11996
|
+
papayawhip: 0xffefd5,
|
|
11997
|
+
peachpuff: 0xffdab9,
|
|
11998
|
+
peru: 0xcd853f,
|
|
11999
|
+
pink: 0xffc0cb,
|
|
12000
|
+
plum: 0xdda0dd,
|
|
12001
|
+
powderblue: 0xb0e0e6,
|
|
12002
|
+
purple: 0x800080,
|
|
12003
|
+
rebeccapurple: 0x663399,
|
|
12004
|
+
red: 0xff0000,
|
|
12005
|
+
rosybrown: 0xbc8f8f,
|
|
12006
|
+
royalblue: 0x4169e1,
|
|
12007
|
+
saddlebrown: 0x8b4513,
|
|
12008
|
+
salmon: 0xfa8072,
|
|
12009
|
+
sandybrown: 0xf4a460,
|
|
12010
|
+
seagreen: 0x2e8b57,
|
|
12011
|
+
seashell: 0xfff5ee,
|
|
12012
|
+
sienna: 0xa0522d,
|
|
12013
|
+
silver: 0xc0c0c0,
|
|
12014
|
+
skyblue: 0x87ceeb,
|
|
12015
|
+
slateblue: 0x6a5acd,
|
|
12016
|
+
slategray: 0x708090,
|
|
12017
|
+
slategrey: 0x708090,
|
|
12018
|
+
snow: 0xfffafa,
|
|
12019
|
+
springgreen: 0x00ff7f,
|
|
12020
|
+
steelblue: 0x4682b4,
|
|
12021
|
+
tan: 0xd2b48c,
|
|
12022
|
+
teal: 0x008080,
|
|
12023
|
+
thistle: 0xd8bfd8,
|
|
12024
|
+
tomato: 0xff6347,
|
|
12025
|
+
turquoise: 0x40e0d0,
|
|
12026
|
+
violet: 0xee82ee,
|
|
12027
|
+
wheat: 0xf5deb3,
|
|
12028
|
+
white: 0xffffff,
|
|
12029
|
+
whitesmoke: 0xf5f5f5,
|
|
12030
|
+
yellow: 0xffff00,
|
|
12031
|
+
yellowgreen: 0x9acd32
|
|
12032
|
+
};
|
|
12033
|
+
|
|
12034
|
+
define(Color, color, {
|
|
12035
|
+
copy: function(channels) {
|
|
12036
|
+
return Object.assign(new this.constructor, this, channels);
|
|
12037
|
+
},
|
|
12038
|
+
displayable: function() {
|
|
12039
|
+
return this.rgb().displayable();
|
|
12040
|
+
},
|
|
12041
|
+
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
12042
|
+
formatHex: color_formatHex,
|
|
12043
|
+
formatHsl: color_formatHsl,
|
|
12044
|
+
formatRgb: color_formatRgb,
|
|
12045
|
+
toString: color_formatRgb
|
|
12046
|
+
});
|
|
12047
|
+
|
|
12048
|
+
function color_formatHex() {
|
|
12049
|
+
return this.rgb().formatHex();
|
|
12050
|
+
}
|
|
12051
|
+
|
|
12052
|
+
function color_formatHsl() {
|
|
12053
|
+
return hslConvert(this).formatHsl();
|
|
12054
|
+
}
|
|
12055
|
+
|
|
12056
|
+
function color_formatRgb() {
|
|
12057
|
+
return this.rgb().formatRgb();
|
|
12058
|
+
}
|
|
12059
|
+
|
|
12060
|
+
function color(format) {
|
|
12061
|
+
var m, l;
|
|
12062
|
+
format = (format + "").trim().toLowerCase();
|
|
12063
|
+
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
|
|
12064
|
+
: l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
12065
|
+
: l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
12066
|
+
: l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
12067
|
+
: null) // invalid hex
|
|
12068
|
+
: (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
12069
|
+
: (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
12070
|
+
: (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
12071
|
+
: (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
12072
|
+
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
12073
|
+
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
12074
|
+
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
12075
|
+
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
12076
|
+
: null;
|
|
12077
|
+
}
|
|
12078
|
+
|
|
12079
|
+
function rgbn(n) {
|
|
12080
|
+
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
12081
|
+
}
|
|
12082
|
+
|
|
12083
|
+
function rgba(r, g, b, a) {
|
|
12084
|
+
if (a <= 0) r = g = b = NaN;
|
|
12085
|
+
return new Rgb(r, g, b, a);
|
|
12086
|
+
}
|
|
12087
|
+
|
|
12088
|
+
function rgbConvert(o) {
|
|
12089
|
+
if (!(o instanceof Color)) o = color(o);
|
|
12090
|
+
if (!o) return new Rgb;
|
|
12091
|
+
o = o.rgb();
|
|
12092
|
+
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
12093
|
+
}
|
|
12094
|
+
|
|
12095
|
+
function rgb(r, g, b, opacity) {
|
|
12096
|
+
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
12097
|
+
}
|
|
12098
|
+
|
|
12099
|
+
function Rgb(r, g, b, opacity) {
|
|
12100
|
+
this.r = +r;
|
|
12101
|
+
this.g = +g;
|
|
12102
|
+
this.b = +b;
|
|
12103
|
+
this.opacity = +opacity;
|
|
12104
|
+
}
|
|
12105
|
+
|
|
12106
|
+
define(Rgb, rgb, extend(Color, {
|
|
12107
|
+
brighter: function(k) {
|
|
12108
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
12109
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
12110
|
+
},
|
|
12111
|
+
darker: function(k) {
|
|
12112
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
12113
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
12114
|
+
},
|
|
12115
|
+
rgb: function() {
|
|
12116
|
+
return this;
|
|
12117
|
+
},
|
|
12118
|
+
displayable: function() {
|
|
12119
|
+
return (-0.5 <= this.r && this.r < 255.5)
|
|
12120
|
+
&& (-0.5 <= this.g && this.g < 255.5)
|
|
12121
|
+
&& (-0.5 <= this.b && this.b < 255.5)
|
|
12122
|
+
&& (0 <= this.opacity && this.opacity <= 1);
|
|
12123
|
+
},
|
|
12124
|
+
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
12125
|
+
formatHex: rgb_formatHex,
|
|
12126
|
+
formatRgb: rgb_formatRgb,
|
|
12127
|
+
toString: rgb_formatRgb
|
|
12128
|
+
}));
|
|
12129
|
+
|
|
12130
|
+
function rgb_formatHex() {
|
|
12131
|
+
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
12132
|
+
}
|
|
12133
|
+
|
|
12134
|
+
function rgb_formatRgb() {
|
|
12135
|
+
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
12136
|
+
return (a === 1 ? "rgb(" : "rgba(")
|
|
12137
|
+
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
12138
|
+
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
12139
|
+
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
12140
|
+
+ (a === 1 ? ")" : ", " + a + ")");
|
|
12141
|
+
}
|
|
12142
|
+
|
|
12143
|
+
function hex(value) {
|
|
12144
|
+
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
12145
|
+
return (value < 16 ? "0" : "") + value.toString(16);
|
|
12146
|
+
}
|
|
12147
|
+
|
|
12148
|
+
function hsla(h, s, l, a) {
|
|
12149
|
+
if (a <= 0) h = s = l = NaN;
|
|
12150
|
+
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
12151
|
+
else if (s <= 0) h = NaN;
|
|
12152
|
+
return new Hsl(h, s, l, a);
|
|
12153
|
+
}
|
|
12154
|
+
|
|
12155
|
+
function hslConvert(o) {
|
|
12156
|
+
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
12157
|
+
if (!(o instanceof Color)) o = color(o);
|
|
12158
|
+
if (!o) return new Hsl;
|
|
12159
|
+
if (o instanceof Hsl) return o;
|
|
12160
|
+
o = o.rgb();
|
|
12161
|
+
var r = o.r / 255,
|
|
12162
|
+
g = o.g / 255,
|
|
12163
|
+
b = o.b / 255,
|
|
12164
|
+
min = Math.min(r, g, b),
|
|
12165
|
+
max = Math.max(r, g, b),
|
|
12166
|
+
h = NaN,
|
|
12167
|
+
s = max - min,
|
|
12168
|
+
l = (max + min) / 2;
|
|
12169
|
+
if (s) {
|
|
12170
|
+
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
12171
|
+
else if (g === max) h = (b - r) / s + 2;
|
|
12172
|
+
else h = (r - g) / s + 4;
|
|
12173
|
+
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
12174
|
+
h *= 60;
|
|
12175
|
+
} else {
|
|
12176
|
+
s = l > 0 && l < 1 ? 0 : h;
|
|
12177
|
+
}
|
|
12178
|
+
return new Hsl(h, s, l, o.opacity);
|
|
12179
|
+
}
|
|
12180
|
+
|
|
12181
|
+
function hsl(h, s, l, opacity) {
|
|
12182
|
+
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
12183
|
+
}
|
|
12184
|
+
|
|
12185
|
+
function Hsl(h, s, l, opacity) {
|
|
12186
|
+
this.h = +h;
|
|
12187
|
+
this.s = +s;
|
|
12188
|
+
this.l = +l;
|
|
12189
|
+
this.opacity = +opacity;
|
|
12190
|
+
}
|
|
12191
|
+
|
|
12192
|
+
define(Hsl, hsl, extend(Color, {
|
|
12193
|
+
brighter: function(k) {
|
|
12194
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
12195
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
12196
|
+
},
|
|
12197
|
+
darker: function(k) {
|
|
12198
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
12199
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
12200
|
+
},
|
|
12201
|
+
rgb: function() {
|
|
12202
|
+
var h = this.h % 360 + (this.h < 0) * 360,
|
|
12203
|
+
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
12204
|
+
l = this.l,
|
|
12205
|
+
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
12206
|
+
m1 = 2 * l - m2;
|
|
12207
|
+
return new Rgb(
|
|
12208
|
+
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
12209
|
+
hsl2rgb(h, m1, m2),
|
|
12210
|
+
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
12211
|
+
this.opacity
|
|
12212
|
+
);
|
|
12213
|
+
},
|
|
12214
|
+
displayable: function() {
|
|
12215
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
12216
|
+
&& (0 <= this.l && this.l <= 1)
|
|
12217
|
+
&& (0 <= this.opacity && this.opacity <= 1);
|
|
12218
|
+
},
|
|
12219
|
+
formatHsl: function() {
|
|
12220
|
+
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
12221
|
+
return (a === 1 ? "hsl(" : "hsla(")
|
|
12222
|
+
+ (this.h || 0) + ", "
|
|
12223
|
+
+ (this.s || 0) * 100 + "%, "
|
|
12224
|
+
+ (this.l || 0) * 100 + "%"
|
|
12225
|
+
+ (a === 1 ? ")" : ", " + a + ")");
|
|
12226
|
+
}
|
|
12227
|
+
}));
|
|
12228
|
+
|
|
12229
|
+
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
12230
|
+
function hsl2rgb(h, m1, m2) {
|
|
12231
|
+
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
12232
|
+
: h < 180 ? m2
|
|
12233
|
+
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
12234
|
+
: m1) * 255;
|
|
12235
|
+
}
|
|
12236
|
+
|
|
12237
|
+
var deg2rad = Math.PI / 180;
|
|
12238
|
+
var rad2deg = 180 / Math.PI;
|
|
12239
|
+
|
|
12240
|
+
var A = -0.14861,
|
|
12241
|
+
B = +1.78277,
|
|
12242
|
+
C = -0.29227,
|
|
12243
|
+
D = -0.90649,
|
|
12244
|
+
E = +1.97294,
|
|
12245
|
+
ED = E * D,
|
|
12246
|
+
EB = E * B,
|
|
12247
|
+
BC_DA = B * C - D * A;
|
|
12248
|
+
|
|
12249
|
+
function cubehelixConvert(o) {
|
|
12250
|
+
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
|
|
12251
|
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
12252
|
+
var r = o.r / 255,
|
|
12253
|
+
g = o.g / 255,
|
|
12254
|
+
b = o.b / 255,
|
|
12255
|
+
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
|
|
12256
|
+
bl = b - l,
|
|
12257
|
+
k = (E * (g - l) - C * bl) / D,
|
|
12258
|
+
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
|
|
12259
|
+
h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;
|
|
12260
|
+
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
12261
|
+
}
|
|
12262
|
+
|
|
12263
|
+
function cubehelix$1(h, s, l, opacity) {
|
|
12264
|
+
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
|
|
12265
|
+
}
|
|
12266
|
+
|
|
12267
|
+
function Cubehelix(h, s, l, opacity) {
|
|
12268
|
+
this.h = +h;
|
|
12269
|
+
this.s = +s;
|
|
12270
|
+
this.l = +l;
|
|
12271
|
+
this.opacity = +opacity;
|
|
12272
|
+
}
|
|
12273
|
+
|
|
12274
|
+
define(Cubehelix, cubehelix$1, extend(Color, {
|
|
12275
|
+
brighter: function(k) {
|
|
12276
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
12277
|
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
12278
|
+
},
|
|
12279
|
+
darker: function(k) {
|
|
12280
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
12281
|
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
12282
|
+
},
|
|
12283
|
+
rgb: function() {
|
|
12284
|
+
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,
|
|
12285
|
+
l = +this.l,
|
|
12286
|
+
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
12287
|
+
cosh = Math.cos(h),
|
|
12288
|
+
sinh = Math.sin(h);
|
|
12289
|
+
return new Rgb(
|
|
12290
|
+
255 * (l + a * (A * cosh + B * sinh)),
|
|
12291
|
+
255 * (l + a * (C * cosh + D * sinh)),
|
|
12292
|
+
255 * (l + a * (E * cosh)),
|
|
12293
|
+
this.opacity
|
|
12294
|
+
);
|
|
12295
|
+
}
|
|
12296
|
+
}));
|
|
12297
|
+
|
|
12298
|
+
var cubehelix = cubehelixLong(cubehelix$1(300, 0.5, 0.0), cubehelix$1(-240, 0.5, 1.0));
|
|
11490
12299
|
|
|
11491
|
-
var warm = cubehelixLong(cubehelix$
|
|
12300
|
+
var warm = cubehelixLong(cubehelix$1(-100, 0.75, 0.35), cubehelix$1(80, 1.50, 0.8));
|
|
11492
12301
|
|
|
11493
|
-
var cool = cubehelixLong(cubehelix$
|
|
12302
|
+
var cool = cubehelixLong(cubehelix$1(260, 0.75, 0.35), cubehelix$1(80, 1.50, 0.8));
|
|
11494
12303
|
|
|
11495
|
-
var rainbow$1 = cubehelix$
|
|
12304
|
+
var rainbow$1 = cubehelix$1();
|
|
11496
12305
|
|
|
11497
12306
|
function rainbow$2(t) {
|
|
11498
12307
|
if (t < 0 || t > 1) t -= Math.floor(t);
|
|
@@ -11841,26 +12650,26 @@ m_colorbrewer.RdWhGr = {
|
|
|
11841
12650
|
var ordinal = fetchOrdinalItem;
|
|
11842
12651
|
var rainbow = fetchRainbowItem;
|
|
11843
12652
|
function textColor(backgroundColor) {
|
|
11844
|
-
var rgb
|
|
12653
|
+
var rgb;
|
|
11845
12654
|
switch (backgroundColor) {
|
|
11846
12655
|
case "":
|
|
11847
12656
|
case "transparent":
|
|
11848
|
-
rgb
|
|
12657
|
+
rgb = rgb$1("white");
|
|
11849
12658
|
break;
|
|
11850
12659
|
default:
|
|
11851
|
-
rgb
|
|
12660
|
+
rgb = rgb$1(backgroundColor);
|
|
11852
12661
|
}
|
|
11853
|
-
return ((rgb
|
|
12662
|
+
return ((rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114) > 149) ? "black" : "white";
|
|
11854
12663
|
}
|
|
11855
12664
|
|
|
11856
12665
|
var Palette = /*#__PURE__*/Object.freeze({
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
12666
|
+
__proto__: null,
|
|
12667
|
+
fetchOrdinalItem: fetchOrdinalItem,
|
|
12668
|
+
fetchRainbowItem: fetchRainbowItem,
|
|
12669
|
+
test: test,
|
|
12670
|
+
ordinal: ordinal,
|
|
12671
|
+
rainbow: rainbow,
|
|
12672
|
+
textColor: textColor
|
|
11864
12673
|
});
|
|
11865
12674
|
|
|
11866
12675
|
var css_248z$9 = ".common_Shape{fill:#1f77b4;stroke:#1f77b4}";
|
|
@@ -15634,5 +16443,5 @@ function brush$1(dim) {
|
|
|
15634
16443
|
|
|
15635
16444
|
var d3Event = function () { return event; };
|
|
15636
16445
|
|
|
15637
|
-
export { BUILD_VERSION, Button, CanvasWidget, Class, Database, Entity, EntityCard, EntityPin, EntityRect, EntityRectList, EntityVertex, FAChar, FormatSpecifier, HTMLWidget, Icon, IconBar, Image$1 as Image, List, Menu, Meta, PKG_NAME, PKG_VERSION, Palette, Platform, ProgressBar, PropertyExt, ResizeSurface, SVGGlowFilter, SVGWidget, SVGZoomWidget, SelectDropDown, SelectionBar, SelectionButton, Shape, Spacer, StickyButton, Surface, Text, TextBox, TitleBar, ToggleButton, Utility, Widget, WidgetArray, active, ascending, autoType, bisectRight as bisect, bisectLeft, bisectRight, bisector, brush, brushSelection, brushX, brushY, point$1 as clientPoint, color, create$1 as create, creator, cross, csvFormat, csvFormatBody, csvFormatRow, csvFormatRows, csvFormatValue, csvParse, csvParseRows, cubehelix$
|
|
16446
|
+
export { BUILD_VERSION, Button, CanvasWidget, Class, Database, Entity, EntityCard, EntityPin, EntityRect, EntityRectList, EntityVertex, FAChar, FormatSpecifier, HTMLWidget, Icon, IconBar, Image$1 as Image, List, Menu, Meta, PKG_NAME, PKG_VERSION, Palette, Platform, ProgressBar, PropertyExt, ResizeSurface, SVGGlowFilter, SVGWidget, SVGZoomWidget, SelectDropDown, SelectionBar, SelectionButton, Shape, Spacer, StickyButton, Surface, Text, TextBox, TitleBar, ToggleButton, Utility, Widget, WidgetArray, active, ascending, autoType, bisectRight as bisect, bisectLeft, bisectRight, bisector, brush, brushSelection, brushX, brushY, point$1 as clientPoint, color$1 as color, create$1 as create, creator, cross, csvFormat, csvFormatBody, csvFormatRow, csvFormatRows, csvFormatValue, csvParse, csvParseRows, cubehelix$2 as cubehelix, customEvent, d3Event, d3Descending as descending, d3Deviation as deviation, dispatch, d3Drag as drag, dragDisable, yesdrag as dragEnable, dsv as dsvFormat, backInOut as easeBack, backIn as easeBackIn, backInOut as easeBackInOut, backOut as easeBackOut, bounceOut as easeBounce, bounceIn as easeBounceIn, bounceInOut as easeBounceInOut, bounceOut as easeBounceOut, circleInOut as easeCircle, circleIn as easeCircleIn, circleInOut as easeCircleInOut, circleOut as easeCircleOut, cubicInOut as easeCubic, cubicIn as easeCubicIn, cubicInOut as easeCubicInOut, cubicOut as easeCubicOut, elasticOut as easeElastic, elasticIn as easeElasticIn, elasticInOut as easeElasticInOut, elasticOut as easeElasticOut, expInOut as easeExp, expIn as easeExpIn, expInOut as easeExpInOut, expOut as easeExpOut, linear$1 as easeLinear, polyInOut as easePoly, polyIn as easePolyIn, polyInOut as easePolyInOut, polyOut as easePolyOut, quadInOut as easeQuad, quadIn as easeQuadIn, quadInOut as easeQuadInOut, quadOut as easeQuadOut, sinInOut as easeSin, sinIn as easeSinIn, sinInOut as easeSinInOut, sinOut as easeSinOut, entries, event, extent, fontAwsesomeStyle, format, defaultLocale$1 as formatDefaultLocale, formatLocale$1 as formatLocale, formatPrefix, formatSpecifier, gray, hcl, histogram, hsl$1 as hsl, interpolate$1 as interpolate, array$2 as interpolateArray, basis$1 as interpolateBasis, basisClosed as interpolateBasisClosed, cool as interpolateCool, cubehelix$4 as interpolateCubehelix, cubehelix as interpolateCubehelixDefault, cubehelixLong as interpolateCubehelixLong, date$1 as interpolateDate, discrete as interpolateDiscrete, hcl$2 as interpolateHcl, hclLong as interpolateHclLong, hsl$4 as interpolateHsl, hslLong as interpolateHslLong, hue as interpolateHue, inferno as interpolateInferno, lab$1 as interpolateLab, magma as interpolateMagma, reinterpolate$1 as interpolateNumber, numberArray as interpolateNumberArray, object as interpolateObject, plasma as interpolatePlasma, rainbow$2 as interpolateRainbow, interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, d3InterpolateViridis as interpolateViridis, warm as interpolateWarm, interpolateZoom, interrupt, formatIso$1 as isoFormat, parseIso$1 as isoParse, keys, lab, lch, local$1 as local, map$2 as map, matcher, d3Max as max, d3Mean as mean, d3Median as median, merge, d3Min as min, mouse, namespace, namespaces, d3Nest as nest, pairs, permute, piecewise, precisionFixed, precisionPrefix, precisionRound, publish, publishProxy, threshold$1 as quantile, quantize$1 as quantize, sequence as range, rgb$1 as rgb, band as scaleBand, identity$1 as scaleIdentity, implicit as scaleImplicit, linear as scaleLinear, log as scaleLog, ordinal$1 as scaleOrdinal, point as scalePoint, pow as scalePow, quantile as scaleQuantile, quantize as scaleQuantize, sequential as scaleSequential, sqrt as scaleSqrt, threshold as scaleThreshold, time as scaleTime, utcTime as scaleUtc, scan, d3SchemeCategory10 as schemeCategory10, d3SchemeCategory20 as schemeCategory20, d3SchemeCategory20b as schemeCategory20b, d3SchemeCategory20c as schemeCategory20c, select, selectAll, selection, selector, selectorAll, set, shuffle, styleValue as style, d3Sum as sum, freedmanDiaconis as thresholdFreedmanDiaconis, scott as thresholdScott, sturges as thresholdSturges, tickIncrement, tickStep, ticks, timeFormat, defaultLocale as timeFormatDefaultLocale, formatLocale as timeFormatLocale, timeParse, touch, touches, transition, transpose, tsvFormat, tsvFormatBody, tsvFormatRow, tsvFormatRows, tsvFormatValue, tsvParse, tsvParseRows, utcFormat, utcParse, d3Values as values, d3Variance as variance, defaultView as window, zip, d3Zoom as zoom, identity as zoomIdentity, transform as zoomTransform };
|
|
15638
16447
|
//# sourceMappingURL=index.es6.js.map
|