(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
[983], {
71041: function(e, t, n) {
"use strict";
let r, o;
n.d(t, {
$: function() {
return _toLeftRightCenter
},
A: function() {
return _rlookupByKey
},
B: function() {
return getAngleFromPoint
},
C: function() {
return toPadding
},
D: function() {
return each
},
E: function() {
return getMaximumSize
},
F: function() {
return _getParentNode
},
G: function() {
return readUsedSize
},
H: function() {
return h
},
I: function() {
return throttled
},
J: function() {
return R
},
K: function() {
return _isDomSupported
},
L: function() {
return b
},
M: function() {
return _factorize
},
N: function() {
return finiteOrDefault
},
O: function() {
return callback
},
P: function() {
return l
},
Q: function() {
return _addGrace
},
R: function() {
return toDegrees
},
S: function() {
return _measureText
},
T: function() {
return s
},
U: function() {
return _int16Range
},
V: function() {
return _alignPixel
},
W: function() {
return clipArea
},
X: function() {
return renderText
},
Y: function() {
return unclipArea
},
Z: function() {
return toFont
},
_: function() {
return _arrayUnique
},
a: function() {
return resolve
},
a0: function() {
return _alignStartEnd
},
a1: function() {
return S
},
a2: function() {
return merge
},
a3: function() {
return _capitalize
},
a4: function() {
return P
},
a5: function() {
return isFunction
},
a6: function() {
return function _attachContext(e, t, n, r) {
let o = {
_cacheable: !1,
_proxy: e,
_context: t,
_subProxy: n,
_stack: new Set,
_descriptors: _descriptors(e, r),
setContext: t => _attachContext(e, t, n, r),
override: o => _attachContext(e.override(o), t, n, r)
};
return new Proxy(o, {
deleteProperty: (t, n) => (delete t[n], delete e[n], !0),
get: (e, t, n) => _cached(e, t, () => (function(e, t, n) {
let {
_proxy: r,
_context: o,
_subProxy: i,
_descriptors: a
} = e, l = r[t];
return isFunction(l) && a.isScriptable(t) && (l = function(e, t, n, r) {
let {
_proxy: o,
_context: i,
_subProxy: a,
_stack: l
} = n;
if (l.has(e)) throw Error("Recursion detected: " + Array.from(l).join("->") + "->" + e);
return l.add(e), t = t(i, a || r), l.delete(e), needsSubResolver(e, t) && (t = createSubResolver(o._scopes, o, e, t)), t
}(t, l, e, n)), isArray(l) && l.length && (l = function(e, t, n, r) {
let {
_proxy: o,
_context: i,
_subProxy: a,
_descriptors: l
} = n;
if (defined(i.index) && r(e)) t = t[i.index % t.length];
else if (isObject(t[0])) {
let n = t,
r = o._scopes.filter(e => e !== n);
for (let s of (t = [], n)) {
let n = createSubResolver(r, o, e, s);
t.push(_attachContext(n, i, a && a[e], l))
}
}
return t
}(t, l, e, a.isIndexable)), needsSubResolver(t, l) && (l = _attachContext(l, o, i && i[t], a)), l
})(e, t, n)),
getOwnPropertyDescriptor: (t, n) => t._descriptors.allKeys ? Reflect.has(e, n) ? {
enumerable: !0,
configurable: !0
} : void 0 : Reflect.getOwnPropertyDescriptor(e, n),
getPrototypeOf: () => Reflect.getPrototypeOf(e),
has: (t, n) => Reflect.has(e, n),
ownKeys: () => Reflect.ownKeys(e),
set: (t, n, r) => (e[n] = r, delete t[n], !0)
})
}
},
a7: function() {
return _createResolver
},
a8: function() {
return _descriptors
},
a9: function() {
return mergeIf
},
aA: function() {
return restoreTextDirection
},
aB: function() {
return noop
},
aC: function() {
return distanceBetweenPoints
},
aD: function() {
return _setMinAndMaxByKey
},
aE: function() {
return niceNum
},
aF: function() {
return almostWhole
},
aG: function() {
return almostEquals
},
aH: function() {
return _decimalPlaces
},
aI: function() {
return _longestText
},
aJ: function() {
return _filterBetween
},
aK: function() {
return _lookup
},
aQ: function() {
return toFontString
},
aa: function() {
return a
},
ab: function() {
return debounce
},
ac: function() {
return retinaScale
},
ad: function() {
return clearCanvas
},
ae: function() {
return setsEqual
},
af: function() {
return _elementsEqual
},
ag: function() {
return _isClickEvent
},
ah: function() {
return _isBetween
},
ai: function() {
return _readValueToProps
},
aj: function() {
return _updateBezierControlPoints
},
ak: function() {
return _computeSegments
},
al: function() {
return _boundSegments
},
am: function() {
return _steppedInterpolation
},
an: function() {
return _bezierInterpolation
},
ao: function() {
return _pointInLine
},
ap: function() {
return _steppedLineTo
},
aq: function() {
return _bezierCurveTo
},
ar: function() {
return drawPoint
},
as: function() {
return addRoundedRectPath
},
at: function() {
return toTRBL
},
au: function() {
return toTRBLCorners
},
av: function() {
return _boundSegment
},
aw: function() {
return _normalizeAngle
},
ax: function() {
return getRtlAdapter
},
ay: function() {
return overrideTextDirection
},
az: function() {
return _textX
},
b: function() {
return isArray
},
c: function() {
return color
},
d: function() {
return k
},
e: function() {
return m
},
f: function() {
return resolveObjectKey
},
g: function() {
return isNumberFinite
},
h: function() {
return createContext
},
i: function() {
return isObject
},
j: function() {
return defined
},
k: function() {
return isNullOrUndef
},
l: function() {
return listenArrayEvents
},
m: function() {
return toPercentage
},
n: function() {
return toDimension
},
o: function() {
return formatNumber
},
p: function() {
return _angleBetween
},
q: function() {
return isNumber
},
r: function() {
return i
},
s: function() {
return y
},
t: function() {
return toRadians
},
u: function() {
return unlistenArrayEvents
},
v: function() {
return valueOrDefault
},
w: function() {
return _limitValue
},
x: function() {
return _lookupByKey
},
y: function() {
return getRelativePosition
},
z: function() {
return _isPointInArea
}
});
let i = "undefined" == typeof window ? function(e) {
return e()
} : window.requestAnimationFrame;
function throttled(e, t, n) {
let r = n || (e => Array.prototype.slice.call(e)),
o = !1,
a = [];
return function(...n) {
a = r(n), o || (o = !0, i.call(window, () => {
o = !1, e.apply(t, a)
}))
}
}
function debounce(e, t) {
let n;
return function(...r) {
return t ? (clearTimeout(n), n = setTimeout(e, t, r)) : e.apply(this, r), t
}
}
let _toLeftRightCenter = e => "start" === e ? "left" : "end" === e ? "right" : "center",
_alignStartEnd = (e, t, n) => "start" === e ? t : "end" === e ? n : (t + n) / 2,
_textX = (e, t, n, r) => e === (r ? "left" : "right") ? n : "center" === e ? (t + n) / 2 : t;
function noop() {}
let a = (o = 0, function() {
return o++
});
function isNullOrUndef(e) {
return null == e
}
function isArray(e) {
if (Array.isArray && Array.isArray(e)) return !0;
let t = Object.prototype.toString.call(e);
return "[object" === t.substr(0, 7) && "Array]" === t.substr(-6)
}
function isObject(e) {
return null !== e && "[object Object]" === Object.prototype.toString.call(e)
}
let isNumberFinite = e => ("number" == typeof e || e instanceof Number) && isFinite(+e);
function finiteOrDefault(e, t) {
return isNumberFinite(e) ? e : t
}
function valueOrDefault(e, t) {
return void 0 === e ? t : e
}
let toPercentage = (e, t) => "string" == typeof e && e.endsWith("%") ? parseFloat(e) / 100 : e / t,
toDimension = (e, t) => "string" == typeof e && e.endsWith("%") ? parseFloat(e) / 100 * t : +e;
function callback(e, t, n) {
if (e && "function" == typeof e.call) return e.apply(n, t)
}
function each(e, t, n, r) {
let o, i, a;
if (isArray(e)) {
if (i = e.length, r)
for (o = i - 1; o >= 0; o--) t.call(n, e[o], o);
else
for (o = 0; o < i; o++) t.call(n, e[o], o)
} else if (isObject(e))
for (o = 0, i = (a = Object.keys(e)).length; o < i; o++) t.call(n, e[a[o]], a[o])
}
function _elementsEqual(e, t) {
let n, r, o, i;
if (!e || !t || e.length !== t.length) return !1;
for (n = 0, r = e.length; n < r; ++n)
if (o = e[n], i = t[n], o.datasetIndex !== i.datasetIndex || o.index !== i.index) return !1;
return !0
}
function clone$1(e) {
if (isArray(e)) return e.map(clone$1);
if (isObject(e)) {
let t = Object.create(null),
n = Object.keys(e),
r = n.length,
o = 0;
for (; o < r; ++o) t[n[o]] = clone$1(e[n[o]]);
return t
}
return e
}
function isValidKey(e) {
return -1 === ["__proto__", "prototype", "constructor"].indexOf(e)
}
function _merger(e, t, n, r) {
if (!isValidKey(e)) return;
let o = t[e],
i = n[e];
isObject(o) && isObject(i) ? merge(o, i, r) : t[e] = clone$1(i)
}
function merge(e, t, n) {
let r = isArray(t) ? t : [t],
o = r.length;
if (!isObject(e)) return e;
n = n || {};
let i = n.merger || _merger;
for (let a = 0; a < o; ++a) {
if (!isObject(t = r[a])) continue;
let o = Object.keys(t);
for (let r = 0, a = o.length; r < a; ++r) i(o[r], e, t, n)
}
return e
}
function mergeIf(e, t) {
return merge(e, t, {
merger: _mergerIf
})
}
function _mergerIf(e, t, n) {
if (!isValidKey(e)) return;
let r = t[e],
o = n[e];
isObject(r) && isObject(o) ? mergeIf(r, o) : Object.prototype.hasOwnProperty.call(t, e) || (t[e] = clone$1(o))
}
function indexOfDotOrLength(e, t) {
let n = e.indexOf(".", t);
return -1 === n ? e.length : n
}
function resolveObjectKey(e, t) {
if ("" === t) return e;
let n = 0,
r = indexOfDotOrLength(t, 0);
for (; e && r > n;) e = e[t.substr(n, r - n)], r = indexOfDotOrLength(t, n = r + 1);
return e
}
function _capitalize(e) {
return e.charAt(0).toUpperCase() + e.slice(1)
}
let defined = e => void 0 !== e,
isFunction = e => "function" == typeof e,
setsEqual = (e, t) => {
if (e.size !== t.size) return !1;
for (let n of e)
if (!t.has(n)) return !1;
return !0
};
function _isClickEvent(e) {
return "mouseup" === e.type || "click" === e.type || "contextmenu" === e.type
}
let l = Math.PI,
s = 2 * l,
u = s + l,
c = Number.POSITIVE_INFINITY,
d = l / 180,
h = l / 2,
p = l / 4,
g = 2 * l / 3,
b = Math.log10,
y = Math.sign;
function niceNum(e) {
let t = Math.round(e);
e = almostEquals(e, t, e / 1e3) ? t : e;
let n = Math.pow(10, Math.floor(b(e))),
r = e / n;
return (r <= 1 ? 1 : r <= 2 ? 2 : r <= 5 ? 5 : 10) * n
}
function _factorize(e) {
let t;
let n = [],
r = Math.sqrt(e);
for (t = 1; t < r; t++) e % t == 0 && (n.push(t), n.push(e / t));
return r === (0 | r) && n.push(r), n.sort((e, t) => e - t).pop(), n
}
function isNumber(e) {
return !isNaN(parseFloat(e)) && isFinite(e)
}
function almostEquals(e, t, n) {
return Math.abs(e - t) < n
}
function almostWhole(e, t) {
let n = Math.round(e);
return n - t <= e && n + t >= e
}
function _setMinAndMaxByKey(e, t, n) {
let r, o, i;
for (r = 0, o = e.length; r < o; r++) isNaN(i = e[r][n]) || (t.min = Math.min(t.min, i), t.max = Math.max(t.max, i))
}
function toRadians(e) {
return e * (l / 180)
}
function toDegrees(e) {
return e * (180 / l)
}
function _decimalPlaces(e) {
if (!isNumberFinite(e)) return;
let t = 1,
n = 0;
for (; Math.round(e * t) / t !== e;) t *= 10, n++;
return n
}
function getAngleFromPoint(e, t) {
let n = t.x - e.x,
r = t.y - e.y,
o = Math.atan2(r, n);
return o < -.5 * l && (o += s), {
angle: o,
distance: Math.sqrt(n * n + r * r)
}
}
function distanceBetweenPoints(e, t) {
return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2))
}
function _angleDiff(e, t) {
return (e - t + u) % s - l
}
function _normalizeAngle(e) {
return (e % s + s) % s
}
function _angleBetween(e, t, n, r) {
let o = _normalizeAngle(e),
i = _normalizeAngle(t),
a = _normalizeAngle(n),
l = _normalizeAngle(i - o),
s = _normalizeAngle(a - o),
u = _normalizeAngle(o - i),
c = _normalizeAngle(o - a);
return o === i || o === a || r && i === a || l > s && u < c
}
function _limitValue(e, t, n) {
return Math.max(t, Math.min(n, e))
}
function _int16Range(e) {
return _limitValue(e, -32768, 32767)
}
function _isBetween(e, t, n, r = 1e-6) {
return e >= Math.min(t, n) - r && e <= Math.max(t, n) + r
}
let atEdge = e => 0 === e || 1 === e,
elasticIn = (e, t, n) => -(Math.pow(2, 10 * (e -= 1)) * Math.sin((e - t) * s / n)),
elasticOut = (e, t, n) => Math.pow(2, -10 * e) * Math.sin((e - t) * s / n) + 1,
m = {
linear: e => e,
easeInQuad: e => e * e,
easeOutQuad: e => -e * (e - 2),
easeInOutQuad: e => (e /= .5) < 1 ? .5 * e * e : -.5 * (--e * (e - 2) - 1),
easeInCubic: e => e * e * e,
easeOutCubic: e => (e -= 1) * e * e + 1,
easeInOutCubic: e => (e /= .5) < 1 ? .5 * e * e * e : .5 * ((e -= 2) * e * e + 2),
easeInQuart: e => e * e * e * e,
easeOutQuart: e => -((e -= 1) * e * e * e - 1),
easeInOutQuart: e => (e /= .5) < 1 ? .5 * e * e * e * e : -.5 * ((e -= 2) * e * e * e - 2),
easeInQuint: e => e * e * e * e * e,
easeOutQuint: e => (e -= 1) * e * e * e * e + 1,
easeInOutQuint: e => (e /= .5) < 1 ? .5 * e * e * e * e * e : .5 * ((e -= 2) * e * e * e * e + 2),
easeInSine: e => -Math.cos(e * h) + 1,
easeOutSine: e => Math.sin(e * h),
easeInOutSine: e => -.5 * (Math.cos(l * e) - 1),
easeInExpo: e => 0 === e ? 0 : Math.pow(2, 10 * (e - 1)),
easeOutExpo: e => 1 === e ? 1 : -Math.pow(2, -10 * e) + 1,
easeInOutExpo: e => atEdge(e) ? e : e < .5 ? .5 * Math.pow(2, 10 * (2 * e - 1)) : .5 * (-Math.pow(2, -10 * (2 * e - 1)) + 2),
easeInCirc: e => e >= 1 ? e : -(Math.sqrt(1 - e * e) - 1),
easeOutCirc: e => Math.sqrt(1 - (e -= 1) * e),
easeInOutCirc: e => (e /= .5) < 1 ? -.5 * (Math.sqrt(1 - e * e) - 1) : .5 * (Math.sqrt(1 - (e -= 2) * e) + 1),
easeInElastic: e => atEdge(e) ? e : elasticIn(e, .075, .3),
easeOutElastic: e => atEdge(e) ? e : elasticOut(e, .075, .3),
easeInOutElastic: e => atEdge(e) ? e : e < .5 ? .5 * elasticIn(2 * e, .1125, .45) : .5 + .5 * elasticOut(2 * e - 1, .1125, .45),
easeInBack: e => e * e * (2.70158 * e - 1.70158),
easeOutBack: e => (e -= 1) * e * (2.70158 * e + 1.70158) + 1,
easeInOutBack(e) {
let t = 1.70158;
return (e /= .5) < 1 ? .5 * (e * e * (((t *= 1.525) + 1) * e - t)) : .5 * ((e -= 2) * e * (((t *= 1.525) + 1) * e + t) + 2)
},
easeInBounce: e => 1 - m.easeOutBounce(1 - e),
easeOutBounce: e => e < .36363636363636365 ? 7.5625 * e * e : e < .7272727272727273 ? 7.5625 * (e -= .5454545454545454) * e + .75 : e < .9090909090909091 ? 7.5625 * (e -= .8181818181818182) * e + .9375 : 7.5625 * (e -= .9545454545454546) * e + .984375,
easeInOutBounce: e => e < .5 ? .5 * m.easeInBounce(2 * e) : .5 * m.easeOutBounce(2 * e - 1) + .5
},
x = {
0: 0,
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
8: 8,
9: 9,
A: 10,
B: 11,
C: 12,
D: 13,
E: 14,
F: 15,
a: 10,
b: 11,
c: 12,
d: 13,
e: 14,
f: 15
},
v = "0123456789ABCDEF",
h1 = e => v[15 & e],
h2 = e => v[(240 & e) >> 4] + v[15 & e],
eq = e => (240 & e) >> 4 == (15 & e);
function round(e) {
return e + .5 | 0
}
let lim = (e, t, n) => Math.max(Math.min(e, n), t);
function p2b(e) {
return lim(round(2.55 * e), 0, 255)
}
function n2b(e) {
return lim(round(255 * e), 0, 255)
}
function b2n(e) {
return lim(round(e / 2.55) / 100, 0, 1)
}
function n2p(e) {
return lim(round(100 * e), 0, 100)
}
let _ = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,
w = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
function hsl2rgbn(e, t, n) {
let r = t * Math.min(n, 1 - n),
f = (t, o = (t + e / 30) % 12) => n - r * Math.max(Math.min(o - 3, 9 - o, 1), -1);
return [f(0), f(8), f(4)]
}
function hsv2rgbn(e, t, n) {
let f = (r, o = (r + e / 60) % 6) => n - n * t * Math.max(Math.min(o, 4 - o, 1), 0);
return [f(5), f(3), f(1)]
}
function hwb2rgbn(e, t, n) {
let r;
let o = hsl2rgbn(e, 1, .5);
for (t + n > 1 && (r = 1 / (t + n), t *= r, n *= r), r = 0; r < 3; r++) o[r] *= 1 - t - n, o[r] += t;
return o
}
function rgb2hsl(e) {
let t, n, r;
let o = e.r / 255,
i = e.g / 255,
a = e.b / 255,
l = Math.max(o, i, a),
s = Math.min(o, i, a),
u = (l + s) / 2;
return l !== s && (r = l - s, n = u > .5 ? r / (2 - l - s) : r / (l + s), t = 60 * (t = l === o ? (i - a) / r + (i < a ? 6 : 0) : l === i ? (a - o) / r + 2 : (o - i) / r + 4) + .5), [0 | t, n || 0, u]
}
function calln(e, t, n, r) {
return (Array.isArray(t) ? e(t[0], t[1], t[2]) : e(t, n, r)).map(n2b)
}
function hue(e) {
return (e % 360 + 360) % 360
}
let O = {
x: "dark",
Z: "light",
Y: "re",
X: "blu",
W: "gr",
V: "medium",
U: "slate",
A: "ee",
T: "ol",
S: "or",
B: "ra",
C: "lateg",
D: "ights",
R: "in",
Q: "turquois",
E: "hi",
P: "ro",
O: "al",
N: "le",
M: "de",
L: "yello",
F: "en",
K: "ch",
G: "arks",
H: "ea",
I: "ightg",
J: "wh"
},
M = {
OiceXe: "f0f8ff",
antiquewEte: "faebd7",
aqua: "ffff",
aquamarRe: "7fffd4",
azuY: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "0",
blanKedOmond: "ffebcd",
Xe: "ff",
XeviTet: "8a2be2",
bPwn: "a52a2a",
burlywood: "deb887",
caMtXe: "5f9ea0",
KartYuse: "7fff00",
KocTate: "d2691e",
cSO: "ff7f50",
cSnflowerXe: "6495ed",
cSnsilk: "fff8dc",
crimson: "dc143c",
cyan: "ffff",
xXe: "8b",
xcyan: "8b8b",
xgTMnPd: "b8860b",
xWay: "a9a9a9",
xgYF: "6400",
xgYy: "a9a9a9",
xkhaki: "bdb76b",
xmagFta: "8b008b",
xTivegYF: "556b2f",
xSange: "ff8c00",
xScEd: "9932cc",
xYd: "8b0000",
xsOmon: "e9967a",
xsHgYF: "8fbc8f",
xUXe: "483d8b",
xUWay: "2f4f4f",
xUgYy: "2f4f4f",
xQe: "ced1",
xviTet: "9400d3",
dAppRk: "ff1493",
dApskyXe: "bfff",
dimWay: "696969",
dimgYy: "696969",
dodgerXe: "1e90ff",
fiYbrick: "b22222",
flSOwEte: "fffaf0",
foYstWAn: "228b22",
fuKsia: "ff00ff",
gaRsbSo: "dcdcdc",
ghostwEte: "f8f8ff",
gTd: "ffd700",
gTMnPd: "daa520",
Way: "808080",
gYF: "8000",
gYFLw: "adff2f",
gYy: "808080",
honeyMw: "f0fff0",
hotpRk: "ff69b4",
RdianYd: "cd5c5c",
Rdigo: "4b0082",
ivSy: "fffff0",
khaki: "f0e68c",
lavFMr: "e6e6fa",
lavFMrXsh: "fff0f5",
lawngYF: "7cfc00",
NmoncEffon: "fffacd",
ZXe: "add8e6",
ZcSO: "f08080",
Zcyan: "e0ffff",
ZgTMnPdLw: "fafad2",
ZWay: "d3d3d3",
ZgYF: "90ee90",
ZgYy: "d3d3d3",
ZpRk: "ffb6c1",
ZsOmon: "ffa07a",
ZsHgYF: "20b2aa",
ZskyXe: "87cefa",
ZUWay: "778899",
ZUgYy: "778899",
ZstAlXe: "b0c4de",
ZLw: "ffffe0",
lime: "ff00",
limegYF: "32cd32",
lRF: "faf0e6",
magFta: "ff00ff",
maPon: "800000",
VaquamarRe: "66cdaa",
VXe: "cd",
VScEd: "ba55d3",
VpurpN: "9370db",
VsHgYF: "3cb371",
VUXe: "7b68ee",
VsprRggYF: "fa9a",
VQe: "48d1cc",
VviTetYd: "c71585",
midnightXe: "191970",
mRtcYam: "f5fffa",
mistyPse: "ffe4e1",
moccasR: "ffe4b5",
navajowEte: "ffdead",
navy: "80",
Tdlace: "fdf5e6",
Tive: "808000",
TivedBb: "6b8e23",
Sange: "ffa500",
SangeYd: "ff4500",
ScEd: "da70d6",
pOegTMnPd: "eee8aa",
pOegYF: "98fb98",
pOeQe: "afeeee",
pOeviTetYd: "db7093",
papayawEp: "ffefd5",
pHKpuff: "ffdab9",
peru: "cd853f",
pRk: "ffc0cb",
plum: "dda0dd",
powMrXe: "b0e0e6",
purpN: "800080",
YbeccapurpN: "663399",
Yd: "ff0000",
Psybrown: "bc8f8f",
PyOXe: "4169e1",
saddNbPwn: "8b4513",
sOmon: "fa8072",
sandybPwn: "f4a460",
sHgYF: "2e8b57",
sHshell: "fff5ee",
siFna: "a0522d",
silver: "c0c0c0",
skyXe: "87ceeb",
UXe: "6a5acd",
UWay: "708090",
UgYy: "708090",
snow: "fffafa",
sprRggYF: "ff7f",
stAlXe: "4682b4",
tan: "d2b48c",
teO: "8080",
tEstN: "d8bfd8",
tomato: "ff6347",
Qe: "40e0d0",
viTet: "ee82ee",
JHt: "f5deb3",
wEte: "ffffff",
wEtesmoke: "f5f5f5",
Lw: "ffff00",
LwgYF: "9acd32"
};
function modHSL(e, t, n) {
if (e) {
let r = rgb2hsl(e);
r[t] = Math.max(0, Math.min(r[t] + r[t] * n, 0 === t ? 360 : 1)), r = calln(hsl2rgbn, r, void 0, void 0), e.r = r[0], e.g = r[1], e.b = r[2]
}
}
function clone(e, t) {
return e ? Object.assign(t || {}, e) : e
}
function fromObject(e) {
var t = {
r: 0,
g: 0,
b: 0,
a: 255
};
return Array.isArray(e) ? e.length >= 3 && (t = {
r: e[0],
g: e[1],
b: e[2],
a: 255
}, e.length > 3 && (t.a = n2b(e[3]))) : (t = clone(e, {
r: 0,
g: 0,
b: 0,
a: 1
})).a = n2b(t.a), t
}
let Color = class Color {
constructor(e) {
let t;
if (e instanceof Color) return e;
let n = typeof e;
if ("object" === n) t = fromObject(e);
else if ("string" === n) {
var o, i;
i = e.length, "#" === e[0] && (4 === i || 5 === i ? o = {
r: 255 & 17 * x[e[1]],
g: 255 & 17 * x[e[2]],
b: 255 & 17 * x[e[3]],
a: 5 === i ? 17 * x[e[4]] : 255
} : (7 === i || 9 === i) && (o = {
r: x[e[1]] << 4 | x[e[2]],
g: x[e[3]] << 4 | x[e[4]],
b: x[e[5]] << 4 | x[e[6]],
a: 9 === i ? x[e[7]] << 4 | x[e[8]] : 255
})), t = o || function(e) {
r || ((r = function() {
let e, t, n, r, o;
let i = {},
a = Object.keys(M),
l = Object.keys(O);
for (e = 0; e < a.length; e++) {
for (t = 0, r = o = a[e]; t < l.length; t++) n = l[t], o = o.replace(n, O[n]);
n = parseInt(M[r], 16), i[o] = [n >> 16 & 255, n >> 8 & 255, 255 & n]
}
return i
}()).transparent = [0, 0, 0, 0]);
let t = r[e.toLowerCase()];
return t && {
r: t[0],
g: t[1],
b: t[2],
a: 4 === t.length ? t[3] : 255
}
}(e) || ("r" === e.charAt(0) ? function(e) {
let t, n, r;
let o = _.exec(e),
i = 255;
if (o) {
if (o[7] !== t) {
let e = +o[7];
i = 255 & (o[8] ? p2b(e) : 255 * e)
}
return t = +o[1], n = +o[3], r = +o[5], {
r: t = 255 & (o[2] ? p2b(t) : t),
g: n = 255 & (o[4] ? p2b(n) : n),
b: r = 255 & (o[6] ? p2b(r) : r),
a: i
}
}
}(e) : function(e) {
let t;
let n = w.exec(e),
r = 255;
if (!n) return;
n[5] !== t && (r = n[6] ? p2b(+n[5]) : n2b(+n[5]));
let o = hue(+n[2]),
i = +n[3] / 100,
a = +n[4] / 100;
return {
r: (t = "hwb" === n[1] ? calln(hwb2rgbn, o, i, a) : "hsv" === n[1] ? calln(hsv2rgbn, o, i, a) : calln(hsl2rgbn, o, i, a))[0],
g: t[1],
b: t[2],
a: r
}
}(e))
}
this._rgb = t, this._valid = !!t
}
get valid() {
return this._valid
}
get rgb() {
var e = clone(this._rgb);
return e && (e.a = b2n(e.a)), e
}
set rgb(e) {
this._rgb = fromObject(e)
}
rgbString() {
var e;
return this._valid ? (e = this._rgb) && (e.a < 255 ? `rgba(${e.r}, ${e.g}, ${e.b}, ${b2n(e.a)})` : `rgb(${e.r}, ${e.g}, ${e.b})`) : this._rgb
}
hexString() {
var e, t, n;
return this._valid ? (n = eq((t = e = this._rgb).r) && eq(t.g) && eq(t.b) && eq(t.a) ? h1 : h2, e ? "#" + n(e.r) + n(e.g) + n(e.b) + (e.a < 255 ? n(e.a) : "") : e) : this._rgb
}
hslString() {
return this._valid ? function(e) {
if (!e) return;
let t = rgb2hsl(e),
n = t[0],
r = n2p(t[1]),
o = n2p(t[2]);
return e.a < 255 ? `hsla(${n}, ${r}%, ${o}%, ${b2n(e.a)})` : `hsl(${n}, ${r}%, ${o}%)`
}(this._rgb) : this._rgb
}
mix(e, t) {
if (e) {
let n;
let r = this.rgb,
o = e.rgb,
i = t === n ? .5 : t,
a = 2 * i - 1,
l = r.a - o.a,
s = ((a * l == -1 ? a : (a + l) / (1 + a * l)) + 1) / 2;
n = 1 - s, r.r = 255 & s * r.r + n * o.r + .5, r.g = 255 & s * r.g + n * o.g + .5, r.b = 255 & s * r.b + n * o.b + .5, r.a = i * r.a + (1 - i) * o.a, this.rgb = r
}
return this
}
clone() {
return new Color(this.rgb)
}
alpha(e) {
return this._rgb.a = n2b(e), this
}
clearer(e) {
let t = this._rgb;
return t.a *= 1 - e, this
}
greyscale() {
let e = this._rgb,
t = round(.3 * e.r + .59 * e.g + .11 * e.b);
return e.r = e.g = e.b = t, this
}
opaquer(e) {
let t = this._rgb;
return t.a *= 1 + e, this
}
negate() {
let e = this._rgb;
return e.r = 255 - e.r, e.g = 255 - e.g, e.b = 255 - e.b, this
}
lighten(e) {
return modHSL(this._rgb, 2, e), this
}
darken(e) {
return modHSL(this._rgb, 2, -e), this
}
saturate(e) {
return modHSL(this._rgb, 1, e), this
}
desaturate(e) {
return modHSL(this._rgb, 1, -e), this
}
rotate(e) {
var t, n;
return (n = rgb2hsl(t = this._rgb))[0] = hue(n[0] + e), n = calln(hsl2rgbn, n, void 0, void 0), t.r = n[0], t.g = n[1], t.b = n[2], this
}
};
let isPatternOrGradient = e => e instanceof CanvasGradient || e instanceof CanvasPattern;
function color(e) {
return isPatternOrGradient(e) ? e : new Color(e)
}
function getHoverColor(e) {
return isPatternOrGradient(e) ? e : new Color(e).saturate(.5).darken(.1).hexString()
}
let S = Object.create(null),
P = Object.create(null);
function getScope$1(e, t) {
if (!t) return e;
let n = t.split(".");
for (let t = 0, r = n.length; t < r; ++t) {
let r = n[t];
e = e[r] || (e[r] = Object.create(null))
}
return e
}
function set(e, t, n) {
return "string" == typeof t ? merge(getScope$1(e, t), n) : merge(getScope$1(e, ""), t)
}
var k = new class {
constructor(e) {
this.animation = void 0, this.backgroundColor = "rgba(0,0,0,0.1)", this.borderColor = "rgba(0,0,0,0.1)", this.color = "#666", this.datasets = {}, this.devicePixelRatio = e => e.chart.platform.getDevicePixelRatio(), this.elements = {}, this.events = ["mousemove", "mouseout", "click", "touchstart", "touchmove"], this.font = {
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
size: 12,
style: "normal",
lineHeight: 1.2,
weight: null
}, this.hover = {}, this.hoverBackgroundColor = (e, t) => getHoverColor(t.backgroundColor), this.hoverBorderColor = (e, t) => getHoverColor(t.borderColor), this.hoverColor = (e, t) => getHoverColor(t.color), this.indexAxis = "x", this.interaction = {
mode: "nearest",
intersect: !0
}, this.maintainAspectRatio = !0, this.onHover = null, this.onClick = null, this.parsing = !0, this.plugins = {}, this.responsive = !0, this.scale = void 0, this.scales = {}, this.showLine = !0, this.drawActiveElementsOnTop = !0, this.describe(e)
}
set(e, t) {
return set(this, e, t)
}
get(e) {
return getScope$1(this, e)
}
describe(e, t) {
return set(P, e, t)
}
override(e, t) {
return set(S, e, t)
}
route(e, t, n, r) {
let o = getScope$1(this, e),
i = getScope$1(this, n),
a = "_" + t;
Object.defineProperties(o, {
[a]: {
value: o[t],
writable: !0
},
[t]: {
enumerable: !0,
get() {
let e = this[a],
t = i[r];
return isObject(e) ? Object.assign({}, t, e) : valueOrDefault(e, t)
},
set(e) {
this[a] = e
}
}
})
}
}({
_scriptable: e => !e.startsWith("on"),
_indexable: e => "events" !== e,
hover: {
_fallback: "interaction"
},
interaction: {
_scriptable: !1,
_indexable: !1
}
});
function toFontString(e) {
return !e || isNullOrUndef(e.size) || isNullOrUndef(e.family) ? null : (e.style ? e.style + " " : "") + (e.weight ? e.weight + " " : "") + e.size + "px " + e.family
}
function _measureText(e, t, n, r, o) {
let i = t[o];
return i || (i = t[o] = e.measureText(o).width, n.push(o)), i > r && (r = i), r
}
function _longestText(e, t, n, r) {
let o, i, a, l, s;
let u = (r = r || {}).data = r.data || {},
c = r.garbageCollect = r.garbageCollect || [];
r.font !== t && (u = r.data = {}, c = r.garbageCollect = [], r.font = t), e.save(), e.font = t;
let d = 0,
h = n.length;
for (o = 0; o < h; o++)
if (null != (l = n[o]) && !0 !== isArray(l)) d = _measureText(e, u, c, d, l);
else if (isArray(l))
for (i = 0, a = l.length; i < a; i++) null == (s = l[i]) || isArray(s) || (d = _measureText(e, u, c, d, s));
e.restore();
let p = c.length / 2;
if (p > n.length) {
for (o = 0; o < p; o++) delete u[c[o]];
c.splice(0, p)
}
return d
}
function _alignPixel(e, t, n) {
let r = e.currentDevicePixelRatio,
o = 0 !== n ? Math.max(n / 2, .5) : 0;
return Math.round((t - o) * r) / r + o
}
function clearCanvas(e, t) {
(t = t || e.getContext("2d")).save(), t.resetTransform(), t.clearRect(0, 0, e.width, e.height), t.restore()
}
function drawPoint(e, t, n, r) {
let o, i, a, u, c;
let b = t.pointStyle,
y = t.rotation,
m = t.radius,
x = (y || 0) * d;
if (b && "object" == typeof b && ("[object HTMLImageElement]" === (o = b.toString()) || "[object HTMLCanvasElement]" === o)) {
e.save(), e.translate(n, r), e.rotate(x), e.drawImage(b, -b.width / 2, -b.height / 2, b.width, b.height), e.restore();
return
}
if (!isNaN(m) && !(m <= 0)) {
switch (e.beginPath(), b) {
default:
e.arc(n, r, m, 0, s), e.closePath();
break;
case "triangle":
e.moveTo(n + Math.sin(x) * m, r - Math.cos(x) * m), x += g, e.lineTo(n + Math.sin(x) * m, r - Math.cos(x) * m), x += g, e.lineTo(n + Math.sin(x) * m, r - Math.cos(x) * m), e.closePath();
break;
case "rectRounded":
c = .516 * m, i = Math.cos(x + p) * (u = m - c), a = Math.sin(x + p) * u, e.arc(n - i, r - a, c, x - l, x - h), e.arc(n + a, r - i, c, x - h, x), e.arc(n + i, r + a, c, x, x + h), e.arc(n - a, r + i, c, x + h, x + l), e.closePath();
break;
case "rect":
if (!y) {
u = Math.SQRT1_2 * m, e.rect(n - u, r - u, 2 * u, 2 * u);
break
}
x += p;
case "rectRot":
i = Math.cos(x) * m, a = Math.sin(x) * m, e.moveTo(n - i, r - a), e.lineTo(n + a, r - i), e.lineTo(n + i, r + a), e.lineTo(n - a, r + i), e.closePath();
break;
case "crossRot":
x += p;
case "cross":
i = Math.cos(x) * m, a = Math.sin(x) * m, e.moveTo(n - i, r - a), e.lineTo(n + i, r + a), e.moveTo(n + a, r - i), e.lineTo(n - a, r + i);
break;
case "star":
i = Math.cos(x) * m, a = Math.sin(x) * m, e.moveTo(n - i, r - a), e.lineTo(n + i, r + a), e.moveTo(n + a, r - i), e.lineTo(n - a, r + i), x += p, i = Math.cos(x) * m, a = Math.sin(x) * m, e.moveTo(n - i, r - a), e.lineTo(n + i, r + a), e.moveTo(n + a, r - i), e.lineTo(n - a, r + i);
break;
case "line":
i = Math.cos(x) * m, a = Math.sin(x) * m, e.moveTo(n - i, r - a), e.lineTo(n + i, r + a);
break;
case "dash":
e.moveTo(n, r), e.lineTo(n + Math.cos(x) * m, r + Math.sin(x) * m)
}
e.fill(), t.borderWidth > 0 && e.stroke()
}
}
function _isPointInArea(e, t, n) {
return n = n || .5, !t || e && e.x > t.left - n && e.x < t.right + n && e.y > t.top - n && e.y < t.bottom + n
}
function clipArea(e, t) {
e.save(), e.beginPath(), e.rect(t.left, t.top, t.right - t.left, t.bottom - t.top), e.clip()
}
function unclipArea(e) {
e.restore()
}
function _steppedLineTo(e, t, n, r, o) {
if (!t) return e.lineTo(n.x, n.y);
if ("middle" === o) {
let r = (t.x + n.x) / 2;
e.lineTo(r, t.y), e.lineTo(r, n.y)
} else "after" === o != !!r ? e.lineTo(t.x, n.y) : e.lineTo(n.x, t.y);
e.lineTo(n.x, n.y)
}
function _bezierCurveTo(e, t, n, r) {
if (!t) return e.lineTo(n.x, n.y);
e.bezierCurveTo(r ? t.cp1x : t.cp2x, r ? t.cp1y : t.cp2y, r ? n.cp2x : n.cp1x, r ? n.cp2y : n.cp1y, n.x, n.y)
}
function renderText(e, t, n, r, o, i = {}) {
let a, l;
let s = isArray(t) ? t : [t],
u = i.strokeWidth > 0 && "" !== i.strokeColor;
for (e.save(), e.font = o.string, i.translation && e.translate(i.translation[0], i.translation[1]), isNullOrUndef(i.rotation) || e.rotate(i.rotation), i.color && (e.fillStyle = i.color), i.textAlign && (e.textAlign = i.textAlign), i.textBaseline && (e.textBaseline = i.textBaseline), a = 0; a < s.length; ++a) l = s[a], u && (i.strokeColor && (e.strokeStyle = i.strokeColor), isNullOrUndef(i.strokeWidth) || (e.lineWidth = i.strokeWidth), e.strokeText(l, n, r, i.maxWidth)), e.fillText(l, n, r, i.maxWidth),
function(e, t, n, r, o) {
if (o.strikethrough || o.underline) {
let i = e.measureText(r),
a = t - i.actualBoundingBoxLeft,
l = t + i.actualBoundingBoxRight,
s = n - i.actualBoundingBoxAscent,
u = n + i.actualBoundingBoxDescent,
c = o.strikethrough ? (s + u) / 2 : u;
e.strokeStyle = e.fillStyle, e.beginPath(), e.lineWidth = o.decorationWidth || 2, e.moveTo(a, c), e.lineTo(l, c), e.stroke()
}
}(e, n, r, l, i), r += o.lineHeight;
e.restore()
}
function addRoundedRectPath(e, t) {
let {
x: n,
y: r,
w: o,
h: i,
radius: a
} = t;
e.arc(n + a.topLeft, r + a.topLeft, a.topLeft, -h, l, !0), e.lineTo(n, r + i - a.bottomLeft), e.arc(n + a.bottomLeft, r + i - a.bottomLeft, a.bottomLeft, l, h, !0), e.lineTo(n + o - a.bottomRight, r + i), e.arc(n + o - a.bottomRight, r + i - a.bottomRight, a.bottomRight, h, 0, !0), e.lineTo(n + o, r + a.topRight), e.arc(n + o - a.topRight, r + a.topRight, a.topRight, 0, -h, !0), e.lineTo(n + a.topLeft, r)
}
let A = new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),
T = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/),
numberOrZero = e => +e || 0;
function _readValueToProps(e, t) {
let n = {},
r = isObject(t),
o = r ? Object.keys(t) : t,
i = isObject(e) ? r ? n => valueOrDefault(e[n], e[t[n]]) : t => e[t] : () => e;
for (let e of o) n[e] = numberOrZero(i(e));
return n
}
function toTRBL(e) {
return _readValueToProps(e, {
top: "y",
right: "x",
bottom: "y",
left: "x"
})
}
function toTRBLCorners(e) {
return _readValueToProps(e, ["topLeft", "topRight", "bottomLeft", "bottomRight"])
}
function toPadding(e) {
let t = toTRBL(e);
return t.width = t.left + t.right, t.height = t.top + t.bottom, t
}
function toFont(e, t) {
e = e || {}, t = t || k.font;
let n = valueOrDefault(e.size, t.size);
"string" == typeof n && (n = parseInt(n, 10));
let r = valueOrDefault(e.style, t.style);
r && !("" + r).match(T) && (console.warn('Invalid font style specified: "' + r + '"'), r = "");
let o = {
family: valueOrDefault(e.family, t.family),
lineHeight: function(e, t) {
let n = ("" + e).match(A);
if (!n || "normal" === n[1]) return 1.2 * t;
switch (e = +n[2], n[3]) {
case "px":
return e;
case "%":
e /= 100
}
return t * e
}(valueOrDefault(e.lineHeight, t.lineHeight), n),
size: n,
style: r,
weight: valueOrDefault(e.weight, t.weight),
string: ""
};
return o.string = toFontString(o), o
}
function resolve(e, t, n, r) {
let o, i, a, l = !0;
for (o = 0, i = e.length; o < i; ++o)
if (void 0 !== (a = e[o]) && (void 0 !== t && "function" == typeof a && (a = a(t), l = !1), void 0 !== n && isArray(a) && (a = a[n % a.length], l = !1), void 0 !== a)) return r && !l && (r.cacheable = !1), a
}
function _addGrace(e, t, n) {
let {
min: r,
max: o
} = e, i = toDimension(t, (o - r) / 2), keepZero = (e, t) => n && 0 === e ? 0 : e + t;
return {
min: keepZero(r, -Math.abs(i)),
max: keepZero(o, i)
}
}
function createContext(e, t) {
return Object.assign(Object.create(e), t)
}
function _lookup(e, t, n) {
let r;
n = n || (n => e[n] < t);
let o = e.length - 1,
i = 0;
for (; o - i > 1;) n(r = i + o >> 1) ? i = r : o = r;
return {
lo: i,
hi: o
}
}
let _lookupByKey = (e, t, n) => _lookup(e, n, r => e[r][t] < n),
_rlookupByKey = (e, t, n) => _lookup(e, n, r => e[r][t] >= n);
function _filterBetween(e, t, n) {
let r = 0,
o = e.length;
for (; r < o && e[r] < t;) r++;
for (; o > r && e[o - 1] > n;) o--;
return r > 0 || o < e.length ? e.slice(r, o) : e
}
let I = ["push", "pop", "shift", "splice", "unshift"];
function listenArrayEvents(e, t) {
if (e._chartjs) {
e._chartjs.listeners.push(t);
return
}
Object.defineProperty(e, "_chartjs", {
configurable: !0,
enumerable: !1,
value: {
listeners: [t]
}
}), I.forEach(t => {
let n = "_onData" + _capitalize(t),
r = e[t];
Object.defineProperty(e, t, {
configurable: !0,
enumerable: !1,
value(...t) {
let o = r.apply(this, t);
return e._chartjs.listeners.forEach(e => {
"function" == typeof e[n] && e[n](...t)
}), o
}
})
})
}
function unlistenArrayEvents(e, t) {
let n = e._chartjs;
if (!n) return;
let r = n.listeners,
o = r.indexOf(t); - 1 !== o && r.splice(o, 1), r.length > 0 || (I.forEach(t => {
delete e[t]
}), delete e._chartjs)
}
function _arrayUnique(e) {
let t, n;
let r = new Set;
for (t = 0, n = e.length; t < n; ++t) r.add(e[t]);
return r.size === n ? e : Array.from(r)
}
function _createResolver(e, t = [""], n = e, r, o = () => e[0]) {
defined(r) || (r = _resolve("_fallback", e));
let i = {
[Symbol.toStringTag]: "Object",
_cacheable: !0,
_scopes: e,
_rootScopes: n,
_fallback: r,
_getTarget: o,
override: o => _createResolver([o, ...e], t, n, r)
};
return new Proxy(i, {
deleteProperty: (t, n) => (delete t[n], delete t._keys, delete e[0][n], !0),
get: (n, r) => _cached(n, r, () => (function(e, t, n, r) {
let o;
for (let i of t)
if (defined(o = _resolve(readKey(i, e), n))) return needsSubResolver(e, o) ? createSubResolver(n, r, e, o) : o
})(r, t, e, n)),
getOwnPropertyDescriptor: (e, t) => Reflect.getOwnPropertyDescriptor(e._scopes[0], t),
getPrototypeOf: () => Reflect.getPrototypeOf(e[0]),
has: (e, t) => getKeysFromAllScopes(e).includes(t),
ownKeys: e => getKeysFromAllScopes(e),
set(e, t, n) {
let r = e._storage || (e._storage = o());
return e[t] = r[t] = n, delete e._keys, !0
}
})
}
function _descriptors(e, t = {
scriptable: !0,
indexable: !0
}) {
let {
_scriptable: n = t.scriptable,
_indexable: r = t.indexable,
_allKeys: o = t.allKeys
} = e;
return {
allKeys: o,
scriptable: n,
indexable: r,
isScriptable: isFunction(n) ? n : () => n,
isIndexable: isFunction(r) ? r : () => r
}
}
let readKey = (e, t) => e ? e + _capitalize(t) : t,
needsSubResolver = (e, t) => isObject(t) && "adapters" !== e && (null === Object.getPrototypeOf(t) || t.constructor === Object);
function _cached(e, t, n) {
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
let r = n();
return e[t] = r, r
}
let getScope = (e, t) => !0 === e ? t : "string" == typeof e ? resolveObjectKey(t, e) : void 0;
function createSubResolver(e, t, n, r) {
var o;
let i = t._rootScopes,
a = isFunction(o = t._fallback) ? o(n, r) : o,
l = [...e, ...i],
s = new Set;
s.add(r);
let u = addScopesFromKey(s, l, n, a || n, r);
return !(null === u || defined(a) && a !== n && null === (u = addScopesFromKey(s, l, a, u, r))) && _createResolver(Array.from(s), [""], i, a, () => (function(e, t, n) {
let r = e._getTarget();
t in r || (r[t] = {});
let o = r[t];
return isArray(o) && isObject(n) ? n : o
})(t, n, r))
}
function addScopesFromKey(e, t, n, r, o) {
for (; n;) n = function(e, t, n, r, o) {
for (let a of t) {
let t = getScope(n, a);
if (t) {
var i;
e.add(t);
let a = isFunction(i = t._fallback) ? i(n, o) : i;
if (defined(a) && a !== n && a !== r) return a
} else if (!1 === t && defined(r) && n !== r) return null
}
return !1
}(e, t, n, r, o);
return n
}
function _resolve(e, t) {
for (let n of t) {
if (!n) continue;
let t = n[e];
if (defined(t)) return t
}
}
function getKeysFromAllScopes(e) {
let t = e._keys;
return t || (t = e._keys = function(e) {
let t = new Set;
for (let n of e)
for (let e of Object.keys(n).filter(e => !e.startsWith("_"))) t.add(e);
return Array.from(t)
}(e._scopes)), t
}
let C = Number.EPSILON || 1e-14,
getPoint = (e, t) => t < e.length && !e[t].skip && e[t],
getValueAxis = e => "x" === e ? "y" : "x";
function capControlPoint(e, t, n) {
return Math.max(Math.min(e, n), t)
}
function _updateBezierControlPoints(e, t, n, r, o) {
let i, a, l, s;
if (t.spanGaps && (e = e.filter(e => !e.skip)), "monotone" === t.cubicInterpolationMode) ! function(e, t = "x") {
let n, r, o;
let i = getValueAxis(t),
a = e.length,
l = Array(a).fill(0),
s = Array(a),
u = getPoint(e, 0);
for (n = 0; n < a; ++n)
if (r = o, o = u, u = getPoint(e, n + 1), o) {
if (u) {
let e = u[t] - o[t];
l[n] = 0 !== e ? (u[i] - o[i]) / e : 0
}
s[n] = r ? u ? y(l[n - 1]) !== y(l[n]) ? 0 : (l[n - 1] + l[n]) / 2 : l[n - 1] : l[n]
}!
function(e, t, n) {
let r, o, i, a, l;
let s = e.length,
u = getPoint(e, 0);
for (let c = 0; c < s - 1; ++c)
if (l = u, u = getPoint(e, c + 1), l && u) {
if (almostEquals(t[c], 0, C)) {
n[c] = n[c + 1] = 0;
continue
}(a = Math.pow(r = n[c] / t[c], 2) + Math.pow(o = n[c + 1] / t[c], 2)) <= 9 || (i = 3 / Math.sqrt(a), n[c] = r * i * t[c], n[c + 1] = o * i * t[c])
}
}(e, l, s),
function(e, t, n = "x") {
let r, o, i;
let a = getValueAxis(n),
l = e.length,
s = getPoint(e, 0);
for (let u = 0; u < l; ++u) {
if (o = i, i = s, s = getPoint(e, u + 1), !i) continue;
let l = i[n],
c = i[a];
o && (r = (l - o[n]) / 3, i[`cp1${n}`] = l - r, i[`cp1${a}`] = c - r * t[u]), s && (r = (s[n] - l) / 3, i[`cp2${n}`] = l + r, i[`cp2${a}`] = c + r * t[u])
}
}(e, s, t)
}(e, o);
else {
let n = r ? e[e.length - 1] : e[0];
for (i = 0, a = e.length; i < a; ++i) s = function(e, t, n, r) {
let o = e.skip ? t : e,
i = n.skip ? t : n,
a = distanceBetweenPoints(t, o),
l = distanceBetweenPoints(i, t),
s = a / (a + l),
u = l / (a + l);
s = isNaN(s) ? 0 : s, u = isNaN(u) ? 0 : u;
let c = r * s,
d = r * u;
return {
previous: {
x: t.x - c * (i.x - o.x),
y: t.y - c * (i.y - o.y)
},
next: {
x: t.x + d * (i.x - o.x),
y: t.y + d * (i.y - o.y)
}
}
}(n, l = e[i], e[Math.min(i + 1, a - (r ? 0 : 1)) % a], t.tension), l.cp1x = s.previous.x, l.cp1y = s.previous.y, l.cp2x = s.next.x, l.cp2y = s.next.y, n = l
}
t.capBezierPoints && function(e, t) {
let n, r, o, i, a;
let l = _isPointInArea(e[0], t);
for (n = 0, r = e.length; n < r; ++n) a = i, i = l, l = n < r - 1 && _isPointInArea(e[n + 1], t), i && (o = e[n], a && (o.cp1x = capControlPoint(o.cp1x, t.left, t.right), o.cp1y = capControlPoint(o.cp1y, t.top, t.bottom)), l && (o.cp2x = capControlPoint(o.cp2x, t.left, t.right), o.cp2y = capControlPoint(o.cp2y, t.top, t.bottom)))
}(e, n)
}
function _isDomSupported() {
return "undefined" != typeof window && "undefined" != typeof document
}
function _getParentNode(e) {
let t = e.parentNode;
return t && "[object ShadowRoot]" === t.toString() && (t = t.host), t
}
function parseMaxStyle(e, t, n) {
let r;
return "string" == typeof e ? (r = parseInt(e, 10), -1 !== e.indexOf("%") && (r = r / 100 * t.parentNode[n])) : r = e, r
}
let getComputedStyle = e => window.getComputedStyle(e, null),
j = ["top", "right", "bottom", "left"];
function getPositionedStyle(e, t, n) {
let r = {};
n = n ? "-" + n : "";
for (let o = 0; o < 4; o++) {
let i = j[o];
r[i] = parseFloat(e[t + "-" + i + n]) || 0
}
return r.width = r.left + r.right, r.height = r.top + r.bottom, r
}
let useOffsetPos = (e, t, n) => (e > 0 || t > 0) && (!n || !n.shadowRoot);
function getRelativePosition(e, t) {
let {
canvas: n,
currentDevicePixelRatio: r
} = t, o = getComputedStyle(n), i = "border-box" === o.boxSizing, a = getPositionedStyle(o, "padding"), l = getPositionedStyle(o, "border", "width"), {
x: s,
y: u,
box: c
} = function(e, t) {
let n, r;
let o = e.native || e,
i = o.touches,
a = i && i.length ? i[0] : o,
{
offsetX: l,
offsetY: s
} = a,
u = !1;
if (useOffsetPos(l, s, o.target)) n = l, r = s;
else {
let e = t.getBoundingClientRect();
n = a.clientX - e.left, r = a.clientY - e.top, u = !0
}
return {
x: n,
y: r,
box: u
}
}(e, n), d = a.left + (c && l.left), h = a.top + (c && l.top), {
width: p,
height: g
} = t;
return i && (p -= a.width + l.width, g -= a.height + l.height), {
x: Math.round((s - d) / p * n.width / r),
y: Math.round((u - h) / g * n.height / r)
}
}
let round1 = e => Math.round(10 * e) / 10;
function getMaximumSize(e, t, n, r) {
let o = getComputedStyle(e),
i = getPositionedStyle(o, "margin"),
a = parseMaxStyle(o.maxWidth, e, "clientWidth") || c,
l = parseMaxStyle(o.maxHeight, e, "clientHeight") || c,
s = function(e, t, n) {
let r, o;
if (void 0 === t || void 0 === n) {
let i = _getParentNode(e);
if (i) {
let e = i.getBoundingClientRect(),
a = getComputedStyle(i),
l = getPositionedStyle(a, "border", "width"),
s = getPositionedStyle(a, "padding");
t = e.width - s.width - l.width, n = e.height - s.height - l.height, r = parseMaxStyle(a.maxWidth, i, "clientWidth"), o = parseMaxStyle(a.maxHeight, i, "clientHeight")
} else t = e.clientWidth, n = e.clientHeight
}
return {
width: t,
height: n,
maxWidth: r || c,
maxHeight: o || c
}
}(e, t, n),
{
width: u,
height: d
} = s;
if ("content-box" === o.boxSizing) {
let e = getPositionedStyle(o, "border", "width"),
t = getPositionedStyle(o, "padding");
u -= t.width + e.width, d -= t.height + e.height
}
return u = Math.max(0, u - i.width), d = Math.max(0, r ? Math.floor(u / r) : d - i.height), u = round1(Math.min(u, a, s.maxWidth)), d = round1(Math.min(d, l, s.maxHeight)), u && !d && (d = round1(u / 2)), {
width: u,
height: d
}
}
function retinaScale(e, t, n) {
let r = t || 1,
o = Math.floor(e.height * r),
i = Math.floor(e.width * r);
e.height = o / r, e.width = i / r;
let a = e.canvas;
return a.style && (n || !a.style.height && !a.style.width) && (a.style.height = `${e.height}px`, a.style.width = `${e.width}px`), (e.currentDevicePixelRatio !== r || a.height !== o || a.width !== i) && (e.currentDevicePixelRatio = r, a.height = o, a.width = i, e.ctx.setTransform(r, 0, 0, r, 0, 0), !0)
}
let R = function() {
let e = !1;
try {
let t = {
get passive() {
return e = !0, !1
}
};
window.addEventListener("test", null, t), window.removeEventListener("test", null, t)
} catch (e) {}
return e
}();
function readUsedSize(e, t) {
let n = getComputedStyle(e).getPropertyValue(t),
r = n && n.match(/^(\d+)(\.\d+)?px$/);
return r ? +r[1] : void 0
}
function _pointInLine(e, t, n, r) {
return {
x: e.x + n * (t.x - e.x),
y: e.y + n * (t.y - e.y)
}
}
function _steppedInterpolation(e, t, n, r) {
return {
x: e.x + n * (t.x - e.x),
y: "middle" === r ? n < .5 ? e.y : t.y : "after" === r ? n < 1 ? e.y : t.y : n > 0 ? t.y : e.y
}
}
function _bezierInterpolation(e, t, n, r) {
let o = {
x: e.cp2x,
y: e.cp2y
},
i = {
x: t.cp1x,
y: t.cp1y
},
a = _pointInLine(e, o, n),
l = _pointInLine(o, i, n),
s = _pointInLine(i, t, n),
u = _pointInLine(a, l, n),
c = _pointInLine(l, s, n);
return _pointInLine(u, c, n)
}
let E = new Map;
function formatNumber(e, t, n) {
return (function(e, t) {
t = t || {};
let n = e + JSON.stringify(t),
r = E.get(n);
return r || (r = new Intl.NumberFormat(e, t), E.set(n, r)), r
})(t, n).format(e)
}
function getRtlAdapter(e, t, n) {
var r;
return e ? (r = n, {
x: e => t + t + r - e,
setWidth(e) {
r = e
},
textAlign: e => "center" === e ? e : "right" === e ? "left" : "right",
xPlus: (e, t) => e - t,
leftForLtr: (e, t) => e - t
}) : {
x: e => e,
setWidth(e) {},
textAlign: e => e,
xPlus: (e, t) => e + t,
leftForLtr: (e, t) => e
}
}
function overrideTextDirection(e, t) {
let n, r;
("ltr" === t || "rtl" === t) && (r = [(n = e.canvas.style).getPropertyValue("direction"), n.getPropertyPriority("direction")], n.setProperty("direction", t, "important"), e.prevTextDirection = r)
}
function restoreTextDirection(e, t) {
void 0 !== t && (delete e.prevTextDirection, e.canvas.style.setProperty("direction", t[0], t[1]))
}
function propertyFn(e) {
return "angle" === e ? {
between: _angleBetween,
compare: _angleDiff,
normalize: _normalizeAngle
} : {
between: _isBetween,
compare: (e, t) => e - t,
normalize: e => e
}
}
function normalizeSegment({
start: e,
end: t,
count: n,
loop: r,
style: o
}) {
return {
start: e % n,
end: t % n,
loop: r && (t - e + 1) % n == 0,
style: o
}
}
function _boundSegment(e, t, n) {
let r, o, i;
if (!n) return [e];
let {
property: a,
start: l,
end: s
} = n, u = t.length, {
compare: c,
between: d,
normalize: h
} = propertyFn(a), {
start: p,
end: g,
loop: b,
style: y
} = function(e, t, n) {
let r;
let {
property: o,
start: i,
end: a
} = n, {
between: l,
normalize: s
} = propertyFn(o), u = t.length, {
start: c,
end: d,
loop: h
} = e;
if (h) {
for (c += u, d += u, r = 0; r < u && l(s(t[c % u][o]), i, a); ++r) c--, d--;
c %= u, d %= u
}
return d < c && (d += u), {
start: c,
end: d,
loop: h,
style: e.style
}
}(e, t, n), m = [], x = !1, v = null, startIsBefore = () => d(l, i, r) && 0 !== c(l, i), endIsBefore = () => 0 === c(s, r) || d(s, i, r), shouldStart = () => x || startIsBefore(), shouldStop = () => !x || endIsBefore();
for (let e = p, n = p; e <= g; ++e)(o = t[e % u]).skip || (r = h(o[a])) === i || (x = d(r, l, s), null === v && shouldStart() && (v = 0 === c(r, l) ? e : n), null !== v && shouldStop() && (m.push(normalizeSegment({
start: v,
end: e,
loop: b,
count: u,
style: y
})), v = null), n = e, i = r);
return null !== v && m.push(normalizeSegment({
start: v,
end: g,
loop: b,
count: u,
style: y
})), m
}
function _boundSegments(e, t) {
let n = [],
r = e.segments;
for (let o = 0; o < r.length; o++) {
let i = _boundSegment(r[o], e.points, t);
i.length && n.push(...i)
}
return n
}
function _computeSegments(e, t) {
let n = e.points,
r = e.options.spanGaps,
o = n.length;
if (!o) return [];
let i = !!e._loop,
{
start: a,
end: l
} = function(e, t, n, r) {
let o = 0,
i = t - 1;
if (n && !r)
for (; o < t && !e[o].skip;) o++;
for (; o < t && e[o].skip;) o++;
for (o %= t, n && (i += o); i > o && e[i % t].skip;) i--;
return {
start: o,
end: i %= t
}
}(n, o, i, r);
if (!0 === r) return splitByStyles(e, [{
start: a,
end: l,
loop: i
}], n, t);
let s = l < a ? l + o : l,
u = !!e._fullLoop && 0 === a && l === o - 1;
return splitByStyles(e, function(e, t, n, r) {
let o;
let i = e.length,
a = [],
l = t,
s = e[t];
for (o = t + 1; o <= n; ++o) {
let n = e[o % i];
n.skip || n.stop ? s.skip || (r = !1, a.push({
start: t % i,
end: (o - 1) % i,
loop: r
}), t = l = n.stop ? o : null) : (l = o, s.skip && (t = o)), s = n
}
return null !== l && a.push({
start: t % i,
end: l % i,
loop: r
}), a
}(n, a, s, u), n, t)
}
function splitByStyles(e, t, n, r) {
return r && r.setContext && n ? function(e, t, n, r) {
let o = e._chart.getContext(),
i = readStyle(e.options),
{
_datasetIndex: a,
options: {
spanGaps: l
}
} = e,
s = n.length,
u = [],
c = i,
d = t[0].start,
h = d;
function addStyle(e, t, r, o) {
let i = l ? -1 : 1;
if (e !== t) {
for (e += s; n[e % s].skip;) e -= i;
for (; n[t % s].skip;) t += i;
e % s != t % s && (u.push({
start: e % s,
end: t % s,
loop: r,
style: o
}), c = o, d = t % s)
}
}
for (let e of t) {
let t;
let i = n[(d = l ? d : e.start) % s];
for (h = d + 1; h <= e.end; h++) {
var p, g;
let l = n[h % s];
p = t = readStyle(r.setContext(createContext(o, {
type: "segment",
p0: i,
p1: l,
p0DataIndex: (h - 1) % s,
p1DataIndex: h % s,
datasetIndex: a
}))), (g = c) && JSON.stringify(p) !== JSON.stringify(g) && addStyle(d, h - 1, e.loop, c), i = l, c = t
}
d < h - 1 && addStyle(d, h - 1, e.loop, c)
}
return u
}(e, t, n, r) : t
}
function readStyle(e) {
return {
backgroundColor: e.backgroundColor,
borderCapStyle: e.borderCapStyle,
borderDash: e.borderDash,
borderDashOffset: e.borderDashOffset,
borderJoinStyle: e.borderJoinStyle,
borderWidth: e.borderWidth,
borderColor: e.borderColor
}
}
},
94463: function(e, t, n) {
"use strict";
n.d(t, {
Z: function() {
return b
}
});
var r = n(60274),
o = n(71041);
let i = ["click", "dblclick"],
a = ["enter", "leave"],
l = i.concat(a);
function dispatchEvent(e, t, n, r) {
(0, o.O)(n, [{
chart: e,
element: r
}])
}
function getNearestItem(e, t) {
let n = Number.POSITIVE_INFINITY;
return e.filter(e => e.options.display && e.inRange(t.x, t.y)).reduce((e, r) => {
let i = r.getCenterPoint(),
a = (0, o.aC)(t, i);
return a < n ? (e = [r], n = a) : a === n && e.push(r), e
}, []).sort((e, t) => e._index - t._index).slice(0, 1)[0]
}
let s = Math.PI,
u = s / 2;
function scaleValue(e, t, n) {
return t = "number" == typeof t ? t : e.parse(t), (0, o.g)(t) ? e.getPixelForValue(t) : n
}
function roundedRect(e, t, n, r, o, i) {
if (e.beginPath(), i) {
let a = Math.min(i, o / 2, r / 2),
l = t + a,
c = n + a,
d = t + r - a,
h = n + o - a;
e.moveTo(t, c), l < d && c < h ? (e.arc(l, c, a, -s, -u), e.arc(d, c, a, -u, 0), e.arc(d, h, a, 0, u), e.arc(l, h, a, u, s)) : l < d ? (e.moveTo(l, n), e.arc(d, c, a, -u, u), e.arc(l, c, a, u, s + u)) : c < h ? (e.arc(l, c, a, -s, 0), e.arc(l, h, a, 0, s)) : e.arc(l, c, a, -s, s), e.closePath(), e.moveTo(t, n)
} else e.rect(t, n, r, o)
}
let BoxAnnotation = class BoxAnnotation extends r.W_ {
inRange(e, t, n) {
let {
x: r,
y: o,
width: i,
height: a
} = this.getProps(["x", "y", "width", "height"], n);
return e >= r && e <= r + i && t >= o && t <= o + a
}
getCenterPoint(e) {
let {
x: t,
y: n,
width: r,
height: o
} = this.getProps(["x", "y", "width", "height"], e);
return {
x: t + r / 2,
y: n + o / 2
}
}
draw(e) {
let {
x: t,
y: n,
width: r,
height: o,
options: i
} = this;
e.save(), e.lineWidth = i.borderWidth, e.strokeStyle = i.borderColor, e.fillStyle = i.backgroundColor, e.setLineDash(i.borderDash), e.lineDashOffset = i.borderDashOffset, roundedRect(e, t, n, r, o, i.cornerRadius), e.fill(), i.borderWidth && e.stroke(), e.restore()
}
resolveElementProperties(e, t) {
let n, r;
let o = e.scales[t.xScaleID],
i = e.scales[t.yScaleID],
{
top: a,
left: l,
bottom: s,
right: u
} = e.chartArea;
return o || i ? (o && (l = Math.min(n = scaleValue(o, t.xMin, l), r = scaleValue(o, t.xMax, u)), u = Math.max(n, r)), i && (a = Math.min(n = scaleValue(i, t.yMin, s), r = scaleValue(i, t.yMax, a)), s = Math.max(n, r)), {
x: l,
y: a,
x2: u,
y2: s,
width: u - l,
height: s - a
}) : {
options: {}
}
}
};
BoxAnnotation.id = "boxAnnotation", BoxAnnotation.defaults = {
display: !0,
adjustScaleRange: !0,
borderDash: [],
borderDashOffset: 0,
borderWidth: 1,
cornerRadius: 0,
xScaleID: "x",
xMin: void 0,
xMax: void 0,
yScaleID: "y",
yMin: void 0,
yMax: void 0
}, BoxAnnotation.defaultRoutes = {
borderColor: "color",
backgroundColor: "color"
};
let c = Math.PI,
clamp = (e, t, n) => Math.min(n, Math.max(t, e)),
pointInLine = (e, t, n) => ({
x: e.x + n * (t.x - e.x),
y: e.y + n * (t.y - e.y)
}),
interpolateX = (e, t, n) => pointInLine(t, n, Math.abs((e - t.y) / (n.y - t.y))).x,
interpolateY = (e, t, n) => pointInLine(t, n, Math.abs((e - t.x) / (n.x - t.x))).y,
toPercent = e => "string" == typeof e && e.endsWith("%") && parseFloat(e) / 100;
function limitPointToArea({
x: e,
y: t
}, n, {
top: r,
right: o,
bottom: i,
left: a
}) {
return e < a && (t = n.x < a ? NaN : interpolateY(a, {
x: e,
y: t
}, n), e = a), e > o && (t = n.x > o ? NaN : interpolateY(o, {
x: e,
y: t
}, n), e = o), t < r && (e = n.y < r ? NaN : interpolateX(r, {
x: e,
y: t
}, n), t = r), t > i && (e = n.y > i ? NaN : interpolateX(i, {
x: e,
y: t
}, n), t = i), {
x: e,
y: t
}
}
let LineAnnotation = class LineAnnotation extends r.W_ {
intersects(e, t, n = .001) {
var r, o;
let i, a;
let {
x: l,
y: s,
x2: u,
y2: c
} = this, d = u - l, h = c - s, p = d * d + h * h, g = 0 === p ? -1 : ((e - l) * d + (t - s) * h) / p;
return g < 0 ? (i = l, a = s) : g > 1 ? (i = u, a = c) : (i = l + g * d, a = s + g * h), (r = e - i) * r + (o = t - a) * o < n
}
labelIsVisible() {
let e = this.options.label;
return e && e.enabled && e.content
}
isOnLabel(e, t) {
var n, r, o, i, a, l;
let {
labelRect: s
} = this;
if (!s || !this.labelIsVisible()) return !1;
let {
x: u,
y: c
} = (n = {
x: e,
y: t
}, o = Math.cos(r = -s.rotation), i = Math.sin(r), a = s.x, l = s.y, {
x: a + o * (n.x - a) - i * (n.y - l),
y: l + i * (n.x - a) + o * (n.y - l)
}), d = s.width / 2, h = s.height / 2;
return u >= s.x - d && u <= s.x + d && c >= s.y - h && c <= s.y + h
}
inRange(e, t) {
let n = this.options.borderWidth || 1;
return this.intersects(e, t, n) || this.isOnLabel(e, t)
}
getCenterPoint() {
return {
x: (this.x2 + this.x) / 2,
y: (this.y2 + this.y) / 2
}
}
draw(e) {
let {
x: t,
y: n,
x2: r,
y2: o,
options: i
} = this;
e.save(), e.lineWidth = i.borderWidth, e.strokeStyle = i.borderColor, e.setLineDash(i.borderDash), e.lineDashOffset = i.borderDashOffset, e.beginPath(), e.moveTo(t, n), e.lineTo(r, o), e.stroke(), e.restore()
}
drawLabel(e, t) {
this.labelIsVisible() && (e.save(), function(e, t, n) {
let r = t.options.label;
e.font = (0, o.aQ)(r.font);
let {
width: i,
height: a
} = function(e, t) {
let n = t.content;
if (n instanceof Image) return {
width: getImageSize(n.width, t.width) + 2 * t.xPadding,
height: getImageSize(n.height, t.height) + 2 * t.yPadding
};
let r = (0, o.b)(n) ? n : [n],
i = r.length,
a = 0;
for (let t = 0; t < i; t++) {
let n = r[t];
d.has(n) || d.set(n, e.measureText(n).width), a = Math.max(a, d.get(n))
}
return {
width: a += 2 * t.xPadding,
height: i * t.font.size + (i + 1) * t.yPadding
}
}(e, r), l = t.labelRect = function(e, t, n, r) {
let i = e.options.label,
{
xAdjust: a,
yAdjust: l,
xPadding: s,
yPadding: u,
position: d
} = i,
h = {
x: e.x,
y: e.y
},
p = {
x: e.x2,
y: e.y2
},
g = "auto" === i.rotation ? function(e) {
let {
x: t,
y: n,
x2: r,
y2: o
} = e, i = Math.atan2(o - n, r - t);
return i > c / 2 ? i - c : i < -(c / 2) ? i + c : i
}(e) : (0, o.t)(i.rotation),
b = function(e, t, n) {
let r = Math.cos(n),
o = Math.sin(n);
return {
w: Math.abs(e * r) + Math.abs(t * o),
h: Math.abs(e * o) + Math.abs(t * r)
}
}(t, n, g),
y = function(e, t, n, r) {
let o = .5,
i = function(e, t) {
let {
x: n,
x2: r,
y: o,
y2: i
} = e, a = Math.min(o, i) - t.top, l = Math.min(n, r) - t.left, s = t.bottom - Math.max(o, i), u = t.right - Math.max(n, r);
return {
x: Math.min(l, u),
y: Math.min(a, s),
dx: l < u ? 1 : -1,
dy: a < s ? 1 : -1
}
}(e, r),
a = e.options.label;
return "start" === t ? o = calculateTAdjust({
w: e.x2 - e.x,
h: e.y2 - e.y
}, n, a, i) : "end" === t && (o = 1 - calculateTAdjust({
w: e.x - e.x2,
h: e.y - e.y2
}, n, a, i)), o
}(e, d, b, r),
m = pointInLine(h, p, y),
x = {
size: b.w,
min: r.left,
max: r.right,
padding: s
},
v = {
size: b.h,
min: r.top,
max: r.bottom,
padding: u
};
return {
x: adjustLabelCoordinate(m.x, x) + a,
y: adjustLabelCoordinate(m.y, v) + l,
width: t,
height: n,
rotation: g
}
}(t, i, a, n);
if (e.translate(l.x, l.y), e.rotate(l.rotation), e.fillStyle = r.backgroundColor, roundedRect(e, -(i / 2), -(a / 2), i, a, r.cornerRadius), e.fill(), e.fillStyle = r.color, (0, o.b)(r.content)) {
e.textAlign = r.textAlign;
let t = function(e, t) {
let {
textAlign: n,
xPadding: r
} = e;
return "start" === n ? -(t / 2) + r : "end" === n ? +(t / 2) - r : 0
}(r, i),
n = -(a / 2) + r.yPadding;
for (let o = 0; o < r.content.length; o++) e.textBaseline = "top", e.fillText(r.content[o], t, n), n += r.font.size + r.yPadding
} else if (r.content instanceof Image) {
let t = -(i / 2) + r.xPadding,
n = -(a / 2) + r.yPadding;
e.drawImage(r.content, t, n, i - 2 * r.xPadding, a - 2 * r.yPadding)
} else e.textAlign = "center", e.textBaseline = "middle", e.fillText(r.content, 0, 0)
}(e, this, t), e.restore())
}
resolveElementProperties(e, t) {
let n, r;
let o = e.scales[t.scaleID],
{
top: i,
left: a,
bottom: l,
right: s
} = e.chartArea;
if (o) n = scaleValue(o, t.value, NaN), r = scaleValue(o, t.endValue, n), o.isHorizontal() ? (a = n, s = r) : (i = n, l = r);
else {
let n = e.scales[t.xScaleID],
r = e.scales[t.yScaleID];
n && (a = scaleValue(n, t.xMin, a), s = scaleValue(n, t.xMax, s)), r && (i = scaleValue(r, t.yMin, i), l = scaleValue(r, t.yMax, l))
}
return function(e, t, n) {
let {
x: r,
y: o
} = limitPointToArea(e, t, n), {
x: i,
y: a
} = limitPointToArea(t, e, n);
return {
x: r,
y: o,
x2: i,
y2: a,
width: Math.abs(i - r),
height: Math.abs(a - o)
}
}({
x: a,
y: i
}, {
x: s,
y: l
}, e.chartArea)
}
};
function getImageSize(e, t) {
return "number" == typeof t ? t : "string" == typeof t ? toPercent(t) * e : e
}
LineAnnotation.id = "lineAnnotation", LineAnnotation.defaults = {
display: !0,
adjustScaleRange: !0,
borderWidth: 2,
borderDash: [],
borderDashOffset: 0,
label: {
backgroundColor: "rgba(0,0,0,0.8)",
drawTime: void 0,
font: {
family: void 0,
lineHeight: void 0,
size: void 0,
style: "bold",
weight: void 0
},
color: "#fff",
xPadding: 6,
yPadding: 6,
rotation: 0,
cornerRadius: 6,
position: "center",
xAdjust: 0,
yAdjust: 0,
textAlign: "center",
enabled: !1,
content: null
},
value: void 0,
endValue: void 0,
scaleID: void 0,
xScaleID: "x",
xMin: void 0,
xMax: void 0,
yScaleID: "y",
yMin: void 0,
yMax: void 0
}, LineAnnotation.defaultRoutes = {
borderColor: "color"
};
let d = new Map;
function calculateTAdjust(e, t, n, r) {
let {
xPadding: o,
yPadding: i
} = n, a = e.w * r.dx, l = e.h * r.dy, s = a > 0 && (t.w / 2 + o - r.x) / a, u = l > 0 && (t.h / 2 + i - r.y) / l;
return clamp(Math.max(s, u), 0, .25)
}
function adjustLabelCoordinate(e, t) {
let {
size: n,
min: r,
max: o,
padding: i
} = t, a = n / 2;
return n > o - r ? (o + r) / 2 : (r >= e - i - a && (e = r + i + a), o <= e + i + a && (e = o - i - a), e)
}
let EllipseAnnotation = class EllipseAnnotation extends BoxAnnotation {
inRange(e, t) {
return function(e, t) {
let {
width: n,
height: r
} = t, o = t.getCenterPoint(!0), i = n / 2, a = r / 2;
return !(i <= 0) && !(a <= 0) && Math.pow(e.x - o.x, 2) / Math.pow(i, 2) + Math.pow(e.y - o.y, 2) / Math.pow(a, 2) <= 1
}({
x: e,
y: t
}, this)
}
draw(e) {
let {
width: t,
height: n,
options: r
} = this, o = this.getCenterPoint();
e.save(), e.beginPath(), e.lineWidth = r.borderWidth, e.strokeStyle = r.borderColor, e.fillStyle = r.backgroundColor, e.setLineDash(r.borderDash), e.lineDashOffset = r.borderDashOffset, e.ellipse(o.x, o.y, n / 2, t / 2, Math.PI / 2, 0, 2 * Math.PI), e.fill(), e.stroke(), e.restore()
}
};
EllipseAnnotation.id = "ellipseAnnotation", EllipseAnnotation.defaults = {
display: !0,
adjustScaleRange: !0,
borderDash: [],
borderDashOffset: 0,
borderWidth: 1,
xScaleID: "x",
xMin: void 0,
xMax: void 0,
yScaleID: "y",
yMin: void 0,
yMax: void 0
}, EllipseAnnotation.defaultRoutes = {
borderColor: "color",
backgroundColor: "color"
};
let PointAnnotation = class PointAnnotation extends r.W_ {
inRange(e, t) {
let {
width: n,
options: r
} = this, o = this.getCenterPoint(!0), i = n / 2 + r.borderWidth;
return !(i <= 0) && Math.pow(e - o.x, 2) + Math.pow(t - o.y, 2) <= Math.pow(i, 2)
}
getCenterPoint(e) {
let {
x: t,
y: n
} = this.getProps(["x", "y"], e);
return {
x: t,
y: n
}
}
draw(e) {
let {
x: t,
y: n,
width: r,
options: o
} = this;
e.save(), e.lineWidth = o.borderWidth, e.strokeStyle = o.borderColor, e.fillStyle = o.backgroundColor, e.setLineDash(o.borderDash), e.lineDashOffset = o.borderDashOffset, e.beginPath(), e.arc(t, n, r / 2, 0, 2 * Math.PI), e.fill(), e.stroke(), e.restore()
}
resolveElementProperties(e, t) {
let {
chartArea: n,
scales: r
} = e, o = r[t.xScaleID], i = r[t.yScaleID], a = n.width / 2, l = n.height / 2;
return o && (a = scaleValue(o, t.xValue, a)), i && (l = scaleValue(i, t.yValue, l)), {
x: a,
y: l,
width: 2 * t.radius,
height: 2 * t.radius
}
}
};
PointAnnotation.id = "pointAnnotation", PointAnnotation.defaults = {
display: !0,
adjustScaleRange: !0,
borderDash: [],
borderDashOffset: 0,
borderWidth: 1,
radius: 10,
xScaleID: "x",
xValue: void 0,
yScaleID: "y",
yValue: void 0
}, PointAnnotation.defaultRoutes = {
borderColor: "color",
backgroundColor: "color"
};
let h = new Map,
p = {
box: BoxAnnotation,
line: LineAnnotation,
ellipse: EllipseAnnotation,
point: PointAnnotation
};
Object.keys(p).forEach(e => {
r.ce.describe(`elements.${p[e].id}`, {
_fallback: "plugins.annotation"
})
});
let g = {
update: Object.assign
};
function resolveObj(e, t) {
let n = {};
for (let r of Object.keys(t)) {
let i = t[r],
a = e[r];
n[r] = (0, o.i)(i) ? resolveObj(a, i) : a
}
return n
}
function draw(e, t) {
let {
ctx: n,
chartArea: r
} = e, i = h.get(e), a = i.elements.filter(e => !e.skip && e.options.display);
(0, o.W)(n, r), a.forEach(e => {
e.options.drawTime === t && e.draw(n)
}), (0, o.Y)(n), a.forEach(e => {
"drawLabel" in e && e.options.label && (e.options.label.drawTime || e.options.drawTime) === t && e.drawLabel(n, r)
})
}
var b = {
id: "annotation",
version: "1.0.2",
afterRegister() {
r.kL.register(p)
},
afterUnregister() {
r.kL.unregister(p)
},
beforeInit(e) {
h.set(e, {
annotations: [],
elements: [],
listeners: {},
listened: !1,
moveListened: !1
})
},
beforeUpdate(e, t, n) {
let r = h.get(e),
i = r.annotations = [],
a = n.annotations;
(0, o.i)(a) ? Object.keys(a).forEach(e => {
let t = a[e];
(0, o.i)(t) && (t.id = e, i.push(t))
}): (0, o.b)(a) && i.push(...a)
},
afterDataLimits(e, t) {
let n = h.get(e);
! function(e, t, n) {
let r = function(e, t) {
let n = e.axis,
r = e.id,
i = n + "ScaleID",
a = (0, o.v)(e.min, Number.NEGATIVE_INFINITY),
l = (0, o.v)(e.max, Number.POSITIVE_INFINITY);
for (let o of t)
if (o.scaleID === r)
for (let t of ["value", "endValue"]) {
let n = o[t];
if (n) {
let t = e.parse(n);
a = Math.min(a, t), l = Math.max(l, t)
}
} else if (o[i] === r)
for (let t of [n + "Min", n + "Max", n + "Value"]) {
let n = o[t];
if (n) {
let t = e.parse(n);
a = Math.min(a, t), l = Math.max(l, t)
}
}
return {
min: a,
max: l
}
}(t, n),
i = !1;
(0, o.g)(r.min) && void 0 === t.options.min && void 0 === t.options.suggestedMin && (i = t.min !== r.min, t.min = r.min), (0, o.g)(r.max) && void 0 === t.options.max && void 0 === t.options.suggestedMax && (i = t.max !== r.max, t.max = r.max), i && "function" == typeof t.handleTickRangeOptions && t.handleTickRangeOptions()
}(0, t.scale, n.annotations.filter(e => e.display && e.adjustScaleRange))
},
afterUpdate(e, t, n) {
let o = h.get(e);
! function(e, t, n) {
let r = t.annotations || [];
t.listened = !1, t.moveListened = !1, l.forEach(e => {
"function" == typeof n[e] && (t.listened = !0, t.listeners[e] = n[e])
}), a.forEach(e => {
"function" == typeof n[e] && (t.moveListened = !0)
}), t.listened && t.moveListened || r.forEach(e => {
t.listened || i.forEach(n => {
"function" == typeof e[n] && (t.listened = !0)
}), t.moveListened || a.forEach(n => {
"function" == typeof e[n] && (t.listened = !0, t.moveListened = !0)
})
})
}(0, o, n),
function(e, t, n, o) {
var i, a;
let s = (i = n.animations, "reset" === o || "none" === o || "resize" === o ? g : new r.FK(e, i)),
u = t.annotations,
c = function(e, t) {
let n = t.length,
r = e.length;
if (r < n) {
let t = n - r;
e.splice(r, 0, ...Array(t))
} else r > n && e.splice(n, r - n);
return e
}(t.elements, u);
for (let t = 0; t < u.length; t++) {
let n = u[t],
r = c[t],
o = p[n.type] || p.line;
r && r instanceof o || (r = c[t] = new o);
let i = function(e) {
let t = p[e.type] || p.line,
n = {};
for (let r of (n.id = e.id, n.type = e.type, n.drawTime = e.drawTime, Object.assign(n, resolveObj(e, t.defaults), resolveObj(e, t.defaultRoutes)), l)) n[r] = e[r];
return n
}(n.setContext((a = r).$context || (a.$context = Object.assign(Object.create(e.getContext()), {
element: a,
id: n.id,
type: "annotation"
})))),
d = r.resolveElementProperties(e, i);
d.skip = isNaN(d.x) || isNaN(d.y), d.options = i, s.update(r, d)
}
}(e, o, n, t.mode)
},
beforeDatasetsDraw(e) {
draw(e, "beforeDatasetsDraw")
},
afterDatasetsDraw(e) {
draw(e, "afterDatasetsDraw")
},
beforeDraw(e) {
draw(e, "beforeDraw")
},
afterDraw(e) {
draw(e, "afterDraw")
},
beforeEvent(e, t, n) {
let r = h.get(e);
! function(e, t, n, r) {
if (t.listened) switch (n.type) {
case "mousemove":
case "mouseout":
! function(e, t, n) {
var r;
let o;
if (!t.moveListened) return;
"mousemove" === n.type && (o = getNearestItem(t.elements, n));
let i = t.hovered;
t.hovered = o, r = o, i && i !== r && dispatchEvent(e, t, i.options.leave || t.listeners.leave, i), r && r !== i && dispatchEvent(e, t, r.options.enter || t.listeners.enter, r)
}(e, t, n);
break;
case "click":
! function(e, t, n, r) {
let o = t.listeners,
i = getNearestItem(t.elements, n);
if (i) {
let n = i.options,
a = n.dblclick || o.dblclick,
l = n.click || o.click;
i.clickTimeout ? (clearTimeout(i.clickTimeout), delete i.clickTimeout, dispatchEvent(e, t, a, i)) : a ? i.clickTimeout = setTimeout(() => {
delete i.clickTimeout, dispatchEvent(e, t, l, i)
}, r.dblClickSpeed) : dispatchEvent(e, t, l, i)
}
}(e, t, n, r)
}
}(e, r, t.event, n)
},
destroy(e) {
h.delete(e)
},
_getState: e => h.get(e),
defaults: {
drawTime: "afterDatasetsDraw",
dblClickSpeed: 350,
animations: {
numbers: {
properties: ["x", "y", "x2", "y2", "width", "height"],
type: "number"
}
},
label: {
drawTime: null
}
},
descriptors: {
_indexable: !1,
_scriptable: e => !l.includes(e),
annotations: {
_allKeys: !1,
_fallback: (e, t) => `elements.${p[t.type||"line"].id}`
}
},
additionalOptionScopes: [""]
}
},
82274: function(e) {
e.exports = function(e, t, n) {
switch (n.length) {
case 0:
return e.call(t);
case 1:
return e.call(t, n[0]);
case 2:
return e.call(t, n[0], n[1]);
case 3:
return e.call(t, n[0], n[1], n[2])
}
return e.apply(t, n)
}
},
73532: function(e, t, n) {
var r = n(87500),
o = n(58260);
e.exports = function(e, t, n) {
(void 0 === n || o(e[t], n)) && (void 0 !== n || t in e) || r(e, t, n)
}
},
93192: function(e, t, n) {
var r = n(87500),
o = n(58260),
i = Object.prototype.hasOwnProperty;
e.exports = function(e, t, n) {
var a = e[t];
i.call(e, t) && o(a, n) && (void 0 !== n || t in e) || r(e, t, n)
}
},
87500: function(e, t, n) {
var r = n(25595);
e.exports = function(e, t, n) {
"__proto__" == t && r ? r(e, t, {
configurable: !0,
enumerable: !0,
value: n,
writable: !0
}) : e[t] = n
}
},
57890: function(e, t, n) {
var r = n(93702),
o = Object.create,
i = function() {
function object() {}
return function(e) {
if (!r(e)) return {};
if (o) return o(e);
object.prototype = e;
var t = new object;
return object.prototype = void 0, t
}
}();
e.exports = i
},
44770: function(e) {
e.exports = function(e, t, n, r) {
for (var o = e.length, i = n + (r ? 1 : -1); r ? i-- : ++i < o;)
if (t(e[i], i, e)) return i;
return -1
}
},
71309: function(e, t, n) {
var r = n(93702),
o = n(32840),
i = n(84866),
a = Object.prototype.hasOwnProperty;
e.exports = function(e) {
if (!r(e)) return i(e);
var t = o(e),
n = [];
for (var l in e) "constructor" == l && (t || !a.call(e, l)) || n.push(l);
return n
}
},
92133: function(e, t, n) {
var r = n(19549),
o = n(73532),
i = n(39943),
a = n(21241),
l = n(93702),
s = n(9882),
u = n(11933);
e.exports = function baseMerge(e, t, n, c, d) {
e !== t && i(t, function(i, s) {
if (d || (d = new r), l(i)) a(e, t, s, n, baseMerge, c, d);
else {
var h = c ? c(u(e, s), i, s + "", e, t, d) : void 0;
void 0 === h && (h = i), o(e, s, h)
}
}, s)
}
},
21241: function(e, t, n) {
var r = n(73532),
o = n(46502),
i = n(21327),
a = n(32166),
l = n(84046),
s = n(79312),
u = n(55589),
c = n(18268),
d = n(85778),
h = n(45563),
p = n(93702),
g = n(54256),
b = n(50922),
y = n(11933),
m = n(36222);
e.exports = function(e, t, n, x, v, _, w) {
var O = y(e, n),
M = y(t, n),
S = w.get(M);
if (S) {
r(e, n, S);
return
}
var P = _ ? _(O, M, n + "", e, t, w) : void 0,
k = void 0 === P;
if (k) {
var A = u(M),
T = !A && d(M),
I = !A && !T && b(M);
P = M, A || T || I ? u(O) ? P = O : c(O) ? P = a(O) : T ? (k = !1, P = o(M, !0)) : I ? (k = !1, P = i(M, !0)) : P = [] : g(M) || s(M) ? (P = O, s(O) ? P = m(O) : (!p(O) || h(O)) && (P = l(M))) : k = !1
}
k && (w.set(M, P), v(P, M, x, _, w), w.delete(M)), r(e, n, P)
}
},
29735: function(e, t, n) {
var r = n(80229),
o = n(20340),
i = n(4173);
e.exports = function(e, t) {
return i(o(e, t, r), e + "")
}
},
46739: function(e, t, n) {
var r = n(89203),
o = n(25595),
i = n(80229),
a = o ? function(e, t) {
return o(e, "toString", {
configurable: !0,
enumerable: !1,
value: r(t),
writable: !0
})
} : i;
e.exports = a
},
72962: function(e, t, n) {
var r = n(3526);
e.exports = function(e) {
var t = new e.constructor(e.byteLength);
return new r(t).set(new r(e)), t
}
},
46502: function(e, t, n) {
e = n.nmd(e);
var r = n(83250),
o = t && !t.nodeType && t,
i = o && e && !e.nodeType && e,
a = i && i.exports === o ? r.Buffer : void 0,
l = a ? a.allocUnsafe : void 0;
e.exports = function(e, t) {
if (t) return e.slice();
var n = e.length,
r = l ? l(n) : new e.constructor(n);
return e.copy(r), r
}
},
21327: function(e, t, n) {
var r = n(72962);
e.exports = function(e, t) {
var n = t ? r(e.buffer) : e.buffer;
return new e.constructor(n, e.byteOffset, e.length)
}
},
32166: function(e) {
e.exports = function(e, t) {
var n = -1,
r = e.length;
for (t || (t = Array(r)); ++n < r;) t[n] = e[n];
return t
}
},
78618: function(e, t, n) {
var r = n(93192),
o = n(87500);
e.exports = function(e, t, n, i) {
var a = !n;
n || (n = {});
for (var l = -1, s = t.length; ++l < s;) {
var u = t[l],
c = i ? i(n[u], e[u], u, n, e) : void 0;
void 0 === c && (c = e[u]), a ? o(n, u, c) : r(n, u, c)
}
return n
}
},
66948: function(e, t, n) {
var r = n(29735),
o = n(98132);
e.exports = function(e) {
return r(function(t, n) {
var r = -1,
i = n.length,
a = i > 1 ? n[i - 1] : void 0,
l = i > 2 ? n[2] : void 0;
for (a = e.length > 3 && "function" == typeof a ? (i--, a) : void 0, l && o(n[0], n[1], l) && (a = i < 3 ? void 0 : a, i = 1), t = Object(t); ++r < i;) {
var s = n[r];
s && e(t, s, r, a)
}
return t
})
}
},
29301: function(e, t, n) {
var r = n(55833),
o = n(30568),
i = n(62096);
e.exports = function(e) {
return function(t, n, a) {
var l = Object(t);
if (!o(t)) {
var s = r(n, 3);
t = i(t), n = function(e) {
return s(l[e], e, l)
}
}
var u = e(t, n, a);
return u > -1 ? l[s ? t[u] : u] : void 0
}
}
},
25595: function(e, t, n) {
var r = n(65234),
o = function() {
try {
var e = r(Object, "defineProperty");
return e({}, "", {}), e
} catch (e) {}
}();
e.exports = o
},
18490: function(e, t, n) {
var r = n(33540)(Object.getPrototypeOf, Object);
e.exports = r
},
84046: function(e, t, n) {
var r = n(57890),
o = n(18490),
i = n(32840);
e.exports = function(e) {
return "function" != typeof e.constructor || i(e) ? {} : r(o(e))
}
},
98132: function(e, t, n) {
var r = n(58260),
o = n(30568),
i = n(5023),
a = n(93702);
e.exports = function(e, t, n) {
if (!a(n)) return !1;
var l = typeof t;
return ("number" == l ? !!(o(n) && i(t, n.length)) : "string" == l && t in n) && r(n[t], e)
}
},
84866: function(e) {
e.exports = function(e) {
var t = [];
if (null != e)
for (var n in Object(e)) t.push(n);
return t
}
},
20340: function(e, t, n) {
var r = n(82274),
o = Math.max;
e.exports = function(e, t, n) {
return t = o(void 0 === t ? e.length - 1 : t, 0),
function() {
for (var i = arguments, a = -1, l = o(i.length - t, 0), s = Array(l); ++a < l;) s[a] = i[t + a];
a = -1;
for (var u = Array(t + 1); ++a < t;) u[a] = i[a];
return u[t] = n(s), r(e, this, u)
}
}
},
11933: function(e) {
e.exports = function(e, t) {
if (("constructor" !== t || "function" != typeof e[t]) && "__proto__" != t) return e[t]
}
},
4173: function(e, t, n) {
var r = n(46739),
o = n(37357)(r);
e.exports = o
},
37357: function(e) {
var t = Date.now;
e.exports = function(e) {
var n = 0,
r = 0;
return function() {
var o = t(),
i = 16 - (o - r);
if (r = o, i > 0) {
if (++n >= 800) return arguments[0]
} else n = 0;
return e.apply(void 0, arguments)
}
}
},
90311: function(e, t, n) {
var r = n(93192),
o = n(78618),
i = n(66948),
a = n(30568),
l = n(32840),
s = n(62096),
u = Object.prototype.hasOwnProperty,
c = i(function(e, t) {
if (l(t) || a(t)) {
o(t, s(t), e);
return
}
for (var n in t) u.call(t, n) && r(e, n, t[n])
});
e.exports = c
},
89203: function(e) {
e.exports = function(e) {
return function() {
return e
}
}
},
26969: function(e, t, n) {
var r = n(29301)(n(69312));
e.exports = r
},
69312: function(e, t, n) {
var r = n(44770),
o = n(55833),
i = n(96843),
a = Math.max;
e.exports = function(e, t, n) {
var l = null == e ? 0 : e.length;
if (!l) return -1;
var s = null == n ? 0 : i(n);
return s < 0 && (s = a(l + s, 0)), r(e, o(t, 3), s)
}
},
18268: function(e, t, n) {
var r = n(30568),
o = n(50440);
e.exports = function(e) {
return o(e) && r(e)
}
},
54256: function(e, t, n) {
var r = n(69823),
o = n(18490),
i = n(50440),
a = Object.prototype,
l = Function.prototype.toString,
s = a.hasOwnProperty,
u = l.call(Object);
e.exports = function(e) {
if (!i(e) || "[object Object]" != r(e)) return !1;
var t = o(e);
if (null === t) return !0;
var n = s.call(t, "constructor") && t.constructor;
return "function" == typeof n && n instanceof n && l.call(n) == u
}
},
9882: function(e, t, n) {
var r = n(75825),
o = n(71309),
i = n(30568);
e.exports = function(e) {
return i(e) ? r(e, !0) : o(e)
}
},
88469: function(e, t, n) {
var r = n(92133),
o = n(66948)(function(e, t, n) {
r(e, t, n)
});
e.exports = o
},
99558: function(e, t, n) {
var r = n(29153),
o = 1 / 0;
e.exports = function(e) {
return e ? (e = r(e)) === o || e === -o ? (e < 0 ? -1 : 1) * 17976931348623157e292 : e == e ? e : 0 : 0 === e ? e : 0
}
},
96843: function(e, t, n) {
var r = n(99558);
e.exports = function(e) {
var t = r(e),
n = t % 1;
return t == t ? n ? t - n : t : 0
}
},
36222: function(e, t, n) {
var r = n(78618),
o = n(9882);
e.exports = function(e) {
return r(e, o(e))
}
},
72699: function(e, t, n) {
"use strict";
n.d(t, {
x1: function() {
return p
}
});
var r = n(52983),
o = n(60274);
o.kL.register(...o.zX);
var i = o.kL,
a = n(88469),
l = n.n(a),
s = n(90311),
u = n.n(s),
c = n(26969),
d = n.n(c);
function _extends() {
return (_extends = Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}).apply(this, arguments)
}
function _objectWithoutPropertiesLoose(e, t) {
if (null == e) return {};
var n, r, o = {},
i = Object.keys(e);
for (r = 0; r < i.length; r++) n = i[r], t.indexOf(n) >= 0 || (o[n] = e[n]);
return o
}
var h = (0, r.forwardRef)(function(e, t) {
var n = e.id,
o = e.className,
a = e.height,
s = e.width,
c = e.redraw,
h = void 0 !== c && c,
p = e.type,
g = e.data,
b = e.options,
y = void 0 === b ? {} : b,
m = e.plugins,
x = void 0 === m ? [] : m,
v = e.getDatasetAtEvent,
_ = e.getElementAtEvent,
w = e.getElementsAtEvent,
O = e.fallbackContent,
M = _objectWithoutPropertiesLoose(e, ["id", "className", "height", "width", "redraw", "type", "data", "options", "plugins", "getDatasetAtEvent", "getElementAtEvent", "getElementsAtEvent", "fallbackContent"]),
S = (0, r.useRef)(null),
P = (0, r.useMemo)(function() {
return "function" == typeof g ? S.current ? g(S.current) : {} : l()({}, g)
}, [g, S.current]),
k = (0, r.useState)(),
A = k[0],
T = k[1];
(0, r.useImperativeHandle)(t, function() {
return A
}, [A]);
var renderChart = function() {
S.current && T(new i(S.current, {
type: p,
data: P,
options: y,
plugins: x
}))
},
updateChart = function() {
if (A) {
if (y && (A.options = _extends({}, y)), !A.config.data) {
A.config.data = P, A.update();
return
}
var e = P.datasets,
t = _objectWithoutPropertiesLoose(P, ["datasets"]),
n = A.config.data.datasets,
r = void 0 === n ? [] : n;
u()(A.config.data, t), A.config.data.datasets = (void 0 === e ? [] : e).map(function(e) {
var t = d()(r, function(t) {
return t.label === e.label && t.type === e.type
});
return t && e.data ? (t.data ? t.data.length = e.data.length : t.data = [], u()(t.data, e.data), u()(t, _extends({}, e, {
data: t.data
})), t) : _extends({}, e)
}), A.update()
}
},
destroyChart = function() {
A && A.destroy()
};
return (0, r.useEffect)(function() {
return renderChart(),
function() {
return destroyChart()
}
}, []), (0, r.useEffect)(function() {
h ? (destroyChart(), setTimeout(function() {
renderChart()
}, 0)) : updateChart()
}, [e, P]), r.createElement("canvas", Object.assign({}, M, {
height: void 0 === a ? 150 : a,
width: void 0 === s ? 300 : s,
ref: S,
id: n,
className: o,
onClick: function(e) {
A && (v && v(A.getElementsAtEventForMode(e, "dataset", {
intersect: !0
}, !1), e), _ && _(A.getElementsAtEventForMode(e, "nearest", {
intersect: !0
}, !1), e), w && w(A.getElementsAtEventForMode(e, "index", {
intersect: !0
}, !1), e))
},
"data-testid": "canvas",
role: "img"
}), O)
}),
p = (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "line",
ref: t,
options: e.options || {}
}))
});
(0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "bar",
ref: t,
options: e.options || {}
}))
}), (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "radar",
ref: t,
options: e.options || {}
}))
}), (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "doughnut",
ref: t,
options: e.options || {}
}))
}), (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "polarArea",
ref: t,
options: e.options || {}
}))
}), (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "bubble",
ref: t,
options: e.options || {}
}))
}), (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "pie",
ref: t,
options: e.options || {}
}))
}), (0, r.forwardRef)(function(e, t) {
return r.createElement(h, Object.assign({}, e, {
type: "scatter",
ref: t,
options: e.options || {}
}))
})
}
}
]);