@hpcc-js/common 2.71.14 → 2.71.16
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 +1297 -2527
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +1315 -2545
- 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 +4 -4
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
})(this, (function (exports, util) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/common";
|
|
8
|
-
var PKG_VERSION = "2.71.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.71.16";
|
|
9
|
+
var BUILD_VERSION = "2.105.6";
|
|
10
10
|
|
|
11
11
|
/******************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1420,34 +1420,34 @@
|
|
|
1420
1420
|
});
|
|
1421
1421
|
}
|
|
1422
1422
|
|
|
1423
|
-
function define
|
|
1423
|
+
function define(constructor, factory, prototype) {
|
|
1424
1424
|
constructor.prototype = factory.prototype = prototype;
|
|
1425
1425
|
prototype.constructor = constructor;
|
|
1426
1426
|
}
|
|
1427
1427
|
|
|
1428
|
-
function extend
|
|
1428
|
+
function extend(parent, definition) {
|
|
1429
1429
|
var prototype = Object.create(parent.prototype);
|
|
1430
1430
|
for (var key in definition) prototype[key] = definition[key];
|
|
1431
1431
|
return prototype;
|
|
1432
1432
|
}
|
|
1433
1433
|
|
|
1434
|
-
function Color
|
|
1434
|
+
function Color() {}
|
|
1435
1435
|
|
|
1436
|
-
var darker
|
|
1437
|
-
var brighter
|
|
1436
|
+
var darker = 0.7;
|
|
1437
|
+
var brighter = 1 / darker;
|
|
1438
1438
|
|
|
1439
|
-
var reI
|
|
1440
|
-
reN
|
|
1441
|
-
reP
|
|
1442
|
-
reHex
|
|
1443
|
-
reRgbInteger
|
|
1444
|
-
reRgbPercent
|
|
1445
|
-
reRgbaInteger
|
|
1446
|
-
reRgbaPercent
|
|
1447
|
-
reHslPercent
|
|
1448
|
-
reHslaPercent
|
|
1439
|
+
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
1440
|
+
reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
1441
|
+
reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
1442
|
+
reHex = /^#([0-9a-f]{3,8})$/,
|
|
1443
|
+
reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
|
|
1444
|
+
reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
|
|
1445
|
+
reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
|
|
1446
|
+
reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
|
|
1447
|
+
reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
|
|
1448
|
+
reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
|
1449
1449
|
|
|
1450
|
-
var named
|
|
1450
|
+
var named = {
|
|
1451
1451
|
aliceblue: 0xf0f8ff,
|
|
1452
1452
|
antiquewhite: 0xfaebd7,
|
|
1453
1453
|
aqua: 0x00ffff,
|
|
@@ -1598,132 +1598,149 @@
|
|
|
1598
1598
|
yellowgreen: 0x9acd32
|
|
1599
1599
|
};
|
|
1600
1600
|
|
|
1601
|
-
define
|
|
1602
|
-
copy
|
|
1601
|
+
define(Color, color, {
|
|
1602
|
+
copy(channels) {
|
|
1603
1603
|
return Object.assign(new this.constructor, this, channels);
|
|
1604
1604
|
},
|
|
1605
|
-
displayable
|
|
1605
|
+
displayable() {
|
|
1606
1606
|
return this.rgb().displayable();
|
|
1607
1607
|
},
|
|
1608
|
-
hex: color_formatHex
|
|
1609
|
-
formatHex: color_formatHex
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1608
|
+
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
1609
|
+
formatHex: color_formatHex,
|
|
1610
|
+
formatHex8: color_formatHex8,
|
|
1611
|
+
formatHsl: color_formatHsl,
|
|
1612
|
+
formatRgb: color_formatRgb,
|
|
1613
|
+
toString: color_formatRgb
|
|
1613
1614
|
});
|
|
1614
1615
|
|
|
1615
|
-
function color_formatHex
|
|
1616
|
+
function color_formatHex() {
|
|
1616
1617
|
return this.rgb().formatHex();
|
|
1617
1618
|
}
|
|
1618
1619
|
|
|
1619
|
-
function
|
|
1620
|
-
return
|
|
1620
|
+
function color_formatHex8() {
|
|
1621
|
+
return this.rgb().formatHex8();
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
function color_formatHsl() {
|
|
1625
|
+
return hslConvert(this).formatHsl();
|
|
1621
1626
|
}
|
|
1622
1627
|
|
|
1623
|
-
function color_formatRgb
|
|
1628
|
+
function color_formatRgb() {
|
|
1624
1629
|
return this.rgb().formatRgb();
|
|
1625
1630
|
}
|
|
1626
1631
|
|
|
1627
|
-
function color
|
|
1632
|
+
function color(format) {
|
|
1628
1633
|
var m, l;
|
|
1629
1634
|
format = (format + "").trim().toLowerCase();
|
|
1630
|
-
return (m = reHex
|
|
1631
|
-
: l === 3 ? new Rgb
|
|
1632
|
-
: l === 8 ? rgba
|
|
1633
|
-
: l === 4 ? rgba
|
|
1635
|
+
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
|
|
1636
|
+
: l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
1637
|
+
: l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
1638
|
+
: 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
|
|
1634
1639
|
: null) // invalid hex
|
|
1635
|
-
: (m = reRgbInteger
|
|
1636
|
-
: (m = reRgbPercent
|
|
1637
|
-
: (m = reRgbaInteger
|
|
1638
|
-
: (m = reRgbaPercent
|
|
1639
|
-
: (m = reHslPercent
|
|
1640
|
-
: (m = reHslaPercent
|
|
1641
|
-
: named
|
|
1642
|
-
: format === "transparent" ? new Rgb
|
|
1640
|
+
: (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
1641
|
+
: (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
1642
|
+
: (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
1643
|
+
: (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
1644
|
+
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
1645
|
+
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
1646
|
+
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
1647
|
+
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
1643
1648
|
: null;
|
|
1644
1649
|
}
|
|
1645
1650
|
|
|
1646
|
-
function rgbn
|
|
1647
|
-
return new Rgb
|
|
1651
|
+
function rgbn(n) {
|
|
1652
|
+
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
1648
1653
|
}
|
|
1649
1654
|
|
|
1650
|
-
function rgba
|
|
1655
|
+
function rgba(r, g, b, a) {
|
|
1651
1656
|
if (a <= 0) r = g = b = NaN;
|
|
1652
|
-
return new Rgb
|
|
1657
|
+
return new Rgb(r, g, b, a);
|
|
1653
1658
|
}
|
|
1654
1659
|
|
|
1655
|
-
function rgbConvert
|
|
1656
|
-
if (!(o instanceof Color
|
|
1657
|
-
if (!o) return new Rgb
|
|
1660
|
+
function rgbConvert(o) {
|
|
1661
|
+
if (!(o instanceof Color)) o = color(o);
|
|
1662
|
+
if (!o) return new Rgb;
|
|
1658
1663
|
o = o.rgb();
|
|
1659
|
-
return new Rgb
|
|
1664
|
+
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
1660
1665
|
}
|
|
1661
1666
|
|
|
1662
|
-
function rgb
|
|
1663
|
-
return arguments.length === 1 ? rgbConvert
|
|
1667
|
+
function rgb(r, g, b, opacity) {
|
|
1668
|
+
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
1664
1669
|
}
|
|
1665
1670
|
|
|
1666
|
-
function Rgb
|
|
1671
|
+
function Rgb(r, g, b, opacity) {
|
|
1667
1672
|
this.r = +r;
|
|
1668
1673
|
this.g = +g;
|
|
1669
1674
|
this.b = +b;
|
|
1670
1675
|
this.opacity = +opacity;
|
|
1671
1676
|
}
|
|
1672
1677
|
|
|
1673
|
-
define
|
|
1674
|
-
brighter
|
|
1675
|
-
k = k == null ? brighter
|
|
1676
|
-
return new Rgb
|
|
1678
|
+
define(Rgb, rgb, extend(Color, {
|
|
1679
|
+
brighter(k) {
|
|
1680
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1681
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1677
1682
|
},
|
|
1678
|
-
darker
|
|
1679
|
-
k = k == null ? darker
|
|
1680
|
-
return new Rgb
|
|
1683
|
+
darker(k) {
|
|
1684
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
1685
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
1681
1686
|
},
|
|
1682
|
-
rgb
|
|
1687
|
+
rgb() {
|
|
1683
1688
|
return this;
|
|
1684
1689
|
},
|
|
1685
|
-
|
|
1690
|
+
clamp() {
|
|
1691
|
+
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
1692
|
+
},
|
|
1693
|
+
displayable() {
|
|
1686
1694
|
return (-0.5 <= this.r && this.r < 255.5)
|
|
1687
1695
|
&& (-0.5 <= this.g && this.g < 255.5)
|
|
1688
1696
|
&& (-0.5 <= this.b && this.b < 255.5)
|
|
1689
1697
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
1690
1698
|
},
|
|
1691
|
-
hex: rgb_formatHex
|
|
1692
|
-
formatHex: rgb_formatHex
|
|
1693
|
-
|
|
1694
|
-
|
|
1699
|
+
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
1700
|
+
formatHex: rgb_formatHex,
|
|
1701
|
+
formatHex8: rgb_formatHex8,
|
|
1702
|
+
formatRgb: rgb_formatRgb,
|
|
1703
|
+
toString: rgb_formatRgb
|
|
1695
1704
|
}));
|
|
1696
1705
|
|
|
1697
|
-
function rgb_formatHex
|
|
1698
|
-
return
|
|
1706
|
+
function rgb_formatHex() {
|
|
1707
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
function rgb_formatHex8() {
|
|
1711
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
function rgb_formatRgb() {
|
|
1715
|
+
const a = clampa(this.opacity);
|
|
1716
|
+
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
function clampa(opacity) {
|
|
1720
|
+
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
1699
1721
|
}
|
|
1700
1722
|
|
|
1701
|
-
function
|
|
1702
|
-
|
|
1703
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
1704
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
1705
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
1706
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
1707
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
1723
|
+
function clampi(value) {
|
|
1724
|
+
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
1708
1725
|
}
|
|
1709
1726
|
|
|
1710
|
-
function hex
|
|
1711
|
-
value =
|
|
1727
|
+
function hex(value) {
|
|
1728
|
+
value = clampi(value);
|
|
1712
1729
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
1713
1730
|
}
|
|
1714
1731
|
|
|
1715
|
-
function hsla
|
|
1732
|
+
function hsla(h, s, l, a) {
|
|
1716
1733
|
if (a <= 0) h = s = l = NaN;
|
|
1717
1734
|
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
1718
1735
|
else if (s <= 0) h = NaN;
|
|
1719
|
-
return new Hsl
|
|
1736
|
+
return new Hsl(h, s, l, a);
|
|
1720
1737
|
}
|
|
1721
1738
|
|
|
1722
|
-
function hslConvert
|
|
1723
|
-
if (o instanceof Hsl
|
|
1724
|
-
if (!(o instanceof Color
|
|
1725
|
-
if (!o) return new Hsl
|
|
1726
|
-
if (o instanceof Hsl
|
|
1739
|
+
function hslConvert(o) {
|
|
1740
|
+
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
1741
|
+
if (!(o instanceof Color)) o = color(o);
|
|
1742
|
+
if (!o) return new Hsl;
|
|
1743
|
+
if (o instanceof Hsl) return o;
|
|
1727
1744
|
o = o.rgb();
|
|
1728
1745
|
var r = o.r / 255,
|
|
1729
1746
|
g = o.g / 255,
|
|
@@ -1742,233 +1759,249 @@
|
|
|
1742
1759
|
} else {
|
|
1743
1760
|
s = l > 0 && l < 1 ? 0 : h;
|
|
1744
1761
|
}
|
|
1745
|
-
return new Hsl
|
|
1762
|
+
return new Hsl(h, s, l, o.opacity);
|
|
1746
1763
|
}
|
|
1747
1764
|
|
|
1748
|
-
function hsl$
|
|
1749
|
-
return arguments.length === 1 ? hslConvert
|
|
1765
|
+
function hsl$2(h, s, l, opacity) {
|
|
1766
|
+
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
1750
1767
|
}
|
|
1751
1768
|
|
|
1752
|
-
function Hsl
|
|
1769
|
+
function Hsl(h, s, l, opacity) {
|
|
1753
1770
|
this.h = +h;
|
|
1754
1771
|
this.s = +s;
|
|
1755
1772
|
this.l = +l;
|
|
1756
1773
|
this.opacity = +opacity;
|
|
1757
1774
|
}
|
|
1758
1775
|
|
|
1759
|
-
define
|
|
1760
|
-
brighter
|
|
1761
|
-
k = k == null ? brighter
|
|
1762
|
-
return new Hsl
|
|
1776
|
+
define(Hsl, hsl$2, extend(Color, {
|
|
1777
|
+
brighter(k) {
|
|
1778
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1779
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
1763
1780
|
},
|
|
1764
|
-
darker
|
|
1765
|
-
k = k == null ? darker
|
|
1766
|
-
return new Hsl
|
|
1781
|
+
darker(k) {
|
|
1782
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
1783
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
1767
1784
|
},
|
|
1768
|
-
rgb
|
|
1785
|
+
rgb() {
|
|
1769
1786
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
1770
1787
|
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
1771
1788
|
l = this.l,
|
|
1772
1789
|
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
1773
1790
|
m1 = 2 * l - m2;
|
|
1774
|
-
return new Rgb
|
|
1775
|
-
hsl2rgb
|
|
1776
|
-
hsl2rgb
|
|
1777
|
-
hsl2rgb
|
|
1791
|
+
return new Rgb(
|
|
1792
|
+
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
1793
|
+
hsl2rgb(h, m1, m2),
|
|
1794
|
+
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
1778
1795
|
this.opacity
|
|
1779
1796
|
);
|
|
1780
1797
|
},
|
|
1781
|
-
|
|
1798
|
+
clamp() {
|
|
1799
|
+
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
1800
|
+
},
|
|
1801
|
+
displayable() {
|
|
1782
1802
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
1783
1803
|
&& (0 <= this.l && this.l <= 1)
|
|
1784
1804
|
&& (0 <= this.opacity && this.opacity <= 1);
|
|
1785
1805
|
},
|
|
1786
|
-
formatHsl
|
|
1787
|
-
|
|
1788
|
-
return
|
|
1789
|
-
+ (this.h || 0) + ", "
|
|
1790
|
-
+ (this.s || 0) * 100 + "%, "
|
|
1791
|
-
+ (this.l || 0) * 100 + "%"
|
|
1792
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
1806
|
+
formatHsl() {
|
|
1807
|
+
const a = clampa(this.opacity);
|
|
1808
|
+
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
|
1793
1809
|
}
|
|
1794
1810
|
}));
|
|
1795
1811
|
|
|
1812
|
+
function clamph(value) {
|
|
1813
|
+
value = (value || 0) % 360;
|
|
1814
|
+
return value < 0 ? value + 360 : value;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
function clampt(value) {
|
|
1818
|
+
return Math.max(0, Math.min(1, value || 0));
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1796
1821
|
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
1797
|
-
function hsl2rgb
|
|
1822
|
+
function hsl2rgb(h, m1, m2) {
|
|
1798
1823
|
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
1799
1824
|
: h < 180 ? m2
|
|
1800
1825
|
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
1801
1826
|
: m1) * 255;
|
|
1802
1827
|
}
|
|
1803
1828
|
|
|
1804
|
-
|
|
1805
|
-
|
|
1829
|
+
const radians = Math.PI / 180;
|
|
1830
|
+
const degrees$1 = 180 / Math.PI;
|
|
1806
1831
|
|
|
1807
1832
|
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
1808
|
-
|
|
1809
|
-
Xn
|
|
1810
|
-
Yn
|
|
1811
|
-
Zn
|
|
1812
|
-
t0$
|
|
1813
|
-
t1$
|
|
1814
|
-
t2
|
|
1815
|
-
t3
|
|
1816
|
-
|
|
1817
|
-
function labConvert
|
|
1818
|
-
if (o instanceof Lab
|
|
1819
|
-
if (o instanceof Hcl
|
|
1820
|
-
if (!(o instanceof Rgb
|
|
1821
|
-
var r = rgb2lrgb
|
|
1822
|
-
g = rgb2lrgb
|
|
1823
|
-
b = rgb2lrgb
|
|
1824
|
-
y = xyz2lab
|
|
1833
|
+
const K = 18,
|
|
1834
|
+
Xn = 0.96422,
|
|
1835
|
+
Yn = 1,
|
|
1836
|
+
Zn = 0.82521,
|
|
1837
|
+
t0$1 = 4 / 29,
|
|
1838
|
+
t1$1 = 6 / 29,
|
|
1839
|
+
t2 = 3 * t1$1 * t1$1,
|
|
1840
|
+
t3 = t1$1 * t1$1 * t1$1;
|
|
1841
|
+
|
|
1842
|
+
function labConvert(o) {
|
|
1843
|
+
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
1844
|
+
if (o instanceof Hcl) return hcl2lab(o);
|
|
1845
|
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
1846
|
+
var r = rgb2lrgb(o.r),
|
|
1847
|
+
g = rgb2lrgb(o.g),
|
|
1848
|
+
b = rgb2lrgb(o.b),
|
|
1849
|
+
y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
|
1825
1850
|
if (r === g && g === b) x = z = y; else {
|
|
1826
|
-
x = xyz2lab
|
|
1827
|
-
z = xyz2lab
|
|
1851
|
+
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
|
1852
|
+
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
|
1828
1853
|
}
|
|
1829
|
-
return new Lab
|
|
1854
|
+
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
function gray(l, opacity) {
|
|
1858
|
+
return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
|
|
1830
1859
|
}
|
|
1831
1860
|
|
|
1832
|
-
function lab$
|
|
1833
|
-
return arguments.length === 1 ? labConvert
|
|
1861
|
+
function lab$1(l, a, b, opacity) {
|
|
1862
|
+
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
|
1834
1863
|
}
|
|
1835
1864
|
|
|
1836
|
-
function Lab
|
|
1865
|
+
function Lab(l, a, b, opacity) {
|
|
1837
1866
|
this.l = +l;
|
|
1838
1867
|
this.a = +a;
|
|
1839
1868
|
this.b = +b;
|
|
1840
1869
|
this.opacity = +opacity;
|
|
1841
1870
|
}
|
|
1842
1871
|
|
|
1843
|
-
define
|
|
1844
|
-
brighter
|
|
1845
|
-
return new Lab
|
|
1872
|
+
define(Lab, lab$1, extend(Color, {
|
|
1873
|
+
brighter(k) {
|
|
1874
|
+
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
1846
1875
|
},
|
|
1847
|
-
darker
|
|
1848
|
-
return new Lab
|
|
1876
|
+
darker(k) {
|
|
1877
|
+
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
1849
1878
|
},
|
|
1850
|
-
rgb
|
|
1879
|
+
rgb() {
|
|
1851
1880
|
var y = (this.l + 16) / 116,
|
|
1852
1881
|
x = isNaN(this.a) ? y : y + this.a / 500,
|
|
1853
1882
|
z = isNaN(this.b) ? y : y - this.b / 200;
|
|
1854
|
-
x = Xn
|
|
1855
|
-
y = Yn
|
|
1856
|
-
z = Zn
|
|
1857
|
-
return new Rgb
|
|
1858
|
-
lrgb2rgb
|
|
1859
|
-
lrgb2rgb
|
|
1860
|
-
lrgb2rgb
|
|
1883
|
+
x = Xn * lab2xyz(x);
|
|
1884
|
+
y = Yn * lab2xyz(y);
|
|
1885
|
+
z = Zn * lab2xyz(z);
|
|
1886
|
+
return new Rgb(
|
|
1887
|
+
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
1888
|
+
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
1889
|
+
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
1861
1890
|
this.opacity
|
|
1862
1891
|
);
|
|
1863
1892
|
}
|
|
1864
1893
|
}));
|
|
1865
1894
|
|
|
1866
|
-
function xyz2lab
|
|
1867
|
-
return t > t3
|
|
1895
|
+
function xyz2lab(t) {
|
|
1896
|
+
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0$1;
|
|
1868
1897
|
}
|
|
1869
1898
|
|
|
1870
|
-
function lab2xyz
|
|
1871
|
-
return t > t1$
|
|
1899
|
+
function lab2xyz(t) {
|
|
1900
|
+
return t > t1$1 ? t * t * t : t2 * (t - t0$1);
|
|
1872
1901
|
}
|
|
1873
1902
|
|
|
1874
|
-
function lrgb2rgb
|
|
1903
|
+
function lrgb2rgb(x) {
|
|
1875
1904
|
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
|
1876
1905
|
}
|
|
1877
1906
|
|
|
1878
|
-
function rgb2lrgb
|
|
1907
|
+
function rgb2lrgb(x) {
|
|
1879
1908
|
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
1880
1909
|
}
|
|
1881
1910
|
|
|
1882
|
-
function hclConvert
|
|
1883
|
-
if (o instanceof Hcl
|
|
1884
|
-
if (!(o instanceof Lab
|
|
1885
|
-
if (o.a === 0 && o.b === 0) return new Hcl
|
|
1886
|
-
var h = Math.atan2(o.b, o.a) *
|
|
1887
|
-
return new Hcl
|
|
1911
|
+
function hclConvert(o) {
|
|
1912
|
+
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
1913
|
+
if (!(o instanceof Lab)) o = labConvert(o);
|
|
1914
|
+
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
1915
|
+
var h = Math.atan2(o.b, o.a) * degrees$1;
|
|
1916
|
+
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
function lch(l, c, h, opacity) {
|
|
1920
|
+
return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
1888
1921
|
}
|
|
1889
1922
|
|
|
1890
|
-
function hcl$
|
|
1891
|
-
return arguments.length === 1 ? hclConvert
|
|
1923
|
+
function hcl$2(h, c, l, opacity) {
|
|
1924
|
+
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
1892
1925
|
}
|
|
1893
1926
|
|
|
1894
|
-
function Hcl
|
|
1927
|
+
function Hcl(h, c, l, opacity) {
|
|
1895
1928
|
this.h = +h;
|
|
1896
1929
|
this.c = +c;
|
|
1897
1930
|
this.l = +l;
|
|
1898
1931
|
this.opacity = +opacity;
|
|
1899
1932
|
}
|
|
1900
1933
|
|
|
1901
|
-
function hcl2lab
|
|
1902
|
-
if (isNaN(o.h)) return new Lab
|
|
1903
|
-
var h = o.h *
|
|
1904
|
-
return new Lab
|
|
1934
|
+
function hcl2lab(o) {
|
|
1935
|
+
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
1936
|
+
var h = o.h * radians;
|
|
1937
|
+
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
1905
1938
|
}
|
|
1906
1939
|
|
|
1907
|
-
define
|
|
1908
|
-
brighter
|
|
1909
|
-
return new Hcl
|
|
1940
|
+
define(Hcl, hcl$2, extend(Color, {
|
|
1941
|
+
brighter(k) {
|
|
1942
|
+
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
1910
1943
|
},
|
|
1911
|
-
darker
|
|
1912
|
-
return new Hcl
|
|
1944
|
+
darker(k) {
|
|
1945
|
+
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
1913
1946
|
},
|
|
1914
|
-
rgb
|
|
1915
|
-
return hcl2lab
|
|
1947
|
+
rgb() {
|
|
1948
|
+
return hcl2lab(this).rgb();
|
|
1916
1949
|
}
|
|
1917
1950
|
}));
|
|
1918
1951
|
|
|
1919
|
-
var A
|
|
1920
|
-
B
|
|
1921
|
-
C
|
|
1922
|
-
D
|
|
1923
|
-
E
|
|
1924
|
-
ED
|
|
1925
|
-
EB
|
|
1926
|
-
BC_DA
|
|
1927
|
-
|
|
1928
|
-
function cubehelixConvert
|
|
1929
|
-
if (o instanceof Cubehelix
|
|
1930
|
-
if (!(o instanceof Rgb
|
|
1952
|
+
var A = -0.14861,
|
|
1953
|
+
B = +1.78277,
|
|
1954
|
+
C = -0.29227,
|
|
1955
|
+
D = -0.90649,
|
|
1956
|
+
E = +1.97294,
|
|
1957
|
+
ED = E * D,
|
|
1958
|
+
EB = E * B,
|
|
1959
|
+
BC_DA = B * C - D * A;
|
|
1960
|
+
|
|
1961
|
+
function cubehelixConvert(o) {
|
|
1962
|
+
if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
|
|
1963
|
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
1931
1964
|
var r = o.r / 255,
|
|
1932
1965
|
g = o.g / 255,
|
|
1933
1966
|
b = o.b / 255,
|
|
1934
|
-
l = (BC_DA
|
|
1967
|
+
l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
|
|
1935
1968
|
bl = b - l,
|
|
1936
|
-
k = (E
|
|
1937
|
-
s = Math.sqrt(k * k + bl * bl) / (E
|
|
1938
|
-
h = s ? Math.atan2(k, bl) *
|
|
1939
|
-
return new Cubehelix
|
|
1969
|
+
k = (E * (g - l) - C * bl) / D,
|
|
1970
|
+
s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
|
|
1971
|
+
h = s ? Math.atan2(k, bl) * degrees$1 - 120 : NaN;
|
|
1972
|
+
return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
1940
1973
|
}
|
|
1941
1974
|
|
|
1942
|
-
function cubehelix$
|
|
1943
|
-
return arguments.length === 1 ? cubehelixConvert
|
|
1975
|
+
function cubehelix$3(h, s, l, opacity) {
|
|
1976
|
+
return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
|
|
1944
1977
|
}
|
|
1945
1978
|
|
|
1946
|
-
function Cubehelix
|
|
1979
|
+
function Cubehelix(h, s, l, opacity) {
|
|
1947
1980
|
this.h = +h;
|
|
1948
1981
|
this.s = +s;
|
|
1949
1982
|
this.l = +l;
|
|
1950
1983
|
this.opacity = +opacity;
|
|
1951
1984
|
}
|
|
1952
1985
|
|
|
1953
|
-
define
|
|
1954
|
-
brighter
|
|
1955
|
-
k = k == null ? brighter
|
|
1956
|
-
return new Cubehelix
|
|
1986
|
+
define(Cubehelix, cubehelix$3, extend(Color, {
|
|
1987
|
+
brighter(k) {
|
|
1988
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
1989
|
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
1957
1990
|
},
|
|
1958
|
-
darker
|
|
1959
|
-
k = k == null ? darker
|
|
1960
|
-
return new Cubehelix
|
|
1991
|
+
darker(k) {
|
|
1992
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
1993
|
+
return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
|
|
1961
1994
|
},
|
|
1962
|
-
rgb
|
|
1963
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) *
|
|
1995
|
+
rgb() {
|
|
1996
|
+
var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
|
|
1964
1997
|
l = +this.l,
|
|
1965
1998
|
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
1966
1999
|
cosh = Math.cos(h),
|
|
1967
2000
|
sinh = Math.sin(h);
|
|
1968
|
-
return new Rgb
|
|
1969
|
-
255 * (l + a * (A
|
|
1970
|
-
255 * (l + a * (C
|
|
1971
|
-
255 * (l + a * (E
|
|
2001
|
+
return new Rgb(
|
|
2002
|
+
255 * (l + a * (A * cosh + B * sinh)),
|
|
2003
|
+
255 * (l + a * (C * cosh + D * sinh)),
|
|
2004
|
+
255 * (l + a * (E * cosh)),
|
|
1972
2005
|
this.opacity
|
|
1973
2006
|
);
|
|
1974
2007
|
}
|
|
@@ -2043,8 +2076,8 @@
|
|
|
2043
2076
|
var interpolateRgb = (function rgbGamma(y) {
|
|
2044
2077
|
var color = gamma(y);
|
|
2045
2078
|
|
|
2046
|
-
function rgb(start, end) {
|
|
2047
|
-
var r = color((start = rgb
|
|
2079
|
+
function rgb$1(start, end) {
|
|
2080
|
+
var r = color((start = rgb(start)).r, (end = rgb(end)).r),
|
|
2048
2081
|
g = color(start.g, end.g),
|
|
2049
2082
|
b = color(start.b, end.b),
|
|
2050
2083
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2057,9 +2090,9 @@
|
|
|
2057
2090
|
};
|
|
2058
2091
|
}
|
|
2059
2092
|
|
|
2060
|
-
rgb.gamma = rgbGamma;
|
|
2093
|
+
rgb$1.gamma = rgbGamma;
|
|
2061
2094
|
|
|
2062
|
-
return rgb;
|
|
2095
|
+
return rgb$1;
|
|
2063
2096
|
})(1);
|
|
2064
2097
|
|
|
2065
2098
|
function rgbSpline(spline) {
|
|
@@ -2070,7 +2103,7 @@
|
|
|
2070
2103
|
b = new Array(n),
|
|
2071
2104
|
i, color;
|
|
2072
2105
|
for (i = 0; i < n; ++i) {
|
|
2073
|
-
color = rgb
|
|
2106
|
+
color = rgb(colors[i]);
|
|
2074
2107
|
r[i] = color.r || 0;
|
|
2075
2108
|
g[i] = color.g || 0;
|
|
2076
2109
|
b[i] = color.b || 0;
|
|
@@ -2228,8 +2261,8 @@
|
|
|
2228
2261
|
var t = typeof b, c;
|
|
2229
2262
|
return b == null || t === "boolean" ? constant$5(b)
|
|
2230
2263
|
: (t === "number" ? reinterpolate$1
|
|
2231
|
-
: t === "string" ? ((c = color
|
|
2232
|
-
: b instanceof color
|
|
2264
|
+
: t === "string" ? ((c = color(b)) ? (b = c, interpolateRgb) : interpolateString)
|
|
2265
|
+
: b instanceof color ? interpolateRgb
|
|
2233
2266
|
: b instanceof Date ? date$1
|
|
2234
2267
|
: isNumberArray(b) ? numberArray
|
|
2235
2268
|
: Array.isArray(b) ? genericArray
|
|
@@ -2435,9 +2468,9 @@
|
|
|
2435
2468
|
return i;
|
|
2436
2469
|
}
|
|
2437
2470
|
|
|
2438
|
-
function hsl
|
|
2471
|
+
function hsl(hue) {
|
|
2439
2472
|
return function(start, end) {
|
|
2440
|
-
var h = hue((start = hsl$
|
|
2473
|
+
var h = hue((start = hsl$2(start)).h, (end = hsl$2(end)).h),
|
|
2441
2474
|
s = nogamma(start.s, end.s),
|
|
2442
2475
|
l = nogamma(start.l, end.l),
|
|
2443
2476
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2451,11 +2484,11 @@
|
|
|
2451
2484
|
}
|
|
2452
2485
|
}
|
|
2453
2486
|
|
|
2454
|
-
var hsl$
|
|
2455
|
-
var hslLong = hsl
|
|
2487
|
+
var hsl$1 = hsl(hue$1);
|
|
2488
|
+
var hslLong = hsl(nogamma);
|
|
2456
2489
|
|
|
2457
|
-
function lab
|
|
2458
|
-
var l = nogamma((start = lab$
|
|
2490
|
+
function lab(start, end) {
|
|
2491
|
+
var l = nogamma((start = lab$1(start)).l, (end = lab$1(end)).l),
|
|
2459
2492
|
a = nogamma(start.a, end.a),
|
|
2460
2493
|
b = nogamma(start.b, end.b),
|
|
2461
2494
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2468,9 +2501,9 @@
|
|
|
2468
2501
|
};
|
|
2469
2502
|
}
|
|
2470
2503
|
|
|
2471
|
-
function hcl
|
|
2504
|
+
function hcl(hue) {
|
|
2472
2505
|
return function(start, end) {
|
|
2473
|
-
var h = hue((start = hcl$
|
|
2506
|
+
var h = hue((start = hcl$2(start)).h, (end = hcl$2(end)).h),
|
|
2474
2507
|
c = nogamma(start.c, end.c),
|
|
2475
2508
|
l = nogamma(start.l, end.l),
|
|
2476
2509
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2484,15 +2517,15 @@
|
|
|
2484
2517
|
}
|
|
2485
2518
|
}
|
|
2486
2519
|
|
|
2487
|
-
var hcl$
|
|
2488
|
-
var hclLong = hcl
|
|
2520
|
+
var hcl$1 = hcl(hue$1);
|
|
2521
|
+
var hclLong = hcl(nogamma);
|
|
2489
2522
|
|
|
2490
|
-
function cubehelix$
|
|
2523
|
+
function cubehelix$1(hue) {
|
|
2491
2524
|
return (function cubehelixGamma(y) {
|
|
2492
2525
|
y = +y;
|
|
2493
2526
|
|
|
2494
2527
|
function cubehelix(start, end) {
|
|
2495
|
-
var h = hue((start = cubehelix$
|
|
2528
|
+
var h = hue((start = cubehelix$3(start)).h, (end = cubehelix$3(end)).h),
|
|
2496
2529
|
s = nogamma(start.s, end.s),
|
|
2497
2530
|
l = nogamma(start.l, end.l),
|
|
2498
2531
|
opacity = nogamma(start.opacity, end.opacity);
|
|
@@ -2511,8 +2544,8 @@
|
|
|
2511
2544
|
})(1);
|
|
2512
2545
|
}
|
|
2513
2546
|
|
|
2514
|
-
var cubehelix$
|
|
2515
|
-
var cubehelixLong = cubehelix$
|
|
2547
|
+
var cubehelix$2 = cubehelix$1(hue$1);
|
|
2548
|
+
var cubehelixLong = cubehelix$1(nogamma);
|
|
2516
2549
|
|
|
2517
2550
|
function piecewise(interpolate, values) {
|
|
2518
2551
|
var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
|
|
@@ -2609,430 +2642,49 @@
|
|
|
2609
2642
|
};
|
|
2610
2643
|
}
|
|
2611
2644
|
|
|
2612
|
-
function
|
|
2613
|
-
|
|
2614
|
-
|
|
2645
|
+
function interpolate(a, b) {
|
|
2646
|
+
var c;
|
|
2647
|
+
return (typeof b === "number" ? reinterpolate$1
|
|
2648
|
+
: b instanceof color ? interpolateRgb
|
|
2649
|
+
: (c = color(b)) ? (b = c, interpolateRgb)
|
|
2650
|
+
: interpolateString)(a, b);
|
|
2615
2651
|
}
|
|
2616
2652
|
|
|
2617
|
-
function
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2653
|
+
function attrRemove(name) {
|
|
2654
|
+
return function() {
|
|
2655
|
+
this.removeAttribute(name);
|
|
2656
|
+
};
|
|
2621
2657
|
}
|
|
2622
2658
|
|
|
2623
|
-
function
|
|
2659
|
+
function attrRemoveNS(fullname) {
|
|
2660
|
+
return function() {
|
|
2661
|
+
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2662
|
+
};
|
|
2663
|
+
}
|
|
2624
2664
|
|
|
2625
|
-
|
|
2626
|
-
|
|
2665
|
+
function attrConstant(name, interpolate, value1) {
|
|
2666
|
+
var string00,
|
|
2667
|
+
string1 = value1 + "",
|
|
2668
|
+
interpolate0;
|
|
2669
|
+
return function() {
|
|
2670
|
+
var string0 = this.getAttribute(name);
|
|
2671
|
+
return string0 === string1 ? null
|
|
2672
|
+
: string0 === string00 ? interpolate0
|
|
2673
|
+
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2674
|
+
};
|
|
2675
|
+
}
|
|
2627
2676
|
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
var named$2 = {
|
|
2640
|
-
aliceblue: 0xf0f8ff,
|
|
2641
|
-
antiquewhite: 0xfaebd7,
|
|
2642
|
-
aqua: 0x00ffff,
|
|
2643
|
-
aquamarine: 0x7fffd4,
|
|
2644
|
-
azure: 0xf0ffff,
|
|
2645
|
-
beige: 0xf5f5dc,
|
|
2646
|
-
bisque: 0xffe4c4,
|
|
2647
|
-
black: 0x000000,
|
|
2648
|
-
blanchedalmond: 0xffebcd,
|
|
2649
|
-
blue: 0x0000ff,
|
|
2650
|
-
blueviolet: 0x8a2be2,
|
|
2651
|
-
brown: 0xa52a2a,
|
|
2652
|
-
burlywood: 0xdeb887,
|
|
2653
|
-
cadetblue: 0x5f9ea0,
|
|
2654
|
-
chartreuse: 0x7fff00,
|
|
2655
|
-
chocolate: 0xd2691e,
|
|
2656
|
-
coral: 0xff7f50,
|
|
2657
|
-
cornflowerblue: 0x6495ed,
|
|
2658
|
-
cornsilk: 0xfff8dc,
|
|
2659
|
-
crimson: 0xdc143c,
|
|
2660
|
-
cyan: 0x00ffff,
|
|
2661
|
-
darkblue: 0x00008b,
|
|
2662
|
-
darkcyan: 0x008b8b,
|
|
2663
|
-
darkgoldenrod: 0xb8860b,
|
|
2664
|
-
darkgray: 0xa9a9a9,
|
|
2665
|
-
darkgreen: 0x006400,
|
|
2666
|
-
darkgrey: 0xa9a9a9,
|
|
2667
|
-
darkkhaki: 0xbdb76b,
|
|
2668
|
-
darkmagenta: 0x8b008b,
|
|
2669
|
-
darkolivegreen: 0x556b2f,
|
|
2670
|
-
darkorange: 0xff8c00,
|
|
2671
|
-
darkorchid: 0x9932cc,
|
|
2672
|
-
darkred: 0x8b0000,
|
|
2673
|
-
darksalmon: 0xe9967a,
|
|
2674
|
-
darkseagreen: 0x8fbc8f,
|
|
2675
|
-
darkslateblue: 0x483d8b,
|
|
2676
|
-
darkslategray: 0x2f4f4f,
|
|
2677
|
-
darkslategrey: 0x2f4f4f,
|
|
2678
|
-
darkturquoise: 0x00ced1,
|
|
2679
|
-
darkviolet: 0x9400d3,
|
|
2680
|
-
deeppink: 0xff1493,
|
|
2681
|
-
deepskyblue: 0x00bfff,
|
|
2682
|
-
dimgray: 0x696969,
|
|
2683
|
-
dimgrey: 0x696969,
|
|
2684
|
-
dodgerblue: 0x1e90ff,
|
|
2685
|
-
firebrick: 0xb22222,
|
|
2686
|
-
floralwhite: 0xfffaf0,
|
|
2687
|
-
forestgreen: 0x228b22,
|
|
2688
|
-
fuchsia: 0xff00ff,
|
|
2689
|
-
gainsboro: 0xdcdcdc,
|
|
2690
|
-
ghostwhite: 0xf8f8ff,
|
|
2691
|
-
gold: 0xffd700,
|
|
2692
|
-
goldenrod: 0xdaa520,
|
|
2693
|
-
gray: 0x808080,
|
|
2694
|
-
green: 0x008000,
|
|
2695
|
-
greenyellow: 0xadff2f,
|
|
2696
|
-
grey: 0x808080,
|
|
2697
|
-
honeydew: 0xf0fff0,
|
|
2698
|
-
hotpink: 0xff69b4,
|
|
2699
|
-
indianred: 0xcd5c5c,
|
|
2700
|
-
indigo: 0x4b0082,
|
|
2701
|
-
ivory: 0xfffff0,
|
|
2702
|
-
khaki: 0xf0e68c,
|
|
2703
|
-
lavender: 0xe6e6fa,
|
|
2704
|
-
lavenderblush: 0xfff0f5,
|
|
2705
|
-
lawngreen: 0x7cfc00,
|
|
2706
|
-
lemonchiffon: 0xfffacd,
|
|
2707
|
-
lightblue: 0xadd8e6,
|
|
2708
|
-
lightcoral: 0xf08080,
|
|
2709
|
-
lightcyan: 0xe0ffff,
|
|
2710
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
2711
|
-
lightgray: 0xd3d3d3,
|
|
2712
|
-
lightgreen: 0x90ee90,
|
|
2713
|
-
lightgrey: 0xd3d3d3,
|
|
2714
|
-
lightpink: 0xffb6c1,
|
|
2715
|
-
lightsalmon: 0xffa07a,
|
|
2716
|
-
lightseagreen: 0x20b2aa,
|
|
2717
|
-
lightskyblue: 0x87cefa,
|
|
2718
|
-
lightslategray: 0x778899,
|
|
2719
|
-
lightslategrey: 0x778899,
|
|
2720
|
-
lightsteelblue: 0xb0c4de,
|
|
2721
|
-
lightyellow: 0xffffe0,
|
|
2722
|
-
lime: 0x00ff00,
|
|
2723
|
-
limegreen: 0x32cd32,
|
|
2724
|
-
linen: 0xfaf0e6,
|
|
2725
|
-
magenta: 0xff00ff,
|
|
2726
|
-
maroon: 0x800000,
|
|
2727
|
-
mediumaquamarine: 0x66cdaa,
|
|
2728
|
-
mediumblue: 0x0000cd,
|
|
2729
|
-
mediumorchid: 0xba55d3,
|
|
2730
|
-
mediumpurple: 0x9370db,
|
|
2731
|
-
mediumseagreen: 0x3cb371,
|
|
2732
|
-
mediumslateblue: 0x7b68ee,
|
|
2733
|
-
mediumspringgreen: 0x00fa9a,
|
|
2734
|
-
mediumturquoise: 0x48d1cc,
|
|
2735
|
-
mediumvioletred: 0xc71585,
|
|
2736
|
-
midnightblue: 0x191970,
|
|
2737
|
-
mintcream: 0xf5fffa,
|
|
2738
|
-
mistyrose: 0xffe4e1,
|
|
2739
|
-
moccasin: 0xffe4b5,
|
|
2740
|
-
navajowhite: 0xffdead,
|
|
2741
|
-
navy: 0x000080,
|
|
2742
|
-
oldlace: 0xfdf5e6,
|
|
2743
|
-
olive: 0x808000,
|
|
2744
|
-
olivedrab: 0x6b8e23,
|
|
2745
|
-
orange: 0xffa500,
|
|
2746
|
-
orangered: 0xff4500,
|
|
2747
|
-
orchid: 0xda70d6,
|
|
2748
|
-
palegoldenrod: 0xeee8aa,
|
|
2749
|
-
palegreen: 0x98fb98,
|
|
2750
|
-
paleturquoise: 0xafeeee,
|
|
2751
|
-
palevioletred: 0xdb7093,
|
|
2752
|
-
papayawhip: 0xffefd5,
|
|
2753
|
-
peachpuff: 0xffdab9,
|
|
2754
|
-
peru: 0xcd853f,
|
|
2755
|
-
pink: 0xffc0cb,
|
|
2756
|
-
plum: 0xdda0dd,
|
|
2757
|
-
powderblue: 0xb0e0e6,
|
|
2758
|
-
purple: 0x800080,
|
|
2759
|
-
rebeccapurple: 0x663399,
|
|
2760
|
-
red: 0xff0000,
|
|
2761
|
-
rosybrown: 0xbc8f8f,
|
|
2762
|
-
royalblue: 0x4169e1,
|
|
2763
|
-
saddlebrown: 0x8b4513,
|
|
2764
|
-
salmon: 0xfa8072,
|
|
2765
|
-
sandybrown: 0xf4a460,
|
|
2766
|
-
seagreen: 0x2e8b57,
|
|
2767
|
-
seashell: 0xfff5ee,
|
|
2768
|
-
sienna: 0xa0522d,
|
|
2769
|
-
silver: 0xc0c0c0,
|
|
2770
|
-
skyblue: 0x87ceeb,
|
|
2771
|
-
slateblue: 0x6a5acd,
|
|
2772
|
-
slategray: 0x708090,
|
|
2773
|
-
slategrey: 0x708090,
|
|
2774
|
-
snow: 0xfffafa,
|
|
2775
|
-
springgreen: 0x00ff7f,
|
|
2776
|
-
steelblue: 0x4682b4,
|
|
2777
|
-
tan: 0xd2b48c,
|
|
2778
|
-
teal: 0x008080,
|
|
2779
|
-
thistle: 0xd8bfd8,
|
|
2780
|
-
tomato: 0xff6347,
|
|
2781
|
-
turquoise: 0x40e0d0,
|
|
2782
|
-
violet: 0xee82ee,
|
|
2783
|
-
wheat: 0xf5deb3,
|
|
2784
|
-
white: 0xffffff,
|
|
2785
|
-
whitesmoke: 0xf5f5f5,
|
|
2786
|
-
yellow: 0xffff00,
|
|
2787
|
-
yellowgreen: 0x9acd32
|
|
2788
|
-
};
|
|
2789
|
-
|
|
2790
|
-
define$2(Color$2, color$2, {
|
|
2791
|
-
copy: function(channels) {
|
|
2792
|
-
return Object.assign(new this.constructor, this, channels);
|
|
2793
|
-
},
|
|
2794
|
-
displayable: function() {
|
|
2795
|
-
return this.rgb().displayable();
|
|
2796
|
-
},
|
|
2797
|
-
hex: color_formatHex$2, // Deprecated! Use color.formatHex.
|
|
2798
|
-
formatHex: color_formatHex$2,
|
|
2799
|
-
formatHsl: color_formatHsl$2,
|
|
2800
|
-
formatRgb: color_formatRgb$2,
|
|
2801
|
-
toString: color_formatRgb$2
|
|
2802
|
-
});
|
|
2803
|
-
|
|
2804
|
-
function color_formatHex$2() {
|
|
2805
|
-
return this.rgb().formatHex();
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
|
-
function color_formatHsl$2() {
|
|
2809
|
-
return hslConvert$2(this).formatHsl();
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
function color_formatRgb$2() {
|
|
2813
|
-
return this.rgb().formatRgb();
|
|
2814
|
-
}
|
|
2815
|
-
|
|
2816
|
-
function color$2(format) {
|
|
2817
|
-
var m, l;
|
|
2818
|
-
format = (format + "").trim().toLowerCase();
|
|
2819
|
-
return (m = reHex$2.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$2(m) // #ff0000
|
|
2820
|
-
: l === 3 ? new Rgb$2((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
2821
|
-
: l === 8 ? rgba$2(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
2822
|
-
: 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
|
|
2823
|
-
: null) // invalid hex
|
|
2824
|
-
: (m = reRgbInteger$2.exec(format)) ? new Rgb$2(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
2825
|
-
: (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%)
|
|
2826
|
-
: (m = reRgbaInteger$2.exec(format)) ? rgba$2(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
2827
|
-
: (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)
|
|
2828
|
-
: (m = reHslPercent$2.exec(format)) ? hsla$2(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
2829
|
-
: (m = reHslaPercent$2.exec(format)) ? hsla$2(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
2830
|
-
: named$2.hasOwnProperty(format) ? rgbn$2(named$2[format]) // eslint-disable-line no-prototype-builtins
|
|
2831
|
-
: format === "transparent" ? new Rgb$2(NaN, NaN, NaN, 0)
|
|
2832
|
-
: null;
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
function rgbn$2(n) {
|
|
2836
|
-
return new Rgb$2(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
function rgba$2(r, g, b, a) {
|
|
2840
|
-
if (a <= 0) r = g = b = NaN;
|
|
2841
|
-
return new Rgb$2(r, g, b, a);
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
|
-
function rgbConvert$2(o) {
|
|
2845
|
-
if (!(o instanceof Color$2)) o = color$2(o);
|
|
2846
|
-
if (!o) return new Rgb$2;
|
|
2847
|
-
o = o.rgb();
|
|
2848
|
-
return new Rgb$2(o.r, o.g, o.b, o.opacity);
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
function rgb$2(r, g, b, opacity) {
|
|
2852
|
-
return arguments.length === 1 ? rgbConvert$2(r) : new Rgb$2(r, g, b, opacity == null ? 1 : opacity);
|
|
2853
|
-
}
|
|
2854
|
-
|
|
2855
|
-
function Rgb$2(r, g, b, opacity) {
|
|
2856
|
-
this.r = +r;
|
|
2857
|
-
this.g = +g;
|
|
2858
|
-
this.b = +b;
|
|
2859
|
-
this.opacity = +opacity;
|
|
2860
|
-
}
|
|
2861
|
-
|
|
2862
|
-
define$2(Rgb$2, rgb$2, extend$2(Color$2, {
|
|
2863
|
-
brighter: function(k) {
|
|
2864
|
-
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
|
2865
|
-
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2866
|
-
},
|
|
2867
|
-
darker: function(k) {
|
|
2868
|
-
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
|
2869
|
-
return new Rgb$2(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
2870
|
-
},
|
|
2871
|
-
rgb: function() {
|
|
2872
|
-
return this;
|
|
2873
|
-
},
|
|
2874
|
-
displayable: function() {
|
|
2875
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
2876
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
2877
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
2878
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
2879
|
-
},
|
|
2880
|
-
hex: rgb_formatHex$2, // Deprecated! Use color.formatHex.
|
|
2881
|
-
formatHex: rgb_formatHex$2,
|
|
2882
|
-
formatRgb: rgb_formatRgb$2,
|
|
2883
|
-
toString: rgb_formatRgb$2
|
|
2884
|
-
}));
|
|
2885
|
-
|
|
2886
|
-
function rgb_formatHex$2() {
|
|
2887
|
-
return "#" + hex$2(this.r) + hex$2(this.g) + hex$2(this.b);
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
function rgb_formatRgb$2() {
|
|
2891
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2892
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
2893
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
2894
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
2895
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
2896
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
function hex$2(value) {
|
|
2900
|
-
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
2901
|
-
return (value < 16 ? "0" : "") + value.toString(16);
|
|
2902
|
-
}
|
|
2903
|
-
|
|
2904
|
-
function hsla$2(h, s, l, a) {
|
|
2905
|
-
if (a <= 0) h = s = l = NaN;
|
|
2906
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
2907
|
-
else if (s <= 0) h = NaN;
|
|
2908
|
-
return new Hsl$2(h, s, l, a);
|
|
2909
|
-
}
|
|
2910
|
-
|
|
2911
|
-
function hslConvert$2(o) {
|
|
2912
|
-
if (o instanceof Hsl$2) return new Hsl$2(o.h, o.s, o.l, o.opacity);
|
|
2913
|
-
if (!(o instanceof Color$2)) o = color$2(o);
|
|
2914
|
-
if (!o) return new Hsl$2;
|
|
2915
|
-
if (o instanceof Hsl$2) return o;
|
|
2916
|
-
o = o.rgb();
|
|
2917
|
-
var r = o.r / 255,
|
|
2918
|
-
g = o.g / 255,
|
|
2919
|
-
b = o.b / 255,
|
|
2920
|
-
min = Math.min(r, g, b),
|
|
2921
|
-
max = Math.max(r, g, b),
|
|
2922
|
-
h = NaN,
|
|
2923
|
-
s = max - min,
|
|
2924
|
-
l = (max + min) / 2;
|
|
2925
|
-
if (s) {
|
|
2926
|
-
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
2927
|
-
else if (g === max) h = (b - r) / s + 2;
|
|
2928
|
-
else h = (r - g) / s + 4;
|
|
2929
|
-
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
2930
|
-
h *= 60;
|
|
2931
|
-
} else {
|
|
2932
|
-
s = l > 0 && l < 1 ? 0 : h;
|
|
2933
|
-
}
|
|
2934
|
-
return new Hsl$2(h, s, l, o.opacity);
|
|
2935
|
-
}
|
|
2936
|
-
|
|
2937
|
-
function hsl$2(h, s, l, opacity) {
|
|
2938
|
-
return arguments.length === 1 ? hslConvert$2(h) : new Hsl$2(h, s, l, opacity == null ? 1 : opacity);
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
function Hsl$2(h, s, l, opacity) {
|
|
2942
|
-
this.h = +h;
|
|
2943
|
-
this.s = +s;
|
|
2944
|
-
this.l = +l;
|
|
2945
|
-
this.opacity = +opacity;
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
define$2(Hsl$2, hsl$2, extend$2(Color$2, {
|
|
2949
|
-
brighter: function(k) {
|
|
2950
|
-
k = k == null ? brighter$2 : Math.pow(brighter$2, k);
|
|
2951
|
-
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
|
2952
|
-
},
|
|
2953
|
-
darker: function(k) {
|
|
2954
|
-
k = k == null ? darker$2 : Math.pow(darker$2, k);
|
|
2955
|
-
return new Hsl$2(this.h, this.s, this.l * k, this.opacity);
|
|
2956
|
-
},
|
|
2957
|
-
rgb: function() {
|
|
2958
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2959
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2960
|
-
l = this.l,
|
|
2961
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
2962
|
-
m1 = 2 * l - m2;
|
|
2963
|
-
return new Rgb$2(
|
|
2964
|
-
hsl2rgb$2(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
2965
|
-
hsl2rgb$2(h, m1, m2),
|
|
2966
|
-
hsl2rgb$2(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
2967
|
-
this.opacity
|
|
2968
|
-
);
|
|
2969
|
-
},
|
|
2970
|
-
displayable: function() {
|
|
2971
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
2972
|
-
&& (0 <= this.l && this.l <= 1)
|
|
2973
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
2974
|
-
},
|
|
2975
|
-
formatHsl: function() {
|
|
2976
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2977
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
2978
|
-
+ (this.h || 0) + ", "
|
|
2979
|
-
+ (this.s || 0) * 100 + "%, "
|
|
2980
|
-
+ (this.l || 0) * 100 + "%"
|
|
2981
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
2982
|
-
}
|
|
2983
|
-
}));
|
|
2984
|
-
|
|
2985
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2986
|
-
function hsl2rgb$2(h, m1, m2) {
|
|
2987
|
-
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
2988
|
-
: h < 180 ? m2
|
|
2989
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
2990
|
-
: m1) * 255;
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
function interpolate(a, b) {
|
|
2994
|
-
var c;
|
|
2995
|
-
return (typeof b === "number" ? reinterpolate$1
|
|
2996
|
-
: b instanceof color$2 ? interpolateRgb
|
|
2997
|
-
: (c = color$2(b)) ? (b = c, interpolateRgb)
|
|
2998
|
-
: interpolateString)(a, b);
|
|
2999
|
-
}
|
|
3000
|
-
|
|
3001
|
-
function attrRemove(name) {
|
|
3002
|
-
return function() {
|
|
3003
|
-
this.removeAttribute(name);
|
|
3004
|
-
};
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
function attrRemoveNS(fullname) {
|
|
3008
|
-
return function() {
|
|
3009
|
-
this.removeAttributeNS(fullname.space, fullname.local);
|
|
3010
|
-
};
|
|
3011
|
-
}
|
|
3012
|
-
|
|
3013
|
-
function attrConstant(name, interpolate, value1) {
|
|
3014
|
-
var string00,
|
|
3015
|
-
string1 = value1 + "",
|
|
3016
|
-
interpolate0;
|
|
3017
|
-
return function() {
|
|
3018
|
-
var string0 = this.getAttribute(name);
|
|
3019
|
-
return string0 === string1 ? null
|
|
3020
|
-
: string0 === string00 ? interpolate0
|
|
3021
|
-
: interpolate0 = interpolate(string00 = string0, value1);
|
|
3022
|
-
};
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
|
-
function attrConstantNS(fullname, interpolate, value1) {
|
|
3026
|
-
var string00,
|
|
3027
|
-
string1 = value1 + "",
|
|
3028
|
-
interpolate0;
|
|
3029
|
-
return function() {
|
|
3030
|
-
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
3031
|
-
return string0 === string1 ? null
|
|
3032
|
-
: string0 === string00 ? interpolate0
|
|
3033
|
-
: interpolate0 = interpolate(string00 = string0, value1);
|
|
3034
|
-
};
|
|
3035
|
-
}
|
|
2677
|
+
function attrConstantNS(fullname, interpolate, value1) {
|
|
2678
|
+
var string00,
|
|
2679
|
+
string1 = value1 + "",
|
|
2680
|
+
interpolate0;
|
|
2681
|
+
return function() {
|
|
2682
|
+
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2683
|
+
return string0 === string1 ? null
|
|
2684
|
+
: string0 === string00 ? interpolate0
|
|
2685
|
+
: interpolate0 = interpolate(string00 = string0, value1);
|
|
2686
|
+
};
|
|
2687
|
+
}
|
|
3036
2688
|
|
|
3037
2689
|
function attrFunction(name, interpolate, value) {
|
|
3038
2690
|
var string00,
|
|
@@ -3812,12 +3464,12 @@
|
|
|
3812
3464
|
return null;
|
|
3813
3465
|
}
|
|
3814
3466
|
|
|
3815
|
-
function
|
|
3467
|
+
function d3Ascending(a, b) {
|
|
3816
3468
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
3817
3469
|
}
|
|
3818
3470
|
|
|
3819
|
-
function bisector(compare) {
|
|
3820
|
-
if (compare.length === 1) compare = ascendingComparator(compare);
|
|
3471
|
+
function bisector$1(compare) {
|
|
3472
|
+
if (compare.length === 1) compare = ascendingComparator$1(compare);
|
|
3821
3473
|
return {
|
|
3822
3474
|
left: function(a, x, lo, hi) {
|
|
3823
3475
|
if (lo == null) lo = 0;
|
|
@@ -3842,15 +3494,15 @@
|
|
|
3842
3494
|
};
|
|
3843
3495
|
}
|
|
3844
3496
|
|
|
3845
|
-
function ascendingComparator(f) {
|
|
3497
|
+
function ascendingComparator$1(f) {
|
|
3846
3498
|
return function(d, x) {
|
|
3847
|
-
return
|
|
3499
|
+
return d3Ascending(f(d), x);
|
|
3848
3500
|
};
|
|
3849
3501
|
}
|
|
3850
3502
|
|
|
3851
|
-
var ascendingBisect = bisector(
|
|
3852
|
-
var bisectRight = ascendingBisect.right;
|
|
3853
|
-
var bisectLeft = ascendingBisect.left;
|
|
3503
|
+
var ascendingBisect$1 = bisector$1(d3Ascending);
|
|
3504
|
+
var bisectRight$1 = ascendingBisect$1.right;
|
|
3505
|
+
var bisectLeft = ascendingBisect$1.left;
|
|
3854
3506
|
|
|
3855
3507
|
function pairs(array, f) {
|
|
3856
3508
|
if (f == null) f = pair;
|
|
@@ -3887,7 +3539,7 @@
|
|
|
3887
3539
|
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
3888
3540
|
}
|
|
3889
3541
|
|
|
3890
|
-
function number$
|
|
3542
|
+
function number$3(x) {
|
|
3891
3543
|
return x === null ? NaN : +x;
|
|
3892
3544
|
}
|
|
3893
3545
|
|
|
@@ -3902,7 +3554,7 @@
|
|
|
3902
3554
|
|
|
3903
3555
|
if (valueof == null) {
|
|
3904
3556
|
while (++i < n) {
|
|
3905
|
-
if (!isNaN(value = number$
|
|
3557
|
+
if (!isNaN(value = number$3(values[i]))) {
|
|
3906
3558
|
delta = value - mean;
|
|
3907
3559
|
mean += delta / ++m;
|
|
3908
3560
|
sum += delta * (value - mean);
|
|
@@ -3912,7 +3564,7 @@
|
|
|
3912
3564
|
|
|
3913
3565
|
else {
|
|
3914
3566
|
while (++i < n) {
|
|
3915
|
-
if (!isNaN(value = number$
|
|
3567
|
+
if (!isNaN(value = number$3(valueof(values[i], i, values)))) {
|
|
3916
3568
|
delta = value - mean;
|
|
3917
3569
|
mean += delta / ++m;
|
|
3918
3570
|
sum += delta * (value - mean);
|
|
@@ -3981,7 +3633,7 @@
|
|
|
3981
3633
|
return x;
|
|
3982
3634
|
}
|
|
3983
3635
|
|
|
3984
|
-
function
|
|
3636
|
+
function range(start, stop, step) {
|
|
3985
3637
|
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
|
|
3986
3638
|
|
|
3987
3639
|
var i = -1,
|
|
@@ -3995,11 +3647,11 @@
|
|
|
3995
3647
|
return range;
|
|
3996
3648
|
}
|
|
3997
3649
|
|
|
3998
|
-
var e10 = Math.sqrt(50),
|
|
3999
|
-
e5 = Math.sqrt(10),
|
|
4000
|
-
e2 = Math.sqrt(2);
|
|
3650
|
+
var e10$1 = Math.sqrt(50),
|
|
3651
|
+
e5$1 = Math.sqrt(10),
|
|
3652
|
+
e2$1 = Math.sqrt(2);
|
|
4001
3653
|
|
|
4002
|
-
function ticks(start, stop, count) {
|
|
3654
|
+
function ticks$1(start, stop, count) {
|
|
4003
3655
|
var reverse,
|
|
4004
3656
|
i = -1,
|
|
4005
3657
|
n,
|
|
@@ -4009,7 +3661,7 @@
|
|
|
4009
3661
|
stop = +stop, start = +start, count = +count;
|
|
4010
3662
|
if (start === stop && count > 0) return [start];
|
|
4011
3663
|
if (reverse = stop < start) n = start, start = stop, stop = n;
|
|
4012
|
-
if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
3664
|
+
if ((step = tickIncrement$1(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
4013
3665
|
|
|
4014
3666
|
if (step > 0) {
|
|
4015
3667
|
start = Math.ceil(start / step);
|
|
@@ -4028,22 +3680,22 @@
|
|
|
4028
3680
|
return ticks;
|
|
4029
3681
|
}
|
|
4030
3682
|
|
|
4031
|
-
function tickIncrement(start, stop, count) {
|
|
3683
|
+
function tickIncrement$1(start, stop, count) {
|
|
4032
3684
|
var step = (stop - start) / Math.max(0, count),
|
|
4033
3685
|
power = Math.floor(Math.log(step) / Math.LN10),
|
|
4034
3686
|
error = step / Math.pow(10, power);
|
|
4035
3687
|
return power >= 0
|
|
4036
|
-
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
4037
|
-
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
3688
|
+
? (error >= e10$1 ? 10 : error >= e5$1 ? 5 : error >= e2$1 ? 2 : 1) * Math.pow(10, power)
|
|
3689
|
+
: -Math.pow(10, -power) / (error >= e10$1 ? 10 : error >= e5$1 ? 5 : error >= e2$1 ? 2 : 1);
|
|
4038
3690
|
}
|
|
4039
3691
|
|
|
4040
|
-
function tickStep(start, stop, count) {
|
|
3692
|
+
function tickStep$1(start, stop, count) {
|
|
4041
3693
|
var step0 = Math.abs(stop - start) / Math.max(0, count),
|
|
4042
3694
|
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
|
|
4043
3695
|
error = step0 / step1;
|
|
4044
|
-
if (error >= e10) step1 *= 10;
|
|
4045
|
-
else if (error >= e5) step1 *= 5;
|
|
4046
|
-
else if (error >= e2) step1 *= 2;
|
|
3696
|
+
if (error >= e10$1) step1 *= 10;
|
|
3697
|
+
else if (error >= e5$1) step1 *= 5;
|
|
3698
|
+
else if (error >= e2$1) step1 *= 2;
|
|
4047
3699
|
return stop < start ? -step1 : step1;
|
|
4048
3700
|
}
|
|
4049
3701
|
|
|
@@ -4073,8 +3725,8 @@
|
|
|
4073
3725
|
|
|
4074
3726
|
// Convert number of thresholds into uniform thresholds.
|
|
4075
3727
|
if (!Array.isArray(tz)) {
|
|
4076
|
-
tz = tickStep(x0, x1, tz);
|
|
4077
|
-
tz =
|
|
3728
|
+
tz = tickStep$1(x0, x1, tz);
|
|
3729
|
+
tz = range(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive
|
|
4078
3730
|
}
|
|
4079
3731
|
|
|
4080
3732
|
// Remove any thresholds outside the domain.
|
|
@@ -4096,7 +3748,7 @@
|
|
|
4096
3748
|
for (i = 0; i < n; ++i) {
|
|
4097
3749
|
x = values[i];
|
|
4098
3750
|
if (x0 <= x && x <= x1) {
|
|
4099
|
-
bins[bisectRight(tz, x, 0, m)].push(data[i]);
|
|
3751
|
+
bins[bisectRight$1(tz, x, 0, m)].push(data[i]);
|
|
4100
3752
|
}
|
|
4101
3753
|
}
|
|
4102
3754
|
|
|
@@ -4118,8 +3770,8 @@
|
|
|
4118
3770
|
return histogram;
|
|
4119
3771
|
}
|
|
4120
3772
|
|
|
4121
|
-
function
|
|
4122
|
-
if (valueof == null) valueof = number$
|
|
3773
|
+
function quantile$1(values, p, valueof) {
|
|
3774
|
+
if (valueof == null) valueof = number$3;
|
|
4123
3775
|
if (!(n = values.length)) return;
|
|
4124
3776
|
if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
|
|
4125
3777
|
if (p >= 1) return +valueof(values[n - 1], n - 1, values);
|
|
@@ -4132,8 +3784,8 @@
|
|
|
4132
3784
|
}
|
|
4133
3785
|
|
|
4134
3786
|
function freedmanDiaconis(values, min, max) {
|
|
4135
|
-
values = map$3.call(values, number$
|
|
4136
|
-
return Math.ceil((max - min) / (2 * (
|
|
3787
|
+
values = map$3.call(values, number$3).sort(d3Ascending);
|
|
3788
|
+
return Math.ceil((max - min) / (2 * (quantile$1(values, 0.75) - quantile$1(values, 0.25)) * Math.pow(values.length, -1 / 3)));
|
|
4137
3789
|
}
|
|
4138
3790
|
|
|
4139
3791
|
function scott(values, min, max) {
|
|
@@ -4184,14 +3836,14 @@
|
|
|
4184
3836
|
|
|
4185
3837
|
if (valueof == null) {
|
|
4186
3838
|
while (++i < n) {
|
|
4187
|
-
if (!isNaN(value = number$
|
|
3839
|
+
if (!isNaN(value = number$3(values[i]))) sum += value;
|
|
4188
3840
|
else --m;
|
|
4189
3841
|
}
|
|
4190
3842
|
}
|
|
4191
3843
|
|
|
4192
3844
|
else {
|
|
4193
3845
|
while (++i < n) {
|
|
4194
|
-
if (!isNaN(value = number$
|
|
3846
|
+
if (!isNaN(value = number$3(valueof(values[i], i, values)))) sum += value;
|
|
4195
3847
|
else --m;
|
|
4196
3848
|
}
|
|
4197
3849
|
}
|
|
@@ -4207,7 +3859,7 @@
|
|
|
4207
3859
|
|
|
4208
3860
|
if (valueof == null) {
|
|
4209
3861
|
while (++i < n) {
|
|
4210
|
-
if (!isNaN(value = number$
|
|
3862
|
+
if (!isNaN(value = number$3(values[i]))) {
|
|
4211
3863
|
numbers.push(value);
|
|
4212
3864
|
}
|
|
4213
3865
|
}
|
|
@@ -4215,13 +3867,13 @@
|
|
|
4215
3867
|
|
|
4216
3868
|
else {
|
|
4217
3869
|
while (++i < n) {
|
|
4218
|
-
if (!isNaN(value = number$
|
|
3870
|
+
if (!isNaN(value = number$3(valueof(values[i], i, values)))) {
|
|
4219
3871
|
numbers.push(value);
|
|
4220
3872
|
}
|
|
4221
3873
|
}
|
|
4222
3874
|
}
|
|
4223
3875
|
|
|
4224
|
-
return
|
|
3876
|
+
return quantile$1(numbers.sort(d3Ascending), 0.5);
|
|
4225
3877
|
}
|
|
4226
3878
|
|
|
4227
3879
|
function merge(arrays) {
|
|
@@ -4295,7 +3947,7 @@
|
|
|
4295
3947
|
xi,
|
|
4296
3948
|
xj = values[j];
|
|
4297
3949
|
|
|
4298
|
-
if (compare == null) compare =
|
|
3950
|
+
if (compare == null) compare = d3Ascending;
|
|
4299
3951
|
|
|
4300
3952
|
while (++i < n) {
|
|
4301
3953
|
if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {
|
|
@@ -5095,8 +4747,8 @@
|
|
|
5095
4747
|
return Math.max(0, exponent(max) - exponent(step)) + 1;
|
|
5096
4748
|
}
|
|
5097
4749
|
|
|
5098
|
-
var t0
|
|
5099
|
-
t1
|
|
4750
|
+
var t0 = new Date,
|
|
4751
|
+
t1 = new Date;
|
|
5100
4752
|
|
|
5101
4753
|
function newInterval(floori, offseti, count, field) {
|
|
5102
4754
|
|
|
@@ -5148,9 +4800,9 @@
|
|
|
5148
4800
|
|
|
5149
4801
|
if (count) {
|
|
5150
4802
|
interval.count = function(start, end) {
|
|
5151
|
-
t0
|
|
5152
|
-
floori(t0
|
|
5153
|
-
return Math.floor(count(t0
|
|
4803
|
+
t0.setTime(+start), t1.setTime(+end);
|
|
4804
|
+
floori(t0), floori(t1);
|
|
4805
|
+
return Math.floor(count(t0, t1));
|
|
5154
4806
|
};
|
|
5155
4807
|
|
|
5156
4808
|
interval.every = function(step) {
|
|
@@ -7376,7 +7028,7 @@
|
|
|
7376
7028
|
var lVal = l[sortBy[i].idx];
|
|
7377
7029
|
var rVal = r[sortBy[i].idx];
|
|
7378
7030
|
if (lVal !== rVal) {
|
|
7379
|
-
return sortBy[i].reverse ? d3Descending(lVal, rVal) :
|
|
7031
|
+
return sortBy[i].reverse ? d3Descending(lVal, rVal) : d3Ascending(lVal, rVal);
|
|
7380
7032
|
}
|
|
7381
7033
|
}
|
|
7382
7034
|
return 0;
|
|
@@ -9345,730 +8997,168 @@
|
|
|
9345
8997
|
}(HTMLWidget));
|
|
9346
8998
|
CanvasWidget.prototype._class += " common_CanvasWidget";
|
|
9347
8999
|
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9000
|
+
var _version = "1.14.2-dev";
|
|
9001
|
+
function version() {
|
|
9002
|
+
return _version;
|
|
9351
9003
|
}
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9004
|
+
var ieVersion = (function () {
|
|
9005
|
+
var ua = navigator.userAgent;
|
|
9006
|
+
var tem;
|
|
9007
|
+
var M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
9008
|
+
if (/trident/i.test(M[1])) {
|
|
9009
|
+
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
9010
|
+
return parseFloat(tem[1]);
|
|
9011
|
+
}
|
|
9012
|
+
if (/msie/i.test(M[1])) {
|
|
9013
|
+
return parseFloat(M[2]);
|
|
9014
|
+
}
|
|
9015
|
+
return null;
|
|
9016
|
+
})();
|
|
9017
|
+
var isIE = ieVersion !== null;
|
|
9018
|
+
var svgMarkerGlitch = isIE && ieVersion <= 12;
|
|
9019
|
+
var _scrollBarWidth = null;
|
|
9020
|
+
function getScrollbarWidth() {
|
|
9021
|
+
if (_scrollBarWidth === null) {
|
|
9022
|
+
var outer = document.createElement("div");
|
|
9023
|
+
outer.style.visibility = "hidden";
|
|
9024
|
+
outer.style.width = "100px";
|
|
9025
|
+
// @ts-ignore
|
|
9026
|
+
outer.style.msOverflowStyle = "scrollbar";
|
|
9027
|
+
document.body.appendChild(outer);
|
|
9028
|
+
var widthNoScroll = outer.offsetWidth;
|
|
9029
|
+
outer.style.overflow = "scroll";
|
|
9030
|
+
var inner = document.createElement("div");
|
|
9031
|
+
inner.style.width = "100%";
|
|
9032
|
+
outer.appendChild(inner);
|
|
9033
|
+
var widthWithScroll = inner.offsetWidth;
|
|
9034
|
+
outer.parentNode.removeChild(outer);
|
|
9035
|
+
_scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
9036
|
+
}
|
|
9037
|
+
return _scrollBarWidth;
|
|
9357
9038
|
}
|
|
9039
|
+
// Polyfills ---
|
|
9040
|
+
window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || function (callback) {
|
|
9041
|
+
// Just enough for HTMLOverlay and C3 ---
|
|
9042
|
+
this.callback = callback;
|
|
9043
|
+
this.listeners = [];
|
|
9044
|
+
var MutationListener = function (callback2, domNode, type) {
|
|
9045
|
+
this.callback = callback2;
|
|
9046
|
+
this.domNode = domNode;
|
|
9047
|
+
this.type = type;
|
|
9048
|
+
};
|
|
9049
|
+
MutationListener.prototype = {
|
|
9050
|
+
handleEvent: function (evt) {
|
|
9051
|
+
var mutation = {
|
|
9052
|
+
type: this.type,
|
|
9053
|
+
target: this.domNode,
|
|
9054
|
+
addedNodes: [],
|
|
9055
|
+
removedNodes: [],
|
|
9056
|
+
previousSibling: evt.target.previousSibling,
|
|
9057
|
+
nextSibling: evt.target.nextSibling,
|
|
9058
|
+
attributeName: null,
|
|
9059
|
+
attributeNamespace: null,
|
|
9060
|
+
oldValue: null
|
|
9061
|
+
};
|
|
9062
|
+
this.callback([mutation]);
|
|
9063
|
+
}
|
|
9064
|
+
};
|
|
9065
|
+
this.observe = function (domNode, config) {
|
|
9066
|
+
var listener = null;
|
|
9067
|
+
if (config.attributes) {
|
|
9068
|
+
listener = new MutationListener(this.callback, domNode, "attributes");
|
|
9069
|
+
this.listeners.push(listener);
|
|
9070
|
+
domNode.addEventListener("DOMAttrModified", listener, true);
|
|
9071
|
+
}
|
|
9072
|
+
if (config.characterData) {
|
|
9073
|
+
listener = new MutationListener(this.callback, domNode, "characterData");
|
|
9074
|
+
this.listeners.push(listener);
|
|
9075
|
+
domNode.addEventListener("DOMCharacterDataModified", listener, true);
|
|
9076
|
+
}
|
|
9077
|
+
if (config.childList) {
|
|
9078
|
+
listener = new MutationListener(this.callback, domNode, "childList");
|
|
9079
|
+
this.listeners.push(listener);
|
|
9080
|
+
domNode.addEventListener("DOMNodeInserted", listener, true);
|
|
9081
|
+
domNode.addEventListener("DOMNodeRemoved", listener, true);
|
|
9082
|
+
}
|
|
9083
|
+
};
|
|
9084
|
+
this.disconnect = function () {
|
|
9085
|
+
this.listeners.forEach(function (item) {
|
|
9086
|
+
switch (item.type) {
|
|
9087
|
+
case "attributes":
|
|
9088
|
+
item.domNode.removeEventListener("DOMAttrModified", item, true);
|
|
9089
|
+
break;
|
|
9090
|
+
case "characterData":
|
|
9091
|
+
item.domNode.removeEventListener("DOMCharacterDataModified", item, true);
|
|
9092
|
+
break;
|
|
9093
|
+
case "childList":
|
|
9094
|
+
item.domNode.removeEventListener("DOMNodeRemoved", item, true);
|
|
9095
|
+
item.domNode.removeEventListener("DOMNodeInserted", item, true);
|
|
9096
|
+
break;
|
|
9097
|
+
}
|
|
9098
|
+
});
|
|
9099
|
+
this.listeners = [];
|
|
9100
|
+
};
|
|
9101
|
+
};
|
|
9102
|
+
Math.sign = Math.sign || function (x) {
|
|
9103
|
+
x = +x; // convert to a number
|
|
9104
|
+
if (x === 0 || isNaN(x)) {
|
|
9105
|
+
return x;
|
|
9106
|
+
}
|
|
9107
|
+
return x > 0 ? 1 : -1;
|
|
9108
|
+
};
|
|
9358
9109
|
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9110
|
+
var Platform = /*#__PURE__*/Object.freeze({
|
|
9111
|
+
__proto__: null,
|
|
9112
|
+
version: version,
|
|
9113
|
+
ieVersion: ieVersion,
|
|
9114
|
+
isIE: isIE,
|
|
9115
|
+
svgMarkerGlitch: svgMarkerGlitch,
|
|
9116
|
+
getScrollbarWidth: getScrollbarWidth
|
|
9117
|
+
});
|
|
9363
9118
|
|
|
9364
|
-
var
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9119
|
+
var Transition = /** @class */ (function () {
|
|
9120
|
+
function Transition(widget) {
|
|
9121
|
+
this._widget = widget;
|
|
9122
|
+
this._duration = 250;
|
|
9123
|
+
this._delay = 0;
|
|
9124
|
+
this._ease = cubicInOut;
|
|
9125
|
+
}
|
|
9126
|
+
Transition.prototype.duration = function (_) {
|
|
9127
|
+
if (!arguments.length)
|
|
9128
|
+
return this._duration;
|
|
9129
|
+
this._duration = _;
|
|
9130
|
+
return this._widget;
|
|
9131
|
+
};
|
|
9132
|
+
Transition.prototype.delay = function (_) {
|
|
9133
|
+
if (!arguments.length)
|
|
9134
|
+
return this._delay;
|
|
9135
|
+
this._delay = _;
|
|
9136
|
+
return this._widget;
|
|
9137
|
+
};
|
|
9138
|
+
Transition.prototype.ease = function (_) {
|
|
9139
|
+
if (!arguments.length)
|
|
9140
|
+
return this._ease;
|
|
9141
|
+
this._ease = _;
|
|
9142
|
+
return this._widget;
|
|
9143
|
+
};
|
|
9144
|
+
Transition.prototype.apply = function (selection) {
|
|
9145
|
+
if (this._duration || this._delay) {
|
|
9146
|
+
return selection.transition()
|
|
9147
|
+
.duration(this._duration)
|
|
9148
|
+
.delay(this._delay)
|
|
9149
|
+
.ease(this._ease);
|
|
9150
|
+
}
|
|
9151
|
+
return selection;
|
|
9152
|
+
};
|
|
9153
|
+
return Transition;
|
|
9154
|
+
}());
|
|
9374
9155
|
|
|
9375
|
-
var
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
beige: 0xf5f5dc,
|
|
9382
|
-
bisque: 0xffe4c4,
|
|
9383
|
-
black: 0x000000,
|
|
9384
|
-
blanchedalmond: 0xffebcd,
|
|
9385
|
-
blue: 0x0000ff,
|
|
9386
|
-
blueviolet: 0x8a2be2,
|
|
9387
|
-
brown: 0xa52a2a,
|
|
9388
|
-
burlywood: 0xdeb887,
|
|
9389
|
-
cadetblue: 0x5f9ea0,
|
|
9390
|
-
chartreuse: 0x7fff00,
|
|
9391
|
-
chocolate: 0xd2691e,
|
|
9392
|
-
coral: 0xff7f50,
|
|
9393
|
-
cornflowerblue: 0x6495ed,
|
|
9394
|
-
cornsilk: 0xfff8dc,
|
|
9395
|
-
crimson: 0xdc143c,
|
|
9396
|
-
cyan: 0x00ffff,
|
|
9397
|
-
darkblue: 0x00008b,
|
|
9398
|
-
darkcyan: 0x008b8b,
|
|
9399
|
-
darkgoldenrod: 0xb8860b,
|
|
9400
|
-
darkgray: 0xa9a9a9,
|
|
9401
|
-
darkgreen: 0x006400,
|
|
9402
|
-
darkgrey: 0xa9a9a9,
|
|
9403
|
-
darkkhaki: 0xbdb76b,
|
|
9404
|
-
darkmagenta: 0x8b008b,
|
|
9405
|
-
darkolivegreen: 0x556b2f,
|
|
9406
|
-
darkorange: 0xff8c00,
|
|
9407
|
-
darkorchid: 0x9932cc,
|
|
9408
|
-
darkred: 0x8b0000,
|
|
9409
|
-
darksalmon: 0xe9967a,
|
|
9410
|
-
darkseagreen: 0x8fbc8f,
|
|
9411
|
-
darkslateblue: 0x483d8b,
|
|
9412
|
-
darkslategray: 0x2f4f4f,
|
|
9413
|
-
darkslategrey: 0x2f4f4f,
|
|
9414
|
-
darkturquoise: 0x00ced1,
|
|
9415
|
-
darkviolet: 0x9400d3,
|
|
9416
|
-
deeppink: 0xff1493,
|
|
9417
|
-
deepskyblue: 0x00bfff,
|
|
9418
|
-
dimgray: 0x696969,
|
|
9419
|
-
dimgrey: 0x696969,
|
|
9420
|
-
dodgerblue: 0x1e90ff,
|
|
9421
|
-
firebrick: 0xb22222,
|
|
9422
|
-
floralwhite: 0xfffaf0,
|
|
9423
|
-
forestgreen: 0x228b22,
|
|
9424
|
-
fuchsia: 0xff00ff,
|
|
9425
|
-
gainsboro: 0xdcdcdc,
|
|
9426
|
-
ghostwhite: 0xf8f8ff,
|
|
9427
|
-
gold: 0xffd700,
|
|
9428
|
-
goldenrod: 0xdaa520,
|
|
9429
|
-
gray: 0x808080,
|
|
9430
|
-
green: 0x008000,
|
|
9431
|
-
greenyellow: 0xadff2f,
|
|
9432
|
-
grey: 0x808080,
|
|
9433
|
-
honeydew: 0xf0fff0,
|
|
9434
|
-
hotpink: 0xff69b4,
|
|
9435
|
-
indianred: 0xcd5c5c,
|
|
9436
|
-
indigo: 0x4b0082,
|
|
9437
|
-
ivory: 0xfffff0,
|
|
9438
|
-
khaki: 0xf0e68c,
|
|
9439
|
-
lavender: 0xe6e6fa,
|
|
9440
|
-
lavenderblush: 0xfff0f5,
|
|
9441
|
-
lawngreen: 0x7cfc00,
|
|
9442
|
-
lemonchiffon: 0xfffacd,
|
|
9443
|
-
lightblue: 0xadd8e6,
|
|
9444
|
-
lightcoral: 0xf08080,
|
|
9445
|
-
lightcyan: 0xe0ffff,
|
|
9446
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
9447
|
-
lightgray: 0xd3d3d3,
|
|
9448
|
-
lightgreen: 0x90ee90,
|
|
9449
|
-
lightgrey: 0xd3d3d3,
|
|
9450
|
-
lightpink: 0xffb6c1,
|
|
9451
|
-
lightsalmon: 0xffa07a,
|
|
9452
|
-
lightseagreen: 0x20b2aa,
|
|
9453
|
-
lightskyblue: 0x87cefa,
|
|
9454
|
-
lightslategray: 0x778899,
|
|
9455
|
-
lightslategrey: 0x778899,
|
|
9456
|
-
lightsteelblue: 0xb0c4de,
|
|
9457
|
-
lightyellow: 0xffffe0,
|
|
9458
|
-
lime: 0x00ff00,
|
|
9459
|
-
limegreen: 0x32cd32,
|
|
9460
|
-
linen: 0xfaf0e6,
|
|
9461
|
-
magenta: 0xff00ff,
|
|
9462
|
-
maroon: 0x800000,
|
|
9463
|
-
mediumaquamarine: 0x66cdaa,
|
|
9464
|
-
mediumblue: 0x0000cd,
|
|
9465
|
-
mediumorchid: 0xba55d3,
|
|
9466
|
-
mediumpurple: 0x9370db,
|
|
9467
|
-
mediumseagreen: 0x3cb371,
|
|
9468
|
-
mediumslateblue: 0x7b68ee,
|
|
9469
|
-
mediumspringgreen: 0x00fa9a,
|
|
9470
|
-
mediumturquoise: 0x48d1cc,
|
|
9471
|
-
mediumvioletred: 0xc71585,
|
|
9472
|
-
midnightblue: 0x191970,
|
|
9473
|
-
mintcream: 0xf5fffa,
|
|
9474
|
-
mistyrose: 0xffe4e1,
|
|
9475
|
-
moccasin: 0xffe4b5,
|
|
9476
|
-
navajowhite: 0xffdead,
|
|
9477
|
-
navy: 0x000080,
|
|
9478
|
-
oldlace: 0xfdf5e6,
|
|
9479
|
-
olive: 0x808000,
|
|
9480
|
-
olivedrab: 0x6b8e23,
|
|
9481
|
-
orange: 0xffa500,
|
|
9482
|
-
orangered: 0xff4500,
|
|
9483
|
-
orchid: 0xda70d6,
|
|
9484
|
-
palegoldenrod: 0xeee8aa,
|
|
9485
|
-
palegreen: 0x98fb98,
|
|
9486
|
-
paleturquoise: 0xafeeee,
|
|
9487
|
-
palevioletred: 0xdb7093,
|
|
9488
|
-
papayawhip: 0xffefd5,
|
|
9489
|
-
peachpuff: 0xffdab9,
|
|
9490
|
-
peru: 0xcd853f,
|
|
9491
|
-
pink: 0xffc0cb,
|
|
9492
|
-
plum: 0xdda0dd,
|
|
9493
|
-
powderblue: 0xb0e0e6,
|
|
9494
|
-
purple: 0x800080,
|
|
9495
|
-
rebeccapurple: 0x663399,
|
|
9496
|
-
red: 0xff0000,
|
|
9497
|
-
rosybrown: 0xbc8f8f,
|
|
9498
|
-
royalblue: 0x4169e1,
|
|
9499
|
-
saddlebrown: 0x8b4513,
|
|
9500
|
-
salmon: 0xfa8072,
|
|
9501
|
-
sandybrown: 0xf4a460,
|
|
9502
|
-
seagreen: 0x2e8b57,
|
|
9503
|
-
seashell: 0xfff5ee,
|
|
9504
|
-
sienna: 0xa0522d,
|
|
9505
|
-
silver: 0xc0c0c0,
|
|
9506
|
-
skyblue: 0x87ceeb,
|
|
9507
|
-
slateblue: 0x6a5acd,
|
|
9508
|
-
slategray: 0x708090,
|
|
9509
|
-
slategrey: 0x708090,
|
|
9510
|
-
snow: 0xfffafa,
|
|
9511
|
-
springgreen: 0x00ff7f,
|
|
9512
|
-
steelblue: 0x4682b4,
|
|
9513
|
-
tan: 0xd2b48c,
|
|
9514
|
-
teal: 0x008080,
|
|
9515
|
-
thistle: 0xd8bfd8,
|
|
9516
|
-
tomato: 0xff6347,
|
|
9517
|
-
turquoise: 0x40e0d0,
|
|
9518
|
-
violet: 0xee82ee,
|
|
9519
|
-
wheat: 0xf5deb3,
|
|
9520
|
-
white: 0xffffff,
|
|
9521
|
-
whitesmoke: 0xf5f5f5,
|
|
9522
|
-
yellow: 0xffff00,
|
|
9523
|
-
yellowgreen: 0x9acd32
|
|
9524
|
-
};
|
|
9525
|
-
|
|
9526
|
-
define$1(Color$1, color$1, {
|
|
9527
|
-
copy: function(channels) {
|
|
9528
|
-
return Object.assign(new this.constructor, this, channels);
|
|
9529
|
-
},
|
|
9530
|
-
displayable: function() {
|
|
9531
|
-
return this.rgb().displayable();
|
|
9532
|
-
},
|
|
9533
|
-
hex: color_formatHex$1, // Deprecated! Use color.formatHex.
|
|
9534
|
-
formatHex: color_formatHex$1,
|
|
9535
|
-
formatHsl: color_formatHsl$1,
|
|
9536
|
-
formatRgb: color_formatRgb$1,
|
|
9537
|
-
toString: color_formatRgb$1
|
|
9538
|
-
});
|
|
9539
|
-
|
|
9540
|
-
function color_formatHex$1() {
|
|
9541
|
-
return this.rgb().formatHex();
|
|
9542
|
-
}
|
|
9543
|
-
|
|
9544
|
-
function color_formatHsl$1() {
|
|
9545
|
-
return hslConvert$1(this).formatHsl();
|
|
9546
|
-
}
|
|
9547
|
-
|
|
9548
|
-
function color_formatRgb$1() {
|
|
9549
|
-
return this.rgb().formatRgb();
|
|
9550
|
-
}
|
|
9551
|
-
|
|
9552
|
-
function color$1(format) {
|
|
9553
|
-
var m, l;
|
|
9554
|
-
format = (format + "").trim().toLowerCase();
|
|
9555
|
-
return (m = reHex$1.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn$1(m) // #ff0000
|
|
9556
|
-
: l === 3 ? new Rgb$1((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
9557
|
-
: l === 8 ? rgba$1(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
9558
|
-
: 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
|
|
9559
|
-
: null) // invalid hex
|
|
9560
|
-
: (m = reRgbInteger$1.exec(format)) ? new Rgb$1(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
9561
|
-
: (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%)
|
|
9562
|
-
: (m = reRgbaInteger$1.exec(format)) ? rgba$1(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
9563
|
-
: (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)
|
|
9564
|
-
: (m = reHslPercent$1.exec(format)) ? hsla$1(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
9565
|
-
: (m = reHslaPercent$1.exec(format)) ? hsla$1(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
9566
|
-
: named$1.hasOwnProperty(format) ? rgbn$1(named$1[format]) // eslint-disable-line no-prototype-builtins
|
|
9567
|
-
: format === "transparent" ? new Rgb$1(NaN, NaN, NaN, 0)
|
|
9568
|
-
: null;
|
|
9569
|
-
}
|
|
9570
|
-
|
|
9571
|
-
function rgbn$1(n) {
|
|
9572
|
-
return new Rgb$1(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
9573
|
-
}
|
|
9574
|
-
|
|
9575
|
-
function rgba$1(r, g, b, a) {
|
|
9576
|
-
if (a <= 0) r = g = b = NaN;
|
|
9577
|
-
return new Rgb$1(r, g, b, a);
|
|
9578
|
-
}
|
|
9579
|
-
|
|
9580
|
-
function rgbConvert$1(o) {
|
|
9581
|
-
if (!(o instanceof Color$1)) o = color$1(o);
|
|
9582
|
-
if (!o) return new Rgb$1;
|
|
9583
|
-
o = o.rgb();
|
|
9584
|
-
return new Rgb$1(o.r, o.g, o.b, o.opacity);
|
|
9585
|
-
}
|
|
9586
|
-
|
|
9587
|
-
function rgb$1(r, g, b, opacity) {
|
|
9588
|
-
return arguments.length === 1 ? rgbConvert$1(r) : new Rgb$1(r, g, b, opacity == null ? 1 : opacity);
|
|
9589
|
-
}
|
|
9590
|
-
|
|
9591
|
-
function Rgb$1(r, g, b, opacity) {
|
|
9592
|
-
this.r = +r;
|
|
9593
|
-
this.g = +g;
|
|
9594
|
-
this.b = +b;
|
|
9595
|
-
this.opacity = +opacity;
|
|
9596
|
-
}
|
|
9597
|
-
|
|
9598
|
-
define$1(Rgb$1, rgb$1, extend$1(Color$1, {
|
|
9599
|
-
brighter: function(k) {
|
|
9600
|
-
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9601
|
-
return new Rgb$1(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9602
|
-
},
|
|
9603
|
-
darker: function(k) {
|
|
9604
|
-
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9605
|
-
return new Rgb$1(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
9606
|
-
},
|
|
9607
|
-
rgb: function() {
|
|
9608
|
-
return this;
|
|
9609
|
-
},
|
|
9610
|
-
displayable: function() {
|
|
9611
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
9612
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
9613
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
9614
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
9615
|
-
},
|
|
9616
|
-
hex: rgb_formatHex$1, // Deprecated! Use color.formatHex.
|
|
9617
|
-
formatHex: rgb_formatHex$1,
|
|
9618
|
-
formatRgb: rgb_formatRgb$1,
|
|
9619
|
-
toString: rgb_formatRgb$1
|
|
9620
|
-
}));
|
|
9621
|
-
|
|
9622
|
-
function rgb_formatHex$1() {
|
|
9623
|
-
return "#" + hex$1(this.r) + hex$1(this.g) + hex$1(this.b);
|
|
9624
|
-
}
|
|
9625
|
-
|
|
9626
|
-
function rgb_formatRgb$1() {
|
|
9627
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
9628
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
9629
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
9630
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
9631
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
9632
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
9633
|
-
}
|
|
9634
|
-
|
|
9635
|
-
function hex$1(value) {
|
|
9636
|
-
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
9637
|
-
return (value < 16 ? "0" : "") + value.toString(16);
|
|
9638
|
-
}
|
|
9639
|
-
|
|
9640
|
-
function hsla$1(h, s, l, a) {
|
|
9641
|
-
if (a <= 0) h = s = l = NaN;
|
|
9642
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
9643
|
-
else if (s <= 0) h = NaN;
|
|
9644
|
-
return new Hsl$1(h, s, l, a);
|
|
9645
|
-
}
|
|
9646
|
-
|
|
9647
|
-
function hslConvert$1(o) {
|
|
9648
|
-
if (o instanceof Hsl$1) return new Hsl$1(o.h, o.s, o.l, o.opacity);
|
|
9649
|
-
if (!(o instanceof Color$1)) o = color$1(o);
|
|
9650
|
-
if (!o) return new Hsl$1;
|
|
9651
|
-
if (o instanceof Hsl$1) return o;
|
|
9652
|
-
o = o.rgb();
|
|
9653
|
-
var r = o.r / 255,
|
|
9654
|
-
g = o.g / 255,
|
|
9655
|
-
b = o.b / 255,
|
|
9656
|
-
min = Math.min(r, g, b),
|
|
9657
|
-
max = Math.max(r, g, b),
|
|
9658
|
-
h = NaN,
|
|
9659
|
-
s = max - min,
|
|
9660
|
-
l = (max + min) / 2;
|
|
9661
|
-
if (s) {
|
|
9662
|
-
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
9663
|
-
else if (g === max) h = (b - r) / s + 2;
|
|
9664
|
-
else h = (r - g) / s + 4;
|
|
9665
|
-
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
9666
|
-
h *= 60;
|
|
9667
|
-
} else {
|
|
9668
|
-
s = l > 0 && l < 1 ? 0 : h;
|
|
9669
|
-
}
|
|
9670
|
-
return new Hsl$1(h, s, l, o.opacity);
|
|
9671
|
-
}
|
|
9672
|
-
|
|
9673
|
-
function hsl$1(h, s, l, opacity) {
|
|
9674
|
-
return arguments.length === 1 ? hslConvert$1(h) : new Hsl$1(h, s, l, opacity == null ? 1 : opacity);
|
|
9675
|
-
}
|
|
9676
|
-
|
|
9677
|
-
function Hsl$1(h, s, l, opacity) {
|
|
9678
|
-
this.h = +h;
|
|
9679
|
-
this.s = +s;
|
|
9680
|
-
this.l = +l;
|
|
9681
|
-
this.opacity = +opacity;
|
|
9682
|
-
}
|
|
9683
|
-
|
|
9684
|
-
define$1(Hsl$1, hsl$1, extend$1(Color$1, {
|
|
9685
|
-
brighter: function(k) {
|
|
9686
|
-
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9687
|
-
return new Hsl$1(this.h, this.s, this.l * k, this.opacity);
|
|
9688
|
-
},
|
|
9689
|
-
darker: function(k) {
|
|
9690
|
-
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9691
|
-
return new Hsl$1(this.h, this.s, this.l * k, this.opacity);
|
|
9692
|
-
},
|
|
9693
|
-
rgb: function() {
|
|
9694
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
9695
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
9696
|
-
l = this.l,
|
|
9697
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
9698
|
-
m1 = 2 * l - m2;
|
|
9699
|
-
return new Rgb$1(
|
|
9700
|
-
hsl2rgb$1(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
9701
|
-
hsl2rgb$1(h, m1, m2),
|
|
9702
|
-
hsl2rgb$1(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
9703
|
-
this.opacity
|
|
9704
|
-
);
|
|
9705
|
-
},
|
|
9706
|
-
displayable: function() {
|
|
9707
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
9708
|
-
&& (0 <= this.l && this.l <= 1)
|
|
9709
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
9710
|
-
},
|
|
9711
|
-
formatHsl: function() {
|
|
9712
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
9713
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
9714
|
-
+ (this.h || 0) + ", "
|
|
9715
|
-
+ (this.s || 0) * 100 + "%, "
|
|
9716
|
-
+ (this.l || 0) * 100 + "%"
|
|
9717
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
9718
|
-
}
|
|
9719
|
-
}));
|
|
9720
|
-
|
|
9721
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
9722
|
-
function hsl2rgb$1(h, m1, m2) {
|
|
9723
|
-
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
9724
|
-
: h < 180 ? m2
|
|
9725
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
9726
|
-
: m1) * 255;
|
|
9727
|
-
}
|
|
9728
|
-
|
|
9729
|
-
var deg2rad$1 = Math.PI / 180;
|
|
9730
|
-
var rad2deg$1 = 180 / Math.PI;
|
|
9731
|
-
|
|
9732
|
-
// https://observablehq.com/@mbostock/lab-and-rgb
|
|
9733
|
-
var K = 18,
|
|
9734
|
-
Xn = 0.96422,
|
|
9735
|
-
Yn = 1,
|
|
9736
|
-
Zn = 0.82521,
|
|
9737
|
-
t0 = 4 / 29,
|
|
9738
|
-
t1 = 6 / 29,
|
|
9739
|
-
t2 = 3 * t1 * t1,
|
|
9740
|
-
t3 = t1 * t1 * t1;
|
|
9741
|
-
|
|
9742
|
-
function labConvert(o) {
|
|
9743
|
-
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
9744
|
-
if (o instanceof Hcl) return hcl2lab(o);
|
|
9745
|
-
if (!(o instanceof Rgb$1)) o = rgbConvert$1(o);
|
|
9746
|
-
var r = rgb2lrgb(o.r),
|
|
9747
|
-
g = rgb2lrgb(o.g),
|
|
9748
|
-
b = rgb2lrgb(o.b),
|
|
9749
|
-
y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
|
9750
|
-
if (r === g && g === b) x = z = y; else {
|
|
9751
|
-
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
|
9752
|
-
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
|
9753
|
-
}
|
|
9754
|
-
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
|
9755
|
-
}
|
|
9756
|
-
|
|
9757
|
-
function gray(l, opacity) {
|
|
9758
|
-
return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
|
|
9759
|
-
}
|
|
9760
|
-
|
|
9761
|
-
function lab(l, a, b, opacity) {
|
|
9762
|
-
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
|
9763
|
-
}
|
|
9764
|
-
|
|
9765
|
-
function Lab(l, a, b, opacity) {
|
|
9766
|
-
this.l = +l;
|
|
9767
|
-
this.a = +a;
|
|
9768
|
-
this.b = +b;
|
|
9769
|
-
this.opacity = +opacity;
|
|
9770
|
-
}
|
|
9771
|
-
|
|
9772
|
-
define$1(Lab, lab, extend$1(Color$1, {
|
|
9773
|
-
brighter: function(k) {
|
|
9774
|
-
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
9775
|
-
},
|
|
9776
|
-
darker: function(k) {
|
|
9777
|
-
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
9778
|
-
},
|
|
9779
|
-
rgb: function() {
|
|
9780
|
-
var y = (this.l + 16) / 116,
|
|
9781
|
-
x = isNaN(this.a) ? y : y + this.a / 500,
|
|
9782
|
-
z = isNaN(this.b) ? y : y - this.b / 200;
|
|
9783
|
-
x = Xn * lab2xyz(x);
|
|
9784
|
-
y = Yn * lab2xyz(y);
|
|
9785
|
-
z = Zn * lab2xyz(z);
|
|
9786
|
-
return new Rgb$1(
|
|
9787
|
-
lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
9788
|
-
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
|
|
9789
|
-
lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
9790
|
-
this.opacity
|
|
9791
|
-
);
|
|
9792
|
-
}
|
|
9793
|
-
}));
|
|
9794
|
-
|
|
9795
|
-
function xyz2lab(t) {
|
|
9796
|
-
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
|
|
9797
|
-
}
|
|
9798
|
-
|
|
9799
|
-
function lab2xyz(t) {
|
|
9800
|
-
return t > t1 ? t * t * t : t2 * (t - t0);
|
|
9801
|
-
}
|
|
9802
|
-
|
|
9803
|
-
function lrgb2rgb(x) {
|
|
9804
|
-
return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
|
9805
|
-
}
|
|
9806
|
-
|
|
9807
|
-
function rgb2lrgb(x) {
|
|
9808
|
-
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
9809
|
-
}
|
|
9810
|
-
|
|
9811
|
-
function hclConvert(o) {
|
|
9812
|
-
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
9813
|
-
if (!(o instanceof Lab)) o = labConvert(o);
|
|
9814
|
-
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
9815
|
-
var h = Math.atan2(o.b, o.a) * rad2deg$1;
|
|
9816
|
-
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
9817
|
-
}
|
|
9818
|
-
|
|
9819
|
-
function lch(l, c, h, opacity) {
|
|
9820
|
-
return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
9821
|
-
}
|
|
9822
|
-
|
|
9823
|
-
function hcl(h, c, l, opacity) {
|
|
9824
|
-
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
9825
|
-
}
|
|
9826
|
-
|
|
9827
|
-
function Hcl(h, c, l, opacity) {
|
|
9828
|
-
this.h = +h;
|
|
9829
|
-
this.c = +c;
|
|
9830
|
-
this.l = +l;
|
|
9831
|
-
this.opacity = +opacity;
|
|
9832
|
-
}
|
|
9833
|
-
|
|
9834
|
-
function hcl2lab(o) {
|
|
9835
|
-
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
9836
|
-
var h = o.h * deg2rad$1;
|
|
9837
|
-
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
9838
|
-
}
|
|
9839
|
-
|
|
9840
|
-
define$1(Hcl, hcl, extend$1(Color$1, {
|
|
9841
|
-
brighter: function(k) {
|
|
9842
|
-
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
9843
|
-
},
|
|
9844
|
-
darker: function(k) {
|
|
9845
|
-
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
9846
|
-
},
|
|
9847
|
-
rgb: function() {
|
|
9848
|
-
return hcl2lab(this).rgb();
|
|
9849
|
-
}
|
|
9850
|
-
}));
|
|
9851
|
-
|
|
9852
|
-
var A$1 = -0.14861,
|
|
9853
|
-
B$1 = +1.78277,
|
|
9854
|
-
C$1 = -0.29227,
|
|
9855
|
-
D$1 = -0.90649,
|
|
9856
|
-
E$1 = +1.97294,
|
|
9857
|
-
ED$1 = E$1 * D$1,
|
|
9858
|
-
EB$1 = E$1 * B$1,
|
|
9859
|
-
BC_DA$1 = B$1 * C$1 - D$1 * A$1;
|
|
9860
|
-
|
|
9861
|
-
function cubehelixConvert$1(o) {
|
|
9862
|
-
if (o instanceof Cubehelix$1) return new Cubehelix$1(o.h, o.s, o.l, o.opacity);
|
|
9863
|
-
if (!(o instanceof Rgb$1)) o = rgbConvert$1(o);
|
|
9864
|
-
var r = o.r / 255,
|
|
9865
|
-
g = o.g / 255,
|
|
9866
|
-
b = o.b / 255,
|
|
9867
|
-
l = (BC_DA$1 * b + ED$1 * r - EB$1 * g) / (BC_DA$1 + ED$1 - EB$1),
|
|
9868
|
-
bl = b - l,
|
|
9869
|
-
k = (E$1 * (g - l) - C$1 * bl) / D$1,
|
|
9870
|
-
s = Math.sqrt(k * k + bl * bl) / (E$1 * l * (1 - l)), // NaN if l=0 or l=1
|
|
9871
|
-
h = s ? Math.atan2(k, bl) * rad2deg$1 - 120 : NaN;
|
|
9872
|
-
return new Cubehelix$1(h < 0 ? h + 360 : h, s, l, o.opacity);
|
|
9873
|
-
}
|
|
9874
|
-
|
|
9875
|
-
function cubehelix$2(h, s, l, opacity) {
|
|
9876
|
-
return arguments.length === 1 ? cubehelixConvert$1(h) : new Cubehelix$1(h, s, l, opacity == null ? 1 : opacity);
|
|
9877
|
-
}
|
|
9878
|
-
|
|
9879
|
-
function Cubehelix$1(h, s, l, opacity) {
|
|
9880
|
-
this.h = +h;
|
|
9881
|
-
this.s = +s;
|
|
9882
|
-
this.l = +l;
|
|
9883
|
-
this.opacity = +opacity;
|
|
9884
|
-
}
|
|
9885
|
-
|
|
9886
|
-
define$1(Cubehelix$1, cubehelix$2, extend$1(Color$1, {
|
|
9887
|
-
brighter: function(k) {
|
|
9888
|
-
k = k == null ? brighter$1 : Math.pow(brighter$1, k);
|
|
9889
|
-
return new Cubehelix$1(this.h, this.s, this.l * k, this.opacity);
|
|
9890
|
-
},
|
|
9891
|
-
darker: function(k) {
|
|
9892
|
-
k = k == null ? darker$1 : Math.pow(darker$1, k);
|
|
9893
|
-
return new Cubehelix$1(this.h, this.s, this.l * k, this.opacity);
|
|
9894
|
-
},
|
|
9895
|
-
rgb: function() {
|
|
9896
|
-
var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad$1,
|
|
9897
|
-
l = +this.l,
|
|
9898
|
-
a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
|
|
9899
|
-
cosh = Math.cos(h),
|
|
9900
|
-
sinh = Math.sin(h);
|
|
9901
|
-
return new Rgb$1(
|
|
9902
|
-
255 * (l + a * (A$1 * cosh + B$1 * sinh)),
|
|
9903
|
-
255 * (l + a * (C$1 * cosh + D$1 * sinh)),
|
|
9904
|
-
255 * (l + a * (E$1 * cosh)),
|
|
9905
|
-
this.opacity
|
|
9906
|
-
);
|
|
9907
|
-
}
|
|
9908
|
-
}));
|
|
9909
|
-
|
|
9910
|
-
var _version = "1.14.2-dev";
|
|
9911
|
-
function version() {
|
|
9912
|
-
return _version;
|
|
9913
|
-
}
|
|
9914
|
-
var ieVersion = (function () {
|
|
9915
|
-
var ua = navigator.userAgent;
|
|
9916
|
-
var tem;
|
|
9917
|
-
var M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
|
|
9918
|
-
if (/trident/i.test(M[1])) {
|
|
9919
|
-
tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
|
|
9920
|
-
return parseFloat(tem[1]);
|
|
9921
|
-
}
|
|
9922
|
-
if (/msie/i.test(M[1])) {
|
|
9923
|
-
return parseFloat(M[2]);
|
|
9924
|
-
}
|
|
9925
|
-
return null;
|
|
9926
|
-
})();
|
|
9927
|
-
var isIE = ieVersion !== null;
|
|
9928
|
-
var svgMarkerGlitch = isIE && ieVersion <= 12;
|
|
9929
|
-
var _scrollBarWidth = null;
|
|
9930
|
-
function getScrollbarWidth() {
|
|
9931
|
-
if (_scrollBarWidth === null) {
|
|
9932
|
-
var outer = document.createElement("div");
|
|
9933
|
-
outer.style.visibility = "hidden";
|
|
9934
|
-
outer.style.width = "100px";
|
|
9935
|
-
// @ts-ignore
|
|
9936
|
-
outer.style.msOverflowStyle = "scrollbar";
|
|
9937
|
-
document.body.appendChild(outer);
|
|
9938
|
-
var widthNoScroll = outer.offsetWidth;
|
|
9939
|
-
outer.style.overflow = "scroll";
|
|
9940
|
-
var inner = document.createElement("div");
|
|
9941
|
-
inner.style.width = "100%";
|
|
9942
|
-
outer.appendChild(inner);
|
|
9943
|
-
var widthWithScroll = inner.offsetWidth;
|
|
9944
|
-
outer.parentNode.removeChild(outer);
|
|
9945
|
-
_scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
9946
|
-
}
|
|
9947
|
-
return _scrollBarWidth;
|
|
9948
|
-
}
|
|
9949
|
-
// Polyfills ---
|
|
9950
|
-
window.MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || function (callback) {
|
|
9951
|
-
// Just enough for HTMLOverlay and C3 ---
|
|
9952
|
-
this.callback = callback;
|
|
9953
|
-
this.listeners = [];
|
|
9954
|
-
var MutationListener = function (callback2, domNode, type) {
|
|
9955
|
-
this.callback = callback2;
|
|
9956
|
-
this.domNode = domNode;
|
|
9957
|
-
this.type = type;
|
|
9958
|
-
};
|
|
9959
|
-
MutationListener.prototype = {
|
|
9960
|
-
handleEvent: function (evt) {
|
|
9961
|
-
var mutation = {
|
|
9962
|
-
type: this.type,
|
|
9963
|
-
target: this.domNode,
|
|
9964
|
-
addedNodes: [],
|
|
9965
|
-
removedNodes: [],
|
|
9966
|
-
previousSibling: evt.target.previousSibling,
|
|
9967
|
-
nextSibling: evt.target.nextSibling,
|
|
9968
|
-
attributeName: null,
|
|
9969
|
-
attributeNamespace: null,
|
|
9970
|
-
oldValue: null
|
|
9971
|
-
};
|
|
9972
|
-
this.callback([mutation]);
|
|
9973
|
-
}
|
|
9974
|
-
};
|
|
9975
|
-
this.observe = function (domNode, config) {
|
|
9976
|
-
var listener = null;
|
|
9977
|
-
if (config.attributes) {
|
|
9978
|
-
listener = new MutationListener(this.callback, domNode, "attributes");
|
|
9979
|
-
this.listeners.push(listener);
|
|
9980
|
-
domNode.addEventListener("DOMAttrModified", listener, true);
|
|
9981
|
-
}
|
|
9982
|
-
if (config.characterData) {
|
|
9983
|
-
listener = new MutationListener(this.callback, domNode, "characterData");
|
|
9984
|
-
this.listeners.push(listener);
|
|
9985
|
-
domNode.addEventListener("DOMCharacterDataModified", listener, true);
|
|
9986
|
-
}
|
|
9987
|
-
if (config.childList) {
|
|
9988
|
-
listener = new MutationListener(this.callback, domNode, "childList");
|
|
9989
|
-
this.listeners.push(listener);
|
|
9990
|
-
domNode.addEventListener("DOMNodeInserted", listener, true);
|
|
9991
|
-
domNode.addEventListener("DOMNodeRemoved", listener, true);
|
|
9992
|
-
}
|
|
9993
|
-
};
|
|
9994
|
-
this.disconnect = function () {
|
|
9995
|
-
this.listeners.forEach(function (item) {
|
|
9996
|
-
switch (item.type) {
|
|
9997
|
-
case "attributes":
|
|
9998
|
-
item.domNode.removeEventListener("DOMAttrModified", item, true);
|
|
9999
|
-
break;
|
|
10000
|
-
case "characterData":
|
|
10001
|
-
item.domNode.removeEventListener("DOMCharacterDataModified", item, true);
|
|
10002
|
-
break;
|
|
10003
|
-
case "childList":
|
|
10004
|
-
item.domNode.removeEventListener("DOMNodeRemoved", item, true);
|
|
10005
|
-
item.domNode.removeEventListener("DOMNodeInserted", item, true);
|
|
10006
|
-
break;
|
|
10007
|
-
}
|
|
10008
|
-
});
|
|
10009
|
-
this.listeners = [];
|
|
10010
|
-
};
|
|
10011
|
-
};
|
|
10012
|
-
Math.sign = Math.sign || function (x) {
|
|
10013
|
-
x = +x; // convert to a number
|
|
10014
|
-
if (x === 0 || isNaN(x)) {
|
|
10015
|
-
return x;
|
|
10016
|
-
}
|
|
10017
|
-
return x > 0 ? 1 : -1;
|
|
10018
|
-
};
|
|
10019
|
-
|
|
10020
|
-
var Platform = /*#__PURE__*/Object.freeze({
|
|
10021
|
-
__proto__: null,
|
|
10022
|
-
version: version,
|
|
10023
|
-
ieVersion: ieVersion,
|
|
10024
|
-
isIE: isIE,
|
|
10025
|
-
svgMarkerGlitch: svgMarkerGlitch,
|
|
10026
|
-
getScrollbarWidth: getScrollbarWidth
|
|
10027
|
-
});
|
|
10028
|
-
|
|
10029
|
-
var Transition = /** @class */ (function () {
|
|
10030
|
-
function Transition(widget) {
|
|
10031
|
-
this._widget = widget;
|
|
10032
|
-
this._duration = 250;
|
|
10033
|
-
this._delay = 0;
|
|
10034
|
-
this._ease = cubicInOut;
|
|
10035
|
-
}
|
|
10036
|
-
Transition.prototype.duration = function (_) {
|
|
10037
|
-
if (!arguments.length)
|
|
10038
|
-
return this._duration;
|
|
10039
|
-
this._duration = _;
|
|
10040
|
-
return this._widget;
|
|
10041
|
-
};
|
|
10042
|
-
Transition.prototype.delay = function (_) {
|
|
10043
|
-
if (!arguments.length)
|
|
10044
|
-
return this._delay;
|
|
10045
|
-
this._delay = _;
|
|
10046
|
-
return this._widget;
|
|
10047
|
-
};
|
|
10048
|
-
Transition.prototype.ease = function (_) {
|
|
10049
|
-
if (!arguments.length)
|
|
10050
|
-
return this._ease;
|
|
10051
|
-
this._ease = _;
|
|
10052
|
-
return this._widget;
|
|
10053
|
-
};
|
|
10054
|
-
Transition.prototype.apply = function (selection) {
|
|
10055
|
-
if (this._duration || this._delay) {
|
|
10056
|
-
return selection.transition()
|
|
10057
|
-
.duration(this._duration)
|
|
10058
|
-
.delay(this._delay)
|
|
10059
|
-
.ease(this._ease);
|
|
10060
|
-
}
|
|
10061
|
-
return selection;
|
|
10062
|
-
};
|
|
10063
|
-
return Transition;
|
|
10064
|
-
}());
|
|
10065
|
-
|
|
10066
|
-
var lerp = function (point, that, t) {
|
|
10067
|
-
// From https://github.com/thelonious/js-intersections
|
|
10068
|
-
return {
|
|
10069
|
-
x: point.x + (that.x - point.x) * t,
|
|
10070
|
-
y: point.y + (that.y - point.y) * t
|
|
10071
|
-
};
|
|
9156
|
+
var lerp = function (point, that, t) {
|
|
9157
|
+
// From https://github.com/thelonious/js-intersections
|
|
9158
|
+
return {
|
|
9159
|
+
x: point.x + (that.x - point.x) * t,
|
|
9160
|
+
y: point.y + (that.y - point.y) * t
|
|
9161
|
+
};
|
|
10072
9162
|
};
|
|
10073
9163
|
var intersectLineLine = function (a1, a2, b1, b2) {
|
|
10074
9164
|
// From https://github.com/thelonious/js-intersections
|
|
@@ -10165,11 +9255,11 @@
|
|
|
10165
9255
|
.attr("mode", "normal");
|
|
10166
9256
|
}
|
|
10167
9257
|
SVGGlowFilter.prototype.rgb2ColorMatrix = function (color) {
|
|
10168
|
-
var rgb = rgb
|
|
9258
|
+
var rgb$1 = rgb(color);
|
|
10169
9259
|
return [
|
|
10170
|
-
rgb.r / 255, 0, 0, 0, rgb.r ? 1 : 0,
|
|
10171
|
-
0, rgb.g / 255, 0, 0, rgb.g ? 1 : 0,
|
|
10172
|
-
0, 0, rgb.b / 255, 0, rgb.b ? 1 : 0,
|
|
9260
|
+
rgb$1.r / 255, 0, 0, 0, rgb$1.r ? 1 : 0,
|
|
9261
|
+
0, rgb$1.g / 255, 0, 0, rgb$1.g ? 1 : 0,
|
|
9262
|
+
0, 0, rgb$1.b / 255, 0, rgb$1.b ? 1 : 0,
|
|
10173
9263
|
0, 0, 0, 1, 0
|
|
10174
9264
|
].join(" ");
|
|
10175
9265
|
};
|
|
@@ -11011,1301 +10101,981 @@
|
|
|
11011
10101
|
5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"],
|
|
11012
10102
|
6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"],
|
|
11013
10103
|
7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"],
|
|
11014
|
-
8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
|
|
11015
|
-
}, Set3: {
|
|
11016
|
-
3: ["#8dd3c7", "#ffffb3", "#bebada"],
|
|
11017
|
-
4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
|
|
11018
|
-
5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
|
|
11019
|
-
6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
|
|
11020
|
-
7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
|
|
11021
|
-
8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
|
|
11022
|
-
9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
|
|
11023
|
-
10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
|
|
11024
|
-
11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
|
|
11025
|
-
12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
|
|
11026
|
-
}
|
|
11027
|
-
};
|
|
11028
|
-
|
|
11029
|
-
var _colorbrewer = /*#__PURE__*/Object.freeze({
|
|
11030
|
-
__proto__: null,
|
|
11031
|
-
'default': index
|
|
11032
|
-
});
|
|
11033
|
-
|
|
11034
|
-
var array = Array.prototype;
|
|
11035
|
-
|
|
11036
|
-
var map = array.map;
|
|
11037
|
-
var slice = array.slice;
|
|
11038
|
-
|
|
11039
|
-
var implicit = {name: "implicit"};
|
|
11040
|
-
|
|
11041
|
-
function ordinal$1(range) {
|
|
11042
|
-
var index = map$2(),
|
|
11043
|
-
domain = [],
|
|
11044
|
-
unknown = implicit;
|
|
11045
|
-
|
|
11046
|
-
range = range == null ? [] : slice.call(range);
|
|
11047
|
-
|
|
11048
|
-
function scale(d) {
|
|
11049
|
-
var key = d + "", i = index.get(key);
|
|
11050
|
-
if (!i) {
|
|
11051
|
-
if (unknown !== implicit) return unknown;
|
|
11052
|
-
index.set(key, i = domain.push(d));
|
|
11053
|
-
}
|
|
11054
|
-
return range[(i - 1) % range.length];
|
|
11055
|
-
}
|
|
11056
|
-
|
|
11057
|
-
scale.domain = function(_) {
|
|
11058
|
-
if (!arguments.length) return domain.slice();
|
|
11059
|
-
domain = [], index = map$2();
|
|
11060
|
-
var i = -1, n = _.length, d, key;
|
|
11061
|
-
while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
|
|
11062
|
-
return scale;
|
|
11063
|
-
};
|
|
11064
|
-
|
|
11065
|
-
scale.range = function(_) {
|
|
11066
|
-
return arguments.length ? (range = slice.call(_), scale) : range.slice();
|
|
11067
|
-
};
|
|
11068
|
-
|
|
11069
|
-
scale.unknown = function(_) {
|
|
11070
|
-
return arguments.length ? (unknown = _, scale) : unknown;
|
|
11071
|
-
};
|
|
11072
|
-
|
|
11073
|
-
scale.copy = function() {
|
|
11074
|
-
return ordinal$1()
|
|
11075
|
-
.domain(domain)
|
|
11076
|
-
.range(range)
|
|
11077
|
-
.unknown(unknown);
|
|
11078
|
-
};
|
|
11079
|
-
|
|
11080
|
-
return scale;
|
|
11081
|
-
}
|
|
11082
|
-
|
|
11083
|
-
function band() {
|
|
11084
|
-
var scale = ordinal$1().unknown(undefined),
|
|
11085
|
-
domain = scale.domain,
|
|
11086
|
-
ordinalRange = scale.range,
|
|
11087
|
-
range = [0, 1],
|
|
11088
|
-
step,
|
|
11089
|
-
bandwidth,
|
|
11090
|
-
round = false,
|
|
11091
|
-
paddingInner = 0,
|
|
11092
|
-
paddingOuter = 0,
|
|
11093
|
-
align = 0.5;
|
|
11094
|
-
|
|
11095
|
-
delete scale.unknown;
|
|
11096
|
-
|
|
11097
|
-
function rescale() {
|
|
11098
|
-
var n = domain().length,
|
|
11099
|
-
reverse = range[1] < range[0],
|
|
11100
|
-
start = range[reverse - 0],
|
|
11101
|
-
stop = range[1 - reverse];
|
|
11102
|
-
step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
|
|
11103
|
-
if (round) step = Math.floor(step);
|
|
11104
|
-
start += (stop - start - step * (n - paddingInner)) * align;
|
|
11105
|
-
bandwidth = step * (1 - paddingInner);
|
|
11106
|
-
if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
|
|
11107
|
-
var values = sequence(n).map(function(i) { return start + step * i; });
|
|
11108
|
-
return ordinalRange(reverse ? values.reverse() : values);
|
|
11109
|
-
}
|
|
11110
|
-
|
|
11111
|
-
scale.domain = function(_) {
|
|
11112
|
-
return arguments.length ? (domain(_), rescale()) : domain();
|
|
11113
|
-
};
|
|
11114
|
-
|
|
11115
|
-
scale.range = function(_) {
|
|
11116
|
-
return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
|
|
11117
|
-
};
|
|
11118
|
-
|
|
11119
|
-
scale.rangeRound = function(_) {
|
|
11120
|
-
return range = [+_[0], +_[1]], round = true, rescale();
|
|
11121
|
-
};
|
|
11122
|
-
|
|
11123
|
-
scale.bandwidth = function() {
|
|
11124
|
-
return bandwidth;
|
|
11125
|
-
};
|
|
11126
|
-
|
|
11127
|
-
scale.step = function() {
|
|
11128
|
-
return step;
|
|
11129
|
-
};
|
|
11130
|
-
|
|
11131
|
-
scale.round = function(_) {
|
|
11132
|
-
return arguments.length ? (round = !!_, rescale()) : round;
|
|
11133
|
-
};
|
|
11134
|
-
|
|
11135
|
-
scale.padding = function(_) {
|
|
11136
|
-
return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11137
|
-
};
|
|
11138
|
-
|
|
11139
|
-
scale.paddingInner = function(_) {
|
|
11140
|
-
return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11141
|
-
};
|
|
11142
|
-
|
|
11143
|
-
scale.paddingOuter = function(_) {
|
|
11144
|
-
return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
|
|
11145
|
-
};
|
|
11146
|
-
|
|
11147
|
-
scale.align = function(_) {
|
|
11148
|
-
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
|
|
11149
|
-
};
|
|
11150
|
-
|
|
11151
|
-
scale.copy = function() {
|
|
11152
|
-
return band()
|
|
11153
|
-
.domain(domain())
|
|
11154
|
-
.range(range)
|
|
11155
|
-
.round(round)
|
|
11156
|
-
.paddingInner(paddingInner)
|
|
11157
|
-
.paddingOuter(paddingOuter)
|
|
11158
|
-
.align(align);
|
|
11159
|
-
};
|
|
11160
|
-
|
|
11161
|
-
return rescale();
|
|
11162
|
-
}
|
|
11163
|
-
|
|
11164
|
-
function pointish(scale) {
|
|
11165
|
-
var copy = scale.copy;
|
|
11166
|
-
|
|
11167
|
-
scale.padding = scale.paddingOuter;
|
|
11168
|
-
delete scale.paddingInner;
|
|
11169
|
-
delete scale.paddingOuter;
|
|
11170
|
-
|
|
11171
|
-
scale.copy = function() {
|
|
11172
|
-
return pointish(copy());
|
|
11173
|
-
};
|
|
11174
|
-
|
|
11175
|
-
return scale;
|
|
11176
|
-
}
|
|
11177
|
-
|
|
11178
|
-
function point() {
|
|
11179
|
-
return pointish(band().paddingInner(1));
|
|
11180
|
-
}
|
|
11181
|
-
|
|
11182
|
-
function constant$3(x) {
|
|
11183
|
-
return function() {
|
|
11184
|
-
return x;
|
|
11185
|
-
};
|
|
11186
|
-
}
|
|
11187
|
-
|
|
11188
|
-
function number$1(x) {
|
|
11189
|
-
return +x;
|
|
11190
|
-
}
|
|
11191
|
-
|
|
11192
|
-
var unit = [0, 1];
|
|
11193
|
-
|
|
11194
|
-
function deinterpolateLinear(a, b) {
|
|
11195
|
-
return (b -= (a = +a))
|
|
11196
|
-
? function(x) { return (x - a) / b; }
|
|
11197
|
-
: constant$3(b);
|
|
11198
|
-
}
|
|
11199
|
-
|
|
11200
|
-
function deinterpolateClamp(deinterpolate) {
|
|
11201
|
-
return function(a, b) {
|
|
11202
|
-
var d = deinterpolate(a = +a, b = +b);
|
|
11203
|
-
return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
|
|
11204
|
-
};
|
|
11205
|
-
}
|
|
11206
|
-
|
|
11207
|
-
function reinterpolateClamp(reinterpolate) {
|
|
11208
|
-
return function(a, b) {
|
|
11209
|
-
var r = reinterpolate(a = +a, b = +b);
|
|
11210
|
-
return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
|
|
11211
|
-
};
|
|
11212
|
-
}
|
|
11213
|
-
|
|
11214
|
-
function bimap(domain, range, deinterpolate, reinterpolate) {
|
|
11215
|
-
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
|
|
11216
|
-
if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
|
|
11217
|
-
else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
|
|
11218
|
-
return function(x) { return r0(d0(x)); };
|
|
11219
|
-
}
|
|
11220
|
-
|
|
11221
|
-
function polymap(domain, range, deinterpolate, reinterpolate) {
|
|
11222
|
-
var j = Math.min(domain.length, range.length) - 1,
|
|
11223
|
-
d = new Array(j),
|
|
11224
|
-
r = new Array(j),
|
|
11225
|
-
i = -1;
|
|
11226
|
-
|
|
11227
|
-
// Reverse descending domains.
|
|
11228
|
-
if (domain[j] < domain[0]) {
|
|
11229
|
-
domain = domain.slice().reverse();
|
|
11230
|
-
range = range.slice().reverse();
|
|
11231
|
-
}
|
|
11232
|
-
|
|
11233
|
-
while (++i < j) {
|
|
11234
|
-
d[i] = deinterpolate(domain[i], domain[i + 1]);
|
|
11235
|
-
r[i] = reinterpolate(range[i], range[i + 1]);
|
|
11236
|
-
}
|
|
11237
|
-
|
|
11238
|
-
return function(x) {
|
|
11239
|
-
var i = bisectRight(domain, x, 1, j) - 1;
|
|
11240
|
-
return r[i](d[i](x));
|
|
11241
|
-
};
|
|
11242
|
-
}
|
|
11243
|
-
|
|
11244
|
-
function copy(source, target) {
|
|
11245
|
-
return target
|
|
11246
|
-
.domain(source.domain())
|
|
11247
|
-
.range(source.range())
|
|
11248
|
-
.interpolate(source.interpolate())
|
|
11249
|
-
.clamp(source.clamp());
|
|
11250
|
-
}
|
|
11251
|
-
|
|
11252
|
-
// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
|
|
11253
|
-
// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
|
|
11254
|
-
function continuous(deinterpolate, reinterpolate) {
|
|
11255
|
-
var domain = unit,
|
|
11256
|
-
range = unit,
|
|
11257
|
-
interpolate = interpolate$1,
|
|
11258
|
-
clamp = false,
|
|
11259
|
-
piecewise,
|
|
11260
|
-
output,
|
|
11261
|
-
input;
|
|
11262
|
-
|
|
11263
|
-
function rescale() {
|
|
11264
|
-
piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
|
|
11265
|
-
output = input = null;
|
|
11266
|
-
return scale;
|
|
11267
|
-
}
|
|
11268
|
-
|
|
11269
|
-
function scale(x) {
|
|
11270
|
-
return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);
|
|
11271
|
-
}
|
|
11272
|
-
|
|
11273
|
-
scale.invert = function(y) {
|
|
11274
|
-
return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
|
|
11275
|
-
};
|
|
11276
|
-
|
|
11277
|
-
scale.domain = function(_) {
|
|
11278
|
-
return arguments.length ? (domain = map.call(_, number$1), rescale()) : domain.slice();
|
|
11279
|
-
};
|
|
11280
|
-
|
|
11281
|
-
scale.range = function(_) {
|
|
11282
|
-
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
|
|
11283
|
-
};
|
|
11284
|
-
|
|
11285
|
-
scale.rangeRound = function(_) {
|
|
11286
|
-
return range = slice.call(_), interpolate = interpolateRound, rescale();
|
|
11287
|
-
};
|
|
11288
|
-
|
|
11289
|
-
scale.clamp = function(_) {
|
|
11290
|
-
return arguments.length ? (clamp = !!_, rescale()) : clamp;
|
|
11291
|
-
};
|
|
11292
|
-
|
|
11293
|
-
scale.interpolate = function(_) {
|
|
11294
|
-
return arguments.length ? (interpolate = _, rescale()) : interpolate;
|
|
11295
|
-
};
|
|
11296
|
-
|
|
11297
|
-
return rescale();
|
|
11298
|
-
}
|
|
11299
|
-
|
|
11300
|
-
function tickFormat(domain, count, specifier) {
|
|
11301
|
-
var start = domain[0],
|
|
11302
|
-
stop = domain[domain.length - 1],
|
|
11303
|
-
step = tickStep(start, stop, count == null ? 10 : count),
|
|
11304
|
-
precision;
|
|
11305
|
-
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
11306
|
-
switch (specifier.type) {
|
|
11307
|
-
case "s": {
|
|
11308
|
-
var value = Math.max(Math.abs(start), Math.abs(stop));
|
|
11309
|
-
if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
|
|
11310
|
-
return exports.formatPrefix(specifier, value);
|
|
11311
|
-
}
|
|
11312
|
-
case "":
|
|
11313
|
-
case "e":
|
|
11314
|
-
case "g":
|
|
11315
|
-
case "p":
|
|
11316
|
-
case "r": {
|
|
11317
|
-
if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
|
|
11318
|
-
break;
|
|
11319
|
-
}
|
|
11320
|
-
case "f":
|
|
11321
|
-
case "%": {
|
|
11322
|
-
if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
|
|
11323
|
-
break;
|
|
10104
|
+
8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
|
|
10105
|
+
}, Set3: {
|
|
10106
|
+
3: ["#8dd3c7", "#ffffb3", "#bebada"],
|
|
10107
|
+
4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
|
|
10108
|
+
5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
|
|
10109
|
+
6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
|
|
10110
|
+
7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
|
|
10111
|
+
8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
|
|
10112
|
+
9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
|
|
10113
|
+
10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
|
|
10114
|
+
11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
|
|
10115
|
+
12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
|
|
11324
10116
|
}
|
|
11325
|
-
|
|
11326
|
-
return exports.format(specifier);
|
|
11327
|
-
}
|
|
10117
|
+
};
|
|
11328
10118
|
|
|
11329
|
-
|
|
11330
|
-
|
|
10119
|
+
var _colorbrewer = /*#__PURE__*/Object.freeze({
|
|
10120
|
+
__proto__: null,
|
|
10121
|
+
'default': index
|
|
10122
|
+
});
|
|
11331
10123
|
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
};
|
|
10124
|
+
function ascending(a, b) {
|
|
10125
|
+
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
10126
|
+
}
|
|
11336
10127
|
|
|
11337
|
-
|
|
11338
|
-
|
|
10128
|
+
function bisector(compare) {
|
|
10129
|
+
if (compare.length === 1) compare = ascendingComparator(compare);
|
|
10130
|
+
return {
|
|
10131
|
+
left: function(a, x, lo, hi) {
|
|
10132
|
+
if (lo == null) lo = 0;
|
|
10133
|
+
if (hi == null) hi = a.length;
|
|
10134
|
+
while (lo < hi) {
|
|
10135
|
+
var mid = lo + hi >>> 1;
|
|
10136
|
+
if (compare(a[mid], x) < 0) lo = mid + 1;
|
|
10137
|
+
else hi = mid;
|
|
10138
|
+
}
|
|
10139
|
+
return lo;
|
|
10140
|
+
},
|
|
10141
|
+
right: function(a, x, lo, hi) {
|
|
10142
|
+
if (lo == null) lo = 0;
|
|
10143
|
+
if (hi == null) hi = a.length;
|
|
10144
|
+
while (lo < hi) {
|
|
10145
|
+
var mid = lo + hi >>> 1;
|
|
10146
|
+
if (compare(a[mid], x) > 0) hi = mid;
|
|
10147
|
+
else lo = mid + 1;
|
|
10148
|
+
}
|
|
10149
|
+
return lo;
|
|
10150
|
+
}
|
|
11339
10151
|
};
|
|
10152
|
+
}
|
|
11340
10153
|
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
i1 = d.length - 1,
|
|
11347
|
-
start = d[i0],
|
|
11348
|
-
stop = d[i1],
|
|
11349
|
-
step;
|
|
10154
|
+
function ascendingComparator(f) {
|
|
10155
|
+
return function(d, x) {
|
|
10156
|
+
return ascending(f(d), x);
|
|
10157
|
+
};
|
|
10158
|
+
}
|
|
11350
10159
|
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
step = i0, i0 = i1, i1 = step;
|
|
11354
|
-
}
|
|
10160
|
+
var ascendingBisect = bisector(ascending);
|
|
10161
|
+
var bisectRight = ascendingBisect.right;
|
|
11355
10162
|
|
|
11356
|
-
|
|
10163
|
+
function number$2(x) {
|
|
10164
|
+
return x === null ? NaN : +x;
|
|
10165
|
+
}
|
|
11357
10166
|
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
stop = Math.ceil(stop / step) * step;
|
|
11361
|
-
step = tickIncrement(start, stop, count);
|
|
11362
|
-
} else if (step < 0) {
|
|
11363
|
-
start = Math.ceil(start * step) / step;
|
|
11364
|
-
stop = Math.floor(stop * step) / step;
|
|
11365
|
-
step = tickIncrement(start, stop, count);
|
|
11366
|
-
}
|
|
10167
|
+
function sequence(start, stop, step) {
|
|
10168
|
+
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
|
|
11367
10169
|
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
domain(d);
|
|
11372
|
-
} else if (step < 0) {
|
|
11373
|
-
d[i0] = Math.ceil(start * step) / step;
|
|
11374
|
-
d[i1] = Math.floor(stop * step) / step;
|
|
11375
|
-
domain(d);
|
|
11376
|
-
}
|
|
10170
|
+
var i = -1,
|
|
10171
|
+
n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
|
|
10172
|
+
range = new Array(n);
|
|
11377
10173
|
|
|
11378
|
-
|
|
11379
|
-
|
|
10174
|
+
while (++i < n) {
|
|
10175
|
+
range[i] = start + i * step;
|
|
10176
|
+
}
|
|
11380
10177
|
|
|
11381
|
-
return
|
|
10178
|
+
return range;
|
|
11382
10179
|
}
|
|
11383
10180
|
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
|
|
11387
|
-
scale.copy = function() {
|
|
11388
|
-
return copy(scale, linear());
|
|
11389
|
-
};
|
|
10181
|
+
var e10 = Math.sqrt(50),
|
|
10182
|
+
e5 = Math.sqrt(10),
|
|
10183
|
+
e2 = Math.sqrt(2);
|
|
11390
10184
|
|
|
11391
|
-
|
|
11392
|
-
|
|
10185
|
+
function ticks(start, stop, count) {
|
|
10186
|
+
var reverse,
|
|
10187
|
+
i = -1,
|
|
10188
|
+
n,
|
|
10189
|
+
ticks,
|
|
10190
|
+
step;
|
|
11393
10191
|
|
|
11394
|
-
|
|
11395
|
-
|
|
10192
|
+
stop = +stop, start = +start, count = +count;
|
|
10193
|
+
if (start === stop && count > 0) return [start];
|
|
10194
|
+
if (reverse = stop < start) n = start, start = stop, stop = n;
|
|
10195
|
+
if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
11396
10196
|
|
|
11397
|
-
|
|
11398
|
-
|
|
10197
|
+
if (step > 0) {
|
|
10198
|
+
start = Math.ceil(start / step);
|
|
10199
|
+
stop = Math.floor(stop / step);
|
|
10200
|
+
ticks = new Array(n = Math.ceil(stop - start + 1));
|
|
10201
|
+
while (++i < n) ticks[i] = (start + i) * step;
|
|
10202
|
+
} else {
|
|
10203
|
+
start = Math.floor(start * step);
|
|
10204
|
+
stop = Math.ceil(stop * step);
|
|
10205
|
+
ticks = new Array(n = Math.ceil(start - stop + 1));
|
|
10206
|
+
while (++i < n) ticks[i] = (start - i) / step;
|
|
11399
10207
|
}
|
|
11400
10208
|
|
|
11401
|
-
|
|
10209
|
+
if (reverse) ticks.reverse();
|
|
11402
10210
|
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
};
|
|
10211
|
+
return ticks;
|
|
10212
|
+
}
|
|
11406
10213
|
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
10214
|
+
function tickIncrement(start, stop, count) {
|
|
10215
|
+
var step = (stop - start) / Math.max(0, count),
|
|
10216
|
+
power = Math.floor(Math.log(step) / Math.LN10),
|
|
10217
|
+
error = step / Math.pow(10, power);
|
|
10218
|
+
return power >= 0
|
|
10219
|
+
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
10220
|
+
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
10221
|
+
}
|
|
11410
10222
|
|
|
11411
|
-
|
|
10223
|
+
function tickStep(start, stop, count) {
|
|
10224
|
+
var step0 = Math.abs(stop - start) / Math.max(0, count),
|
|
10225
|
+
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
|
|
10226
|
+
error = step0 / step1;
|
|
10227
|
+
if (error >= e10) step1 *= 10;
|
|
10228
|
+
else if (error >= e5) step1 *= 5;
|
|
10229
|
+
else if (error >= e2) step1 *= 2;
|
|
10230
|
+
return stop < start ? -step1 : step1;
|
|
11412
10231
|
}
|
|
11413
10232
|
|
|
11414
|
-
function
|
|
11415
|
-
|
|
10233
|
+
function threshold$1(values, p, valueof) {
|
|
10234
|
+
if (valueof == null) valueof = number$2;
|
|
10235
|
+
if (!(n = values.length)) return;
|
|
10236
|
+
if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
|
|
10237
|
+
if (p >= 1) return +valueof(values[n - 1], n - 1, values);
|
|
10238
|
+
var n,
|
|
10239
|
+
i = (n - 1) * p,
|
|
10240
|
+
i0 = Math.floor(i),
|
|
10241
|
+
value0 = +valueof(values[i0], i0, values),
|
|
10242
|
+
value1 = +valueof(values[i0 + 1], i0 + 1, values);
|
|
10243
|
+
return value0 + (value1 - value0) * (i - i0);
|
|
10244
|
+
}
|
|
11416
10245
|
|
|
11417
|
-
|
|
11418
|
-
i1 = domain.length - 1,
|
|
11419
|
-
x0 = domain[i0],
|
|
11420
|
-
x1 = domain[i1],
|
|
11421
|
-
t;
|
|
10246
|
+
var array = Array.prototype;
|
|
11422
10247
|
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
t = x0, x0 = x1, x1 = t;
|
|
11426
|
-
}
|
|
10248
|
+
var map = array.map;
|
|
10249
|
+
var slice = array.slice;
|
|
11427
10250
|
|
|
11428
|
-
|
|
11429
|
-
domain[i1] = interval.ceil(x1);
|
|
11430
|
-
return domain;
|
|
11431
|
-
}
|
|
10251
|
+
var implicit = {name: "implicit"};
|
|
11432
10252
|
|
|
11433
|
-
function
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
}
|
|
10253
|
+
function ordinal$1(range) {
|
|
10254
|
+
var index = map$2(),
|
|
10255
|
+
domain = [],
|
|
10256
|
+
unknown = implicit;
|
|
11438
10257
|
|
|
11439
|
-
|
|
11440
|
-
return a < 0
|
|
11441
|
-
? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
|
|
11442
|
-
: function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
|
|
11443
|
-
}
|
|
10258
|
+
range = range == null ? [] : slice.call(range);
|
|
11444
10259
|
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
10260
|
+
function scale(d) {
|
|
10261
|
+
var key = d + "", i = index.get(key);
|
|
10262
|
+
if (!i) {
|
|
10263
|
+
if (unknown !== implicit) return unknown;
|
|
10264
|
+
index.set(key, i = domain.push(d));
|
|
10265
|
+
}
|
|
10266
|
+
return range[(i - 1) % range.length];
|
|
10267
|
+
}
|
|
11448
10268
|
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
10269
|
+
scale.domain = function(_) {
|
|
10270
|
+
if (!arguments.length) return domain.slice();
|
|
10271
|
+
domain = [], index = map$2();
|
|
10272
|
+
var i = -1, n = _.length, d, key;
|
|
10273
|
+
while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
|
|
10274
|
+
return scale;
|
|
10275
|
+
};
|
|
11454
10276
|
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|| base === 2 && Math.log2
|
|
11459
|
-
|| (base = Math.log(base), function(x) { return Math.log(x) / base; });
|
|
11460
|
-
}
|
|
10277
|
+
scale.range = function(_) {
|
|
10278
|
+
return arguments.length ? (range = slice.call(_), scale) : range.slice();
|
|
10279
|
+
};
|
|
11461
10280
|
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
10281
|
+
scale.unknown = function(_) {
|
|
10282
|
+
return arguments.length ? (unknown = _, scale) : unknown;
|
|
10283
|
+
};
|
|
10284
|
+
|
|
10285
|
+
scale.copy = function() {
|
|
10286
|
+
return ordinal$1()
|
|
10287
|
+
.domain(domain)
|
|
10288
|
+
.range(range)
|
|
10289
|
+
.unknown(unknown);
|
|
11465
10290
|
};
|
|
10291
|
+
|
|
10292
|
+
return scale;
|
|
11466
10293
|
}
|
|
11467
10294
|
|
|
11468
|
-
function
|
|
11469
|
-
var scale =
|
|
10295
|
+
function band() {
|
|
10296
|
+
var scale = ordinal$1().unknown(undefined),
|
|
11470
10297
|
domain = scale.domain,
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
10298
|
+
ordinalRange = scale.range,
|
|
10299
|
+
range = [0, 1],
|
|
10300
|
+
step,
|
|
10301
|
+
bandwidth,
|
|
10302
|
+
round = false,
|
|
10303
|
+
paddingInner = 0,
|
|
10304
|
+
paddingOuter = 0,
|
|
10305
|
+
align = 0.5;
|
|
10306
|
+
|
|
10307
|
+
delete scale.unknown;
|
|
11474
10308
|
|
|
11475
10309
|
function rescale() {
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
10310
|
+
var n = domain().length,
|
|
10311
|
+
reverse = range[1] < range[0],
|
|
10312
|
+
start = range[reverse - 0],
|
|
10313
|
+
stop = range[1 - reverse];
|
|
10314
|
+
step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
|
|
10315
|
+
if (round) step = Math.floor(step);
|
|
10316
|
+
start += (stop - start - step * (n - paddingInner)) * align;
|
|
10317
|
+
bandwidth = step * (1 - paddingInner);
|
|
10318
|
+
if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
|
|
10319
|
+
var values = sequence(n).map(function(i) { return start + step * i; });
|
|
10320
|
+
return ordinalRange(reverse ? values.reverse() : values);
|
|
11479
10321
|
}
|
|
11480
10322
|
|
|
11481
|
-
scale.base = function(_) {
|
|
11482
|
-
return arguments.length ? (base = +_, rescale()) : base;
|
|
11483
|
-
};
|
|
11484
|
-
|
|
11485
10323
|
scale.domain = function(_) {
|
|
11486
10324
|
return arguments.length ? (domain(_), rescale()) : domain();
|
|
11487
10325
|
};
|
|
11488
10326
|
|
|
11489
|
-
scale.
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
v = d[d.length - 1],
|
|
11493
|
-
r;
|
|
11494
|
-
|
|
11495
|
-
if (r = v < u) i = u, u = v, v = i;
|
|
10327
|
+
scale.range = function(_) {
|
|
10328
|
+
return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
|
|
10329
|
+
};
|
|
11496
10330
|
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
k,
|
|
11501
|
-
t,
|
|
11502
|
-
n = count == null ? 10 : +count,
|
|
11503
|
-
z = [];
|
|
10331
|
+
scale.rangeRound = function(_) {
|
|
10332
|
+
return range = [+_[0], +_[1]], round = true, rescale();
|
|
10333
|
+
};
|
|
11504
10334
|
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
for (k = 1, p = pows(i); k < base; ++k) {
|
|
11509
|
-
t = p * k;
|
|
11510
|
-
if (t < u) continue;
|
|
11511
|
-
if (t > v) break;
|
|
11512
|
-
z.push(t);
|
|
11513
|
-
}
|
|
11514
|
-
} else for (; i < j; ++i) {
|
|
11515
|
-
for (k = base - 1, p = pows(i); k >= 1; --k) {
|
|
11516
|
-
t = p * k;
|
|
11517
|
-
if (t < u) continue;
|
|
11518
|
-
if (t > v) break;
|
|
11519
|
-
z.push(t);
|
|
11520
|
-
}
|
|
11521
|
-
}
|
|
11522
|
-
} else {
|
|
11523
|
-
z = ticks(i, j, Math.min(j - i, n)).map(pows);
|
|
11524
|
-
}
|
|
10335
|
+
scale.bandwidth = function() {
|
|
10336
|
+
return bandwidth;
|
|
10337
|
+
};
|
|
11525
10338
|
|
|
11526
|
-
|
|
10339
|
+
scale.step = function() {
|
|
10340
|
+
return step;
|
|
11527
10341
|
};
|
|
11528
10342
|
|
|
11529
|
-
scale.
|
|
11530
|
-
|
|
11531
|
-
if (typeof specifier !== "function") specifier = exports.format(specifier);
|
|
11532
|
-
if (count === Infinity) return specifier;
|
|
11533
|
-
if (count == null) count = 10;
|
|
11534
|
-
var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
|
|
11535
|
-
return function(d) {
|
|
11536
|
-
var i = d / pows(Math.round(logs(d)));
|
|
11537
|
-
if (i * base < base - 0.5) i *= base;
|
|
11538
|
-
return i <= k ? specifier(d) : "";
|
|
11539
|
-
};
|
|
10343
|
+
scale.round = function(_) {
|
|
10344
|
+
return arguments.length ? (round = !!_, rescale()) : round;
|
|
11540
10345
|
};
|
|
11541
10346
|
|
|
11542
|
-
scale.
|
|
11543
|
-
return
|
|
11544
|
-
floor: function(x) { return pows(Math.floor(logs(x))); },
|
|
11545
|
-
ceil: function(x) { return pows(Math.ceil(logs(x))); }
|
|
11546
|
-
}));
|
|
10347
|
+
scale.padding = function(_) {
|
|
10348
|
+
return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11547
10349
|
};
|
|
11548
10350
|
|
|
11549
|
-
scale.
|
|
11550
|
-
return
|
|
10351
|
+
scale.paddingInner = function(_) {
|
|
10352
|
+
return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner;
|
|
11551
10353
|
};
|
|
11552
10354
|
|
|
11553
|
-
|
|
11554
|
-
|
|
10355
|
+
scale.paddingOuter = function(_) {
|
|
10356
|
+
return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter;
|
|
10357
|
+
};
|
|
11555
10358
|
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
10359
|
+
scale.align = function(_) {
|
|
10360
|
+
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
|
|
10361
|
+
};
|
|
11559
10362
|
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
10363
|
+
scale.copy = function() {
|
|
10364
|
+
return band()
|
|
10365
|
+
.domain(domain())
|
|
10366
|
+
.range(range)
|
|
10367
|
+
.round(round)
|
|
10368
|
+
.paddingInner(paddingInner)
|
|
10369
|
+
.paddingOuter(paddingOuter)
|
|
10370
|
+
.align(align);
|
|
10371
|
+
};
|
|
11564
10372
|
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
? function(x) { return (raise(x, exponent) - a) / b; }
|
|
11568
|
-
: constant$3(b);
|
|
11569
|
-
}
|
|
10373
|
+
return rescale();
|
|
10374
|
+
}
|
|
11570
10375
|
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
return function(t) { return raise(a + b * t, 1 / exponent); };
|
|
11574
|
-
}
|
|
10376
|
+
function pointish(scale) {
|
|
10377
|
+
var copy = scale.copy;
|
|
11575
10378
|
|
|
11576
|
-
scale.
|
|
11577
|
-
|
|
11578
|
-
|
|
10379
|
+
scale.padding = scale.paddingOuter;
|
|
10380
|
+
delete scale.paddingInner;
|
|
10381
|
+
delete scale.paddingOuter;
|
|
11579
10382
|
|
|
11580
10383
|
scale.copy = function() {
|
|
11581
|
-
return copy(
|
|
10384
|
+
return pointish(copy());
|
|
11582
10385
|
};
|
|
11583
10386
|
|
|
11584
|
-
return
|
|
10387
|
+
return scale;
|
|
11585
10388
|
}
|
|
11586
10389
|
|
|
11587
|
-
function
|
|
11588
|
-
return
|
|
10390
|
+
function point() {
|
|
10391
|
+
return pointish(band().paddingInner(1));
|
|
11589
10392
|
}
|
|
11590
10393
|
|
|
11591
|
-
function
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
10394
|
+
function constant$3(x) {
|
|
10395
|
+
return function() {
|
|
10396
|
+
return x;
|
|
10397
|
+
};
|
|
10398
|
+
}
|
|
11595
10399
|
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
while (++i < n) thresholds[i - 1] = threshold$1(domain, i / n);
|
|
11600
|
-
return scale;
|
|
11601
|
-
}
|
|
10400
|
+
function number$1(x) {
|
|
10401
|
+
return +x;
|
|
10402
|
+
}
|
|
11602
10403
|
|
|
11603
|
-
|
|
11604
|
-
if (!isNaN(x = +x)) return range[bisectRight(thresholds, x)];
|
|
11605
|
-
}
|
|
10404
|
+
var unit = [0, 1];
|
|
11606
10405
|
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
];
|
|
11613
|
-
};
|
|
10406
|
+
function deinterpolateLinear(a, b) {
|
|
10407
|
+
return (b -= (a = +a))
|
|
10408
|
+
? function(x) { return (x - a) / b; }
|
|
10409
|
+
: constant$3(b);
|
|
10410
|
+
}
|
|
11614
10411
|
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
domain.sort(ascending);
|
|
11620
|
-
return rescale();
|
|
10412
|
+
function deinterpolateClamp(deinterpolate) {
|
|
10413
|
+
return function(a, b) {
|
|
10414
|
+
var d = deinterpolate(a = +a, b = +b);
|
|
10415
|
+
return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); };
|
|
11621
10416
|
};
|
|
10417
|
+
}
|
|
11622
10418
|
|
|
11623
|
-
|
|
11624
|
-
|
|
10419
|
+
function reinterpolateClamp(reinterpolate) {
|
|
10420
|
+
return function(a, b) {
|
|
10421
|
+
var r = reinterpolate(a = +a, b = +b);
|
|
10422
|
+
return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
|
|
11625
10423
|
};
|
|
10424
|
+
}
|
|
11626
10425
|
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
10426
|
+
function bimap(domain, range, deinterpolate, reinterpolate) {
|
|
10427
|
+
var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
|
|
10428
|
+
if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
|
|
10429
|
+
else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
|
|
10430
|
+
return function(x) { return r0(d0(x)); };
|
|
10431
|
+
}
|
|
11630
10432
|
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
10433
|
+
function polymap(domain, range, deinterpolate, reinterpolate) {
|
|
10434
|
+
var j = Math.min(domain.length, range.length) - 1,
|
|
10435
|
+
d = new Array(j),
|
|
10436
|
+
r = new Array(j),
|
|
10437
|
+
i = -1;
|
|
10438
|
+
|
|
10439
|
+
// Reverse descending domains.
|
|
10440
|
+
if (domain[j] < domain[0]) {
|
|
10441
|
+
domain = domain.slice().reverse();
|
|
10442
|
+
range = range.slice().reverse();
|
|
10443
|
+
}
|
|
10444
|
+
|
|
10445
|
+
while (++i < j) {
|
|
10446
|
+
d[i] = deinterpolate(domain[i], domain[i + 1]);
|
|
10447
|
+
r[i] = reinterpolate(range[i], range[i + 1]);
|
|
10448
|
+
}
|
|
10449
|
+
|
|
10450
|
+
return function(x) {
|
|
10451
|
+
var i = bisectRight(domain, x, 1, j) - 1;
|
|
10452
|
+
return r[i](d[i](x));
|
|
11635
10453
|
};
|
|
10454
|
+
}
|
|
11636
10455
|
|
|
11637
|
-
|
|
10456
|
+
function copy(source, target) {
|
|
10457
|
+
return target
|
|
10458
|
+
.domain(source.domain())
|
|
10459
|
+
.range(source.range())
|
|
10460
|
+
.interpolate(source.interpolate())
|
|
10461
|
+
.clamp(source.clamp());
|
|
11638
10462
|
}
|
|
11639
10463
|
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
10464
|
+
// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
|
|
10465
|
+
// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
|
|
10466
|
+
function continuous(deinterpolate, reinterpolate) {
|
|
10467
|
+
var domain = unit,
|
|
10468
|
+
range = unit,
|
|
10469
|
+
interpolate = interpolate$1,
|
|
10470
|
+
clamp = false,
|
|
10471
|
+
piecewise,
|
|
10472
|
+
output,
|
|
10473
|
+
input;
|
|
11650
10474
|
|
|
11651
10475
|
function rescale() {
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
|
|
10476
|
+
piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
|
|
10477
|
+
output = input = null;
|
|
11655
10478
|
return scale;
|
|
11656
10479
|
}
|
|
11657
10480
|
|
|
10481
|
+
function scale(x) {
|
|
10482
|
+
return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x);
|
|
10483
|
+
}
|
|
10484
|
+
|
|
10485
|
+
scale.invert = function(y) {
|
|
10486
|
+
return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
|
|
10487
|
+
};
|
|
10488
|
+
|
|
11658
10489
|
scale.domain = function(_) {
|
|
11659
|
-
return arguments.length ? (
|
|
10490
|
+
return arguments.length ? (domain = map.call(_, number$1), rescale()) : domain.slice();
|
|
11660
10491
|
};
|
|
11661
10492
|
|
|
11662
10493
|
scale.range = function(_) {
|
|
11663
|
-
return arguments.length ? (
|
|
10494
|
+
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
|
|
11664
10495
|
};
|
|
11665
10496
|
|
|
11666
|
-
scale.
|
|
11667
|
-
|
|
11668
|
-
return i < 0 ? [NaN, NaN]
|
|
11669
|
-
: i < 1 ? [x0, domain[0]]
|
|
11670
|
-
: i >= n ? [domain[n - 1], x1]
|
|
11671
|
-
: [domain[i - 1], domain[i]];
|
|
10497
|
+
scale.rangeRound = function(_) {
|
|
10498
|
+
return range = slice.call(_), interpolate = interpolateRound, rescale();
|
|
11672
10499
|
};
|
|
11673
10500
|
|
|
11674
|
-
scale.
|
|
11675
|
-
return
|
|
11676
|
-
.domain([x0, x1])
|
|
11677
|
-
.range(range);
|
|
10501
|
+
scale.clamp = function(_) {
|
|
10502
|
+
return arguments.length ? (clamp = !!_, rescale()) : clamp;
|
|
11678
10503
|
};
|
|
11679
10504
|
|
|
11680
|
-
|
|
11681
|
-
|
|
10505
|
+
scale.interpolate = function(_) {
|
|
10506
|
+
return arguments.length ? (interpolate = _, rescale()) : interpolate;
|
|
10507
|
+
};
|
|
11682
10508
|
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
range = [0, 1],
|
|
11686
|
-
n = 1;
|
|
10509
|
+
return rescale();
|
|
10510
|
+
}
|
|
11687
10511
|
|
|
11688
|
-
|
|
11689
|
-
|
|
10512
|
+
function tickFormat(domain, count, specifier) {
|
|
10513
|
+
var start = domain[0],
|
|
10514
|
+
stop = domain[domain.length - 1],
|
|
10515
|
+
step = tickStep(start, stop, count == null ? 10 : count),
|
|
10516
|
+
precision;
|
|
10517
|
+
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
|
|
10518
|
+
switch (specifier.type) {
|
|
10519
|
+
case "s": {
|
|
10520
|
+
var value = Math.max(Math.abs(start), Math.abs(stop));
|
|
10521
|
+
if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
|
|
10522
|
+
return exports.formatPrefix(specifier, value);
|
|
10523
|
+
}
|
|
10524
|
+
case "":
|
|
10525
|
+
case "e":
|
|
10526
|
+
case "g":
|
|
10527
|
+
case "p":
|
|
10528
|
+
case "r": {
|
|
10529
|
+
if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
|
|
10530
|
+
break;
|
|
10531
|
+
}
|
|
10532
|
+
case "f":
|
|
10533
|
+
case "%": {
|
|
10534
|
+
if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
|
|
10535
|
+
break;
|
|
10536
|
+
}
|
|
11690
10537
|
}
|
|
10538
|
+
return exports.format(specifier);
|
|
10539
|
+
}
|
|
11691
10540
|
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
};
|
|
11695
|
-
|
|
11696
|
-
scale.range = function(_) {
|
|
11697
|
-
return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
|
|
11698
|
-
};
|
|
10541
|
+
function linearish(scale) {
|
|
10542
|
+
var domain = scale.domain;
|
|
11699
10543
|
|
|
11700
|
-
scale.
|
|
11701
|
-
var
|
|
11702
|
-
return [
|
|
10544
|
+
scale.ticks = function(count) {
|
|
10545
|
+
var d = domain();
|
|
10546
|
+
return ticks(d[0], d[d.length - 1], count == null ? 10 : count);
|
|
11703
10547
|
};
|
|
11704
10548
|
|
|
11705
|
-
scale.
|
|
11706
|
-
return
|
|
11707
|
-
.domain(domain)
|
|
11708
|
-
.range(range);
|
|
10549
|
+
scale.tickFormat = function(count, specifier) {
|
|
10550
|
+
return tickFormat(domain(), count, specifier);
|
|
11709
10551
|
};
|
|
11710
10552
|
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
var durationSecond = 1000,
|
|
11715
|
-
durationMinute = durationSecond * 60,
|
|
11716
|
-
durationHour = durationMinute * 60,
|
|
11717
|
-
durationDay = durationHour * 24,
|
|
11718
|
-
durationWeek = durationDay * 7,
|
|
11719
|
-
durationMonth = durationDay * 30,
|
|
11720
|
-
durationYear = durationDay * 365;
|
|
11721
|
-
|
|
11722
|
-
function date(t) {
|
|
11723
|
-
return new Date(t);
|
|
11724
|
-
}
|
|
10553
|
+
scale.nice = function(count) {
|
|
10554
|
+
if (count == null) count = 10;
|
|
11725
10555
|
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
10556
|
+
var d = domain(),
|
|
10557
|
+
i0 = 0,
|
|
10558
|
+
i1 = d.length - 1,
|
|
10559
|
+
start = d[i0],
|
|
10560
|
+
stop = d[i1],
|
|
10561
|
+
step;
|
|
11729
10562
|
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
10563
|
+
if (stop < start) {
|
|
10564
|
+
step = start, start = stop, stop = step;
|
|
10565
|
+
step = i0, i0 = i1, i1 = step;
|
|
10566
|
+
}
|
|
11734
10567
|
|
|
11735
|
-
|
|
11736
|
-
formatSecond = format(":%S"),
|
|
11737
|
-
formatMinute = format("%I:%M"),
|
|
11738
|
-
formatHour = format("%I %p"),
|
|
11739
|
-
formatDay = format("%a %d"),
|
|
11740
|
-
formatWeek = format("%b %d"),
|
|
11741
|
-
formatMonth = format("%B"),
|
|
11742
|
-
formatYear = format("%Y");
|
|
10568
|
+
step = tickIncrement(start, stop, count);
|
|
11743
10569
|
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
[ hour, 1, durationHour ],
|
|
11754
|
-
[ hour, 3, 3 * durationHour ],
|
|
11755
|
-
[ hour, 6, 6 * durationHour ],
|
|
11756
|
-
[ hour, 12, 12 * durationHour ],
|
|
11757
|
-
[ day, 1, durationDay ],
|
|
11758
|
-
[ day, 2, 2 * durationDay ],
|
|
11759
|
-
[ week, 1, durationWeek ],
|
|
11760
|
-
[ month, 1, durationMonth ],
|
|
11761
|
-
[ month, 3, 3 * durationMonth ],
|
|
11762
|
-
[ year, 1, durationYear ]
|
|
11763
|
-
];
|
|
10570
|
+
if (step > 0) {
|
|
10571
|
+
start = Math.floor(start / step) * step;
|
|
10572
|
+
stop = Math.ceil(stop / step) * step;
|
|
10573
|
+
step = tickIncrement(start, stop, count);
|
|
10574
|
+
} else if (step < 0) {
|
|
10575
|
+
start = Math.ceil(start * step) / step;
|
|
10576
|
+
stop = Math.floor(stop * step) / step;
|
|
10577
|
+
step = tickIncrement(start, stop, count);
|
|
10578
|
+
}
|
|
11764
10579
|
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
10580
|
+
if (step > 0) {
|
|
10581
|
+
d[i0] = Math.floor(start / step) * step;
|
|
10582
|
+
d[i1] = Math.ceil(stop / step) * step;
|
|
10583
|
+
domain(d);
|
|
10584
|
+
} else if (step < 0) {
|
|
10585
|
+
d[i0] = Math.ceil(start * step) / step;
|
|
10586
|
+
d[i1] = Math.floor(stop * step) / step;
|
|
10587
|
+
domain(d);
|
|
10588
|
+
}
|
|
11774
10589
|
|
|
11775
|
-
|
|
11776
|
-
|
|
10590
|
+
return scale;
|
|
10591
|
+
};
|
|
11777
10592
|
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
// Otherwise, assume interval is already a time interval and use it.
|
|
11781
|
-
if (typeof interval === "number") {
|
|
11782
|
-
var target = Math.abs(stop - start) / interval,
|
|
11783
|
-
i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
|
|
11784
|
-
if (i === tickIntervals.length) {
|
|
11785
|
-
step = tickStep(start / durationYear, stop / durationYear, interval);
|
|
11786
|
-
interval = year;
|
|
11787
|
-
} else if (i) {
|
|
11788
|
-
i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
|
|
11789
|
-
step = i[1];
|
|
11790
|
-
interval = i[0];
|
|
11791
|
-
} else {
|
|
11792
|
-
step = Math.max(tickStep(start, stop, interval), 1);
|
|
11793
|
-
interval = millisecond;
|
|
11794
|
-
}
|
|
11795
|
-
}
|
|
10593
|
+
return scale;
|
|
10594
|
+
}
|
|
11796
10595
|
|
|
11797
|
-
|
|
11798
|
-
|
|
10596
|
+
function linear() {
|
|
10597
|
+
var scale = continuous(deinterpolateLinear, reinterpolate$1);
|
|
11799
10598
|
|
|
11800
|
-
scale.
|
|
11801
|
-
return
|
|
10599
|
+
scale.copy = function() {
|
|
10600
|
+
return copy(scale, linear());
|
|
11802
10601
|
};
|
|
11803
10602
|
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
};
|
|
10603
|
+
return linearish(scale);
|
|
10604
|
+
}
|
|
11807
10605
|
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
t0 = d[0],
|
|
11811
|
-
t1 = d[d.length - 1],
|
|
11812
|
-
r = t1 < t0,
|
|
11813
|
-
t;
|
|
11814
|
-
if (r) t = t0, t0 = t1, t1 = t;
|
|
11815
|
-
t = tickInterval(interval, t0, t1, step);
|
|
11816
|
-
t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
|
|
11817
|
-
return r ? t.reverse() : t;
|
|
11818
|
-
};
|
|
10606
|
+
function identity$1() {
|
|
10607
|
+
var domain = [0, 1];
|
|
11819
10608
|
|
|
11820
|
-
scale
|
|
11821
|
-
return
|
|
11822
|
-
}
|
|
10609
|
+
function scale(x) {
|
|
10610
|
+
return +x;
|
|
10611
|
+
}
|
|
11823
10612
|
|
|
11824
|
-
scale.
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
: scale;
|
|
10613
|
+
scale.invert = scale;
|
|
10614
|
+
|
|
10615
|
+
scale.domain = scale.range = function(_) {
|
|
10616
|
+
return arguments.length ? (domain = map.call(_, number$1), scale) : domain.slice();
|
|
11829
10617
|
};
|
|
11830
10618
|
|
|
11831
10619
|
scale.copy = function() {
|
|
11832
|
-
return
|
|
10620
|
+
return identity$1().domain(domain);
|
|
11833
10621
|
};
|
|
11834
10622
|
|
|
11835
|
-
return scale;
|
|
10623
|
+
return linearish(scale);
|
|
11836
10624
|
}
|
|
11837
10625
|
|
|
11838
|
-
function
|
|
11839
|
-
|
|
11840
|
-
}
|
|
10626
|
+
function nice(domain, interval) {
|
|
10627
|
+
domain = domain.slice();
|
|
11841
10628
|
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
10629
|
+
var i0 = 0,
|
|
10630
|
+
i1 = domain.length - 1,
|
|
10631
|
+
x0 = domain[i0],
|
|
10632
|
+
x1 = domain[i1],
|
|
10633
|
+
t;
|
|
11845
10634
|
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
}
|
|
10635
|
+
if (x1 < x0) {
|
|
10636
|
+
t = i0, i0 = i1, i1 = t;
|
|
10637
|
+
t = x0, x0 = x1, x1 = t;
|
|
10638
|
+
}
|
|
10639
|
+
|
|
10640
|
+
domain[i0] = interval.floor(x0);
|
|
10641
|
+
domain[i1] = interval.ceil(x1);
|
|
10642
|
+
return domain;
|
|
11850
10643
|
}
|
|
11851
10644
|
|
|
11852
|
-
|
|
10645
|
+
function deinterpolate(a, b) {
|
|
10646
|
+
return (b = Math.log(b / a))
|
|
10647
|
+
? function(x) { return Math.log(x / a) / b; }
|
|
10648
|
+
: constant$3(b);
|
|
10649
|
+
}
|
|
11853
10650
|
|
|
11854
|
-
|
|
10651
|
+
function reinterpolate(a, b) {
|
|
10652
|
+
return a < 0
|
|
10653
|
+
? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); }
|
|
10654
|
+
: function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); };
|
|
10655
|
+
}
|
|
11855
10656
|
|
|
11856
|
-
|
|
10657
|
+
function pow10(x) {
|
|
10658
|
+
return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
|
|
10659
|
+
}
|
|
11857
10660
|
|
|
11858
|
-
|
|
10661
|
+
function powp(base) {
|
|
10662
|
+
return base === 10 ? pow10
|
|
10663
|
+
: base === Math.E ? Math.exp
|
|
10664
|
+
: function(x) { return Math.pow(base, x); };
|
|
10665
|
+
}
|
|
11859
10666
|
|
|
11860
|
-
function
|
|
11861
|
-
|
|
11862
|
-
|
|
10667
|
+
function logp(base) {
|
|
10668
|
+
return base === Math.E ? Math.log
|
|
10669
|
+
: base === 10 && Math.log10
|
|
10670
|
+
|| base === 2 && Math.log2
|
|
10671
|
+
|| (base = Math.log(base), function(x) { return Math.log(x) / base; });
|
|
11863
10672
|
}
|
|
11864
10673
|
|
|
11865
|
-
function
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
10674
|
+
function reflect(f) {
|
|
10675
|
+
return function(x) {
|
|
10676
|
+
return -f(-x);
|
|
10677
|
+
};
|
|
11869
10678
|
}
|
|
11870
10679
|
|
|
11871
|
-
function
|
|
10680
|
+
function log() {
|
|
10681
|
+
var scale = continuous(deinterpolate, reinterpolate).domain([1, 10]),
|
|
10682
|
+
domain = scale.domain,
|
|
10683
|
+
base = 10,
|
|
10684
|
+
logs = logp(10),
|
|
10685
|
+
pows = powp(10);
|
|
11872
10686
|
|
|
11873
|
-
|
|
11874
|
-
|
|
10687
|
+
function rescale() {
|
|
10688
|
+
logs = logp(base), pows = powp(base);
|
|
10689
|
+
if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows);
|
|
10690
|
+
return scale;
|
|
10691
|
+
}
|
|
11875
10692
|
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
reHex = /^#([0-9a-f]{3,8})$/,
|
|
11880
|
-
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
11881
|
-
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
11882
|
-
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
11883
|
-
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
11884
|
-
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
11885
|
-
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
10693
|
+
scale.base = function(_) {
|
|
10694
|
+
return arguments.length ? (base = +_, rescale()) : base;
|
|
10695
|
+
};
|
|
11886
10696
|
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
blueviolet: 0x8a2be2,
|
|
11899
|
-
brown: 0xa52a2a,
|
|
11900
|
-
burlywood: 0xdeb887,
|
|
11901
|
-
cadetblue: 0x5f9ea0,
|
|
11902
|
-
chartreuse: 0x7fff00,
|
|
11903
|
-
chocolate: 0xd2691e,
|
|
11904
|
-
coral: 0xff7f50,
|
|
11905
|
-
cornflowerblue: 0x6495ed,
|
|
11906
|
-
cornsilk: 0xfff8dc,
|
|
11907
|
-
crimson: 0xdc143c,
|
|
11908
|
-
cyan: 0x00ffff,
|
|
11909
|
-
darkblue: 0x00008b,
|
|
11910
|
-
darkcyan: 0x008b8b,
|
|
11911
|
-
darkgoldenrod: 0xb8860b,
|
|
11912
|
-
darkgray: 0xa9a9a9,
|
|
11913
|
-
darkgreen: 0x006400,
|
|
11914
|
-
darkgrey: 0xa9a9a9,
|
|
11915
|
-
darkkhaki: 0xbdb76b,
|
|
11916
|
-
darkmagenta: 0x8b008b,
|
|
11917
|
-
darkolivegreen: 0x556b2f,
|
|
11918
|
-
darkorange: 0xff8c00,
|
|
11919
|
-
darkorchid: 0x9932cc,
|
|
11920
|
-
darkred: 0x8b0000,
|
|
11921
|
-
darksalmon: 0xe9967a,
|
|
11922
|
-
darkseagreen: 0x8fbc8f,
|
|
11923
|
-
darkslateblue: 0x483d8b,
|
|
11924
|
-
darkslategray: 0x2f4f4f,
|
|
11925
|
-
darkslategrey: 0x2f4f4f,
|
|
11926
|
-
darkturquoise: 0x00ced1,
|
|
11927
|
-
darkviolet: 0x9400d3,
|
|
11928
|
-
deeppink: 0xff1493,
|
|
11929
|
-
deepskyblue: 0x00bfff,
|
|
11930
|
-
dimgray: 0x696969,
|
|
11931
|
-
dimgrey: 0x696969,
|
|
11932
|
-
dodgerblue: 0x1e90ff,
|
|
11933
|
-
firebrick: 0xb22222,
|
|
11934
|
-
floralwhite: 0xfffaf0,
|
|
11935
|
-
forestgreen: 0x228b22,
|
|
11936
|
-
fuchsia: 0xff00ff,
|
|
11937
|
-
gainsboro: 0xdcdcdc,
|
|
11938
|
-
ghostwhite: 0xf8f8ff,
|
|
11939
|
-
gold: 0xffd700,
|
|
11940
|
-
goldenrod: 0xdaa520,
|
|
11941
|
-
gray: 0x808080,
|
|
11942
|
-
green: 0x008000,
|
|
11943
|
-
greenyellow: 0xadff2f,
|
|
11944
|
-
grey: 0x808080,
|
|
11945
|
-
honeydew: 0xf0fff0,
|
|
11946
|
-
hotpink: 0xff69b4,
|
|
11947
|
-
indianred: 0xcd5c5c,
|
|
11948
|
-
indigo: 0x4b0082,
|
|
11949
|
-
ivory: 0xfffff0,
|
|
11950
|
-
khaki: 0xf0e68c,
|
|
11951
|
-
lavender: 0xe6e6fa,
|
|
11952
|
-
lavenderblush: 0xfff0f5,
|
|
11953
|
-
lawngreen: 0x7cfc00,
|
|
11954
|
-
lemonchiffon: 0xfffacd,
|
|
11955
|
-
lightblue: 0xadd8e6,
|
|
11956
|
-
lightcoral: 0xf08080,
|
|
11957
|
-
lightcyan: 0xe0ffff,
|
|
11958
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
11959
|
-
lightgray: 0xd3d3d3,
|
|
11960
|
-
lightgreen: 0x90ee90,
|
|
11961
|
-
lightgrey: 0xd3d3d3,
|
|
11962
|
-
lightpink: 0xffb6c1,
|
|
11963
|
-
lightsalmon: 0xffa07a,
|
|
11964
|
-
lightseagreen: 0x20b2aa,
|
|
11965
|
-
lightskyblue: 0x87cefa,
|
|
11966
|
-
lightslategray: 0x778899,
|
|
11967
|
-
lightslategrey: 0x778899,
|
|
11968
|
-
lightsteelblue: 0xb0c4de,
|
|
11969
|
-
lightyellow: 0xffffe0,
|
|
11970
|
-
lime: 0x00ff00,
|
|
11971
|
-
limegreen: 0x32cd32,
|
|
11972
|
-
linen: 0xfaf0e6,
|
|
11973
|
-
magenta: 0xff00ff,
|
|
11974
|
-
maroon: 0x800000,
|
|
11975
|
-
mediumaquamarine: 0x66cdaa,
|
|
11976
|
-
mediumblue: 0x0000cd,
|
|
11977
|
-
mediumorchid: 0xba55d3,
|
|
11978
|
-
mediumpurple: 0x9370db,
|
|
11979
|
-
mediumseagreen: 0x3cb371,
|
|
11980
|
-
mediumslateblue: 0x7b68ee,
|
|
11981
|
-
mediumspringgreen: 0x00fa9a,
|
|
11982
|
-
mediumturquoise: 0x48d1cc,
|
|
11983
|
-
mediumvioletred: 0xc71585,
|
|
11984
|
-
midnightblue: 0x191970,
|
|
11985
|
-
mintcream: 0xf5fffa,
|
|
11986
|
-
mistyrose: 0xffe4e1,
|
|
11987
|
-
moccasin: 0xffe4b5,
|
|
11988
|
-
navajowhite: 0xffdead,
|
|
11989
|
-
navy: 0x000080,
|
|
11990
|
-
oldlace: 0xfdf5e6,
|
|
11991
|
-
olive: 0x808000,
|
|
11992
|
-
olivedrab: 0x6b8e23,
|
|
11993
|
-
orange: 0xffa500,
|
|
11994
|
-
orangered: 0xff4500,
|
|
11995
|
-
orchid: 0xda70d6,
|
|
11996
|
-
palegoldenrod: 0xeee8aa,
|
|
11997
|
-
palegreen: 0x98fb98,
|
|
11998
|
-
paleturquoise: 0xafeeee,
|
|
11999
|
-
palevioletred: 0xdb7093,
|
|
12000
|
-
papayawhip: 0xffefd5,
|
|
12001
|
-
peachpuff: 0xffdab9,
|
|
12002
|
-
peru: 0xcd853f,
|
|
12003
|
-
pink: 0xffc0cb,
|
|
12004
|
-
plum: 0xdda0dd,
|
|
12005
|
-
powderblue: 0xb0e0e6,
|
|
12006
|
-
purple: 0x800080,
|
|
12007
|
-
rebeccapurple: 0x663399,
|
|
12008
|
-
red: 0xff0000,
|
|
12009
|
-
rosybrown: 0xbc8f8f,
|
|
12010
|
-
royalblue: 0x4169e1,
|
|
12011
|
-
saddlebrown: 0x8b4513,
|
|
12012
|
-
salmon: 0xfa8072,
|
|
12013
|
-
sandybrown: 0xf4a460,
|
|
12014
|
-
seagreen: 0x2e8b57,
|
|
12015
|
-
seashell: 0xfff5ee,
|
|
12016
|
-
sienna: 0xa0522d,
|
|
12017
|
-
silver: 0xc0c0c0,
|
|
12018
|
-
skyblue: 0x87ceeb,
|
|
12019
|
-
slateblue: 0x6a5acd,
|
|
12020
|
-
slategray: 0x708090,
|
|
12021
|
-
slategrey: 0x708090,
|
|
12022
|
-
snow: 0xfffafa,
|
|
12023
|
-
springgreen: 0x00ff7f,
|
|
12024
|
-
steelblue: 0x4682b4,
|
|
12025
|
-
tan: 0xd2b48c,
|
|
12026
|
-
teal: 0x008080,
|
|
12027
|
-
thistle: 0xd8bfd8,
|
|
12028
|
-
tomato: 0xff6347,
|
|
12029
|
-
turquoise: 0x40e0d0,
|
|
12030
|
-
violet: 0xee82ee,
|
|
12031
|
-
wheat: 0xf5deb3,
|
|
12032
|
-
white: 0xffffff,
|
|
12033
|
-
whitesmoke: 0xf5f5f5,
|
|
12034
|
-
yellow: 0xffff00,
|
|
12035
|
-
yellowgreen: 0x9acd32
|
|
12036
|
-
};
|
|
10697
|
+
scale.domain = function(_) {
|
|
10698
|
+
return arguments.length ? (domain(_), rescale()) : domain();
|
|
10699
|
+
};
|
|
10700
|
+
|
|
10701
|
+
scale.ticks = function(count) {
|
|
10702
|
+
var d = domain(),
|
|
10703
|
+
u = d[0],
|
|
10704
|
+
v = d[d.length - 1],
|
|
10705
|
+
r;
|
|
10706
|
+
|
|
10707
|
+
if (r = v < u) i = u, u = v, v = i;
|
|
12037
10708
|
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
12046
|
-
formatHex: color_formatHex,
|
|
12047
|
-
formatHsl: color_formatHsl,
|
|
12048
|
-
formatRgb: color_formatRgb,
|
|
12049
|
-
toString: color_formatRgb
|
|
12050
|
-
});
|
|
10709
|
+
var i = logs(u),
|
|
10710
|
+
j = logs(v),
|
|
10711
|
+
p,
|
|
10712
|
+
k,
|
|
10713
|
+
t,
|
|
10714
|
+
n = count == null ? 10 : +count,
|
|
10715
|
+
z = [];
|
|
12051
10716
|
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
10717
|
+
if (!(base % 1) && j - i < n) {
|
|
10718
|
+
i = Math.round(i) - 1, j = Math.round(j) + 1;
|
|
10719
|
+
if (u > 0) for (; i < j; ++i) {
|
|
10720
|
+
for (k = 1, p = pows(i); k < base; ++k) {
|
|
10721
|
+
t = p * k;
|
|
10722
|
+
if (t < u) continue;
|
|
10723
|
+
if (t > v) break;
|
|
10724
|
+
z.push(t);
|
|
10725
|
+
}
|
|
10726
|
+
} else for (; i < j; ++i) {
|
|
10727
|
+
for (k = base - 1, p = pows(i); k >= 1; --k) {
|
|
10728
|
+
t = p * k;
|
|
10729
|
+
if (t < u) continue;
|
|
10730
|
+
if (t > v) break;
|
|
10731
|
+
z.push(t);
|
|
10732
|
+
}
|
|
10733
|
+
}
|
|
10734
|
+
} else {
|
|
10735
|
+
z = ticks(i, j, Math.min(j - i, n)).map(pows);
|
|
10736
|
+
}
|
|
12055
10737
|
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
}
|
|
10738
|
+
return r ? z.reverse() : z;
|
|
10739
|
+
};
|
|
12059
10740
|
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
10741
|
+
scale.tickFormat = function(count, specifier) {
|
|
10742
|
+
if (specifier == null) specifier = base === 10 ? ".0e" : ",";
|
|
10743
|
+
if (typeof specifier !== "function") specifier = exports.format(specifier);
|
|
10744
|
+
if (count === Infinity) return specifier;
|
|
10745
|
+
if (count == null) count = 10;
|
|
10746
|
+
var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
|
|
10747
|
+
return function(d) {
|
|
10748
|
+
var i = d / pows(Math.round(logs(d)));
|
|
10749
|
+
if (i * base < base - 0.5) i *= base;
|
|
10750
|
+
return i <= k ? specifier(d) : "";
|
|
10751
|
+
};
|
|
10752
|
+
};
|
|
12063
10753
|
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
|
|
12067
|
-
|
|
12068
|
-
|
|
12069
|
-
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
12077
|
-
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
12078
|
-
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
12079
|
-
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
12080
|
-
: null;
|
|
10754
|
+
scale.nice = function() {
|
|
10755
|
+
return domain(nice(domain(), {
|
|
10756
|
+
floor: function(x) { return pows(Math.floor(logs(x))); },
|
|
10757
|
+
ceil: function(x) { return pows(Math.ceil(logs(x))); }
|
|
10758
|
+
}));
|
|
10759
|
+
};
|
|
10760
|
+
|
|
10761
|
+
scale.copy = function() {
|
|
10762
|
+
return copy(scale, log().base(base));
|
|
10763
|
+
};
|
|
10764
|
+
|
|
10765
|
+
return scale;
|
|
12081
10766
|
}
|
|
12082
10767
|
|
|
12083
|
-
function
|
|
12084
|
-
return
|
|
10768
|
+
function raise(x, exponent) {
|
|
10769
|
+
return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
|
|
12085
10770
|
}
|
|
12086
10771
|
|
|
12087
|
-
function
|
|
12088
|
-
|
|
12089
|
-
|
|
10772
|
+
function pow() {
|
|
10773
|
+
var exponent = 1,
|
|
10774
|
+
scale = continuous(deinterpolate, reinterpolate),
|
|
10775
|
+
domain = scale.domain;
|
|
10776
|
+
|
|
10777
|
+
function deinterpolate(a, b) {
|
|
10778
|
+
return (b = raise(b, exponent) - (a = raise(a, exponent)))
|
|
10779
|
+
? function(x) { return (raise(x, exponent) - a) / b; }
|
|
10780
|
+
: constant$3(b);
|
|
10781
|
+
}
|
|
10782
|
+
|
|
10783
|
+
function reinterpolate(a, b) {
|
|
10784
|
+
b = raise(b, exponent) - (a = raise(a, exponent));
|
|
10785
|
+
return function(t) { return raise(a + b * t, 1 / exponent); };
|
|
10786
|
+
}
|
|
10787
|
+
|
|
10788
|
+
scale.exponent = function(_) {
|
|
10789
|
+
return arguments.length ? (exponent = +_, domain(domain())) : exponent;
|
|
10790
|
+
};
|
|
10791
|
+
|
|
10792
|
+
scale.copy = function() {
|
|
10793
|
+
return copy(scale, pow().exponent(exponent));
|
|
10794
|
+
};
|
|
10795
|
+
|
|
10796
|
+
return linearish(scale);
|
|
12090
10797
|
}
|
|
12091
10798
|
|
|
12092
|
-
function
|
|
12093
|
-
|
|
12094
|
-
if (!o) return new Rgb;
|
|
12095
|
-
o = o.rgb();
|
|
12096
|
-
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
10799
|
+
function sqrt() {
|
|
10800
|
+
return pow().exponent(0.5);
|
|
12097
10801
|
}
|
|
12098
10802
|
|
|
12099
|
-
function
|
|
12100
|
-
|
|
10803
|
+
function quantile() {
|
|
10804
|
+
var domain = [],
|
|
10805
|
+
range = [],
|
|
10806
|
+
thresholds = [];
|
|
10807
|
+
|
|
10808
|
+
function rescale() {
|
|
10809
|
+
var i = 0, n = Math.max(1, range.length);
|
|
10810
|
+
thresholds = new Array(n - 1);
|
|
10811
|
+
while (++i < n) thresholds[i - 1] = threshold$1(domain, i / n);
|
|
10812
|
+
return scale;
|
|
10813
|
+
}
|
|
10814
|
+
|
|
10815
|
+
function scale(x) {
|
|
10816
|
+
if (!isNaN(x = +x)) return range[bisectRight(thresholds, x)];
|
|
10817
|
+
}
|
|
10818
|
+
|
|
10819
|
+
scale.invertExtent = function(y) {
|
|
10820
|
+
var i = range.indexOf(y);
|
|
10821
|
+
return i < 0 ? [NaN, NaN] : [
|
|
10822
|
+
i > 0 ? thresholds[i - 1] : domain[0],
|
|
10823
|
+
i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
|
|
10824
|
+
];
|
|
10825
|
+
};
|
|
10826
|
+
|
|
10827
|
+
scale.domain = function(_) {
|
|
10828
|
+
if (!arguments.length) return domain.slice();
|
|
10829
|
+
domain = [];
|
|
10830
|
+
for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
|
|
10831
|
+
domain.sort(ascending);
|
|
10832
|
+
return rescale();
|
|
10833
|
+
};
|
|
10834
|
+
|
|
10835
|
+
scale.range = function(_) {
|
|
10836
|
+
return arguments.length ? (range = slice.call(_), rescale()) : range.slice();
|
|
10837
|
+
};
|
|
10838
|
+
|
|
10839
|
+
scale.quantiles = function() {
|
|
10840
|
+
return thresholds.slice();
|
|
10841
|
+
};
|
|
10842
|
+
|
|
10843
|
+
scale.copy = function() {
|
|
10844
|
+
return quantile()
|
|
10845
|
+
.domain(domain)
|
|
10846
|
+
.range(range);
|
|
10847
|
+
};
|
|
10848
|
+
|
|
10849
|
+
return scale;
|
|
12101
10850
|
}
|
|
12102
10851
|
|
|
12103
|
-
function
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
10852
|
+
function quantize() {
|
|
10853
|
+
var x0 = 0,
|
|
10854
|
+
x1 = 1,
|
|
10855
|
+
n = 1,
|
|
10856
|
+
domain = [0.5],
|
|
10857
|
+
range = [0, 1];
|
|
10858
|
+
|
|
10859
|
+
function scale(x) {
|
|
10860
|
+
if (x <= x) return range[bisectRight(domain, x, 0, n)];
|
|
10861
|
+
}
|
|
10862
|
+
|
|
10863
|
+
function rescale() {
|
|
10864
|
+
var i = -1;
|
|
10865
|
+
domain = new Array(n);
|
|
10866
|
+
while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
|
|
10867
|
+
return scale;
|
|
10868
|
+
}
|
|
10869
|
+
|
|
10870
|
+
scale.domain = function(_) {
|
|
10871
|
+
return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
|
|
10872
|
+
};
|
|
10873
|
+
|
|
10874
|
+
scale.range = function(_) {
|
|
10875
|
+
return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice();
|
|
10876
|
+
};
|
|
10877
|
+
|
|
10878
|
+
scale.invertExtent = function(y) {
|
|
10879
|
+
var i = range.indexOf(y);
|
|
10880
|
+
return i < 0 ? [NaN, NaN]
|
|
10881
|
+
: i < 1 ? [x0, domain[0]]
|
|
10882
|
+
: i >= n ? [domain[n - 1], x1]
|
|
10883
|
+
: [domain[i - 1], domain[i]];
|
|
10884
|
+
};
|
|
10885
|
+
|
|
10886
|
+
scale.copy = function() {
|
|
10887
|
+
return quantize()
|
|
10888
|
+
.domain([x0, x1])
|
|
10889
|
+
.range(range);
|
|
10890
|
+
};
|
|
10891
|
+
|
|
10892
|
+
return linearish(scale);
|
|
12108
10893
|
}
|
|
12109
10894
|
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
return
|
|
12121
|
-
}
|
|
12122
|
-
displayable: function() {
|
|
12123
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
12124
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
12125
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
12126
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
12127
|
-
},
|
|
12128
|
-
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
12129
|
-
formatHex: rgb_formatHex,
|
|
12130
|
-
formatRgb: rgb_formatRgb,
|
|
12131
|
-
toString: rgb_formatRgb
|
|
12132
|
-
}));
|
|
10895
|
+
function threshold() {
|
|
10896
|
+
var domain = [0.5],
|
|
10897
|
+
range = [0, 1],
|
|
10898
|
+
n = 1;
|
|
10899
|
+
|
|
10900
|
+
function scale(x) {
|
|
10901
|
+
if (x <= x) return range[bisectRight(domain, x, 0, n)];
|
|
10902
|
+
}
|
|
10903
|
+
|
|
10904
|
+
scale.domain = function(_) {
|
|
10905
|
+
return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
|
|
10906
|
+
};
|
|
12133
10907
|
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
10908
|
+
scale.range = function(_) {
|
|
10909
|
+
return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
|
|
10910
|
+
};
|
|
12137
10911
|
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
|
|
10912
|
+
scale.invertExtent = function(y) {
|
|
10913
|
+
var i = range.indexOf(y);
|
|
10914
|
+
return [domain[i - 1], domain[i]];
|
|
10915
|
+
};
|
|
10916
|
+
|
|
10917
|
+
scale.copy = function() {
|
|
10918
|
+
return threshold()
|
|
10919
|
+
.domain(domain)
|
|
10920
|
+
.range(range);
|
|
10921
|
+
};
|
|
10922
|
+
|
|
10923
|
+
return scale;
|
|
12145
10924
|
}
|
|
12146
10925
|
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
10926
|
+
var durationSecond = 1000,
|
|
10927
|
+
durationMinute = durationSecond * 60,
|
|
10928
|
+
durationHour = durationMinute * 60,
|
|
10929
|
+
durationDay = durationHour * 24,
|
|
10930
|
+
durationWeek = durationDay * 7,
|
|
10931
|
+
durationMonth = durationDay * 30,
|
|
10932
|
+
durationYear = durationDay * 365;
|
|
10933
|
+
|
|
10934
|
+
function date(t) {
|
|
10935
|
+
return new Date(t);
|
|
12150
10936
|
}
|
|
12151
10937
|
|
|
12152
|
-
function
|
|
12153
|
-
|
|
12154
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
12155
|
-
else if (s <= 0) h = NaN;
|
|
12156
|
-
return new Hsl(h, s, l, a);
|
|
10938
|
+
function number(t) {
|
|
10939
|
+
return t instanceof Date ? +t : +new Date(+t);
|
|
12157
10940
|
}
|
|
12158
10941
|
|
|
12159
|
-
function
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12179
|
-
|
|
12180
|
-
|
|
10942
|
+
function calendar(year, month, week, day, hour, minute, second, millisecond, format) {
|
|
10943
|
+
var scale = continuous(deinterpolateLinear, reinterpolate$1),
|
|
10944
|
+
invert = scale.invert,
|
|
10945
|
+
domain = scale.domain;
|
|
10946
|
+
|
|
10947
|
+
var formatMillisecond = format(".%L"),
|
|
10948
|
+
formatSecond = format(":%S"),
|
|
10949
|
+
formatMinute = format("%I:%M"),
|
|
10950
|
+
formatHour = format("%I %p"),
|
|
10951
|
+
formatDay = format("%a %d"),
|
|
10952
|
+
formatWeek = format("%b %d"),
|
|
10953
|
+
formatMonth = format("%B"),
|
|
10954
|
+
formatYear = format("%Y");
|
|
10955
|
+
|
|
10956
|
+
var tickIntervals = [
|
|
10957
|
+
[second, 1, durationSecond],
|
|
10958
|
+
[second, 5, 5 * durationSecond],
|
|
10959
|
+
[second, 15, 15 * durationSecond],
|
|
10960
|
+
[second, 30, 30 * durationSecond],
|
|
10961
|
+
[minute, 1, durationMinute],
|
|
10962
|
+
[minute, 5, 5 * durationMinute],
|
|
10963
|
+
[minute, 15, 15 * durationMinute],
|
|
10964
|
+
[minute, 30, 30 * durationMinute],
|
|
10965
|
+
[ hour, 1, durationHour ],
|
|
10966
|
+
[ hour, 3, 3 * durationHour ],
|
|
10967
|
+
[ hour, 6, 6 * durationHour ],
|
|
10968
|
+
[ hour, 12, 12 * durationHour ],
|
|
10969
|
+
[ day, 1, durationDay ],
|
|
10970
|
+
[ day, 2, 2 * durationDay ],
|
|
10971
|
+
[ week, 1, durationWeek ],
|
|
10972
|
+
[ month, 1, durationMonth ],
|
|
10973
|
+
[ month, 3, 3 * durationMonth ],
|
|
10974
|
+
[ year, 1, durationYear ]
|
|
10975
|
+
];
|
|
10976
|
+
|
|
10977
|
+
function tickFormat(date) {
|
|
10978
|
+
return (second(date) < date ? formatMillisecond
|
|
10979
|
+
: minute(date) < date ? formatSecond
|
|
10980
|
+
: hour(date) < date ? formatMinute
|
|
10981
|
+
: day(date) < date ? formatHour
|
|
10982
|
+
: month(date) < date ? (week(date) < date ? formatDay : formatWeek)
|
|
10983
|
+
: year(date) < date ? formatMonth
|
|
10984
|
+
: formatYear)(date);
|
|
12181
10985
|
}
|
|
12182
|
-
return new Hsl(h, s, l, o.opacity);
|
|
12183
|
-
}
|
|
12184
10986
|
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
}
|
|
10987
|
+
function tickInterval(interval, start, stop, step) {
|
|
10988
|
+
if (interval == null) interval = 10;
|
|
12188
10989
|
|
|
12189
|
-
|
|
12190
|
-
|
|
12191
|
-
|
|
12192
|
-
|
|
12193
|
-
|
|
12194
|
-
|
|
10990
|
+
// If a desired tick count is specified, pick a reasonable tick interval
|
|
10991
|
+
// based on the extent of the domain and a rough estimate of tick size.
|
|
10992
|
+
// Otherwise, assume interval is already a time interval and use it.
|
|
10993
|
+
if (typeof interval === "number") {
|
|
10994
|
+
var target = Math.abs(stop - start) / interval,
|
|
10995
|
+
i = bisector(function(i) { return i[2]; }).right(tickIntervals, target);
|
|
10996
|
+
if (i === tickIntervals.length) {
|
|
10997
|
+
step = tickStep(start / durationYear, stop / durationYear, interval);
|
|
10998
|
+
interval = year;
|
|
10999
|
+
} else if (i) {
|
|
11000
|
+
i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
|
|
11001
|
+
step = i[1];
|
|
11002
|
+
interval = i[0];
|
|
11003
|
+
} else {
|
|
11004
|
+
step = Math.max(tickStep(start, stop, interval), 1);
|
|
11005
|
+
interval = millisecond;
|
|
11006
|
+
}
|
|
11007
|
+
}
|
|
12195
11008
|
|
|
12196
|
-
|
|
12197
|
-
brighter: function(k) {
|
|
12198
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
12199
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
12200
|
-
},
|
|
12201
|
-
darker: function(k) {
|
|
12202
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
12203
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
12204
|
-
},
|
|
12205
|
-
rgb: function() {
|
|
12206
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
12207
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
12208
|
-
l = this.l,
|
|
12209
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
12210
|
-
m1 = 2 * l - m2;
|
|
12211
|
-
return new Rgb(
|
|
12212
|
-
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
12213
|
-
hsl2rgb(h, m1, m2),
|
|
12214
|
-
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
12215
|
-
this.opacity
|
|
12216
|
-
);
|
|
12217
|
-
},
|
|
12218
|
-
displayable: function() {
|
|
12219
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
12220
|
-
&& (0 <= this.l && this.l <= 1)
|
|
12221
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
12222
|
-
},
|
|
12223
|
-
formatHsl: function() {
|
|
12224
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
12225
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
12226
|
-
+ (this.h || 0) + ", "
|
|
12227
|
-
+ (this.s || 0) * 100 + "%, "
|
|
12228
|
-
+ (this.l || 0) * 100 + "%"
|
|
12229
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
11009
|
+
return step == null ? interval : interval.every(step);
|
|
12230
11010
|
}
|
|
12231
|
-
}));
|
|
12232
11011
|
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
: h < 180 ? m2
|
|
12237
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
12238
|
-
: m1) * 255;
|
|
12239
|
-
}
|
|
11012
|
+
scale.invert = function(y) {
|
|
11013
|
+
return new Date(invert(y));
|
|
11014
|
+
};
|
|
12240
11015
|
|
|
12241
|
-
|
|
12242
|
-
|
|
11016
|
+
scale.domain = function(_) {
|
|
11017
|
+
return arguments.length ? domain(map.call(_, number)) : domain().map(date);
|
|
11018
|
+
};
|
|
12243
11019
|
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
11020
|
+
scale.ticks = function(interval, step) {
|
|
11021
|
+
var d = domain(),
|
|
11022
|
+
t0 = d[0],
|
|
11023
|
+
t1 = d[d.length - 1],
|
|
11024
|
+
r = t1 < t0,
|
|
11025
|
+
t;
|
|
11026
|
+
if (r) t = t0, t0 = t1, t1 = t;
|
|
11027
|
+
t = tickInterval(interval, t0, t1, step);
|
|
11028
|
+
t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
|
|
11029
|
+
return r ? t.reverse() : t;
|
|
11030
|
+
};
|
|
12252
11031
|
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
11032
|
+
scale.tickFormat = function(count, specifier) {
|
|
11033
|
+
return specifier == null ? tickFormat : format(specifier);
|
|
11034
|
+
};
|
|
11035
|
+
|
|
11036
|
+
scale.nice = function(interval, step) {
|
|
11037
|
+
var d = domain();
|
|
11038
|
+
return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
|
|
11039
|
+
? domain(nice(d, interval))
|
|
11040
|
+
: scale;
|
|
11041
|
+
};
|
|
11042
|
+
|
|
11043
|
+
scale.copy = function() {
|
|
11044
|
+
return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));
|
|
11045
|
+
};
|
|
11046
|
+
|
|
11047
|
+
return scale;
|
|
12265
11048
|
}
|
|
12266
11049
|
|
|
12267
|
-
function
|
|
12268
|
-
return
|
|
11050
|
+
function time() {
|
|
11051
|
+
return calendar(timeYear, timeMonth, sunday, timeDay, timeHour, timeMinute, utcSecond, utcMillisecond, exports.timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]);
|
|
12269
11052
|
}
|
|
12270
11053
|
|
|
12271
|
-
function
|
|
12272
|
-
|
|
12273
|
-
this.s = +s;
|
|
12274
|
-
this.l = +l;
|
|
12275
|
-
this.opacity = +opacity;
|
|
11054
|
+
function utcTime() {
|
|
11055
|
+
return calendar(utcYear$1, utcMonth$1, utcSunday, utcDay$1, utcHour$1, utcMinute$1, utcSecond, utcMillisecond, exports.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);
|
|
12276
11056
|
}
|
|
12277
11057
|
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
cosh = Math.cos(h),
|
|
12292
|
-
sinh = Math.sin(h);
|
|
12293
|
-
return new Rgb(
|
|
12294
|
-
255 * (l + a * (A * cosh + B * sinh)),
|
|
12295
|
-
255 * (l + a * (C * cosh + D * sinh)),
|
|
12296
|
-
255 * (l + a * (E * cosh)),
|
|
12297
|
-
this.opacity
|
|
12298
|
-
);
|
|
12299
|
-
}
|
|
12300
|
-
}));
|
|
11058
|
+
function colors(s) {
|
|
11059
|
+
return s.match(/.{6}/g).map(function(x) {
|
|
11060
|
+
return "#" + x;
|
|
11061
|
+
});
|
|
11062
|
+
}
|
|
11063
|
+
|
|
11064
|
+
var d3SchemeCategory10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
|
|
11065
|
+
|
|
11066
|
+
var d3SchemeCategory20b = colors("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");
|
|
11067
|
+
|
|
11068
|
+
var d3SchemeCategory20c = colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");
|
|
11069
|
+
|
|
11070
|
+
var d3SchemeCategory20 = colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");
|
|
12301
11071
|
|
|
12302
|
-
var cubehelix = cubehelixLong(cubehelix$
|
|
11072
|
+
var cubehelix = cubehelixLong(cubehelix$3(300, 0.5, 0.0), cubehelix$3(-240, 0.5, 1.0));
|
|
12303
11073
|
|
|
12304
|
-
var warm = cubehelixLong(cubehelix$
|
|
11074
|
+
var warm = cubehelixLong(cubehelix$3(-100, 0.75, 0.35), cubehelix$3(80, 1.50, 0.8));
|
|
12305
11075
|
|
|
12306
|
-
var cool = cubehelixLong(cubehelix$
|
|
11076
|
+
var cool = cubehelixLong(cubehelix$3(260, 0.75, 0.35), cubehelix$3(80, 1.50, 0.8));
|
|
12307
11077
|
|
|
12308
|
-
var rainbow$1 = cubehelix$
|
|
11078
|
+
var rainbow$1 = cubehelix$3();
|
|
12309
11079
|
|
|
12310
11080
|
function rainbow$2(t) {
|
|
12311
11081
|
if (t < 0 || t > 1) t -= Math.floor(t);
|
|
@@ -12528,7 +11298,7 @@
|
|
|
12528
11298
|
var scale_1 = linear()
|
|
12529
11299
|
.domain([0, subPaletteSize])
|
|
12530
11300
|
.range([prevColor, color])
|
|
12531
|
-
.interpolate(lab
|
|
11301
|
+
.interpolate(lab);
|
|
12532
11302
|
for (var i = 0; i < subPaletteSize; ++i) {
|
|
12533
11303
|
range.push(scale_1(i));
|
|
12534
11304
|
}
|
|
@@ -12654,16 +11424,16 @@
|
|
|
12654
11424
|
var ordinal = fetchOrdinalItem;
|
|
12655
11425
|
var rainbow = fetchRainbowItem;
|
|
12656
11426
|
function textColor(backgroundColor) {
|
|
12657
|
-
var rgb;
|
|
11427
|
+
var rgb$1;
|
|
12658
11428
|
switch (backgroundColor) {
|
|
12659
11429
|
case "":
|
|
12660
11430
|
case "transparent":
|
|
12661
|
-
rgb = rgb
|
|
11431
|
+
rgb$1 = rgb("white");
|
|
12662
11432
|
break;
|
|
12663
11433
|
default:
|
|
12664
|
-
rgb = rgb
|
|
11434
|
+
rgb$1 = rgb(backgroundColor);
|
|
12665
11435
|
}
|
|
12666
|
-
return ((rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114) > 149) ? "black" : "white";
|
|
11436
|
+
return ((rgb$1.r * 0.299 + rgb$1.g * 0.587 + rgb$1.b * 0.114) > 149) ? "black" : "white";
|
|
12667
11437
|
}
|
|
12668
11438
|
|
|
12669
11439
|
var Palette = /*#__PURE__*/Object.freeze({
|
|
@@ -16492,18 +15262,18 @@
|
|
|
16492
15262
|
exports.Widget = Widget;
|
|
16493
15263
|
exports.WidgetArray = WidgetArray;
|
|
16494
15264
|
exports.active = active;
|
|
16495
|
-
exports.ascending =
|
|
15265
|
+
exports.ascending = d3Ascending;
|
|
16496
15266
|
exports.autoType = autoType;
|
|
16497
|
-
exports.bisect = bisectRight;
|
|
15267
|
+
exports.bisect = bisectRight$1;
|
|
16498
15268
|
exports.bisectLeft = bisectLeft;
|
|
16499
|
-
exports.bisectRight = bisectRight;
|
|
16500
|
-
exports.bisector = bisector;
|
|
15269
|
+
exports.bisectRight = bisectRight$1;
|
|
15270
|
+
exports.bisector = bisector$1;
|
|
16501
15271
|
exports.brush = brush;
|
|
16502
15272
|
exports.brushSelection = brushSelection;
|
|
16503
15273
|
exports.brushX = brushX;
|
|
16504
15274
|
exports.brushY = brushY;
|
|
16505
15275
|
exports.clientPoint = point$1;
|
|
16506
|
-
exports.color = color
|
|
15276
|
+
exports.color = color;
|
|
16507
15277
|
exports.create = create$1;
|
|
16508
15278
|
exports.creator = creator;
|
|
16509
15279
|
exports.cross = cross;
|
|
@@ -16514,7 +15284,7 @@
|
|
|
16514
15284
|
exports.csvFormatValue = csvFormatValue;
|
|
16515
15285
|
exports.csvParse = csvParse;
|
|
16516
15286
|
exports.csvParseRows = csvParseRows;
|
|
16517
|
-
exports.cubehelix = cubehelix$
|
|
15287
|
+
exports.cubehelix = cubehelix$3;
|
|
16518
15288
|
exports.customEvent = customEvent;
|
|
16519
15289
|
exports.d3Event = d3Event;
|
|
16520
15290
|
exports.descending = d3Descending;
|
|
@@ -16568,26 +15338,26 @@
|
|
|
16568
15338
|
exports.formatLocale = formatLocale$1;
|
|
16569
15339
|
exports.formatSpecifier = formatSpecifier;
|
|
16570
15340
|
exports.gray = gray;
|
|
16571
|
-
exports.hcl = hcl;
|
|
15341
|
+
exports.hcl = hcl$2;
|
|
16572
15342
|
exports.histogram = histogram;
|
|
16573
|
-
exports.hsl = hsl$
|
|
15343
|
+
exports.hsl = hsl$2;
|
|
16574
15344
|
exports.interpolate = interpolate$1;
|
|
16575
15345
|
exports.interpolateArray = array$2;
|
|
16576
15346
|
exports.interpolateBasis = basis$1;
|
|
16577
15347
|
exports.interpolateBasisClosed = basisClosed;
|
|
16578
15348
|
exports.interpolateCool = cool;
|
|
16579
|
-
exports.interpolateCubehelix = cubehelix$
|
|
15349
|
+
exports.interpolateCubehelix = cubehelix$2;
|
|
16580
15350
|
exports.interpolateCubehelixDefault = cubehelix;
|
|
16581
15351
|
exports.interpolateCubehelixLong = cubehelixLong;
|
|
16582
15352
|
exports.interpolateDate = date$1;
|
|
16583
15353
|
exports.interpolateDiscrete = discrete;
|
|
16584
|
-
exports.interpolateHcl = hcl$
|
|
15354
|
+
exports.interpolateHcl = hcl$1;
|
|
16585
15355
|
exports.interpolateHclLong = hclLong;
|
|
16586
|
-
exports.interpolateHsl = hsl$
|
|
15356
|
+
exports.interpolateHsl = hsl$1;
|
|
16587
15357
|
exports.interpolateHslLong = hslLong;
|
|
16588
15358
|
exports.interpolateHue = hue;
|
|
16589
15359
|
exports.interpolateInferno = inferno;
|
|
16590
|
-
exports.interpolateLab = lab
|
|
15360
|
+
exports.interpolateLab = lab;
|
|
16591
15361
|
exports.interpolateMagma = magma;
|
|
16592
15362
|
exports.interpolateNumber = reinterpolate$1;
|
|
16593
15363
|
exports.interpolateNumberArray = numberArray;
|
|
@@ -16608,7 +15378,7 @@
|
|
|
16608
15378
|
exports.isoFormat = formatIso$1;
|
|
16609
15379
|
exports.isoParse = parseIso$1;
|
|
16610
15380
|
exports.keys = keys;
|
|
16611
|
-
exports.lab = lab;
|
|
15381
|
+
exports.lab = lab$1;
|
|
16612
15382
|
exports.lch = lch;
|
|
16613
15383
|
exports.local = local$1;
|
|
16614
15384
|
exports.map = map$2;
|
|
@@ -16630,10 +15400,10 @@
|
|
|
16630
15400
|
exports.precisionRound = precisionRound;
|
|
16631
15401
|
exports.publish = publish;
|
|
16632
15402
|
exports.publishProxy = publishProxy;
|
|
16633
|
-
exports.quantile =
|
|
15403
|
+
exports.quantile = quantile$1;
|
|
16634
15404
|
exports.quantize = quantize$1;
|
|
16635
|
-
exports.range =
|
|
16636
|
-
exports.rgb = rgb
|
|
15405
|
+
exports.range = range;
|
|
15406
|
+
exports.rgb = rgb;
|
|
16637
15407
|
exports.scaleBand = band;
|
|
16638
15408
|
exports.scaleIdentity = identity$1;
|
|
16639
15409
|
exports.scaleImplicit = implicit;
|
|
@@ -16666,9 +15436,9 @@
|
|
|
16666
15436
|
exports.thresholdFreedmanDiaconis = freedmanDiaconis;
|
|
16667
15437
|
exports.thresholdScott = scott;
|
|
16668
15438
|
exports.thresholdSturges = sturges;
|
|
16669
|
-
exports.tickIncrement = tickIncrement;
|
|
16670
|
-
exports.tickStep = tickStep;
|
|
16671
|
-
exports.ticks = ticks;
|
|
15439
|
+
exports.tickIncrement = tickIncrement$1;
|
|
15440
|
+
exports.tickStep = tickStep$1;
|
|
15441
|
+
exports.ticks = ticks$1;
|
|
16672
15442
|
exports.timeFormatDefaultLocale = defaultLocale;
|
|
16673
15443
|
exports.timeFormatLocale = formatLocale;
|
|
16674
15444
|
exports.touch = touch;
|