victory-canvas 36.9.1 → 36.9.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/victory-canvas.js +74 -145
- package/dist/victory-canvas.min.js +1 -1
- package/es/canvas-bar.d.ts +17 -17
- package/es/canvas-curve.d.ts +8 -8
- package/es/canvas-group.d.ts +13 -13
- package/es/canvas-point.d.ts +10 -10
- package/es/hooks/use-canvas-context.d.ts +8 -8
- package/es/index.d.ts +5 -5
- package/lib/canvas-bar.d.ts +17 -17
- package/lib/canvas-curve.d.ts +8 -8
- package/lib/canvas-group.d.ts +13 -13
- package/lib/canvas-point.d.ts +10 -10
- package/lib/hooks/use-canvas-context.d.ts +8 -8
- package/lib/index.d.ts +5 -5
- package/package.json +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# victory-canvas
|
|
2
2
|
|
|
3
|
+
## 36.9.2-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [7da790934]
|
|
8
|
+
- Updated dependencies [3f2da66e3]
|
|
9
|
+
- Updated dependencies [c13308624]
|
|
10
|
+
- Updated dependencies [7efd582cc]
|
|
11
|
+
- Updated dependencies [9cdaf2c08]
|
|
12
|
+
- Updated dependencies [f6f7cc515]
|
|
13
|
+
- Updated dependencies [6e34169a5]
|
|
14
|
+
- victory-core@36.9.2-next.1
|
|
15
|
+
- victory-bar@36.9.2-next.1
|
|
16
|
+
|
|
3
17
|
## 36.9.1
|
|
4
18
|
|
|
5
19
|
## 36.9.0
|
package/dist/victory-canvas.js
CHANGED
|
@@ -1731,53 +1731,6 @@ var isArray = Array.isArray;
|
|
|
1731
1731
|
module.exports = isArray;
|
|
1732
1732
|
|
|
1733
1733
|
|
|
1734
|
-
/***/ }),
|
|
1735
|
-
|
|
1736
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js":
|
|
1737
|
-
/*!************************************************************************************!*\
|
|
1738
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js ***!
|
|
1739
|
-
\************************************************************************************/
|
|
1740
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1741
|
-
|
|
1742
|
-
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"),
|
|
1743
|
-
isObject = __webpack_require__(/*! ./isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
1744
|
-
|
|
1745
|
-
/** `Object#toString` result references. */
|
|
1746
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1747
|
-
funcTag = '[object Function]',
|
|
1748
|
-
genTag = '[object GeneratorFunction]',
|
|
1749
|
-
proxyTag = '[object Proxy]';
|
|
1750
|
-
|
|
1751
|
-
/**
|
|
1752
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1753
|
-
*
|
|
1754
|
-
* @static
|
|
1755
|
-
* @memberOf _
|
|
1756
|
-
* @since 0.1.0
|
|
1757
|
-
* @category Lang
|
|
1758
|
-
* @param {*} value The value to check.
|
|
1759
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1760
|
-
* @example
|
|
1761
|
-
*
|
|
1762
|
-
* _.isFunction(_);
|
|
1763
|
-
* // => true
|
|
1764
|
-
*
|
|
1765
|
-
* _.isFunction(/abc/);
|
|
1766
|
-
* // => false
|
|
1767
|
-
*/
|
|
1768
|
-
function isFunction(value) {
|
|
1769
|
-
if (!isObject(value)) {
|
|
1770
|
-
return false;
|
|
1771
|
-
}
|
|
1772
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1773
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1774
|
-
var tag = baseGetTag(value);
|
|
1775
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
module.exports = isFunction;
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
1734
|
/***/ }),
|
|
1782
1735
|
|
|
1783
1736
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js":
|
|
@@ -1823,41 +1776,6 @@ function isLength(value) {
|
|
|
1823
1776
|
module.exports = isLength;
|
|
1824
1777
|
|
|
1825
1778
|
|
|
1826
|
-
/***/ }),
|
|
1827
|
-
|
|
1828
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNil.js":
|
|
1829
|
-
/*!*******************************************************************************!*\
|
|
1830
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isNil.js ***!
|
|
1831
|
-
\*******************************************************************************/
|
|
1832
|
-
/***/ ((module) => {
|
|
1833
|
-
|
|
1834
|
-
/**
|
|
1835
|
-
* Checks if `value` is `null` or `undefined`.
|
|
1836
|
-
*
|
|
1837
|
-
* @static
|
|
1838
|
-
* @memberOf _
|
|
1839
|
-
* @since 4.0.0
|
|
1840
|
-
* @category Lang
|
|
1841
|
-
* @param {*} value The value to check.
|
|
1842
|
-
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
1843
|
-
* @example
|
|
1844
|
-
*
|
|
1845
|
-
* _.isNil(null);
|
|
1846
|
-
* // => true
|
|
1847
|
-
*
|
|
1848
|
-
* _.isNil(void 0);
|
|
1849
|
-
* // => true
|
|
1850
|
-
*
|
|
1851
|
-
* _.isNil(NaN);
|
|
1852
|
-
* // => false
|
|
1853
|
-
*/
|
|
1854
|
-
function isNil(value) {
|
|
1855
|
-
return value == null;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
module.exports = isNil;
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
1779
|
/***/ }),
|
|
1862
1780
|
|
|
1863
1781
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js":
|
|
@@ -2038,22 +1956,6 @@ function stubFalse() {
|
|
|
2038
1956
|
module.exports = stubFalse;
|
|
2039
1957
|
|
|
2040
1958
|
|
|
2041
|
-
/***/ }),
|
|
2042
|
-
|
|
2043
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js":
|
|
2044
|
-
/*!******************************************************************************!*\
|
|
2045
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js ***!
|
|
2046
|
-
\******************************************************************************/
|
|
2047
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2048
|
-
|
|
2049
|
-
var overArg = __webpack_require__(/*! ./_overArg */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js");
|
|
2050
|
-
|
|
2051
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
2052
|
-
var nativeKeys = overArg(Object.keys, Object);
|
|
2053
|
-
|
|
2054
|
-
module.exports = nativeKeys;
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
1959
|
/***/ }),
|
|
2058
1960
|
|
|
2059
1961
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js":
|
|
@@ -2216,10 +2118,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2216
2118
|
/* harmony export */ });
|
|
2217
2119
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
2218
2120
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
2219
|
-
/* harmony import */ var
|
|
2220
|
-
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_1__);
|
|
2221
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
2222
|
-
|
|
2121
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
2223
2122
|
|
|
2224
2123
|
|
|
2225
2124
|
var DEFAULT_BAR_WIDTH = 8;
|
|
@@ -2229,7 +2128,7 @@ var getBarWidth = function (barWidth, props) {
|
|
|
2229
2128
|
style = props.style;
|
|
2230
2129
|
|
|
2231
2130
|
if (barWidth) {
|
|
2232
|
-
return
|
|
2131
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateProp(barWidth, props);
|
|
2233
2132
|
} else if (style.width) {
|
|
2234
2133
|
return style.width;
|
|
2235
2134
|
}
|
|
@@ -2251,10 +2150,10 @@ var getCornerRadiusFromObject = function (cornerRadius, props) {
|
|
|
2251
2150
|
};
|
|
2252
2151
|
|
|
2253
2152
|
var updateCornerRadius = function (corner, fallback) {
|
|
2254
|
-
if (!
|
|
2255
|
-
realCornerRadius[corner] =
|
|
2256
|
-
} else if (!
|
|
2257
|
-
realCornerRadius[corner] =
|
|
2153
|
+
if (!victory_core__WEBPACK_IMPORTED_MODULE_1__.isNil(cornerRadius[corner])) {
|
|
2154
|
+
realCornerRadius[corner] = victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateProp(cornerRadius[corner], props);
|
|
2155
|
+
} else if (!victory_core__WEBPACK_IMPORTED_MODULE_1__.isNil(cornerRadius[fallback])) {
|
|
2156
|
+
realCornerRadius[corner] = victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateProp(cornerRadius[fallback], props);
|
|
2258
2157
|
}
|
|
2259
2158
|
};
|
|
2260
2159
|
|
|
@@ -2285,8 +2184,8 @@ var getCornerRadius = function (cornerRadius, props) {
|
|
|
2285
2184
|
return getCornerRadiusFromObject(cornerRadius, props);
|
|
2286
2185
|
}
|
|
2287
2186
|
|
|
2288
|
-
realCornerRadius.topLeft =
|
|
2289
|
-
realCornerRadius.topRight =
|
|
2187
|
+
realCornerRadius.topLeft = victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateProp(cornerRadius, props);
|
|
2188
|
+
realCornerRadius.topRight = victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateProp(cornerRadius, props);
|
|
2290
2189
|
return realCornerRadius;
|
|
2291
2190
|
};
|
|
2292
2191
|
var getStyle = function () {
|
|
@@ -2302,7 +2201,7 @@ var getStyle = function () {
|
|
|
2302
2201
|
fill: "black",
|
|
2303
2202
|
stroke: stroke
|
|
2304
2203
|
};
|
|
2305
|
-
return
|
|
2204
|
+
return victory_core__WEBPACK_IMPORTED_MODULE_1__.evaluateStyle(Object.assign(baseStyle, style), props);
|
|
2306
2205
|
};
|
|
2307
2206
|
|
|
2308
2207
|
/***/ }),
|
|
@@ -2958,8 +2857,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2958
2857
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
2959
2858
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
2960
2859
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
2860
|
+
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
2961
2861
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
2862
|
+
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
2962
2863
|
/* harmony export */ "isTooltip": () => (/* binding */ isTooltip),
|
|
2864
|
+
/* harmony export */ "mapValues": () => (/* binding */ mapValues),
|
|
2963
2865
|
/* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
|
|
2964
2866
|
/* harmony export */ "omit": () => (/* binding */ omit),
|
|
2965
2867
|
/* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
|
|
@@ -2967,20 +2869,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2967
2869
|
/* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
|
|
2968
2870
|
/* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
|
|
2969
2871
|
/* harmony export */ });
|
|
2970
|
-
/* harmony import */ var
|
|
2971
|
-
/* harmony import */ var
|
|
2972
|
-
/* harmony import */ var
|
|
2973
|
-
/* harmony import */ var
|
|
2974
|
-
/* harmony import */ var
|
|
2975
|
-
/* harmony import */ var
|
|
2976
|
-
/* harmony import */ var
|
|
2977
|
-
/* harmony import */ var
|
|
2978
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
2979
|
-
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_4__);
|
|
2980
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
|
|
2981
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
|
|
2982
|
-
|
|
2983
|
-
|
|
2872
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
2873
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
2874
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
|
|
2875
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_1__);
|
|
2876
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
2877
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
2878
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
2879
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
2984
2880
|
|
|
2985
2881
|
|
|
2986
2882
|
|
|
@@ -3061,7 +2957,7 @@ function getPoint(datum) {
|
|
|
3061
2957
|
y: exists(_voronoiY) ? _voronoiY : defaultY,
|
|
3062
2958
|
y0: exists(_y0) ? _y0 : _y
|
|
3063
2959
|
};
|
|
3064
|
-
return
|
|
2960
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, point, datum);
|
|
3065
2961
|
}
|
|
3066
2962
|
function scalePoint(props, datum) {
|
|
3067
2963
|
var scale = props.scale,
|
|
@@ -3111,9 +3007,9 @@ function getDefaultStyles(props, role) {
|
|
|
3111
3007
|
|
|
3112
3008
|
var tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
3113
3009
|
|
|
3114
|
-
var labelStyle =
|
|
3010
|
+
var labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, tooltipStyle, defaultStyles.labels);
|
|
3115
3011
|
|
|
3116
|
-
return
|
|
3012
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, {
|
|
3117
3013
|
labels: labelStyle
|
|
3118
3014
|
}, defaultStyles);
|
|
3119
3015
|
}
|
|
@@ -3122,7 +3018,7 @@ function getStyles(style, defaultStyles) {
|
|
|
3122
3018
|
var height = "100%";
|
|
3123
3019
|
|
|
3124
3020
|
if (!style) {
|
|
3125
|
-
return
|
|
3021
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
3126
3022
|
parent: {
|
|
3127
3023
|
height: height,
|
|
3128
3024
|
width: width
|
|
@@ -3137,29 +3033,29 @@ function getStyles(style, defaultStyles) {
|
|
|
3137
3033
|
var defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
3138
3034
|
var defaultData = defaultStyles && defaultStyles.data || {};
|
|
3139
3035
|
return {
|
|
3140
|
-
parent:
|
|
3036
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parent, defaultParent, {
|
|
3141
3037
|
width: width,
|
|
3142
3038
|
height: height
|
|
3143
3039
|
}),
|
|
3144
|
-
labels:
|
|
3145
|
-
data:
|
|
3040
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, labels, defaultLabels),
|
|
3041
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, data, defaultData)
|
|
3146
3042
|
};
|
|
3147
3043
|
}
|
|
3148
3044
|
function evaluateProp(prop, props) {
|
|
3149
|
-
return
|
|
3045
|
+
return isFunction(prop) ? prop(props) : prop;
|
|
3150
3046
|
}
|
|
3151
3047
|
function evaluateStyle(style, props) {
|
|
3152
3048
|
if (props.disableInlineStyles) {
|
|
3153
3049
|
return {};
|
|
3154
3050
|
}
|
|
3155
3051
|
|
|
3156
|
-
if (!style || !
|
|
3157
|
-
return
|
|
3052
|
+
if (!style || !Object.keys(style).some(function (value) {
|
|
3053
|
+
return isFunction(style[value]);
|
|
3158
3054
|
})) {
|
|
3159
3055
|
return style;
|
|
3160
3056
|
}
|
|
3161
3057
|
|
|
3162
|
-
return
|
|
3058
|
+
return Object.keys(style).reduce(function (prev, curr) {
|
|
3163
3059
|
prev[curr] = evaluateProp(style[curr], props);
|
|
3164
3060
|
return prev;
|
|
3165
3061
|
}, {});
|
|
@@ -3208,10 +3104,30 @@ function getRange(props, axis) {
|
|
|
3208
3104
|
|
|
3209
3105
|
return props.polar ? getPolarRange(props, axis) : getCartesianRange(props, axis);
|
|
3210
3106
|
}
|
|
3107
|
+
/**
|
|
3108
|
+
* Checks if `value` is `null` or `undefined`.
|
|
3109
|
+
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
3110
|
+
*/
|
|
3111
|
+
|
|
3112
|
+
function isNil(value) {
|
|
3113
|
+
// eslint-disable-next-line eqeqeq
|
|
3114
|
+
return value == null;
|
|
3115
|
+
}
|
|
3116
|
+
/**
|
|
3117
|
+
* Checks if `value` is classified as a `Function` object.
|
|
3118
|
+
*
|
|
3119
|
+
* @since 0.1.0
|
|
3120
|
+
* @param {*} value The value to check.
|
|
3121
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
3122
|
+
*/
|
|
3123
|
+
|
|
3124
|
+
function isFunction(value) {
|
|
3125
|
+
return typeof value === "function";
|
|
3126
|
+
}
|
|
3211
3127
|
function createAccessor(key) {
|
|
3212
3128
|
// creates a data accessor function
|
|
3213
3129
|
// given a property key, path, array index, or null for identity.
|
|
3214
|
-
if (
|
|
3130
|
+
if (isFunction(key)) {
|
|
3215
3131
|
return key;
|
|
3216
3132
|
} else if (key === null || key === undefined) {
|
|
3217
3133
|
// null/undefined means "return the data item itself"
|
|
@@ -3221,7 +3137,7 @@ function createAccessor(key) {
|
|
|
3221
3137
|
} // otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
3222
3138
|
|
|
3223
3139
|
|
|
3224
|
-
return
|
|
3140
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_1___default()(key);
|
|
3225
3141
|
}
|
|
3226
3142
|
function modifyProps(props, fallbackProps, role) {
|
|
3227
3143
|
var theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -3230,7 +3146,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
3230
3146
|
var defaultObject = horizontal === undefined ? {} : {
|
|
3231
3147
|
horizontal: horizontal
|
|
3232
3148
|
};
|
|
3233
|
-
return
|
|
3149
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()(defaultObject, props, themeProps, fallbackProps);
|
|
3234
3150
|
}
|
|
3235
3151
|
/**
|
|
3236
3152
|
* Returns the given axis or the opposite axis when horizontal
|
|
@@ -3243,6 +3159,19 @@ function getCurrentAxis(axis, horizontal) {
|
|
|
3243
3159
|
var otherAxis = axis === "x" ? "y" : "x";
|
|
3244
3160
|
return horizontal ? otherAxis : axis;
|
|
3245
3161
|
}
|
|
3162
|
+
/**
|
|
3163
|
+
* Creates an object with the same keys as object and values generated by running
|
|
3164
|
+
* each own enumerable string keyed property of object through the function fn
|
|
3165
|
+
*/
|
|
3166
|
+
|
|
3167
|
+
function mapValues(values, fn) {
|
|
3168
|
+
if (values) {
|
|
3169
|
+
return Object.keys(values).reduce(function (acc, key) {
|
|
3170
|
+
acc[key] = fn(values[key]);
|
|
3171
|
+
return acc;
|
|
3172
|
+
}, {});
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3246
3175
|
/**
|
|
3247
3176
|
* Creates an array of numbers (positive and/or negative) progressing
|
|
3248
3177
|
* from start up to, but not including, end.
|
|
@@ -3304,10 +3233,10 @@ function reduceChildren(children, iteratee) {
|
|
|
3304
3233
|
var childName = child.props.name || "".concat(childRole, "-").concat(names[index]);
|
|
3305
3234
|
|
|
3306
3235
|
if (child.props && child.props.children) {
|
|
3307
|
-
var childProps = Object.assign({}, child.props,
|
|
3308
|
-
var nestedChildren = child.type && child.type.role === "stack" &&
|
|
3309
|
-
var nestedChildProps = Object.assign({}, c.props,
|
|
3310
|
-
return /*#__PURE__*/
|
|
3236
|
+
var childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(parentProps, sharedProps));
|
|
3237
|
+
var nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) : react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(child.props.children).map(function (c) {
|
|
3238
|
+
var nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(childProps, sharedProps));
|
|
3239
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(c, nestedChildProps);
|
|
3311
3240
|
});
|
|
3312
3241
|
|
|
3313
3242
|
var _childNames = nestedChildren.map(function (c, i) {
|
|
@@ -3328,7 +3257,7 @@ function reduceChildren(children, iteratee) {
|
|
|
3328
3257
|
}, initialMemo);
|
|
3329
3258
|
};
|
|
3330
3259
|
|
|
3331
|
-
var validChildren = children.filter(
|
|
3260
|
+
var validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_3__.isValidElement);
|
|
3332
3261
|
var childNames = validChildren.map(function (c, i) {
|
|
3333
3262
|
return i;
|
|
3334
3263
|
});
|
|
@@ -3353,11 +3282,11 @@ function isHorizontal(props) {
|
|
|
3353
3282
|
return memo || childProps.horizontal;
|
|
3354
3283
|
}
|
|
3355
3284
|
|
|
3356
|
-
return traverseChildren(
|
|
3285
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(childProps.children));
|
|
3357
3286
|
}, false);
|
|
3358
3287
|
};
|
|
3359
3288
|
|
|
3360
|
-
return traverseChildren(
|
|
3289
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(props.children));
|
|
3361
3290
|
}
|
|
3362
3291
|
|
|
3363
3292
|
/***/ }),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.VictoryCanvas=n(require("react")):t.VictoryCanvas=n(t.React)}(self,(t=>(()=>{var n={2596:(t,n,i)=>{var e=i(2373).Symbol;t.exports=e},6082:t=>{t.exports=function(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}},8644:t=>{t.exports=function(t,n){for(var i=-1,e=null==t?0:t.length,o=Array(e);++i<e;)o[i]=n(t[i],i,t);return o}},9559:t=>{t.exports=function(t,n){for(var i=-1,e=n.length,o=t.length;++i<e;)t[o+i]=n[i];return t}},4132:(t,n,i)=>{var e=i(8347),o=i(788),r=Object.prototype.hasOwnProperty;t.exports=function(t,n,i){var s=t[n];r.call(t,n)&&o(s,i)&&(void 0!==i||n in t)||e(t,n,i)}},8347:(t,n,i)=>{var e=i(5525);t.exports=function(t,n,i){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}},6457:(t,n,i)=>{var e=i(9559),o=i(3608);t.exports=function t(n,i,r,s,c){var a=-1,h=n.length;for(r||(r=o),c||(c=[]);++a<h;){var u=n[a];i>0&&r(u)?i>1?t(u,i-1,r,s,c):e(c,u):s||(c[c.length]=u)}return c}},4432:(t,n,i)=>{var e=i(9026),o=i(3110);t.exports=function(t,n){for(var i=0,r=(n=e(n,t)).length;null!=t&&i<r;)t=t[o(n[i++])];return i&&i==r?t:void 0}},563:t=>{var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},6776:t=>{t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:(t,n,i)=>{var e=i(6371),o=i(5066);t.exports=function(t,n){return e(t,n,(function(n,i){return o(t,i)}))}},6371:(t,n,i)=>{var e=i(4432),o=i(6539),r=i(9026);t.exports=function(t,n,i){for(var s=-1,c=n.length,a={};++s<c;){var h=n[s],u=e(t,h);i(u,h)&&o(a,r(h,t),u)}return a}},1600:t=>{t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:(t,n,i)=>{var e=i(4432);t.exports=function(t){return function(n){return e(n,t)}}},6317:(t,n,i)=>{var e=i(5346),o=i(4280),r=i(201);t.exports=function(t,n){return r(o(t,n,e),t+"")}},6539:(t,n,i)=>{var e=i(4132),o=i(9026),r=i(9099),s=i(7709),c=i(3110);t.exports=function(t,n,i,a){if(!s(t))return t;for(var h=-1,u=(n=o(n,t)).length,l=u-1,_=t;null!=_&&++h<u;){var f=c(n[h]),y=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(h!=l){var x=_[f];void 0===(y=a?a(x,f,_):void 0)&&(y=s(x)?x:r(n[h+1])?[]:{})}e(_,f,y),_=_[f]}return t}},6316:(t,n,i)=>{var e=i(2596),o=i(8644),r=i(163),s=i(1995),c=e?e.prototype:void 0,a=c?c.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(r(n))return o(n,t)+"";if(s(n))return a?a.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i}},9026:(t,n,i)=>{var e=i(163),o=i(726),r=i(7801),s=i(7010);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:r(s(t))}},5525:(t,n,i)=>{var e=i(3743),o=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:(t,n,i)=>{var e=i(2645),o=i(4280),r=i(201);t.exports=function(t){return r(o(t,void 0,e),t+"")}},2117:(t,n,i)=>{var e="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=e},3743:t=>{t.exports=function(t,n){return null==t?void 0:t[n]}},9817:(t,n,i)=>{var e=i(5125)(Object.getPrototypeOf,Object);t.exports=e},3096:(t,n,i)=>{var e=i(9026),o=i(5075),r=i(163),s=i(9099),c=i(8454),a=i(3110);t.exports=function(t,n,i){for(var h=-1,u=(n=e(n,t)).length,l=!1;++h<u;){var _=a(n[h]);if(!(l=null!=t&&i(t,_)))break;t=t[_]}return l||++h!=u?l:!!(u=null==t?0:t.length)&&c(u)&&s(_,u)&&(r(t)||o(t))}},3608:(t,n,i)=>{var e=i(2596),o=i(5075),r=i(163),s=e?e.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||o(t)||!!(s&&t&&t[s])}},9099:t=>{var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var e=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==e||"symbol"!=e&&n.test(t))&&t>-1&&t%1==0&&t<i}},8286:t=>{t.exports=function(){return!1}},726:(t,n,i)=>{var e=i(163),o=i(1995),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!o(t))||s.test(t)||!r.test(t)||null!=n&&t in Object(n)}},2453:t=>{t.exports=function(t){return t}},5125:t=>{t.exports=function(t,n){return function(i){return t(n(i))}}},4280:(t,n,i)=>{var e=i(6082),o=Math.max;t.exports=function(t,n,i){return n=o(void 0===n?t.length-1:n,0),function(){for(var r=arguments,s=-1,c=o(r.length-n,0),a=Array(c);++s<c;)a[s]=r[n+s];s=-1;for(var h=Array(n+1);++s<n;)h[s]=r[s];return h[n]=i(a),e(t,this,h)}}},2373:(t,n,i)=>{var e=i(2117),o="object"==typeof self&&self&&self.Object===Object&&self,r=e||o||Function("return this")();t.exports=r},201:t=>{t.exports=function(t){return t}},7801:(t,n,i)=>{var e=i(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,i,e,o){n.push(e?o.replace(r,"$1"):i||t)})),n}));t.exports=s},3110:(t,n,i)=>{var e=i(1995);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},1893:(t,n,i)=>{var e=i(6317),o=i(788),r=i(8286),s=i(8855),c=Object.prototype,a=c.hasOwnProperty,h=e((function(t,n){t=Object(t);var i=-1,e=n.length,h=e>2?n[2]:void 0;for(h&&r(n[0],n[1],h)&&(e=1);++i<e;)for(var u=n[i],l=s(u),_=-1,f=l.length;++_<f;){var y=l[_],x=t[y];(void 0===x||o(x,c[y])&&!a.call(t,y))&&(t[y]=u[y])}return t}));t.exports=h},788:t=>{t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:(t,n,i)=>{var e=i(6457);t.exports=function(t){return null!=t&&t.length?e(t,1):[]}},5066:(t,n,i)=>{var e=i(6776),o=i(3096);t.exports=function(t,n){return null!=t&&o(t,n,e)}},5346:t=>{t.exports=function(t){return t}},5075:t=>{t.exports=function(){return!1}},163:t=>{var n=Array.isArray;t.exports=n},9642:(t,n,i)=>{var e=i(563),o=i(7709);t.exports=function(t){if(!o(t))return!1;var n=e(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},8454:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},9555:t=>{t.exports=function(t){return null==t}},7709:t=>{t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},3474:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3849:(t,n,i)=>{var e=i(563),o=i(9817),r=i(3474),s=Function.prototype,c=Object.prototype,a=s.toString,h=c.hasOwnProperty,u=a.call(Object);t.exports=function(t){if(!r(t)||"[object Object]"!=e(t))return!1;var n=o(t);if(null===n)return!0;var i=h.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&a.call(i)==u}},1995:t=>{t.exports=function(){return!1}},7747:(t,n,i)=>{var e=i(5125)(Object.keys,Object);t.exports=e},8855:t=>{t.exports=function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}},9082:(t,n,i)=>{var e=i(5436),o=i(5557)((function(t,n){return null==t?{}:e(t,n)}));t.exports=o},8532:(t,n,i)=>{var e=i(1600),o=i(3301),r=i(726),s=i(3110);t.exports=function(t){return r(t)?e(s(t)):o(t)}},7010:(t,n,i)=>{var e=i(6316);t.exports=function(t){return null==t?"":e(t)}},9787:n=>{"use strict";n.exports=t}},i={};function e(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,e),r.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";e.r(o),e.d(o,{CanvasBar:()=>rt,CanvasCurve:()=>mi,CanvasGroup:()=>st,CanvasPoint:()=>Ci,useCanvasContext:()=>et});var t={};e.r(t),e.d(t,{arc:()=>B,area:()=>yt,areaRadial:()=>wt,curveBasis:()=>yn,curveBasisClosed:()=>pn,curveBasisOpen:()=>dn,curveBumpX:()=>St,curveBumpY:()=>Pt,curveBundle:()=>gn,curveCardinal:()=>wn,curveCardinalClosed:()=>kn,curveCardinalOpen:()=>Sn,curveCatmullRom:()=>jn,curveCatmullRomClosed:()=>Rn,curveCatmullRomOpen:()=>Nn,curveLinear:()=>ut,curveLinearClosed:()=>zn,curveMonotoneX:()=>Fn,curveMonotoneY:()=>Zn,curveNatural:()=>Gn,curveStep:()=>Hn,curveStepAfter:()=>Jn,curveStepBefore:()=>Qn,line:()=>ft,lineRadial:()=>Tt,link:()=>Rt,linkHorizontal:()=>Et,linkRadial:()=>Lt,linkVertical:()=>Nt,pie:()=>vt,pointRadial:()=>Mt,radialArea:()=>wt,radialLine:()=>Tt,stack:()=>ei,stackOffsetDiverging:()=>ri,stackOffsetExpand:()=>oi,stackOffsetNone:()=>Kn,stackOffsetSilhouette:()=>si,stackOffsetWiggle:()=>ci,stackOrderAppearance:()=>ai,stackOrderAscending:()=>ui,stackOrderDescending:()=>_i,stackOrderInsideOut:()=>fi,stackOrderNone:()=>ti,stackOrderReverse:()=>yi,symbol:()=>un,symbolAsterisk:()=>qt,symbolCircle:()=>It,symbolCross:()=>Dt,symbolDiamond:()=>Yt,symbolDiamond2:()=>Bt,symbolPlus:()=>Ft,symbolSquare:()=>Zt,symbolSquare2:()=>$t,symbolStar:()=>Ht,symbolTriangle:()=>Jt,symbolTriangle2:()=>tn,symbolWye:()=>sn,symbolX:()=>cn,symbols:()=>an,symbolsFill:()=>an,symbolsStroke:()=>hn});var n=e(9787),i=e.n(n),r=e(3849),s=e.n(r),c=e(9555),a=e.n(c),h=e(7747),u=e.n(h),l=(e(9082),e(8532),e(9642)),_=e.n(l);function f(t,n){return _()(t)?t(n):t}function y(t,n){return n.disableInlineStyles?{}:t&&u()(t).some((function(n){return _()(t[n])}))?u()(t).reduce((function(i,e){return i[e]=f(t[e],n),i}),{}):t}e(1893);const x=Math.PI,p=2*x,v=1e-6,d=p-v;function b(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function g(){return new b}b.prototype=g.prototype={constructor:b,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+e)},bezierCurveTo:function(t,n,i,e,o,r){this._+="C"+ +t+","+ +n+","+ +i+","+ +e+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,i,e,o){t=+t,n=+n,i=+i,e=+e,o=+o;var r=this._x1,s=this._y1,c=i-t,a=e-n,h=r-t,u=s-n,l=h*h+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>v)if(Math.abs(u*c-a*h)>v&&o){var _=i-r,f=e-s,y=c*c+a*a,p=_*_+f*f,d=Math.sqrt(y),b=Math.sqrt(l),g=o*Math.tan((x-Math.acos((y+l-p)/(2*d*b)))/2),m=g/b,T=g/d;Math.abs(m-1)>v&&(this._+="L"+(t+m*h)+","+(n+m*u)),this._+="A"+o+","+o+",0,0,"+ +(u*_>h*f)+","+(this._x1=t+T*c)+","+(this._y1=n+T*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,i,e,o,r){t=+t,n=+n,r=!!r;var s=(i=+i)*Math.cos(e),c=i*Math.sin(e),a=t+s,h=n+c,u=1^r,l=r?e-o:o-e;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+a+","+h:(Math.abs(this._x1-a)>v||Math.abs(this._y1-h)>v)&&(this._+="L"+a+","+h),i&&(l<0&&(l=l%p+p),l>d?this._+="A"+i+","+i+",0,1,"+u+","+(t-s)+","+(n-c)+"A"+i+","+i+",0,1,"+u+","+(this._x1=a)+","+(this._y1=h):l>v&&(this._+="A"+i+","+i+",0,"+ +(l>=x)+","+u+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=n+i*Math.sin(o))))},rect:function(t,n,i,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +e+"h"+-i+"Z"},toString:function(){return this._}};const m=g;function T(t){return function(){return t}}const w=Math.abs,M=Math.atan2,k=Math.cos,O=Math.max,S=Math.min,P=Math.sin,A=Math.sqrt,j=1e-12,C=Math.PI,R=C/2,E=2*C;function N(t){return t>1?0:t<-1?C:Math.acos(t)}function L(t){return t>=1?R:t<=-1?-R:Math.asin(t)}function z(t){return t.innerRadius}function q(t){return t.outerRadius}function I(t){return t.startAngle}function D(t){return t.endAngle}function W(t){return t&&t.padAngle}function X(t,n,i,e,o,r,s,c){var a=i-t,h=e-n,u=s-o,l=c-r,_=l*a-u*h;if(!(_*_<j))return[t+(_=(u*(n-r)-l*(t-o))/_)*a,n+_*h]}function Y(t,n,i,e,o,r,s){var c=t-i,a=n-e,h=(s?r:-r)/A(c*c+a*a),u=h*a,l=-h*c,_=t+u,f=n+l,y=i+u,x=e+l,p=(_+y)/2,v=(f+x)/2,d=y-_,b=x-f,g=d*d+b*b,m=o-r,T=_*x-y*f,w=(b<0?-1:1)*A(O(0,m*m*g-T*T)),M=(T*b-d*w)/g,k=(-T*d-b*w)/g,S=(T*b+d*w)/g,P=(-T*d+b*w)/g,j=M-p,C=k-v,R=S-p,E=P-v;return j*j+C*C>R*R+E*E&&(M=S,k=P),{cx:M,cy:k,x01:-u,y01:-l,x11:M*(o/m-1),y11:k*(o/m-1)}}function B(){var t=z,n=q,i=T(0),e=null,o=I,r=D,s=W,c=null;function a(){var a,h,u=+t.apply(this,arguments),l=+n.apply(this,arguments),_=o.apply(this,arguments)-R,f=r.apply(this,arguments)-R,y=w(f-_),x=f>_;if(c||(c=a=m()),l<u&&(h=l,l=u,u=h),l>j)if(y>E-j)c.moveTo(l*k(_),l*P(_)),c.arc(0,0,l,_,f,!x),u>j&&(c.moveTo(u*k(f),u*P(f)),c.arc(0,0,u,f,_,x));else{var p,v,d=_,b=f,g=_,T=f,O=y,z=y,q=s.apply(this,arguments)/2,I=q>j&&(e?+e.apply(this,arguments):A(u*u+l*l)),D=S(w(l-u)/2,+i.apply(this,arguments)),W=D,B=D;if(I>j){var F=L(I/u*P(q)),Z=L(I/l*P(q));(O-=2*F)>j?(g+=F*=x?1:-1,T-=F):(O=0,g=T=(_+f)/2),(z-=2*Z)>j?(d+=Z*=x?1:-1,b-=Z):(z=0,d=b=(_+f)/2)}var $=l*k(d),V=l*P(d),G=u*k(T),U=u*P(T);if(D>j){var H,Q=l*k(b),J=l*P(b),K=u*k(g),tt=u*P(g);if(y<C&&(H=X($,V,K,tt,Q,J,G,U))){var nt=$-H[0],it=V-H[1],et=Q-H[0],ot=J-H[1],rt=1/P(N((nt*et+it*ot)/(A(nt*nt+it*it)*A(et*et+ot*ot)))/2),st=A(H[0]*H[0]+H[1]*H[1]);W=S(D,(u-st)/(rt-1)),B=S(D,(l-st)/(rt+1))}}z>j?B>j?(p=Y(K,tt,$,V,l,B,x),v=Y(Q,J,G,U,l,B,x),c.moveTo(p.cx+p.x01,p.cy+p.y01),B<D?c.arc(p.cx,p.cy,B,M(p.y01,p.x01),M(v.y01,v.x01),!x):(c.arc(p.cx,p.cy,B,M(p.y01,p.x01),M(p.y11,p.x11),!x),c.arc(0,0,l,M(p.cy+p.y11,p.cx+p.x11),M(v.cy+v.y11,v.cx+v.x11),!x),c.arc(v.cx,v.cy,B,M(v.y11,v.x11),M(v.y01,v.x01),!x))):(c.moveTo($,V),c.arc(0,0,l,d,b,!x)):c.moveTo($,V),u>j&&O>j?W>j?(p=Y(G,U,Q,J,u,-W,x),v=Y($,V,K,tt,u,-W,x),c.lineTo(p.cx+p.x01,p.cy+p.y01),W<D?c.arc(p.cx,p.cy,W,M(p.y01,p.x01),M(v.y01,v.x01),!x):(c.arc(p.cx,p.cy,W,M(p.y01,p.x01),M(p.y11,p.x11),!x),c.arc(0,0,u,M(p.cy+p.y11,p.cx+p.x11),M(v.cy+v.y11,v.cx+v.x11),x),c.arc(v.cx,v.cy,W,M(v.y11,v.x11),M(v.y01,v.x01),!x))):c.arc(0,0,u,T,g,x):c.lineTo(G,U)}else c.moveTo(0,0);if(c.closePath(),a)return c=null,a+""||null}return a.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-C/2;return[k(e)*i,P(e)*i]},a.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:T(+n),a):t},a.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:T(+t),a):n},a.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:T(+t),a):i},a.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:T(+t),a):e},a.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:T(+t),a):o},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:T(+t),a):r},a.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:T(+t),a):s},a.context=function(t){return arguments.length?(c=null==t?null:t,a):c},a}var F=function(t,n){return{x:t,y:n,distance:function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},add:function(t){return F(this.x+t.x,this.y+t.y)},subtract:function(t){return F(this.x-t.x,this.y-t.y)},scalarMult:function(t){return F(this.x*t,this.y*t)},scalarDivide:function(t){if(0===t)throw new Error("Division by 0 error");return F(this.x/t,this.y/t)},equals:function(t){return this.x===t.x&&this.y===t.y}}},Z=function(t,n){return{center:t,radius:n,hasIntersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);return!(r>e+o||r<Math.abs(e-o))},equals:function(t){var n=this.center,i=t.center;return this.radius===t.radius&&n.equals(i)},intersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);if(!this.hasIntersection(t)||this.equals(t))return[];var s=(Math.pow(e,2)-Math.pow(o,2)+Math.pow(r,2))/(2*r),c=Math.sqrt(Math.pow(e,2)-Math.pow(s,2)),a=n.add(i.subtract(n).scalarMult(s).scalarDivide(r)),h=n.x,u=n.y,l=i.x,_=i.y,f=a.x,y=a.y,x=[F(f-c*(_-u)/r,y+c*(l-h)/r),F(f+c*(_-u)/r,y-c*(l-h)/r)];return x.sort((function(t,n){return t.x-n.x})),x},solveX:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.y,2));return[this.center.x-n,this.center.x+n]},solveY:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.x,2));return[this.center.y-n,this.center.y+n]}}};function $(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function V(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){G(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function G(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function U(t){return function(t){if(Array.isArray(t))return H(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return H(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?H(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}var Q=function(t,n){var i=t.x,e=t.x0,o=t.y,r=t.y0,s=t.horizontal,c=t.alignment||"middle",a="middle"===c?n/2:n,h=s?-1:1;return s?{x0:e,x1:i,y0:"start"===c?o:o-h*a,y1:"end"===c?o:o+h*a}:{x0:"start"===c?i:i-h*a,x1:"end"===c?i:i+h*a,y0:r,y1:o}},J=function(t,n){var i=t.data,e=t.scale,o=void 0===i[n]._x1?"_x":"_x1";return e.x(i[n][o])},K=function(t){return-1*t+Math.PI/2},tt=function(t,n,i){var e="".concat(n.topLeft," ").concat(n.topLeft," ").concat(i),o="".concat(n.topRight," ").concat(n.topRight," ").concat(i),r="".concat(n.bottomLeft," ").concat(n.bottomLeft," ").concat(i),s="".concat(n.bottomRight," ").concat(n.bottomRight," ").concat(i),c=["M","A ".concat(r,","),"L","A ".concat(e,","),"L","A ".concat(o,","),"L","A ".concat(s,",")].reduce((function(n,i,e){return"".concat(n).concat(i," ").concat(t[e].x,", ").concat(t[e].y," \n")}),"");return"".concat(c," z")},nt=function(t,n,i){return t.getPath?function(t,n){var i=t.getPath;if("function"==typeof i)return i(V(V({},t),Q(t,n)))}(t,n):t.horizontal?function(t,n,i){var e=Q(t,n),o=e.x0<e.x1?1:-1,r={topRight:o>0?i.topLeft:i.bottomLeft,bottomRight:o>0?i.topRight:i.bottomRight,bottomLeft:o>0?i.bottomRight:i.topRight,topLeft:o>0?i.bottomLeft:i.topLeft},s=function(t,n,i){var e=t.y0,o=t.y1,r=t.x0<t.x1?t.x0:t.x1,s=t.x0<t.x1?t.x1:t.x0,c=function(t){var c="top"===t,a=c?-1:1,h=c?o:e,u={x:r,y:h-a*i["".concat(t,"Left")]},l={x:r+i["".concat(t,"Left")],y:h},_={x:s-i["".concat(t,"Right")],y:h},f={x:s,y:h-a*i["".concat(t,"Right")]};if(l.x>_.x){var y=F(r+i["".concat(t,"Left")],h-a*i["".concat(t,"Left")]),x=Z(y,i["".concat(t,"Left")]),p=F(s-i["".concat(t,"Right")],h-a*i["".concat(t,"Right")]),v=Z(p,i["".concat(t,"Right")]),d=x.intersection(v);if(d.length>0){var b=d[n>0?1:0];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["".concat(t,"Right")]>i["".concat(t,"Left")]){var g=v.solveY(r)[c?0:1];u={x:r,y:g},l={x:r,y:g},_={x:r,y:g}}else{var m=x.solveY(s)[c?0:1];f={x:s,y:m},_={x:s,y:m},l={x:s,y:m}}}return[u,l,_,f]},a=c("top"),h=c("bottom");return[h[1],h[0]].concat(U(a),[h[3],h[2]])}(e,o,r);return tt(s,r,"0 0 1")}(t,n,i):function(t,n,i){var e=Q(t,n),o=e.y0>e.y1?1:-1,r=o>0?"0 0 1":"0 0 0",s=function(t,n,i){var e=t.x0,o=t.x1,r=t.y0,s=t.y1,c=function(t){var c="Left"===t,a=c?1:-1,h=c?e:o,u={x:h+a*i["bottom".concat(t)],y:r},l={x:h,y:r-n*i["bottom".concat(t)]},_={x:h,y:s+n*i["top".concat(t)]},f={x:h+a*i["top".concat(t)],y:s};if(1===n?r-i["bottom".concat(t)]<s+i["top".concat(t)]:r+i["bottom".concat(t)]>s-i["top".concat(t)]){var y=F(h+a*i["top".concat(t)],s+n*i["top".concat(t)]),x=Z(y,i["top".concat(t)]),p=F(h+a*i["bottom".concat(t)],r-n*i["bottom".concat(t)]),v=Z(p,i["bottom".concat(t)]),d=x.intersection(v);if(d.length>0){var b=d[c?0:1];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["top".concat(t)]>i["bottom".concat(t)]){var g=x.solveX(r)[c?0:1];u={x:g,y:r},l={x:g,y:r},_={x:g,y:r}}else{var m=v.solveX(s)[c?0:1];l={x:m,y:s},_={x:m,y:s},f={x:m,y:s}}}var T=[u,l,_,f];return c?T:T.reverse()};return c("Left").concat(c("Right"))}(e,o,i);return tt(s,i,r)}(t,n,i)},it=i().createContext(void 0),et=function(){var t=i().useContext(it);if(!t)throw new Error("This component must be wrapped in a CanvasContext.Provider component.\n Try setting groupComponent={<CanvasGroup />} in your chart component.");return t},ot=function(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(n.disableInlineStyles)return{};var i={fill:"black",stroke:t.fill||"black"};return y(Object.assign(i,t),n)}(t.style,t),i=function(t,n){var i=n.scale,e=n.data,o=n.style;if(t)return f(t,n);if(o.width)return o.width;var r=i.x.range(),s=Math.abs(r[1]-r[0]),c=e.length+2,a=(n.barRatio||.5)*(e.length<2?8:s/c);return Math.max(1,a)}(t.barWidth,Object.assign({},t,{style:n})),e=function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0};return t?function(t){return s()(t)}(t)?function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},e=function(e,o){a()(t[e])?a()(t[o])||(i[e]=f(t[o],n)):i[e]=f(t[e],n)};return e("topLeft","top"),e("topRight","top"),e("bottomLeft","bottom"),e("bottomRight","bottom"),i}(t,n):(i.topLeft=f(t,n),i.topRight=f(t,n),i):i}(t.cornerRadius,Object.assign({},t,{style:n,barWidth:i}));return Object.assign({},t,{style:n,barWidth:i,cornerRadius:e})},rt=function(t){var n,e,o=et().canvasRef,r=ot(t),s=r.polar,c=r.style,a=r.barWidth,h=r.cornerRadius,u=r.origin,l=i().useMemo((function(){var t=s?function(t,n){return function(t,n){var i,e,o=t.datum,r=t.scale,s=t.index,c=t.alignment,a=t.style,h=r.y(o._y0||0),u=r.y(void 0!==o._y1?o._y1:o._y),l=r.x(void 0!==o._x1?o._x1:o._x);if(a.width){var _=function(t,n){var i=t.scale,e=i.y.range(),o=Math.max.apply(Math,U(e)),r=Math.abs(i.x.range()[1]-i.x.range()[0]);return n/(2*Math.PI*o)*r}(t,a.width),f="middle"===c?_/2:_;i="start"===c?l:l-f,e="end"===c?l:l+f}else i=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=J(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=0===n?J(t,i.length-1)-2*Math.PI:J(t,n-1);return 0===n&&s<2*Math.PI?e.x.range()[0]:"start"===o||"end"===o?"start"===o?c:r:(r+c)/2}(t,Number(s)),e=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=J(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=e.x.range()[1]===2*Math.PI?J(t,0)+2*Math.PI:e.x.range()[1],a=n===i.length-1?J(t,0)+2*Math.PI:J(t,n+1);return n===i.length-1&&s<2*Math.PI?c:"start"===o||"end"===o?"start"===o?r:a:(r+a)/2}(t,Number(s));var y=function(t){return B().innerRadius(h).outerRadius(u).startAngle(K(i)).endAngle(K(e)).cornerRadius(n[t])()},x=function(t){var n=y("".concat(t,"Right")),i=n.match(/[A-Z]/g)||[],e=n.split(/[A-Z]/).slice(1),o=i.indexOf("L"),r=y("".concat(t,"Left")),s=r.match(/[A-Z]/g)||[],c=r.split(/[A-Z]/).slice(1),a=s.indexOf("L");return{rightMoves:i,rightCoords:e,rightMiddle:o,leftMoves:s,leftCoords:c,leftMiddle:a}},p=function(){var t,o,r=n.topRight,s=n.topLeft,c=u*Math.abs(e-i),a=x("top"),h=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,p=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?h:f,o=r>s?l:y;else{var v,d=function(t){return t<3},b=s>r&&d(_)?1:2;if(r>s){var g=d(_)?p:p-2;v=d(p)?p-1:g}else{var m=d(p)?1:2;v=d(_)?m:p-2}t=[].concat(U(h.slice(0,b)),U(f.slice(v))),o=[].concat(U(l.slice(0,b)),U(y.slice(v)))}var T=t.indexOf("L"),w=t.slice(0,T),M=o.slice(0,T);return w.map((function(t,n){return{command:t,coords:M[n].split(",")}}))}(),v=function(){var t,o,r=n.bottomRight,s=n.bottomLeft,c=h*Math.abs(e-i),a=x("bottom"),u=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,p=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?u:f,o=r>s?l:y;else{var v=function(t,n){return t.length-n<4},d=(r>s?v(u,_):v(f,p))?-1:-3;t=[].concat(U(f.slice(0,p+2)),U(u.slice(d))),o=[].concat(U(y.slice(0,p+2)),U(l.slice(d)))}var b=t.indexOf("L"),g=t.slice(b,-1),m=o.slice(b,-1);return g.map((function(t,n){return{command:t,coords:m[n].split(",")}}))}(),d=[].concat(U(p),U(v)).reduce((function(t,n){return"".concat(t).concat(n.command," ").concat(n.coords.join())}),"");return"".concat(d," z")}(t,n)}(r,h):nt(r,a,h);return new Path2D(t)}),[s,a,h,r]),_=(n=l,e=i().useRef(),i().useEffect((function(){e.current=n})),e.current),f=i().useCallback((function(t,n){t.fillStyle=c.fill,t.strokeStyle=c.stroke,t.globalAlpha=c.fillOpacity,t.lineWidth=c.strokeWidth,s&&t.translate((null==u?void 0:u.x)||0,(null==u?void 0:u.y)||0),t.fill(n),t.setTransform(1,0,0,1,0,0)}),[c,u,s]),y=i().useCallback((function(t){if(_){t.save();var n=c.strokeWidth||0;t.lineWidth=n+2,t.globalCompositeOperation="destination-out",f(t,_),t.stroke(_),t.restore()}}),[f,_,c]);return i().useEffect((function(){var t,n=null===(t=o.current)||void 0===t?void 0:t.getContext("2d");n&&(y(n),f(n,l))}),[o,f,s,a,h,r,l,y]),null},st=function(t){var n=i().useRef(null),e=t.children,o=t.width,r=void 0===o?0:o,s=t.height,c=void 0===s?0:s,a=t.clipWidth,h=t.padding,u=i().useCallback((function(t){return t.clearRect(0,0,r,c)}),[r,c]),l=i().useCallback((function(t){var n="number"==typeof h?h:(null==h?void 0:h.right)||0,i="number"==typeof h?h:(null==h?void 0:h.left)||0,e=r-n-i;t.clearRect(r-n,0,a?-1*(e-a):0,c)}),[r,c,h,a]);return i().createElement(it.Provider,{value:{canvasRef:n,clear:u,clip:l}},i().createElement("foreignObject",{width:r,height:c,x:0,y:0},i().createElement("canvas",{width:r,height:c,ref:n})),e)};st.role="container";var ct=Array.prototype.slice;function at(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ht(t){this._context=t}function ut(t){return new ht(t)}function lt(t){return t[0]}function _t(t){return t[1]}function ft(t,n){var i=T(!0),e=null,o=ut,r=null;function s(s){var c,a,h,u=(s=at(s)).length,l=!1;for(null==e&&(r=o(h=m())),c=0;c<=u;++c)!(c<u&&i(a=s[c],c,s))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(a,c,s),+n(a,c,s));if(h)return r=null,h+""||null}return t="function"==typeof t?t:void 0===t?lt:T(t),n="function"==typeof n?n:void 0===n?_t:T(n),s.x=function(n){return arguments.length?(t="function"==typeof n?n:T(+n),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:T(+t),s):n},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:T(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=e&&(r=o(e)),s):o},s.context=function(t){return arguments.length?(null==t?e=r=null:r=o(e=t),s):e},s}function yt(t,n,i){var e=null,o=T(!0),r=null,s=ut,c=null;function a(a){var h,u,l,_,f,y=(a=at(a)).length,x=!1,p=new Array(y),v=new Array(y);for(null==r&&(c=s(f=m())),h=0;h<=y;++h){if(!(h<y&&o(_=a[h],h,a))===x)if(x=!x)u=h,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),l=h-1;l>=u;--l)c.point(p[l],v[l]);c.lineEnd(),c.areaEnd()}x&&(p[h]=+t(_,h,a),v[h]=+n(_,h,a),c.point(e?+e(_,h,a):p[h],i?+i(_,h,a):v[h]))}if(f)return c=null,f+""||null}function h(){return ft().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?lt:T(+t),n="function"==typeof n?n:T(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?_t:T(+i),a.x=function(n){return arguments.length?(t="function"==typeof n?n:T(+n),e=null,a):t},a.x0=function(n){return arguments.length?(t="function"==typeof n?n:T(+n),a):t},a.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:T(+t),a):e},a.y=function(t){return arguments.length?(n="function"==typeof t?t:T(+t),i=null,a):n},a.y0=function(t){return arguments.length?(n="function"==typeof t?t:T(+t),a):n},a.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:T(+t),a):i},a.lineX0=a.lineY0=function(){return h().x(t).y(n)},a.lineY1=function(){return h().x(t).y(i)},a.lineX1=function(){return h().x(e).y(n)},a.defined=function(t){return arguments.length?(o="function"==typeof t?t:T(!!t),a):o},a.curve=function(t){return arguments.length?(s=t,null!=r&&(c=s(r)),a):s},a.context=function(t){return arguments.length?(null==t?r=c=null:c=s(r=t),a):r},a}function xt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function pt(t){return t}function vt(){var t=pt,n=xt,i=null,e=T(0),o=T(E),r=T(0);function s(s){var c,a,h,u,l,_=(s=at(s)).length,f=0,y=new Array(_),x=new Array(_),p=+e.apply(this,arguments),v=Math.min(E,Math.max(-E,o.apply(this,arguments)-p)),d=Math.min(Math.abs(v)/_,r.apply(this,arguments)),b=d*(v<0?-1:1);for(c=0;c<_;++c)(l=x[y[c]=c]=+t(s[c],c,s))>0&&(f+=l);for(null!=n?y.sort((function(t,i){return n(x[t],x[i])})):null!=i&&y.sort((function(t,n){return i(s[t],s[n])})),c=0,h=f?(v-_*b)/f:0;c<_;++c,p=u)a=y[c],u=p+((l=x[a])>0?l*h:0)+b,x[a]={data:s[a],index:c,value:l,startAngle:p,endAngle:u,padAngle:d};return x}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:T(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,i=null,s):n},s.sort=function(t){return arguments.length?(i=t,n=null,s):i},s.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:T(+t),s):e},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:T(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:T(+t),s):r},s}ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var dt=gt(ut);function bt(t){this._curve=t}function gt(t){function n(n){return new bt(t(n))}return n._curve=t,n}function mt(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(gt(t)):n()._curve},t}function Tt(){return mt(ft().curve(dt))}function wt(){var t=yt().curve(dt),n=t.curve,i=t.lineX0,e=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return mt(i())},delete t.lineX0,t.lineEndAngle=function(){return mt(e())},delete t.lineX1,t.lineInnerRadius=function(){return mt(o())},delete t.lineY0,t.lineOuterRadius=function(){return mt(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(gt(t)):n()._curve},t}function Mt(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}bt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class kt{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class Ot{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const i=Mt(this._x0,this._y0),e=Mt(this._x0,this._y0=(this._y0+n)/2),o=Mt(t,this._y0),r=Mt(t,n);this._context.moveTo(...i),this._context.bezierCurveTo(...e,...o,...r)}}}function St(t){return new kt(t,!0)}function Pt(t){return new kt(t,!1)}function At(t){return new Ot(t)}function jt(t){return t.source}function Ct(t){return t.target}function Rt(t){let n=jt,i=Ct,e=lt,o=_t,r=null,s=null;function c(){let c;const a=ct.call(arguments),h=n.apply(this,a),u=i.apply(this,a);if(null==r&&(s=t(c=m())),s.lineStart(),a[0]=h,s.point(+e.apply(this,a),+o.apply(this,a)),a[0]=u,s.point(+e.apply(this,a),+o.apply(this,a)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(i=t,c):i},c.x=function(t){return arguments.length?(e="function"==typeof t?t:T(+t),c):e},c.y=function(t){return arguments.length?(o="function"==typeof t?t:T(+t),c):o},c.context=function(n){return arguments.length?(null==n?r=s=null:s=t(r=n),c):r},c}function Et(){return Rt(St)}function Nt(){return Rt(Pt)}function Lt(){const t=Rt(At);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const zt=A(3),qt={draw(t,n){const i=.59436*A(n+S(n/28,.75)),e=i/2,o=e*zt;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-o,-e),t.lineTo(o,e),t.moveTo(-o,e),t.lineTo(o,-e)}},It={draw(t,n){const i=A(n/C);t.moveTo(i,0),t.arc(0,0,i,0,E)}},Dt={draw(t,n){const i=A(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}},Wt=A(1/3),Xt=2*Wt,Yt={draw(t,n){const i=A(n/Xt),e=i*Wt;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Bt={draw(t,n){const i=.62625*A(n);t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Ft={draw(t,n){const i=.87559*A(n-S(n/7,2));t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},Zt={draw(t,n){const i=A(n),e=-i/2;t.rect(e,e,i,i)}},$t={draw(t,n){const i=.4431*A(n);t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}},Vt=P(C/10)/P(7*C/10),Gt=P(E/10)*Vt,Ut=-k(E/10)*Vt,Ht={draw(t,n){const i=A(.8908130915292852*n),e=Gt*i,o=Ut*i;t.moveTo(0,-i),t.lineTo(e,o);for(let n=1;n<5;++n){const r=E*n/5,s=k(r),c=P(r);t.lineTo(c*i,-s*i),t.lineTo(s*e-c*o,c*e+s*o)}t.closePath()}},Qt=A(3),Jt={draw(t,n){const i=-A(n/(3*Qt));t.moveTo(0,2*i),t.lineTo(-Qt*i,-i),t.lineTo(Qt*i,-i),t.closePath()}},Kt=A(3),tn={draw(t,n){const i=.6824*A(n),e=i/2,o=i*Kt/2;t.moveTo(0,-i),t.lineTo(o,e),t.lineTo(-o,e),t.closePath()}},nn=-.5,en=A(3)/2,on=1/A(12),rn=3*(on/2+1),sn={draw(t,n){const i=A(n/rn),e=i/2,o=i*on,r=e,s=i*on+i,c=-r,a=s;t.moveTo(e,o),t.lineTo(r,s),t.lineTo(c,a),t.lineTo(nn*e-en*o,en*e+nn*o),t.lineTo(nn*r-en*s,en*r+nn*s),t.lineTo(nn*c-en*a,en*c+nn*a),t.lineTo(nn*e+en*o,nn*o-en*e),t.lineTo(nn*r+en*s,nn*s-en*r),t.lineTo(nn*c+en*a,nn*a-en*c),t.closePath()}},cn={draw(t,n){const i=.6189*A(n-S(n/6,1.7));t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}},an=[It,Dt,Yt,Zt,Ht,Jt,sn],hn=[It,Ft,cn,tn,qt,$t,Bt];function un(t,n){let i=null;function e(){let e;if(i||(i=e=m()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:T(t||It),n="function"==typeof n?n:T(void 0===n?64:+n),e.type=function(n){return arguments.length?(t="function"==typeof n?n:T(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:T(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e}function ln(){}function _n(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function fn(t){this._context=t}function yn(t){return new fn(t)}function xn(t){this._context=t}function pn(t){return new xn(t)}function vn(t){this._context=t}function dn(t){return new vn(t)}function bn(t,n){this._basis=new fn(t),this._beta=n}fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_n(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_n(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},xn.prototype={areaStart:ln,areaEnd:ln,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:_n(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},vn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:_n(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},bn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,o=t[0],r=n[0],s=t[i]-o,c=n[i]-r,a=-1;++a<=i;)e=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(o+e*s),this._beta*n[a]+(1-this._beta)*(r+e*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const gn=function t(n){function i(t){return 1===n?new fn(t):new bn(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function mn(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Tn(t,n){this._context=t,this._k=(1-n)/6}Tn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mn(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:mn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const wn=function t(n){function i(t){return new Tn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Mn(t,n){this._context=t,this._k=(1-n)/6}Mn.prototype={areaStart:ln,areaEnd:ln,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:mn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const kn=function t(n){function i(t){return new Mn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function On(t,n){this._context=t,this._k=(1-n)/6}On.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:mn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Sn=function t(n){function i(t){return new On(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Pn(t,n,i){var e=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>j){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,o=(o*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>j){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*h+t._x1*t._l23_2a-n*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/u}t._context.bezierCurveTo(e,o,r,s,t._x2,t._y2)}function An(t,n){this._context=t,this._alpha=n}An.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Pn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const jn=function t(n){function i(t){return n?new An(t,n):new Tn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Cn(t,n){this._context=t,this._alpha=n}Cn.prototype={areaStart:ln,areaEnd:ln,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Pn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Rn=function t(n){function i(t){return n?new Cn(t,n):new Mn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function En(t,n){this._context=t,this._alpha=n}En.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Nn=function t(n){function i(t){return n?new En(t,n):new On(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Ln(t){this._context=t}function zn(t){return new Ln(t)}function qn(t){return t<0?-1:1}function In(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),s=(i-t._y1)/(o||e<0&&-0),c=(r*o+s*e)/(e+o);return(qn(r)+qn(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(c))||0}function Dn(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Wn(t,n,i){var e=t._x0,o=t._y0,r=t._x1,s=t._y1,c=(r-e)/3;t._context.bezierCurveTo(e+c,o+c*n,r-c,s-c*i,r,s)}function Xn(t){this._context=t}function Yn(t){this._context=new Bn(t)}function Bn(t){this._context=t}function Fn(t){return new Xn(t)}function Zn(t){return new Yn(t)}function $n(t){this._context=t}function Vn(t){var n,i,e=t.length-1,o=new Array(e),r=new Array(e),s=new Array(e);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],n=1;n<e-1;++n)o[n]=1,r[n]=4,s[n]=4*t[n]+2*t[n+1];for(o[e-1]=2,r[e-1]=7,s[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=o[n]/r[n-1],r[n]-=i,s[n]-=i*s[n-1];for(o[e-1]=s[e-1]/r[e-1],n=e-2;n>=0;--n)o[n]=(s[n]-o[n+1])/r[n];for(r[e-1]=(t[e]+o[e-1])/2,n=0;n<e-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function Gn(t){return new $n(t)}function Un(t,n){this._context=t,this._t=n}function Hn(t){return new Un(t,.5)}function Qn(t){return new Un(t,0)}function Jn(t){return new Un(t,1)}function Kn(t,n){if((o=t.length)>1)for(var i,e,o,r=1,s=t[n[0]],c=s.length;r<o;++r)for(e=s,s=t[n[r]],i=0;i<c;++i)s[i][1]+=s[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function ti(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function ni(t,n){return t[n]}function ii(t){const n=[];return n.key=t,n}function ei(){var t=T([]),n=ti,i=Kn,e=ni;function o(o){var r,s,c=Array.from(t.apply(this,arguments),ii),a=c.length,h=-1;for(const t of o)for(r=0,++h;r<a;++r)(c[r][h]=[0,+e(t,c[r].key,h,o)]).data=t;for(r=0,s=at(n(c));r<a;++r)c[s[r]].index=r;return i(c,s),c}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:T(Array.from(n)),o):t},o.value=function(t){return arguments.length?(e="function"==typeof t?t:T(+t),o):e},o.order=function(t){return arguments.length?(n=null==t?ti:"function"==typeof t?t:T(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(i=null==t?Kn:t,o):i},o}function oi(t,n){if((e=t.length)>0){for(var i,e,o,r=0,s=t[0].length;r<s;++r){for(o=i=0;i<e;++i)o+=t[i][r][1]||0;if(o)for(i=0;i<e;++i)t[i][r][1]/=o}Kn(t,n)}}function ri(t,n){if((c=t.length)>0)for(var i,e,o,r,s,c,a=0,h=t[n[0]].length;a<h;++a)for(r=s=0,i=0;i<c;++i)(o=(e=t[n[i]][a])[1]-e[0])>0?(e[0]=r,e[1]=r+=o):o<0?(e[1]=s,e[0]=s+=o):(e[0]=0,e[1]=o)}function si(t,n){if((i=t.length)>0){for(var i,e=0,o=t[n[0]],r=o.length;e<r;++e){for(var s=0,c=0;s<i;++s)c+=t[s][e][1]||0;o[e][1]+=o[e][0]=-c/2}Kn(t,n)}}function ci(t,n){if((o=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,o,r=0,s=1;s<e;++s){for(var c=0,a=0,h=0;c<o;++c){for(var u=t[n[c]],l=u[s][1]||0,_=(l-(u[s-1][1]||0))/2,f=0;f<c;++f){var y=t[n[f]];_+=(y[s][1]||0)-(y[s-1][1]||0)}a+=l,h+=_*l}i[s-1][1]+=i[s-1][0]=r,a&&(r-=h/a)}i[s-1][1]+=i[s-1][0]=r,Kn(t,n)}}function ai(t){var n=t.map(hi);return ti(t).sort((function(t,i){return n[t]-n[i]}))}function hi(t){for(var n,i=-1,e=0,o=t.length,r=-1/0;++i<o;)(n=+t[i][1])>r&&(r=n,e=i);return e}function ui(t){var n=t.map(li);return ti(t).sort((function(t,i){return n[t]-n[i]}))}function li(t){for(var n,i=0,e=-1,o=t.length;++e<o;)(n=+t[e][1])&&(i+=n);return i}function _i(t){return ui(t).reverse()}function fi(t){var n,i,e=t.length,o=t.map(li),r=ai(t),s=0,c=0,a=[],h=[];for(n=0;n<e;++n)i=r[n],s<c?(s+=o[i],a.push(i)):(c+=o[i],h.push(i));return h.reverse().concat(a)}function yi(t){return ti(t).reverse()}Ln.prototype={areaStart:ln,areaEnd:ln,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Wn(this,this._t0,Dn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Wn(this,Dn(this,i=In(this,t,n)),i);break;default:Wn(this,this._t0,i=In(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(Yn.prototype=Object.create(Xn.prototype)).point=function(t,n){Xn.prototype.point.call(this,n,t)},Bn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}},$n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=Vn(t),o=Vn(n),r=0,s=1;s<i;++r,++s)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[s],n[s]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};var xi=function(t){return null!=(void 0!==t._y1?t._y1:t._y)&&null!==t._y0},pi=function(t){return function(n){return t.x(void 0!==n._x1?n._x1:n._x)}},vi=function(t){return function(n){return t.y(void 0!==n._y1?n._y1:n._y)}},di=function(t){return"curve".concat(function(t){return t&&t[0].toUpperCase()+t.slice(1)}(t))},bi=function(n){var i=n.interpolation;if("function"==typeof i)return i;if("string"==typeof i){var e=n.polar,o=n.openCurve,r=(void 0===o?!e:o)?di(i):function(t){return"".concat(di(t),"Closed")}(i);return t[r]}return ut},gi=function(t){var n=t.polar,i=t.scale,e=t.horizontal;return n?Tt().defined(xi).curve(bi(t)).angle(function(t){return function(n){return-1*t.x(void 0!==n._x1?n._x1:n._x)+Math.PI/2}}(i)).radius(vi(i)):ft().defined(xi).curve(bi(t)).x(e?vi(i):pi(i)).y(e?pi(i):vi(i))},mi=function(t){var n=et(),e=n.canvasRef,o=n.clear,r=n.clip,s=t.style,c=t.data,a=s.stroke,h=s.strokeWidth,u=i().useCallback((function(n){var i=gi(t);n.strokeStyle=a,n.lineWidth=h,i.context(n)(c),n.stroke()}),[c,t,a,h]);return i().useEffect((function(){var t,n=null===(t=e.current)||void 0===t?void 0:t.getContext("2d");n&&(o(n),u(n),r(n))}),[e,u,o,r]),null};function Ti(t,n,i){return"M ".concat(t,", ").concat(n,"\n m ").concat(-i,", 0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*i,",0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*-i,",0")}function wi(t,n,i){var e=.87*i,o=t-e,r=n+e,s=t+e-o;return"M ".concat(o,", ").concat(r,"\n h").concat(s,"\n v-").concat(s,"\n h-").concat(s,"\n z")}function Mi(t,n,i){var e=.87*i,o=Math.sqrt(e*e*2);return"M ".concat(t,", ").concat(n+o,"\n l ").concat(o,", -").concat(o,"\n l -").concat(o,", -").concat(o,"\n l -").concat(o,", ").concat(o,"\n l ").concat(o,", ").concat(o,"\n z")}function ki(t,n,i){var e=t+i,o=n-i,r=n+i/2*Math.sqrt(3);return"M ".concat(t-i,", ").concat(o,"\n L ").concat(e,", ").concat(o,"\n L ").concat(t,", ").concat(r,"\n z")}function Oi(t,n,i){var e=t+i,o=n-i/2*Math.sqrt(3),r=n+i;return"M ".concat(t-i,", ").concat(r,"\n L ").concat(e,", ").concat(r,"\n L ").concat(t,", ").concat(o,"\n z")}function Si(t,n,i){var e=1.1*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e,"\n v-").concat(o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(o,"\n z")}function Pi(t,n,i){var e=.8*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e+o,"\n v-").concat(2*o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(2*o,"\n z")}function Ai(t,n,i){var e=1.1*i,o=e-.3*e,r=t-e,s=n+o/2,c=t+e-r;return"M ".concat(r,", ").concat(s,"\n h").concat(c,"\n v-").concat(o,"\n h-").concat(c,"\n z")}function ji(t,n,i){var e=1.35*i,o=Math.PI/5,r=function(t,n,i){var e=10;e||(e=0);var o=e-0,r=Math.abs(o),s=o/r||1,c=Math.max(Math.ceil(r/1),0);return Array.from(Array(c),(function(t,n){return 0+n*s*1}))}().map((function(i){var r=i%2==0?e:e/2;return"".concat(r*Math.sin(o*(i+1))+t,",\n ").concat(r*Math.cos(o*(i+1))+n)}));return"M ".concat(r.join("L")," z")}var Ci=function(t){var n=et().canvasRef,e=function(t){var n=f(t.size,t),i=y(t.style,t),e=f(t.symbol,t);return Object.assign({},t,{size:n,style:i,symbol:e})}(t),o=i().useCallback((function(t){var n=e.style,i=function(t){var n=t.x,i=t.y,e=t.size,o=t.symbol;if(t.getPath)return t.getPath(n,i,e);var r={circle:Ti,square:wi,diamond:Mi,triangleDown:ki,triangleUp:Oi,plus:Si,minus:Ai,star:ji,cross:Pi};return("function"==typeof r[o]?r[o]:r.circle)(n,i,e)}(e);t.fillStyle=n.fill;var o=new Path2D(i);t.fill(o)}),[e]);return i().useEffect((function(){var t,i=null===(t=n.current)||void 0===t?void 0:t.getContext("2d");i&&o(i)}),[]),null}})(),o})()));
|
|
1
|
+
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.VictoryCanvas=n(require("react")):t.VictoryCanvas=n(t.React)}(self,(t=>(()=>{var n={2596:(t,n,i)=>{var e=i(2373).Symbol;t.exports=e},6082:t=>{t.exports=function(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}},8644:t=>{t.exports=function(t,n){for(var i=-1,e=null==t?0:t.length,o=Array(e);++i<e;)o[i]=n(t[i],i,t);return o}},9559:t=>{t.exports=function(t,n){for(var i=-1,e=n.length,o=t.length;++i<e;)t[o+i]=n[i];return t}},4132:(t,n,i)=>{var e=i(8347),o=i(788),r=Object.prototype.hasOwnProperty;t.exports=function(t,n,i){var s=t[n];r.call(t,n)&&o(s,i)&&(void 0!==i||n in t)||e(t,n,i)}},8347:(t,n,i)=>{var e=i(5525);t.exports=function(t,n,i){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}},6457:(t,n,i)=>{var e=i(9559),o=i(3608);t.exports=function t(n,i,r,s,c){var a=-1,h=n.length;for(r||(r=o),c||(c=[]);++a<h;){var u=n[a];i>0&&r(u)?i>1?t(u,i-1,r,s,c):e(c,u):s||(c[c.length]=u)}return c}},4432:(t,n,i)=>{var e=i(9026),o=i(3110);t.exports=function(t,n){for(var i=0,r=(n=e(n,t)).length;null!=t&&i<r;)t=t[o(n[i++])];return i&&i==r?t:void 0}},563:t=>{var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},6776:t=>{t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:(t,n,i)=>{var e=i(6371),o=i(5066);t.exports=function(t,n){return e(t,n,(function(n,i){return o(t,i)}))}},6371:(t,n,i)=>{var e=i(4432),o=i(6539),r=i(9026);t.exports=function(t,n,i){for(var s=-1,c=n.length,a={};++s<c;){var h=n[s],u=e(t,h);i(u,h)&&o(a,r(h,t),u)}return a}},1600:t=>{t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:(t,n,i)=>{var e=i(4432);t.exports=function(t){return function(n){return e(n,t)}}},6317:(t,n,i)=>{var e=i(5346),o=i(4280),r=i(201);t.exports=function(t,n){return r(o(t,n,e),t+"")}},6539:(t,n,i)=>{var e=i(4132),o=i(9026),r=i(9099),s=i(7709),c=i(3110);t.exports=function(t,n,i,a){if(!s(t))return t;for(var h=-1,u=(n=o(n,t)).length,l=u-1,_=t;null!=_&&++h<u;){var f=c(n[h]),y=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(h!=l){var x=_[f];void 0===(y=a?a(x,f,_):void 0)&&(y=s(x)?x:r(n[h+1])?[]:{})}e(_,f,y),_=_[f]}return t}},6316:(t,n,i)=>{var e=i(2596),o=i(8644),r=i(163),s=i(1995),c=e?e.prototype:void 0,a=c?c.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(r(n))return o(n,t)+"";if(s(n))return a?a.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i}},9026:(t,n,i)=>{var e=i(163),o=i(726),r=i(7801),s=i(7010);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:r(s(t))}},5525:(t,n,i)=>{var e=i(3743),o=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:(t,n,i)=>{var e=i(2645),o=i(4280),r=i(201);t.exports=function(t){return r(o(t,void 0,e),t+"")}},2117:(t,n,i)=>{var e="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=e},3743:t=>{t.exports=function(t,n){return null==t?void 0:t[n]}},9817:(t,n,i)=>{var e=i(5125)(Object.getPrototypeOf,Object);t.exports=e},3096:(t,n,i)=>{var e=i(9026),o=i(5075),r=i(163),s=i(9099),c=i(8454),a=i(3110);t.exports=function(t,n,i){for(var h=-1,u=(n=e(n,t)).length,l=!1;++h<u;){var _=a(n[h]);if(!(l=null!=t&&i(t,_)))break;t=t[_]}return l||++h!=u?l:!!(u=null==t?0:t.length)&&c(u)&&s(_,u)&&(r(t)||o(t))}},3608:(t,n,i)=>{var e=i(2596),o=i(5075),r=i(163),s=e?e.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||o(t)||!!(s&&t&&t[s])}},9099:t=>{var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var e=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==e||"symbol"!=e&&n.test(t))&&t>-1&&t%1==0&&t<i}},8286:t=>{t.exports=function(){return!1}},726:(t,n,i)=>{var e=i(163),o=i(1995),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!o(t))||s.test(t)||!r.test(t)||null!=n&&t in Object(n)}},2453:t=>{t.exports=function(t){return t}},5125:t=>{t.exports=function(t,n){return function(i){return t(n(i))}}},4280:(t,n,i)=>{var e=i(6082),o=Math.max;t.exports=function(t,n,i){return n=o(void 0===n?t.length-1:n,0),function(){for(var r=arguments,s=-1,c=o(r.length-n,0),a=Array(c);++s<c;)a[s]=r[n+s];s=-1;for(var h=Array(n+1);++s<n;)h[s]=r[s];return h[n]=i(a),e(t,this,h)}}},2373:(t,n,i)=>{var e=i(2117),o="object"==typeof self&&self&&self.Object===Object&&self,r=e||o||Function("return this")();t.exports=r},201:t=>{t.exports=function(t){return t}},7801:(t,n,i)=>{var e=i(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,i,e,o){n.push(e?o.replace(r,"$1"):i||t)})),n}));t.exports=s},3110:(t,n,i)=>{var e=i(1995);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},1893:(t,n,i)=>{var e=i(6317),o=i(788),r=i(8286),s=i(8855),c=Object.prototype,a=c.hasOwnProperty,h=e((function(t,n){t=Object(t);var i=-1,e=n.length,h=e>2?n[2]:void 0;for(h&&r(n[0],n[1],h)&&(e=1);++i<e;)for(var u=n[i],l=s(u),_=-1,f=l.length;++_<f;){var y=l[_],x=t[y];(void 0===x||o(x,c[y])&&!a.call(t,y))&&(t[y]=u[y])}return t}));t.exports=h},788:t=>{t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:(t,n,i)=>{var e=i(6457);t.exports=function(t){return null!=t&&t.length?e(t,1):[]}},5066:(t,n,i)=>{var e=i(6776),o=i(3096);t.exports=function(t,n){return null!=t&&o(t,n,e)}},5346:t=>{t.exports=function(t){return t}},5075:t=>{t.exports=function(){return!1}},163:t=>{var n=Array.isArray;t.exports=n},8454:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7709:t=>{t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},3474:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3849:(t,n,i)=>{var e=i(563),o=i(9817),r=i(3474),s=Function.prototype,c=Object.prototype,a=s.toString,h=c.hasOwnProperty,u=a.call(Object);t.exports=function(t){if(!r(t)||"[object Object]"!=e(t))return!1;var n=o(t);if(null===n)return!0;var i=h.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&a.call(i)==u}},1995:t=>{t.exports=function(){return!1}},8855:t=>{t.exports=function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}},9082:(t,n,i)=>{var e=i(5436),o=i(5557)((function(t,n){return null==t?{}:e(t,n)}));t.exports=o},8532:(t,n,i)=>{var e=i(1600),o=i(3301),r=i(726),s=i(3110);t.exports=function(t){return r(t)?e(s(t)):o(t)}},7010:(t,n,i)=>{var e=i(6316);t.exports=function(t){return null==t?"":e(t)}},9787:n=>{"use strict";n.exports=t}},i={};function e(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,e),r.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";e.r(o),e.d(o,{CanvasBar:()=>nt,CanvasCurve:()=>vi,CanvasGroup:()=>it,CanvasPoint:()=>Si,useCanvasContext:()=>K});var t={};e.r(t),e.d(t,{arc:()=>D,area:()=>ut,areaRadial:()=>bt,curveBasis:()=>un,curveBasisClosed:()=>_n,curveBasisOpen:()=>yn,curveBumpX:()=>wt,curveBumpY:()=>Mt,curveBundle:()=>pn,curveCardinal:()=>bn,curveCardinalClosed:()=>mn,curveCardinalOpen:()=>wn,curveCatmullRom:()=>On,curveCatmullRomClosed:()=>Pn,curveCatmullRomOpen:()=>Cn,curveLinear:()=>st,curveLinearClosed:()=>jn,curveMonotoneX:()=>Wn,curveMonotoneY:()=>Xn,curveNatural:()=>Zn,curveStep:()=>Fn,curveStepAfter:()=>Un,curveStepBefore:()=>Vn,line:()=>ht,lineRadial:()=>dt,link:()=>Pt,linkHorizontal:()=>At,linkRadial:()=>Rt,linkVertical:()=>Ct,pie:()=>ft,pointRadial:()=>gt,radialArea:()=>bt,radialLine:()=>dt,stack:()=>Kn,stackOffsetDiverging:()=>ni,stackOffsetExpand:()=>ti,stackOffsetNone:()=>Gn,stackOffsetSilhouette:()=>ii,stackOffsetWiggle:()=>ei,stackOrderAppearance:()=>oi,stackOrderAscending:()=>si,stackOrderDescending:()=>ai,stackOrderInsideOut:()=>hi,stackOrderNone:()=>Hn,stackOrderReverse:()=>ui,symbol:()=>sn,symbolAsterisk:()=>Et,symbolCircle:()=>Nt,symbolCross:()=>Lt,symbolDiamond:()=>It,symbolDiamond2:()=>Dt,symbolPlus:()=>Wt,symbolSquare:()=>Xt,symbolSquare2:()=>Yt,symbolStar:()=>Ft,symbolTriangle:()=>Ut,symbolTriangle2:()=>Ht,symbolWye:()=>nn,symbolX:()=>en,symbols:()=>on,symbolsFill:()=>on,symbolsStroke:()=>rn});var n=e(9787),i=e.n(n),r=e(3849),s=e.n(r);function c(t,n){return u(t)?t(n):t}function a(t,n){return n.disableInlineStyles?{}:t&&Object.keys(t).some((function(n){return u(t[n])}))?Object.keys(t).reduce((function(i,e){return i[e]=c(t[e],n),i}),{}):t}function h(t){return null==t}function u(t){return"function"==typeof t}e(9082),e(8532),e(1893);const l=Math.PI,_=2*l,f=1e-6,y=_-f;function x(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function p(){return new x}x.prototype=p.prototype={constructor:x,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+e)},bezierCurveTo:function(t,n,i,e,o,r){this._+="C"+ +t+","+ +n+","+ +i+","+ +e+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,i,e,o){t=+t,n=+n,i=+i,e=+e,o=+o;var r=this._x1,s=this._y1,c=i-t,a=e-n,h=r-t,u=s-n,_=h*h+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(_>f)if(Math.abs(u*c-a*h)>f&&o){var y=i-r,x=e-s,p=c*c+a*a,v=y*y+x*x,d=Math.sqrt(p),b=Math.sqrt(_),g=o*Math.tan((l-Math.acos((p+_-v)/(2*d*b)))/2),m=g/b,T=g/d;Math.abs(m-1)>f&&(this._+="L"+(t+m*h)+","+(n+m*u)),this._+="A"+o+","+o+",0,0,"+ +(u*y>h*x)+","+(this._x1=t+T*c)+","+(this._y1=n+T*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,i,e,o,r){t=+t,n=+n,r=!!r;var s=(i=+i)*Math.cos(e),c=i*Math.sin(e),a=t+s,h=n+c,u=1^r,x=r?e-o:o-e;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+a+","+h:(Math.abs(this._x1-a)>f||Math.abs(this._y1-h)>f)&&(this._+="L"+a+","+h),i&&(x<0&&(x=x%_+_),x>y?this._+="A"+i+","+i+",0,1,"+u+","+(t-s)+","+(n-c)+"A"+i+","+i+",0,1,"+u+","+(this._x1=a)+","+(this._y1=h):x>f&&(this._+="A"+i+","+i+",0,"+ +(x>=l)+","+u+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=n+i*Math.sin(o))))},rect:function(t,n,i,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +e+"h"+-i+"Z"},toString:function(){return this._}};const v=p;function d(t){return function(){return t}}const b=Math.abs,g=Math.atan2,m=Math.cos,T=Math.max,w=Math.min,M=Math.sin,k=Math.sqrt,O=1e-12,S=Math.PI,P=S/2,A=2*S;function C(t){return t>1?0:t<-1?S:Math.acos(t)}function R(t){return t>=1?P:t<=-1?-P:Math.asin(t)}function j(t){return t.innerRadius}function E(t){return t.outerRadius}function N(t){return t.startAngle}function L(t){return t.endAngle}function z(t){return t&&t.padAngle}function q(t,n,i,e,o,r,s,c){var a=i-t,h=e-n,u=s-o,l=c-r,_=l*a-u*h;if(!(_*_<O))return[t+(_=(u*(n-r)-l*(t-o))/_)*a,n+_*h]}function I(t,n,i,e,o,r,s){var c=t-i,a=n-e,h=(s?r:-r)/k(c*c+a*a),u=h*a,l=-h*c,_=t+u,f=n+l,y=i+u,x=e+l,p=(_+y)/2,v=(f+x)/2,d=y-_,b=x-f,g=d*d+b*b,m=o-r,w=_*x-y*f,M=(b<0?-1:1)*k(T(0,m*m*g-w*w)),O=(w*b-d*M)/g,S=(-w*d-b*M)/g,P=(w*b+d*M)/g,A=(-w*d+b*M)/g,C=O-p,R=S-v,j=P-p,E=A-v;return C*C+R*R>j*j+E*E&&(O=P,S=A),{cx:O,cy:S,x01:-u,y01:-l,x11:O*(o/m-1),y11:S*(o/m-1)}}function D(){var t=j,n=E,i=d(0),e=null,o=N,r=L,s=z,c=null;function a(){var a,h,u=+t.apply(this,arguments),l=+n.apply(this,arguments),_=o.apply(this,arguments)-P,f=r.apply(this,arguments)-P,y=b(f-_),x=f>_;if(c||(c=a=v()),l<u&&(h=l,l=u,u=h),l>O)if(y>A-O)c.moveTo(l*m(_),l*M(_)),c.arc(0,0,l,_,f,!x),u>O&&(c.moveTo(u*m(f),u*M(f)),c.arc(0,0,u,f,_,x));else{var p,d,T=_,j=f,E=_,N=f,L=y,z=y,D=s.apply(this,arguments)/2,W=D>O&&(e?+e.apply(this,arguments):k(u*u+l*l)),X=w(b(l-u)/2,+i.apply(this,arguments)),Y=X,B=X;if(W>O){var Z=R(W/u*M(D)),$=R(W/l*M(D));(L-=2*Z)>O?(E+=Z*=x?1:-1,N-=Z):(L=0,E=N=(_+f)/2),(z-=2*$)>O?(T+=$*=x?1:-1,j-=$):(z=0,T=j=(_+f)/2)}var F=l*m(T),V=l*M(T),U=u*m(N),G=u*M(N);if(X>O){var H,Q=l*m(j),J=l*M(j),K=u*m(E),tt=u*M(E);if(y<S&&(H=q(F,V,K,tt,Q,J,U,G))){var nt=F-H[0],it=V-H[1],et=Q-H[0],ot=J-H[1],rt=1/M(C((nt*et+it*ot)/(k(nt*nt+it*it)*k(et*et+ot*ot)))/2),st=k(H[0]*H[0]+H[1]*H[1]);Y=w(X,(u-st)/(rt-1)),B=w(X,(l-st)/(rt+1))}}z>O?B>O?(p=I(K,tt,F,V,l,B,x),d=I(Q,J,U,G,l,B,x),c.moveTo(p.cx+p.x01,p.cy+p.y01),B<X?c.arc(p.cx,p.cy,B,g(p.y01,p.x01),g(d.y01,d.x01),!x):(c.arc(p.cx,p.cy,B,g(p.y01,p.x01),g(p.y11,p.x11),!x),c.arc(0,0,l,g(p.cy+p.y11,p.cx+p.x11),g(d.cy+d.y11,d.cx+d.x11),!x),c.arc(d.cx,d.cy,B,g(d.y11,d.x11),g(d.y01,d.x01),!x))):(c.moveTo(F,V),c.arc(0,0,l,T,j,!x)):c.moveTo(F,V),u>O&&L>O?Y>O?(p=I(U,G,Q,J,u,-Y,x),d=I(F,V,K,tt,u,-Y,x),c.lineTo(p.cx+p.x01,p.cy+p.y01),Y<X?c.arc(p.cx,p.cy,Y,g(p.y01,p.x01),g(d.y01,d.x01),!x):(c.arc(p.cx,p.cy,Y,g(p.y01,p.x01),g(p.y11,p.x11),!x),c.arc(0,0,u,g(p.cy+p.y11,p.cx+p.x11),g(d.cy+d.y11,d.cx+d.x11),x),c.arc(d.cx,d.cy,Y,g(d.y11,d.x11),g(d.y01,d.x01),!x))):c.arc(0,0,u,N,E,x):c.lineTo(U,G)}else c.moveTo(0,0);if(c.closePath(),a)return c=null,a+""||null}return a.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-S/2;return[m(e)*i,M(e)*i]},a.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),a):t},a.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),a):n},a.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:d(+t),a):i},a.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:d(+t),a):e},a.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),a):o},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),a):r},a.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:d(+t),a):s},a.context=function(t){return arguments.length?(c=null==t?null:t,a):c},a}var W=function(t,n){return{x:t,y:n,distance:function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},add:function(t){return W(this.x+t.x,this.y+t.y)},subtract:function(t){return W(this.x-t.x,this.y-t.y)},scalarMult:function(t){return W(this.x*t,this.y*t)},scalarDivide:function(t){if(0===t)throw new Error("Division by 0 error");return W(this.x/t,this.y/t)},equals:function(t){return this.x===t.x&&this.y===t.y}}},X=function(t,n){return{center:t,radius:n,hasIntersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);return!(r>e+o||r<Math.abs(e-o))},equals:function(t){var n=this.center,i=t.center;return this.radius===t.radius&&n.equals(i)},intersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);if(!this.hasIntersection(t)||this.equals(t))return[];var s=(Math.pow(e,2)-Math.pow(o,2)+Math.pow(r,2))/(2*r),c=Math.sqrt(Math.pow(e,2)-Math.pow(s,2)),a=n.add(i.subtract(n).scalarMult(s).scalarDivide(r)),h=n.x,u=n.y,l=i.x,_=i.y,f=a.x,y=a.y,x=[W(f-c*(_-u)/r,y+c*(l-h)/r),W(f+c*(_-u)/r,y-c*(l-h)/r)];return x.sort((function(t,n){return t.x-n.x})),x},solveX:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.y,2));return[this.center.x-n,this.center.x+n]},solveY:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.x,2));return[this.center.y-n,this.center.y+n]}}};function Y(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function B(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Y(Object(i),!0).forEach((function(n){Z(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Y(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function Z(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function $(t){return function(t){if(Array.isArray(t))return F(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return F(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?F(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}var V=function(t,n){var i=t.x,e=t.x0,o=t.y,r=t.y0,s=t.horizontal,c=t.alignment||"middle",a="middle"===c?n/2:n,h=s?-1:1;return s?{x0:e,x1:i,y0:"start"===c?o:o-h*a,y1:"end"===c?o:o+h*a}:{x0:"start"===c?i:i-h*a,x1:"end"===c?i:i+h*a,y0:r,y1:o}},U=function(t,n){var i=t.data,e=t.scale,o=void 0===i[n]._x1?"_x":"_x1";return e.x(i[n][o])},G=function(t){return-1*t+Math.PI/2},H=function(t,n,i){var e="".concat(n.topLeft," ").concat(n.topLeft," ").concat(i),o="".concat(n.topRight," ").concat(n.topRight," ").concat(i),r="".concat(n.bottomLeft," ").concat(n.bottomLeft," ").concat(i),s="".concat(n.bottomRight," ").concat(n.bottomRight," ").concat(i),c=["M","A ".concat(r,","),"L","A ".concat(e,","),"L","A ".concat(o,","),"L","A ".concat(s,",")].reduce((function(n,i,e){return"".concat(n).concat(i," ").concat(t[e].x,", ").concat(t[e].y," \n")}),"");return"".concat(c," z")},Q=function(t,n,i){return t.getPath?function(t,n){var i=t.getPath;if("function"==typeof i)return i(B(B({},t),V(t,n)))}(t,n):t.horizontal?function(t,n,i){var e=V(t,n),o=e.x0<e.x1?1:-1,r={topRight:o>0?i.topLeft:i.bottomLeft,bottomRight:o>0?i.topRight:i.bottomRight,bottomLeft:o>0?i.bottomRight:i.topRight,topLeft:o>0?i.bottomLeft:i.topLeft},s=function(t,n,i){var e=t.y0,o=t.y1,r=t.x0<t.x1?t.x0:t.x1,s=t.x0<t.x1?t.x1:t.x0,c=function(t){var c="top"===t,a=c?-1:1,h=c?o:e,u={x:r,y:h-a*i["".concat(t,"Left")]},l={x:r+i["".concat(t,"Left")],y:h},_={x:s-i["".concat(t,"Right")],y:h},f={x:s,y:h-a*i["".concat(t,"Right")]};if(l.x>_.x){var y=W(r+i["".concat(t,"Left")],h-a*i["".concat(t,"Left")]),x=X(y,i["".concat(t,"Left")]),p=W(s-i["".concat(t,"Right")],h-a*i["".concat(t,"Right")]),v=X(p,i["".concat(t,"Right")]),d=x.intersection(v);if(d.length>0){var b=d[n>0?1:0];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["".concat(t,"Right")]>i["".concat(t,"Left")]){var g=v.solveY(r)[c?0:1];u={x:r,y:g},l={x:r,y:g},_={x:r,y:g}}else{var m=x.solveY(s)[c?0:1];f={x:s,y:m},_={x:s,y:m},l={x:s,y:m}}}return[u,l,_,f]},a=c("top"),h=c("bottom");return[h[1],h[0]].concat($(a),[h[3],h[2]])}(e,o,r);return H(s,r,"0 0 1")}(t,n,i):function(t,n,i){var e=V(t,n),o=e.y0>e.y1?1:-1,r=o>0?"0 0 1":"0 0 0",s=function(t,n,i){var e=t.x0,o=t.x1,r=t.y0,s=t.y1,c=function(t){var c="Left"===t,a=c?1:-1,h=c?e:o,u={x:h+a*i["bottom".concat(t)],y:r},l={x:h,y:r-n*i["bottom".concat(t)]},_={x:h,y:s+n*i["top".concat(t)]},f={x:h+a*i["top".concat(t)],y:s};if(1===n?r-i["bottom".concat(t)]<s+i["top".concat(t)]:r+i["bottom".concat(t)]>s-i["top".concat(t)]){var y=W(h+a*i["top".concat(t)],s+n*i["top".concat(t)]),x=X(y,i["top".concat(t)]),p=W(h+a*i["bottom".concat(t)],r-n*i["bottom".concat(t)]),v=X(p,i["bottom".concat(t)]),d=x.intersection(v);if(d.length>0){var b=d[c?0:1];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["top".concat(t)]>i["bottom".concat(t)]){var g=x.solveX(r)[c?0:1];u={x:g,y:r},l={x:g,y:r},_={x:g,y:r}}else{var m=v.solveX(s)[c?0:1];l={x:m,y:s},_={x:m,y:s},f={x:m,y:s}}}var T=[u,l,_,f];return c?T:T.reverse()};return c("Left").concat(c("Right"))}(e,o,i);return H(s,i,r)}(t,n,i)},J=i().createContext(void 0),K=function(){var t=i().useContext(J);if(!t)throw new Error("This component must be wrapped in a CanvasContext.Provider component.\n Try setting groupComponent={<CanvasGroup />} in your chart component.");return t},tt=function(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(n.disableInlineStyles)return{};var i={fill:"black",stroke:t.fill||"black"};return a(Object.assign(i,t),n)}(t.style,t),i=function(t,n){var i=n.scale,e=n.data,o=n.style;if(t)return c(t,n);if(o.width)return o.width;var r=i.x.range(),s=Math.abs(r[1]-r[0]),a=e.length+2,h=(n.barRatio||.5)*(e.length<2?8:s/a);return Math.max(1,h)}(t.barWidth,Object.assign({},t,{style:n})),e=function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0};return t?function(t){return s()(t)}(t)?function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},e=function(e,o){h(t[e])?h(t[o])||(i[e]=c(t[o],n)):i[e]=c(t[e],n)};return e("topLeft","top"),e("topRight","top"),e("bottomLeft","bottom"),e("bottomRight","bottom"),i}(t,n):(i.topLeft=c(t,n),i.topRight=c(t,n),i):i}(t.cornerRadius,Object.assign({},t,{style:n,barWidth:i}));return Object.assign({},t,{style:n,barWidth:i,cornerRadius:e})},nt=function(t){var n,e,o=K().canvasRef,r=tt(t),s=r.polar,c=r.style,a=r.barWidth,h=r.cornerRadius,u=r.origin,l=i().useMemo((function(){var t=s?function(t,n){return function(t,n){var i,e,o=t.datum,r=t.scale,s=t.index,c=t.alignment,a=t.style,h=r.y(o._y0||0),u=r.y(void 0!==o._y1?o._y1:o._y),l=r.x(void 0!==o._x1?o._x1:o._x);if(a.width){var _=function(t,n){var i=t.scale,e=i.y.range(),o=Math.max.apply(Math,$(e)),r=Math.abs(i.x.range()[1]-i.x.range()[0]);return n/(2*Math.PI*o)*r}(t,a.width),f="middle"===c?_/2:_;i="start"===c?l:l-f,e="end"===c?l:l+f}else i=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=U(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=0===n?U(t,i.length-1)-2*Math.PI:U(t,n-1);return 0===n&&s<2*Math.PI?e.x.range()[0]:"start"===o||"end"===o?"start"===o?c:r:(r+c)/2}(t,Number(s)),e=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=U(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=e.x.range()[1]===2*Math.PI?U(t,0)+2*Math.PI:e.x.range()[1],a=n===i.length-1?U(t,0)+2*Math.PI:U(t,n+1);return n===i.length-1&&s<2*Math.PI?c:"start"===o||"end"===o?"start"===o?r:a:(r+a)/2}(t,Number(s));var y=function(t){return D().innerRadius(h).outerRadius(u).startAngle(G(i)).endAngle(G(e)).cornerRadius(n[t])()},x=function(t){var n=y("".concat(t,"Right")),i=n.match(/[A-Z]/g)||[],e=n.split(/[A-Z]/).slice(1),o=i.indexOf("L"),r=y("".concat(t,"Left")),s=r.match(/[A-Z]/g)||[],c=r.split(/[A-Z]/).slice(1),a=s.indexOf("L");return{rightMoves:i,rightCoords:e,rightMiddle:o,leftMoves:s,leftCoords:c,leftMiddle:a}},p=function(){var t,o,r=n.topRight,s=n.topLeft,c=u*Math.abs(e-i),a=x("top"),h=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,p=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?h:f,o=r>s?l:y;else{var v,d=function(t){return t<3},b=s>r&&d(_)?1:2;if(r>s){var g=d(_)?p:p-2;v=d(p)?p-1:g}else{var m=d(p)?1:2;v=d(_)?m:p-2}t=[].concat($(h.slice(0,b)),$(f.slice(v))),o=[].concat($(l.slice(0,b)),$(y.slice(v)))}var T=t.indexOf("L"),w=t.slice(0,T),M=o.slice(0,T);return w.map((function(t,n){return{command:t,coords:M[n].split(",")}}))}(),v=function(){var t,o,r=n.bottomRight,s=n.bottomLeft,c=h*Math.abs(e-i),a=x("bottom"),u=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,p=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?u:f,o=r>s?l:y;else{var v=function(t,n){return t.length-n<4},d=(r>s?v(u,_):v(f,p))?-1:-3;t=[].concat($(f.slice(0,p+2)),$(u.slice(d))),o=[].concat($(y.slice(0,p+2)),$(l.slice(d)))}var b=t.indexOf("L"),g=t.slice(b,-1),m=o.slice(b,-1);return g.map((function(t,n){return{command:t,coords:m[n].split(",")}}))}(),d=[].concat($(p),$(v)).reduce((function(t,n){return"".concat(t).concat(n.command," ").concat(n.coords.join())}),"");return"".concat(d," z")}(t,n)}(r,h):Q(r,a,h);return new Path2D(t)}),[s,a,h,r]),_=(n=l,e=i().useRef(),i().useEffect((function(){e.current=n})),e.current),f=i().useCallback((function(t,n){t.fillStyle=c.fill,t.strokeStyle=c.stroke,t.globalAlpha=c.fillOpacity,t.lineWidth=c.strokeWidth,s&&t.translate((null==u?void 0:u.x)||0,(null==u?void 0:u.y)||0),t.fill(n),t.setTransform(1,0,0,1,0,0)}),[c,u,s]),y=i().useCallback((function(t){if(_){t.save();var n=c.strokeWidth||0;t.lineWidth=n+2,t.globalCompositeOperation="destination-out",f(t,_),t.stroke(_),t.restore()}}),[f,_,c]);return i().useEffect((function(){var t,n=null===(t=o.current)||void 0===t?void 0:t.getContext("2d");n&&(y(n),f(n,l))}),[o,f,s,a,h,r,l,y]),null},it=function(t){var n=i().useRef(null),e=t.children,o=t.width,r=void 0===o?0:o,s=t.height,c=void 0===s?0:s,a=t.clipWidth,h=t.padding,u=i().useCallback((function(t){return t.clearRect(0,0,r,c)}),[r,c]),l=i().useCallback((function(t){var n="number"==typeof h?h:(null==h?void 0:h.right)||0,i="number"==typeof h?h:(null==h?void 0:h.left)||0,e=r-n-i;t.clearRect(r-n,0,a?-1*(e-a):0,c)}),[r,c,h,a]);return i().createElement(J.Provider,{value:{canvasRef:n,clear:u,clip:l}},i().createElement("foreignObject",{width:r,height:c,x:0,y:0},i().createElement("canvas",{width:r,height:c,ref:n})),e)};it.role="container";var et=Array.prototype.slice;function ot(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function rt(t){this._context=t}function st(t){return new rt(t)}function ct(t){return t[0]}function at(t){return t[1]}function ht(t,n){var i=d(!0),e=null,o=st,r=null;function s(s){var c,a,h,u=(s=ot(s)).length,l=!1;for(null==e&&(r=o(h=v())),c=0;c<=u;++c)!(c<u&&i(a=s[c],c,s))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(a,c,s),+n(a,c,s));if(h)return r=null,h+""||null}return t="function"==typeof t?t:void 0===t?ct:d(t),n="function"==typeof n?n:void 0===n?at:d(n),s.x=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),s):n},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:d(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=e&&(r=o(e)),s):o},s.context=function(t){return arguments.length?(null==t?e=r=null:r=o(e=t),s):e},s}function ut(t,n,i){var e=null,o=d(!0),r=null,s=st,c=null;function a(a){var h,u,l,_,f,y=(a=ot(a)).length,x=!1,p=new Array(y),d=new Array(y);for(null==r&&(c=s(f=v())),h=0;h<=y;++h){if(!(h<y&&o(_=a[h],h,a))===x)if(x=!x)u=h,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),l=h-1;l>=u;--l)c.point(p[l],d[l]);c.lineEnd(),c.areaEnd()}x&&(p[h]=+t(_,h,a),d[h]=+n(_,h,a),c.point(e?+e(_,h,a):p[h],i?+i(_,h,a):d[h]))}if(f)return c=null,f+""||null}function h(){return ht().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?ct:d(+t),n="function"==typeof n?n:d(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?at:d(+i),a.x=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),e=null,a):t},a.x0=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),a):t},a.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:d(+t),a):e},a.y=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),i=null,a):n},a.y0=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),a):n},a.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:d(+t),a):i},a.lineX0=a.lineY0=function(){return h().x(t).y(n)},a.lineY1=function(){return h().x(t).y(i)},a.lineX1=function(){return h().x(e).y(n)},a.defined=function(t){return arguments.length?(o="function"==typeof t?t:d(!!t),a):o},a.curve=function(t){return arguments.length?(s=t,null!=r&&(c=s(r)),a):s},a.context=function(t){return arguments.length?(null==t?r=c=null:c=s(r=t),a):r},a}function lt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function _t(t){return t}function ft(){var t=_t,n=lt,i=null,e=d(0),o=d(A),r=d(0);function s(s){var c,a,h,u,l,_=(s=ot(s)).length,f=0,y=new Array(_),x=new Array(_),p=+e.apply(this,arguments),v=Math.min(A,Math.max(-A,o.apply(this,arguments)-p)),d=Math.min(Math.abs(v)/_,r.apply(this,arguments)),b=d*(v<0?-1:1);for(c=0;c<_;++c)(l=x[y[c]=c]=+t(s[c],c,s))>0&&(f+=l);for(null!=n?y.sort((function(t,i){return n(x[t],x[i])})):null!=i&&y.sort((function(t,n){return i(s[t],s[n])})),c=0,h=f?(v-_*b)/f:0;c<_;++c,p=u)a=y[c],u=p+((l=x[a])>0?l*h:0)+b,x[a]={data:s[a],index:c,value:l,startAngle:p,endAngle:u,padAngle:d};return x}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:d(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,i=null,s):n},s.sort=function(t){return arguments.length?(i=t,n=null,s):i},s.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),s):e},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),s):r},s}rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var yt=pt(st);function xt(t){this._curve=t}function pt(t){function n(n){return new xt(t(n))}return n._curve=t,n}function vt(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(pt(t)):n()._curve},t}function dt(){return vt(ht().curve(yt))}function bt(){var t=ut().curve(yt),n=t.curve,i=t.lineX0,e=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return vt(i())},delete t.lineX0,t.lineEndAngle=function(){return vt(e())},delete t.lineX1,t.lineInnerRadius=function(){return vt(o())},delete t.lineY0,t.lineOuterRadius=function(){return vt(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(pt(t)):n()._curve},t}function gt(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}xt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class mt{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class Tt{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const i=gt(this._x0,this._y0),e=gt(this._x0,this._y0=(this._y0+n)/2),o=gt(t,this._y0),r=gt(t,n);this._context.moveTo(...i),this._context.bezierCurveTo(...e,...o,...r)}}}function wt(t){return new mt(t,!0)}function Mt(t){return new mt(t,!1)}function kt(t){return new Tt(t)}function Ot(t){return t.source}function St(t){return t.target}function Pt(t){let n=Ot,i=St,e=ct,o=at,r=null,s=null;function c(){let c;const a=et.call(arguments),h=n.apply(this,a),u=i.apply(this,a);if(null==r&&(s=t(c=v())),s.lineStart(),a[0]=h,s.point(+e.apply(this,a),+o.apply(this,a)),a[0]=u,s.point(+e.apply(this,a),+o.apply(this,a)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(i=t,c):i},c.x=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),c):e},c.y=function(t){return arguments.length?(o="function"==typeof t?t:d(+t),c):o},c.context=function(n){return arguments.length?(null==n?r=s=null:s=t(r=n),c):r},c}function At(){return Pt(wt)}function Ct(){return Pt(Mt)}function Rt(){const t=Pt(kt);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const jt=k(3),Et={draw(t,n){const i=.59436*k(n+w(n/28,.75)),e=i/2,o=e*jt;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-o,-e),t.lineTo(o,e),t.moveTo(-o,e),t.lineTo(o,-e)}},Nt={draw(t,n){const i=k(n/S);t.moveTo(i,0),t.arc(0,0,i,0,A)}},Lt={draw(t,n){const i=k(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}},zt=k(1/3),qt=2*zt,It={draw(t,n){const i=k(n/qt),e=i*zt;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Dt={draw(t,n){const i=.62625*k(n);t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Wt={draw(t,n){const i=.87559*k(n-w(n/7,2));t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},Xt={draw(t,n){const i=k(n),e=-i/2;t.rect(e,e,i,i)}},Yt={draw(t,n){const i=.4431*k(n);t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}},Bt=M(S/10)/M(7*S/10),Zt=M(A/10)*Bt,$t=-m(A/10)*Bt,Ft={draw(t,n){const i=k(.8908130915292852*n),e=Zt*i,o=$t*i;t.moveTo(0,-i),t.lineTo(e,o);for(let n=1;n<5;++n){const r=A*n/5,s=m(r),c=M(r);t.lineTo(c*i,-s*i),t.lineTo(s*e-c*o,c*e+s*o)}t.closePath()}},Vt=k(3),Ut={draw(t,n){const i=-k(n/(3*Vt));t.moveTo(0,2*i),t.lineTo(-Vt*i,-i),t.lineTo(Vt*i,-i),t.closePath()}},Gt=k(3),Ht={draw(t,n){const i=.6824*k(n),e=i/2,o=i*Gt/2;t.moveTo(0,-i),t.lineTo(o,e),t.lineTo(-o,e),t.closePath()}},Qt=-.5,Jt=k(3)/2,Kt=1/k(12),tn=3*(Kt/2+1),nn={draw(t,n){const i=k(n/tn),e=i/2,o=i*Kt,r=e,s=i*Kt+i,c=-r,a=s;t.moveTo(e,o),t.lineTo(r,s),t.lineTo(c,a),t.lineTo(Qt*e-Jt*o,Jt*e+Qt*o),t.lineTo(Qt*r-Jt*s,Jt*r+Qt*s),t.lineTo(Qt*c-Jt*a,Jt*c+Qt*a),t.lineTo(Qt*e+Jt*o,Qt*o-Jt*e),t.lineTo(Qt*r+Jt*s,Qt*s-Jt*r),t.lineTo(Qt*c+Jt*a,Qt*a-Jt*c),t.closePath()}},en={draw(t,n){const i=.6189*k(n-w(n/6,1.7));t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}},on=[Nt,Lt,It,Xt,Ft,Ut,nn],rn=[Nt,Wt,en,Ht,Et,Yt,Dt];function sn(t,n){let i=null;function e(){let e;if(i||(i=e=v()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:d(t||Nt),n="function"==typeof n?n:d(void 0===n?64:+n),e.type=function(n){return arguments.length?(t="function"==typeof n?n:d(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e}function cn(){}function an(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function hn(t){this._context=t}function un(t){return new hn(t)}function ln(t){this._context=t}function _n(t){return new ln(t)}function fn(t){this._context=t}function yn(t){return new fn(t)}function xn(t,n){this._basis=new hn(t),this._beta=n}hn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:an(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:an(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},ln.prototype={areaStart:cn,areaEnd:cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:an(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},fn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:an(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},xn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,o=t[0],r=n[0],s=t[i]-o,c=n[i]-r,a=-1;++a<=i;)e=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(o+e*s),this._beta*n[a]+(1-this._beta)*(r+e*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const pn=function t(n){function i(t){return 1===n?new hn(t):new xn(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function vn(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function dn(t,n){this._context=t,this._k=(1-n)/6}dn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:vn(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:vn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const bn=function t(n){function i(t){return new dn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function gn(t,n){this._context=t,this._k=(1-n)/6}gn.prototype={areaStart:cn,areaEnd:cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:vn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const mn=function t(n){function i(t){return new gn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Tn(t,n){this._context=t,this._k=(1-n)/6}Tn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const wn=function t(n){function i(t){return new Tn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Mn(t,n,i){var e=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>O){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,o=(o*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>O){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*h+t._x1*t._l23_2a-n*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/u}t._context.bezierCurveTo(e,o,r,s,t._x2,t._y2)}function kn(t,n){this._context=t,this._alpha=n}kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Mn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const On=function t(n){function i(t){return n?new kn(t,n):new dn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Sn(t,n){this._context=t,this._alpha=n}Sn.prototype={areaStart:cn,areaEnd:cn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Mn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Pn=function t(n){function i(t){return n?new Sn(t,n):new gn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function An(t,n){this._context=t,this._alpha=n}An.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Cn=function t(n){function i(t){return n?new An(t,n):new Tn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Rn(t){this._context=t}function jn(t){return new Rn(t)}function En(t){return t<0?-1:1}function Nn(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),s=(i-t._y1)/(o||e<0&&-0),c=(r*o+s*e)/(e+o);return(En(r)+En(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(c))||0}function Ln(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function zn(t,n,i){var e=t._x0,o=t._y0,r=t._x1,s=t._y1,c=(r-e)/3;t._context.bezierCurveTo(e+c,o+c*n,r-c,s-c*i,r,s)}function qn(t){this._context=t}function In(t){this._context=new Dn(t)}function Dn(t){this._context=t}function Wn(t){return new qn(t)}function Xn(t){return new In(t)}function Yn(t){this._context=t}function Bn(t){var n,i,e=t.length-1,o=new Array(e),r=new Array(e),s=new Array(e);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],n=1;n<e-1;++n)o[n]=1,r[n]=4,s[n]=4*t[n]+2*t[n+1];for(o[e-1]=2,r[e-1]=7,s[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=o[n]/r[n-1],r[n]-=i,s[n]-=i*s[n-1];for(o[e-1]=s[e-1]/r[e-1],n=e-2;n>=0;--n)o[n]=(s[n]-o[n+1])/r[n];for(r[e-1]=(t[e]+o[e-1])/2,n=0;n<e-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function Zn(t){return new Yn(t)}function $n(t,n){this._context=t,this._t=n}function Fn(t){return new $n(t,.5)}function Vn(t){return new $n(t,0)}function Un(t){return new $n(t,1)}function Gn(t,n){if((o=t.length)>1)for(var i,e,o,r=1,s=t[n[0]],c=s.length;r<o;++r)for(e=s,s=t[n[r]],i=0;i<c;++i)s[i][1]+=s[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function Hn(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function Qn(t,n){return t[n]}function Jn(t){const n=[];return n.key=t,n}function Kn(){var t=d([]),n=Hn,i=Gn,e=Qn;function o(o){var r,s,c=Array.from(t.apply(this,arguments),Jn),a=c.length,h=-1;for(const t of o)for(r=0,++h;r<a;++r)(c[r][h]=[0,+e(t,c[r].key,h,o)]).data=t;for(r=0,s=ot(n(c));r<a;++r)c[s[r]].index=r;return i(c,s),c}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:d(Array.from(n)),o):t},o.value=function(t){return arguments.length?(e="function"==typeof t?t:d(+t),o):e},o.order=function(t){return arguments.length?(n=null==t?Hn:"function"==typeof t?t:d(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(i=null==t?Gn:t,o):i},o}function ti(t,n){if((e=t.length)>0){for(var i,e,o,r=0,s=t[0].length;r<s;++r){for(o=i=0;i<e;++i)o+=t[i][r][1]||0;if(o)for(i=0;i<e;++i)t[i][r][1]/=o}Gn(t,n)}}function ni(t,n){if((c=t.length)>0)for(var i,e,o,r,s,c,a=0,h=t[n[0]].length;a<h;++a)for(r=s=0,i=0;i<c;++i)(o=(e=t[n[i]][a])[1]-e[0])>0?(e[0]=r,e[1]=r+=o):o<0?(e[1]=s,e[0]=s+=o):(e[0]=0,e[1]=o)}function ii(t,n){if((i=t.length)>0){for(var i,e=0,o=t[n[0]],r=o.length;e<r;++e){for(var s=0,c=0;s<i;++s)c+=t[s][e][1]||0;o[e][1]+=o[e][0]=-c/2}Gn(t,n)}}function ei(t,n){if((o=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,o,r=0,s=1;s<e;++s){for(var c=0,a=0,h=0;c<o;++c){for(var u=t[n[c]],l=u[s][1]||0,_=(l-(u[s-1][1]||0))/2,f=0;f<c;++f){var y=t[n[f]];_+=(y[s][1]||0)-(y[s-1][1]||0)}a+=l,h+=_*l}i[s-1][1]+=i[s-1][0]=r,a&&(r-=h/a)}i[s-1][1]+=i[s-1][0]=r,Gn(t,n)}}function oi(t){var n=t.map(ri);return Hn(t).sort((function(t,i){return n[t]-n[i]}))}function ri(t){for(var n,i=-1,e=0,o=t.length,r=-1/0;++i<o;)(n=+t[i][1])>r&&(r=n,e=i);return e}function si(t){var n=t.map(ci);return Hn(t).sort((function(t,i){return n[t]-n[i]}))}function ci(t){for(var n,i=0,e=-1,o=t.length;++e<o;)(n=+t[e][1])&&(i+=n);return i}function ai(t){return si(t).reverse()}function hi(t){var n,i,e=t.length,o=t.map(ci),r=oi(t),s=0,c=0,a=[],h=[];for(n=0;n<e;++n)i=r[n],s<c?(s+=o[i],a.push(i)):(c+=o[i],h.push(i));return h.reverse().concat(a)}function ui(t){return Hn(t).reverse()}Rn.prototype={areaStart:cn,areaEnd:cn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:zn(this,this._t0,Ln(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,zn(this,Ln(this,i=Nn(this,t,n)),i);break;default:zn(this,this._t0,i=Nn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(In.prototype=Object.create(qn.prototype)).point=function(t,n){qn.prototype.point.call(this,n,t)},Dn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}},Yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=Bn(t),o=Bn(n),r=0,s=1;s<i;++r,++s)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[s],n[s]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},$n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};var li=function(t){return null!=(void 0!==t._y1?t._y1:t._y)&&null!==t._y0},_i=function(t){return function(n){return t.x(void 0!==n._x1?n._x1:n._x)}},fi=function(t){return function(n){return t.y(void 0!==n._y1?n._y1:n._y)}},yi=function(t){return"curve".concat(function(t){return t&&t[0].toUpperCase()+t.slice(1)}(t))},xi=function(n){var i=n.interpolation;if("function"==typeof i)return i;if("string"==typeof i){var e=n.polar,o=n.openCurve,r=(void 0===o?!e:o)?yi(i):function(t){return"".concat(yi(t),"Closed")}(i);return t[r]}return st},pi=function(t){var n=t.polar,i=t.scale,e=t.horizontal;return n?dt().defined(li).curve(xi(t)).angle(function(t){return function(n){return-1*t.x(void 0!==n._x1?n._x1:n._x)+Math.PI/2}}(i)).radius(fi(i)):ht().defined(li).curve(xi(t)).x(e?fi(i):_i(i)).y(e?_i(i):fi(i))},vi=function(t){var n=K(),e=n.canvasRef,o=n.clear,r=n.clip,s=t.style,c=t.data,a=s.stroke,h=s.strokeWidth,u=i().useCallback((function(n){var i=pi(t);n.strokeStyle=a,n.lineWidth=h,i.context(n)(c),n.stroke()}),[c,t,a,h]);return i().useEffect((function(){var t,n=null===(t=e.current)||void 0===t?void 0:t.getContext("2d");n&&(o(n),u(n),r(n))}),[e,u,o,r]),null};function di(t,n,i){return"M ".concat(t,", ").concat(n,"\n m ").concat(-i,", 0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*i,",0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*-i,",0")}function bi(t,n,i){var e=.87*i,o=t-e,r=n+e,s=t+e-o;return"M ".concat(o,", ").concat(r,"\n h").concat(s,"\n v-").concat(s,"\n h-").concat(s,"\n z")}function gi(t,n,i){var e=.87*i,o=Math.sqrt(e*e*2);return"M ".concat(t,", ").concat(n+o,"\n l ").concat(o,", -").concat(o,"\n l -").concat(o,", -").concat(o,"\n l -").concat(o,", ").concat(o,"\n l ").concat(o,", ").concat(o,"\n z")}function mi(t,n,i){var e=t+i,o=n-i,r=n+i/2*Math.sqrt(3);return"M ".concat(t-i,", ").concat(o,"\n L ").concat(e,", ").concat(o,"\n L ").concat(t,", ").concat(r,"\n z")}function Ti(t,n,i){var e=t+i,o=n-i/2*Math.sqrt(3),r=n+i;return"M ".concat(t-i,", ").concat(r,"\n L ").concat(e,", ").concat(r,"\n L ").concat(t,", ").concat(o,"\n z")}function wi(t,n,i){var e=1.1*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e,"\n v-").concat(o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(o,"\n z")}function Mi(t,n,i){var e=.8*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e+o,"\n v-").concat(2*o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(2*o,"\n z")}function ki(t,n,i){var e=1.1*i,o=e-.3*e,r=t-e,s=n+o/2,c=t+e-r;return"M ".concat(r,", ").concat(s,"\n h").concat(c,"\n v-").concat(o,"\n h-").concat(c,"\n z")}function Oi(t,n,i){var e=1.35*i,o=Math.PI/5,r=function(t,n,i){var e=10;e||(e=0);var o=e-0,r=Math.abs(o),s=o/r||1,c=Math.max(Math.ceil(r/1),0);return Array.from(Array(c),(function(t,n){return 0+n*s*1}))}().map((function(i){var r=i%2==0?e:e/2;return"".concat(r*Math.sin(o*(i+1))+t,",\n ").concat(r*Math.cos(o*(i+1))+n)}));return"M ".concat(r.join("L")," z")}var Si=function(t){var n=K().canvasRef,e=function(t){var n=c(t.size,t),i=a(t.style,t),e=c(t.symbol,t);return Object.assign({},t,{size:n,style:i,symbol:e})}(t),o=i().useCallback((function(t){var n=e.style,i=function(t){var n=t.x,i=t.y,e=t.size,o=t.symbol;if(t.getPath)return t.getPath(n,i,e);var r={circle:di,square:bi,diamond:gi,triangleDown:mi,triangleUp:Ti,plus:wi,minus:ki,star:Oi,cross:Mi};return("function"==typeof r[o]?r[o]:r.circle)(n,i,e)}(e);t.fillStyle=n.fill;var o=new Path2D(i);t.fill(o)}),[e]);return i().useEffect((function(){var t,i=null===(t=n.current)||void 0===t?void 0:t.getContext("2d");i&&o(i)}),[]),null}})(),o})()));
|
|
2
2
|
//# sourceMappingURL=victory-canvas.min.js.map
|
package/es/canvas-bar.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
|
|
2
|
-
import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
3
|
-
export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
|
|
4
|
-
alignment?: VictoryBarAlignmentType;
|
|
5
|
-
barOffset?: number[];
|
|
6
|
-
barRatio?: number;
|
|
7
|
-
barWidth?: NumberOrCallback;
|
|
8
|
-
cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
|
|
9
|
-
datum?: any;
|
|
10
|
-
getPath?: (props: CanvasBarProps) => string;
|
|
11
|
-
horizontal?: boolean;
|
|
12
|
-
width?: number;
|
|
13
|
-
x?: number;
|
|
14
|
-
y?: number;
|
|
15
|
-
y0?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare const CanvasBar: (props: CanvasBarProps) => null;
|
|
1
|
+
import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
|
|
2
|
+
import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
3
|
+
export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
alignment?: VictoryBarAlignmentType;
|
|
5
|
+
barOffset?: number[];
|
|
6
|
+
barRatio?: number;
|
|
7
|
+
barWidth?: NumberOrCallback;
|
|
8
|
+
cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
|
|
9
|
+
datum?: any;
|
|
10
|
+
getPath?: (props: CanvasBarProps) => string;
|
|
11
|
+
horizontal?: boolean;
|
|
12
|
+
width?: number;
|
|
13
|
+
x?: number;
|
|
14
|
+
y?: number;
|
|
15
|
+
y0?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const CanvasBar: (props: CanvasBarProps) => null;
|
|
18
18
|
//# sourceMappingURL=canvas-bar.d.ts.map
|
package/es/canvas-curve.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
-
export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
|
|
3
|
-
ariaLabel?: StringOrCallback;
|
|
4
|
-
interpolation?: string | Function;
|
|
5
|
-
openCurve?: boolean;
|
|
6
|
-
tabIndex?: NumberOrCallback;
|
|
7
|
-
}
|
|
8
|
-
export declare const CanvasCurve: (props: CanvasCurveProps) => null;
|
|
1
|
+
import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
+
export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
|
|
3
|
+
ariaLabel?: StringOrCallback;
|
|
4
|
+
interpolation?: string | Function;
|
|
5
|
+
openCurve?: boolean;
|
|
6
|
+
tabIndex?: NumberOrCallback;
|
|
7
|
+
}
|
|
8
|
+
export declare const CanvasCurve: (props: CanvasCurveProps) => null;
|
|
9
9
|
//# sourceMappingURL=canvas-curve.d.ts.map
|
package/es/canvas-group.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { PaddingProps } from "victory-core";
|
|
3
|
-
export interface CanvasGroupProps {
|
|
4
|
-
children?: React.ReactNode | React.ReactNode[];
|
|
5
|
-
clipWidth?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
padding?: PaddingProps;
|
|
8
|
-
width?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const CanvasGroup: {
|
|
11
|
-
(props: CanvasGroupProps): JSX.Element;
|
|
12
|
-
role: string;
|
|
13
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PaddingProps } from "victory-core";
|
|
3
|
+
export interface CanvasGroupProps {
|
|
4
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
5
|
+
clipWidth?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
padding?: PaddingProps;
|
|
8
|
+
width?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const CanvasGroup: {
|
|
11
|
+
(props: CanvasGroupProps): JSX.Element;
|
|
12
|
+
role: string;
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=canvas-group.d.ts.map
|
package/es/canvas-point.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
-
export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
|
|
3
|
-
datum?: any;
|
|
4
|
-
getPath?: (x: number, y: number, size: number) => string;
|
|
5
|
-
size?: number | Function;
|
|
6
|
-
symbol?: ScatterSymbolType | Function;
|
|
7
|
-
x?: number;
|
|
8
|
-
y?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const CanvasPoint: (props: CanvasPointProps) => null;
|
|
1
|
+
import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
+
export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
|
|
3
|
+
datum?: any;
|
|
4
|
+
getPath?: (x: number, y: number, size: number) => string;
|
|
5
|
+
size?: number | Function;
|
|
6
|
+
symbol?: ScatterSymbolType | Function;
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const CanvasPoint: (props: CanvasPointProps) => null;
|
|
11
11
|
//# sourceMappingURL=canvas-point.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type CanvasContextValue = {
|
|
3
|
-
canvasRef: React.RefObject<HTMLCanvasElement>;
|
|
4
|
-
clear: (ctx: CanvasRenderingContext2D) => void;
|
|
5
|
-
clip: (ctx: CanvasRenderingContext2D) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
|
|
8
|
-
export declare const useCanvasContext: () => CanvasContextValue;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare type CanvasContextValue = {
|
|
3
|
+
canvasRef: React.RefObject<HTMLCanvasElement>;
|
|
4
|
+
clear: (ctx: CanvasRenderingContext2D) => void;
|
|
5
|
+
clip: (ctx: CanvasRenderingContext2D) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
|
|
8
|
+
export declare const useCanvasContext: () => CanvasContextValue;
|
|
9
9
|
//# sourceMappingURL=use-canvas-context.d.ts.map
|
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./canvas-bar";
|
|
2
|
-
export * from "./canvas-group";
|
|
3
|
-
export * from "./canvas-curve";
|
|
4
|
-
export * from "./canvas-point";
|
|
5
|
-
export { useCanvasContext } from "./hooks/use-canvas-context";
|
|
1
|
+
export * from "./canvas-bar";
|
|
2
|
+
export * from "./canvas-group";
|
|
3
|
+
export * from "./canvas-curve";
|
|
4
|
+
export * from "./canvas-point";
|
|
5
|
+
export { useCanvasContext } from "./hooks/use-canvas-context";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/canvas-bar.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
|
|
2
|
-
import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
3
|
-
export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
|
|
4
|
-
alignment?: VictoryBarAlignmentType;
|
|
5
|
-
barOffset?: number[];
|
|
6
|
-
barRatio?: number;
|
|
7
|
-
barWidth?: NumberOrCallback;
|
|
8
|
-
cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
|
|
9
|
-
datum?: any;
|
|
10
|
-
getPath?: (props: CanvasBarProps) => string;
|
|
11
|
-
horizontal?: boolean;
|
|
12
|
-
width?: number;
|
|
13
|
-
x?: number;
|
|
14
|
-
y?: number;
|
|
15
|
-
y0?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare const CanvasBar: (props: CanvasBarProps) => null;
|
|
1
|
+
import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";
|
|
2
|
+
import { NumberOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
3
|
+
export interface CanvasBarProps extends VictoryCommonPrimitiveProps {
|
|
4
|
+
alignment?: VictoryBarAlignmentType;
|
|
5
|
+
barOffset?: number[];
|
|
6
|
+
barRatio?: number;
|
|
7
|
+
barWidth?: NumberOrCallback;
|
|
8
|
+
cornerRadius?: NumberOrCallback | VictoryBarCornerRadiusObject;
|
|
9
|
+
datum?: any;
|
|
10
|
+
getPath?: (props: CanvasBarProps) => string;
|
|
11
|
+
horizontal?: boolean;
|
|
12
|
+
width?: number;
|
|
13
|
+
x?: number;
|
|
14
|
+
y?: number;
|
|
15
|
+
y0?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const CanvasBar: (props: CanvasBarProps) => null;
|
|
18
18
|
//# sourceMappingURL=canvas-bar.d.ts.map
|
package/lib/canvas-curve.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
-
export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
|
|
3
|
-
ariaLabel?: StringOrCallback;
|
|
4
|
-
interpolation?: string | Function;
|
|
5
|
-
openCurve?: boolean;
|
|
6
|
-
tabIndex?: NumberOrCallback;
|
|
7
|
-
}
|
|
8
|
-
export declare const CanvasCurve: (props: CanvasCurveProps) => null;
|
|
1
|
+
import { NumberOrCallback, StringOrCallback, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
+
export interface CanvasCurveProps extends VictoryCommonPrimitiveProps {
|
|
3
|
+
ariaLabel?: StringOrCallback;
|
|
4
|
+
interpolation?: string | Function;
|
|
5
|
+
openCurve?: boolean;
|
|
6
|
+
tabIndex?: NumberOrCallback;
|
|
7
|
+
}
|
|
8
|
+
export declare const CanvasCurve: (props: CanvasCurveProps) => null;
|
|
9
9
|
//# sourceMappingURL=canvas-curve.d.ts.map
|
package/lib/canvas-group.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { PaddingProps } from "victory-core";
|
|
3
|
-
export interface CanvasGroupProps {
|
|
4
|
-
children?: React.ReactNode | React.ReactNode[];
|
|
5
|
-
clipWidth?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
padding?: PaddingProps;
|
|
8
|
-
width?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const CanvasGroup: {
|
|
11
|
-
(props: CanvasGroupProps): JSX.Element;
|
|
12
|
-
role: string;
|
|
13
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PaddingProps } from "victory-core";
|
|
3
|
+
export interface CanvasGroupProps {
|
|
4
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
5
|
+
clipWidth?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
padding?: PaddingProps;
|
|
8
|
+
width?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const CanvasGroup: {
|
|
11
|
+
(props: CanvasGroupProps): JSX.Element;
|
|
12
|
+
role: string;
|
|
13
|
+
};
|
|
14
14
|
//# sourceMappingURL=canvas-group.d.ts.map
|
package/lib/canvas-point.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
-
export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
|
|
3
|
-
datum?: any;
|
|
4
|
-
getPath?: (x: number, y: number, size: number) => string;
|
|
5
|
-
size?: number | Function;
|
|
6
|
-
symbol?: ScatterSymbolType | Function;
|
|
7
|
-
x?: number;
|
|
8
|
-
y?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare const CanvasPoint: (props: CanvasPointProps) => null;
|
|
1
|
+
import { ScatterSymbolType, VictoryCommonPrimitiveProps } from "victory-core";
|
|
2
|
+
export interface CanvasPointProps extends VictoryCommonPrimitiveProps {
|
|
3
|
+
datum?: any;
|
|
4
|
+
getPath?: (x: number, y: number, size: number) => string;
|
|
5
|
+
size?: number | Function;
|
|
6
|
+
symbol?: ScatterSymbolType | Function;
|
|
7
|
+
x?: number;
|
|
8
|
+
y?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const CanvasPoint: (props: CanvasPointProps) => null;
|
|
11
11
|
//# sourceMappingURL=canvas-point.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type CanvasContextValue = {
|
|
3
|
-
canvasRef: React.RefObject<HTMLCanvasElement>;
|
|
4
|
-
clear: (ctx: CanvasRenderingContext2D) => void;
|
|
5
|
-
clip: (ctx: CanvasRenderingContext2D) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
|
|
8
|
-
export declare const useCanvasContext: () => CanvasContextValue;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare type CanvasContextValue = {
|
|
3
|
+
canvasRef: React.RefObject<HTMLCanvasElement>;
|
|
4
|
+
clear: (ctx: CanvasRenderingContext2D) => void;
|
|
5
|
+
clip: (ctx: CanvasRenderingContext2D) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const CanvasContext: React.Context<CanvasContextValue | undefined>;
|
|
8
|
+
export declare const useCanvasContext: () => CanvasContextValue;
|
|
9
9
|
//# sourceMappingURL=use-canvas-context.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./canvas-bar";
|
|
2
|
-
export * from "./canvas-group";
|
|
3
|
-
export * from "./canvas-curve";
|
|
4
|
-
export * from "./canvas-point";
|
|
5
|
-
export { useCanvasContext } from "./hooks/use-canvas-context";
|
|
1
|
+
export * from "./canvas-bar";
|
|
2
|
+
export * from "./canvas-group";
|
|
3
|
+
export * from "./canvas-curve";
|
|
4
|
+
export * from "./canvas-point";
|
|
5
|
+
export { useCanvasContext } from "./hooks/use-canvas-context";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-canvas",
|
|
3
|
-
"version": "36.9.1",
|
|
3
|
+
"version": "36.9.2-next.1",
|
|
4
4
|
"description": "HTML5 Canvas Components for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,15 +21,12 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
|
-
"victory-bar": "^36.9.1",
|
|
25
|
-
"victory-core": "^36.9.1"
|
|
24
|
+
"victory-bar": "^36.9.2-next.1",
|
|
25
|
+
"victory-core": "^36.9.2-next.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=16.6.0"
|
|
29
29
|
},
|
|
30
|
-
"publishConfig": {
|
|
31
|
-
"provenance": true
|
|
32
|
-
},
|
|
33
30
|
"wireit": {
|
|
34
31
|
"### THESE WIREIT CONFIGS ARE GENERATED ####": {},
|
|
35
32
|
"### DO NOT MODIFY THESE MANUALLY ####": {},
|
|
@@ -250,7 +247,7 @@
|
|
|
250
247
|
]
|
|
251
248
|
},
|
|
252
249
|
"jest": {
|
|
253
|
-
"command": "
|
|
250
|
+
"command": "jest --passWithNoTests",
|
|
254
251
|
"files": [
|
|
255
252
|
"src/**/*.test.*",
|
|
256
253
|
"../../.babelrc.js",
|
|
@@ -259,9 +256,10 @@
|
|
|
259
256
|
],
|
|
260
257
|
"output": [],
|
|
261
258
|
"dependencies": [
|
|
262
|
-
"build
|
|
263
|
-
"../victory-
|
|
264
|
-
"../victory-
|
|
259
|
+
"../victory-bar:build",
|
|
260
|
+
"../victory-core:build",
|
|
261
|
+
"../victory-vendor:build",
|
|
262
|
+
"../victory-voronoi:build"
|
|
265
263
|
],
|
|
266
264
|
"packageLocks": [
|
|
267
265
|
"pnpm-lock.yaml"
|