import { getCurrentInstance as Xb, inject as l2, defineComponent as Cn, openBlock as Te, createElementBlock as Yr, normalizeClass as Sr, renderSlot as zp, computed as fr, normalizeStyle as Io, createElementVNode as xi, ref as qb, watch as u2, onMounted as Kb, onBeforeUnmount as f2, onUpdated as h2, onUnmounted as c2, resolveComponent as da, createBlock as qo, createCommentVNode as lc, createVNode as tl, withCtx as v2, TransitionGroup as p2, isVNode as d2, reactive as g2, render as Nm } from "vue";
const y2 = (r, e) => {
const t = r[e];
return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((n, a) => {
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + e)));
});
};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var Gp = function(r, e) {
return Gp = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
t.__proto__ = n;
} || function(t, n) {
for (var a in n)
Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
}, Gp(r, e);
};
function R(r, e) {
if (typeof e != "function" && e !== null)
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
Gp(r, e);
function t() {
this.constructor = r;
}
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
}
var m2 = function() {
function r() {
this.firefox = !1, this.ie = !1, this.edge = !1, this.newEdge = !1, this.weChat = !1;
}
return r;
}(), _2 = function() {
function r() {
this.browser = new m2(), this.node = !1, this.wxa = !1, this.worker = !1, this.svgSupported = !1, this.touchEventsSupported = !1, this.pointerEventsSupported = !1, this.domSupported = !1, this.transformSupported = !1, this.transform3dSupported = !1, this.hasGlobalWindow = typeof window < "u";
}
return r;
}(), Fa = new _2();
typeof wx == "object" && typeof wx.getSystemInfoSync == "function" ? (Fa.wxa = !0, Fa.touchEventsSupported = !0) : typeof document > "u" && typeof self < "u" ? Fa.worker = !0 : typeof navigator > "u" ? (Fa.node = !0, Fa.svgSupported = !0) : S2(navigator.userAgent, Fa);
function S2(r, e) {
var t = e.browser, n = r.match(/Firefox\/([\d.]+)/), a = r.match(/MSIE\s([\d.]+)/) || r.match(/Trident\/.+?rv:(([\d.]+))/), i = r.match(/Edge?\/([\d.]+)/), o = /micromessenger/i.test(r);
n && (t.firefox = !0, t.version = n[1]), a && (t.ie = !0, t.version = a[1]), i && (t.edge = !0, t.version = i[1], t.newEdge = +i[1].split(".")[0] > 18), o && (t.weChat = !0), e.svgSupported = typeof SVGRect < "u", e.touchEventsSupported = "ontouchstart" in window && !t.ie && !t.edge, e.pointerEventsSupported = "onpointerdown" in window && (t.edge || t.ie && +t.version >= 11), e.domSupported = typeof document < "u";
var s = document.documentElement.style;
e.transform3dSupported = (t.ie && "transition" in s || t.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in s) && !("OTransition" in s), e.transformSupported = e.transform3dSupported || t.ie && +t.version >= 9;
}
const Dt = Fa;
var Ag = 12, jb = "sans-serif", ra = Ag + "px " + jb, x2 = 20, w2 = 100, b2 = "007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";
function T2(r) {
var e = {};
if (typeof JSON > "u")
return e;
for (var t = 0; t < r.length; t++) {
var n = String.fromCharCode(t + 32), a = (r.charCodeAt(t) - x2) / w2;
e[n] = a;
}
return e;
}
var C2 = T2(b2), yn = {
createCanvas: function() {
return typeof document < "u" && document.createElement("canvas");
},
measureText: function() {
var r, e;
return function(t, n) {
if (!r) {
var a = yn.createCanvas();
r = a && a.getContext("2d");
}
if (r)
return e !== n && (e = r.font = n || ra), r.measureText(t);
t = t || "", n = n || ra;
var i = /^([0-9]*?)px$/.exec(n), o = +(i && i[1]) || Ag, s = 0;
if (n.indexOf("mono") >= 0)
s = o * t.length;
else
for (var l = 0; l < t.length; l++) {
var u = C2[t[l]];
s += u == null ? o : u * o;
}
return { width: s };
};
}(),
loadImage: function(r, e, t) {
var n = new Image();
return n.onload = e, n.onerror = t, n.src = r, n;
}
}, Jb = Xr([
"Function",
"RegExp",
"Date",
"Error",
"CanvasGradient",
"CanvasPattern",
"Image",
"Canvas"
], function(r, e) {
return r["[object " + e + "]"] = !0, r;
}, {}), Qb = Xr([
"Int8",
"Uint8",
"Uint8Clamped",
"Int16",
"Uint16",
"Int32",
"Uint32",
"Float32",
"Float64"
], function(r, e) {
return r["[object " + e + "Array]"] = !0, r;
}, {}), Eo = Object.prototype.toString, _h = Array.prototype, D2 = _h.forEach, A2 = _h.filter, Mg = _h.slice, M2 = _h.map, Rm = function() {
}.constructor, Xl = Rm ? Rm.prototype : null, Lg = "__proto__", L2 = 2311;
function tT() {
return L2++;
}
function br() {
for (var r = [], e = 0; e < arguments.length; e++)
r[e] = arguments[e];
typeof console < "u" && console.error.apply(console, r);
}
function tt(r) {
if (r == null || typeof r != "object")
return r;
var e = r, t = Eo.call(r);
if (t === "[object Array]") {
if (!Bs(r)) {
e = [];
for (var n = 0, a = r.length; n < a; n++)
e[n] = tt(r[n]);
}
} else if (Qb[t]) {
if (!Bs(r)) {
var i = r.constructor;
if (i.from)
e = i.from(r);
else {
e = new i(r.length);
for (var n = 0, a = r.length; n < a; n++)
e[n] = r[n];
}
}
} else if (!Jb[t] && !Bs(r) && !mo(r)) {
e = {};
for (var o in r)
r.hasOwnProperty(o) && o !== Lg && (e[o] = tt(r[o]));
}
return e;
}
function lt(r, e, t) {
if (!j(e) || !j(r))
return t ? tt(e) : r;
for (var n in e)
if (e.hasOwnProperty(n) && n !== Lg) {
var a = r[n], i = e[n];
j(i) && j(a) && !z(i) && !z(a) && !mo(i) && !mo(a) && !km(i) && !km(a) && !Bs(i) && !Bs(a) ? lt(a, i, t) : (t || !(n in r)) && (r[n] = tt(e[n]));
}
return r;
}
function Ig(r, e) {
for (var t = r[0], n = 1, a = r.length; n < a; n++)
t = lt(t, r[n], e);
return t;
}
function B(r, e) {
if (Object.assign)
Object.assign(r, e);
else
for (var t in e)
e.hasOwnProperty(t) && t !== Lg && (r[t] = e[t]);
return r;
}
function J(r, e, t) {
for (var n = mt(e), a = 0; a < n.length; a++) {
var i = n[a];
(t ? e[i] != null : r[i] == null) && (r[i] = e[i]);
}
return r;
}
yn.createCanvas;
function ct(r, e) {
if (r) {
if (r.indexOf)
return r.indexOf(e);
for (var t = 0, n = r.length; t < n; t++)
if (r[t] === e)
return t;
}
return -1;
}
function I2(r, e) {
var t = r.prototype;
function n() {
}
n.prototype = e.prototype, r.prototype = new n();
for (var a in t)
t.hasOwnProperty(a) && (r.prototype[a] = t[a]);
r.prototype.constructor = r, r.superClass = e;
}
function Qt(r, e, t) {
if (r = "prototype" in r ? r.prototype : r, e = "prototype" in e ? e.prototype : e, Object.getOwnPropertyNames)
for (var n = Object.getOwnPropertyNames(e), a = 0; a < n.length; a++) {
var i = n[a];
i !== "constructor" && (t ? e[i] != null : r[i] == null) && (r[i] = e[i]);
}
else
J(r, e, t);
}
function me(r) {
return !r || typeof r == "string" ? !1 : typeof r.length == "number";
}
function C(r, e, t) {
if (!!(r && e))
if (r.forEach && r.forEach === D2)
r.forEach(e, t);
else if (r.length === +r.length)
for (var n = 0, a = r.length; n < a; n++)
e.call(t, r[n], n, r);
else
for (var i in r)
r.hasOwnProperty(i) && e.call(t, r[i], i, r);
}
function G(r, e, t) {
if (!r)
return [];
if (!e)
return Eg(r);
if (r.map && r.map === M2)
return r.map(e, t);
for (var n = [], a = 0, i = r.length; a < i; a++)
n.push(e.call(t, r[a], a, r));
return n;
}
function Xr(r, e, t, n) {
if (!!(r && e)) {
for (var a = 0, i = r.length; a < i; a++)
t = e.call(n, t, r[a], a, r);
return t;
}
}
function Et(r, e, t) {
if (!r)
return [];
if (!e)
return Eg(r);
if (r.filter && r.filter === A2)
return r.filter(e, t);
for (var n = [], a = 0, i = r.length; a < i; a++)
e.call(t, r[a], a, r) && n.push(r[a]);
return n;
}
function E2(r, e, t) {
if (!!(r && e)) {
for (var n = 0, a = r.length; n < a; n++)
if (e.call(t, r[n], n, r))
return r[n];
}
}
function mt(r) {
if (!r)
return [];
if (Object.keys)
return Object.keys(r);
var e = [];
for (var t in r)
r.hasOwnProperty(t) && e.push(t);
return e;
}
function P2(r, e) {
for (var t = [], n = 2; n < arguments.length; n++)
t[n - 2] = arguments[n];
return function() {
return r.apply(e, t.concat(Mg.call(arguments)));
};
}
var Y = Xl && q(Xl.bind) ? Xl.call.bind(Xl.bind) : P2;
function it(r) {
for (var e = [], t = 1; t < arguments.length; t++)
e[t - 1] = arguments[t];
return function() {
return r.apply(this, e.concat(Mg.call(arguments)));
};
}
function z(r) {
return Array.isArray ? Array.isArray(r) : Eo.call(r) === "[object Array]";
}
function q(r) {
return typeof r == "function";
}
function W(r) {
return typeof r == "string";
}
function yf(r) {
return Eo.call(r) === "[object String]";
}
function wt(r) {
return typeof r == "number";
}
function j(r) {
var e = typeof r;
return e === "function" || !!r && e === "object";
}
function km(r) {
return !!Jb[Eo.call(r)];
}
function Oe(r) {
return !!Qb[Eo.call(r)];
}
function mo(r) {
return typeof r == "object" && typeof r.nodeType == "number" && typeof r.ownerDocument == "object";
}
function Sh(r) {
return r.colorStops != null;
}
function N2(r) {
return r.image != null;
}
function eT(r) {
return Eo.call(r) === "[object RegExp]";
}
function vi(r) {
return r !== r;
}
function qt() {
for (var r = [], e = 0; e < arguments.length; e++)
r[e] = arguments[e];
for (var t = 0, n = r.length; t < n; t++)
if (r[t] != null)
return r[t];
}
function vt(r, e) {
return r != null ? r : e;
}
function Tr(r, e, t) {
return r != null ? r : e != null ? e : t;
}
function Eg(r) {
for (var e = [], t = 1; t < arguments.length; t++)
e[t - 1] = arguments[t];
return Mg.apply(r, e);
}
function Pg(r) {
if (typeof r == "number")
return [r, r, r, r];
var e = r.length;
return e === 2 ? [r[0], r[1], r[0], r[1]] : e === 3 ? [r[0], r[1], r[2], r[1]] : r;
}
function Q(r, e) {
if (!r)
throw new Error(e);
}
function xr(r) {
return r == null ? null : typeof r.trim == "function" ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
}
var rT = "__ec_primitive__";
function mf(r) {
r[rT] = !0;
}
function Bs(r) {
return r[rT];
}
var R2 = function() {
function r(e) {
this.data = {};
var t = z(e);
this.data = {};
var n = this;
e instanceof r ? e.each(a) : e && C(e, a);
function a(i, o) {
t ? n.set(i, o) : n.set(o, i);
}
}
return r.prototype.get = function(e) {
return this.data.hasOwnProperty(e) ? this.data[e] : null;
}, r.prototype.set = function(e, t) {
return this.data[e] = t;
}, r.prototype.each = function(e, t) {
for (var n in this.data)
this.data.hasOwnProperty(n) && e.call(t, this.data[n], n);
}, r.prototype.keys = function() {
return mt(this.data);
}, r.prototype.removeKey = function(e) {
delete this.data[e];
}, r;
}();
function K(r) {
return new R2(r);
}
function _f(r, e) {
for (var t = new r.constructor(r.length + e.length), n = 0; n < r.length; n++)
t[n] = r[n];
for (var a = r.length, n = 0; n < e.length; n++)
t[n + a] = e[n];
return t;
}
function xh(r, e) {
var t;
if (Object.create)
t = Object.create(r);
else {
var n = function() {
};
n.prototype = r, t = new n();
}
return e && B(t, e), t;
}
function nT(r) {
var e = r.style;
e.webkitUserSelect = "none", e.userSelect = "none", e.webkitTapHighlightColor = "rgba(0,0,0,0)", e["-webkit-touch-callout"] = "none";
}
function U(r, e) {
return r.hasOwnProperty(e);
}
function jt() {
}
var Ku = 180 / Math.PI;
function wi(r, e) {
return r == null && (r = 0), e == null && (e = 0), [r, e];
}
function be(r, e) {
return r[0] = e[0], r[1] = e[1], r;
}
function hn(r) {
return [r[0], r[1]];
}
function k2(r, e, t) {
return r[0] = e, r[1] = t, r;
}
function Om(r, e, t) {
return r[0] = e[0] + t[0], r[1] = e[1] + t[1], r;
}
function Fp(r, e, t, n) {
return r[0] = e[0] + t[0] * n, r[1] = e[1] + t[1] * n, r;
}
function Ja(r, e, t) {
return r[0] = e[0] - t[0], r[1] = e[1] - t[1], r;
}
function Hp(r) {
return Math.sqrt(O2(r));
}
function O2(r) {
return r[0] * r[0] + r[1] * r[1];
}
function uc(r, e, t) {
return r[0] = e[0] * t, r[1] = e[1] * t, r;
}
function Cl(r, e) {
var t = Hp(e);
return t === 0 ? (r[0] = 0, r[1] = 0) : (r[0] = e[0] / t, r[1] = e[1] / t), r;
}
function $p(r, e) {
return Math.sqrt((r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]));
}
var $n = $p;
function V2(r, e) {
return (r[0] - e[0]) * (r[0] - e[0]) + (r[1] - e[1]) * (r[1] - e[1]);
}
var ai = V2;
function ju(r, e, t, n) {
return r[0] = e[0] + n * (t[0] - e[0]), r[1] = e[1] + n * (t[1] - e[1]), r;
}
function ue(r, e, t) {
var n = e[0], a = e[1];
return r[0] = t[0] * n + t[2] * a + t[4], r[1] = t[1] * n + t[3] * a + t[5], r;
}
function Wn(r, e, t) {
return r[0] = Math.min(e[0], t[0]), r[1] = Math.min(e[1], t[1]), r;
}
function Un(r, e, t) {
return r[0] = Math.max(e[0], t[0]), r[1] = Math.max(e[1], t[1]), r;
}
var Ii = function() {
function r(e, t) {
this.target = e, this.topTarget = t && t.topTarget;
}
return r;
}(), B2 = function() {
function r(e) {
this.handler = e, e.on("mousedown", this._dragStart, this), e.on("mousemove", this._drag, this), e.on("mouseup", this._dragEnd, this);
}
return r.prototype._dragStart = function(e) {
for (var t = e.target; t && !t.draggable; )
t = t.parent || t.__hostTarget;
t && (this._draggingTarget = t, t.dragging = !0, this._x = e.offsetX, this._y = e.offsetY, this.handler.dispatchToElement(new Ii(t, e), "dragstart", e.event));
}, r.prototype._drag = function(e) {
var t = this._draggingTarget;
if (t) {
var n = e.offsetX, a = e.offsetY, i = n - this._x, o = a - this._y;
this._x = n, this._y = a, t.drift(i, o, e), this.handler.dispatchToElement(new Ii(t, e), "drag", e.event);
var s = this.handler.findHover(n, a, t).target, l = this._dropTarget;
this._dropTarget = s, t !== s && (l && s !== l && this.handler.dispatchToElement(new Ii(l, e), "dragleave", e.event), s && s !== l && this.handler.dispatchToElement(new Ii(s, e), "dragenter", e.event));
}
}, r.prototype._dragEnd = function(e) {
var t = this._draggingTarget;
t && (t.dragging = !1), this.handler.dispatchToElement(new Ii(t, e), "dragend", e.event), this._dropTarget && this.handler.dispatchToElement(new Ii(this._dropTarget, e), "drop", e.event), this._draggingTarget = null, this._dropTarget = null;
}, r;
}();
const z2 = B2;
var G2 = function() {
function r(e) {
e && (this._$eventProcessor = e);
}
return r.prototype.on = function(e, t, n, a) {
this._$handlers || (this._$handlers = {});
var i = this._$handlers;
if (typeof t == "function" && (a = n, n = t, t = null), !n || !e)
return this;
var o = this._$eventProcessor;
t != null && o && o.normalizeQuery && (t = o.normalizeQuery(t)), i[e] || (i[e] = []);
for (var s = 0; s < i[e].length; s++)
if (i[e][s].h === n)
return this;
var l = {
h: n,
query: t,
ctx: a || this,
callAtLast: n.zrEventfulCallAtLast
}, u = i[e].length - 1, f = i[e][u];
return f && f.callAtLast ? i[e].splice(u, 0, l) : i[e].push(l), this;
}, r.prototype.isSilent = function(e) {
var t = this._$handlers;
return !t || !t[e] || !t[e].length;
}, r.prototype.off = function(e, t) {
var n = this._$handlers;
if (!n)
return this;
if (!e)
return this._$handlers = {}, this;
if (t) {
if (n[e]) {
for (var a = [], i = 0, o = n[e].length; i < o; i++)
n[e][i].h !== t && a.push(n[e][i]);
n[e] = a;
}
n[e] && n[e].length === 0 && delete n[e];
} else
delete n[e];
return this;
}, r.prototype.trigger = function(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
if (!this._$handlers)
return this;
var a = this._$handlers[e], i = this._$eventProcessor;
if (a)
for (var o = t.length, s = a.length, l = 0; l < s; l++) {
var u = a[l];
if (!(i && i.filter && u.query != null && !i.filter(e, u.query)))
switch (o) {
case 0:
u.h.call(u.ctx);
break;
case 1:
u.h.call(u.ctx, t[0]);
break;
case 2:
u.h.call(u.ctx, t[0], t[1]);
break;
default:
u.h.apply(u.ctx, t);
break;
}
}
return i && i.afterTrigger && i.afterTrigger(e), this;
}, r.prototype.triggerWithContext = function(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
if (!this._$handlers)
return this;
var a = this._$handlers[e], i = this._$eventProcessor;
if (a)
for (var o = t.length, s = t[o - 1], l = a.length, u = 0; u < l; u++) {
var f = a[u];
if (!(i && i.filter && f.query != null && !i.filter(e, f.query)))
switch (o) {
case 0:
f.h.call(s);
break;
case 1:
f.h.call(s, t[0]);
break;
case 2:
f.h.call(s, t[0], t[1]);
break;
default:
f.h.apply(s, t.slice(1, o - 1));
break;
}
}
return i && i.afterTrigger && i.afterTrigger(e), this;
}, r;
}();
const vr = G2;
var F2 = Math.log(2);
function Wp(r, e, t, n, a, i) {
var o = n + "-" + a, s = r.length;
if (i.hasOwnProperty(o))
return i[o];
if (e === 1) {
var l = Math.round(Math.log((1 << s) - 1 & ~a) / F2);
return r[t][l];
}
for (var u = n | 1 << t, f = t + 1; n & 1 << f; )
f++;
for (var h = 0, c = 0, v = 0; c < s; c++) {
var p = 1 << c;
p & a || (h += (v % 2 ? -1 : 1) * r[t][c] * Wp(r, e - 1, f, u, a | p, i), v++);
}
return i[o] = h, h;
}
function Vm(r, e) {
var t = [
[r[0], r[1], 1, 0, 0, 0, -e[0] * r[0], -e[0] * r[1]],
[0, 0, 0, r[0], r[1], 1, -e[1] * r[0], -e[1] * r[1]],
[r[2], r[3], 1, 0, 0, 0, -e[2] * r[2], -e[2] * r[3]],
[0, 0, 0, r[2], r[3], 1, -e[3] * r[2], -e[3] * r[3]],
[r[4], r[5], 1, 0, 0, 0, -e[4] * r[4], -e[4] * r[5]],
[0, 0, 0, r[4], r[5], 1, -e[5] * r[4], -e[5] * r[5]],
[r[6], r[7], 1, 0, 0, 0, -e[6] * r[6], -e[6] * r[7]],
[0, 0, 0, r[6], r[7], 1, -e[7] * r[6], -e[7] * r[7]]
], n = {}, a = Wp(t, 8, 0, 0, 0, n);
if (a !== 0) {
for (var i = [], o = 0; o < 8; o++)
for (var s = 0; s < 8; s++)
i[s] == null && (i[s] = 0), i[s] += ((o + s) % 2 ? -1 : 1) * Wp(t, 7, o === 0 ? 1 : 0, 1 << o, 1 << s, n) / a * e[o];
return function(l, u, f) {
var h = u * i[6] + f * i[7] + 1;
l[0] = (u * i[0] + f * i[1] + i[2]) / h, l[1] = (u * i[3] + f * i[4] + i[5]) / h;
};
}
}
var Bm = "___zrEVENTSAVED", fc = [];
function H2(r, e, t, n, a) {
return Up(fc, e, n, a, !0) && Up(r, t, fc[0], fc[1]);
}
function Up(r, e, t, n, a) {
if (e.getBoundingClientRect && Dt.domSupported && !aT(e)) {
var i = e[Bm] || (e[Bm] = {}), o = $2(e, i), s = W2(o, i, a);
if (s)
return s(r, t, n), !0;
}
return !1;
}
function $2(r, e) {
var t = e.markers;
if (t)
return t;
t = e.markers = [];
for (var n = ["left", "right"], a = ["top", "bottom"], i = 0; i < 4; i++) {
var o = document.createElement("div"), s = o.style, l = i % 2, u = (i >> 1) % 2;
s.cssText = [
"position: absolute",
"visibility: hidden",
"padding: 0",
"margin: 0",
"border-width: 0",
"user-select: none",
"width:0",
"height:0",
n[l] + ":0",
a[u] + ":0",
n[1 - l] + ":auto",
a[1 - u] + ":auto",
""
].join("!important;"), r.appendChild(o), t.push(o);
}
return t;
}
function W2(r, e, t) {
for (var n = t ? "invTrans" : "trans", a = e[n], i = e.srcCoords, o = [], s = [], l = !0, u = 0; u < 4; u++) {
var f = r[u].getBoundingClientRect(), h = 2 * u, c = f.left, v = f.top;
o.push(c, v), l = l && i && c === i[h] && v === i[h + 1], s.push(r[u].offsetLeft, r[u].offsetTop);
}
return l && a ? a : (e.srcCoords = o, e[n] = t ? Vm(s, o) : Vm(o, s));
}
function aT(r) {
return r.nodeName.toUpperCase() === "CANVAS";
}
var U2 = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, hc = [], Y2 = Dt.browser.firefox && +Dt.browser.version.split(".")[0] < 39;
function Yp(r, e, t, n) {
return t = t || {}, n ? zm(r, e, t) : Y2 && e.layerX != null && e.layerX !== e.offsetX ? (t.zrX = e.layerX, t.zrY = e.layerY) : e.offsetX != null ? (t.zrX = e.offsetX, t.zrY = e.offsetY) : zm(r, e, t), t;
}
function zm(r, e, t) {
if (Dt.domSupported && r.getBoundingClientRect) {
var n = e.clientX, a = e.clientY;
if (aT(r)) {
var i = r.getBoundingClientRect();
t.zrX = n - i.left, t.zrY = a - i.top;
return;
} else if (Up(hc, r, n, a)) {
t.zrX = hc[0], t.zrY = hc[1];
return;
}
}
t.zrX = t.zrY = 0;
}
function Ng(r) {
return r || window.event;
}
function tr(r, e, t) {
if (e = Ng(e), e.zrX != null)
return e;
var n = e.type, a = n && n.indexOf("touch") >= 0;
if (a) {
var o = n !== "touchend" ? e.targetTouches[0] : e.changedTouches[0];
o && Yp(r, o, e, t);
} else {
Yp(r, e, e, t);
var i = Z2(e);
e.zrDelta = i ? i / 120 : -(e.detail || 0) / 3;
}
var s = e.button;
return e.which == null && s !== void 0 && U2.test(e.type) && (e.which = s & 1 ? 1 : s & 2 ? 3 : s & 4 ? 2 : 0), e;
}
function Z2(r) {
var e = r.wheelDelta;
if (e)
return e;
var t = r.deltaX, n = r.deltaY;
if (t == null || n == null)
return e;
var a = Math.abs(n !== 0 ? n : t), i = n > 0 ? -1 : n < 0 ? 1 : t > 0 ? -1 : 1;
return 3 * a * i;
}
function Zp(r, e, t, n) {
r.addEventListener(e, t, n);
}
function X2(r, e, t, n) {
r.removeEventListener(e, t, n);
}
var mn = function(r) {
r.preventDefault(), r.stopPropagation(), r.cancelBubble = !0;
};
function Gm(r) {
return r.which === 2 || r.which === 3;
}
var q2 = function() {
function r() {
this._track = [];
}
return r.prototype.recognize = function(e, t, n) {
return this._doTrack(e, t, n), this._recognize(e);
}, r.prototype.clear = function() {
return this._track.length = 0, this;
}, r.prototype._doTrack = function(e, t, n) {
var a = e.touches;
if (!!a) {
for (var i = {
points: [],
touches: [],
target: t,
event: e
}, o = 0, s = a.length; o < s; o++) {
var l = a[o], u = Yp(n, l, {});
i.points.push([u.zrX, u.zrY]), i.touches.push(l);
}
this._track.push(i);
}
}, r.prototype._recognize = function(e) {
for (var t in cc)
if (cc.hasOwnProperty(t)) {
var n = cc[t](this._track, e);
if (n)
return n;
}
}, r;
}();
function Fm(r) {
var e = r[1][0] - r[0][0], t = r[1][1] - r[0][1];
return Math.sqrt(e * e + t * t);
}
function K2(r) {
return [
(r[0][0] + r[1][0]) / 2,
(r[0][1] + r[1][1]) / 2
];
}
var cc = {
pinch: function(r, e) {
var t = r.length;
if (!!t) {
var n = (r[t - 1] || {}).points, a = (r[t - 2] || {}).points || n;
if (a && a.length > 1 && n && n.length > 1) {
var i = Fm(n) / Fm(a);
!isFinite(i) && (i = 1), e.pinchScale = i;
var o = K2(n);
return e.pinchX = o[0], e.pinchY = o[1], {
type: "pinch",
target: r[0].target,
event: e
};
}
}
}
}, iT = "silent";
function j2(r, e, t) {
return {
type: r,
event: t,
target: e.target,
topTarget: e.topTarget,
cancelBubble: !1,
offsetX: t.zrX,
offsetY: t.zrY,
gestureEvent: t.gestureEvent,
pinchX: t.pinchX,
pinchY: t.pinchY,
pinchScale: t.pinchScale,
wheelDelta: t.zrDelta,
zrByTouch: t.zrByTouch,
which: t.which,
stop: J2
};
}
function J2() {
mn(this.event);
}
var Q2 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.handler = null, t;
}
return e.prototype.dispose = function() {
}, e.prototype.setCursor = function() {
}, e;
}(vr), Ko = function() {
function r(e, t) {
this.x = e, this.y = t;
}
return r;
}(), tE = [
"click",
"dblclick",
"mousewheel",
"mouseout",
"mouseup",
"mousedown",
"mousemove",
"contextmenu"
], oT = function(r) {
R(e, r);
function e(t, n, a, i) {
var o = r.call(this) || this;
return o._hovered = new Ko(0, 0), o.storage = t, o.painter = n, o.painterRoot = i, a = a || new Q2(), o.proxy = null, o.setHandlerProxy(a), o._draggingMgr = new z2(o), o;
}
return e.prototype.setHandlerProxy = function(t) {
this.proxy && this.proxy.dispose(), t && (C(tE, function(n) {
t.on && t.on(n, this[n], this);
}, this), t.handler = this), this.proxy = t;
}, e.prototype.mousemove = function(t) {
var n = t.zrX, a = t.zrY, i = sT(this, n, a), o = this._hovered, s = o.target;
s && !s.__zr && (o = this.findHover(o.x, o.y), s = o.target);
var l = this._hovered = i ? new Ko(n, a) : this.findHover(n, a), u = l.target, f = this.proxy;
f.setCursor && f.setCursor(u ? u.cursor : "default"), s && u !== s && this.dispatchToElement(o, "mouseout", t), this.dispatchToElement(l, "mousemove", t), u && u !== s && this.dispatchToElement(l, "mouseover", t);
}, e.prototype.mouseout = function(t) {
var n = t.zrEventControl;
n !== "only_globalout" && this.dispatchToElement(this._hovered, "mouseout", t), n !== "no_globalout" && this.trigger("globalout", { type: "globalout", event: t });
}, e.prototype.resize = function() {
this._hovered = new Ko(0, 0);
}, e.prototype.dispatch = function(t, n) {
var a = this[t];
a && a.call(this, n);
}, e.prototype.dispose = function() {
this.proxy.dispose(), this.storage = null, this.proxy = null, this.painter = null;
}, e.prototype.setCursorStyle = function(t) {
var n = this.proxy;
n.setCursor && n.setCursor(t);
}, e.prototype.dispatchToElement = function(t, n, a) {
t = t || {};
var i = t.target;
if (!(i && i.silent)) {
for (var o = "on" + n, s = j2(n, t, a); i && (i[o] && (s.cancelBubble = !!i[o].call(i, s)), i.trigger(n, s), i = i.__hostTarget ? i.__hostTarget : i.parent, !s.cancelBubble); )
;
s.cancelBubble || (this.trigger(n, s), this.painter && this.painter.eachOtherLayer && this.painter.eachOtherLayer(function(l) {
typeof l[o] == "function" && l[o].call(l, s), l.trigger && l.trigger(n, s);
}));
}
}, e.prototype.findHover = function(t, n, a) {
for (var i = this.storage.getDisplayList(), o = new Ko(t, n), s = i.length - 1; s >= 0; s--) {
var l = void 0;
if (i[s] !== a && !i[s].ignore && (l = eE(i[s], t, n)) && (!o.topTarget && (o.topTarget = i[s]), l !== iT)) {
o.target = i[s];
break;
}
}
return o;
}, e.prototype.processGesture = function(t, n) {
this._gestureMgr || (this._gestureMgr = new q2());
var a = this._gestureMgr;
n === "start" && a.clear();
var i = a.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
if (n === "end" && a.clear(), i) {
var o = i.type;
t.gestureEvent = o;
var s = new Ko();
s.target = i.target, this.dispatchToElement(s, o, i.event);
}
}, e;
}(vr);
C(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function(r) {
oT.prototype[r] = function(e) {
var t = e.zrX, n = e.zrY, a = sT(this, t, n), i, o;
if ((r !== "mouseup" || !a) && (i = this.findHover(t, n), o = i.target), r === "mousedown")
this._downEl = o, this._downPoint = [e.zrX, e.zrY], this._upEl = o;
else if (r === "mouseup")
this._upEl = o;
else if (r === "click") {
if (this._downEl !== this._upEl || !this._downPoint || $n(this._downPoint, [e.zrX, e.zrY]) > 4)
return;
this._downPoint = null;
}
this.dispatchToElement(i, r, e);
};
});
function eE(r, e, t) {
if (r[r.rectHover ? "rectContain" : "contain"](e, t)) {
for (var n = r, a = void 0, i = !1; n; ) {
if (n.ignoreClip && (i = !0), !i) {
var o = n.getClipPath();
if (o && !o.contain(e, t))
return !1;
n.silent && (a = !0);
}
var s = n.__hostTarget;
n = s || n.parent;
}
return a ? iT : !0;
}
return !1;
}
function sT(r, e, t) {
var n = r.painter;
return e < 0 || e > n.getWidth() || t < 0 || t > n.getHeight();
}
const rE = oT;
var lT = 32, jo = 7;
function nE(r) {
for (var e = 0; r >= lT; )
e |= r & 1, r >>= 1;
return r + e;
}
function Hm(r, e, t, n) {
var a = e + 1;
if (a === t)
return 1;
if (n(r[a++], r[e]) < 0) {
for (; a < t && n(r[a], r[a - 1]) < 0; )
a++;
aE(r, e, a);
} else
for (; a < t && n(r[a], r[a - 1]) >= 0; )
a++;
return a - e;
}
function aE(r, e, t) {
for (t--; e < t; ) {
var n = r[e];
r[e++] = r[t], r[t--] = n;
}
}
function $m(r, e, t, n, a) {
for (n === e && n++; n < t; n++) {
for (var i = r[n], o = e, s = n, l; o < s; )
l = o + s >>> 1, a(i, r[l]) < 0 ? s = l : o = l + 1;
var u = n - o;
switch (u) {
case 3:
r[o + 3] = r[o + 2];
case 2:
r[o + 2] = r[o + 1];
case 1:
r[o + 1] = r[o];
break;
default:
for (; u > 0; )
r[o + u] = r[o + u - 1], u--;
}
r[o] = i;
}
}
function vc(r, e, t, n, a, i) {
var o = 0, s = 0, l = 1;
if (i(r, e[t + a]) > 0) {
for (s = n - a; l < s && i(r, e[t + a + l]) > 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s), o += a, l += a;
} else {
for (s = a + 1; l < s && i(r, e[t + a - l]) <= 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s);
var u = o;
o = a - l, l = a - u;
}
for (o++; o < l; ) {
var f = o + (l - o >>> 1);
i(r, e[t + f]) > 0 ? o = f + 1 : l = f;
}
return l;
}
function pc(r, e, t, n, a, i) {
var o = 0, s = 0, l = 1;
if (i(r, e[t + a]) < 0) {
for (s = a + 1; l < s && i(r, e[t + a - l]) < 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s);
var u = o;
o = a - l, l = a - u;
} else {
for (s = n - a; l < s && i(r, e[t + a + l]) >= 0; )
o = l, l = (l << 1) + 1, l <= 0 && (l = s);
l > s && (l = s), o += a, l += a;
}
for (o++; o < l; ) {
var f = o + (l - o >>> 1);
i(r, e[t + f]) < 0 ? l = f : o = f + 1;
}
return l;
}
function iE(r, e) {
var t = jo, n, a, i = 0;
r.length;
var o = [];
n = [], a = [];
function s(v, p) {
n[i] = v, a[i] = p, i += 1;
}
function l() {
for (; i > 1; ) {
var v = i - 2;
if (v >= 1 && a[v - 1] <= a[v] + a[v + 1] || v >= 2 && a[v - 2] <= a[v] + a[v - 1])
a[v - 1] < a[v + 1] && v--;
else if (a[v] > a[v + 1])
break;
f(v);
}
}
function u() {
for (; i > 1; ) {
var v = i - 2;
v > 0 && a[v - 1] < a[v + 1] && v--, f(v);
}
}
function f(v) {
var p = n[v], d = a[v], g = n[v + 1], y = a[v + 1];
a[v] = d + y, v === i - 3 && (n[v + 1] = n[v + 2], a[v + 1] = a[v + 2]), i--;
var m = pc(r[g], r, p, d, 0, e);
p += m, d -= m, d !== 0 && (y = vc(r[p + d - 1], r, g, y, y - 1, e), y !== 0 && (d <= y ? h(p, d, g, y) : c(p, d, g, y)));
}
function h(v, p, d, g) {
var y = 0;
for (y = 0; y < p; y++)
o[y] = r[v + y];
var m = 0, _ = d, S = v;
if (r[S++] = r[_++], --g === 0) {
for (y = 0; y < p; y++)
r[S + y] = o[m + y];
return;
}
if (p === 1) {
for (y = 0; y < g; y++)
r[S + y] = r[_ + y];
r[S + g] = o[m];
return;
}
for (var w = t, x, b, T; ; ) {
x = 0, b = 0, T = !1;
do
if (e(r[_], o[m]) < 0) {
if (r[S++] = r[_++], b++, x = 0, --g === 0) {
T = !0;
break;
}
} else if (r[S++] = o[m++], x++, b = 0, --p === 1) {
T = !0;
break;
}
while ((x | b) < w);
if (T)
break;
do {
if (x = pc(r[_], o, m, p, 0, e), x !== 0) {
for (y = 0; y < x; y++)
r[S + y] = o[m + y];
if (S += x, m += x, p -= x, p <= 1) {
T = !0;
break;
}
}
if (r[S++] = r[_++], --g === 0) {
T = !0;
break;
}
if (b = vc(o[m], r, _, g, 0, e), b !== 0) {
for (y = 0; y < b; y++)
r[S + y] = r[_ + y];
if (S += b, _ += b, g -= b, g === 0) {
T = !0;
break;
}
}
if (r[S++] = o[m++], --p === 1) {
T = !0;
break;
}
w--;
} while (x >= jo || b >= jo);
if (T)
break;
w < 0 && (w = 0), w += 2;
}
if (t = w, t < 1 && (t = 1), p === 1) {
for (y = 0; y < g; y++)
r[S + y] = r[_ + y];
r[S + g] = o[m];
} else {
if (p === 0)
throw new Error();
for (y = 0; y < p; y++)
r[S + y] = o[m + y];
}
}
function c(v, p, d, g) {
var y = 0;
for (y = 0; y < g; y++)
o[y] = r[d + y];
var m = v + p - 1, _ = g - 1, S = d + g - 1, w = 0, x = 0;
if (r[S--] = r[m--], --p === 0) {
for (w = S - (g - 1), y = 0; y < g; y++)
r[w + y] = o[y];
return;
}
if (g === 1) {
for (S -= p, m -= p, x = S + 1, w = m + 1, y = p - 1; y >= 0; y--)
r[x + y] = r[w + y];
r[S] = o[_];
return;
}
for (var b = t; ; ) {
var T = 0, D = 0, A = !1;
do
if (e(o[_], r[m]) < 0) {
if (r[S--] = r[m--], T++, D = 0, --p === 0) {
A = !0;
break;
}
} else if (r[S--] = o[_--], D++, T = 0, --g === 1) {
A = !0;
break;
}
while ((T | D) < b);
if (A)
break;
do {
if (T = p - pc(o[_], r, v, p, p - 1, e), T !== 0) {
for (S -= T, m -= T, p -= T, x = S + 1, w = m + 1, y = T - 1; y >= 0; y--)
r[x + y] = r[w + y];
if (p === 0) {
A = !0;
break;
}
}
if (r[S--] = o[_--], --g === 1) {
A = !0;
break;
}
if (D = g - vc(r[m], o, 0, g, g - 1, e), D !== 0) {
for (S -= D, _ -= D, g -= D, x = S + 1, w = _ + 1, y = 0; y < D; y++)
r[x + y] = o[w + y];
if (g <= 1) {
A = !0;
break;
}
}
if (r[S--] = r[m--], --p === 0) {
A = !0;
break;
}
b--;
} while (T >= jo || D >= jo);
if (A)
break;
b < 0 && (b = 0), b += 2;
}
if (t = b, t < 1 && (t = 1), g === 1) {
for (S -= p, m -= p, x = S + 1, w = m + 1, y = p - 1; y >= 0; y--)
r[x + y] = r[w + y];
r[S] = o[_];
} else {
if (g === 0)
throw new Error();
for (w = S - (g - 1), y = 0; y < g; y++)
r[w + y] = o[y];
}
}
return {
mergeRuns: l,
forceMergeRuns: u,
pushRun: s
};
}
function Ju(r, e, t, n) {
t || (t = 0), n || (n = r.length);
var a = n - t;
if (!(a < 2)) {
var i = 0;
if (a < lT) {
i = Hm(r, t, n, e), $m(r, t, n, t + i, e);
return;
}
var o = iE(r, e), s = nE(a);
do {
if (i = Hm(r, t, n, e), i < s) {
var l = a;
l > s && (l = s), $m(r, t, t + l, t + i, e), i = l;
}
o.pushRun(t, i), o.mergeRuns(), a -= i, t += i;
} while (a !== 0);
o.forceMergeRuns();
}
}
var We = 1, Cs = 2, Qi = 4, Wm = !1;
function dc() {
Wm || (Wm = !0, console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"));
}
function Um(r, e) {
return r.zlevel === e.zlevel ? r.z === e.z ? r.z2 - e.z2 : r.z - e.z : r.zlevel - e.zlevel;
}
var oE = function() {
function r() {
this._roots = [], this._displayList = [], this._displayListLen = 0, this.displayableSortFunc = Um;
}
return r.prototype.traverse = function(e, t) {
for (var n = 0; n < this._roots.length; n++)
this._roots[n].traverse(e, t);
}, r.prototype.getDisplayList = function(e, t) {
t = t || !1;
var n = this._displayList;
return (e || !n.length) && this.updateDisplayList(t), n;
}, r.prototype.updateDisplayList = function(e) {
this._displayListLen = 0;
for (var t = this._roots, n = this._displayList, a = 0, i = t.length; a < i; a++)
this._updateAndAddDisplayable(t[a], null, e);
n.length = this._displayListLen, Ju(n, Um);
}, r.prototype._updateAndAddDisplayable = function(e, t, n) {
if (!(e.ignore && !n)) {
e.beforeUpdate(), e.update(), e.afterUpdate();
var a = e.getClipPath();
if (e.ignoreClip)
t = null;
else if (a) {
t ? t = t.slice() : t = [];
for (var i = a, o = e; i; )
i.parent = o, i.updateTransform(), t.push(i), o = i, i = i.getClipPath();
}
if (e.childrenRef) {
for (var s = e.childrenRef(), l = 0; l < s.length; l++) {
var u = s[l];
e.__dirty && (u.__dirty |= We), this._updateAndAddDisplayable(u, t, n);
}
e.__dirty = 0;
} else {
var f = e;
t && t.length ? f.__clipPaths = t : f.__clipPaths && f.__clipPaths.length > 0 && (f.__clipPaths = []), isNaN(f.z) && (dc(), f.z = 0), isNaN(f.z2) && (dc(), f.z2 = 0), isNaN(f.zlevel) && (dc(), f.zlevel = 0), this._displayList[this._displayListLen++] = f;
}
var h = e.getDecalElement && e.getDecalElement();
h && this._updateAndAddDisplayable(h, t, n);
var c = e.getTextGuideLine();
c && this._updateAndAddDisplayable(c, t, n);
var v = e.getTextContent();
v && this._updateAndAddDisplayable(v, t, n);
}
}, r.prototype.addRoot = function(e) {
e.__zr && e.__zr.storage === this || this._roots.push(e);
}, r.prototype.delRoot = function(e) {
if (e instanceof Array) {
for (var t = 0, n = e.length; t < n; t++)
this.delRoot(e[t]);
return;
}
var a = ct(this._roots, e);
a >= 0 && this._roots.splice(a, 1);
}, r.prototype.delAllRoots = function() {
this._roots = [], this._displayList = [], this._displayListLen = 0;
}, r.prototype.getRoots = function() {
return this._roots;
}, r.prototype.dispose = function() {
this._displayList = null, this._roots = null;
}, r;
}();
const sE = oE;
var uT;
uT = Dt.hasGlobalWindow && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function(r) {
return setTimeout(r, 16);
};
const Xp = uT;
var Qu = {
linear: function(r) {
return r;
},
quadraticIn: function(r) {
return r * r;
},
quadraticOut: function(r) {
return r * (2 - r);
},
quadraticInOut: function(r) {
return (r *= 2) < 1 ? 0.5 * r * r : -0.5 * (--r * (r - 2) - 1);
},
cubicIn: function(r) {
return r * r * r;
},
cubicOut: function(r) {
return --r * r * r + 1;
},
cubicInOut: function(r) {
return (r *= 2) < 1 ? 0.5 * r * r * r : 0.5 * ((r -= 2) * r * r + 2);
},
quarticIn: function(r) {
return r * r * r * r;
},
quarticOut: function(r) {
return 1 - --r * r * r * r;
},
quarticInOut: function(r) {
return (r *= 2) < 1 ? 0.5 * r * r * r * r : -0.5 * ((r -= 2) * r * r * r - 2);
},
quinticIn: function(r) {
return r * r * r * r * r;
},
quinticOut: function(r) {
return --r * r * r * r * r + 1;
},
quinticInOut: function(r) {
return (r *= 2) < 1 ? 0.5 * r * r * r * r * r : 0.5 * ((r -= 2) * r * r * r * r + 2);
},
sinusoidalIn: function(r) {
return 1 - Math.cos(r * Math.PI / 2);
},
sinusoidalOut: function(r) {
return Math.sin(r * Math.PI / 2);
},
sinusoidalInOut: function(r) {
return 0.5 * (1 - Math.cos(Math.PI * r));
},
exponentialIn: function(r) {
return r === 0 ? 0 : Math.pow(1024, r - 1);
},
exponentialOut: function(r) {
return r === 1 ? 1 : 1 - Math.pow(2, -10 * r);
},
exponentialInOut: function(r) {
return r === 0 ? 0 : r === 1 ? 1 : (r *= 2) < 1 ? 0.5 * Math.pow(1024, r - 1) : 0.5 * (-Math.pow(2, -10 * (r - 1)) + 2);
},
circularIn: function(r) {
return 1 - Math.sqrt(1 - r * r);
},
circularOut: function(r) {
return Math.sqrt(1 - --r * r);
},
circularInOut: function(r) {
return (r *= 2) < 1 ? -0.5 * (Math.sqrt(1 - r * r) - 1) : 0.5 * (Math.sqrt(1 - (r -= 2) * r) + 1);
},
elasticIn: function(r) {
var e, t = 0.1, n = 0.4;
return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = n / 4) : e = n * Math.asin(1 / t) / (2 * Math.PI), -(t * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / n)));
},
elasticOut: function(r) {
var e, t = 0.1, n = 0.4;
return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = n / 4) : e = n * Math.asin(1 / t) / (2 * Math.PI), t * Math.pow(2, -10 * r) * Math.sin((r - e) * (2 * Math.PI) / n) + 1);
},
elasticInOut: function(r) {
var e, t = 0.1, n = 0.4;
return r === 0 ? 0 : r === 1 ? 1 : (!t || t < 1 ? (t = 1, e = n / 4) : e = n * Math.asin(1 / t) / (2 * Math.PI), (r *= 2) < 1 ? -0.5 * (t * Math.pow(2, 10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / n)) : t * Math.pow(2, -10 * (r -= 1)) * Math.sin((r - e) * (2 * Math.PI) / n) * 0.5 + 1);
},
backIn: function(r) {
var e = 1.70158;
return r * r * ((e + 1) * r - e);
},
backOut: function(r) {
var e = 1.70158;
return --r * r * ((e + 1) * r + e) + 1;
},
backInOut: function(r) {
var e = 2.5949095;
return (r *= 2) < 1 ? 0.5 * (r * r * ((e + 1) * r - e)) : 0.5 * ((r -= 2) * r * ((e + 1) * r + e) + 2);
},
bounceIn: function(r) {
return 1 - Qu.bounceOut(1 - r);
},
bounceOut: function(r) {
return r < 1 / 2.75 ? 7.5625 * r * r : r < 2 / 2.75 ? 7.5625 * (r -= 1.5 / 2.75) * r + 0.75 : r < 2.5 / 2.75 ? 7.5625 * (r -= 2.25 / 2.75) * r + 0.9375 : 7.5625 * (r -= 2.625 / 2.75) * r + 0.984375;
},
bounceInOut: function(r) {
return r < 0.5 ? Qu.bounceIn(r * 2) * 0.5 : Qu.bounceOut(r * 2 - 1) * 0.5 + 0.5;
}
};
const fT = Qu;
var ql = Math.pow, Qn = Math.sqrt, Sf = 1e-8, hT = 1e-4, Ym = Qn(3), Kl = 1 / 3, Gr = wi(), ar = wi(), ho = wi();
function Yn(r) {
return r > -Sf && r < Sf;
}
function cT(r) {
return r > Sf || r < -Sf;
}
function re(r, e, t, n, a) {
var i = 1 - a;
return i * i * (i * r + 3 * a * e) + a * a * (a * n + 3 * i * t);
}
function Zm(r, e, t, n, a) {
var i = 1 - a;
return 3 * (((e - r) * i + 2 * (t - e) * a) * i + (n - t) * a * a);
}
function xf(r, e, t, n, a, i) {
var o = n + 3 * (e - t) - r, s = 3 * (t - e * 2 + r), l = 3 * (e - r), u = r - a, f = s * s - 3 * o * l, h = s * l - 9 * o * u, c = l * l - 3 * s * u, v = 0;
if (Yn(f) && Yn(h))
if (Yn(s))
i[0] = 0;
else {
var p = -l / s;
p >= 0 && p <= 1 && (i[v++] = p);
}
else {
var d = h * h - 4 * f * c;
if (Yn(d)) {
var g = h / f, p = -s / o + g, y = -g / 2;
p >= 0 && p <= 1 && (i[v++] = p), y >= 0 && y <= 1 && (i[v++] = y);
} else if (d > 0) {
var m = Qn(d), _ = f * s + 1.5 * o * (-h + m), S = f * s + 1.5 * o * (-h - m);
_ < 0 ? _ = -ql(-_, Kl) : _ = ql(_, Kl), S < 0 ? S = -ql(-S, Kl) : S = ql(S, Kl);
var p = (-s - (_ + S)) / (3 * o);
p >= 0 && p <= 1 && (i[v++] = p);
} else {
var w = (2 * f * s - 3 * o * h) / (2 * Qn(f * f * f)), x = Math.acos(w) / 3, b = Qn(f), T = Math.cos(x), p = (-s - 2 * b * T) / (3 * o), y = (-s + b * (T + Ym * Math.sin(x))) / (3 * o), D = (-s + b * (T - Ym * Math.sin(x))) / (3 * o);
p >= 0 && p <= 1 && (i[v++] = p), y >= 0 && y <= 1 && (i[v++] = y), D >= 0 && D <= 1 && (i[v++] = D);
}
}
return v;
}
function vT(r, e, t, n, a) {
var i = 6 * t - 12 * e + 6 * r, o = 9 * e + 3 * n - 3 * r - 9 * t, s = 3 * e - 3 * r, l = 0;
if (Yn(o)) {
if (cT(i)) {
var u = -s / i;
u >= 0 && u <= 1 && (a[l++] = u);
}
} else {
var f = i * i - 4 * o * s;
if (Yn(f))
a[0] = -i / (2 * o);
else if (f > 0) {
var h = Qn(f), u = (-i + h) / (2 * o), c = (-i - h) / (2 * o);
u >= 0 && u <= 1 && (a[l++] = u), c >= 0 && c <= 1 && (a[l++] = c);
}
}
return l;
}
function na(r, e, t, n, a, i) {
var o = (e - r) * a + r, s = (t - e) * a + e, l = (n - t) * a + t, u = (s - o) * a + o, f = (l - s) * a + s, h = (f - u) * a + u;
i[0] = r, i[1] = o, i[2] = u, i[3] = h, i[4] = h, i[5] = f, i[6] = l, i[7] = n;
}
function pT(r, e, t, n, a, i, o, s, l, u, f) {
var h, c = 5e-3, v = 1 / 0, p, d, g, y;
Gr[0] = l, Gr[1] = u;
for (var m = 0; m < 1; m += 0.05)
ar[0] = re(r, t, a, o, m), ar[1] = re(e, n, i, s, m), g = ai(Gr, ar), g < v && (h = m, v = g);
v = 1 / 0;
for (var _ = 0; _ < 32 && !(c < hT); _++)
p = h - c, d = h + c, ar[0] = re(r, t, a, o, p), ar[1] = re(e, n, i, s, p), g = ai(ar, Gr), p >= 0 && g < v ? (h = p, v = g) : (ho[0] = re(r, t, a, o, d), ho[1] = re(e, n, i, s, d), y = ai(ho, Gr), d <= 1 && y < v ? (h = d, v = y) : c *= 0.5);
return f && (f[0] = re(r, t, a, o, h), f[1] = re(e, n, i, s, h)), Qn(v);
}
function lE(r, e, t, n, a, i, o, s, l) {
for (var u = r, f = e, h = 0, c = 1 / l, v = 1; v <= l; v++) {
var p = v * c, d = re(r, t, a, o, p), g = re(e, n, i, s, p), y = d - u, m = g - f;
h += Math.sqrt(y * y + m * m), u = d, f = g;
}
return h;
}
function ie(r, e, t, n) {
var a = 1 - n;
return a * (a * r + 2 * n * e) + n * n * t;
}
function qp(r, e, t, n) {
return 2 * ((1 - n) * (e - r) + n * (t - e));
}
function uE(r, e, t, n, a) {
var i = r - 2 * e + t, o = 2 * (e - r), s = r - n, l = 0;
if (Yn(i)) {
if (cT(o)) {
var u = -s / o;
u >= 0 && u <= 1 && (a[l++] = u);
}
} else {
var f = o * o - 4 * i * s;
if (Yn(f)) {
var u = -o / (2 * i);
u >= 0 && u <= 1 && (a[l++] = u);
} else if (f > 0) {
var h = Qn(f), u = (-o + h) / (2 * i), c = (-o - h) / (2 * i);
u >= 0 && u <= 1 && (a[l++] = u), c >= 0 && c <= 1 && (a[l++] = c);
}
}
return l;
}
function dT(r, e, t) {
var n = r + t - 2 * e;
return n === 0 ? 0.5 : (r - e) / n;
}
function el(r, e, t, n, a) {
var i = (e - r) * n + r, o = (t - e) * n + e, s = (o - i) * n + i;
a[0] = r, a[1] = i, a[2] = s, a[3] = s, a[4] = o, a[5] = t;
}
function gT(r, e, t, n, a, i, o, s, l) {
var u, f = 5e-3, h = 1 / 0;
Gr[0] = o, Gr[1] = s;
for (var c = 0; c < 1; c += 0.05) {
ar[0] = ie(r, t, a, c), ar[1] = ie(e, n, i, c);
var v = ai(Gr, ar);
v < h && (u = c, h = v);
}
h = 1 / 0;
for (var p = 0; p < 32 && !(f < hT); p++) {
var d = u - f, g = u + f;
ar[0] = ie(r, t, a, d), ar[1] = ie(e, n, i, d);
var v = ai(ar, Gr);
if (d >= 0 && v < h)
u = d, h = v;
else {
ho[0] = ie(r, t, a, g), ho[1] = ie(e, n, i, g);
var y = ai(ho, Gr);
g <= 1 && y < h ? (u = g, h = y) : f *= 0.5;
}
}
return l && (l[0] = ie(r, t, a, u), l[1] = ie(e, n, i, u)), Qn(h);
}
function fE(r, e, t, n, a, i, o) {
for (var s = r, l = e, u = 0, f = 1 / o, h = 1; h <= o; h++) {
var c = h * f, v = ie(r, t, a, c), p = ie(e, n, i, c), d = v - s, g = p - l;
u += Math.sqrt(d * d + g * g), s = v, l = p;
}
return u;
}
var hE = /cubic-bezier\(([0-9,\.e ]+)\)/;
function Rg(r) {
var e = r && hE.exec(r);
if (e) {
var t = e[1].split(","), n = +xr(t[0]), a = +xr(t[1]), i = +xr(t[2]), o = +xr(t[3]);
if (isNaN(n + a + i + o))
return;
var s = [];
return function(l) {
return l <= 0 ? 0 : l >= 1 ? 1 : xf(0, n, i, 1, l, s) && re(0, a, o, 1, s[0]);
};
}
}
var cE = function() {
function r(e) {
this._inited = !1, this._startTime = 0, this._pausedTime = 0, this._paused = !1, this._life = e.life || 1e3, this._delay = e.delay || 0, this.loop = e.loop || !1, this.onframe = e.onframe || jt, this.ondestroy = e.ondestroy || jt, this.onrestart = e.onrestart || jt, e.easing && this.setEasing(e.easing);
}
return r.prototype.step = function(e, t) {
if (this._inited || (this._startTime = e + this._delay, this._inited = !0), this._paused) {
this._pausedTime += t;
return;
}
var n = this._life, a = e - this._startTime - this._pausedTime, i = a / n;
i < 0 && (i = 0), i = Math.min(i, 1);
var o = this.easingFunc, s = o ? o(i) : i;
if (this.onframe(s), i === 1)
if (this.loop) {
var l = a % n;
this._startTime = e - l, this._pausedTime = 0, this.onrestart();
} else
return !0;
return !1;
}, r.prototype.pause = function() {
this._paused = !0;
}, r.prototype.resume = function() {
this._paused = !1;
}, r.prototype.setEasing = function(e) {
this.easing = e, this.easingFunc = q(e) ? e : fT[e] || Rg(e);
}, r;
}();
const vE = cE;
var yT = function() {
function r(e) {
this.value = e;
}
return r;
}(), pE = function() {
function r() {
this._len = 0;
}
return r.prototype.insert = function(e) {
var t = new yT(e);
return this.insertEntry(t), t;
}, r.prototype.insertEntry = function(e) {
this.head ? (this.tail.next = e, e.prev = this.tail, e.next = null, this.tail = e) : this.head = this.tail = e, this._len++;
}, r.prototype.remove = function(e) {
var t = e.prev, n = e.next;
t ? t.next = n : this.head = n, n ? n.prev = t : this.tail = t, e.next = e.prev = null, this._len--;
}, r.prototype.len = function() {
return this._len;
}, r.prototype.clear = function() {
this.head = this.tail = null, this._len = 0;
}, r;
}(), dE = function() {
function r(e) {
this._list = new pE(), this._maxSize = 10, this._map = {}, this._maxSize = e;
}
return r.prototype.put = function(e, t) {
var n = this._list, a = this._map, i = null;
if (a[e] == null) {
var o = n.len(), s = this._lastRemovedEntry;
if (o >= this._maxSize && o > 0) {
var l = n.head;
n.remove(l), delete a[l.key], i = l.value, this._lastRemovedEntry = l;
}
s ? s.value = t : s = new yT(t), s.key = e, n.insertEntry(s), a[e] = s;
}
return i;
}, r.prototype.get = function(e) {
var t = this._map[e], n = this._list;
if (t != null)
return t !== n.tail && (n.remove(t), n.insertEntry(t)), t.value;
}, r.prototype.clear = function() {
this._list.clear(), this._map = {};
}, r.prototype.len = function() {
return this._list.len();
}, r;
}();
const Dl = dE;
var Xm = {
transparent: [0, 0, 0, 0],
aliceblue: [240, 248, 255, 1],
antiquewhite: [250, 235, 215, 1],
aqua: [0, 255, 255, 1],
aquamarine: [127, 255, 212, 1],
azure: [240, 255, 255, 1],
beige: [245, 245, 220, 1],
bisque: [255, 228, 196, 1],
black: [0, 0, 0, 1],
blanchedalmond: [255, 235, 205, 1],
blue: [0, 0, 255, 1],
blueviolet: [138, 43, 226, 1],
brown: [165, 42, 42, 1],
burlywood: [222, 184, 135, 1],
cadetblue: [95, 158, 160, 1],
chartreuse: [127, 255, 0, 1],
chocolate: [210, 105, 30, 1],
coral: [255, 127, 80, 1],
cornflowerblue: [100, 149, 237, 1],
cornsilk: [255, 248, 220, 1],
crimson: [220, 20, 60, 1],
cyan: [0, 255, 255, 1],
darkblue: [0, 0, 139, 1],
darkcyan: [0, 139, 139, 1],
darkgoldenrod: [184, 134, 11, 1],
darkgray: [169, 169, 169, 1],
darkgreen: [0, 100, 0, 1],
darkgrey: [169, 169, 169, 1],
darkkhaki: [189, 183, 107, 1],
darkmagenta: [139, 0, 139, 1],
darkolivegreen: [85, 107, 47, 1],
darkorange: [255, 140, 0, 1],
darkorchid: [153, 50, 204, 1],
darkred: [139, 0, 0, 1],
darksalmon: [233, 150, 122, 1],
darkseagreen: [143, 188, 143, 1],
darkslateblue: [72, 61, 139, 1],
darkslategray: [47, 79, 79, 1],
darkslategrey: [47, 79, 79, 1],
darkturquoise: [0, 206, 209, 1],
darkviolet: [148, 0, 211, 1],
deeppink: [255, 20, 147, 1],
deepskyblue: [0, 191, 255, 1],
dimgray: [105, 105, 105, 1],
dimgrey: [105, 105, 105, 1],
dodgerblue: [30, 144, 255, 1],
firebrick: [178, 34, 34, 1],
floralwhite: [255, 250, 240, 1],
forestgreen: [34, 139, 34, 1],
fuchsia: [255, 0, 255, 1],
gainsboro: [220, 220, 220, 1],
ghostwhite: [248, 248, 255, 1],
gold: [255, 215, 0, 1],
goldenrod: [218, 165, 32, 1],
gray: [128, 128, 128, 1],
green: [0, 128, 0, 1],
greenyellow: [173, 255, 47, 1],
grey: [128, 128, 128, 1],
honeydew: [240, 255, 240, 1],
hotpink: [255, 105, 180, 1],
indianred: [205, 92, 92, 1],
indigo: [75, 0, 130, 1],
ivory: [255, 255, 240, 1],
khaki: [240, 230, 140, 1],
lavender: [230, 230, 250, 1],
lavenderblush: [255, 240, 245, 1],
lawngreen: [124, 252, 0, 1],
lemonchiffon: [255, 250, 205, 1],
lightblue: [173, 216, 230, 1],
lightcoral: [240, 128, 128, 1],
lightcyan: [224, 255, 255, 1],
lightgoldenrodyellow: [250, 250, 210, 1],
lightgray: [211, 211, 211, 1],
lightgreen: [144, 238, 144, 1],
lightgrey: [211, 211, 211, 1],
lightpink: [255, 182, 193, 1],
lightsalmon: [255, 160, 122, 1],
lightseagreen: [32, 178, 170, 1],
lightskyblue: [135, 206, 250, 1],
lightslategray: [119, 136, 153, 1],
lightslategrey: [119, 136, 153, 1],
lightsteelblue: [176, 196, 222, 1],
lightyellow: [255, 255, 224, 1],
lime: [0, 255, 0, 1],
limegreen: [50, 205, 50, 1],
linen: [250, 240, 230, 1],
magenta: [255, 0, 255, 1],
maroon: [128, 0, 0, 1],
mediumaquamarine: [102, 205, 170, 1],
mediumblue: [0, 0, 205, 1],
mediumorchid: [186, 85, 211, 1],
mediumpurple: [147, 112, 219, 1],
mediumseagreen: [60, 179, 113, 1],
mediumslateblue: [123, 104, 238, 1],
mediumspringgreen: [0, 250, 154, 1],
mediumturquoise: [72, 209, 204, 1],
mediumvioletred: [199, 21, 133, 1],
midnightblue: [25, 25, 112, 1],
mintcream: [245, 255, 250, 1],
mistyrose: [255, 228, 225, 1],
moccasin: [255, 228, 181, 1],
navajowhite: [255, 222, 173, 1],
navy: [0, 0, 128, 1],
oldlace: [253, 245, 230, 1],
olive: [128, 128, 0, 1],
olivedrab: [107, 142, 35, 1],
orange: [255, 165, 0, 1],
orangered: [255, 69, 0, 1],
orchid: [218, 112, 214, 1],
palegoldenrod: [238, 232, 170, 1],
palegreen: [152, 251, 152, 1],
paleturquoise: [175, 238, 238, 1],
palevioletred: [219, 112, 147, 1],
papayawhip: [255, 239, 213, 1],
peachpuff: [255, 218, 185, 1],
peru: [205, 133, 63, 1],
pink: [255, 192, 203, 1],
plum: [221, 160, 221, 1],
powderblue: [176, 224, 230, 1],
purple: [128, 0, 128, 1],
red: [255, 0, 0, 1],
rosybrown: [188, 143, 143, 1],
royalblue: [65, 105, 225, 1],
saddlebrown: [139, 69, 19, 1],
salmon: [250, 128, 114, 1],
sandybrown: [244, 164, 96, 1],
seagreen: [46, 139, 87, 1],
seashell: [255, 245, 238, 1],
sienna: [160, 82, 45, 1],
silver: [192, 192, 192, 1],
skyblue: [135, 206, 235, 1],
slateblue: [106, 90, 205, 1],
slategray: [112, 128, 144, 1],
slategrey: [112, 128, 144, 1],
snow: [255, 250, 250, 1],
springgreen: [0, 255, 127, 1],
steelblue: [70, 130, 180, 1],
tan: [210, 180, 140, 1],
teal: [0, 128, 128, 1],
thistle: [216, 191, 216, 1],
tomato: [255, 99, 71, 1],
turquoise: [64, 224, 208, 1],
violet: [238, 130, 238, 1],
wheat: [245, 222, 179, 1],
white: [255, 255, 255, 1],
whitesmoke: [245, 245, 245, 1],
yellow: [255, 255, 0, 1],
yellowgreen: [154, 205, 50, 1]
};
function Cr(r) {
return r = Math.round(r), r < 0 ? 0 : r > 255 ? 255 : r;
}
function gE(r) {
return r = Math.round(r), r < 0 ? 0 : r > 360 ? 360 : r;
}
function rl(r) {
return r < 0 ? 0 : r > 1 ? 1 : r;
}
function gc(r) {
var e = r;
return e.length && e.charAt(e.length - 1) === "%" ? Cr(parseFloat(e) / 100 * 255) : Cr(parseInt(e, 10));
}
function _o(r) {
var e = r;
return e.length && e.charAt(e.length - 1) === "%" ? rl(parseFloat(e) / 100) : rl(parseFloat(e));
}
function yc(r, e, t) {
return t < 0 ? t += 1 : t > 1 && (t -= 1), t * 6 < 1 ? r + (e - r) * t * 6 : t * 2 < 1 ? e : t * 3 < 2 ? r + (e - r) * (2 / 3 - t) * 6 : r;
}
function Zn(r, e, t) {
return r + (e - r) * t;
}
function Qe(r, e, t, n, a) {
return r[0] = e, r[1] = t, r[2] = n, r[3] = a, r;
}
function Kp(r, e) {
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r;
}
var mT = new Dl(20), jl = null;
function Ei(r, e) {
jl && Kp(jl, e), jl = mT.put(r, jl || e.slice());
}
function Ue(r, e) {
if (!!r) {
e = e || [];
var t = mT.get(r);
if (t)
return Kp(e, t);
r = r + "";
var n = r.replace(/ /g, "").toLowerCase();
if (n in Xm)
return Kp(e, Xm[n]), Ei(r, e), e;
var a = n.length;
if (n.charAt(0) === "#") {
if (a === 4 || a === 5) {
var i = parseInt(n.slice(1, 4), 16);
if (!(i >= 0 && i <= 4095)) {
Qe(e, 0, 0, 0, 1);
return;
}
return Qe(e, (i & 3840) >> 4 | (i & 3840) >> 8, i & 240 | (i & 240) >> 4, i & 15 | (i & 15) << 4, a === 5 ? parseInt(n.slice(4), 16) / 15 : 1), Ei(r, e), e;
} else if (a === 7 || a === 9) {
var i = parseInt(n.slice(1, 7), 16);
if (!(i >= 0 && i <= 16777215)) {
Qe(e, 0, 0, 0, 1);
return;
}
return Qe(e, (i & 16711680) >> 16, (i & 65280) >> 8, i & 255, a === 9 ? parseInt(n.slice(7), 16) / 255 : 1), Ei(r, e), e;
}
return;
}
var o = n.indexOf("("), s = n.indexOf(")");
if (o !== -1 && s + 1 === a) {
var l = n.substr(0, o), u = n.substr(o + 1, s - (o + 1)).split(","), f = 1;
switch (l) {
case "rgba":
if (u.length !== 4)
return u.length === 3 ? Qe(e, +u[0], +u[1], +u[2], 1) : Qe(e, 0, 0, 0, 1);
f = _o(u.pop());
case "rgb":
if (u.length !== 3) {
Qe(e, 0, 0, 0, 1);
return;
}
return Qe(e, gc(u[0]), gc(u[1]), gc(u[2]), f), Ei(r, e), e;
case "hsla":
if (u.length !== 4) {
Qe(e, 0, 0, 0, 1);
return;
}
return u[3] = _o(u[3]), jp(u, e), Ei(r, e), e;
case "hsl":
if (u.length !== 3) {
Qe(e, 0, 0, 0, 1);
return;
}
return jp(u, e), Ei(r, e), e;
default:
return;
}
}
Qe(e, 0, 0, 0, 1);
}
}
function jp(r, e) {
var t = (parseFloat(r[0]) % 360 + 360) % 360 / 360, n = _o(r[1]), a = _o(r[2]), i = a <= 0.5 ? a * (n + 1) : a + n - a * n, o = a * 2 - i;
return e = e || [], Qe(e, Cr(yc(o, i, t + 1 / 3) * 255), Cr(yc(o, i, t) * 255), Cr(yc(o, i, t - 1 / 3) * 255), 1), r.length === 4 && (e[3] = r[3]), e;
}
function yE(r) {
if (!!r) {
var e = r[0] / 255, t = r[1] / 255, n = r[2] / 255, a = Math.min(e, t, n), i = Math.max(e, t, n), o = i - a, s = (i + a) / 2, l, u;
if (o === 0)
l = 0, u = 0;
else {
s < 0.5 ? u = o / (i + a) : u = o / (2 - i - a);
var f = ((i - e) / 6 + o / 2) / o, h = ((i - t) / 6 + o / 2) / o, c = ((i - n) / 6 + o / 2) / o;
e === i ? l = c - h : t === i ? l = 1 / 3 + f - c : n === i && (l = 2 / 3 + h - f), l < 0 && (l += 1), l > 1 && (l -= 1);
}
var v = [l * 360, u, s];
return r[3] != null && v.push(r[3]), v;
}
}
function Jp(r, e) {
var t = Ue(r);
if (t) {
for (var n = 0; n < 3; n++)
e < 0 ? t[n] = t[n] * (1 - e) | 0 : t[n] = (255 - t[n]) * e + t[n] | 0, t[n] > 255 ? t[n] = 255 : t[n] < 0 && (t[n] = 0);
return cn(t, t.length === 4 ? "rgba" : "rgb");
}
}
function mc(r, e, t) {
if (!(!(e && e.length) || !(r >= 0 && r <= 1))) {
t = t || [];
var n = r * (e.length - 1), a = Math.floor(n), i = Math.ceil(n), o = e[a], s = e[i], l = n - a;
return t[0] = Cr(Zn(o[0], s[0], l)), t[1] = Cr(Zn(o[1], s[1], l)), t[2] = Cr(Zn(o[2], s[2], l)), t[3] = rl(Zn(o[3], s[3], l)), t;
}
}
function mE(r, e, t) {
if (!(!(e && e.length) || !(r >= 0 && r <= 1))) {
var n = r * (e.length - 1), a = Math.floor(n), i = Math.ceil(n), o = Ue(e[a]), s = Ue(e[i]), l = n - a, u = cn([
Cr(Zn(o[0], s[0], l)),
Cr(Zn(o[1], s[1], l)),
Cr(Zn(o[2], s[2], l)),
rl(Zn(o[3], s[3], l))
], "rgba");
return t ? {
color: u,
leftIndex: a,
rightIndex: i,
value: n
} : u;
}
}
function zs(r, e, t, n) {
var a = Ue(r);
if (r)
return a = yE(a), e != null && (a[0] = gE(e)), t != null && (a[1] = _o(t)), n != null && (a[2] = _o(n)), cn(jp(a), "rgba");
}
function wf(r, e) {
var t = Ue(r);
if (t && e != null)
return t[3] = rl(e), cn(t, "rgba");
}
function cn(r, e) {
if (!(!r || !r.length)) {
var t = r[0] + "," + r[1] + "," + r[2];
return (e === "rgba" || e === "hsva" || e === "hsla") && (t += "," + r[3]), e + "(" + t + ")";
}
}
function bf(r, e) {
var t = Ue(r);
return t ? (0.299 * t[0] + 0.587 * t[1] + 0.114 * t[2]) * t[3] / 255 + (1 - t[3]) * e : 0;
}
var Tf = Math.round;
function So(r) {
var e;
if (!r || r === "transparent")
r = "none";
else if (typeof r == "string" && r.indexOf("rgba") > -1) {
var t = Ue(r);
t && (r = "rgb(" + t[0] + "," + t[1] + "," + t[2] + ")", e = t[3]);
}
return {
color: r,
opacity: e == null ? 1 : e
};
}
var qm = 1e-4;
function Xn(r) {
return r < qm && r > -qm;
}
function Jl(r) {
return Tf(r * 1e3) / 1e3;
}
function Qp(r) {
return Tf(r * 1e4) / 1e4;
}
function _E(r) {
return "matrix(" + Jl(r[0]) + "," + Jl(r[1]) + "," + Jl(r[2]) + "," + Jl(r[3]) + "," + Qp(r[4]) + "," + Qp(r[5]) + ")";
}
var SE = {
left: "start",
right: "end",
center: "middle",
middle: "middle"
};
function xE(r, e, t) {
return t === "top" ? r += e / 2 : t === "bottom" && (r -= e / 2), r;
}
function wE(r) {
return r && (r.shadowBlur || r.shadowOffsetX || r.shadowOffsetY);
}
function bE(r) {
var e = r.style, t = r.getGlobalScale();
return [
e.shadowColor,
(e.shadowBlur || 0).toFixed(2),
(e.shadowOffsetX || 0).toFixed(2),
(e.shadowOffsetY || 0).toFixed(2),
t[0],
t[1]
].join(",");
}
function _T(r) {
return r && !!r.image;
}
function TE(r) {
return r && !!r.svgElement;
}
function CE(r) {
return _T(r) || TE(r);
}
function ST(r) {
return r.type === "linear";
}
function xT(r) {
return r.type === "radial";
}
function DE(r) {
return r && (r.type === "linear" || r.type === "radial");
}
function wh(r) {
return "url(#" + r + ")";
}
function wT(r) {
var e = r.getGlobalScale(), t = Math.max(e[0], e[1]);
return Math.max(Math.ceil(Math.log(t) / Math.log(10)), 1);
}
function bT(r) {
var e = r.x || 0, t = r.y || 0, n = (r.rotation || 0) * Ku, a = vt(r.scaleX, 1), i = vt(r.scaleY, 1), o = r.skewX || 0, s = r.skewY || 0, l = [];
return (e || t) && l.push("translate(" + e + "px," + t + "px)"), n && l.push("rotate(" + n + ")"), (a !== 1 || i !== 1) && l.push("scale(" + a + "," + i + ")"), (o || s) && l.push("skew(" + Tf(o * Ku) + "deg, " + Tf(s * Ku) + "deg)"), l.join(" ");
}
var AE = function() {
return Dt.hasGlobalWindow && q(window.btoa) ? function(r) {
return window.btoa(unescape(r));
} : typeof Buffer < "u" ? function(r) {
return Buffer.from(r).toString("base64");
} : function(r) {
return process.env.NODE_ENV !== "production" && br("Base64 isn't natively supported in the current environment."), null;
};
}(), td = Array.prototype.slice;
function sn(r, e, t) {
return (e - r) * t + r;
}
function _c(r, e, t, n) {
for (var a = e.length, i = 0; i < a; i++)
r[i] = sn(e[i], t[i], n);
return r;
}
function ME(r, e, t, n) {
for (var a = e.length, i = a && e[0].length, o = 0; o < a; o++) {
r[o] || (r[o] = []);
for (var s = 0; s < i; s++)
r[o][s] = sn(e[o][s], t[o][s], n);
}
return r;
}
function Ql(r, e, t, n) {
for (var a = e.length, i = 0; i < a; i++)
r[i] = e[i] + t[i] * n;
return r;
}
function Km(r, e, t, n) {
for (var a = e.length, i = a && e[0].length, o = 0; o < a; o++) {
r[o] || (r[o] = []);
for (var s = 0; s < i; s++)
r[o][s] = e[o][s] + t[o][s] * n;
}
return r;
}
function LE(r, e) {
for (var t = r.length, n = e.length, a = t > n ? e : r, i = Math.min(t, n), o = a[i - 1] || { color: [0, 0, 0, 0], offset: 0 }, s = i; s < Math.max(t, n); s++)
a.push({
offset: o.offset,
color: o.color.slice()
});
}
function IE(r, e, t) {
var n = r, a = e;
if (!(!n.push || !a.push)) {
var i = n.length, o = a.length;
if (i !== o) {
var s = i > o;
if (s)
n.length = o;
else
for (var l = i; l < o; l++)
n.push(t === 1 ? a[l] : td.call(a[l]));
}
for (var u = n[0] && n[0].length, l = 0; l < n.length; l++)
if (t === 1)
isNaN(n[l]) && (n[l] = a[l]);
else
for (var f = 0; f < u; f++)
isNaN(n[l][f]) && (n[l][f] = a[l][f]);
}
}
function Gs(r) {
if (me(r)) {
var e = r.length;
if (me(r[0])) {
for (var t = [], n = 0; n < e; n++)
t.push(td.call(r[n]));
return t;
}
return td.call(r);
}
return r;
}
function tf(r) {
return r[0] = Math.floor(r[0]) || 0, r[1] = Math.floor(r[1]) || 0, r[2] = Math.floor(r[2]) || 0, r[3] = r[3] == null ? 1 : r[3], "rgba(" + r.join(",") + ")";
}
function EE(r) {
return me(r && r[0]) ? 2 : 1;
}
var tu = 0, ef = 1, TT = 2, Ds = 3, ed = 4, rd = 5, jm = 6;
function Jm(r) {
return r === ed || r === rd;
}
function eu(r) {
return r === ef || r === TT;
}
var Jo = [0, 0, 0, 0], PE = function() {
function r(e) {
this.keyframes = [], this.discrete = !1, this._invalid = !1, this._needsSort = !1, this._lastFr = 0, this._lastFrP = 0, this.propName = e;
}
return r.prototype.isFinished = function() {
return this._finished;
}, r.prototype.setFinished = function() {
this._finished = !0, this._additiveTrack && this._additiveTrack.setFinished();
}, r.prototype.needsAnimate = function() {
return this.keyframes.length >= 1;
}, r.prototype.getAdditiveTrack = function() {
return this._additiveTrack;
}, r.prototype.addKeyframe = function(e, t, n) {
this._needsSort = !0;
var a = this.keyframes, i = a.length, o = !1, s = jm, l = t;
if (me(t)) {
var u = EE(t);
s = u, (u === 1 && !wt(t[0]) || u === 2 && !wt(t[0][0])) && (o = !0);
} else if (wt(t) && !vi(t))
s = tu;
else if (W(t))
if (!isNaN(+t))
s = tu;
else {
var f = Ue(t);
f && (l = f, s = Ds);
}
else if (Sh(t)) {
var h = B({}, l);
h.colorStops = G(t.colorStops, function(v) {
return {
offset: v.offset,
color: Ue(v.color)
};
}), ST(t) ? s = ed : xT(t) && (s = rd), l = h;
}
i === 0 ? this.valType = s : (s !== this.valType || s === jm) && (o = !0), this.discrete = this.discrete || o;
var c = {
time: e,
value: l,
rawValue: t,
percent: 0
};
return n && (c.easing = n, c.easingFunc = q(n) ? n : fT[n] || Rg(n)), a.push(c), c;
}, r.prototype.prepare = function(e, t) {
var n = this.keyframes;
this._needsSort && n.sort(function(d, g) {
return d.time - g.time;
});
for (var a = this.valType, i = n.length, o = n[i - 1], s = this.discrete, l = eu(a), u = Jm(a), f = 0; f < i; f++) {
var h = n[f], c = h.value, v = o.value;
h.percent = h.time / e, s || (l && f !== i - 1 ? IE(c, v, a) : u && LE(c.colorStops, v.colorStops));
}
if (!s && a !== rd && t && this.needsAnimate() && t.needsAnimate() && a === t.valType && !t._finished) {
this._additiveTrack = t;
for (var p = n[0].value, f = 0; f < i; f++)
a === tu ? n[f].additiveValue = n[f].value - p : a === Ds ? n[f].additiveValue = Ql([], n[f].value, p, -1) : eu(a) && (n[f].additiveValue = a === ef ? Ql([], n[f].value, p, -1) : Km([], n[f].value, p, -1));
}
}, r.prototype.step = function(e, t) {
if (!this._finished) {
this._additiveTrack && this._additiveTrack._finished && (this._additiveTrack = null);
var n = this._additiveTrack != null, a = n ? "additiveValue" : "value", i = this.valType, o = this.keyframes, s = o.length, l = this.propName, u = i === Ds, f, h = this._lastFr, c = Math.min, v, p;
if (s === 1)
v = p = o[0];
else {
if (t < 0)
f = 0;
else if (t < this._lastFrP) {
var d = c(h + 1, s - 1);
for (f = d; f >= 0 && !(o[f].percent <= t); f--)
;
f = c(f, s - 2);
} else {
for (f = h; f < s && !(o[f].percent > t); f++)
;
f = c(f - 1, s - 2);
}
p = o[f + 1], v = o[f];
}
if (!!(v && p)) {
this._lastFr = f, this._lastFrP = t;
var g = p.percent - v.percent, y = g === 0 ? 1 : c((t - v.percent) / g, 1);
p.easingFunc && (y = p.easingFunc(y));
var m = n ? this._additiveValue : u ? Jo : e[l];
if ((eu(i) || u) && !m && (m = this._additiveValue = []), this.discrete)
e[l] = y < 1 ? v.rawValue : p.rawValue;
else if (eu(i))
i === ef ? _c(m, v[a], p[a], y) : ME(m, v[a], p[a], y);
else if (Jm(i)) {
var _ = v[a], S = p[a], w = i === ed;
e[l] = {
type: w ? "linear" : "radial",
x: sn(_.x, S.x, y),
y: sn(_.y, S.y, y),
colorStops: G(_.colorStops, function(b, T) {
var D = S.colorStops[T];
return {
offset: sn(b.offset, D.offset, y),
color: tf(_c([], b.color, D.color, y))
};
}),
global: S.global
}, w ? (e[l].x2 = sn(_.x2, S.x2, y), e[l].y2 = sn(_.y2, S.y2, y)) : e[l].r = sn(_.r, S.r, y);
} else if (u)
_c(m, v[a], p[a], y), n || (e[l] = tf(m));
else {
var x = sn(v[a], p[a], y);
n ? this._additiveValue = x : e[l] = x;
}
n && this._addToTarget(e);
}
}
}, r.prototype._addToTarget = function(e) {
var t = this.valType, n = this.propName, a = this._additiveValue;
t === tu ? e[n] = e[n] + a : t === Ds ? (Ue(e[n], Jo), Ql(Jo, Jo, a, 1), e[n] = tf(Jo)) : t === ef ? Ql(e[n], e[n], a, 1) : t === TT && Km(e[n], e[n], a, 1);
}, r;
}(), kg = function() {
function r(e, t, n, a) {
if (this._tracks = {}, this._trackKeys = [], this._maxTime = 0, this._started = 0, this._clip = null, this._target = e, this._loop = t, t && a) {
br("Can' use additive animation on looped animation.");
return;
}
this._additiveAnimators = a, this._allowDiscrete = n;
}
return r.prototype.getMaxTime = function() {
return this._maxTime;
}, r.prototype.getDelay = function() {
return this._delay;
}, r.prototype.getLoop = function() {
return this._loop;
}, r.prototype.getTarget = function() {
return this._target;
}, r.prototype.changeTarget = function(e) {
this._target = e;
}, r.prototype.when = function(e, t, n) {
return this.whenWithKeys(e, t, mt(t), n);
}, r.prototype.whenWithKeys = function(e, t, n, a) {
for (var i = this._tracks, o = 0; o < n.length; o++) {
var s = n[o], l = i[s];
if (!l) {
l = i[s] = new PE(s);
var u = void 0, f = this._getAdditiveTrack(s);
if (f) {
var h = f.keyframes, c = h[h.length - 1];
u = c && c.value, f.valType === Ds && u && (u = tf(u));
} else
u = this._target[s];
if (u == null)
continue;
e > 0 && l.addKeyframe(0, Gs(u), a), this._trackKeys.push(s);
}
l.addKeyframe(e, Gs(t[s]), a);
}
return this._maxTime = Math.max(this._maxTime, e), this;
}, r.prototype.pause = function() {
this._clip.pause(), this._paused = !0;
}, r.prototype.resume = function() {
this._clip.resume(), this._paused = !1;
}, r.prototype.isPaused = function() {
return !!this._paused;
}, r.prototype.duration = function(e) {
return this._maxTime = e, this._force = !0, this;
}, r.prototype._doneCallback = function() {
this._setTracksFinished(), this._clip = null;
var e = this._doneCbs;
if (e)
for (var t = e.length, n = 0; n < t; n++)
e[n].call(this);
}, r.prototype._abortedCallback = function() {
this._setTracksFinished();
var e = this.animation, t = this._abortedCbs;
if (e && e.removeClip(this._clip), this._clip = null, t)
for (var n = 0; n < t.length; n++)
t[n].call(this);
}, r.prototype._setTracksFinished = function() {
for (var e = this._tracks, t = this._trackKeys, n = 0; n < t.length; n++)
e[t[n]].setFinished();
}, r.prototype._getAdditiveTrack = function(e) {
var t, n = this._additiveAnimators;
if (n)
for (var a = 0; a < n.length; a++) {
var i = n[a].getTrack(e);
i && (t = i);
}
return t;
}, r.prototype.start = function(e) {
if (!(this._started > 0)) {
this._started = 1;
for (var t = this, n = [], a = this._maxTime || 0, i = 0; i < this._trackKeys.length; i++) {
var o = this._trackKeys[i], s = this._tracks[o], l = this._getAdditiveTrack(o), u = s.keyframes, f = u.length;
if (s.prepare(a, l), s.needsAnimate())
if (!this._allowDiscrete && s.discrete) {
var h = u[f - 1];
h && (t._target[s.propName] = h.rawValue), s.setFinished();
} else
n.push(s);
}
if (n.length || this._force) {
var c = new vE({
life: a,
loop: this._loop,
delay: this._delay || 0,
onframe: function(v) {
t._started = 2;
var p = t._additiveAnimators;
if (p) {
for (var d = !1, g = 0; g < p.length; g++)
if (p[g]._clip) {
d = !0;
break;
}
d || (t._additiveAnimators = null);
}
for (var g = 0; g < n.length; g++)
n[g].step(t._target, v);
var y = t._onframeCbs;
if (y)
for (var g = 0; g < y.length; g++)
y[g](t._target, v);
},
ondestroy: function() {
t._doneCallback();
}
});
this._clip = c, this.animation && this.animation.addClip(c), e && c.setEasing(e);
} else
this._doneCallback();
return this;
}
}, r.prototype.stop = function(e) {
if (!!this._clip) {
var t = this._clip;
e && t.onframe(1), this._abortedCallback();
}
}, r.prototype.delay = function(e) {
return this._delay = e, this;
}, r.prototype.during = function(e) {
return e && (this._onframeCbs || (this._onframeCbs = []), this._onframeCbs.push(e)), this;
}, r.prototype.done = function(e) {
return e && (this._doneCbs || (this._doneCbs = []), this._doneCbs.push(e)), this;
}, r.prototype.aborted = function(e) {
return e && (this._abortedCbs || (this._abortedCbs = []), this._abortedCbs.push(e)), this;
}, r.prototype.getClip = function() {
return this._clip;
}, r.prototype.getTrack = function(e) {
return this._tracks[e];
}, r.prototype.getTracks = function() {
var e = this;
return G(this._trackKeys, function(t) {
return e._tracks[t];
});
}, r.prototype.stopTracks = function(e, t) {
if (!e.length || !this._clip)
return !0;
for (var n = this._tracks, a = this._trackKeys, i = 0; i < e.length; i++) {
var o = n[e[i]];
o && !o.isFinished() && (t ? o.step(this._target, 1) : this._started === 1 && o.step(this._target, 0), o.setFinished());
}
for (var s = !0, i = 0; i < a.length; i++)
if (!n[a[i]].isFinished()) {
s = !1;
break;
}
return s && this._abortedCallback(), s;
}, r.prototype.saveTo = function(e, t, n) {
if (!!e) {
t = t || this._trackKeys;
for (var a = 0; a < t.length; a++) {
var i = t[a], o = this._tracks[i];
if (!(!o || o.isFinished())) {
var s = o.keyframes, l = s[n ? 0 : s.length - 1];
l && (e[i] = Gs(l.rawValue));
}
}
}
}, r.prototype.__changeFinalValue = function(e, t) {
t = t || mt(e);
for (var n = 0; n < t.length; n++) {
var a = t[n], i = this._tracks[a];
if (!!i) {
var o = i.keyframes;
if (o.length > 1) {
var s = o.pop();
i.addKeyframe(s.time, e[a]), i.prepare(this._maxTime, i.getAdditiveTrack());
}
}
}
}, r;
}();
function ao() {
return new Date().getTime();
}
var NE = function(r) {
R(e, r);
function e(t) {
var n = r.call(this) || this;
return n._running = !1, n._time = 0, n._pausedTime = 0, n._pauseStart = 0, n._paused = !1, t = t || {}, n.stage = t.stage || {}, n;
}
return e.prototype.addClip = function(t) {
t.animation && this.removeClip(t), this._head ? (this._tail.next = t, t.prev = this._tail, t.next = null, this._tail = t) : this._head = this._tail = t, t.animation = this;
}, e.prototype.addAnimator = function(t) {
t.animation = this;
var n = t.getClip();
n && this.addClip(n);
}, e.prototype.removeClip = function(t) {
if (!!t.animation) {
var n = t.prev, a = t.next;
n ? n.next = a : this._head = a, a ? a.prev = n : this._tail = n, t.next = t.prev = t.animation = null;
}
}, e.prototype.removeAnimator = function(t) {
var n = t.getClip();
n && this.removeClip(n), t.animation = null;
}, e.prototype.update = function(t) {
for (var n = ao() - this._pausedTime, a = n - this._time, i = this._head; i; ) {
var o = i.next, s = i.step(n, a);
s && (i.ondestroy(), this.removeClip(i)), i = o;
}
this._time = n, t || (this.trigger("frame", a), this.stage.update && this.stage.update());
}, e.prototype._startLoop = function() {
var t = this;
this._running = !0;
function n() {
t._running && (Xp(n), !t._paused && t.update());
}
Xp(n);
}, e.prototype.start = function() {
this._running || (this._time = ao(), this._pausedTime = 0, this._startLoop());
}, e.prototype.stop = function() {
this._running = !1;
}, e.prototype.pause = function() {
this._paused || (this._pauseStart = ao(), this._paused = !0);
}, e.prototype.resume = function() {
this._paused && (this._pausedTime += ao() - this._pauseStart, this._paused = !1);
}, e.prototype.clear = function() {
for (var t = this._head; t; ) {
var n = t.next;
t.prev = t.next = t.animation = null, t = n;
}
this._head = this._tail = null;
}, e.prototype.isFinished = function() {
return this._head == null;
}, e.prototype.animate = function(t, n) {
n = n || {}, this.start();
var a = new kg(t, n.loop);
return this.addAnimator(a), a;
}, e;
}(vr);
const RE = NE;
var kE = 300, Sc = Dt.domSupported, xc = function() {
var r = [
"click",
"dblclick",
"mousewheel",
"wheel",
"mouseout",
"mouseup",
"mousedown",
"mousemove",
"contextmenu"
], e = [
"touchstart",
"touchend",
"touchmove"
], t = {
pointerdown: 1,
pointerup: 1,
pointermove: 1,
pointerout: 1
}, n = G(r, function(a) {
var i = a.replace("mouse", "pointer");
return t.hasOwnProperty(i) ? i : a;
});
return {
mouse: r,
touch: e,
pointer: n
};
}(), Qm = {
mouse: ["mousemove", "mouseup"],
pointer: ["pointermove", "pointerup"]
}, t0 = !1;
function nd(r) {
var e = r.pointerType;
return e === "pen" || e === "touch";
}
function OE(r) {
r.touching = !0, r.touchTimer != null && (clearTimeout(r.touchTimer), r.touchTimer = null), r.touchTimer = setTimeout(function() {
r.touching = !1, r.touchTimer = null;
}, 700);
}
function wc(r) {
r && (r.zrByTouch = !0);
}
function VE(r, e) {
return tr(r.dom, new BE(r, e), !0);
}
function CT(r, e) {
for (var t = e, n = !1; t && t.nodeType !== 9 && !(n = t.domBelongToZr || t !== e && t === r.painterRoot); )
t = t.parentNode;
return n;
}
var BE = function() {
function r(e, t) {
this.stopPropagation = jt, this.stopImmediatePropagation = jt, this.preventDefault = jt, this.type = t.type, this.target = this.currentTarget = e.dom, this.pointerType = t.pointerType, this.clientX = t.clientX, this.clientY = t.clientY;
}
return r;
}(), yr = {
mousedown: function(r) {
r = tr(this.dom, r), this.__mayPointerCapture = [r.zrX, r.zrY], this.trigger("mousedown", r);
},
mousemove: function(r) {
r = tr(this.dom, r);
var e = this.__mayPointerCapture;
e && (r.zrX !== e[0] || r.zrY !== e[1]) && this.__togglePointerCapture(!0), this.trigger("mousemove", r);
},
mouseup: function(r) {
r = tr(this.dom, r), this.__togglePointerCapture(!1), this.trigger("mouseup", r);
},
mouseout: function(r) {
r = tr(this.dom, r);
var e = r.toElement || r.relatedTarget;
CT(this, e) || (this.__pointerCapturing && (r.zrEventControl = "no_globalout"), this.trigger("mouseout", r));
},
wheel: function(r) {
t0 = !0, r = tr(this.dom, r), this.trigger("mousewheel", r);
},
mousewheel: function(r) {
t0 || (r = tr(this.dom, r), this.trigger("mousewheel", r));
},
touchstart: function(r) {
r = tr(this.dom, r), wc(r), this.__lastTouchMoment = new Date(), this.handler.processGesture(r, "start"), yr.mousemove.call(this, r), yr.mousedown.call(this, r);
},
touchmove: function(r) {
r = tr(this.dom, r), wc(r), this.handler.processGesture(r, "change"), yr.mousemove.call(this, r);
},
touchend: function(r) {
r = tr(this.dom, r), wc(r), this.handler.processGesture(r, "end"), yr.mouseup.call(this, r), +new Date() - +this.__lastTouchMoment < kE && yr.click.call(this, r);
},
pointerdown: function(r) {
yr.mousedown.call(this, r);
},
pointermove: function(r) {
nd(r) || yr.mousemove.call(this, r);
},
pointerup: function(r) {
yr.mouseup.call(this, r);
},
pointerout: function(r) {
nd(r) || yr.mouseout.call(this, r);
}
};
C(["click", "dblclick", "contextmenu"], function(r) {
yr[r] = function(e) {
e = tr(this.dom, e), this.trigger(r, e);
};
});
var ad = {
pointermove: function(r) {
nd(r) || ad.mousemove.call(this, r);
},
pointerup: function(r) {
ad.mouseup.call(this, r);
},
mousemove: function(r) {
this.trigger("mousemove", r);
},
mouseup: function(r) {
var e = this.__pointerCapturing;
this.__togglePointerCapture(!1), this.trigger("mouseup", r), e && (r.zrEventControl = "only_globalout", this.trigger("mouseout", r));
}
};
function zE(r, e) {
var t = e.domHandlers;
Dt.pointerEventsSupported ? C(xc.pointer, function(n) {
rf(e, n, function(a) {
t[n].call(r, a);
});
}) : (Dt.touchEventsSupported && C(xc.touch, function(n) {
rf(e, n, function(a) {
t[n].call(r, a), OE(e);
});
}), C(xc.mouse, function(n) {
rf(e, n, function(a) {
a = Ng(a), e.touching || t[n].call(r, a);
});
}));
}
function GE(r, e) {
Dt.pointerEventsSupported ? C(Qm.pointer, t) : Dt.touchEventsSupported || C(Qm.mouse, t);
function t(n) {
function a(i) {
i = Ng(i), CT(r, i.target) || (i = VE(r, i), e.domHandlers[n].call(r, i));
}
rf(e, n, a, { capture: !0 });
}
}
function rf(r, e, t, n) {
r.mounted[e] = t, r.listenerOpts[e] = n, Zp(r.domTarget, e, t, n);
}
function bc(r) {
var e = r.mounted;
for (var t in e)
e.hasOwnProperty(t) && X2(r.domTarget, t, e[t], r.listenerOpts[t]);
r.mounted = {};
}
var e0 = function() {
function r(e, t) {
this.mounted = {}, this.listenerOpts = {}, this.touching = !1, this.domTarget = e, this.domHandlers = t;
}
return r;
}(), FE = function(r) {
R(e, r);
function e(t, n) {
var a = r.call(this) || this;
return a.__pointerCapturing = !1, a.dom = t, a.painterRoot = n, a._localHandlerScope = new e0(t, yr), Sc && (a._globalHandlerScope = new e0(document, ad)), zE(a, a._localHandlerScope), a;
}
return e.prototype.dispose = function() {
bc(this._localHandlerScope), Sc && bc(this._globalHandlerScope);
}, e.prototype.setCursor = function(t) {
this.dom.style && (this.dom.style.cursor = t || "default");
}, e.prototype.__togglePointerCapture = function(t) {
if (this.__mayPointerCapture = null, Sc && +this.__pointerCapturing ^ +t) {
this.__pointerCapturing = t;
var n = this._globalHandlerScope;
t ? GE(this, n) : bc(n);
}
}, e;
}(vr);
const HE = FE;
var DT = 1;
Dt.hasGlobalWindow && (DT = Math.max(window.devicePixelRatio || window.screen && window.screen.deviceXDPI / window.screen.logicalXDPI || 1, 1));
var Cf = DT, id = 0.4, od = "#333", sd = "#ccc", $E = "#eee";
function hr() {
return [1, 0, 0, 1, 0, 0];
}
function bh(r) {
return r[0] = 1, r[1] = 0, r[2] = 0, r[3] = 1, r[4] = 0, r[5] = 0, r;
}
function Og(r, e) {
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4], r[5] = e[5], r;
}
function vn(r, e, t) {
var n = e[0] * t[0] + e[2] * t[1], a = e[1] * t[0] + e[3] * t[1], i = e[0] * t[2] + e[2] * t[3], o = e[1] * t[2] + e[3] * t[3], s = e[0] * t[4] + e[2] * t[5] + e[4], l = e[1] * t[4] + e[3] * t[5] + e[5];
return r[0] = n, r[1] = a, r[2] = i, r[3] = o, r[4] = s, r[5] = l, r;
}
function qr(r, e, t) {
return r[0] = e[0], r[1] = e[1], r[2] = e[2], r[3] = e[3], r[4] = e[4] + t[0], r[5] = e[5] + t[1], r;
}
function bi(r, e, t) {
var n = e[0], a = e[2], i = e[4], o = e[1], s = e[3], l = e[5], u = Math.sin(t), f = Math.cos(t);
return r[0] = n * f + o * u, r[1] = -n * u + o * f, r[2] = a * f + s * u, r[3] = -a * u + f * s, r[4] = f * i + u * l, r[5] = f * l - u * i, r;
}
function Vg(r, e, t) {
var n = t[0], a = t[1];
return r[0] = e[0] * n, r[1] = e[1] * a, r[2] = e[2] * n, r[3] = e[3] * a, r[4] = e[4] * n, r[5] = e[5] * a, r;
}
function Po(r, e) {
var t = e[0], n = e[2], a = e[4], i = e[1], o = e[3], s = e[5], l = t * o - i * n;
return l ? (l = 1 / l, r[0] = o * l, r[1] = -i * l, r[2] = -n * l, r[3] = t * l, r[4] = (n * s - o * a) * l, r[5] = (i * a - t * s) * l, r) : null;
}
function WE(r) {
var e = hr();
return Og(e, r), e;
}
var r0 = bh, n0 = 5e-5;
function ga(r) {
return r > n0 || r < -n0;
}
var ya = [], Pi = [], Tc = hr(), Cc = Math.abs, UE = function() {
function r() {
}
return r.prototype.getLocalTransform = function(e) {
return r.getLocalTransform(this, e);
}, r.prototype.setPosition = function(e) {
this.x = e[0], this.y = e[1];
}, r.prototype.setScale = function(e) {
this.scaleX = e[0], this.scaleY = e[1];
}, r.prototype.setSkew = function(e) {
this.skewX = e[0], this.skewY = e[1];
}, r.prototype.setOrigin = function(e) {
this.originX = e[0], this.originY = e[1];
}, r.prototype.needLocalTransform = function() {
return ga(this.rotation) || ga(this.x) || ga(this.y) || ga(this.scaleX - 1) || ga(this.scaleY - 1) || ga(this.skewX) || ga(this.skewY);
}, r.prototype.updateTransform = function() {
var e = this.parent && this.parent.transform, t = this.needLocalTransform(), n = this.transform;
if (!(t || e)) {
n && r0(n);
return;
}
n = n || hr(), t ? this.getLocalTransform(n) : r0(n), e && (t ? vn(n, e, n) : Og(n, e)), this.transform = n, this._resolveGlobalScaleRatio(n);
}, r.prototype._resolveGlobalScaleRatio = function(e) {
var t = this.globalScaleRatio;
if (t != null && t !== 1) {
this.getGlobalScale(ya);
var n = ya[0] < 0 ? -1 : 1, a = ya[1] < 0 ? -1 : 1, i = ((ya[0] - n) * t + n) / ya[0] || 0, o = ((ya[1] - a) * t + a) / ya[1] || 0;
e[0] *= i, e[1] *= i, e[2] *= o, e[3] *= o;
}
this.invTransform = this.invTransform || hr(), Po(this.invTransform, e);
}, r.prototype.getComputedTransform = function() {
for (var e = this, t = []; e; )
t.push(e), e = e.parent;
for (; e = t.pop(); )
e.updateTransform();
return this.transform;
}, r.prototype.setLocalTransform = function(e) {
if (!!e) {
var t = e[0] * e[0] + e[1] * e[1], n = e[2] * e[2] + e[3] * e[3], a = Math.atan2(e[1], e[0]), i = Math.PI / 2 + a - Math.atan2(e[3], e[2]);
n = Math.sqrt(n) * Math.cos(i), t = Math.sqrt(t), this.skewX = i, this.skewY = 0, this.rotation = -a, this.x = +e[4], this.y = +e[5], this.scaleX = t, this.scaleY = n, this.originX = 0, this.originY = 0;
}
}, r.prototype.decomposeTransform = function() {
if (!!this.transform) {
var e = this.parent, t = this.transform;
e && e.transform && (vn(Pi, e.invTransform, t), t = Pi);
var n = this.originX, a = this.originY;
(n || a) && (Tc[4] = n, Tc[5] = a, vn(Pi, t, Tc), Pi[4] -= n, Pi[5] -= a, t = Pi), this.setLocalTransform(t);
}
}, r.prototype.getGlobalScale = function(e) {
var t = this.transform;
return e = e || [], t ? (e[0] = Math.sqrt(t[0] * t[0] + t[1] * t[1]), e[1] = Math.sqrt(t[2] * t[2] + t[3] * t[3]), t[0] < 0 && (e[0] = -e[0]), t[3] < 0 && (e[1] = -e[1]), e) : (e[0] = 1, e[1] = 1, e);
}, r.prototype.transformCoordToLocal = function(e, t) {
var n = [e, t], a = this.invTransform;
return a && ue(n, n, a), n;
}, r.prototype.transformCoordToGlobal = function(e, t) {
var n = [e, t], a = this.transform;
return a && ue(n, n, a), n;
}, r.prototype.getLineScale = function() {
var e = this.transform;
return e && Cc(e[0] - 1) > 1e-10 && Cc(e[3] - 1) > 1e-10 ? Math.sqrt(Cc(e[0] * e[3] - e[2] * e[1])) : 1;
}, r.prototype.copyTransform = function(e) {
AT(this, e);
}, r.getLocalTransform = function(e, t) {
t = t || [];
var n = e.originX || 0, a = e.originY || 0, i = e.scaleX, o = e.scaleY, s = e.anchorX, l = e.anchorY, u = e.rotation || 0, f = e.x, h = e.y, c = e.skewX ? Math.tan(e.skewX) : 0, v = e.skewY ? Math.tan(-e.skewY) : 0;
if (n || a || s || l) {
var p = n + s, d = a + l;
t[4] = -p * i - c * d * o, t[5] = -d * o - v * p * i;
} else
t[4] = t[5] = 0;
return t[0] = i, t[3] = o, t[1] = v * i, t[2] = c * o, u && bi(t, t, u), t[4] += n + f, t[5] += a + h, t;
}, r.initDefaultProps = function() {
var e = r.prototype;
e.scaleX = e.scaleY = e.globalScaleRatio = 1, e.x = e.y = e.originX = e.originY = e.skewX = e.skewY = e.rotation = e.anchorX = e.anchorY = 0;
}(), r;
}(), Kr = [
"x",
"y",
"originX",
"originY",
"anchorX",
"anchorY",
"rotation",
"scaleX",
"scaleY",
"skewX",
"skewY"
];
function AT(r, e) {
for (var t = 0; t < Kr.length; t++) {
var n = Kr[t];
r[n] = e[n];
}
}
const un = UE;
var YE = function() {
function r(e, t) {
this.x = e || 0, this.y = t || 0;
}
return r.prototype.copy = function(e) {
return this.x = e.x, this.y = e.y, this;
}, r.prototype.clone = function() {
return new r(this.x, this.y);
}, r.prototype.set = function(e, t) {
return this.x = e, this.y = t, this;
}, r.prototype.equal = function(e) {
return e.x === this.x && e.y === this.y;
}, r.prototype.add = function(e) {
return this.x += e.x, this.y += e.y, this;
}, r.prototype.scale = function(e) {
this.x *= e, this.y *= e;
}, r.prototype.scaleAndAdd = function(e, t) {
this.x += e.x * t, this.y += e.y * t;
}, r.prototype.sub = function(e) {
return this.x -= e.x, this.y -= e.y, this;
}, r.prototype.dot = function(e) {
return this.x * e.x + this.y * e.y;
}, r.prototype.len = function() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}, r.prototype.lenSquare = function() {
return this.x * this.x + this.y * this.y;
}, r.prototype.normalize = function() {
var e = this.len();
return this.x /= e, this.y /= e, this;
}, r.prototype.distance = function(e) {
var t = this.x - e.x, n = this.y - e.y;
return Math.sqrt(t * t + n * n);
}, r.prototype.distanceSquare = function(e) {
var t = this.x - e.x, n = this.y - e.y;
return t * t + n * n;
}, r.prototype.negate = function() {
return this.x = -this.x, this.y = -this.y, this;
}, r.prototype.transform = function(e) {
if (!!e) {
var t = this.x, n = this.y;
return this.x = e[0] * t + e[2] * n + e[4], this.y = e[1] * t + e[3] * n + e[5], this;
}
}, r.prototype.toArray = function(e) {
return e[0] = this.x, e[1] = this.y, e;
}, r.prototype.fromArray = function(e) {
this.x = e[0], this.y = e[1];
}, r.set = function(e, t, n) {
e.x = t, e.y = n;
}, r.copy = function(e, t) {
e.x = t.x, e.y = t.y;
}, r.len = function(e) {
return Math.sqrt(e.x * e.x + e.y * e.y);
}, r.lenSquare = function(e) {
return e.x * e.x + e.y * e.y;
}, r.dot = function(e, t) {
return e.x * t.x + e.y * t.y;
}, r.add = function(e, t, n) {
e.x = t.x + n.x, e.y = t.y + n.y;
}, r.sub = function(e, t, n) {
e.x = t.x - n.x, e.y = t.y - n.y;
}, r.scale = function(e, t, n) {
e.x = t.x * n, e.y = t.y * n;
}, r.scaleAndAdd = function(e, t, n, a) {
e.x = t.x + n.x * a, e.y = t.y + n.y * a;
}, r.lerp = function(e, t, n, a) {
var i = 1 - a;
e.x = i * t.x + a * n.x, e.y = i * t.y + a * n.y;
}, r;
}();
const st = YE;
var ru = Math.min, nu = Math.max, ma = new st(), _a = new st(), Sa = new st(), xa = new st(), Qo = new st(), ts = new st(), ZE = function() {
function r(e, t, n, a) {
n < 0 && (e = e + n, n = -n), a < 0 && (t = t + a, a = -a), this.x = e, this.y = t, this.width = n, this.height = a;
}
return r.prototype.union = function(e) {
var t = ru(e.x, this.x), n = ru(e.y, this.y);
isFinite(this.x) && isFinite(this.width) ? this.width = nu(e.x + e.width, this.x + this.width) - t : this.width = e.width, isFinite(this.y) && isFinite(this.height) ? this.height = nu(e.y + e.height, this.y + this.height) - n : this.height = e.height, this.x = t, this.y = n;
}, r.prototype.applyTransform = function(e) {
r.applyTransform(this, this, e);
}, r.prototype.calculateTransform = function(e) {
var t = this, n = e.width / t.width, a = e.height / t.height, i = hr();
return qr(i, i, [-t.x, -t.y]), Vg(i, i, [n, a]), qr(i, i, [e.x, e.y]), i;
}, r.prototype.intersect = function(e, t) {
if (!e)
return !1;
e instanceof r || (e = r.create(e));
var n = this, a = n.x, i = n.x + n.width, o = n.y, s = n.y + n.height, l = e.x, u = e.x + e.width, f = e.y, h = e.y + e.height, c = !(i < l || u < a || s < f || h < o);
if (t) {
var v = 1 / 0, p = 0, d = Math.abs(i - l), g = Math.abs(u - a), y = Math.abs(s - f), m = Math.abs(h - o), _ = Math.min(d, g), S = Math.min(y, m);
i < l || u < a ? _ > p && (p = _, d < g ? st.set(ts, -d, 0) : st.set(ts, g, 0)) : _ < v && (v = _, d < g ? st.set(Qo, d, 0) : st.set(Qo, -g, 0)), s < f || h < o ? S > p && (p = S, y < m ? st.set(ts, 0, -y) : st.set(ts, 0, m)) : _ < v && (v = _, y < m ? st.set(Qo, 0, y) : st.set(Qo, 0, -m));
}
return t && st.copy(t, c ? Qo : ts), c;
}, r.prototype.contain = function(e, t) {
var n = this;
return e >= n.x && e <= n.x + n.width && t >= n.y && t <= n.y + n.height;
}, r.prototype.clone = function() {
return new r(this.x, this.y, this.width, this.height);
}, r.prototype.copy = function(e) {
r.copy(this, e);
}, r.prototype.plain = function() {
return {
x: this.x,
y: this.y,
width: this.width,
height: this.height
};
}, r.prototype.isFinite = function() {
return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height);
}, r.prototype.isZero = function() {
return this.width === 0 || this.height === 0;
}, r.create = function(e) {
return new r(e.x, e.y, e.width, e.height);
}, r.copy = function(e, t) {
e.x = t.x, e.y = t.y, e.width = t.width, e.height = t.height;
}, r.applyTransform = function(e, t, n) {
if (!n) {
e !== t && r.copy(e, t);
return;
}
if (n[1] < 1e-5 && n[1] > -1e-5 && n[2] < 1e-5 && n[2] > -1e-5) {
var a = n[0], i = n[3], o = n[4], s = n[5];
e.x = t.x * a + o, e.y = t.y * i + s, e.width = t.width * a, e.height = t.height * i, e.width < 0 && (e.x += e.width, e.width = -e.width), e.height < 0 && (e.y += e.height, e.height = -e.height);
return;
}
ma.x = Sa.x = t.x, ma.y = xa.y = t.y, _a.x = xa.x = t.x + t.width, _a.y = Sa.y = t.y + t.height, ma.transform(n), xa.transform(n), _a.transform(n), Sa.transform(n), e.x = ru(ma.x, _a.x, Sa.x, xa.x), e.y = ru(ma.y, _a.y, Sa.y, xa.y);
var l = nu(ma.x, _a.x, Sa.x, xa.x), u = nu(ma.y, _a.y, Sa.y, xa.y);
e.width = l - e.x, e.height = u - e.y;
}, r;
}();
const ft = ZE;
var a0 = {};
function Ye(r, e) {
e = e || ra;
var t = a0[e];
t || (t = a0[e] = new Dl(500));
var n = t.get(r);
return n == null && (n = yn.measureText(r, e).width, t.put(r, n)), n;
}
function i0(r, e, t, n) {
var a = Ye(r, e), i = Th(e), o = As(0, a, t), s = to(0, i, n), l = new ft(o, s, a, i);
return l;
}
function Al(r, e, t, n) {
var a = ((r || "") + "").split(`
`), i = a.length;
if (i === 1)
return i0(a[0], e, t, n);
for (var o = new ft(0, 0, 0, 0), s = 0; s < a.length; s++) {
var l = i0(a[s], e, t, n);
s === 0 ? o.copy(l) : o.union(l);
}
return o;
}
function As(r, e, t) {
return t === "right" ? r -= e : t === "center" && (r -= e / 2), r;
}
function to(r, e, t) {
return t === "middle" ? r -= e / 2 : t === "bottom" && (r -= e), r;
}
function Th(r) {
return Ye("\u56FD", r);
}
function Ar(r, e) {
return typeof r == "string" ? r.lastIndexOf("%") >= 0 ? parseFloat(r) / 100 * e : parseFloat(r) : r;
}
function Df(r, e, t) {
var n = e.position || "inside", a = e.distance != null ? e.distance : 5, i = t.height, o = t.width, s = i / 2, l = t.x, u = t.y, f = "left", h = "top";
if (n instanceof Array)
l += Ar(n[0], t.width), u += Ar(n[1], t.height), f = null, h = null;
else
switch (n) {
case "left":
l -= a, u += s, f = "right", h = "middle";
break;
case "right":
l += a + o, u += s, h = "middle";
break;
case "top":
l += o / 2, u -= a, f = "center", h = "bottom";
break;
case "bottom":
l += o / 2, u += i + a, f = "center";
break;
case "inside":
l += o / 2, u += s, f = "center", h = "middle";
break;
case "insideLeft":
l += a, u += s, h = "middle";
break;
case "insideRight":
l += o - a, u += s, f = "right", h = "middle";
break;
case "insideTop":
l += o / 2, u += a, f = "center";
break;
case "insideBottom":
l += o / 2, u += i - a, f = "center", h = "bottom";
break;
case "insideTopLeft":
l += a, u += a;
break;
case "insideTopRight":
l += o - a, u += a, f = "right";
break;
case "insideBottomLeft":
l += a, u += i - a, h = "bottom";
break;
case "insideBottomRight":
l += o - a, u += i - a, f = "right", h = "bottom";
break;
}
return r = r || {}, r.x = l, r.y = u, r.align = f, r.verticalAlign = h, r;
}
var Dc = "__zr_normal__", Ac = Kr.concat(["ignore"]), XE = Xr(Kr, function(r, e) {
return r[e] = !0, r;
}, { ignore: !1 }), Ni = {}, qE = new ft(0, 0, 0, 0), Bg = function() {
function r(e) {
this.id = tT(), this.animators = [], this.currentStates = [], this.states = {}, this._init(e);
}
return r.prototype._init = function(e) {
this.attr(e);
}, r.prototype.drift = function(e, t, n) {
switch (this.draggable) {
case "horizontal":
t = 0;
break;
case "vertical":
e = 0;
break;
}
var a = this.transform;
a || (a = this.transform = [1, 0, 0, 1, 0, 0]), a[4] += e, a[5] += t, this.decomposeTransform(), this.markRedraw();
}, r.prototype.beforeUpdate = function() {
}, r.prototype.afterUpdate = function() {
}, r.prototype.update = function() {
this.updateTransform(), this.__dirty && this.updateInnerText();
}, r.prototype.updateInnerText = function(e) {
var t = this._textContent;
if (t && (!t.ignore || e)) {
this.textConfig || (this.textConfig = {});
var n = this.textConfig, a = n.local, i = t.innerTransformable, o = void 0, s = void 0, l = !1;
i.parent = a ? this : null;
var u = !1;
if (i.copyTransform(t), n.position != null) {
var f = qE;
n.layoutRect ? f.copy(n.layoutRect) : f.copy(this.getBoundingRect()), a || f.applyTransform(this.transform), this.calculateTextPosition ? this.calculateTextPosition(Ni, n, f) : Df(Ni, n, f), i.x = Ni.x, i.y = Ni.y, o = Ni.align, s = Ni.verticalAlign;
var h = n.origin;
if (h && n.rotation != null) {
var c = void 0, v = void 0;
h === "center" ? (c = f.width * 0.5, v = f.height * 0.5) : (c = Ar(h[0], f.width), v = Ar(h[1], f.height)), u = !0, i.originX = -i.x + c + (a ? 0 : f.x), i.originY = -i.y + v + (a ? 0 : f.y);
}
}
n.rotation != null && (i.rotation = n.rotation);
var p = n.offset;
p && (i.x += p[0], i.y += p[1], u || (i.originX = -p[0], i.originY = -p[1]));
var d = n.inside == null ? typeof n.position == "string" && n.position.indexOf("inside") >= 0 : n.inside, g = this._innerTextDefaultStyle || (this._innerTextDefaultStyle = {}), y = void 0, m = void 0, _ = void 0;
d && this.canBeInsideText() ? (y = n.insideFill, m = n.insideStroke, (y == null || y === "auto") && (y = this.getInsideTextFill()), (m == null || m === "auto") && (m = this.getInsideTextStroke(y), _ = !0)) : (y = n.outsideFill, m = n.outsideStroke, (y == null || y === "auto") && (y = this.getOutsideFill()), (m == null || m === "auto") && (m = this.getOutsideStroke(y), _ = !0)), y = y || "#000", (y !== g.fill || m !== g.stroke || _ !== g.autoStroke || o !== g.align || s !== g.verticalAlign) && (l = !0, g.fill = y, g.stroke = m, g.autoStroke = _, g.align = o, g.verticalAlign = s, t.setDefaultTextStyle(g)), t.__dirty |= We, l && t.dirtyStyle(!0);
}
}, r.prototype.canBeInsideText = function() {
return !0;
}, r.prototype.getInsideTextFill = function() {
return "#fff";
}, r.prototype.getInsideTextStroke = function(e) {
return "#000";
}, r.prototype.getOutsideFill = function() {
return this.__zr && this.__zr.isDarkMode() ? sd : od;
}, r.prototype.getOutsideStroke = function(e) {
var t = this.__zr && this.__zr.getBackgroundColor(), n = typeof t == "string" && Ue(t);
n || (n = [255, 255, 255, 1]);
for (var a = n[3], i = this.__zr.isDarkMode(), o = 0; o < 3; o++)
n[o] = n[o] * a + (i ? 0 : 255) * (1 - a);
return n[3] = 1, cn(n, "rgba");
}, r.prototype.traverse = function(e, t) {
}, r.prototype.attrKV = function(e, t) {
e === "textConfig" ? this.setTextConfig(t) : e === "textContent" ? this.setTextContent(t) : e === "clipPath" ? this.setClipPath(t) : e === "extra" ? (this.extra = this.extra || {}, B(this.extra, t)) : this[e] = t;
}, r.prototype.hide = function() {
this.ignore = !0, this.markRedraw();
}, r.prototype.show = function() {
this.ignore = !1, this.markRedraw();
}, r.prototype.attr = function(e, t) {
if (typeof e == "string")
this.attrKV(e, t);
else if (j(e))
for (var n = e, a = mt(n), i = 0; i < a.length; i++) {
var o = a[i];
this.attrKV(o, e[o]);
}
return this.markRedraw(), this;
}, r.prototype.saveCurrentToNormalState = function(e) {
this._innerSaveToNormal(e);
for (var t = this._normalState, n = 0; n < this.animators.length; n++) {
var a = this.animators[n], i = a.__fromStateTransition;
if (!(a.getLoop() || i && i !== Dc)) {
var o = a.targetName, s = o ? t[o] : t;
a.saveTo(s);
}
}
}, r.prototype._innerSaveToNormal = function(e) {
var t = this._normalState;
t || (t = this._normalState = {}), e.textConfig && !t.textConfig && (t.textConfig = this.textConfig), this._savePrimaryToNormal(e, t, Ac);
}, r.prototype._savePrimaryToNormal = function(e, t, n) {
for (var a = 0; a < n.length; a++) {
var i = n[a];
e[i] != null && !(i in t) && (t[i] = this[i]);
}
}, r.prototype.hasState = function() {
return this.currentStates.length > 0;
}, r.prototype.getState = function(e) {
return this.states[e];
}, r.prototype.ensureState = function(e) {
var t = this.states;
return t[e] || (t[e] = {}), t[e];
}, r.prototype.clearStates = function(e) {
this.useState(Dc, !1, e);
}, r.prototype.useState = function(e, t, n, a) {
var i = e === Dc, o = this.hasState();
if (!(!o && i)) {
var s = this.currentStates, l = this.stateTransition;
if (!(ct(s, e) >= 0 && (t || s.length === 1))) {
var u;
if (this.stateProxy && !i && (u = this.stateProxy(e)), u || (u = this.states && this.states[e]), !u && !i) {
br("State " + e + " not exists.");
return;
}
i || this.saveCurrentToNormalState(u);
var f = !!(u && u.hoverLayer || a);
f && this._toggleHoverLayerFlag(!0), this._applyStateObj(e, u, this._normalState, t, !n && !this.__inHover && l && l.duration > 0, l);
var h = this._textContent, c = this._textGuide;
return h && h.useState(e, t, n, f), c && c.useState(e, t, n, f), i ? (this.currentStates = [], this._normalState = {}) : t ? this.currentStates.push(e) : this.currentStates = [e], this._updateAnimationTargets(), this.markRedraw(), !f && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~We), u;
}
}
}, r.prototype.useStates = function(e, t, n) {
if (!e.length)
this.clearStates();
else {
var a = [], i = this.currentStates, o = e.length, s = o === i.length;
if (s) {
for (var l = 0; l < o; l++)
if (e[l] !== i[l]) {
s = !1;
break;
}
}
if (s)
return;
for (var l = 0; l < o; l++) {
var u = e[l], f = void 0;
this.stateProxy && (f = this.stateProxy(u, e)), f || (f = this.states[u]), f && a.push(f);
}
var h = a[o - 1], c = !!(h && h.hoverLayer || n);
c && this._toggleHoverLayerFlag(!0);
var v = this._mergeStates(a), p = this.stateTransition;
this.saveCurrentToNormalState(v), this._applyStateObj(e.join(","), v, this._normalState, !1, !t && !this.__inHover && p && p.duration > 0, p);
var d = this._textContent, g = this._textGuide;
d && d.useStates(e, t, c), g && g.useStates(e, t, c), this._updateAnimationTargets(), this.currentStates = e.slice(), this.markRedraw(), !c && this.__inHover && (this._toggleHoverLayerFlag(!1), this.__dirty &= ~We);
}
}, r.prototype._updateAnimationTargets = function() {
for (var e = 0; e < this.animators.length; e++) {
var t = this.animators[e];
t.targetName && t.changeTarget(this[t.targetName]);
}
}, r.prototype.removeState = function(e) {
var t = ct(this.currentStates, e);
if (t >= 0) {
var n = this.currentStates.slice();
n.splice(t, 1), this.useStates(n);
}
}, r.prototype.replaceState = function(e, t, n) {
var a = this.currentStates.slice(), i = ct(a, e), o = ct(a, t) >= 0;
i >= 0 ? o ? a.splice(i, 1) : a[i] = t : n && !o && a.push(t), this.useStates(a);
}, r.prototype.toggleState = function(e, t) {
t ? this.useState(e, !0) : this.removeState(e);
}, r.prototype._mergeStates = function(e) {
for (var t = {}, n, a = 0; a < e.length; a++) {
var i = e[a];
B(t, i), i.textConfig && (n = n || {}, B(n, i.textConfig));
}
return n && (t.textConfig = n), t;
}, r.prototype._applyStateObj = function(e, t, n, a, i, o) {
var s = !(t && a);
t && t.textConfig ? (this.textConfig = B({}, a ? this.textConfig : n.textConfig), B(this.textConfig, t.textConfig)) : s && n.textConfig && (this.textConfig = n.textConfig);
for (var l = {}, u = !1, f = 0; f < Ac.length; f++) {
var h = Ac[f], c = i && XE[h];
t && t[h] != null ? c ? (u = !0, l[h] = t[h]) : this[h] = t[h] : s && n[h] != null && (c ? (u = !0, l[h] = n[h]) : this[h] = n[h]);
}
if (!i)
for (var f = 0; f < this.animators.length; f++) {
var v = this.animators[f], p = v.targetName;
v.getLoop() || v.__changeFinalValue(p ? (t || n)[p] : t || n);
}
u && this._transitionState(e, l, o);
}, r.prototype._attachComponent = function(e) {
if (e.__zr && !e.__hostTarget) {
if (process.env.NODE_ENV !== "production")
throw new Error("Text element has been added to zrender.");
return;
}
if (e === this) {
if (process.env.NODE_ENV !== "production")
throw new Error("Recursive component attachment.");
return;
}
var t = this.__zr;
t && e.addSelfToZr(t), e.__zr = t, e.__hostTarget = this;
}, r.prototype._detachComponent = function(e) {
e.__zr && e.removeSelfFromZr(e.__zr), e.__zr = null, e.__hostTarget = null;
}, r.prototype.getClipPath = function() {
return this._clipPath;
}, r.prototype.setClipPath = function(e) {
this._clipPath && this._clipPath !== e && this.removeClipPath(), this._attachComponent(e), this._clipPath = e, this.markRedraw();
}, r.prototype.removeClipPath = function() {
var e = this._clipPath;
e && (this._detachComponent(e), this._clipPath = null, this.markRedraw());
}, r.prototype.getTextContent = function() {
return this._textContent;
}, r.prototype.setTextContent = function(e) {
var t = this._textContent;
if (t !== e) {
if (t && t !== e && this.removeTextContent(), process.env.NODE_ENV !== "production" && e.__zr && !e.__hostTarget)
throw new Error("Text element has been added to zrender.");
e.innerTransformable = new un(), this._attachComponent(e), this._textContent = e, this.markRedraw();
}
}, r.prototype.setTextConfig = function(e) {
this.textConfig || (this.textConfig = {}), B(this.textConfig, e), this.markRedraw();
}, r.prototype.removeTextConfig = function() {
this.textConfig = null, this.markRedraw();
}, r.prototype.removeTextContent = function() {
var e = this._textContent;
e && (e.innerTransformable = null, this._detachComponent(e), this._textContent = null, this._innerTextDefaultStyle = null, this.markRedraw());
}, r.prototype.getTextGuideLine = function() {
return this._textGuide;
}, r.prototype.setTextGuideLine = function(e) {
this._textGuide && this._textGuide !== e && this.removeTextGuideLine(), this._attachComponent(e), this._textGuide = e, this.markRedraw();
}, r.prototype.removeTextGuideLine = function() {
var e = this._textGuide;
e && (this._detachComponent(e), this._textGuide = null, this.markRedraw());
}, r.prototype.markRedraw = function() {
this.__dirty |= We;
var e = this.__zr;
e && (this.__inHover ? e.refreshHover() : e.refresh()), this.__hostTarget && this.__hostTarget.markRedraw();
}, r.prototype.dirty = function() {
this.markRedraw();
}, r.prototype._toggleHoverLayerFlag = function(e) {
this.__inHover = e;
var t = this._textContent, n = this._textGuide;
t && (t.__inHover = e), n && (n.__inHover = e);
}, r.prototype.addSelfToZr = function(e) {
if (this.__zr !== e) {
this.__zr = e;
var t = this.animators;
if (t)
for (var n = 0; n < t.length; n++)
e.animation.addAnimator(t[n]);
this._clipPath && this._clipPath.addSelfToZr(e), this._textContent && this._textContent.addSelfToZr(e), this._textGuide && this._textGuide.addSelfToZr(e);
}
}, r.prototype.removeSelfFromZr = function(e) {
if (!!this.__zr) {
this.__zr = null;
var t = this.animators;
if (t)
for (var n = 0; n < t.length; n++)
e.animation.removeAnimator(t[n]);
this._clipPath && this._clipPath.removeSelfFromZr(e), this._textContent && this._textContent.removeSelfFromZr(e), this._textGuide && this._textGuide.removeSelfFromZr(e);
}
}, r.prototype.animate = function(e, t, n) {
var a = e ? this[e] : this;
if (process.env.NODE_ENV !== "production" && !a) {
br('Property "' + e + '" is not existed in element ' + this.id);
return;
}
var i = new kg(a, t, n);
return e && (i.targetName = e), this.addAnimator(i, e), i;
}, r.prototype.addAnimator = function(e, t) {
var n = this.__zr, a = this;
e.during(function() {
a.updateDuringAnimation(t);
}).done(function() {
var i = a.animators, o = ct(i, e);
o >= 0 && i.splice(o, 1);
}), this.animators.push(e), n && n.animation.addAnimator(e), n && n.wakeUp();
}, r.prototype.updateDuringAnimation = function(e) {
this.markRedraw();
}, r.prototype.stopAnimation = function(e, t) {
for (var n = this.animators, a = n.length, i = [], o = 0; o < a; o++) {
var s = n[o];
!e || e === s.scope ? s.stop(t) : i.push(s);
}
return this.animators = i, this;
}, r.prototype.animateTo = function(e, t, n) {
Mc(this, e, t, n);
}, r.prototype.animateFrom = function(e, t, n) {
Mc(this, e, t, n, !0);
}, r.prototype._transitionState = function(e, t, n, a) {
for (var i = Mc(this, t, n, a), o = 0; o < i.length; o++)
i[o].__fromStateTransition = e;
}, r.prototype.getBoundingRect = function() {
return null;
}, r.prototype.getPaintRect = function() {
return null;
}, r.initDefaultProps = function() {
var e = r.prototype;
e.type = "element", e.name = "", e.ignore = e.silent = e.isGroup = e.draggable = e.dragging = e.ignoreClip = e.__inHover = !1, e.__dirty = We;
var t = {};
function n(i, o, s) {
t[i + o + s] || (console.warn("DEPRECATED: '" + i + "' has been deprecated. use '" + o + "', '" + s + "' instead"), t[i + o + s] = !0);
}
function a(i, o, s, l) {
Object.defineProperty(e, i, {
get: function() {
if (process.env.NODE_ENV !== "production" && n(i, s, l), !this[o]) {
var f = this[o] = [];
u(this, f);
}
return this[o];
},
set: function(f) {
process.env.NODE_ENV !== "production" && n(i, s, l), this[s] = f[0], this[l] = f[1], this[o] = f, u(this, f);
}
});
function u(f, h) {
Object.defineProperty(h, 0, {
get: function() {
return f[s];
},
set: function(c) {
f[s] = c;
}
}), Object.defineProperty(h, 1, {
get: function() {
return f[l];
},
set: function(c) {
f[l] = c;
}
});
}
}
Object.defineProperty && (a("position", "_legacyPos", "x", "y"), a("scale", "_legacyScale", "scaleX", "scaleY"), a("origin", "_legacyOrigin", "originX", "originY"));
}(), r;
}();
Qt(Bg, vr);
Qt(Bg, un);
function Mc(r, e, t, n, a) {
t = t || {};
var i = [];
MT(r, "", r, e, t, n, i, a);
var o = i.length, s = !1, l = t.done, u = t.aborted, f = function() {
s = !0, o--, o <= 0 && (s ? l && l() : u && u());
}, h = function() {
o--, o <= 0 && (s ? l && l() : u && u());
};
o || l && l(), i.length > 0 && t.during && i[0].during(function(p, d) {
t.during(d);
});
for (var c = 0; c < i.length; c++) {
var v = i[c];
f && v.done(f), h && v.aborted(h), t.force && v.duration(t.duration), v.start(t.easing);
}
return i;
}
function Lc(r, e, t) {
for (var n = 0; n < t; n++)
r[n] = e[n];
}
function KE(r) {
return me(r[0]);
}
function jE(r, e, t) {
if (me(e[t]))
if (me(r[t]) || (r[t] = []), Oe(e[t])) {
var n = e[t].length;
r[t].length !== n && (r[t] = new e[t].constructor(n), Lc(r[t], e[t], n));
} else {
var a = e[t], i = r[t], o = a.length;
if (KE(a))
for (var s = a[0].length, l = 0; l < o; l++)
i[l] ? Lc(i[l], a[l], s) : i[l] = Array.prototype.slice.call(a[l]);
else
Lc(i, a, o);
i.length = a.length;
}
else
r[t] = e[t];
}
function JE(r, e) {
return r === e || me(r) && me(e) && QE(r, e);
}
function QE(r, e) {
var t = r.length;
if (t !== e.length)
return !1;
for (var n = 0; n < t; n++)
if (r[n] !== e[n])
return !1;
return !0;
}
function MT(r, e, t, n, a, i, o, s) {
for (var l = mt(n), u = a.duration, f = a.delay, h = a.additive, c = a.setToFinal, v = !j(i), p = r.animators, d = [], g = 0; g < l.length; g++) {
var y = l[g], m = n[y];
if (m != null && t[y] != null && (v || i[y]))
if (j(m) && !me(m) && !Sh(m)) {
if (e) {
s || (t[y] = m, r.updateDuringAnimation(e));
continue;
}
MT(r, y, t[y], m, a, i && i[y], o, s);
} else
d.push(y);
else
s || (t[y] = m, r.updateDuringAnimation(e), d.push(y));
}
var _ = d.length;
if (!h && _)
for (var S = 0; S < p.length; S++) {
var w = p[S];
if (w.targetName === e) {
var x = w.stopTracks(d);
if (x) {
var b = ct(p, w);
p.splice(b, 1);
}
}
}
if (a.force || (d = Et(d, function(M) {
return !JE(n[M], t[M]);
}), _ = d.length), _ > 0 || a.force && !o.length) {
var T = void 0, D = void 0, A = void 0;
if (s) {
D = {}, c && (T = {});
for (var S = 0; S < _; S++) {
var y = d[S];
D[y] = t[y], c ? T[y] = n[y] : t[y] = n[y];
}
} else if (c) {
A = {};
for (var S = 0; S < _; S++) {
var y = d[S];
A[y] = Gs(t[y]), jE(t, n, y);
}
}
var w = new kg(t, !1, !1, h ? Et(p, function(L) {
return L.targetName === e;
}) : null);
w.targetName = e, a.scope && (w.scope = a.scope), c && T && w.whenWithKeys(0, T, d), A && w.whenWithKeys(0, A, d), w.whenWithKeys(u == null ? 500 : u, s ? D : n, d).delay(f || 0), r.addAnimator(w, e), o.push(w);
}
}
const LT = Bg;
var IT = function(r) {
R(e, r);
function e(t) {
var n = r.call(this) || this;
return n.isGroup = !0, n._children = [], n.attr(t), n;
}
return e.prototype.childrenRef = function() {
return this._children;
}, e.prototype.children = function() {
return this._children.slice();
}, e.prototype.childAt = function(t) {
return this._children[t];
}, e.prototype.childOfName = function(t) {
for (var n = this._children, a = 0; a < n.length; a++)
if (n[a].name === t)
return n[a];
}, e.prototype.childCount = function() {
return this._children.length;
}, e.prototype.add = function(t) {
if (t && (t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), process.env.NODE_ENV !== "production" && t.__hostTarget))
throw "This elemenet has been used as an attachment";
return this;
}, e.prototype.addBefore = function(t, n) {
if (t && t !== this && t.parent !== this && n && n.parent === this) {
var a = this._children, i = a.indexOf(n);
i >= 0 && (a.splice(i, 0, t), this._doAdd(t));
}
return this;
}, e.prototype.replace = function(t, n) {
var a = ct(this._children, t);
return a >= 0 && this.replaceAt(n, a), this;
}, e.prototype.replaceAt = function(t, n) {
var a = this._children, i = a[n];
if (t && t !== this && t.parent !== this && t !== i) {
a[n] = t, i.parent = null;
var o = this.__zr;
o && i.removeSelfFromZr(o), this._doAdd(t);
}
return this;
}, e.prototype._doAdd = function(t) {
t.parent && t.parent.remove(t), t.parent = this;
var n = this.__zr;
n && n !== t.__zr && t.addSelfToZr(n), n && n.refresh();
}, e.prototype.remove = function(t) {
var n = this.__zr, a = this._children, i = ct(a, t);
return i < 0 ? this : (a.splice(i, 1), t.parent = null, n && t.removeSelfFromZr(n), n && n.refresh(), this);
}, e.prototype.removeAll = function() {
for (var t = this._children, n = this.__zr, a = 0; a < t.length; a++) {
var i = t[a];
n && i.removeSelfFromZr(n), i.parent = null;
}
return t.length = 0, this;
}, e.prototype.eachChild = function(t, n) {
for (var a = this._children, i = 0; i < a.length; i++) {
var o = a[i];
t.call(n, o, i);
}
return this;
}, e.prototype.traverse = function(t, n) {
for (var a = 0; a < this._children.length; a++) {
var i = this._children[a], o = t.call(n, i);
i.isGroup && !o && i.traverse(t, n);
}
return this;
}, e.prototype.addSelfToZr = function(t) {
r.prototype.addSelfToZr.call(this, t);
for (var n = 0; n < this._children.length; n++) {
var a = this._children[n];
a.addSelfToZr(t);
}
}, e.prototype.removeSelfFromZr = function(t) {
r.prototype.removeSelfFromZr.call(this, t);
for (var n = 0; n < this._children.length; n++) {
var a = this._children[n];
a.removeSelfFromZr(t);
}
}, e.prototype.getBoundingRect = function(t) {
for (var n = new ft(0, 0, 0, 0), a = t || this._children, i = [], o = null, s = 0; s < a.length; s++) {
var l = a[s];
if (!(l.ignore || l.invisible)) {
var u = l.getBoundingRect(), f = l.getLocalTransform(i);
f ? (ft.applyTransform(n, u, f), o = o || n.clone(), o.union(n)) : (o = o || u.clone(), o.union(u));
}
}
return o || n;
}, e;
}(LT);
IT.prototype.type = "group";
const nt = IT;
/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/
var Ms = {}, ET = {};
function tP(r) {
delete ET[r];
}
function eP(r) {
if (!r)
return !1;
if (typeof r == "string")
return bf(r, 1) < id;
if (r.colorStops) {
for (var e = r.colorStops, t = 0, n = e.length, a = 0; a < n; a++)
t += bf(e[a].color, 1);
return t /= n, t < id;
}
return !1;
}
var rP = function() {
function r(e, t, n) {
var a = this;
this._sleepAfterStill = 10, this._stillFrameAccum = 0, this._needsRefresh = !0, this._needsRefreshHover = !0, this._darkMode = !1, n = n || {}, this.dom = t, this.id = e;
var i = new sE(), o = n.renderer || "canvas";
if (Ms[o] || (o = mt(Ms)[0]), process.env.NODE_ENV !== "production" && !Ms[o])
throw new Error("Renderer '" + o + "' is not imported. Please import it first.");
n.useDirtyRect = n.useDirtyRect == null ? !1 : n.useDirtyRect;
var s = new Ms[o](t, i, n, e), l = n.ssr || s.ssrOnly;
this.storage = i, this.painter = s;
var u = !Dt.node && !Dt.worker && !l ? new HE(s.getViewportRoot(), s.root) : null;
this.handler = new rE(i, s, u, s.root), this.animation = new RE({
stage: {
update: l ? null : function() {
return a._flush(!0);
}
}
}), l || this.animation.start();
}
return r.prototype.add = function(e) {
!e || (this.storage.addRoot(e), e.addSelfToZr(this), this.refresh());
}, r.prototype.remove = function(e) {
!e || (this.storage.delRoot(e), e.removeSelfFromZr(this), this.refresh());
}, r.prototype.configLayer = function(e, t) {
this.painter.configLayer && this.painter.configLayer(e, t), this.refresh();
}, r.prototype.setBackgroundColor = function(e) {
this.painter.setBackgroundColor && this.painter.setBackgroundColor(e), this.refresh(), this._backgroundColor = e, this._darkMode = eP(e);
}, r.prototype.getBackgroundColor = function() {
return this._backgroundColor;
}, r.prototype.setDarkMode = function(e) {
this._darkMode = e;
}, r.prototype.isDarkMode = function() {
return this._darkMode;
}, r.prototype.refreshImmediately = function(e) {
e || this.animation.update(!0), this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1;
}, r.prototype.refresh = function() {
this._needsRefresh = !0, this.animation.start();
}, r.prototype.flush = function() {
this._flush(!1);
}, r.prototype._flush = function(e) {
var t, n = ao();
this._needsRefresh && (t = !0, this.refreshImmediately(e)), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately());
var a = ao();
t ? (this._stillFrameAccum = 0, this.trigger("rendered", {
elapsedTime: a - n
})) : this._sleepAfterStill > 0 && (this._stillFrameAccum++, this._stillFrameAccum > this._sleepAfterStill && this.animation.stop());
}, r.prototype.setSleepAfterStill = function(e) {
this._sleepAfterStill = e;
}, r.prototype.wakeUp = function() {
this.animation.start(), this._stillFrameAccum = 0;
}, r.prototype.refreshHover = function() {
this._needsRefreshHover = !0;
}, r.prototype.refreshHoverImmediately = function() {
this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.getType() === "canvas" && this.painter.refreshHover();
}, r.prototype.resize = function(e) {
e = e || {}, this.painter.resize(e.width, e.height), this.handler.resize();
}, r.prototype.clearAnimation = function() {
this.animation.clear();
}, r.prototype.getWidth = function() {
return this.painter.getWidth();
}, r.prototype.getHeight = function() {
return this.painter.getHeight();
}, r.prototype.setCursorStyle = function(e) {
this.handler.setCursorStyle(e);
}, r.prototype.findHover = function(e, t) {
return this.handler.findHover(e, t);
}, r.prototype.on = function(e, t, n) {
return this.handler.on(e, t, n), this;
}, r.prototype.off = function(e, t) {
this.handler.off(e, t);
}, r.prototype.trigger = function(e, t) {
this.handler.trigger(e, t);
}, r.prototype.clear = function() {
for (var e = this.storage.getRoots(), t = 0; t < e.length; t++)
e[t] instanceof nt && e[t].removeSelfFromZr(this);
this.storage.delAllRoots(), this.painter.clear();
}, r.prototype.dispose = function() {
this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, tP(this.id);
}, r;
}();
function o0(r, e) {
var t = new rP(tT(), r, e);
return ET[t.id] = t, t;
}
function nP(r, e) {
Ms[r] = e;
}
var s0 = 1e-4, PT = 20;
function aP(r) {
return r.replace(/^\s+|\s+$/g, "");
}
function It(r, e, t, n) {
var a = e[0], i = e[1], o = t[0], s = t[1], l = i - a, u = s - o;
if (l === 0)
return u === 0 ? o : (o + s) / 2;
if (n)
if (l > 0) {
if (r <= a)
return o;
if (r >= i)
return s;
} else {
if (r >= a)
return o;
if (r <= i)
return s;
}
else {
if (r === a)
return o;
if (r === i)
return s;
}
return (r - a) / l * u + o;
}
function H(r, e) {
switch (r) {
case "center":
case "middle":
r = "50%";
break;
case "left":
case "top":
r = "0%";
break;
case "right":
case "bottom":
r = "100%";
break;
}
return W(r) ? aP(r).match(/%$/) ? parseFloat(r) / 100 * e : parseFloat(r) : r == null ? NaN : +r;
}
function Wt(r, e, t) {
return e == null && (e = 10), e = Math.min(Math.max(0, e), PT), r = (+r).toFixed(e), t ? r : +r;
}
function lr(r) {
return r.sort(function(e, t) {
return e - t;
}), r;
}
function Hr(r) {
if (r = +r, isNaN(r))
return 0;
if (r > 1e-14) {
for (var e = 1, t = 0; t < 15; t++, e *= 10)
if (Math.round(r * e) / e === r)
return t;
}
return ld(r);
}
function ld(r) {
var e = r.toString().toLowerCase(), t = e.indexOf("e"), n = t > 0 ? +e.slice(t + 1) : 0, a = t > 0 ? t : e.length, i = e.indexOf("."), o = i < 0 ? 0 : a - 1 - i;
return Math.max(0, o - n);
}
function NT(r, e) {
var t = Math.log, n = Math.LN10, a = Math.floor(t(r[1] - r[0]) / n), i = Math.round(t(Math.abs(e[1] - e[0])) / n), o = Math.min(Math.max(-a + i, 0), 20);
return isFinite(o) ? o : 20;
}
function iP(r, e, t) {
if (!r[e])
return 0;
var n = Xr(r, function(p, d) {
return p + (isNaN(d) ? 0 : d);
}, 0);
if (n === 0)
return 0;
for (var a = Math.pow(10, t), i = G(r, function(p) {
return (isNaN(p) ? 0 : p) / n * a * 100;
}), o = a * 100, s = G(i, function(p) {
return Math.floor(p);
}), l = Xr(s, function(p, d) {
return p + d;
}, 0), u = G(i, function(p, d) {
return p - s[d];
}); l < o; ) {
for (var f = Number.NEGATIVE_INFINITY, h = null, c = 0, v = u.length; c < v; ++c)
u[c] > f && (f = u[c], h = c);
++s[h], u[h] = 0, ++l;
}
return s[e] / a;
}
function oP(r, e) {
var t = Math.max(Hr(r), Hr(e)), n = r + e;
return t > PT ? n : Wt(n, t);
}
var l0 = 9007199254740991;
function RT(r) {
var e = Math.PI * 2;
return (r % e + e) % e;
}
function Af(r) {
return r > -s0 && r < s0;
}
var sP = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;
function jr(r) {
if (r instanceof Date)
return r;
if (W(r)) {
var e = sP.exec(r);
if (!e)
return new Date(NaN);
if (e[8]) {
var t = +e[4] || 0;
return e[8].toUpperCase() !== "Z" && (t -= +e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, t, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0));
} else
return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, e[7] ? +e[7].substring(0, 3) : 0);
} else if (r == null)
return new Date(NaN);
return new Date(Math.round(r));
}
function lP(r) {
return Math.pow(10, Ch(r));
}
function Ch(r) {
if (r === 0)
return 0;
var e = Math.floor(Math.log(r) / Math.LN10);
return r / Math.pow(10, e) >= 10 && e++, e;
}
function kT(r, e) {
var t = Ch(r), n = Math.pow(10, t), a = r / n, i;
return e ? a < 1.5 ? i = 1 : a < 2.5 ? i = 2 : a < 4 ? i = 3 : a < 7 ? i = 5 : i = 10 : a < 1 ? i = 1 : a < 2 ? i = 2 : a < 3 ? i = 3 : a < 5 ? i = 5 : i = 10, r = i * n, t >= -20 ? +r.toFixed(t < 0 ? -t : 0) : r;
}
function Ic(r, e) {
var t = (r.length - 1) * e + 1, n = Math.floor(t), a = +r[n - 1], i = t - n;
return i ? a + i * (r[n] - a) : a;
}
function u0(r) {
r.sort(function(l, u) {
return s(l, u, 0) ? -1 : 1;
});
for (var e = -1 / 0, t = 1, n = 0; n < r.length; ) {
for (var a = r[n].interval, i = r[n].close, o = 0; o < 2; o++)
a[o] <= e && (a[o] = e, i[o] = o ? 1 : 1 - t), e = a[o], t = i[o];
a[0] === a[1] && i[0] * i[1] !== 1 ? r.splice(n, 1) : n++;
}
return r;
function s(l, u, f) {
return l.interval[f] < u.interval[f] || l.interval[f] === u.interval[f] && (l.close[f] - u.close[f] === (f ? -1 : 1) || !f && s(l, u, 1));
}
}
function _n(r) {
var e = parseFloat(r);
return e == r && (e !== 0 || !W(r) || r.indexOf("x") <= 0) ? e : NaN;
}
function zg(r) {
return !isNaN(_n(r));
}
function OT() {
return Math.round(Math.random() * 9);
}
function VT(r, e) {
return e === 0 ? r : VT(e, r % e);
}
function f0(r, e) {
return r == null ? e : e == null ? r : r * e / VT(r, e);
}
var uP = "[ECharts] ", h0 = {}, fP = typeof console < "u" && console.warn && console.log;
function Dh(r, e, t) {
if (fP) {
if (t) {
if (h0[e])
return;
h0[e] = !0;
}
console[r](uP + e);
}
}
function hP(r, e) {
Dh("log", r, e);
}
function _e(r, e) {
Dh("warn", r, e);
}
function he(r, e) {
Dh("error", r, e);
}
function Mr(r) {
process.env.NODE_ENV !== "production" && Dh("warn", "DEPRECATED: " + r, !0);
}
function Xt(r, e, t) {
process.env.NODE_ENV !== "production" && Mr((t ? "[" + t + "]" : "") + (r + " is deprecated, use " + e + " instead."));
}
function Me() {
for (var r = [], e = 0; e < arguments.length; e++)
r[e] = arguments[e];
var t = "";
if (process.env.NODE_ENV !== "production") {
var n = function(a) {
return a === void 0 ? "undefined" : a === 1 / 0 ? "Infinity" : a === -1 / 0 ? "-Infinity" : vi(a) ? "NaN" : a instanceof Date ? "Date(" + a.toISOString() + ")" : q(a) ? "function () { ... }" : eT(a) ? a + "" : null;
};
t = G(r, function(a) {
if (W(a))
return a;
var i = n(a);
if (i != null)
return i;
if (typeof JSON < "u" && JSON.stringify)
try {
return JSON.stringify(a, function(o, s) {
var l = n(s);
return l == null ? s : l;
});
} catch {
return "?";
}
else
return "?";
}).join(" ");
}
return t;
}
function Mt(r) {
throw new Error(r);
}
function c0(r, e, t) {
return (e - r) * t + r;
}
var BT = "series\0", zT = "\0_ec_\0";
function Pt(r) {
return r instanceof Array ? r : r == null ? [] : [r];
}
function pi(r, e, t) {
if (r) {
r[e] = r[e] || {}, r.emphasis = r.emphasis || {}, r.emphasis[e] = r.emphasis[e] || {};
for (var n = 0, a = t.length; n < a; n++) {
var i = t[n];
!r.emphasis[e].hasOwnProperty(i) && r[e].hasOwnProperty(i) && (r.emphasis[e][i] = r[e][i]);
}
}
}
var v0 = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];
function No(r) {
return j(r) && !z(r) && !(r instanceof Date) ? r.value : r;
}
function cP(r) {
return j(r) && !(r instanceof Array);
}
function GT(r, e, t) {
var n = t === "normalMerge", a = t === "replaceMerge", i = t === "replaceAll";
r = r || [], e = (e || []).slice();
var o = K();
C(e, function(l, u) {
if (!j(l)) {
e[u] = null;
return;
}
process.env.NODE_ENV !== "production" && (l.id != null && !d0(l.id) && p0(l.id), l.name != null && !d0(l.name) && p0(l.name));
});
var s = vP(r, o, t);
return (n || a) && pP(s, r, o, e), n && dP(s, e), n || a ? gP(s, e, a) : i && yP(s, e), mP(s), s;
}
function vP(r, e, t) {
var n = [];
if (t === "replaceAll")
return n;
for (var a = 0; a < r.length; a++) {
var i = r[a];
i && i.id != null && e.set(i.id, a), n.push({
existing: t === "replaceMerge" || xo(i) ? null : i,
newOption: null,
keyInfo: null,
brandNew: null
});
}
return n;
}
function pP(r, e, t, n) {
C(n, function(a, i) {
if (!(!a || a.id == null)) {
var o = Fs(a.id), s = t.get(o);
if (s != null) {
var l = r[s];
Q(!l.newOption, 'Duplicated option on id "' + o + '".'), l.newOption = a, l.existing = e[s], n[i] = null;
}
}
});
}
function dP(r, e) {
C(e, function(t, n) {
if (!(!t || t.name == null))
for (var a = 0; a < r.length; a++) {
var i = r[a].existing;
if (!r[a].newOption && i && (i.id == null || t.id == null) && !xo(t) && !xo(i) && FT("name", i, t)) {
r[a].newOption = t, e[n] = null;
return;
}
}
});
}
function gP(r, e, t) {
C(e, function(n) {
if (!!n) {
for (var a, i = 0; (a = r[i]) && (a.newOption || xo(a.existing) || a.existing && n.id != null && !FT("id", n, a.existing)); )
i++;
a ? (a.newOption = n, a.brandNew = t) : r.push({
newOption: n,
brandNew: t,
existing: null,
keyInfo: null
}), i++;
}
});
}
function yP(r, e) {
C(e, function(t) {
r.push({
newOption: t,
brandNew: !0,
existing: null,
keyInfo: null
});
});
}
function mP(r) {
var e = K();
C(r, function(t) {
var n = t.existing;
n && e.set(n.id, t);
}), C(r, function(t) {
var n = t.newOption;
Q(!n || n.id == null || !e.get(n.id) || e.get(n.id) === t, "id duplicates: " + (n && n.id)), n && n.id != null && e.set(n.id, t), !t.keyInfo && (t.keyInfo = {});
}), C(r, function(t, n) {
var a = t.existing, i = t.newOption, o = t.keyInfo;
if (!!j(i)) {
if (o.name = i.name != null ? Fs(i.name) : a ? a.name : BT + n, a)
o.id = Fs(a.id);
else if (i.id != null)
o.id = Fs(i.id);
else {
var s = 0;
do
o.id = "\0" + o.name + "\0" + s++;
while (e.get(o.id));
}
e.set(o.id, t);
}
});
}
function FT(r, e, t) {
var n = te(e[r], null), a = te(t[r], null);
return n != null && a != null && n === a;
}
function Fs(r) {
if (process.env.NODE_ENV !== "production" && r == null)
throw new Error();
return te(r, "");
}
function te(r, e) {
return r == null ? e : W(r) ? r : wt(r) || yf(r) ? r + "" : e;
}
function p0(r) {
process.env.NODE_ENV !== "production" && _e("`" + r + "` is invalid id or name. Must be a string or number.");
}
function d0(r) {
return yf(r) || zg(r);
}
function Gg(r) {
var e = r.name;
return !!(e && e.indexOf(BT));
}
function xo(r) {
return r && r.id != null && Fs(r.id).indexOf(zT) === 0;
}
function _P(r) {
return zT + r;
}
function SP(r, e, t) {
C(r, function(n) {
var a = n.newOption;
j(a) && (n.keyInfo.mainType = e, n.keyInfo.subType = xP(e, a, n.existing, t));
});
}
function xP(r, e, t, n) {
var a = e.type ? e.type : t ? t.subType : n.determineSubType(r, e);
return a;
}
function wP(r, e) {
var t = {}, n = {};
return a(r || [], t), a(e || [], n, t), [i(t), i(n)];
function a(o, s, l) {
for (var u = 0, f = o.length; u < f; u++) {
var h = te(o[u].seriesId, null);
if (h == null)
return;
for (var c = Pt(o[u].dataIndex), v = l && l[h], p = 0, d = c.length; p < d; p++) {
var g = c[p];
v && v[g] ? v[g] = null : (s[h] || (s[h] = {}))[g] = 1;
}
}
}
function i(o, s) {
var l = [];
for (var u in o)
if (o.hasOwnProperty(u) && o[u] != null)
if (s)
l.push(+u);
else {
var f = i(o[u], !0);
f.length && l.push({
seriesId: u,
dataIndex: f
});
}
return l;
}
}
function di(r, e) {
if (e.dataIndexInside != null)
return e.dataIndexInside;
if (e.dataIndex != null)
return z(e.dataIndex) ? G(e.dataIndex, function(t) {
return r.indexOfRawIndex(t);
}) : r.indexOfRawIndex(e.dataIndex);
if (e.name != null)
return z(e.name) ? G(e.name, function(t) {
return r.indexOfName(t);
}) : r.indexOfName(e.name);
}
function Tt() {
var r = "__ec_inner_" + bP++;
return function(e) {
return e[r] || (e[r] = {});
};
}
var bP = OT();
function Hs(r, e, t) {
var n = Fg(e, t), a = n.mainTypeSpecified, i = n.queryOptionMap, o = n.others, s = o, l = t ? t.defaultMainType : null;
return !a && l && i.set(l, {}), i.each(function(u, f) {
var h = Ml(r, f, u, {
useDefault: l === f,
enableAll: t && t.enableAll != null ? t.enableAll : !0,
enableNone: t && t.enableNone != null ? t.enableNone : !0
});
s[f + "Models"] = h.models, s[f + "Model"] = h.models[0];
}), s;
}
function Fg(r, e) {
var t;
if (W(r)) {
var n = {};
n[r + "Index"] = 0, t = n;
} else
t = r;
var a = K(), i = {}, o = !1;
return C(t, function(s, l) {
if (l === "dataIndex" || l === "dataIndexInside") {
i[l] = s;
return;
}
var u = l.match(/^(\w+)(Index|Id|Name)$/) || [], f = u[1], h = (u[2] || "").toLowerCase();
if (!(!f || !h || e && e.includeMainTypes && ct(e.includeMainTypes, f) < 0)) {
o = o || !!f;
var c = a.get(f) || a.set(f, {});
c[h] = s;
}
}), {
mainTypeSpecified: o,
queryOptionMap: a,
others: i
};
}
var Kt = {
useDefault: !0,
enableAll: !1,
enableNone: !1
}, TP = {
useDefault: !1,
enableAll: !0,
enableNone: !0
};
function Ml(r, e, t, n) {
n = n || Kt;
var a = t.index, i = t.id, o = t.name, s = {
models: null,
specified: a != null || i != null || o != null
};
if (!s.specified) {
var l = void 0;
return s.models = n.useDefault && (l = r.getComponent(e)) ? [l] : [], s;
}
return a === "none" || a === !1 ? (Q(n.enableNone, '`"none"` or `false` is not a valid value on index option.'), s.models = [], s) : (a === "all" && (Q(n.enableAll, '`"all"` is not a valid value on index option.'), a = i = o = null), s.models = r.queryComponents({
mainType: e,
index: a,
id: i,
name: o
}), s);
}
function HT(r, e, t) {
r.setAttribute ? r.setAttribute(e, t) : r[e] = t;
}
function CP(r, e) {
return r.getAttribute ? r.getAttribute(e) : r[e];
}
function DP(r) {
return r === "auto" ? Dt.domSupported ? "html" : "richText" : r || "html";
}
function ud(r, e) {
var t = K(), n = [];
return C(r, function(a) {
var i = e(a);
(t.get(i) || (n.push(i), t.set(i, []))).push(a);
}), {
keys: n,
buckets: t
};
}
function $T(r, e, t, n, a) {
var i = e == null || e === "auto";
if (n == null)
return n;
if (wt(n)) {
var o = c0(t || 0, n, a);
return Wt(o, i ? Math.max(Hr(t || 0), Hr(n)) : e);
} else {
if (W(n))
return a < 1 ? t : n;
for (var s = [], l = t, u = n, f = Math.max(l ? l.length : 0, u.length), h = 0; h < f; ++h) {
var c = r.getDimensionInfo(h);
if (c && c.type === "ordinal")
s[h] = (a < 1 && l ? l : u)[h];
else {
var v = l && l[h] ? l[h] : 0, p = u[h], o = c0(v, p, a);
s[h] = Wt(o, i ? Math.max(Hr(v), Hr(p)) : e);
}
}
return s;
}
}
var AP = ".", wa = "___EC__COMPONENT__CONTAINER___", WT = "___EC__EXTENDED_CLASS___";
function $r(r) {
var e = {
main: "",
sub: ""
};
if (r) {
var t = r.split(AP);
e.main = t[0] || "", e.sub = t[1] || "";
}
return e;
}
function MP(r) {
Q(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r), 'componentType "' + r + '" illegal');
}
function LP(r) {
return !!(r && r[WT]);
}
function Hg(r, e) {
r.$constructor = r, r.extend = function(t) {
process.env.NODE_ENV !== "production" && C(e, function(i) {
t[i] || console.warn("Method `" + i + "` should be implemented" + (t.type ? " in " + t.type : "") + ".");
});
var n = this, a;
return IP(n) ? a = function(i) {
R(o, i);
function o() {
return i.apply(this, arguments) || this;
}
return o;
}(n) : (a = function() {
(t.$constructor || n).apply(this, arguments);
}, I2(a, this)), B(a.prototype, t), a[WT] = !0, a.extend = this.extend, a.superCall = NP, a.superApply = RP, a.superClass = n, a;
};
}
function IP(r) {
return q(r) && /^class\s/.test(Function.prototype.toString.call(r));
}
function UT(r, e) {
r.extend = e.extend;
}
var EP = Math.round(Math.random() * 10);
function PP(r) {
var e = ["__\0is_clz", EP++].join("_");
r.prototype[e] = !0, process.env.NODE_ENV !== "production" && Q(!r.isInstance, 'The method "is" can not be defined.'), r.isInstance = function(t) {
return !!(t && t[e]);
};
}
function NP(r, e) {
for (var t = [], n = 2; n < arguments.length; n++)
t[n - 2] = arguments[n];
return this.superClass.prototype[e].apply(r, t);
}
function RP(r, e, t) {
return this.superClass.prototype[e].apply(r, t);
}
function Ah(r) {
var e = {};
r.registerClass = function(n) {
var a = n.type || n.prototype.type;
if (a) {
MP(a), n.prototype.type = a;
var i = $r(a);
if (!i.sub)
process.env.NODE_ENV !== "production" && e[i.main] && console.warn(i.main + " exists."), e[i.main] = n;
else if (i.sub !== wa) {
var o = t(i);
o[i.sub] = n;
}
}
return n;
}, r.getClass = function(n, a, i) {
var o = e[n];
if (o && o[wa] && (o = a ? o[a] : null), i && !o)
throw new Error(a ? "Component " + n + "." + (a || "") + " is used but not imported." : n + ".type should be specified.");
return o;
}, r.getClassesByMainType = function(n) {
var a = $r(n), i = [], o = e[a.main];
return o && o[wa] ? C(o, function(s, l) {
l !== wa && i.push(s);
}) : i.push(o), i;
}, r.hasClass = function(n) {
var a = $r(n);
return !!e[a.main];
}, r.getAllClassMainTypes = function() {
var n = [];
return C(e, function(a, i) {
n.push(i);
}), n;
}, r.hasSubTypes = function(n) {
var a = $r(n), i = e[a.main];
return i && i[wa];
};
function t(n) {
var a = e[n.main];
return (!a || !a[wa]) && (a = e[n.main] = {}, a[wa] = !0), a;
}
}
function gi(r, e) {
for (var t = 0; t < r.length; t++)
r[t][1] || (r[t][1] = r[t][0]);
return e = e || !1, function(n, a, i) {
for (var o = {}, s = 0; s < r.length; s++) {
var l = r[s][1];
if (!(a && ct(a, l) >= 0 || i && ct(i, l) < 0)) {
var u = n.getShallow(l, e);
u != null && (o[r[s][0]] = u);
}
}
return o;
};
}
var kP = [
["fill", "color"],
["shadowBlur"],
["shadowOffsetX"],
["shadowOffsetY"],
["opacity"],
["shadowColor"]
], OP = gi(kP), VP = function() {
function r() {
}
return r.prototype.getAreaStyle = function(e, t) {
return OP(this, e, t);
}, r;
}(), fd = new Dl(50);
function BP(r) {
if (typeof r == "string") {
var e = fd.get(r);
return e && e.image;
} else
return r;
}
function $g(r, e, t, n, a) {
if (r)
if (typeof r == "string") {
if (e && e.__zrImageSrc === r || !t)
return e;
var i = fd.get(r), o = { hostEl: t, cb: n, cbPayload: a };
return i ? (e = i.image, !Mh(e) && i.pending.push(o)) : (e = yn.loadImage(r, g0, g0), e.__zrImageSrc = r, fd.put(r, e.__cachedImgObj = {
image: e,
pending: [o]
})), e;
} else
return r;
else
return e;
}
function g0() {
var r = this.__cachedImgObj;
this.onload = this.onerror = this.__cachedImgObj = null;
for (var e = 0; e < r.pending.length; e++) {
var t = r.pending[e], n = t.cb;
n && n(this, t.cbPayload), t.hostEl.dirty();
}
r.pending.length = 0;
}
function Mh(r) {
return r && r.width && r.height;
}
var Ec = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;
function zP(r, e, t, n, a) {
if (!e)
return "";
var i = (r + "").split(`
`);
a = YT(e, t, n, a);
for (var o = 0, s = i.length; o < s; o++)
i[o] = ZT(i[o], a);
return i.join(`
`);
}
function YT(r, e, t, n) {
n = n || {};
var a = B({}, n);
a.font = e, t = vt(t, "..."), a.maxIterations = vt(n.maxIterations, 2);
var i = a.minChar = vt(n.minChar, 0);
a.cnCharWidth = Ye("\u56FD", e);
var o = a.ascCharWidth = Ye("a", e);
a.placeholder = vt(n.placeholder, "");
for (var s = r = Math.max(0, r - 1), l = 0; l < i && s >= o; l++)
s -= o;
var u = Ye(t, e);
return u > s && (t = "", u = 0), s = r - u, a.ellipsis = t, a.ellipsisWidth = u, a.contentWidth = s, a.containerWidth = r, a;
}
function ZT(r, e) {
var t = e.containerWidth, n = e.font, a = e.contentWidth;
if (!t)
return "";
var i = Ye(r, n);
if (i <= t)
return r;
for (var o = 0; ; o++) {
if (i <= a || o >= e.maxIterations) {
r += e.ellipsis;
break;
}
var s = o === 0 ? GP(r, a, e.ascCharWidth, e.cnCharWidth) : i > 0 ? Math.floor(r.length * a / i) : 0;
r = r.substr(0, s), i = Ye(r, n);
}
return r === "" && (r = e.placeholder), r;
}
function GP(r, e, t, n) {
for (var a = 0, i = 0, o = r.length; i < o && a < e; i++) {
var s = r.charCodeAt(i);
a += 0 <= s && s <= 127 ? t : n;
}
return i;
}
function FP(r, e) {
r != null && (r += "");
var t = e.overflow, n = e.padding, a = e.font, i = t === "truncate", o = Th(a), s = vt(e.lineHeight, o), l = !!e.backgroundColor, u = e.lineOverflow === "truncate", f = e.width, h;
f != null && (t === "break" || t === "breakAll") ? h = r ? XT(r, e.font, f, t === "breakAll", 0).lines : [] : h = r ? r.split(`
`) : [];
var c = h.length * s, v = vt(e.height, c);
if (c > v && u) {
var p = Math.floor(v / s);
h = h.slice(0, p);
}
if (r && i && f != null)
for (var d = YT(f, a, e.ellipsis, {
minChar: e.truncateMinChar,
placeholder: e.placeholder
}), g = 0; g < h.length; g++)
h[g] = ZT(h[g], d);
for (var y = v, m = 0, g = 0; g < h.length; g++)
m = Math.max(Ye(h[g], a), m);
f == null && (f = m);
var _ = m;
return n && (y += n[0] + n[2], _ += n[1] + n[3], f += n[1] + n[3]), l && (_ = f), {
lines: h,
height: v,
outerWidth: _,
outerHeight: y,
lineHeight: s,
calculatedLineHeight: o,
contentWidth: m,
contentHeight: c,
width: f
};
}
var HP = function() {
function r() {
}
return r;
}(), y0 = function() {
function r(e) {
this.tokens = [], e && (this.tokens = e);
}
return r;
}(), $P = function() {
function r() {
this.width = 0, this.height = 0, this.contentWidth = 0, this.contentHeight = 0, this.outerWidth = 0, this.outerHeight = 0, this.lines = [];
}
return r;
}();
function WP(r, e) {
var t = new $P();
if (r != null && (r += ""), !r)
return t;
for (var n = e.width, a = e.height, i = e.overflow, o = (i === "break" || i === "breakAll") && n != null ? { width: n, accumWidth: 0, breakAll: i === "breakAll" } : null, s = Ec.lastIndex = 0, l; (l = Ec.exec(r)) != null; ) {
var u = l.index;
u > s && Pc(t, r.substring(s, u), e, o), Pc(t, l[2], e, o, l[1]), s = Ec.lastIndex;
}
s < r.length && Pc(t, r.substring(s, r.length), e, o);
var f = [], h = 0, c = 0, v = e.padding, p = i === "truncate", d = e.lineOverflow === "truncate";
function g(k, V, F) {
k.width = V, k.lineHeight = F, h += F, c = Math.max(c, V);
}
t:
for (var y = 0; y < t.lines.length; y++) {
for (var m = t.lines[y], _ = 0, S = 0, w = 0; w < m.tokens.length; w++) {
var x = m.tokens[w], b = x.styleName && e.rich[x.styleName] || {}, T = x.textPadding = b.padding, D = T ? T[1] + T[3] : 0, A = x.font = b.font || e.font;
x.contentHeight = Th(A);
var M = vt(b.height, x.contentHeight);
if (x.innerHeight = M, T && (M += T[0] + T[2]), x.height = M, x.lineHeight = Tr(b.lineHeight, e.lineHeight, M), x.align = b && b.align || e.align, x.verticalAlign = b && b.verticalAlign || "middle", d && a != null && h + x.lineHeight > a) {
w > 0 ? (m.tokens = m.tokens.slice(0, w), g(m, S, _), t.lines = t.lines.slice(0, y + 1)) : t.lines = t.lines.slice(0, y);
break t;
}
var L = b.width, I = L == null || L === "auto";
if (typeof L == "string" && L.charAt(L.length - 1) === "%")
x.percentWidth = L, f.push(x), x.contentWidth = Ye(x.text, A);
else {
if (I) {
var E = b.backgroundColor, P = E && E.image;
P && (P = BP(P), Mh(P) && (x.width = Math.max(x.width, P.width * M / P.height)));
}
var N = p && n != null ? n - S : null;
N != null && N < x.width ? !I || N < D ? (x.text = "", x.width = x.contentWidth = 0) : (x.text = zP(x.text, N - D, A, e.ellipsis, { minChar: e.truncateMinChar }), x.width = x.contentWidth = Ye(x.text, A)) : x.contentWidth = Ye(x.text, A);
}
x.width += D, S += x.width, b && (_ = Math.max(_, x.lineHeight));
}
g(m, S, _);
}
t.outerWidth = t.width = vt(n, c), t.outerHeight = t.height = vt(a, h), t.contentHeight = h, t.contentWidth = c, v && (t.outerWidth += v[1] + v[3], t.outerHeight += v[0] + v[2]);
for (var y = 0; y < f.length; y++) {
var x = f[y], O = x.percentWidth;
x.width = parseInt(O, 10) / 100 * t.width;
}
return t;
}
function Pc(r, e, t, n, a) {
var i = e === "", o = a && t.rich[a] || {}, s = r.lines, l = o.font || t.font, u = !1, f, h;
if (n) {
var c = o.padding, v = c ? c[1] + c[3] : 0;
if (o.width != null && o.width !== "auto") {
var p = Ar(o.width, n.width) + v;
s.length > 0 && p + n.accumWidth > n.width && (f = e.split(`
`), u = !0), n.accumWidth = p;
} else {
var d = XT(e, l, n.width, n.breakAll, n.accumWidth);
n.accumWidth = d.accumWidth + v, h = d.linesWidths, f = d.lines;
}
} else
f = e.split(`
`);
for (var g = 0; g < f.length; g++) {
var y = f[g], m = new HP();
if (m.styleName = a, m.text = y, m.isLineHolder = !y && !i, typeof o.width == "number" ? m.width = o.width : m.width = h ? h[g] : Ye(y, l), !g && !u) {
var _ = (s[s.length - 1] || (s[0] = new y0())).tokens, S = _.length;
S === 1 && _[0].isLineHolder ? _[0] = m : (y || !S || i) && _.push(m);
} else
s.push(new y0([m]));
}
}
function UP(r) {
var e = r.charCodeAt(0);
return e >= 33 && e <= 383;
}
var YP = Xr(",&?/;] ".split(""), function(r, e) {
return r[e] = !0, r;
}, {});
function ZP(r) {
return UP(r) ? !!YP[r] : !0;
}
function XT(r, e, t, n, a) {
for (var i = [], o = [], s = "", l = "", u = 0, f = 0, h = 0; h < r.length; h++) {
var c = r.charAt(h);
if (c === `
`) {
l && (s += l, f += u), i.push(s), o.push(f), s = "", l = "", u = 0, f = 0;
continue;
}
var v = Ye(c, e), p = n ? !1 : !ZP(c);
if (i.length ? f + v > t : a + f + v > t) {
f ? (s || l) && (p ? (s || (s = l, l = "", u = 0, f = u), i.push(s), o.push(f - u), l += c, u += v, s = "", f = u) : (l && (s += l, l = "", u = 0), i.push(s), o.push(f), s = c, f = v)) : p ? (i.push(l), o.push(u), l = c, u = v) : (i.push(c), o.push(v));
continue;
}
f += v, p ? (l += c, u += v) : (l && (s += l, l = "", u = 0), s += c);
}
return !i.length && !s && (s = r, l = "", u = 0), l && (s += l), s && (i.push(s), o.push(f)), i.length === 1 && (f += a), {
accumWidth: f,
lines: i,
linesWidths: o
};
}
var hd = "__zr_style_" + Math.round(Math.random() * 10), ii = {
shadowBlur: 0,
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowColor: "#000",
opacity: 1,
blend: "source-over"
}, Lh = {
style: {
shadowBlur: !0,
shadowOffsetX: !0,
shadowOffsetY: !0,
shadowColor: !0,
opacity: !0
}
};
ii[hd] = !0;
var m0 = ["z", "z2", "invisible"], XP = ["invisible"], qP = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype._init = function(t) {
for (var n = mt(t), a = 0; a < n.length; a++) {
var i = n[a];
i === "style" ? this.useStyle(t[i]) : r.prototype.attrKV.call(this, i, t[i]);
}
this.style || this.useStyle({});
}, e.prototype.beforeBrush = function() {
}, e.prototype.afterBrush = function() {
}, e.prototype.innerBeforeBrush = function() {
}, e.prototype.innerAfterBrush = function() {
}, e.prototype.shouldBePainted = function(t, n, a, i) {
var o = this.transform;
if (this.ignore || this.invisible || this.style.opacity === 0 || this.culling && KP(this, t, n) || o && !o[0] && !o[3])
return !1;
if (a && this.__clipPaths) {
for (var s = 0; s < this.__clipPaths.length; ++s)
if (this.__clipPaths[s].isZeroArea())
return !1;
}
if (i && this.parent)
for (var l = this.parent; l; ) {
if (l.ignore)
return !1;
l = l.parent;
}
return !0;
}, e.prototype.contain = function(t, n) {
return this.rectContain(t, n);
}, e.prototype.traverse = function(t, n) {
t.call(n, this);
}, e.prototype.rectContain = function(t, n) {
var a = this.transformCoordToLocal(t, n), i = this.getBoundingRect();
return i.contain(a[0], a[1]);
}, e.prototype.getPaintRect = function() {
var t = this._paintRect;
if (!this._paintRect || this.__dirty) {
var n = this.transform, a = this.getBoundingRect(), i = this.style, o = i.shadowBlur || 0, s = i.shadowOffsetX || 0, l = i.shadowOffsetY || 0;
t = this._paintRect || (this._paintRect = new ft(0, 0, 0, 0)), n ? ft.applyTransform(t, a, n) : t.copy(a), (o || s || l) && (t.width += o * 2 + Math.abs(s), t.height += o * 2 + Math.abs(l), t.x = Math.min(t.x, t.x + s - o), t.y = Math.min(t.y, t.y + l - o));
var u = this.dirtyRectTolerance;
t.isZero() || (t.x = Math.floor(t.x - u), t.y = Math.floor(t.y - u), t.width = Math.ceil(t.width + 1 + u * 2), t.height = Math.ceil(t.height + 1 + u * 2));
}
return t;
}, e.prototype.setPrevPaintRect = function(t) {
t ? (this._prevPaintRect = this._prevPaintRect || new ft(0, 0, 0, 0), this._prevPaintRect.copy(t)) : this._prevPaintRect = null;
}, e.prototype.getPrevPaintRect = function() {
return this._prevPaintRect;
}, e.prototype.animateStyle = function(t) {
return this.animate("style", t);
}, e.prototype.updateDuringAnimation = function(t) {
t === "style" ? this.dirtyStyle() : this.markRedraw();
}, e.prototype.attrKV = function(t, n) {
t !== "style" ? r.prototype.attrKV.call(this, t, n) : this.style ? this.setStyle(n) : this.useStyle(n);
}, e.prototype.setStyle = function(t, n) {
return typeof t == "string" ? this.style[t] = n : B(this.style, t), this.dirtyStyle(), this;
}, e.prototype.dirtyStyle = function(t) {
t || this.markRedraw(), this.__dirty |= Cs, this._rect && (this._rect = null);
}, e.prototype.dirty = function() {
this.dirtyStyle();
}, e.prototype.styleChanged = function() {
return !!(this.__dirty & Cs);
}, e.prototype.styleUpdated = function() {
this.__dirty &= ~Cs;
}, e.prototype.createStyle = function(t) {
return xh(ii, t);
}, e.prototype.useStyle = function(t) {
t[hd] || (t = this.createStyle(t)), this.__inHover ? this.__hoverStyle = t : this.style = t, this.dirtyStyle();
}, e.prototype.isStyleObject = function(t) {
return t[hd];
}, e.prototype._innerSaveToNormal = function(t) {
r.prototype._innerSaveToNormal.call(this, t);
var n = this._normalState;
t.style && !n.style && (n.style = this._mergeStyle(this.createStyle(), this.style)), this._savePrimaryToNormal(t, n, m0);
}, e.prototype._applyStateObj = function(t, n, a, i, o, s) {
r.prototype._applyStateObj.call(this, t, n, a, i, o, s);
var l = !(n && i), u;
if (n && n.style ? o ? i ? u = n.style : (u = this._mergeStyle(this.createStyle(), a.style), this._mergeStyle(u, n.style)) : (u = this._mergeStyle(this.createStyle(), i ? this.style : a.style), this._mergeStyle(u, n.style)) : l && (u = a.style), u)
if (o) {
var f = this.style;
if (this.style = this.createStyle(l ? {} : f), l)
for (var h = mt(f), c = 0; c < h.length; c++) {
var v = h[c];
v in u && (u[v] = u[v], this.style[v] = f[v]);
}
for (var p = mt(u), c = 0; c < p.length; c++) {
var v = p[c];
this.style[v] = this.style[v];
}
this._transitionState(t, {
style: u
}, s, this.getAnimationStyleProps());
} else
this.useStyle(u);
for (var d = this.__inHover ? XP : m0, c = 0; c < d.length; c++) {
var v = d[c];
n && n[v] != null ? this[v] = n[v] : l && a[v] != null && (this[v] = a[v]);
}
}, e.prototype._mergeStates = function(t) {
for (var n = r.prototype._mergeStates.call(this, t), a, i = 0; i < t.length; i++) {
var o = t[i];
o.style && (a = a || {}, this._mergeStyle(a, o.style));
}
return a && (n.style = a), n;
}, e.prototype._mergeStyle = function(t, n) {
return B(t, n), t;
}, e.prototype.getAnimationStyleProps = function() {
return Lh;
}, e.initDefaultProps = function() {
var t = e.prototype;
t.type = "displayable", t.invisible = !1, t.z = 0, t.z2 = 0, t.zlevel = 0, t.culling = !1, t.cursor = "pointer", t.rectHover = !1, t.incremental = !1, t._rect = null, t.dirtyRectTolerance = 0, t.__dirty = We | Cs;
}(), e;
}(LT), Nc = new ft(0, 0, 0, 0), Rc = new ft(0, 0, 0, 0);
function KP(r, e, t) {
return Nc.copy(r.getBoundingRect()), r.transform && Nc.applyTransform(r.transform), Rc.width = e, Rc.height = t, !Nc.intersect(Rc);
}
const cr = qP;
var Ne = Math.min, Re = Math.max, kc = Math.sin, Oc = Math.cos, ba = Math.PI * 2, au = wi(), iu = wi(), ou = wi();
function Ih(r, e, t) {
if (r.length !== 0) {
for (var n = r[0], a = n[0], i = n[0], o = n[1], s = n[1], l = 1; l < r.length; l++)
n = r[l], a = Ne(a, n[0]), i = Re(i, n[0]), o = Ne(o, n[1]), s = Re(s, n[1]);
e[0] = a, e[1] = o, t[0] = i, t[1] = s;
}
}
function _0(r, e, t, n, a, i) {
a[0] = Ne(r, t), a[1] = Ne(e, n), i[0] = Re(r, t), i[1] = Re(e, n);
}
var S0 = [], x0 = [];
function jP(r, e, t, n, a, i, o, s, l, u) {
var f = vT, h = re, c = f(r, t, a, o, S0);
l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0;
for (var v = 0; v < c; v++) {
var p = h(r, t, a, o, S0[v]);
l[0] = Ne(p, l[0]), u[0] = Re(p, u[0]);
}
c = f(e, n, i, s, x0);
for (var v = 0; v < c; v++) {
var d = h(e, n, i, s, x0[v]);
l[1] = Ne(d, l[1]), u[1] = Re(d, u[1]);
}
l[0] = Ne(r, l[0]), u[0] = Re(r, u[0]), l[0] = Ne(o, l[0]), u[0] = Re(o, u[0]), l[1] = Ne(e, l[1]), u[1] = Re(e, u[1]), l[1] = Ne(s, l[1]), u[1] = Re(s, u[1]);
}
function JP(r, e, t, n, a, i, o, s) {
var l = dT, u = ie, f = Re(Ne(l(r, t, a), 1), 0), h = Re(Ne(l(e, n, i), 1), 0), c = u(r, t, a, f), v = u(e, n, i, h);
o[0] = Ne(r, a, c), o[1] = Ne(e, i, v), s[0] = Re(r, a, c), s[1] = Re(e, i, v);
}
function QP(r, e, t, n, a, i, o, s, l) {
var u = Wn, f = Un, h = Math.abs(a - i);
if (h % ba < 1e-4 && h > 1e-4) {
s[0] = r - t, s[1] = e - n, l[0] = r + t, l[1] = e + n;
return;
}
if (au[0] = Oc(a) * t + r, au[1] = kc(a) * n + e, iu[0] = Oc(i) * t + r, iu[1] = kc(i) * n + e, u(s, au, iu), f(l, au, iu), a = a % ba, a < 0 && (a = a + ba), i = i % ba, i < 0 && (i = i + ba), a > i && !o ? i += ba : a < i && o && (a += ba), o) {
var c = i;
i = a, a = c;
}
for (var v = 0; v < i; v += Math.PI / 2)
v > a && (ou[0] = Oc(v) * t + r, ou[1] = kc(v) * n + e, u(s, ou, s), f(l, ou, l));
}
var Nt = {
M: 1,
L: 2,
C: 3,
Q: 4,
A: 5,
Z: 6,
R: 7
}, Ta = [], Ca = [], Pr = [], En = [], Nr = [], Rr = [], Vc = Math.min, Bc = Math.max, Da = Math.cos, Aa = Math.sin, nn = Math.abs, cd = Math.PI, zn = cd * 2, zc = typeof Float32Array < "u", es = [];
function Gc(r) {
var e = Math.round(r / cd * 1e8) / 1e8;
return e % 2 * cd;
}
function qT(r, e) {
var t = Gc(r[0]);
t < 0 && (t += zn);
var n = t - r[0], a = r[1];
a += n, !e && a - t >= zn ? a = t + zn : e && t - a >= zn ? a = t - zn : !e && t > a ? a = t + (zn - Gc(t - a)) : e && t < a && (a = t - (zn - Gc(a - t))), r[0] = t, r[1] = a;
}
var Jr = function() {
function r(e) {
this.dpr = 1, this._xi = 0, this._yi = 0, this._x0 = 0, this._y0 = 0, this._len = 0, e && (this._saveData = !1), this._saveData && (this.data = []);
}
return r.prototype.increaseVersion = function() {
this._version++;
}, r.prototype.getVersion = function() {
return this._version;
}, r.prototype.setScale = function(e, t, n) {
n = n || 0, n > 0 && (this._ux = nn(n / Cf / e) || 0, this._uy = nn(n / Cf / t) || 0);
}, r.prototype.setDPR = function(e) {
this.dpr = e;
}, r.prototype.setContext = function(e) {
this._ctx = e;
}, r.prototype.getContext = function() {
return this._ctx;
}, r.prototype.beginPath = function() {
return this._ctx && this._ctx.beginPath(), this.reset(), this;
}, r.prototype.reset = function() {
this._saveData && (this._len = 0), this._pathSegLen && (this._pathSegLen = null, this._pathLen = 0), this._version++;
}, r.prototype.moveTo = function(e, t) {
return this._drawPendingPt(), this.addData(Nt.M, e, t), this._ctx && this._ctx.moveTo(e, t), this._x0 = e, this._y0 = t, this._xi = e, this._yi = t, this;
}, r.prototype.lineTo = function(e, t) {
var n = nn(e - this._xi), a = nn(t - this._yi), i = n > this._ux || a > this._uy;
if (this.addData(Nt.L, e, t), this._ctx && i && this._ctx.lineTo(e, t), i)
this._xi = e, this._yi = t, this._pendingPtDist = 0;
else {
var o = n * n + a * a;
o > this._pendingPtDist && (this._pendingPtX = e, this._pendingPtY = t, this._pendingPtDist = o);
}
return this;
}, r.prototype.bezierCurveTo = function(e, t, n, a, i, o) {
return this._drawPendingPt(), this.addData(Nt.C, e, t, n, a, i, o), this._ctx && this._ctx.bezierCurveTo(e, t, n, a, i, o), this._xi = i, this._yi = o, this;
}, r.prototype.quadraticCurveTo = function(e, t, n, a) {
return this._drawPendingPt(), this.addData(Nt.Q, e, t, n, a), this._ctx && this._ctx.quadraticCurveTo(e, t, n, a), this._xi = n, this._yi = a, this;
}, r.prototype.arc = function(e, t, n, a, i, o) {
this._drawPendingPt(), es[0] = a, es[1] = i, qT(es, o), a = es[0], i = es[1];
var s = i - a;
return this.addData(Nt.A, e, t, n, n, a, s, 0, o ? 0 : 1), this._ctx && this._ctx.arc(e, t, n, a, i, o), this._xi = Da(i) * n + e, this._yi = Aa(i) * n + t, this;
}, r.prototype.arcTo = function(e, t, n, a, i) {
return this._drawPendingPt(), this._ctx && this._ctx.arcTo(e, t, n, a, i), this;
}, r.prototype.rect = function(e, t, n, a) {
return this._drawPendingPt(), this._ctx && this._ctx.rect(e, t, n, a), this.addData(Nt.R, e, t, n, a), this;
}, r.prototype.closePath = function() {
this._drawPendingPt(), this.addData(Nt.Z);
var e = this._ctx, t = this._x0, n = this._y0;
return e && e.closePath(), this._xi = t, this._yi = n, this;
}, r.prototype.fill = function(e) {
e && e.fill(), this.toStatic();
}, r.prototype.stroke = function(e) {
e && e.stroke(), this.toStatic();
}, r.prototype.len = function() {
return this._len;
}, r.prototype.setData = function(e) {
var t = e.length;
!(this.data && this.data.length === t) && zc && (this.data = new Float32Array(t));
for (var n = 0; n < t; n++)
this.data[n] = e[n];
this._len = t;
}, r.prototype.appendPath = function(e) {
e instanceof Array || (e = [e]);
for (var t = e.length, n = 0, a = this._len, i = 0; i < t; i++)
n += e[i].len();
zc && this.data instanceof Float32Array && (this.data = new Float32Array(a + n));
for (var i = 0; i < t; i++)
for (var o = e[i].data, s = 0; s < o.length; s++)
this.data[a++] = o[s];
this._len = a;
}, r.prototype.addData = function(e, t, n, a, i, o, s, l, u) {
if (!!this._saveData) {
var f = this.data;
this._len + arguments.length > f.length && (this._expandData(), f = this.data);
for (var h = 0; h < arguments.length; h++)
f[this._len++] = arguments[h];
}
}, r.prototype._drawPendingPt = function() {
this._pendingPtDist > 0 && (this._ctx && this._ctx.lineTo(this._pendingPtX, this._pendingPtY), this._pendingPtDist = 0);
}, r.prototype._expandData = function() {
if (!(this.data instanceof Array)) {
for (var e = [], t = 0; t < this._len; t++)
e[t] = this.data[t];
this.data = e;
}
}, r.prototype.toStatic = function() {
if (!!this._saveData) {
this._drawPendingPt();
var e = this.data;
e instanceof Array && (e.length = this._len, zc && this._len > 11 && (this.data = new Float32Array(e)));
}
}, r.prototype.getBoundingRect = function() {
Pr[0] = Pr[1] = Nr[0] = Nr[1] = Number.MAX_VALUE, En[0] = En[1] = Rr[0] = Rr[1] = -Number.MAX_VALUE;
var e = this.data, t = 0, n = 0, a = 0, i = 0, o;
for (o = 0; o < this._len; ) {
var s = e[o++], l = o === 1;
switch (l && (t = e[o], n = e[o + 1], a = t, i = n), s) {
case Nt.M:
t = a = e[o++], n = i = e[o++], Nr[0] = a, Nr[1] = i, Rr[0] = a, Rr[1] = i;
break;
case Nt.L:
_0(t, n, e[o], e[o + 1], Nr, Rr), t = e[o++], n = e[o++];
break;
case Nt.C:
jP(t, n, e[o++], e[o++], e[o++], e[o++], e[o], e[o + 1], Nr, Rr), t = e[o++], n = e[o++];
break;
case Nt.Q:
JP(t, n, e[o++], e[o++], e[o], e[o + 1], Nr, Rr), t = e[o++], n = e[o++];
break;
case Nt.A:
var u = e[o++], f = e[o++], h = e[o++], c = e[o++], v = e[o++], p = e[o++] + v;
o += 1;
var d = !e[o++];
l && (a = Da(v) * h + u, i = Aa(v) * c + f), QP(u, f, h, c, v, p, d, Nr, Rr), t = Da(p) * h + u, n = Aa(p) * c + f;
break;
case Nt.R:
a = t = e[o++], i = n = e[o++];
var g = e[o++], y = e[o++];
_0(a, i, a + g, i + y, Nr, Rr);
break;
case Nt.Z:
t = a, n = i;
break;
}
Wn(Pr, Pr, Nr), Un(En, En, Rr);
}
return o === 0 && (Pr[0] = Pr[1] = En[0] = En[1] = 0), new ft(Pr[0], Pr[1], En[0] - Pr[0], En[1] - Pr[1]);
}, r.prototype._calculateLength = function() {
var e = this.data, t = this._len, n = this._ux, a = this._uy, i = 0, o = 0, s = 0, l = 0;
this._pathSegLen || (this._pathSegLen = []);
for (var u = this._pathSegLen, f = 0, h = 0, c = 0; c < t; ) {
var v = e[c++], p = c === 1;
p && (i = e[c], o = e[c + 1], s = i, l = o);
var d = -1;
switch (v) {
case Nt.M:
i = s = e[c++], o = l = e[c++];
break;
case Nt.L: {
var g = e[c++], y = e[c++], m = g - i, _ = y - o;
(nn(m) > n || nn(_) > a || c === t - 1) && (d = Math.sqrt(m * m + _ * _), i = g, o = y);
break;
}
case Nt.C: {
var S = e[c++], w = e[c++], g = e[c++], y = e[c++], x = e[c++], b = e[c++];
d = lE(i, o, S, w, g, y, x, b, 10), i = x, o = b;
break;
}
case Nt.Q: {
var S = e[c++], w = e[c++], g = e[c++], y = e[c++];
d = fE(i, o, S, w, g, y, 10), i = g, o = y;
break;
}
case Nt.A:
var T = e[c++], D = e[c++], A = e[c++], M = e[c++], L = e[c++], I = e[c++], E = I + L;
c += 1, e[c++], p && (s = Da(L) * A + T, l = Aa(L) * M + D), d = Bc(A, M) * Vc(zn, Math.abs(I)), i = Da(E) * A + T, o = Aa(E) * M + D;
break;
case Nt.R: {
s = i = e[c++], l = o = e[c++];
var P = e[c++], N = e[c++];
d = P * 2 + N * 2;
break;
}
case Nt.Z: {
var m = s - i, _ = l - o;
d = Math.sqrt(m * m + _ * _), i = s, o = l;
break;
}
}
d >= 0 && (u[h++] = d, f += d);
}
return this._pathLen = f, f;
}, r.prototype.rebuildPath = function(e, t) {
var n = this.data, a = this._ux, i = this._uy, o = this._len, s, l, u, f, h, c, v = t < 1, p, d, g = 0, y = 0, m, _ = 0, S, w;
if (v && (this._pathSegLen || this._calculateLength(), p = this._pathSegLen, d = this._pathLen, m = t * d, !m))
return;
t:
for (var x = 0; x < o; ) {
var b = n[x++], T = x === 1;
switch (T && (u = n[x], f = n[x + 1], s = u, l = f), b !== Nt.L && _ > 0 && (e.lineTo(S, w), _ = 0), b) {
case Nt.M:
s = u = n[x++], l = f = n[x++], e.moveTo(u, f);
break;
case Nt.L: {
h = n[x++], c = n[x++];
var D = nn(h - u), A = nn(c - f);
if (D > a || A > i) {
if (v) {
var M = p[y++];
if (g + M > m) {
var L = (m - g) / M;
e.lineTo(u * (1 - L) + h * L, f * (1 - L) + c * L);
break t;
}
g += M;
}
e.lineTo(h, c), u = h, f = c, _ = 0;
} else {
var I = D * D + A * A;
I > _ && (S = h, w = c, _ = I);
}
break;
}
case Nt.C: {
var E = n[x++], P = n[x++], N = n[x++], O = n[x++], k = n[x++], V = n[x++];
if (v) {
var M = p[y++];
if (g + M > m) {
var L = (m - g) / M;
na(u, E, N, k, L, Ta), na(f, P, O, V, L, Ca), e.bezierCurveTo(Ta[1], Ca[1], Ta[2], Ca[2], Ta[3], Ca[3]);
break t;
}
g += M;
}
e.bezierCurveTo(E, P, N, O, k, V), u = k, f = V;
break;
}
case Nt.Q: {
var E = n[x++], P = n[x++], N = n[x++], O = n[x++];
if (v) {
var M = p[y++];
if (g + M > m) {
var L = (m - g) / M;
el(u, E, N, L, Ta), el(f, P, O, L, Ca), e.quadraticCurveTo(Ta[1], Ca[1], Ta[2], Ca[2]);
break t;
}
g += M;
}
e.quadraticCurveTo(E, P, N, O), u = N, f = O;
break;
}
case Nt.A:
var F = n[x++], $ = n[x++], Z = n[x++], et = n[x++], ht = n[x++], Lt = n[x++], At = n[x++], dt = !n[x++], rt = Z > et ? Z : et, yt = nn(Z - et) > 1e-3, ut = ht + Lt, X = !1;
if (v) {
var M = p[y++];
g + M > m && (ut = ht + Lt * (m - g) / M, X = !0), g += M;
}
if (yt && e.ellipse ? e.ellipse(F, $, Z, et, At, ht, ut, dt) : e.arc(F, $, rt, ht, ut, dt), X)
break t;
T && (s = Da(ht) * Z + F, l = Aa(ht) * et + $), u = Da(ut) * Z + F, f = Aa(ut) * et + $;
break;
case Nt.R:
s = u = n[x], l = f = n[x + 1], h = n[x++], c = n[x++];
var ot = n[x++], Vt = n[x++];
if (v) {
var M = p[y++];
if (g + M > m) {
var St = m - g;
e.moveTo(h, c), e.lineTo(h + Vc(St, ot), c), St -= ot, St > 0 && e.lineTo(h + ot, c + Vc(St, Vt)), St -= Vt, St > 0 && e.lineTo(h + Bc(ot - St, 0), c + Vt), St -= ot, St > 0 && e.lineTo(h, c + Bc(Vt - St, 0));
break t;
}
g += M;
}
e.rect(h, c, ot, Vt);
break;
case Nt.Z:
if (v) {
var M = p[y++];
if (g + M > m) {
var L = (m - g) / M;
e.lineTo(u * (1 - L) + s * L, f * (1 - L) + l * L);
break t;
}
g += M;
}
e.closePath(), u = s, f = l;
}
}
}, r.prototype.clone = function() {
var e = new r(), t = this.data;
return e.data = t.slice ? t.slice() : Array.prototype.slice.call(t), e._len = this._len, e;
}, r.CMD = Nt, r.initDefaultProps = function() {
var e = r.prototype;
e._saveData = !0, e._ux = 0, e._uy = 0, e._pendingPtDist = 0, e._version = 0;
}(), r;
}();
function Fn(r, e, t, n, a, i, o) {
if (a === 0)
return !1;
var s = a, l = 0, u = r;
if (o > e + s && o > n + s || o < e - s && o < n - s || i > r + s && i > t + s || i < r - s && i < t - s)
return !1;
if (r !== t)
l = (e - n) / (r - t), u = (r * n - t * e) / (r - t);
else
return Math.abs(i - r) <= s / 2;
var f = l * i - o + u, h = f * f / (l * l + 1);
return h <= s / 2 * s / 2;
}
function tN(r, e, t, n, a, i, o, s, l, u, f) {
if (l === 0)
return !1;
var h = l;
if (f > e + h && f > n + h && f > i + h && f > s + h || f < e - h && f < n - h && f < i - h && f < s - h || u > r + h && u > t + h && u > a + h && u > o + h || u < r - h && u < t - h && u < a - h && u < o - h)
return !1;
var c = pT(r, e, t, n, a, i, o, s, u, f, null);
return c <= h / 2;
}
function KT(r, e, t, n, a, i, o, s, l) {
if (o === 0)
return !1;
var u = o;
if (l > e + u && l > n + u && l > i + u || l < e - u && l < n - u && l < i - u || s > r + u && s > t + u && s > a + u || s < r - u && s < t - u && s < a - u)
return !1;
var f = gT(r, e, t, n, a, i, s, l, null);
return f <= u / 2;
}
var w0 = Math.PI * 2;
function qn(r) {
return r %= w0, r < 0 && (r += w0), r;
}
var rs = Math.PI * 2;
function eN(r, e, t, n, a, i, o, s, l) {
if (o === 0)
return !1;
var u = o;
s -= r, l -= e;
var f = Math.sqrt(s * s + l * l);
if (f - u > t || f + u < t)
return !1;
if (Math.abs(n - a) % rs < 1e-4)
return !0;
if (i) {
var h = n;
n = qn(a), a = qn(h);
} else
n = qn(n), a = qn(a);
n > a && (a += rs);
var c = Math.atan2(l, s);
return c < 0 && (c += rs), c >= n && c <= a || c + rs >= n && c + rs <= a;
}
function ln(r, e, t, n, a, i) {
if (i > e && i > n || i < e && i < n || n === e)
return 0;
var o = (i - e) / (n - e), s = n < e ? 1 : -1;
(o === 1 || o === 0) && (s = n < e ? 0.5 : -0.5);
var l = o * (t - r) + r;
return l === a ? 1 / 0 : l > a ? s : 0;
}
var Pn = Jr.CMD, Ma = Math.PI * 2, rN = 1e-4;
function nN(r, e) {
return Math.abs(r - e) < rN;
}
var Ce = [-1, -1, -1], rr = [-1, -1];
function aN() {
var r = rr[0];
rr[0] = rr[1], rr[1] = r;
}
function iN(r, e, t, n, a, i, o, s, l, u) {
if (u > e && u > n && u > i && u > s || u < e && u < n && u < i && u < s)
return 0;
var f = xf(e, n, i, s, u, Ce);
if (f === 0)
return 0;
for (var h = 0, c = -1, v = void 0, p = void 0, d = 0; d < f; d++) {
var g = Ce[d], y = g === 0 || g === 1 ? 0.5 : 1, m = re(r, t, a, o, g);
m < l || (c < 0 && (c = vT(e, n, i, s, rr), rr[1] < rr[0] && c > 1 && aN(), v = re(e, n, i, s, rr[0]), c > 1 && (p = re(e, n, i, s, rr[1]))), c === 2 ? g < rr[0] ? h += v < e ? y : -y : g < rr[1] ? h += p < v ? y : -y : h += s < p ? y : -y : g < rr[0] ? h += v < e ? y : -y : h += s < v ? y : -y);
}
return h;
}
function oN(r, e, t, n, a, i, o, s) {
if (s > e && s > n && s > i || s < e && s < n && s < i)
return 0;
var l = uE(e, n, i, s, Ce);
if (l === 0)
return 0;
var u = dT(e, n, i);
if (u >= 0 && u <= 1) {
for (var f = 0, h = ie(e, n, i, u), c = 0; c < l; c++) {
var v = Ce[c] === 0 || Ce[c] === 1 ? 0.5 : 1, p = ie(r, t, a, Ce[c]);
p < o || (Ce[c] < u ? f += h < e ? v : -v : f += i < h ? v : -v);
}
return f;
} else {
var v = Ce[0] === 0 || Ce[0] === 1 ? 0.5 : 1, p = ie(r, t, a, Ce[0]);
return p < o ? 0 : i < e ? v : -v;
}
}
function sN(r, e, t, n, a, i, o, s) {
if (s -= e, s > t || s < -t)
return 0;
var l = Math.sqrt(t * t - s * s);
Ce[0] = -l, Ce[1] = l;
var u = Math.abs(n - a);
if (u < 1e-4)
return 0;
if (u >= Ma - 1e-4) {
n = 0, a = Ma;
var f = i ? 1 : -1;
return o >= Ce[0] + r && o <= Ce[1] + r ? f : 0;
}
if (n > a) {
var h = n;
n = a, a = h;
}
n < 0 && (n += Ma, a += Ma);
for (var c = 0, v = 0; v < 2; v++) {
var p = Ce[v];
if (p + r > o) {
var d = Math.atan2(s, p), f = i ? 1 : -1;
d < 0 && (d = Ma + d), (d >= n && d <= a || d + Ma >= n && d + Ma <= a) && (d > Math.PI / 2 && d < Math.PI * 1.5 && (f = -f), c += f);
}
}
return c;
}
function jT(r, e, t, n, a) {
for (var i = r.data, o = r.len(), s = 0, l = 0, u = 0, f = 0, h = 0, c, v, p = 0; p < o; ) {
var d = i[p++], g = p === 1;
switch (d === Pn.M && p > 1 && (t || (s += ln(l, u, f, h, n, a))), g && (l = i[p], u = i[p + 1], f = l, h = u), d) {
case Pn.M:
f = i[p++], h = i[p++], l = f, u = h;
break;
case Pn.L:
if (t) {
if (Fn(l, u, i[p], i[p + 1], e, n, a))
return !0;
} else
s += ln(l, u, i[p], i[p + 1], n, a) || 0;
l = i[p++], u = i[p++];
break;
case Pn.C:
if (t) {
if (tN(l, u, i[p++], i[p++], i[p++], i[p++], i[p], i[p + 1], e, n, a))
return !0;
} else
s += iN(l, u, i[p++], i[p++], i[p++], i[p++], i[p], i[p + 1], n, a) || 0;
l = i[p++], u = i[p++];
break;
case Pn.Q:
if (t) {
if (KT(l, u, i[p++], i[p++], i[p], i[p + 1], e, n, a))
return !0;
} else
s += oN(l, u, i[p++], i[p++], i[p], i[p + 1], n, a) || 0;
l = i[p++], u = i[p++];
break;
case Pn.A:
var y = i[p++], m = i[p++], _ = i[p++], S = i[p++], w = i[p++], x = i[p++];
p += 1;
var b = !!(1 - i[p++]);
c = Math.cos(w) * _ + y, v = Math.sin(w) * S + m, g ? (f = c, h = v) : s += ln(l, u, c, v, n, a);
var T = (n - y) * S / _ + y;
if (t) {
if (eN(y, m, S, w, w + x, b, e, T, a))
return !0;
} else
s += sN(y, m, S, w, w + x, b, T, a);
l = Math.cos(w + x) * _ + y, u = Math.sin(w + x) * S + m;
break;
case Pn.R:
f = l = i[p++], h = u = i[p++];
var D = i[p++], A = i[p++];
if (c = f + D, v = h + A, t) {
if (Fn(f, h, c, h, e, n, a) || Fn(c, h, c, v, e, n, a) || Fn(c, v, f, v, e, n, a) || Fn(f, v, f, h, e, n, a))
return !0;
} else
s += ln(c, h, c, v, n, a), s += ln(f, v, f, h, n, a);
break;
case Pn.Z:
if (t) {
if (Fn(l, u, f, h, e, n, a))
return !0;
} else
s += ln(l, u, f, h, n, a);
l = f, u = h;
break;
}
}
return !t && !nN(u, h) && (s += ln(l, u, f, h, n, a) || 0), s !== 0;
}
function lN(r, e, t) {
return jT(r, 0, !1, e, t);
}
function uN(r, e, t, n) {
return jT(r, e, !0, t, n);
}
var Mf = J({
fill: "#000",
stroke: null,
strokePercent: 1,
fillOpacity: 1,
strokeOpacity: 1,
lineDashOffset: 0,
lineWidth: 1,
lineCap: "butt",
miterLimit: 10,
strokeNoScale: !1,
strokeFirst: !1
}, ii), fN = {
style: J({
fill: !0,
stroke: !0,
strokePercent: !0,
fillOpacity: !0,
strokeOpacity: !0,
lineDashOffset: !0,
lineWidth: !0,
miterLimit: !0
}, Lh.style)
}, Fc = Kr.concat([
"invisible",
"culling",
"z",
"z2",
"zlevel",
"parent"
]), hN = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.update = function() {
var t = this;
r.prototype.update.call(this);
var n = this.style;
if (n.decal) {
var a = this._decalEl = this._decalEl || new e();
a.buildPath === e.prototype.buildPath && (a.buildPath = function(l) {
t.buildPath(l, t.shape);
}), a.silent = !0;
var i = a.style;
for (var o in n)
i[o] !== n[o] && (i[o] = n[o]);
i.fill = n.fill ? n.decal : null, i.decal = null, i.shadowColor = null, n.strokeFirst && (i.stroke = null);
for (var s = 0; s < Fc.length; ++s)
a[Fc[s]] = this[Fc[s]];
a.__dirty |= We;
} else
this._decalEl && (this._decalEl = null);
}, e.prototype.getDecalElement = function() {
return this._decalEl;
}, e.prototype._init = function(t) {
var n = mt(t);
this.shape = this.getDefaultShape();
var a = this.getDefaultStyle();
a && this.useStyle(a);
for (var i = 0; i < n.length; i++) {
var o = n[i], s = t[o];
o === "style" ? this.style ? B(this.style, s) : this.useStyle(s) : o === "shape" ? B(this.shape, s) : r.prototype.attrKV.call(this, o, s);
}
this.style || this.useStyle({});
}, e.prototype.getDefaultStyle = function() {
return null;
}, e.prototype.getDefaultShape = function() {
return {};
}, e.prototype.canBeInsideText = function() {
return this.hasFill();
}, e.prototype.getInsideTextFill = function() {
var t = this.style.fill;
if (t !== "none") {
if (W(t)) {
var n = bf(t, 0);
return n > 0.5 ? od : n > 0.2 ? $E : sd;
} else if (t)
return sd;
}
return od;
}, e.prototype.getInsideTextStroke = function(t) {
var n = this.style.fill;
if (W(n)) {
var a = this.__zr, i = !!(a && a.isDarkMode()), o = bf(t, 0) < id;
if (i === o)
return n;
}
}, e.prototype.buildPath = function(t, n, a) {
}, e.prototype.pathUpdated = function() {
this.__dirty &= ~Qi;
}, e.prototype.getUpdatedPathProxy = function(t) {
return !this.path && this.createPathProxy(), this.path.beginPath(), this.buildPath(this.path, this.shape, t), this.path;
}, e.prototype.createPathProxy = function() {
this.path = new Jr(!1);
}, e.prototype.hasStroke = function() {
var t = this.style, n = t.stroke;
return !(n == null || n === "none" || !(t.lineWidth > 0));
}, e.prototype.hasFill = function() {
var t = this.style, n = t.fill;
return n != null && n !== "none";
}, e.prototype.getBoundingRect = function() {
var t = this._rect, n = this.style, a = !t;
if (a) {
var i = !1;
this.path || (i = !0, this.createPathProxy());
var o = this.path;
(i || this.__dirty & Qi) && (o.beginPath(), this.buildPath(o, this.shape, !1), this.pathUpdated()), t = o.getBoundingRect();
}
if (this._rect = t, this.hasStroke() && this.path && this.path.len() > 0) {
var s = this._rectStroke || (this._rectStroke = t.clone());
if (this.__dirty || a) {
s.copy(t);
var l = n.strokeNoScale ? this.getLineScale() : 1, u = n.lineWidth;
if (!this.hasFill()) {
var f = this.strokeContainThreshold;
u = Math.max(u, f == null ? 4 : f);
}
l > 1e-10 && (s.width += u / l, s.height += u / l, s.x -= u / l / 2, s.y -= u / l / 2);
}
return s;
}
return t;
}, e.prototype.contain = function(t, n) {
var a = this.transformCoordToLocal(t, n), i = this.getBoundingRect(), o = this.style;
if (t = a[0], n = a[1], i.contain(t, n)) {
var s = this.path;
if (this.hasStroke()) {
var l = o.lineWidth, u = o.strokeNoScale ? this.getLineScale() : 1;
if (u > 1e-10 && (this.hasFill() || (l = Math.max(l, this.strokeContainThreshold)), uN(s, l / u, t, n)))
return !0;
}
if (this.hasFill())
return lN(s, t, n);
}
return !1;
}, e.prototype.dirtyShape = function() {
this.__dirty |= Qi, this._rect && (this._rect = null), this._decalEl && this._decalEl.dirtyShape(), this.markRedraw();
}, e.prototype.dirty = function() {
this.dirtyStyle(), this.dirtyShape();
}, e.prototype.animateShape = function(t) {
return this.animate("shape", t);
}, e.prototype.updateDuringAnimation = function(t) {
t === "style" ? this.dirtyStyle() : t === "shape" ? this.dirtyShape() : this.markRedraw();
}, e.prototype.attrKV = function(t, n) {
t === "shape" ? this.setShape(n) : r.prototype.attrKV.call(this, t, n);
}, e.prototype.setShape = function(t, n) {
var a = this.shape;
return a || (a = this.shape = {}), typeof t == "string" ? a[t] = n : B(a, t), this.dirtyShape(), this;
}, e.prototype.shapeChanged = function() {
return !!(this.__dirty & Qi);
}, e.prototype.createStyle = function(t) {
return xh(Mf, t);
}, e.prototype._innerSaveToNormal = function(t) {
r.prototype._innerSaveToNormal.call(this, t);
var n = this._normalState;
t.shape && !n.shape && (n.shape = B({}, this.shape));
}, e.prototype._applyStateObj = function(t, n, a, i, o, s) {
r.prototype._applyStateObj.call(this, t, n, a, i, o, s);
var l = !(n && i), u;
if (n && n.shape ? o ? i ? u = n.shape : (u = B({}, a.shape), B(u, n.shape)) : (u = B({}, i ? this.shape : a.shape), B(u, n.shape)) : l && (u = a.shape), u)
if (o) {
this.shape = B({}, this.shape);
for (var f = {}, h = mt(u), c = 0; c < h.length; c++) {
var v = h[c];
typeof u[v] == "object" ? this.shape[v] = u[v] : f[v] = u[v];
}
this._transitionState(t, {
shape: f
}, s);
} else
this.shape = u, this.dirtyShape();
}, e.prototype._mergeStates = function(t) {
for (var n = r.prototype._mergeStates.call(this, t), a, i = 0; i < t.length; i++) {
var o = t[i];
o.shape && (a = a || {}, this._mergeStyle(a, o.shape));
}
return a && (n.shape = a), n;
}, e.prototype.getAnimationStyleProps = function() {
return fN;
}, e.prototype.isZeroArea = function() {
return !1;
}, e.extend = function(t) {
var n = function(i) {
R(o, i);
function o(s) {
var l = i.call(this, s) || this;
return t.init && t.init.call(l, s), l;
}
return o.prototype.getDefaultStyle = function() {
return tt(t.style);
}, o.prototype.getDefaultShape = function() {
return tt(t.shape);
}, o;
}(e);
for (var a in t)
typeof t[a] == "function" && (n.prototype[a] = t[a]);
return n;
}, e.initDefaultProps = function() {
var t = e.prototype;
t.type = "path", t.strokeContainThreshold = 5, t.segmentIgnoreThreshold = 0, t.subPixelOptimize = !1, t.autoBatch = !1, t.__dirty = We | Cs | Qi;
}(), e;
}(cr);
const gt = hN;
var cN = J({
strokeFirst: !0,
font: ra,
x: 0,
y: 0,
textAlign: "left",
textBaseline: "top",
miterLimit: 2
}, Mf), JT = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.hasStroke = function() {
var t = this.style, n = t.stroke;
return n != null && n !== "none" && t.lineWidth > 0;
}, e.prototype.hasFill = function() {
var t = this.style, n = t.fill;
return n != null && n !== "none";
}, e.prototype.createStyle = function(t) {
return xh(cN, t);
}, e.prototype.setBoundingRect = function(t) {
this._rect = t;
}, e.prototype.getBoundingRect = function() {
var t = this.style;
if (!this._rect) {
var n = t.text;
n != null ? n += "" : n = "";
var a = Al(n, t.font, t.textAlign, t.textBaseline);
if (a.x += t.x || 0, a.y += t.y || 0, this.hasStroke()) {
var i = t.lineWidth;
a.x -= i / 2, a.y -= i / 2, a.width += i, a.height += i;
}
this._rect = a;
}
return this._rect;
}, e.initDefaultProps = function() {
var t = e.prototype;
t.dirtyRectTolerance = 10;
}(), e;
}(cr);
JT.prototype.type = "tspan";
const nl = JT;
var vN = J({
x: 0,
y: 0
}, ii), pN = {
style: J({
x: !0,
y: !0,
width: !0,
height: !0,
sx: !0,
sy: !0,
sWidth: !0,
sHeight: !0
}, Lh.style)
};
function dN(r) {
return !!(r && typeof r != "string" && r.width && r.height);
}
var QT = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.createStyle = function(t) {
return xh(vN, t);
}, e.prototype._getSize = function(t) {
var n = this.style, a = n[t];
if (a != null)
return a;
var i = dN(n.image) ? n.image : this.__image;
if (!i)
return 0;
var o = t === "width" ? "height" : "width", s = n[o];
return s == null ? i[t] : i[t] / i[o] * s;
}, e.prototype.getWidth = function() {
return this._getSize("width");
}, e.prototype.getHeight = function() {
return this._getSize("height");
}, e.prototype.getAnimationStyleProps = function() {
return pN;
}, e.prototype.getBoundingRect = function() {
var t = this.style;
return this._rect || (this._rect = new ft(t.x || 0, t.y || 0, this.getWidth(), this.getHeight())), this._rect;
}, e;
}(cr);
QT.prototype.type = "image";
const ve = QT;
function gN(r, e) {
var t = e.x, n = e.y, a = e.width, i = e.height, o = e.r, s, l, u, f;
a < 0 && (t = t + a, a = -a), i < 0 && (n = n + i, i = -i), typeof o == "number" ? s = l = u = f = o : o instanceof Array ? o.length === 1 ? s = l = u = f = o[0] : o.length === 2 ? (s = u = o[0], l = f = o[1]) : o.length === 3 ? (s = o[0], l = f = o[1], u = o[2]) : (s = o[0], l = o[1], u = o[2], f = o[3]) : s = l = u = f = 0;
var h;
s + l > a && (h = s + l, s *= a / h, l *= a / h), u + f > a && (h = u + f, u *= a / h, f *= a / h), l + u > i && (h = l + u, l *= i / h, u *= i / h), s + f > i && (h = s + f, s *= i / h, f *= i / h), r.moveTo(t + s, n), r.lineTo(t + a - l, n), l !== 0 && r.arc(t + a - l, n + l, l, -Math.PI / 2, 0), r.lineTo(t + a, n + i - u), u !== 0 && r.arc(t + a - u, n + i - u, u, 0, Math.PI / 2), r.lineTo(t + f, n + i), f !== 0 && r.arc(t + f, n + i - f, f, Math.PI / 2, Math.PI), r.lineTo(t, n + s), s !== 0 && r.arc(t + s, n + s, s, Math.PI, Math.PI * 1.5);
}
var io = Math.round;
function tC(r, e, t) {
if (!!e) {
var n = e.x1, a = e.x2, i = e.y1, o = e.y2;
r.x1 = n, r.x2 = a, r.y1 = i, r.y2 = o;
var s = t && t.lineWidth;
return s && (io(n * 2) === io(a * 2) && (r.x1 = r.x2 = Qa(n, s, !0)), io(i * 2) === io(o * 2) && (r.y1 = r.y2 = Qa(i, s, !0))), r;
}
}
function eC(r, e, t) {
if (!!e) {
var n = e.x, a = e.y, i = e.width, o = e.height;
r.x = n, r.y = a, r.width = i, r.height = o;
var s = t && t.lineWidth;
return s && (r.x = Qa(n, s, !0), r.y = Qa(a, s, !0), r.width = Math.max(Qa(n + i, s, !1) - r.x, i === 0 ? 0 : 1), r.height = Math.max(Qa(a + o, s, !1) - r.y, o === 0 ? 0 : 1)), r;
}
}
function Qa(r, e, t) {
if (!e)
return r;
var n = io(r * 2);
return (n + io(e)) % 2 === 0 ? n / 2 : (n + (t ? 1 : -1)) / 2;
}
var yN = function() {
function r() {
this.x = 0, this.y = 0, this.width = 0, this.height = 0;
}
return r;
}(), mN = {}, rC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new yN();
}, e.prototype.buildPath = function(t, n) {
var a, i, o, s;
if (this.subPixelOptimize) {
var l = eC(mN, n, this.style);
a = l.x, i = l.y, o = l.width, s = l.height, l.r = n.r, n = l;
} else
a = n.x, i = n.y, o = n.width, s = n.height;
n.r ? gN(t, n) : t.rect(a, i, o, s);
}, e.prototype.isZeroArea = function() {
return !this.shape.width || !this.shape.height;
}, e;
}(gt);
rC.prototype.type = "rect";
const xt = rC;
var b0 = {
fill: "#000"
}, T0 = 2, _N = {
style: J({
fill: !0,
stroke: !0,
fillOpacity: !0,
strokeOpacity: !0,
lineWidth: !0,
fontSize: !0,
lineHeight: !0,
width: !0,
height: !0,
textShadowColor: !0,
textShadowBlur: !0,
textShadowOffsetX: !0,
textShadowOffsetY: !0,
backgroundColor: !0,
padding: !0,
borderColor: !0,
borderWidth: !0,
borderRadius: !0
}, Lh.style)
}, nC = function(r) {
R(e, r);
function e(t) {
var n = r.call(this) || this;
return n.type = "text", n._children = [], n._defaultStyle = b0, n.attr(t), n;
}
return e.prototype.childrenRef = function() {
return this._children;
}, e.prototype.update = function() {
r.prototype.update.call(this), this.styleChanged() && this._updateSubTexts();
for (var t = 0; t < this._children.length; t++) {
var n = this._children[t];
n.zlevel = this.zlevel, n.z = this.z, n.z2 = this.z2, n.culling = this.culling, n.cursor = this.cursor, n.invisible = this.invisible;
}
}, e.prototype.updateTransform = function() {
var t = this.innerTransformable;
t ? (t.updateTransform(), t.transform && (this.transform = t.transform)) : r.prototype.updateTransform.call(this);
}, e.prototype.getLocalTransform = function(t) {
var n = this.innerTransformable;
return n ? n.getLocalTransform(t) : r.prototype.getLocalTransform.call(this, t);
}, e.prototype.getComputedTransform = function() {
return this.__hostTarget && (this.__hostTarget.getComputedTransform(), this.__hostTarget.updateInnerText(!0)), r.prototype.getComputedTransform.call(this);
}, e.prototype._updateSubTexts = function() {
this._childCursor = 0, wN(this.style), this.style.rich ? this._updateRichTexts() : this._updatePlainTexts(), this._children.length = this._childCursor, this.styleUpdated();
}, e.prototype.addSelfToZr = function(t) {
r.prototype.addSelfToZr.call(this, t);
for (var n = 0; n < this._children.length; n++)
this._children[n].__zr = t;
}, e.prototype.removeSelfFromZr = function(t) {
r.prototype.removeSelfFromZr.call(this, t);
for (var n = 0; n < this._children.length; n++)
this._children[n].__zr = null;
}, e.prototype.getBoundingRect = function() {
if (this.styleChanged() && this._updateSubTexts(), !this._rect) {
for (var t = new ft(0, 0, 0, 0), n = this._children, a = [], i = null, o = 0; o < n.length; o++) {
var s = n[o], l = s.getBoundingRect(), u = s.getLocalTransform(a);
u ? (t.copy(l), t.applyTransform(u), i = i || t.clone(), i.union(t)) : (i = i || l.clone(), i.union(l));
}
this._rect = i || t;
}
return this._rect;
}, e.prototype.setDefaultTextStyle = function(t) {
this._defaultStyle = t || b0;
}, e.prototype.setTextContent = function(t) {
if (process.env.NODE_ENV !== "production")
throw new Error("Can't attach text on another text");
}, e.prototype._mergeStyle = function(t, n) {
if (!n)
return t;
var a = n.rich, i = t.rich || a && {};
return B(t, n), a && i ? (this._mergeRich(i, a), t.rich = i) : i && (t.rich = i), t;
}, e.prototype._mergeRich = function(t, n) {
for (var a = mt(n), i = 0; i < a.length; i++) {
var o = a[i];
t[o] = t[o] || {}, B(t[o], n[o]);
}
}, e.prototype.getAnimationStyleProps = function() {
return _N;
}, e.prototype._getOrCreateChild = function(t) {
var n = this._children[this._childCursor];
return (!n || !(n instanceof t)) && (n = new t()), this._children[this._childCursor++] = n, n.__zr = this.__zr, n.parent = this, n;
}, e.prototype._updatePlainTexts = function() {
var t = this.style, n = t.font || ra, a = t.padding, i = E0(t), o = FP(i, t), s = Hc(t), l = !!t.backgroundColor, u = o.outerHeight, f = o.outerWidth, h = o.contentWidth, c = o.lines, v = o.lineHeight, p = this._defaultStyle, d = t.x || 0, g = t.y || 0, y = t.align || p.align || "left", m = t.verticalAlign || p.verticalAlign || "top", _ = d, S = to(g, o.contentHeight, m);
if (s || a) {
var w = As(d, f, y), x = to(g, u, m);
s && this._renderBackground(t, t, w, x, f, u);
}
S += v / 2, a && (_ = I0(d, y, a), m === "top" ? S += a[0] : m === "bottom" && (S -= a[2]));
for (var b = 0, T = !1, D = L0("fill" in t ? t.fill : (T = !0, p.fill)), A = M0("stroke" in t ? t.stroke : !l && (!p.autoStroke || T) ? (b = T0, p.stroke) : null), M = t.textShadowBlur > 0, L = t.width != null && (t.overflow === "truncate" || t.overflow === "break" || t.overflow === "breakAll"), I = o.calculatedLineHeight, E = 0; E < c.length; E++) {
var P = this._getOrCreateChild(nl), N = P.createStyle();
P.useStyle(N), N.text = c[E], N.x = _, N.y = S, y && (N.textAlign = y), N.textBaseline = "middle", N.opacity = t.opacity, N.strokeFirst = !0, M && (N.shadowBlur = t.textShadowBlur || 0, N.shadowColor = t.textShadowColor || "transparent", N.shadowOffsetX = t.textShadowOffsetX || 0, N.shadowOffsetY = t.textShadowOffsetY || 0), N.stroke = A, N.fill = D, A && (N.lineWidth = t.lineWidth || b, N.lineDash = t.lineDash, N.lineDashOffset = t.lineDashOffset || 0), N.font = n, D0(N, t), S += v, L && P.setBoundingRect(new ft(As(N.x, t.width, N.textAlign), to(N.y, I, N.textBaseline), h, I));
}
}, e.prototype._updateRichTexts = function() {
var t = this.style, n = E0(t), a = WP(n, t), i = a.width, o = a.outerWidth, s = a.outerHeight, l = t.padding, u = t.x || 0, f = t.y || 0, h = this._defaultStyle, c = t.align || h.align, v = t.verticalAlign || h.verticalAlign, p = As(u, o, c), d = to(f, s, v), g = p, y = d;
l && (g += l[3], y += l[0]);
var m = g + i;
Hc(t) && this._renderBackground(t, t, p, d, o, s);
for (var _ = !!t.backgroundColor, S = 0; S < a.lines.length; S++) {
for (var w = a.lines[S], x = w.tokens, b = x.length, T = w.lineHeight, D = w.width, A = 0, M = g, L = m, I = b - 1, E = void 0; A < b && (E = x[A], !E.align || E.align === "left"); )
this._placeToken(E, t, T, y, M, "left", _), D -= E.width, M += E.width, A++;
for (; I >= 0 && (E = x[I], E.align === "right"); )
this._placeToken(E, t, T, y, L, "right", _), D -= E.width, L -= E.width, I--;
for (M += (i - (M - g) - (m - L) - D) / 2; A <= I; )
E = x[A], this._placeToken(E, t, T, y, M + E.width / 2, "center", _), M += E.width, A++;
y += T;
}
}, e.prototype._placeToken = function(t, n, a, i, o, s, l) {
var u = n.rich[t.styleName] || {};
u.text = t.text;
var f = t.verticalAlign, h = i + a / 2;
f === "top" ? h = i + t.height / 2 : f === "bottom" && (h = i + a - t.height / 2);
var c = !t.isLineHolder && Hc(u);
c && this._renderBackground(u, n, s === "right" ? o - t.width : s === "center" ? o - t.width / 2 : o, h - t.height / 2, t.width, t.height);
var v = !!u.backgroundColor, p = t.textPadding;
p && (o = I0(o, s, p), h -= t.height / 2 - p[0] - t.innerHeight / 2);
var d = this._getOrCreateChild(nl), g = d.createStyle();
d.useStyle(g);
var y = this._defaultStyle, m = !1, _ = 0, S = L0("fill" in u ? u.fill : "fill" in n ? n.fill : (m = !0, y.fill)), w = M0("stroke" in u ? u.stroke : "stroke" in n ? n.stroke : !v && !l && (!y.autoStroke || m) ? (_ = T0, y.stroke) : null), x = u.textShadowBlur > 0 || n.textShadowBlur > 0;
g.text = t.text, g.x = o, g.y = h, x && (g.shadowBlur = u.textShadowBlur || n.textShadowBlur || 0, g.shadowColor = u.textShadowColor || n.textShadowColor || "transparent", g.shadowOffsetX = u.textShadowOffsetX || n.textShadowOffsetX || 0, g.shadowOffsetY = u.textShadowOffsetY || n.textShadowOffsetY || 0), g.textAlign = s, g.textBaseline = "middle", g.font = t.font || ra, g.opacity = Tr(u.opacity, n.opacity, 1), D0(g, u), w && (g.lineWidth = Tr(u.lineWidth, n.lineWidth, _), g.lineDash = vt(u.lineDash, n.lineDash), g.lineDashOffset = n.lineDashOffset || 0, g.stroke = w), S && (g.fill = S);
var b = t.contentWidth, T = t.contentHeight;
d.setBoundingRect(new ft(As(g.x, b, g.textAlign), to(g.y, T, g.textBaseline), b, T));
}, e.prototype._renderBackground = function(t, n, a, i, o, s) {
var l = t.backgroundColor, u = t.borderWidth, f = t.borderColor, h = l && l.image, c = l && !h, v = t.borderRadius, p = this, d, g;
if (c || t.lineHeight || u && f) {
d = this._getOrCreateChild(xt), d.useStyle(d.createStyle()), d.style.fill = null;
var y = d.shape;
y.x = a, y.y = i, y.width = o, y.height = s, y.r = v, d.dirtyShape();
}
if (c) {
var m = d.style;
m.fill = l || null, m.fillOpacity = vt(t.fillOpacity, 1);
} else if (h) {
g = this._getOrCreateChild(ve), g.onload = function() {
p.dirtyStyle();
};
var _ = g.style;
_.image = l.image, _.x = a, _.y = i, _.width = o, _.height = s;
}
if (u && f) {
var m = d.style;
m.lineWidth = u, m.stroke = f, m.strokeOpacity = vt(t.strokeOpacity, 1), m.lineDash = t.borderDash, m.lineDashOffset = t.borderDashOffset || 0, d.strokeContainThreshold = 0, d.hasFill() && d.hasStroke() && (m.strokeFirst = !0, m.lineWidth *= 2);
}
var S = (d || g).style;
S.shadowBlur = t.shadowBlur || 0, S.shadowColor = t.shadowColor || "transparent", S.shadowOffsetX = t.shadowOffsetX || 0, S.shadowOffsetY = t.shadowOffsetY || 0, S.opacity = Tr(t.opacity, n.opacity, 1);
}, e.makeFont = function(t) {
var n = "";
return iC(t) && (n = [
t.fontStyle,
t.fontWeight,
aC(t.fontSize),
t.fontFamily || "sans-serif"
].join(" ")), n && xr(n) || t.textFont || t.font;
}, e;
}(cr), SN = { left: !0, right: 1, center: 1 }, xN = { top: 1, bottom: 1, middle: 1 }, C0 = ["fontStyle", "fontWeight", "fontSize", "fontFamily"];
function aC(r) {
return typeof r == "string" && (r.indexOf("px") !== -1 || r.indexOf("rem") !== -1 || r.indexOf("em") !== -1) ? r : isNaN(+r) ? Ag + "px" : r + "px";
}
function D0(r, e) {
for (var t = 0; t < C0.length; t++) {
var n = C0[t], a = e[n];
a != null && (r[n] = a);
}
}
function iC(r) {
return r.fontSize != null || r.fontFamily || r.fontWeight;
}
function wN(r) {
return A0(r), C(r.rich, A0), r;
}
function A0(r) {
if (r) {
r.font = nC.makeFont(r);
var e = r.align;
e === "middle" && (e = "center"), r.align = e == null || SN[e] ? e : "left";
var t = r.verticalAlign;
t === "center" && (t = "middle"), r.verticalAlign = t == null || xN[t] ? t : "top";
var n = r.padding;
n && (r.padding = Pg(r.padding));
}
}
function M0(r, e) {
return r == null || e <= 0 || r === "transparent" || r === "none" ? null : r.image || r.colorStops ? "#000" : r;
}
function L0(r) {
return r == null || r === "none" ? null : r.image || r.colorStops ? "#000" : r;
}
function I0(r, e, t) {
return e === "right" ? r - t[1] : e === "center" ? r + t[3] / 2 - t[1] / 2 : r + t[3];
}
function E0(r) {
var e = r.text;
return e != null && (e += ""), e;
}
function Hc(r) {
return !!(r.backgroundColor || r.lineHeight || r.borderWidth && r.borderColor);
}
const Ct = nC;
var at = Tt(), vd = function(r, e, t, n) {
if (n) {
var a = at(n);
a.dataIndex = t, a.dataType = e, a.seriesIndex = r, n.type === "group" && n.traverse(function(i) {
var o = at(i);
o.seriesIndex = r, o.dataIndex = t, o.dataType = e;
});
}
}, P0 = 1, N0 = {}, oC = Tt(), Wg = Tt(), Ug = 0, Ll = 1, Eh = 2, Le = ["emphasis", "blur", "select"], al = ["normal", "emphasis", "blur", "select"], Ro = 10, bN = 9, oi = "highlight", nf = "downplay", $s = "select", af = "unselect", Ws = "toggleSelect";
function Ri(r) {
return r != null && r !== "none";
}
var R0 = new Dl(100);
function k0(r) {
if (W(r)) {
var e = R0.get(r);
return e || (e = Jp(r, -0.1), R0.put(r, e)), e;
} else if (Sh(r)) {
var t = B({}, r);
return t.colorStops = G(r.colorStops, function(n) {
return {
offset: n.offset,
color: Jp(n.color, -0.1)
};
}), t;
}
return r;
}
function Ph(r, e, t) {
r.onHoverStateChange && (r.hoverState || 0) !== t && r.onHoverStateChange(e), r.hoverState = t;
}
function sC(r) {
Ph(r, "emphasis", Eh);
}
function lC(r) {
r.hoverState === Eh && Ph(r, "normal", Ug);
}
function Yg(r) {
Ph(r, "blur", Ll);
}
function uC(r) {
r.hoverState === Ll && Ph(r, "normal", Ug);
}
function TN(r) {
r.selected = !0;
}
function CN(r) {
r.selected = !1;
}
function O0(r, e, t) {
e(r, t);
}
function Dn(r, e, t) {
O0(r, e, t), r.isGroup && r.traverse(function(n) {
O0(n, e, t);
});
}
function Lf(r, e) {
switch (e) {
case "emphasis":
r.hoverState = Eh;
break;
case "normal":
r.hoverState = Ug;
break;
case "blur":
r.hoverState = Ll;
break;
case "select":
r.selected = !0;
}
}
function DN(r, e, t, n) {
for (var a = r.style, i = {}, o = 0; o < e.length; o++) {
var s = e[o], l = a[s];
i[s] = l == null ? n && n[s] : l;
}
for (var o = 0; o < r.animators.length; o++) {
var u = r.animators[o];
u.__fromStateTransition && u.__fromStateTransition.indexOf(t) < 0 && u.targetName === "style" && u.saveTo(i, e);
}
return i;
}
function AN(r, e, t, n) {
var a = t && ct(t, "select") >= 0, i = !1;
if (r instanceof gt) {
var o = oC(r), s = a && o.selectFill || o.normalFill, l = a && o.selectStroke || o.normalStroke;
if (Ri(s) || Ri(l)) {
n = n || {};
var u = n.style || {};
u.fill === "inherit" ? (i = !0, n = B({}, n), u = B({}, u), u.fill = s) : !Ri(u.fill) && Ri(s) ? (i = !0, n = B({}, n), u = B({}, u), u.fill = k0(s)) : !Ri(u.stroke) && Ri(l) && (i || (n = B({}, n), u = B({}, u)), u.stroke = k0(l)), n.style = u;
}
}
if (n && n.z2 == null) {
i || (n = B({}, n));
var f = r.z2EmphasisLift;
n.z2 = r.z2 + (f != null ? f : Ro);
}
return n;
}
function MN(r, e, t) {
if (t && t.z2 == null) {
t = B({}, t);
var n = r.z2SelectLift;
t.z2 = r.z2 + (n != null ? n : bN);
}
return t;
}
function LN(r, e, t) {
var n = ct(r.currentStates, e) >= 0, a = r.style.opacity, i = n ? null : DN(r, ["opacity"], e, {
opacity: 1
});
t = t || {};
var o = t.style || {};
return o.opacity == null && (t = B({}, t), o = B({
opacity: n ? a : i.opacity * 0.1
}, o), t.style = o), t;
}
function $c(r, e) {
var t = this.states[r];
if (this.style) {
if (r === "emphasis")
return AN(this, r, e, t);
if (r === "blur")
return LN(this, r, t);
if (r === "select")
return MN(this, r, t);
}
return t;
}
function yi(r) {
r.stateProxy = $c;
var e = r.getTextContent(), t = r.getTextGuideLine();
e && (e.stateProxy = $c), t && (t.stateProxy = $c);
}
function V0(r, e) {
!vC(r, e) && !r.__highByOuter && Dn(r, sC);
}
function B0(r, e) {
!vC(r, e) && !r.__highByOuter && Dn(r, lC);
}
function Sn(r, e) {
r.__highByOuter |= 1 << (e || 0), Dn(r, sC);
}
function xn(r, e) {
!(r.__highByOuter &= ~(1 << (e || 0))) && Dn(r, lC);
}
function fC(r) {
Dn(r, Yg);
}
function Zg(r) {
Dn(r, uC);
}
function hC(r) {
Dn(r, TN);
}
function cC(r) {
Dn(r, CN);
}
function vC(r, e) {
return r.__highDownSilentOnTouch && e.zrByTouch;
}
function pC(r) {
var e = r.getModel(), t = [], n = [];
e.eachComponent(function(a, i) {
var o = Wg(i), s = a === "series", l = s ? r.getViewOfSeriesModel(i) : r.getViewOfComponentModel(i);
!s && n.push(l), o.isBlured && (l.group.traverse(function(u) {
uC(u);
}), s && t.push(i)), o.isBlured = !1;
}), C(n, function(a) {
a && a.toggleBlurSeries && a.toggleBlurSeries(t, !1, e);
});
}
function pd(r, e, t, n) {
var a = n.getModel();
t = t || "coordinateSystem";
function i(u, f) {
for (var h = 0; h < f.length; h++) {
var c = u.getItemGraphicEl(f[h]);
c && Zg(c);
}
}
if (r != null && !(!e || e === "none")) {
var o = a.getSeriesByIndex(r), s = o.coordinateSystem;
s && s.master && (s = s.master);
var l = [];
a.eachSeries(function(u) {
var f = o === u, h = u.coordinateSystem;
h && h.master && (h = h.master);
var c = h && s ? h === s : f;
if (!(t === "series" && !f || t === "coordinateSystem" && !c || e === "series" && f)) {
var v = n.getViewOfSeriesModel(u);
if (v.group.traverse(function(g) {
Yg(g);
}), me(e))
i(u.getData(), e);
else if (j(e))
for (var p = mt(e), d = 0; d < p.length; d++)
i(u.getData(p[d]), e[p[d]]);
l.push(u), Wg(u).isBlured = !0;
}
}), a.eachComponent(function(u, f) {
if (u !== "series") {
var h = n.getViewOfComponentModel(f);
h && h.toggleBlurSeries && h.toggleBlurSeries(l, !0, a);
}
});
}
}
function dd(r, e, t) {
if (!(r == null || e == null)) {
var n = t.getModel().getComponent(r, e);
if (!!n) {
Wg(n).isBlured = !0;
var a = t.getViewOfComponentModel(n);
!a || !a.focusBlurEnabled || a.group.traverse(function(i) {
Yg(i);
});
}
}
}
function IN(r, e, t) {
var n = r.seriesIndex, a = r.getData(e.dataType);
if (!a) {
process.env.NODE_ENV !== "production" && he("Unknown dataType " + e.dataType);
return;
}
var i = di(a, e);
i = (z(i) ? i[0] : i) || 0;
var o = a.getItemGraphicEl(i);
if (!o)
for (var s = a.count(), l = 0; !o && l < s; )
o = a.getItemGraphicEl(l++);
if (o) {
var u = at(o);
pd(n, u.focus, u.blurScope, t);
} else {
var f = r.get(["emphasis", "focus"]), h = r.get(["emphasis", "blurScope"]);
f != null && pd(n, f, h, t);
}
}
function Xg(r, e, t, n) {
var a = {
focusSelf: !1,
dispatchers: null
};
if (r == null || r === "series" || e == null || t == null)
return a;
var i = n.getModel().getComponent(r, e);
if (!i)
return a;
var o = n.getViewOfComponentModel(i);
if (!o || !o.findHighDownDispatchers)
return a;
for (var s = o.findHighDownDispatchers(t), l, u = 0; u < s.length; u++)
if (process.env.NODE_ENV !== "production" && !aa(s[u]) && he("param should be highDownDispatcher"), at(s[u]).focus === "self") {
l = !0;
break;
}
return {
focusSelf: l,
dispatchers: s
};
}
function EN(r, e, t) {
process.env.NODE_ENV !== "production" && !aa(r) && he("param should be highDownDispatcher");
var n = at(r), a = Xg(n.componentMainType, n.componentIndex, n.componentHighDownName, t), i = a.dispatchers, o = a.focusSelf;
i ? (o && dd(n.componentMainType, n.componentIndex, t), C(i, function(s) {
return V0(s, e);
})) : (pd(n.seriesIndex, n.focus, n.blurScope, t), n.focus === "self" && dd(n.componentMainType, n.componentIndex, t), V0(r, e));
}
function PN(r, e, t) {
process.env.NODE_ENV !== "production" && !aa(r) && he("param should be highDownDispatcher"), pC(t);
var n = at(r), a = Xg(n.componentMainType, n.componentIndex, n.componentHighDownName, t).dispatchers;
a ? C(a, function(i) {
return B0(i, e);
}) : B0(r, e);
}
function NN(r, e, t) {
if (!!yd(e)) {
var n = e.dataType, a = r.getData(n), i = di(a, e);
z(i) || (i = [i]), r[e.type === Ws ? "toggleSelect" : e.type === $s ? "select" : "unselect"](i, n);
}
}
function z0(r) {
var e = r.getAllData();
C(e, function(t) {
var n = t.data, a = t.type;
n.eachItemGraphicEl(function(i, o) {
r.isSelected(o, a) ? hC(i) : cC(i);
});
});
}
function RN(r) {
var e = [];
return r.eachSeries(function(t) {
var n = t.getAllData();
C(n, function(a) {
a.data;
var i = a.type, o = t.getSelectedDataIndices();
if (o.length > 0) {
var s = {
dataIndex: o,
seriesIndex: t.seriesIndex
};
i != null && (s.dataType = i), e.push(s);
}
});
}), e;
}
function si(r, e, t) {
ti(r, !0), Dn(r, yi), gd(r, e, t);
}
function kN(r) {
ti(r, !1);
}
function Ut(r, e, t, n) {
n ? kN(r) : si(r, e, t);
}
function gd(r, e, t) {
var n = at(r);
e != null ? (n.focus = e, n.blurScope = t) : n.focus && (n.focus = null);
}
var G0 = ["emphasis", "blur", "select"], ON = {
itemStyle: "getItemStyle",
lineStyle: "getLineStyle",
areaStyle: "getAreaStyle"
};
function ce(r, e, t, n) {
t = t || "itemStyle";
for (var a = 0; a < G0.length; a++) {
var i = G0[a], o = e.getModel([i, t]), s = r.ensureState(i);
s.style = n ? n(o) : o[ON[t]]();
}
}
function ti(r, e) {
var t = e === !1, n = r;
r.highDownSilentOnTouch && (n.__highDownSilentOnTouch = r.highDownSilentOnTouch), (!t || n.__highDownDispatcher) && (n.__highByOuter = n.__highByOuter || 0, n.__highDownDispatcher = !t);
}
function aa(r) {
return !!(r && r.__highDownDispatcher);
}
function VN(r, e, t) {
var n = at(r);
n.componentMainType = e.mainType, n.componentIndex = e.componentIndex, n.componentHighDownName = t;
}
function BN(r) {
var e = N0[r];
return e == null && P0 <= 32 && (e = N0[r] = P0++), e;
}
function yd(r) {
var e = r.type;
return e === $s || e === af || e === Ws;
}
function F0(r) {
var e = r.type;
return e === oi || e === nf;
}
function zN(r) {
var e = oC(r);
e.normalFill = r.style.fill, e.normalStroke = r.style.stroke;
var t = r.states.select || {};
e.selectFill = t.style && t.style.fill || null, e.selectStroke = t.style && t.style.stroke || null;
}
var ki = Jr.CMD, GN = [[], [], []], H0 = Math.sqrt, FN = Math.atan2;
function dC(r, e) {
if (!!e) {
var t = r.data, n = r.len(), a, i, o, s, l, u, f = ki.M, h = ki.C, c = ki.L, v = ki.R, p = ki.A, d = ki.Q;
for (o = 0, s = 0; o < n; ) {
switch (a = t[o++], s = o, i = 0, a) {
case f:
i = 1;
break;
case c:
i = 1;
break;
case h:
i = 3;
break;
case d:
i = 2;
break;
case p:
var g = e[4], y = e[5], m = H0(e[0] * e[0] + e[1] * e[1]), _ = H0(e[2] * e[2] + e[3] * e[3]), S = FN(-e[1] / _, e[0] / m);
t[o] *= m, t[o++] += g, t[o] *= _, t[o++] += y, t[o++] *= m, t[o++] *= _, t[o++] += S, t[o++] += S, o += 2, s = o;
break;
case v:
u[0] = t[o++], u[1] = t[o++], ue(u, u, e), t[s++] = u[0], t[s++] = u[1], u[0] += t[o++], u[1] += t[o++], ue(u, u, e), t[s++] = u[0], t[s++] = u[1];
}
for (l = 0; l < i; l++) {
var w = GN[l];
w[0] = t[o++], w[1] = t[o++], ue(w, w, e), t[s++] = w[0], t[s++] = w[1];
}
}
r.increaseVersion();
}
}
var Wc = Math.sqrt, su = Math.sin, lu = Math.cos, ns = Math.PI;
function $0(r) {
return Math.sqrt(r[0] * r[0] + r[1] * r[1]);
}
function md(r, e) {
return (r[0] * e[0] + r[1] * e[1]) / ($0(r) * $0(e));
}
function W0(r, e) {
return (r[0] * e[1] < r[1] * e[0] ? -1 : 1) * Math.acos(md(r, e));
}
function U0(r, e, t, n, a, i, o, s, l, u, f) {
var h = l * (ns / 180), c = lu(h) * (r - t) / 2 + su(h) * (e - n) / 2, v = -1 * su(h) * (r - t) / 2 + lu(h) * (e - n) / 2, p = c * c / (o * o) + v * v / (s * s);
p > 1 && (o *= Wc(p), s *= Wc(p));
var d = (a === i ? -1 : 1) * Wc((o * o * (s * s) - o * o * (v * v) - s * s * (c * c)) / (o * o * (v * v) + s * s * (c * c))) || 0, g = d * o * v / s, y = d * -s * c / o, m = (r + t) / 2 + lu(h) * g - su(h) * y, _ = (e + n) / 2 + su(h) * g + lu(h) * y, S = W0([1, 0], [(c - g) / o, (v - y) / s]), w = [(c - g) / o, (v - y) / s], x = [(-1 * c - g) / o, (-1 * v - y) / s], b = W0(w, x);
if (md(w, x) <= -1 && (b = ns), md(w, x) >= 1 && (b = 0), b < 0) {
var T = Math.round(b / ns * 1e6) / 1e6;
b = ns * 2 + T % 2 * ns;
}
f.addData(u, m, _, o, s, S, b, h, i);
}
var HN = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig, $N = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function WN(r) {
var e = new Jr();
if (!r)
return e;
var t = 0, n = 0, a = t, i = n, o, s = Jr.CMD, l = r.match(HN);
if (!l)
return e;
for (var u = 0; u < l.length; u++) {
for (var f = l[u], h = f.charAt(0), c = void 0, v = f.match($N) || [], p = v.length, d = 0; d < p; d++)
v[d] = parseFloat(v[d]);
for (var g = 0; g < p; ) {
var y = void 0, m = void 0, _ = void 0, S = void 0, w = void 0, x = void 0, b = void 0, T = t, D = n, A = void 0, M = void 0;
switch (h) {
case "l":
t += v[g++], n += v[g++], c = s.L, e.addData(c, t, n);
break;
case "L":
t = v[g++], n = v[g++], c = s.L, e.addData(c, t, n);
break;
case "m":
t += v[g++], n += v[g++], c = s.M, e.addData(c, t, n), a = t, i = n, h = "l";
break;
case "M":
t = v[g++], n = v[g++], c = s.M, e.addData(c, t, n), a = t, i = n, h = "L";
break;
case "h":
t += v[g++], c = s.L, e.addData(c, t, n);
break;
case "H":
t = v[g++], c = s.L, e.addData(c, t, n);
break;
case "v":
n += v[g++], c = s.L, e.addData(c, t, n);
break;
case "V":
n = v[g++], c = s.L, e.addData(c, t, n);
break;
case "C":
c = s.C, e.addData(c, v[g++], v[g++], v[g++], v[g++], v[g++], v[g++]), t = v[g - 2], n = v[g - 1];
break;
case "c":
c = s.C, e.addData(c, v[g++] + t, v[g++] + n, v[g++] + t, v[g++] + n, v[g++] + t, v[g++] + n), t += v[g - 2], n += v[g - 1];
break;
case "S":
y = t, m = n, A = e.len(), M = e.data, o === s.C && (y += t - M[A - 4], m += n - M[A - 3]), c = s.C, T = v[g++], D = v[g++], t = v[g++], n = v[g++], e.addData(c, y, m, T, D, t, n);
break;
case "s":
y = t, m = n, A = e.len(), M = e.data, o === s.C && (y += t - M[A - 4], m += n - M[A - 3]), c = s.C, T = t + v[g++], D = n + v[g++], t += v[g++], n += v[g++], e.addData(c, y, m, T, D, t, n);
break;
case "Q":
T = v[g++], D = v[g++], t = v[g++], n = v[g++], c = s.Q, e.addData(c, T, D, t, n);
break;
case "q":
T = v[g++] + t, D = v[g++] + n, t += v[g++], n += v[g++], c = s.Q, e.addData(c, T, D, t, n);
break;
case "T":
y = t, m = n, A = e.len(), M = e.data, o === s.Q && (y += t - M[A - 4], m += n - M[A - 3]), t = v[g++], n = v[g++], c = s.Q, e.addData(c, y, m, t, n);
break;
case "t":
y = t, m = n, A = e.len(), M = e.data, o === s.Q && (y += t - M[A - 4], m += n - M[A - 3]), t += v[g++], n += v[g++], c = s.Q, e.addData(c, y, m, t, n);
break;
case "A":
_ = v[g++], S = v[g++], w = v[g++], x = v[g++], b = v[g++], T = t, D = n, t = v[g++], n = v[g++], c = s.A, U0(T, D, t, n, x, b, _, S, w, c, e);
break;
case "a":
_ = v[g++], S = v[g++], w = v[g++], x = v[g++], b = v[g++], T = t, D = n, t += v[g++], n += v[g++], c = s.A, U0(T, D, t, n, x, b, _, S, w, c, e);
break;
}
}
(h === "z" || h === "Z") && (c = s.Z, e.addData(c), t = a, n = i), o = c;
}
return e.toStatic(), e;
}
var gC = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.applyTransform = function(t) {
}, e;
}(gt);
function yC(r) {
return r.setData != null;
}
function mC(r, e) {
var t = WN(r), n = B({}, e);
return n.buildPath = function(a) {
if (yC(a)) {
a.setData(t.data);
var i = a.getContext();
i && a.rebuildPath(i, 1);
} else {
var i = a;
t.rebuildPath(i, 1);
}
}, n.applyTransform = function(a) {
dC(t, a), this.dirtyShape();
}, n;
}
function _C(r, e) {
return new gC(mC(r, e));
}
function UN(r, e) {
var t = mC(r, e), n = function(a) {
R(i, a);
function i(o) {
var s = a.call(this, o) || this;
return s.applyTransform = t.applyTransform, s.buildPath = t.buildPath, s;
}
return i;
}(gC);
return n;
}
function YN(r, e) {
for (var t = [], n = r.length, a = 0; a < n; a++) {
var i = r[a];
t.push(i.getUpdatedPathProxy(!0));
}
var o = new gt(e);
return o.createPathProxy(), o.buildPath = function(s) {
if (yC(s)) {
s.appendPath(t);
var l = s.getContext();
l && s.rebuildPath(l, 1);
}
}, o;
}
function qg(r, e) {
e = e || {};
var t = new gt();
return r.shape && t.setShape(r.shape), t.setStyle(r.style), e.bakeTransform ? dC(t.path, r.getComputedTransform()) : e.toLocal ? t.setLocalTransform(r.getComputedTransform()) : t.copyTransform(r), t.buildPath = r.buildPath, t.applyTransform = t.applyTransform, t.z = r.z, t.z2 = r.z2, t.zlevel = r.zlevel, t;
}
var ZN = function() {
function r() {
this.cx = 0, this.cy = 0, this.r = 0;
}
return r;
}(), SC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new ZN();
}, e.prototype.buildPath = function(t, n) {
t.moveTo(n.cx + n.r, n.cy), t.arc(n.cx, n.cy, n.r, 0, Math.PI * 2);
}, e;
}(gt);
SC.prototype.type = "circle";
const Qr = SC;
var XN = function() {
function r() {
this.cx = 0, this.cy = 0, this.rx = 0, this.ry = 0;
}
return r;
}(), xC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new XN();
}, e.prototype.buildPath = function(t, n) {
var a = 0.5522848, i = n.cx, o = n.cy, s = n.rx, l = n.ry, u = s * a, f = l * a;
t.moveTo(i - s, o), t.bezierCurveTo(i - s, o - f, i - u, o - l, i, o - l), t.bezierCurveTo(i + u, o - l, i + s, o - f, i + s, o), t.bezierCurveTo(i + s, o + f, i + u, o + l, i, o + l), t.bezierCurveTo(i - u, o + l, i - s, o + f, i - s, o), t.closePath();
}, e;
}(gt);
xC.prototype.type = "ellipse";
const Kg = xC;
var wC = Math.PI, Uc = wC * 2, La = Math.sin, Oi = Math.cos, qN = Math.acos, de = Math.atan2, Y0 = Math.abs, Us = Math.sqrt, Ls = Math.max, kr = Math.min, gr = 1e-4;
function KN(r, e, t, n, a, i, o, s) {
var l = t - r, u = n - e, f = o - a, h = s - i, c = h * l - f * u;
if (!(c * c < gr))
return c = (f * (e - i) - h * (r - a)) / c, [r + c * l, e + c * u];
}
function uu(r, e, t, n, a, i, o) {
var s = r - t, l = e - n, u = (o ? i : -i) / Us(s * s + l * l), f = u * l, h = -u * s, c = r + f, v = e + h, p = t + f, d = n + h, g = (c + p) / 2, y = (v + d) / 2, m = p - c, _ = d - v, S = m * m + _ * _, w = a - i, x = c * d - p * v, b = (_ < 0 ? -1 : 1) * Us(Ls(0, w * w * S - x * x)), T = (x * _ - m * b) / S, D = (-x * m - _ * b) / S, A = (x * _ + m * b) / S, M = (-x * m + _ * b) / S, L = T - g, I = D - y, E = A - g, P = M - y;
return L * L + I * I > E * E + P * P && (T = A, D = M), {
cx: T,
cy: D,
x0: -f,
y0: -h,
x1: T * (a / w - 1),
y1: D * (a / w - 1)
};
}
function jN(r) {
var e;
if (z(r)) {
var t = r.length;
if (!t)
return r;
t === 1 ? e = [r[0], r[0], 0, 0] : t === 2 ? e = [r[0], r[0], r[1], r[1]] : t === 3 ? e = r.concat(r[2]) : e = r;
} else
e = [r, r, r, r];
return e;
}
function JN(r, e) {
var t, n = Ls(e.r, 0), a = Ls(e.r0 || 0, 0), i = n > 0, o = a > 0;
if (!(!i && !o)) {
if (i || (n = a, a = 0), a > n) {
var s = n;
n = a, a = s;
}
var l = e.startAngle, u = e.endAngle;
if (!(isNaN(l) || isNaN(u))) {
var f = e.cx, h = e.cy, c = !!e.clockwise, v = Y0(u - l), p = v > Uc && v % Uc;
if (p > gr && (v = p), !(n > gr))
r.moveTo(f, h);
else if (v > Uc - gr)
r.moveTo(f + n * Oi(l), h + n * La(l)), r.arc(f, h, n, l, u, !c), a > gr && (r.moveTo(f + a * Oi(u), h + a * La(u)), r.arc(f, h, a, u, l, c));
else {
var d = void 0, g = void 0, y = void 0, m = void 0, _ = void 0, S = void 0, w = void 0, x = void 0, b = void 0, T = void 0, D = void 0, A = void 0, M = void 0, L = void 0, I = void 0, E = void 0, P = n * Oi(l), N = n * La(l), O = a * Oi(u), k = a * La(u), V = v > gr;
if (V) {
var F = e.cornerRadius;
F && (t = jN(F), d = t[0], g = t[1], y = t[2], m = t[3]);
var $ = Y0(n - a) / 2;
if (_ = kr($, y), S = kr($, m), w = kr($, d), x = kr($, g), D = b = Ls(_, S), A = T = Ls(w, x), (b > gr || T > gr) && (M = n * Oi(u), L = n * La(u), I = a * Oi(l), E = a * La(l), v < wC)) {
var Z = KN(P, N, I, E, M, L, O, k);
if (Z) {
var et = P - Z[0], ht = N - Z[1], Lt = M - Z[0], At = L - Z[1], dt = 1 / La(qN((et * Lt + ht * At) / (Us(et * et + ht * ht) * Us(Lt * Lt + At * At))) / 2), rt = Us(Z[0] * Z[0] + Z[1] * Z[1]);
D = kr(b, (n - rt) / (dt + 1)), A = kr(T, (a - rt) / (dt - 1));
}
}
}
if (!V)
r.moveTo(f + P, h + N);
else if (D > gr) {
var yt = kr(y, D), ut = kr(m, D), X = uu(I, E, P, N, n, yt, c), ot = uu(M, L, O, k, n, ut, c);
r.moveTo(f + X.cx + X.x0, h + X.cy + X.y0), D < b && yt === ut ? r.arc(f + X.cx, h + X.cy, D, de(X.y0, X.x0), de(ot.y0, ot.x0), !c) : (yt > 0 && r.arc(f + X.cx, h + X.cy, yt, de(X.y0, X.x0), de(X.y1, X.x1), !c), r.arc(f, h, n, de(X.cy + X.y1, X.cx + X.x1), de(ot.cy + ot.y1, ot.cx + ot.x1), !c), ut > 0 && r.arc(f + ot.cx, h + ot.cy, ut, de(ot.y1, ot.x1), de(ot.y0, ot.x0), !c));
} else
r.moveTo(f + P, h + N), r.arc(f, h, n, l, u, !c);
if (!(a > gr) || !V)
r.lineTo(f + O, h + k);
else if (A > gr) {
var yt = kr(d, A), ut = kr(g, A), X = uu(O, k, M, L, a, -ut, c), ot = uu(P, N, I, E, a, -yt, c);
r.lineTo(f + X.cx + X.x0, h + X.cy + X.y0), A < T && yt === ut ? r.arc(f + X.cx, h + X.cy, A, de(X.y0, X.x0), de(ot.y0, ot.x0), !c) : (ut > 0 && r.arc(f + X.cx, h + X.cy, ut, de(X.y0, X.x0), de(X.y1, X.x1), !c), r.arc(f, h, a, de(X.cy + X.y1, X.cx + X.x1), de(ot.cy + ot.y1, ot.cx + ot.x1), c), yt > 0 && r.arc(f + ot.cx, h + ot.cy, yt, de(ot.y1, ot.x1), de(ot.y0, ot.x0), !c));
} else
r.lineTo(f + O, h + k), r.arc(f, h, a, u, l, c);
}
r.closePath();
}
}
}
var QN = function() {
function r() {
this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0, this.cornerRadius = 0;
}
return r;
}(), bC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new QN();
}, e.prototype.buildPath = function(t, n) {
JN(t, n);
}, e.prototype.isZeroArea = function() {
return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
}, e;
}(gt);
bC.prototype.type = "sector";
const Ve = bC;
var tR = function() {
function r() {
this.cx = 0, this.cy = 0, this.r = 0, this.r0 = 0;
}
return r;
}(), TC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new tR();
}, e.prototype.buildPath = function(t, n) {
var a = n.cx, i = n.cy, o = Math.PI * 2;
t.moveTo(a + n.r, i), t.arc(a, i, n.r, 0, o, !1), t.moveTo(a + n.r0, i), t.arc(a, i, n.r0, 0, o, !0);
}, e;
}(gt);
TC.prototype.type = "ring";
const Nh = TC;
function eR(r, e, t, n) {
var a = [], i = [], o = [], s = [], l, u, f, h;
if (n) {
f = [1 / 0, 1 / 0], h = [-1 / 0, -1 / 0];
for (var c = 0, v = r.length; c < v; c++)
Wn(f, f, r[c]), Un(h, h, r[c]);
Wn(f, f, n[0]), Un(h, h, n[1]);
}
for (var c = 0, v = r.length; c < v; c++) {
var p = r[c];
if (t)
l = r[c ? c - 1 : v - 1], u = r[(c + 1) % v];
else if (c === 0 || c === v - 1) {
a.push(hn(r[c]));
continue;
} else
l = r[c - 1], u = r[c + 1];
Ja(i, u, l), uc(i, i, e);
var d = $p(p, l), g = $p(p, u), y = d + g;
y !== 0 && (d /= y, g /= y), uc(o, i, -d), uc(s, i, g);
var m = Om([], p, o), _ = Om([], p, s);
n && (Un(m, m, f), Wn(m, m, h), Un(_, _, f), Wn(_, _, h)), a.push(m), a.push(_);
}
return t && a.push(a.shift()), a;
}
function CC(r, e, t) {
var n = e.smooth, a = e.points;
if (a && a.length >= 2) {
if (n) {
var i = eR(a, n, t, e.smoothConstraint);
r.moveTo(a[0][0], a[0][1]);
for (var o = a.length, s = 0; s < (t ? o : o - 1); s++) {
var l = i[s * 2], u = i[s * 2 + 1], f = a[(s + 1) % o];
r.bezierCurveTo(l[0], l[1], u[0], u[1], f[0], f[1]);
}
} else {
r.moveTo(a[0][0], a[0][1]);
for (var s = 1, h = a.length; s < h; s++)
r.lineTo(a[s][0], a[s][1]);
}
t && r.closePath();
}
}
var rR = function() {
function r() {
this.points = null, this.smooth = 0, this.smoothConstraint = null;
}
return r;
}(), DC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new rR();
}, e.prototype.buildPath = function(t, n) {
CC(t, n, !0);
}, e;
}(gt);
DC.prototype.type = "polygon";
const Be = DC;
var nR = function() {
function r() {
this.points = null, this.percent = 1, this.smooth = 0, this.smoothConstraint = null;
}
return r;
}(), AC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new nR();
}, e.prototype.buildPath = function(t, n) {
CC(t, n, !1);
}, e;
}(gt);
AC.prototype.type = "polyline";
const ze = AC;
var aR = {}, iR = function() {
function r() {
this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
}
return r;
}(), MC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new iR();
}, e.prototype.buildPath = function(t, n) {
var a, i, o, s;
if (this.subPixelOptimize) {
var l = tC(aR, n, this.style);
a = l.x1, i = l.y1, o = l.x2, s = l.y2;
} else
a = n.x1, i = n.y1, o = n.x2, s = n.y2;
var u = n.percent;
u !== 0 && (t.moveTo(a, i), u < 1 && (o = a * (1 - u) + o * u, s = i * (1 - u) + s * u), t.lineTo(o, s));
}, e.prototype.pointAt = function(t) {
var n = this.shape;
return [
n.x1 * (1 - t) + n.x2 * t,
n.y1 * (1 - t) + n.y2 * t
];
}, e;
}(gt);
MC.prototype.type = "line";
const oe = MC;
var Ee = [], oR = function() {
function r() {
this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.percent = 1;
}
return r;
}();
function Z0(r, e, t) {
var n = r.cpx2, a = r.cpy2;
return n != null || a != null ? [
(t ? Zm : re)(r.x1, r.cpx1, r.cpx2, r.x2, e),
(t ? Zm : re)(r.y1, r.cpy1, r.cpy2, r.y2, e)
] : [
(t ? qp : ie)(r.x1, r.cpx1, r.x2, e),
(t ? qp : ie)(r.y1, r.cpy1, r.y2, e)
];
}
var LC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new oR();
}, e.prototype.buildPath = function(t, n) {
var a = n.x1, i = n.y1, o = n.x2, s = n.y2, l = n.cpx1, u = n.cpy1, f = n.cpx2, h = n.cpy2, c = n.percent;
c !== 0 && (t.moveTo(a, i), f == null || h == null ? (c < 1 && (el(a, l, o, c, Ee), l = Ee[1], o = Ee[2], el(i, u, s, c, Ee), u = Ee[1], s = Ee[2]), t.quadraticCurveTo(l, u, o, s)) : (c < 1 && (na(a, l, f, o, c, Ee), l = Ee[1], f = Ee[2], o = Ee[3], na(i, u, h, s, c, Ee), u = Ee[1], h = Ee[2], s = Ee[3]), t.bezierCurveTo(l, u, f, h, o, s)));
}, e.prototype.pointAt = function(t) {
return Z0(this.shape, t, !1);
}, e.prototype.tangentAt = function(t) {
var n = Z0(this.shape, t, !0);
return Cl(n, n);
}, e;
}(gt);
LC.prototype.type = "bezier-curve";
const Rh = LC;
var sR = function() {
function r() {
this.cx = 0, this.cy = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
}
return r;
}(), IC = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new sR();
}, e.prototype.buildPath = function(t, n) {
var a = n.cx, i = n.cy, o = Math.max(n.r, 0), s = n.startAngle, l = n.endAngle, u = n.clockwise, f = Math.cos(s), h = Math.sin(s);
t.moveTo(f * o + a, h * o + i), t.arc(a, i, o, s, l, !u);
}, e;
}(gt);
IC.prototype.type = "arc";
const jg = IC;
var lR = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "compound", t;
}
return e.prototype._updatePathDirty = function() {
for (var t = this.shape.paths, n = this.shapeChanged(), a = 0; a < t.length; a++)
n = n || t[a].shapeChanged();
n && this.dirtyShape();
}, e.prototype.beforeBrush = function() {
this._updatePathDirty();
for (var t = this.shape.paths || [], n = this.getGlobalScale(), a = 0; a < t.length; a++)
t[a].path || t[a].createPathProxy(), t[a].path.setScale(n[0], n[1], t[a].segmentIgnoreThreshold);
}, e.prototype.buildPath = function(t, n) {
for (var a = n.paths || [], i = 0; i < a.length; i++)
a[i].buildPath(t, a[i].shape, !0);
}, e.prototype.afterBrush = function() {
for (var t = this.shape.paths || [], n = 0; n < t.length; n++)
t[n].pathUpdated();
}, e.prototype.getBoundingRect = function() {
return this._updatePathDirty.call(this), gt.prototype.getBoundingRect.call(this);
}, e;
}(gt);
const Jg = lR;
var uR = function() {
function r(e) {
this.colorStops = e || [];
}
return r.prototype.addColorStop = function(e, t) {
this.colorStops.push({
offset: e,
color: t
});
}, r;
}();
const EC = uR;
var fR = function(r) {
R(e, r);
function e(t, n, a, i, o, s) {
var l = r.call(this, o) || this;
return l.x = t == null ? 0 : t, l.y = n == null ? 0 : n, l.x2 = a == null ? 1 : a, l.y2 = i == null ? 0 : i, l.type = "linear", l.global = s || !1, l;
}
return e;
}(EC);
const Il = fR;
var hR = function(r) {
R(e, r);
function e(t, n, a, i, o) {
var s = r.call(this, i) || this;
return s.x = t == null ? 0.5 : t, s.y = n == null ? 0.5 : n, s.r = a == null ? 0.5 : a, s.type = "radial", s.global = o || !1, s;
}
return e;
}(EC);
const PC = hR;
var Ia = [0, 0], Ea = [0, 0], fu = new st(), hu = new st(), cR = function() {
function r(e, t) {
this._corners = [], this._axes = [], this._origin = [0, 0];
for (var n = 0; n < 4; n++)
this._corners[n] = new st();
for (var n = 0; n < 2; n++)
this._axes[n] = new st();
e && this.fromBoundingRect(e, t);
}
return r.prototype.fromBoundingRect = function(e, t) {
var n = this._corners, a = this._axes, i = e.x, o = e.y, s = i + e.width, l = o + e.height;
if (n[0].set(i, o), n[1].set(s, o), n[2].set(s, l), n[3].set(i, l), t)
for (var u = 0; u < 4; u++)
n[u].transform(t);
st.sub(a[0], n[1], n[0]), st.sub(a[1], n[3], n[0]), a[0].normalize(), a[1].normalize();
for (var u = 0; u < 2; u++)
this._origin[u] = a[u].dot(n[0]);
}, r.prototype.intersect = function(e, t) {
var n = !0, a = !t;
return fu.set(1 / 0, 1 / 0), hu.set(0, 0), !this._intersectCheckOneSide(this, e, fu, hu, a, 1) && (n = !1, a) || !this._intersectCheckOneSide(e, this, fu, hu, a, -1) && (n = !1, a) || a || st.copy(t, n ? fu : hu), n;
}, r.prototype._intersectCheckOneSide = function(e, t, n, a, i, o) {
for (var s = !0, l = 0; l < 2; l++) {
var u = this._axes[l];
if (this._getProjMinMaxOnAxis(l, e._corners, Ia), this._getProjMinMaxOnAxis(l, t._corners, Ea), Ia[1] < Ea[0] || Ia[0] > Ea[1]) {
if (s = !1, i)
return s;
var f = Math.abs(Ea[0] - Ia[1]), h = Math.abs(Ia[0] - Ea[1]);
Math.min(f, h) > a.len() && (f < h ? st.scale(a, u, -f * o) : st.scale(a, u, h * o));
} else if (n) {
var f = Math.abs(Ea[0] - Ia[1]), h = Math.abs(Ia[0] - Ea[1]);
Math.min(f, h) < n.len() && (f < h ? st.scale(n, u, f * o) : st.scale(n, u, -h * o));
}
}
return s;
}, r.prototype._getProjMinMaxOnAxis = function(e, t, n) {
for (var a = this._axes[e], i = this._origin, o = t[0].dot(a) + i[e], s = o, l = o, u = 1; u < t.length; u++) {
var f = t[u].dot(a) + i[e];
s = Math.min(f, s), l = Math.max(f, l);
}
n[0] = s, n[1] = l;
}, r;
}();
const If = cR;
var vR = [], pR = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.notClear = !0, t.incremental = !0, t._displayables = [], t._temporaryDisplayables = [], t._cursor = 0, t;
}
return e.prototype.traverse = function(t, n) {
t.call(n, this);
}, e.prototype.useStyle = function() {
this.style = {};
}, e.prototype.getCursor = function() {
return this._cursor;
}, e.prototype.innerAfterBrush = function() {
this._cursor = this._displayables.length;
}, e.prototype.clearDisplaybles = function() {
this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.markRedraw(), this.notClear = !1;
}, e.prototype.clearTemporalDisplayables = function() {
this._temporaryDisplayables = [];
}, e.prototype.addDisplayable = function(t, n) {
n ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.markRedraw();
}, e.prototype.addDisplayables = function(t, n) {
n = n || !1;
for (var a = 0; a < t.length; a++)
this.addDisplayable(t[a], n);
}, e.prototype.getDisplayables = function() {
return this._displayables;
}, e.prototype.getTemporalDisplayables = function() {
return this._temporaryDisplayables;
}, e.prototype.eachPendingDisplayable = function(t) {
for (var n = this._cursor; n < this._displayables.length; n++)
t && t(this._displayables[n]);
for (var n = 0; n < this._temporaryDisplayables.length; n++)
t && t(this._temporaryDisplayables[n]);
}, e.prototype.update = function() {
this.updateTransform();
for (var t = this._cursor; t < this._displayables.length; t++) {
var n = this._displayables[t];
n.parent = this, n.update(), n.parent = null;
}
for (var t = 0; t < this._temporaryDisplayables.length; t++) {
var n = this._temporaryDisplayables[t];
n.parent = this, n.update(), n.parent = null;
}
}, e.prototype.getBoundingRect = function() {
if (!this._rect) {
for (var t = new ft(1 / 0, 1 / 0, -1 / 0, -1 / 0), n = 0; n < this._displayables.length; n++) {
var a = this._displayables[n], i = a.getBoundingRect().clone();
a.needLocalTransform() && i.applyTransform(a.getLocalTransform(vR)), t.union(i);
}
this._rect = t;
}
return this._rect;
}, e.prototype.contain = function(t, n) {
var a = this.transformCoordToLocal(t, n), i = this.getBoundingRect();
if (i.contain(a[0], a[1]))
for (var o = 0; o < this._displayables.length; o++) {
var s = this._displayables[o];
if (s.contain(t, n))
return !0;
}
return !1;
}, e;
}(cr);
const dR = pR;
var NC = Tt();
function ko(r, e, t, n, a) {
var i;
if (e && e.ecModel) {
var o = e.ecModel.getUpdatePayload();
i = o && o.animation;
}
var s = e && e.isAnimationEnabled(), l = r === "update";
if (s) {
var u = void 0, f = void 0, h = void 0;
n ? (u = vt(n.duration, 200), f = vt(n.easing, "cubicOut"), h = 0) : (u = e.getShallow(l ? "animationDurationUpdate" : "animationDuration"), f = e.getShallow(l ? "animationEasingUpdate" : "animationEasing"), h = e.getShallow(l ? "animationDelayUpdate" : "animationDelay")), i && (i.duration != null && (u = i.duration), i.easing != null && (f = i.easing), i.delay != null && (h = i.delay)), q(h) && (h = h(t, a)), q(u) && (u = u(t));
var c = {
duration: u || 0,
delay: h,
easing: f
};
return c;
} else
return null;
}
function Qg(r, e, t, n, a, i, o) {
var s = !1, l;
q(a) ? (o = i, i = a, a = null) : j(a) && (i = a.cb, o = a.during, s = a.isFrom, l = a.removeOpt, a = a.dataIndex);
var u = r === "leave";
u || e.stopAnimation("leave");
var f = ko(r, n, a, u ? l || {} : null, n && n.getAnimationDelayParams ? n.getAnimationDelayParams(e, a) : null);
if (f && f.duration > 0) {
var h = f.duration, c = f.delay, v = f.easing, p = {
duration: h,
delay: c || 0,
easing: v,
done: i,
force: !!i || !!o,
setToFinal: !u,
scope: r,
during: o
};
s ? e.animateFrom(t, p) : e.animateTo(t, p);
} else
e.stopAnimation(), !s && e.attr(t), o && o(1), i && i();
}
function bt(r, e, t, n, a, i) {
Qg("update", r, e, t, n, a, i);
}
function Bt(r, e, t, n, a, i) {
Qg("enter", r, e, t, n, a, i);
}
function co(r) {
if (!r.__zr)
return !0;
for (var e = 0; e < r.animators.length; e++) {
var t = r.animators[e];
if (t.scope === "leave")
return !0;
}
return !1;
}
function ia(r, e, t, n, a, i) {
co(r) || Qg("leave", r, e, t, n, a, i);
}
function X0(r, e, t, n) {
r.removeTextContent(), r.removeTextGuideLine(), ia(r, {
style: {
opacity: 0
}
}, e, t, n);
}
function il(r, e, t) {
function n() {
r.parent && r.parent.remove(r);
}
r.isGroup ? r.traverse(function(a) {
a.isGroup || X0(a, e, t, n);
}) : X0(r, e, t, n);
}
function Lr(r) {
NC(r).oldStyle = r.style;
}
function gR(r) {
return NC(r).oldStyle;
}
var Ef = Math.max, Pf = Math.min, _d = {};
function yR(r) {
return gt.extend(r);
}
var mR = UN;
function _R(r, e) {
return mR(r, e);
}
function Ir(r, e) {
_d[r] = e;
}
function ty(r) {
if (_d.hasOwnProperty(r))
return _d[r];
}
function kh(r, e, t, n) {
var a = _C(r, e);
return t && (n === "center" && (t = kC(t, a.getBoundingRect())), OC(a, t)), a;
}
function RC(r, e, t) {
var n = new ve({
style: {
image: r,
x: e.x,
y: e.y,
width: e.width,
height: e.height
},
onload: function(a) {
if (t === "center") {
var i = {
width: a.width,
height: a.height
};
n.setStyle(kC(e, i));
}
}
});
return n;
}
function kC(r, e) {
var t = e.width / e.height, n = r.height * t, a;
n <= r.width ? a = r.height : (n = r.width, a = n / t);
var i = r.x + r.width / 2, o = r.y + r.height / 2;
return {
x: i - n / 2,
y: o - a / 2,
width: n,
height: a
};
}
var or = YN;
function OC(r, e) {
if (!!r.applyTransform) {
var t = r.getBoundingRect(), n = t.calculateTransform(e);
r.applyTransform(n);
}
}
function SR(r) {
return tC(r.shape, r.shape, r.style), r;
}
function xR(r) {
return eC(r.shape, r.shape, r.style), r;
}
var of = Qa;
function li(r, e) {
for (var t = bh([]); r && r !== e; )
vn(t, r.getLocalTransform(), t), r = r.parent;
return t;
}
function Dr(r, e, t) {
return e && !me(e) && (e = un.getLocalTransform(e)), t && (e = Po([], e)), ue([], r, e);
}
function Oh(r, e, t) {
var n = e[4] === 0 || e[5] === 0 || e[0] === 0 ? 1 : Math.abs(2 * e[4] / e[0]), a = e[4] === 0 || e[5] === 0 || e[2] === 0 ? 1 : Math.abs(2 * e[4] / e[2]), i = [r === "left" ? -n : r === "right" ? n : 0, r === "top" ? -a : r === "bottom" ? a : 0];
return i = Dr(i, e, t), Math.abs(i[0]) > Math.abs(i[1]) ? i[0] > 0 ? "right" : "left" : i[1] > 0 ? "bottom" : "top";
}
function q0(r) {
return !r.isGroup;
}
function wR(r) {
return r.shape != null;
}
function El(r, e, t) {
if (!r || !e)
return;
function n(o) {
var s = {};
return o.traverse(function(l) {
q0(l) && l.anid && (s[l.anid] = l);
}), s;
}
function a(o) {
var s = {
x: o.x,
y: o.y,
rotation: o.rotation
};
return wR(o) && (s.shape = B({}, o.shape)), s;
}
var i = n(r);
e.traverse(function(o) {
if (q0(o) && o.anid) {
var s = i[o.anid];
if (s) {
var l = a(o);
o.attr(a(s)), bt(o, l, t, at(o).dataIndex);
}
}
});
}
function VC(r, e) {
return G(r, function(t) {
var n = t[0];
n = Ef(n, e.x), n = Pf(n, e.x + e.width);
var a = t[1];
return a = Ef(a, e.y), a = Pf(a, e.y + e.height), [n, a];
});
}
function bR(r, e) {
var t = Ef(r.x, e.x), n = Pf(r.x + r.width, e.x + e.width), a = Ef(r.y, e.y), i = Pf(r.y + r.height, e.y + e.height);
if (n >= t && i >= a)
return {
x: t,
y: a,
width: n - t,
height: i - a
};
}
function Pl(r, e, t) {
var n = B({
rectHover: !0
}, e), a = n.style = {
strokeNoScale: !0
};
if (t = t || {
x: -1,
y: -1,
width: 2,
height: 2
}, r)
return r.indexOf("image://") === 0 ? (a.image = r.slice(8), J(a, t), new ve(n)) : kh(r.replace("path://", ""), n, t, "center");
}
function Is(r, e, t, n, a) {
for (var i = 0, o = a[a.length - 1]; i < a.length; i++) {
var s = a[i];
if (BC(r, e, t, n, s[0], s[1], o[0], o[1]))
return !0;
o = s;
}
}
function BC(r, e, t, n, a, i, o, s) {
var l = t - r, u = n - e, f = o - a, h = s - i, c = Yc(f, h, l, u);
if (TR(c))
return !1;
var v = r - a, p = e - i, d = Yc(v, p, l, u) / c;
if (d < 0 || d > 1)
return !1;
var g = Yc(v, p, f, h) / c;
return !(g < 0 || g > 1);
}
function Yc(r, e, t, n) {
return r * n - t * e;
}
function TR(r) {
return r <= 1e-6 && r >= -1e-6;
}
function Oo(r) {
var e = r.itemTooltipOption, t = r.componentModel, n = r.itemName, a = W(e) ? {
formatter: e
} : e, i = t.mainType, o = t.componentIndex, s = {
componentType: i,
name: n,
$vars: ["name"]
};
s[i + "Index"] = o;
var l = r.formatterParamsExtra;
l && C(mt(l), function(f) {
U(s, f) || (s[f] = l[f], s.$vars.push(f));
});
var u = at(r.el);
u.componentMainType = i, u.componentIndex = o, u.tooltipConfig = {
name: n,
option: J({
content: n,
formatterParams: s
}, a)
};
}
function K0(r, e) {
var t;
r.isGroup && (t = e(r)), t || r.traverse(e);
}
function ca(r, e) {
if (r)
if (z(r))
for (var t = 0; t < r.length; t++)
K0(r[t], e);
else
K0(r, e);
}
Ir("circle", Qr);
Ir("ellipse", Kg);
Ir("sector", Ve);
Ir("ring", Nh);
Ir("polygon", Be);
Ir("polyline", ze);
Ir("rect", xt);
Ir("line", oe);
Ir("bezierCurve", Rh);
Ir("arc", jg);
const Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
updateProps: bt,
initProps: Bt,
removeElement: ia,
removeElementWithFadeOut: il,
isElementRemoved: co,
extendShape: yR,
extendPath: _R,
registerShape: Ir,
getShapeClass: ty,
makePath: kh,
makeImage: RC,
mergePath: or,
resizePath: OC,
subPixelOptimizeLine: SR,
subPixelOptimizeRect: xR,
subPixelOptimize: of,
getTransform: li,
applyTransform: Dr,
transformDirection: Oh,
groupTransition: El,
clipPointsByRect: VC,
clipRectByRect: bR,
createIcon: Pl,
linePolygonIntersect: Is,
lineLineIntersect: BC,
setTooltipConfig: Oo,
traverseElements: ca,
Group: nt,
Image: ve,
Text: Ct,
Circle: Qr,
Ellipse: Kg,
Sector: Ve,
Ring: Nh,
Polygon: Be,
Polyline: ze,
Rect: xt,
Line: oe,
BezierCurve: Rh,
Arc: jg,
IncrementalDisplayable: dR,
CompoundPath: Jg,
LinearGradient: Il,
RadialGradient: PC,
BoundingRect: ft,
OrientedBoundingRect: If,
Point: st,
Path: gt
}, Symbol.toStringTag, { value: "Module" }));
var Vh = {};
function zC(r, e) {
for (var t = 0; t < Le.length; t++) {
var n = Le[t], a = e[n], i = r.ensureState(n);
i.style = i.style || {}, i.style.text = a;
}
var o = r.currentStates.slice();
r.clearStates(!0), r.setStyle({
text: e.normal
}), r.useStates(o, !0);
}
function Sd(r, e, t) {
var n = r.labelFetcher, a = r.labelDataIndex, i = r.labelDimIndex, o = e.normal, s;
n && (s = n.getFormattedLabel(a, "normal", null, i, o && o.get("formatter"), t != null ? {
interpolatedValue: t
} : null)), s == null && (s = q(r.defaultText) ? r.defaultText(a, r, t) : r.defaultText);
for (var l = {
normal: s
}, u = 0; u < Le.length; u++) {
var f = Le[u], h = e[f];
l[f] = vt(n ? n.getFormattedLabel(a, f, null, i, h && h.get("formatter")) : null, s);
}
return l;
}
function xe(r, e, t, n) {
t = t || Vh;
for (var a = r instanceof Ct, i = !1, o = 0; o < al.length; o++) {
var s = e[al[o]];
if (s && s.getShallow("show")) {
i = !0;
break;
}
}
var l = a ? r : r.getTextContent();
if (i) {
a || (l || (l = new Ct(), r.setTextContent(l)), r.stateProxy && (l.stateProxy = r.stateProxy));
var u = Sd(t, e), f = e.normal, h = !!f.getShallow("show"), c = zt(f, n && n.normal, t, !1, !a);
c.text = u.normal, a || r.setTextConfig(Nf(f, t, !1));
for (var o = 0; o < Le.length; o++) {
var v = Le[o], s = e[v];
if (s) {
var p = l.ensureState(v), d = !!vt(s.getShallow("show"), h);
if (d !== h && (p.ignore = !d), p.style = zt(s, n && n[v], t, !0, !a), p.style.text = u[v], !a) {
var g = r.ensureState(v);
g.textConfig = Nf(s, t, !0);
}
}
}
l.silent = !!f.getShallow("silent"), l.style.x != null && (c.x = l.style.x), l.style.y != null && (c.y = l.style.y), l.ignore = !h, l.useStyle(c), l.dirty(), t.enableTextSetter && (Vo(l).setLabelText = function(y) {
var m = Sd(t, e, y);
zC(l, m);
});
} else
l && (l.ignore = !0);
r.dirty();
}
function se(r, e) {
e = e || "label";
for (var t = {
normal: r.getModel(e)
}, n = 0; n < Le.length; n++) {
var a = Le[n];
t[a] = r.getModel([a, e]);
}
return t;
}
function zt(r, e, t, n, a) {
var i = {};
return CR(i, r, t, n, a), e && B(i, e), i;
}
function Nf(r, e, t) {
e = e || {};
var n = {}, a, i = r.getShallow("rotate"), o = vt(r.getShallow("distance"), t ? null : 5), s = r.getShallow("offset");
return a = r.getShallow("position") || (t ? null : "inside"), a === "outside" && (a = e.defaultOutsidePosition || "top"), a != null && (n.position = a), s != null && (n.offset = s), i != null && (i *= Math.PI / 180, n.rotation = i), o != null && (n.distance = o), n.outsideFill = r.get("color") === "inherit" ? e.inheritColor || null : "auto", n;
}
function CR(r, e, t, n, a) {
t = t || Vh;
var i = e.ecModel, o = i && i.option.textStyle, s = DR(e), l;
if (s) {
l = {};
for (var u in s)
if (s.hasOwnProperty(u)) {
var f = e.getModel(["rich", u]);
t_(l[u] = {}, f, o, t, n, a, !1, !0);
}
}
l && (r.rich = l);
var h = e.get("overflow");
h && (r.overflow = h);
var c = e.get("minMargin");
c != null && (r.margin = c), t_(r, e, o, t, n, a, !0, !1);
}
function DR(r) {
for (var e; r && r !== r.ecModel; ) {
var t = (r.option || Vh).rich;
if (t) {
e = e || {};
for (var n = mt(t), a = 0; a < n.length; a++) {
var i = n[a];
e[i] = 1;
}
}
r = r.parentModel;
}
return e;
}
var j0 = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], J0 = ["align", "lineHeight", "width", "height", "tag", "verticalAlign"], Q0 = ["padding", "borderWidth", "borderRadius", "borderDashOffset", "backgroundColor", "borderColor", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
function t_(r, e, t, n, a, i, o, s) {
t = !a && t || Vh;
var l = n && n.inheritColor, u = e.getShallow("color"), f = e.getShallow("textBorderColor"), h = vt(e.getShallow("opacity"), t.opacity);
(u === "inherit" || u === "auto") && (process.env.NODE_ENV !== "production" && u === "auto" && Xt("color: 'auto'", "color: 'inherit'"), l ? u = l : u = null), (f === "inherit" || f === "auto") && (process.env.NODE_ENV !== "production" && f === "auto" && Xt("color: 'auto'", "color: 'inherit'"), l ? f = l : f = null), i || (u = u || t.color, f = f || t.textBorderColor), u != null && (r.fill = u), f != null && (r.stroke = f);
var c = vt(e.getShallow("textBorderWidth"), t.textBorderWidth);
c != null && (r.lineWidth = c);
var v = vt(e.getShallow("textBorderType"), t.textBorderType);
v != null && (r.lineDash = v);
var p = vt(e.getShallow("textBorderDashOffset"), t.textBorderDashOffset);
p != null && (r.lineDashOffset = p), !a && h == null && !s && (h = n && n.defaultOpacity), h != null && (r.opacity = h), !a && !i && r.fill == null && n.inheritColor && (r.fill = n.inheritColor);
for (var d = 0; d < j0.length; d++) {
var g = j0[d], y = vt(e.getShallow(g), t[g]);
y != null && (r[g] = y);
}
for (var d = 0; d < J0.length; d++) {
var g = J0[d], y = e.getShallow(g);
y != null && (r[g] = y);
}
if (r.verticalAlign == null) {
var m = e.getShallow("baseline");
m != null && (r.verticalAlign = m);
}
if (!o || !n.disableBox) {
for (var d = 0; d < Q0.length; d++) {
var g = Q0[d], y = e.getShallow(g);
y != null && (r[g] = y);
}
var _ = e.getShallow("borderType");
_ != null && (r.borderDash = _), (r.backgroundColor === "auto" || r.backgroundColor === "inherit") && l && (process.env.NODE_ENV !== "production" && r.backgroundColor === "auto" && Xt("backgroundColor: 'auto'", "backgroundColor: 'inherit'"), r.backgroundColor = l), (r.borderColor === "auto" || r.borderColor === "inherit") && l && (process.env.NODE_ENV !== "production" && r.borderColor === "auto" && Xt("borderColor: 'auto'", "borderColor: 'inherit'"), r.borderColor = l);
}
}
function GC(r, e) {
var t = e && e.getModel("textStyle");
return xr([
r.fontStyle || t && t.getShallow("fontStyle") || "",
r.fontWeight || t && t.getShallow("fontWeight") || "",
(r.fontSize || t && t.getShallow("fontSize") || 12) + "px",
r.fontFamily || t && t.getShallow("fontFamily") || "sans-serif"
].join(" "));
}
var Vo = Tt();
function FC(r, e, t, n) {
if (!!r) {
var a = Vo(r);
a.prevValue = a.value, a.value = t;
var i = e.normal;
a.valueAnimation = i.get("valueAnimation"), a.valueAnimation && (a.precision = i.get("precision"), a.defaultInterpolatedText = n, a.statesModels = e);
}
}
function HC(r, e, t, n, a) {
var i = Vo(r);
if (!i.valueAnimation || i.prevValue === i.value)
return;
var o = i.defaultInterpolatedText, s = vt(i.interpolatedValue, i.prevValue), l = i.value;
function u(f) {
var h = $T(t, i.precision, s, l, f);
i.interpolatedValue = f === 1 ? null : h;
var c = Sd({
labelDataIndex: e,
labelFetcher: a,
defaultText: o ? o(h) : h + ""
}, i.statesModels, h);
zC(r, c);
}
r.percent = 0, (i.prevValue == null ? Bt : bt)(r, {
percent: 1
}, n, e, null, u);
}
var AR = ["textStyle", "color"], Zc = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "padding", "lineHeight", "rich", "width", "height", "overflow"], Xc = new Ct(), MR = function() {
function r() {
}
return r.prototype.getTextColor = function(e) {
var t = this.ecModel;
return this.getShallow("color") || (!e && t ? t.get(AR) : null);
}, r.prototype.getFont = function() {
return GC({
fontStyle: this.getShallow("fontStyle"),
fontWeight: this.getShallow("fontWeight"),
fontSize: this.getShallow("fontSize"),
fontFamily: this.getShallow("fontFamily")
}, this.ecModel);
}, r.prototype.getTextRect = function(e) {
for (var t = {
text: e,
verticalAlign: this.getShallow("verticalAlign") || this.getShallow("baseline")
}, n = 0; n < Zc.length; n++)
t[Zc[n]] = this.getShallow(Zc[n]);
return Xc.useStyle(t), Xc.update(), Xc.getBoundingRect();
}, r;
}();
const LR = MR;
var $C = [
["lineWidth", "width"],
["stroke", "color"],
["opacity"],
["shadowBlur"],
["shadowOffsetX"],
["shadowOffsetY"],
["shadowColor"],
["lineDash", "type"],
["lineDashOffset", "dashOffset"],
["lineCap", "cap"],
["lineJoin", "join"],
["miterLimit"]
], IR = gi($C), ER = function() {
function r() {
}
return r.prototype.getLineStyle = function(e) {
return IR(this, e);
}, r;
}(), WC = [
["fill", "color"],
["stroke", "borderColor"],
["lineWidth", "borderWidth"],
["opacity"],
["shadowBlur"],
["shadowOffsetX"],
["shadowOffsetY"],
["shadowColor"],
["lineDash", "borderType"],
["lineDashOffset", "borderDashOffset"],
["lineCap", "borderCap"],
["lineJoin", "borderJoin"],
["miterLimit", "borderMiterLimit"]
], PR = gi(WC), NR = function() {
function r() {
}
return r.prototype.getItemStyle = function(e, t) {
return PR(this, e, t);
}, r;
}(), Ti = function() {
function r(e, t, n) {
this.parentModel = t, this.ecModel = n, this.option = e;
}
return r.prototype.init = function(e, t, n) {
}, r.prototype.mergeOption = function(e, t) {
lt(this.option, e, !0);
}, r.prototype.get = function(e, t) {
return e == null ? this.option : this._doGet(this.parsePath(e), !t && this.parentModel);
}, r.prototype.getShallow = function(e, t) {
var n = this.option, a = n == null ? n : n[e];
if (a == null && !t) {
var i = this.parentModel;
i && (a = i.getShallow(e));
}
return a;
}, r.prototype.getModel = function(e, t) {
var n = e != null, a = n ? this.parsePath(e) : null, i = n ? this._doGet(a) : this.option;
return t = t || this.parentModel && this.parentModel.getModel(this.resolveParentPath(a)), new r(i, t, this.ecModel);
}, r.prototype.isEmpty = function() {
return this.option == null;
}, r.prototype.restoreData = function() {
}, r.prototype.clone = function() {
var e = this.constructor;
return new e(tt(this.option));
}, r.prototype.parsePath = function(e) {
return typeof e == "string" ? e.split(".") : e;
}, r.prototype.resolveParentPath = function(e) {
return e;
}, r.prototype.isAnimationEnabled = function() {
if (!Dt.node && this.option) {
if (this.option.animation != null)
return !!this.option.animation;
if (this.parentModel)
return this.parentModel.isAnimationEnabled();
}
}, r.prototype._doGet = function(e, t) {
var n = this.option;
if (!e)
return n;
for (var a = 0; a < e.length && !(!!e[a] && (n = n && typeof n == "object" ? n[e[a]] : null, n == null)); a++)
;
return n == null && t && (n = t._doGet(this.resolveParentPath(e), t.parentModel)), n;
}, r;
}();
Hg(Ti);
PP(Ti);
Qt(Ti, ER);
Qt(Ti, NR);
Qt(Ti, VP);
Qt(Ti, LR);
const kt = Ti;
var RR = Math.round(Math.random() * 10);
function Bo(r) {
return [r || "", RR++].join("_");
}
function kR(r) {
var e = {};
r.registerSubTypeDefaulter = function(t, n) {
var a = $r(t);
e[a.main] = n;
}, r.determineSubType = function(t, n) {
var a = n.type;
if (!a) {
var i = $r(t).main;
r.hasSubTypes(t) && e[i] && (a = e[i](n));
}
return a;
};
}
function OR(r, e) {
r.topologicalTravel = function(i, o, s, l) {
if (!i.length)
return;
var u = t(o), f = u.graph, h = u.noEntryList, c = {};
for (C(i, function(m) {
c[m] = !0;
}); h.length; ) {
var v = h.pop(), p = f[v], d = !!c[v];
d && (s.call(l, v, p.originalDeps.slice()), delete c[v]), C(p.successor, d ? y : g);
}
C(c, function() {
var m = "";
throw process.env.NODE_ENV !== "production" && (m = Me("Circular dependency may exists: ", c, i, o)), new Error(m);
});
function g(m) {
f[m].entryCount--, f[m].entryCount === 0 && h.push(m);
}
function y(m) {
c[m] = !0, g(m);
}
};
function t(i) {
var o = {}, s = [];
return C(i, function(l) {
var u = n(o, l), f = u.originalDeps = e(l), h = a(f, i);
u.entryCount = h.length, u.entryCount === 0 && s.push(l), C(h, function(c) {
ct(u.predecessor, c) < 0 && u.predecessor.push(c);
var v = n(o, c);
ct(v.successor, c) < 0 && v.successor.push(l);
});
}), {
graph: o,
noEntryList: s
};
}
function n(i, o) {
return i[o] || (i[o] = {
predecessor: [],
successor: []
}), i[o];
}
function a(i, o) {
var s = [];
return C(i, function(l) {
ct(o, l) >= 0 && s.push(l);
}), s;
}
}
function va(r, e) {
return lt(lt({}, r, !0), e, !0);
}
const VR = {
time: {
month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
dayOfWeekAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
},
legend: {
selector: {
all: "All",
inverse: "Inv"
}
},
toolbox: {
brush: {
title: {
rect: "Box Select",
polygon: "Lasso Select",
lineX: "Horizontally Select",
lineY: "Vertically Select",
keep: "Keep Selections",
clear: "Clear Selections"
}
},
dataView: {
title: "Data View",
lang: ["Data View", "Close", "Refresh"]
},
dataZoom: {
title: {
zoom: "Zoom",
back: "Zoom Reset"
}
},
magicType: {
title: {
line: "Switch to Line Chart",
bar: "Switch to Bar Chart",
stack: "Stack",
tiled: "Tile"
}
},
restore: {
title: "Restore"
},
saveAsImage: {
title: "Save as Image",
lang: ["Right Click to Save Image"]
}
},
series: {
typeNames: {
pie: "Pie chart",
bar: "Bar chart",
line: "Line chart",
scatter: "Scatter plot",
effectScatter: "Ripple scatter plot",
radar: "Radar chart",
tree: "Tree",
treemap: "Treemap",
boxplot: "Boxplot",
candlestick: "Candlestick",
k: "K line chart",
heatmap: "Heat map",
map: "Map",
parallel: "Parallel coordinate map",
lines: "Line graph",
graph: "Relationship graph",
sankey: "Sankey diagram",
funnel: "Funnel chart",
gauge: "Gauge",
pictorialBar: "Pictorial bar",
themeRiver: "Theme River Map",
sunburst: "Sunburst"
}
},
aria: {
general: {
withTitle: 'This is a chart about "{title}"',
withoutTitle: "This is a chart"
},
series: {
single: {
prefix: "",
withName: " with type {seriesType} named {seriesName}.",
withoutName: " with type {seriesType}."
},
multiple: {
prefix: ". It consists of {seriesCount} series count.",
withName: " The {seriesId} series is a {seriesType} representing {seriesName}.",
withoutName: " The {seriesId} series is a {seriesType}.",
separator: {
middle: "",
end: ""
}
}
},
data: {
allData: "The data is as follows: ",
partialData: "The first {displayCnt} items are: ",
withName: "the data for {name} is {value}",
withoutName: "{value}",
separator: {
middle: ", ",
end: ". "
}
}
}
}, BR = {
time: {
month: ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"],
monthAbbr: ["1\u6708", "2\u6708", "3\u6708", "4\u6708", "5\u6708", "6\u6708", "7\u6708", "8\u6708", "9\u6708", "10\u6708", "11\u6708", "12\u6708"],
dayOfWeek: ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"],
dayOfWeekAbbr: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"]
},
legend: {
selector: {
all: "\u5168\u9009",
inverse: "\u53CD\u9009"
}
},
toolbox: {
brush: {
title: {
rect: "\u77E9\u5F62\u9009\u62E9",
polygon: "\u5708\u9009",
lineX: "\u6A2A\u5411\u9009\u62E9",
lineY: "\u7EB5\u5411\u9009\u62E9",
keep: "\u4FDD\u6301\u9009\u62E9",
clear: "\u6E05\u9664\u9009\u62E9"
}
},
dataView: {
title: "\u6570\u636E\u89C6\u56FE",
lang: ["\u6570\u636E\u89C6\u56FE", "\u5173\u95ED", "\u5237\u65B0"]
},
dataZoom: {
title: {
zoom: "\u533A\u57DF\u7F29\u653E",
back: "\u533A\u57DF\u7F29\u653E\u8FD8\u539F"
}
},
magicType: {
title: {
line: "\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",
bar: "\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",
stack: "\u5207\u6362\u4E3A\u5806\u53E0",
tiled: "\u5207\u6362\u4E3A\u5E73\u94FA"
}
},
restore: {
title: "\u8FD8\u539F"
},
saveAsImage: {
title: "\u4FDD\u5B58\u4E3A\u56FE\u7247",
lang: ["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]
}
},
series: {
typeNames: {
pie: "\u997C\u56FE",
bar: "\u67F1\u72B6\u56FE",
line: "\u6298\u7EBF\u56FE",
scatter: "\u6563\u70B9\u56FE",
effectScatter: "\u6D9F\u6F2A\u6563\u70B9\u56FE",
radar: "\u96F7\u8FBE\u56FE",
tree: "\u6811\u56FE",
treemap: "\u77E9\u5F62\u6811\u56FE",
boxplot: "\u7BB1\u578B\u56FE",
candlestick: "K\u7EBF\u56FE",
k: "K\u7EBF\u56FE",
heatmap: "\u70ED\u529B\u56FE",
map: "\u5730\u56FE",
parallel: "\u5E73\u884C\u5750\u6807\u56FE",
lines: "\u7EBF\u56FE",
graph: "\u5173\u7CFB\u56FE",
sankey: "\u6851\u57FA\u56FE",
funnel: "\u6F0F\u6597\u56FE",
gauge: "\u4EEA\u8868\u76D8\u56FE",
pictorialBar: "\u8C61\u5F62\u67F1\u56FE",
themeRiver: "\u4E3B\u9898\u6CB3\u6D41\u56FE",
sunburst: "\u65ED\u65E5\u56FE"
}
},
aria: {
general: {
withTitle: "\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",
withoutTitle: "\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"
},
series: {
single: {
prefix: "",
withName: "\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",
withoutName: "\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"
},
multiple: {
prefix: "\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",
withName: "\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",
withoutName: "\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",
separator: {
middle: "\uFF1B",
end: "\u3002"
}
}
},
data: {
allData: "\u5176\u6570\u636E\u662F\u2014\u2014",
partialData: "\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",
withName: "{name}\u7684\u6570\u636E\u662F{value}",
withoutName: "{value}",
separator: {
middle: "\uFF0C",
end: ""
}
}
}
};
var Rf = "ZH", ey = "EN", ol = ey, sf = {}, ry = {}, UC = Dt.domSupported ? function() {
var r = (document.documentElement.lang || navigator.language || navigator.browserLanguage).toUpperCase();
return r.indexOf(Rf) > -1 ? Rf : ol;
}() : ol;
function YC(r, e) {
r = r.toUpperCase(), ry[r] = new kt(e), sf[r] = e;
}
function zR(r) {
if (W(r)) {
var e = sf[r.toUpperCase()] || {};
return r === Rf || r === ey ? tt(e) : lt(tt(e), tt(sf[ol]), !1);
} else
return lt(tt(r), tt(sf[ol]), !1);
}
function xd(r) {
return ry[r];
}
function GR() {
return ry[ol];
}
YC(ey, VR);
YC(Rf, BR);
var ny = 1e3, ay = ny * 60, Ys = ay * 60, sr = Ys * 24, e_ = sr * 365, Es = {
year: "{yyyy}",
month: "{MMM}",
day: "{d}",
hour: "{HH}:{mm}",
minute: "{HH}:{mm}",
second: "{HH}:{mm}:{ss}",
millisecond: "{HH}:{mm}:{ss} {SSS}",
none: "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"
}, cu = "{yyyy}-{MM}-{dd}", r_ = {
year: "{yyyy}",
month: "{yyyy}-{MM}",
day: cu,
hour: cu + " " + Es.hour,
minute: cu + " " + Es.minute,
second: cu + " " + Es.second,
millisecond: Es.none
}, qc = ["year", "month", "day", "hour", "minute", "second", "millisecond"], ZC = ["year", "half-year", "quarter", "month", "week", "half-week", "day", "half-day", "quarter-day", "hour", "minute", "second", "millisecond"];
function Pa(r, e) {
return r += "", "0000".substr(0, e - r.length) + r;
}
function vo(r) {
switch (r) {
case "half-year":
case "quarter":
return "month";
case "week":
case "half-week":
return "day";
case "half-day":
case "quarter-day":
return "hour";
default:
return r;
}
}
function FR(r) {
return r === vo(r);
}
function HR(r) {
switch (r) {
case "year":
case "month":
return "day";
case "millisecond":
return "millisecond";
default:
return "second";
}
}
function Bh(r, e, t, n) {
var a = jr(r), i = a[iy(t)](), o = a[po(t)]() + 1, s = Math.floor((o - 1) / 3) + 1, l = a[zh(t)](), u = a["get" + (t ? "UTC" : "") + "Day"](), f = a[sl(t)](), h = (f - 1) % 12 + 1, c = a[Gh(t)](), v = a[Fh(t)](), p = a[Hh(t)](), d = n instanceof kt ? n : xd(n || UC) || GR(), g = d.getModel("time"), y = g.get("month"), m = g.get("monthAbbr"), _ = g.get("dayOfWeek"), S = g.get("dayOfWeekAbbr");
return (e || "").replace(/{yyyy}/g, i + "").replace(/{yy}/g, i % 100 + "").replace(/{Q}/g, s + "").replace(/{MMMM}/g, y[o - 1]).replace(/{MMM}/g, m[o - 1]).replace(/{MM}/g, Pa(o, 2)).replace(/{M}/g, o + "").replace(/{dd}/g, Pa(l, 2)).replace(/{d}/g, l + "").replace(/{eeee}/g, _[u]).replace(/{ee}/g, S[u]).replace(/{e}/g, u + "").replace(/{HH}/g, Pa(f, 2)).replace(/{H}/g, f + "").replace(/{hh}/g, Pa(h + "", 2)).replace(/{h}/g, h + "").replace(/{mm}/g, Pa(c, 2)).replace(/{m}/g, c + "").replace(/{ss}/g, Pa(v, 2)).replace(/{s}/g, v + "").replace(/{SSS}/g, Pa(p, 3)).replace(/{S}/g, p + "");
}
function $R(r, e, t, n, a) {
var i = null;
if (W(t))
i = t;
else if (q(t))
i = t(r.value, e, {
level: r.level
});
else {
var o = B({}, Es);
if (r.level > 0)
for (var s = 0; s < qc.length; ++s)
o[qc[s]] = "{primary|" + o[qc[s]] + "}";
var l = t ? t.inherit === !1 ? t : J(t, o) : o, u = XC(r.value, a);
if (l[u])
i = l[u];
else if (l.inherit) {
for (var f = ZC.indexOf(u), s = f - 1; s >= 0; --s)
if (l[u]) {
i = l[u];
break;
}
i = i || o.none;
}
if (z(i)) {
var h = r.level == null ? 0 : r.level >= 0 ? r.level : i.length + r.level;
h = Math.min(h, i.length - 1), i = i[h];
}
}
return Bh(new Date(r.value), i, a, n);
}
function XC(r, e) {
var t = jr(r), n = t[po(e)]() + 1, a = t[zh(e)](), i = t[sl(e)](), o = t[Gh(e)](), s = t[Fh(e)](), l = t[Hh(e)](), u = l === 0, f = u && s === 0, h = f && o === 0, c = h && i === 0, v = c && a === 1, p = v && n === 1;
return p ? "year" : v ? "month" : c ? "day" : h ? "hour" : f ? "minute" : u ? "second" : "millisecond";
}
function n_(r, e, t) {
var n = wt(r) ? jr(r) : r;
switch (e = e || XC(r, t), e) {
case "year":
return n[iy(t)]();
case "half-year":
return n[po(t)]() >= 6 ? 1 : 0;
case "quarter":
return Math.floor((n[po(t)]() + 1) / 4);
case "month":
return n[po(t)]();
case "day":
return n[zh(t)]();
case "half-day":
return n[sl(t)]() / 24;
case "hour":
return n[sl(t)]();
case "minute":
return n[Gh(t)]();
case "second":
return n[Fh(t)]();
case "millisecond":
return n[Hh(t)]();
}
}
function iy(r) {
return r ? "getUTCFullYear" : "getFullYear";
}
function po(r) {
return r ? "getUTCMonth" : "getMonth";
}
function zh(r) {
return r ? "getUTCDate" : "getDate";
}
function sl(r) {
return r ? "getUTCHours" : "getHours";
}
function Gh(r) {
return r ? "getUTCMinutes" : "getMinutes";
}
function Fh(r) {
return r ? "getUTCSeconds" : "getSeconds";
}
function Hh(r) {
return r ? "getUTCMilliseconds" : "getMilliseconds";
}
function WR(r) {
return r ? "setUTCFullYear" : "setFullYear";
}
function qC(r) {
return r ? "setUTCMonth" : "setMonth";
}
function KC(r) {
return r ? "setUTCDate" : "setDate";
}
function jC(r) {
return r ? "setUTCHours" : "setHours";
}
function JC(r) {
return r ? "setUTCMinutes" : "setMinutes";
}
function QC(r) {
return r ? "setUTCSeconds" : "setSeconds";
}
function tD(r) {
return r ? "setUTCMilliseconds" : "setMilliseconds";
}
function eD(r) {
if (!zg(r))
return W(r) ? r : "-";
var e = (r + "").split(".");
return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (e.length > 1 ? "." + e[1] : "");
}
function rD(r, e) {
return r = (r || "").toLowerCase().replace(/-(.)/g, function(t, n) {
return n.toUpperCase();
}), e && r && (r = r.charAt(0).toUpperCase() + r.slice(1)), r;
}
var zo = Pg, UR = /([&<>"'])/g, YR = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
};
function $e(r) {
return r == null ? "" : (r + "").replace(UR, function(e, t) {
return YR[t];
});
}
function wd(r, e, t) {
var n = "{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";
function a(f) {
return f && xr(f) ? f : "-";
}
function i(f) {
return !!(f != null && !isNaN(f) && isFinite(f));
}
var o = e === "time", s = r instanceof Date;
if (o || s) {
var l = o ? jr(r) : r;
if (isNaN(+l)) {
if (s)
return "-";
} else
return Bh(l, n, t);
}
if (e === "ordinal")
return yf(r) ? a(r) : wt(r) && i(r) ? r + "" : "-";
var u = _n(r);
return i(u) ? eD(u) : yf(r) ? a(r) : typeof r == "boolean" ? r + "" : "-";
}
var a_ = ["a", "b", "c", "d", "e", "f", "g"], Kc = function(r, e) {
return "{" + r + (e == null ? "" : e) + "}";
};
function nD(r, e, t) {
z(e) || (e = [e]);
var n = e.length;
if (!n)
return "";
for (var a = e[0].$vars || [], i = 0; i < a.length; i++) {
var o = a_[i];
r = r.replace(Kc(o), Kc(o, 0));
}
for (var s = 0; s < n; s++)
for (var l = 0; l < a.length; l++) {
var u = e[s][a[l]];
r = r.replace(Kc(a_[l], s), t ? $e(u) : u);
}
return r;
}
function ZR(r, e, t) {
return C(e, function(n, a) {
r = r.replace("{" + a + "}", t ? $e(n) : n);
}), r;
}
function XR(r, e) {
var t = W(r) ? {
color: r,
extraCssText: e
} : r || {}, n = t.color, a = t.type;
e = t.extraCssText;
var i = t.renderMode || "html";
if (!n)
return "";
if (i === "html")
return a === "subItem" ? '' : '';
var o = t.markerId || "markerX";
return {
renderMode: i,
content: "{" + o + "|} ",
style: a === "subItem" ? {
width: 4,
height: 4,
borderRadius: 2,
backgroundColor: n
} : {
width: 10,
height: 10,
borderRadius: 5,
backgroundColor: n
}
};
}
function mi(r, e) {
return e = e || "transparent", W(r) ? r : j(r) && r.colorStops && (r.colorStops[0] || {}).color || e;
}
function kf(r, e) {
if (e === "_blank" || e === "blank") {
var t = window.open();
t.opener = null, t.location.href = r;
} else
window.open(r, e);
}
var lf = C, aD = ["left", "right", "top", "bottom", "width", "height"], ei = [["width", "left", "right"], ["height", "top", "bottom"]];
function oy(r, e, t, n, a) {
var i = 0, o = 0;
n == null && (n = 1 / 0), a == null && (a = 1 / 0);
var s = 0;
e.eachChild(function(l, u) {
var f = l.getBoundingRect(), h = e.childAt(u + 1), c = h && h.getBoundingRect(), v, p;
if (r === "horizontal") {
var d = f.width + (c ? -c.x + f.x : 0);
v = i + d, v > n || l.newline ? (i = 0, v = d, o += s + t, s = f.height) : s = Math.max(s, f.height);
} else {
var g = f.height + (c ? -c.y + f.y : 0);
p = o + g, p > a || l.newline ? (i += s + t, o = 0, p = g, s = f.width) : s = Math.max(s, f.width);
}
l.newline || (l.x = i, l.y = o, l.markRedraw(), r === "horizontal" ? i = v + t : o = p + t);
});
}
var ui = oy;
it(oy, "vertical");
it(oy, "horizontal");
function qR(r, e, t) {
var n = e.width, a = e.height, i = H(r.left, n), o = H(r.top, a), s = H(r.right, n), l = H(r.bottom, a);
return (isNaN(i) || isNaN(parseFloat(r.left))) && (i = 0), (isNaN(s) || isNaN(parseFloat(r.right))) && (s = n), (isNaN(o) || isNaN(parseFloat(r.top))) && (o = 0), (isNaN(l) || isNaN(parseFloat(r.bottom))) && (l = a), t = zo(t || 0), {
width: Math.max(s - i - t[1] - t[3], 0),
height: Math.max(l - o - t[0] - t[2], 0)
};
}
function ee(r, e, t) {
t = zo(t || 0);
var n = e.width, a = e.height, i = H(r.left, n), o = H(r.top, a), s = H(r.right, n), l = H(r.bottom, a), u = H(r.width, n), f = H(r.height, a), h = t[2] + t[0], c = t[1] + t[3], v = r.aspect;
switch (isNaN(u) && (u = n - s - c - i), isNaN(f) && (f = a - l - h - o), v != null && (isNaN(u) && isNaN(f) && (v > n / a ? u = n * 0.8 : f = a * 0.8), isNaN(u) && (u = v * f), isNaN(f) && (f = u / v)), isNaN(i) && (i = n - s - u - c), isNaN(o) && (o = a - l - f - h), r.left || r.right) {
case "center":
i = n / 2 - u / 2 - t[3];
break;
case "right":
i = n - u - c;
break;
}
switch (r.top || r.bottom) {
case "middle":
case "center":
o = a / 2 - f / 2 - t[0];
break;
case "bottom":
o = a - f - h;
break;
}
i = i || 0, o = o || 0, isNaN(u) && (u = n - c - i - (s || 0)), isNaN(f) && (f = a - h - o - (l || 0));
var p = new ft(i + t[3], o + t[0], u, f);
return p.margin = t, p;
}
function $h(r, e, t, n, a, i) {
var o = !a || !a.hv || a.hv[0], s = !a || !a.hv || a.hv[1], l = a && a.boundingMode || "all";
if (i = i || r, i.x = r.x, i.y = r.y, !o && !s)
return !1;
var u;
if (l === "raw")
u = r.type === "group" ? new ft(0, 0, +e.width || 0, +e.height || 0) : r.getBoundingRect();
else if (u = r.getBoundingRect(), r.needLocalTransform()) {
var f = r.getLocalTransform();
u = u.clone(), u.applyTransform(f);
}
var h = ee(J({
width: u.width,
height: u.height
}, e), t, n), c = o ? h.x - u.x : 0, v = s ? h.y - u.y : 0;
return l === "raw" ? (i.x = c, i.y = v) : (i.x += c, i.y += v), i === r && r.markRedraw(), !0;
}
function KR(r, e) {
return r[ei[e][0]] != null || r[ei[e][1]] != null && r[ei[e][2]] != null;
}
function ll(r) {
var e = r.layoutMode || r.constructor.layoutMode;
return j(e) ? e : e ? {
type: e
} : null;
}
function oa(r, e, t) {
var n = t && t.ignoreSize;
!z(n) && (n = [n, n]);
var a = o(ei[0], 0), i = o(ei[1], 1);
u(ei[0], r, a), u(ei[1], r, i);
function o(f, h) {
var c = {}, v = 0, p = {}, d = 0, g = 2;
if (lf(f, function(_) {
p[_] = r[_];
}), lf(f, function(_) {
s(e, _) && (c[_] = p[_] = e[_]), l(c, _) && v++, l(p, _) && d++;
}), n[h])
return l(e, f[1]) ? p[f[2]] = null : l(e, f[2]) && (p[f[1]] = null), p;
if (d === g || !v)
return p;
if (v >= g)
return c;
for (var y = 0; y < f.length; y++) {
var m = f[y];
if (!s(c, m) && s(r, m)) {
c[m] = r[m];
break;
}
}
return c;
}
function s(f, h) {
return f.hasOwnProperty(h);
}
function l(f, h) {
return f[h] != null && f[h] !== "auto";
}
function u(f, h, c) {
lf(f, function(v) {
h[v] = c[v];
});
}
}
function Go(r) {
return iD({}, r);
}
function iD(r, e) {
return e && r && lf(aD, function(t) {
e.hasOwnProperty(t) && (r[t] = e[t]);
}), r;
}
var jR = Tt(), Fo = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this, t, n, a) || this;
return i.uid = Bo("ec_cpt_model"), i;
}
return e.prototype.init = function(t, n, a) {
this.mergeDefaultAndTheme(t, a);
}, e.prototype.mergeDefaultAndTheme = function(t, n) {
var a = ll(this), i = a ? Go(t) : {}, o = n.getTheme();
lt(t, o.get(this.mainType)), lt(t, this.getDefaultOption()), a && oa(t, i, a);
}, e.prototype.mergeOption = function(t, n) {
lt(this.option, t, !0);
var a = ll(this);
a && oa(this.option, t, a);
}, e.prototype.optionUpdated = function(t, n) {
}, e.prototype.getDefaultOption = function() {
var t = this.constructor;
if (!LP(t))
return t.defaultOption;
var n = jR(this);
if (!n.defaultOption) {
for (var a = [], i = t; i; ) {
var o = i.prototype.defaultOption;
o && a.push(o), i = i.superClass;
}
for (var s = {}, l = a.length - 1; l >= 0; l--)
s = lt(s, a[l], !0);
n.defaultOption = s;
}
return n.defaultOption;
}, e.prototype.getReferringComponents = function(t, n) {
var a = t + "Index", i = t + "Id";
return Ml(this.ecModel, t, {
index: this.get(a, !0),
id: this.get(i, !0)
}, n);
}, e.prototype.getBoxLayoutParams = function() {
var t = this;
return {
left: t.get("left"),
top: t.get("top"),
right: t.get("right"),
bottom: t.get("bottom"),
width: t.get("width"),
height: t.get("height")
};
}, e.prototype.getZLevelKey = function() {
return "";
}, e.prototype.setZLevel = function(t) {
this.option.zlevel = t;
}, e.protoInitialize = function() {
var t = e.prototype;
t.type = "component", t.id = "", t.name = "", t.mainType = "", t.subType = "", t.componentIndex = 0;
}(), e;
}(kt);
UT(Fo, kt);
Ah(Fo);
kR(Fo);
OR(Fo, JR);
function JR(r) {
var e = [];
return C(Fo.getClassesByMainType(r), function(t) {
e = e.concat(t.dependencies || t.prototype.dependencies || []);
}), e = G(e, function(t) {
return $r(t).main;
}), r !== "dataset" && ct(e, "dataset") <= 0 && e.unshift("dataset"), e;
}
const _t = Fo;
var oD = "";
typeof navigator < "u" && (oD = navigator.platform || "");
var Vi = "rgba(0, 0, 0, 0.2)";
const QR = {
darkMode: "auto",
colorBy: "series",
color: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"],
gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
aria: {
decal: {
decals: [{
color: Vi,
dashArrayX: [1, 0],
dashArrayY: [2, 5],
symbolSize: 1,
rotation: Math.PI / 6
}, {
color: Vi,
symbol: "circle",
dashArrayX: [[8, 8], [0, 8, 8, 0]],
dashArrayY: [6, 0],
symbolSize: 0.8
}, {
color: Vi,
dashArrayX: [1, 0],
dashArrayY: [4, 3],
rotation: -Math.PI / 4
}, {
color: Vi,
dashArrayX: [[6, 6], [0, 6, 6, 0]],
dashArrayY: [6, 0]
}, {
color: Vi,
dashArrayX: [[1, 0], [1, 6]],
dashArrayY: [1, 0, 6, 0],
rotation: Math.PI / 4
}, {
color: Vi,
symbol: "triangle",
dashArrayX: [[9, 9], [0, 9, 9, 0]],
dashArrayY: [7, 2],
symbolSize: 0.75
}]
}
},
textStyle: {
fontFamily: oD.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
fontSize: 12,
fontStyle: "normal",
fontWeight: "normal"
},
blendMode: null,
stateAnimation: {
duration: 300,
easing: "cubicOut"
},
animation: "auto",
animationDuration: 1e3,
animationDurationUpdate: 500,
animationEasing: "cubicInOut",
animationEasingUpdate: "cubicInOut",
animationThreshold: 2e3,
progressiveThreshold: 3e3,
progressive: 400,
hoverLayerThreshold: 3e3,
useUTC: !1
};
var bd = K(["tooltip", "label", "itemName", "itemId", "itemGroupId", "seriesName"]), pr = "original", Se = "arrayRows", dr = "objectRows", tn = "keyedColumns", pn = "typedArray", sD = "unknown", Zr = "column", Ho = "row", le = {
Must: 1,
Might: 2,
Not: 3
}, lD = Tt();
function tk(r) {
lD(r).datasetMap = K();
}
function uD(r, e, t) {
var n = {}, a = ly(e);
if (!a || !r)
return n;
var i = [], o = [], s = e.ecModel, l = lD(s).datasetMap, u = a.uid + "_" + t.seriesLayoutBy, f, h;
r = r.slice(), C(r, function(d, g) {
var y = j(d) ? d : r[g] = {
name: d
};
y.type === "ordinal" && f == null && (f = g, h = p(y)), n[y.name] = [];
});
var c = l.get(u) || l.set(u, {
categoryWayDim: h,
valueWayDim: 0
});
C(r, function(d, g) {
var y = d.name, m = p(d);
if (f == null) {
var _ = c.valueWayDim;
v(n[y], _, m), v(o, _, m), c.valueWayDim += m;
} else if (f === g)
v(n[y], 0, m), v(i, 0, m);
else {
var _ = c.categoryWayDim;
v(n[y], _, m), v(o, _, m), c.categoryWayDim += m;
}
});
function v(d, g, y) {
for (var m = 0; m < y; m++)
d.push(g + m);
}
function p(d) {
var g = d.dimsDef;
return g ? g.length : 1;
}
return i.length && (n.itemName = i), o.length && (n.seriesName = o), n;
}
function sy(r, e, t) {
var n = {}, a = ly(r);
if (!a)
return n;
var i = e.sourceFormat, o = e.dimensionsDefine, s;
(i === dr || i === tn) && C(o, function(f, h) {
(j(f) ? f.name : f) === "name" && (s = h);
});
var l = function() {
for (var f = {}, h = {}, c = [], v = 0, p = Math.min(5, t); v < p; v++) {
var d = hD(e.data, i, e.seriesLayoutBy, o, e.startIndex, v);
c.push(d);
var g = d === le.Not;
if (g && f.v == null && v !== s && (f.v = v), (f.n == null || f.n === f.v || !g && c[f.n] === le.Not) && (f.n = v), y(f) && c[f.n] !== le.Not)
return f;
g || (d === le.Might && h.v == null && v !== s && (h.v = v), (h.n == null || h.n === h.v) && (h.n = v));
}
function y(m) {
return m.v != null && m.n != null;
}
return y(f) ? f : y(h) ? h : null;
}();
if (l) {
n.value = [l.v];
var u = s != null ? s : l.n;
n.itemName = [u], n.seriesName = [u];
}
return n;
}
function ly(r) {
var e = r.get("data", !0);
if (!e)
return Ml(r.ecModel, "dataset", {
index: r.get("datasetIndex", !0),
id: r.get("datasetId", !0)
}, Kt).models[0];
}
function ek(r) {
return !r.get("transform", !0) && !r.get("fromTransformResult", !0) ? [] : Ml(r.ecModel, "dataset", {
index: r.get("fromDatasetIndex", !0),
id: r.get("fromDatasetId", !0)
}, Kt).models;
}
function fD(r, e) {
return hD(r.data, r.sourceFormat, r.seriesLayoutBy, r.dimensionsDefine, r.startIndex, e);
}
function hD(r, e, t, n, a, i) {
var o, s = 5;
if (Oe(r))
return le.Not;
var l, u;
if (n) {
var f = n[i];
j(f) ? (l = f.name, u = f.type) : W(f) && (l = f);
}
if (u != null)
return u === "ordinal" ? le.Must : le.Not;
if (e === Se) {
var h = r;
if (t === Ho) {
for (var c = h[i], v = 0; v < (c || []).length && v < s; v++)
if ((o = S(c[a + v])) != null)
return o;
} else
for (var v = 0; v < h.length && v < s; v++) {
var p = h[a + v];
if (p && (o = S(p[i])) != null)
return o;
}
} else if (e === dr) {
var d = r;
if (!l)
return le.Not;
for (var v = 0; v < d.length && v < s; v++) {
var g = d[v];
if (g && (o = S(g[l])) != null)
return o;
}
} else if (e === tn) {
var y = r;
if (!l)
return le.Not;
var c = y[l];
if (!c || Oe(c))
return le.Not;
for (var v = 0; v < c.length && v < s; v++)
if ((o = S(c[v])) != null)
return o;
} else if (e === pr)
for (var m = r, v = 0; v < m.length && v < s; v++) {
var g = m[v], _ = No(g);
if (!z(_))
return le.Not;
if ((o = S(_[i])) != null)
return o;
}
function S(w) {
var x = W(w);
if (w != null && isFinite(w) && w !== "")
return x ? le.Might : le.Not;
if (x && w !== "-")
return le.Must;
}
return le.Not;
}
var Td = K();
function rk(r, e) {
Q(Td.get(r) == null && e), Td.set(r, e);
}
function nk(r, e, t) {
var n = Td.get(e);
if (!n)
return t;
var a = n(r);
if (!a)
return t;
if (process.env.NODE_ENV !== "production")
for (var i = 0; i < a.length; i++)
Q(xo(a[i]));
return t.concat(a);
}
var i_ = Tt(), ak = Tt(), uy = function() {
function r() {
}
return r.prototype.getColorFromPalette = function(e, t, n) {
var a = Pt(this.get("color", !0)), i = this.get("colorLayer", !0);
return cD(this, i_, a, i, e, t, n);
}, r.prototype.clearColorPalette = function() {
ok(this, i_);
}, r;
}();
function Cd(r, e, t, n) {
var a = Pt(r.get(["aria", "decal", "decals"]));
return cD(r, ak, a, null, e, t, n);
}
function ik(r, e) {
for (var t = r.length, n = 0; n < t; n++)
if (r[n].length > e)
return r[n];
return r[t - 1];
}
function cD(r, e, t, n, a, i, o) {
i = i || r;
var s = e(i), l = s.paletteIdx || 0, u = s.paletteNameMap = s.paletteNameMap || {};
if (u.hasOwnProperty(a))
return u[a];
var f = o == null || !n ? t : ik(n, o);
if (f = f || t, !(!f || !f.length)) {
var h = f[l];
return a && (u[a] = h), s.paletteIdx = (l + 1) % f.length, h;
}
}
function ok(r, e) {
e(r).paletteIdx = 0, e(r).paletteNameMap = {};
}
var vu, as, o_, jc = "\0_ec_inner", s_ = 1, sk = {
grid: "GridComponent",
polar: "PolarComponent",
geo: "GeoComponent",
singleAxis: "SingleAxisComponent",
parallel: "ParallelComponent",
calendar: "CalendarComponent",
graphic: "GraphicComponent",
toolbox: "ToolboxComponent",
tooltip: "TooltipComponent",
axisPointer: "AxisPointerComponent",
brush: "BrushComponent",
title: "TitleComponent",
timeline: "TimelineComponent",
markPoint: "MarkPointComponent",
markLine: "MarkLineComponent",
markArea: "MarkAreaComponent",
legend: "LegendComponent",
dataZoom: "DataZoomComponent",
visualMap: "VisualMapComponent",
xAxis: "GridComponent",
yAxis: "GridComponent",
angleAxis: "PolarComponent",
radiusAxis: "PolarComponent"
}, lk = {
line: "LineChart",
bar: "BarChart",
pie: "PieChart",
scatter: "ScatterChart",
radar: "RadarChart",
map: "MapChart",
tree: "TreeChart",
treemap: "TreemapChart",
graph: "GraphChart",
gauge: "GaugeChart",
funnel: "FunnelChart",
parallel: "ParallelChart",
sankey: "SankeyChart",
boxplot: "BoxplotChart",
candlestick: "CandlestickChart",
effectScatter: "EffectScatterChart",
lines: "LinesChart",
heatmap: "HeatmapChart",
pictorialBar: "PictorialBarChart",
themeRiver: "ThemeRiverChart",
sunburst: "SunburstChart",
custom: "CustomChart"
}, Of = {};
function uk(r) {
C(r, function(e, t) {
if (!_t.hasClass(t)) {
var n = sk[t];
n && !Of[n] && (he("Component " + t + ` is used but not imported.
import { ` + n + ` } from 'echarts/components';
echarts.use([` + n + "]);"), Of[n] = !0);
}
});
}
var vD = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.init = function(t, n, a, i, o, s) {
i = i || {}, this.option = null, this._theme = new kt(i), this._locale = new kt(o), this._optionManager = s;
}, e.prototype.setOption = function(t, n, a) {
process.env.NODE_ENV !== "production" && (Q(t != null, "option is null/undefined"), Q(t[jc] !== s_, "please use chart.getOption()"));
var i = f_(n);
this._optionManager.setOption(t, a, i), this._resetOption(null, i);
}, e.prototype.resetOption = function(t, n) {
return this._resetOption(t, f_(n));
}, e.prototype._resetOption = function(t, n) {
var a = !1, i = this._optionManager;
if (!t || t === "recreate") {
var o = i.mountOption(t === "recreate");
process.env.NODE_ENV !== "production" && uk(o), !this.option || t === "recreate" ? o_(this, o) : (this.restoreData(), this._mergeOption(o, n)), a = !0;
}
if ((t === "timeline" || t === "media") && this.restoreData(), !t || t === "recreate" || t === "timeline") {
var s = i.getTimelineOption(this);
s && (a = !0, this._mergeOption(s, n));
}
if (!t || t === "recreate" || t === "media") {
var l = i.getMediaOption(this);
l.length && C(l, function(u) {
a = !0, this._mergeOption(u, n);
}, this);
}
return a;
}, e.prototype.mergeOption = function(t) {
this._mergeOption(t, null);
}, e.prototype._mergeOption = function(t, n) {
var a = this.option, i = this._componentsMap, o = this._componentsCount, s = [], l = K(), u = n && n.replaceMergeMainTypeMap;
tk(this), C(t, function(h, c) {
h != null && (_t.hasClass(c) ? c && (s.push(c), l.set(c, !0)) : a[c] = a[c] == null ? tt(h) : lt(a[c], h, !0));
}), u && u.each(function(h, c) {
_t.hasClass(c) && !l.get(c) && (s.push(c), l.set(c, !0));
}), _t.topologicalTravel(s, _t.getAllClassMainTypes(), f, this);
function f(h) {
var c = nk(this, h, Pt(t[h])), v = i.get(h), p = v ? u && u.get(h) ? "replaceMerge" : "normalMerge" : "replaceAll", d = GT(v, c, p);
SP(d, h, _t), a[h] = null, i.set(h, null), o.set(h, 0);
var g = [], y = [], m = 0, _, S;
C(d, function(w, x) {
var b = w.existing, T = w.newOption;
if (!T)
b && (b.mergeOption({}, this), b.optionUpdated({}, !1));
else {
var D = h === "series", A = _t.getClass(
h,
w.keyInfo.subType,
!D
);
if (!A) {
if (process.env.NODE_ENV !== "production") {
var M = w.keyInfo.subType, L = lk[M];
Of[M] || (Of[M] = !0, he(L ? "Series " + M + ` is used but not imported.
import { ` + L + ` } from 'echarts/charts';
echarts.use([` + L + "]);" : "Unkown series " + M));
}
return;
}
if (h === "tooltip") {
if (_) {
process.env.NODE_ENV !== "production" && (S || (_e("Currently only one tooltip component is allowed."), S = !0));
return;
}
_ = !0;
}
if (b && b.constructor === A)
b.name = w.keyInfo.name, b.mergeOption(T, this), b.optionUpdated(T, !1);
else {
var I = B({
componentIndex: x
}, w.keyInfo);
b = new A(T, this, this, I), B(b, I), w.brandNew && (b.__requireNewView = !0), b.init(T, this, this), b.optionUpdated(null, !0);
}
}
b ? (g.push(b.option), y.push(b), m++) : (g.push(void 0), y.push(void 0));
}, this), a[h] = g, i.set(h, y), o.set(h, m), h === "series" && vu(this);
}
this._seriesIndices || vu(this);
}, e.prototype.getOption = function() {
var t = tt(this.option);
return C(t, function(n, a) {
if (_t.hasClass(a)) {
for (var i = Pt(n), o = i.length, s = !1, l = o - 1; l >= 0; l--)
i[l] && !xo(i[l]) ? s = !0 : (i[l] = null, !s && o--);
i.length = o, t[a] = i;
}
}), delete t[jc], t;
}, e.prototype.getTheme = function() {
return this._theme;
}, e.prototype.getLocaleModel = function() {
return this._locale;
}, e.prototype.setUpdatePayload = function(t) {
this._payload = t;
}, e.prototype.getUpdatePayload = function() {
return this._payload;
}, e.prototype.getComponent = function(t, n) {
var a = this._componentsMap.get(t);
if (a) {
var i = a[n || 0];
if (i)
return i;
if (n == null) {
for (var o = 0; o < a.length; o++)
if (a[o])
return a[o];
}
}
}, e.prototype.queryComponents = function(t) {
var n = t.mainType;
if (!n)
return [];
var a = t.index, i = t.id, o = t.name, s = this._componentsMap.get(n);
if (!s || !s.length)
return [];
var l;
return a != null ? (l = [], C(Pt(a), function(u) {
s[u] && l.push(s[u]);
})) : i != null ? l = l_("id", i, s) : o != null ? l = l_("name", o, s) : l = Et(s, function(u) {
return !!u;
}), u_(l, t);
}, e.prototype.findComponents = function(t) {
var n = t.query, a = t.mainType, i = s(n), o = i ? this.queryComponents(i) : Et(this._componentsMap.get(a), function(u) {
return !!u;
});
return l(u_(o, t));
function s(u) {
var f = a + "Index", h = a + "Id", c = a + "Name";
return u && (u[f] != null || u[h] != null || u[c] != null) ? {
mainType: a,
index: u[f],
id: u[h],
name: u[c]
} : null;
}
function l(u) {
return t.filter ? Et(u, t.filter) : u;
}
}, e.prototype.eachComponent = function(t, n, a) {
var i = this._componentsMap;
if (q(t)) {
var o = n, s = t;
i.each(function(h, c) {
for (var v = 0; h && v < h.length; v++) {
var p = h[v];
p && s.call(o, c, p, p.componentIndex);
}
});
} else
for (var l = W(t) ? i.get(t) : j(t) ? this.findComponents(t) : null, u = 0; l && u < l.length; u++) {
var f = l[u];
f && n.call(a, f, f.componentIndex);
}
}, e.prototype.getSeriesByName = function(t) {
var n = te(t, null);
return Et(this._componentsMap.get("series"), function(a) {
return !!a && n != null && a.name === n;
});
}, e.prototype.getSeriesByIndex = function(t) {
return this._componentsMap.get("series")[t];
}, e.prototype.getSeriesByType = function(t) {
return Et(this._componentsMap.get("series"), function(n) {
return !!n && n.subType === t;
});
}, e.prototype.getSeries = function() {
return Et(this._componentsMap.get("series"), function(t) {
return !!t;
});
}, e.prototype.getSeriesCount = function() {
return this._componentsCount.get("series");
}, e.prototype.eachSeries = function(t, n) {
as(this), C(this._seriesIndices, function(a) {
var i = this._componentsMap.get("series")[a];
t.call(n, i, a);
}, this);
}, e.prototype.eachRawSeries = function(t, n) {
C(this._componentsMap.get("series"), function(a) {
a && t.call(n, a, a.componentIndex);
});
}, e.prototype.eachSeriesByType = function(t, n, a) {
as(this), C(this._seriesIndices, function(i) {
var o = this._componentsMap.get("series")[i];
o.subType === t && n.call(a, o, i);
}, this);
}, e.prototype.eachRawSeriesByType = function(t, n, a) {
return C(this.getSeriesByType(t), n, a);
}, e.prototype.isSeriesFiltered = function(t) {
return as(this), this._seriesIndicesMap.get(t.componentIndex) == null;
}, e.prototype.getCurrentSeriesIndices = function() {
return (this._seriesIndices || []).slice();
}, e.prototype.filterSeries = function(t, n) {
as(this);
var a = [];
C(this._seriesIndices, function(i) {
var o = this._componentsMap.get("series")[i];
t.call(n, o, i) && a.push(i);
}, this), this._seriesIndices = a, this._seriesIndicesMap = K(a);
}, e.prototype.restoreData = function(t) {
vu(this);
var n = this._componentsMap, a = [];
n.each(function(i, o) {
_t.hasClass(o) && a.push(o);
}), _t.topologicalTravel(a, _t.getAllClassMainTypes(), function(i) {
C(n.get(i), function(o) {
o && (i !== "series" || !fk(o, t)) && o.restoreData();
});
});
}, e.internalField = function() {
vu = function(t) {
var n = t._seriesIndices = [];
C(t._componentsMap.get("series"), function(a) {
a && n.push(a.componentIndex);
}), t._seriesIndicesMap = K(n);
}, as = function(t) {
if (process.env.NODE_ENV !== "production" && !t._seriesIndices)
throw new Error("Option should contains series.");
}, o_ = function(t, n) {
t.option = {}, t.option[jc] = s_, t._componentsMap = K({
series: []
}), t._componentsCount = K();
var a = n.aria;
j(a) && a.enabled == null && (a.enabled = !0), hk(n, t._theme.option), lt(n, QR, !1), t._mergeOption(n, null);
};
}(), e;
}(kt);
function fk(r, e) {
if (e) {
var t = e.seriesIndex, n = e.seriesId, a = e.seriesName;
return t != null && r.componentIndex !== t || n != null && r.id !== n || a != null && r.name !== a;
}
}
function hk(r, e) {
var t = r.color && !r.colorLayer;
C(e, function(n, a) {
a === "colorLayer" && t || _t.hasClass(a) || (typeof n == "object" ? r[a] = r[a] ? lt(r[a], n, !1) : tt(n) : r[a] == null && (r[a] = n));
});
}
function l_(r, e, t) {
if (z(e)) {
var n = K();
return C(e, function(i) {
if (i != null) {
var o = te(i, null);
o != null && n.set(i, !0);
}
}), Et(t, function(i) {
return i && n.get(i[r]);
});
} else {
var a = te(e, null);
return Et(t, function(i) {
return i && a != null && i[r] === a;
});
}
}
function u_(r, e) {
return e.hasOwnProperty("subType") ? Et(r, function(t) {
return t && t.subType === e.subType;
}) : r;
}
function f_(r) {
var e = K();
return r && C(Pt(r.replaceMerge), function(t) {
process.env.NODE_ENV !== "production" && Q(_t.hasClass(t), '"' + t + '" is not valid component main type in "replaceMerge"'), e.set(t, !0);
}), {
replaceMergeMainTypeMap: e
};
}
Qt(vD, uy);
const pD = vD;
var ck = [
"getDom",
"getZr",
"getWidth",
"getHeight",
"getDevicePixelRatio",
"dispatchAction",
"isSSR",
"isDisposed",
"on",
"off",
"getDataURL",
"getConnectedDataURL",
"getOption",
"getId",
"updateLabelLayout"
], vk = function() {
function r(e) {
C(ck, function(t) {
this[t] = Y(e[t], e);
}, this);
}
return r;
}();
const dD = vk;
var Jc = {}, pk = function() {
function r() {
this._coordinateSystems = [];
}
return r.prototype.create = function(e, t) {
var n = [];
C(Jc, function(a, i) {
var o = a.create(e, t);
n = n.concat(o || []);
}), this._coordinateSystems = n;
}, r.prototype.update = function(e, t) {
C(this._coordinateSystems, function(n) {
n.update && n.update(e, t);
});
}, r.prototype.getCoordinateSystems = function() {
return this._coordinateSystems.slice();
}, r.register = function(e, t) {
Jc[e] = t;
}, r.get = function(e) {
return Jc[e];
}, r;
}();
const $o = pk;
var dk = /^(min|max)?(.+)$/, gk = function() {
function r(e) {
this._timelineOptions = [], this._mediaList = [], this._currentMediaIndices = [], this._api = e;
}
return r.prototype.setOption = function(e, t, n) {
e && (C(Pt(e.series), function(o) {
o && o.data && Oe(o.data) && mf(o.data);
}), C(Pt(e.dataset), function(o) {
o && o.source && Oe(o.source) && mf(o.source);
})), e = tt(e);
var a = this._optionBackup, i = yk(e, t, !a);
this._newBaseOption = i.baseOption, a ? (i.timelineOptions.length && (a.timelineOptions = i.timelineOptions), i.mediaList.length && (a.mediaList = i.mediaList), i.mediaDefault && (a.mediaDefault = i.mediaDefault)) : this._optionBackup = i;
}, r.prototype.mountOption = function(e) {
var t = this._optionBackup;
return this._timelineOptions = t.timelineOptions, this._mediaList = t.mediaList, this._mediaDefault = t.mediaDefault, this._currentMediaIndices = [], tt(e ? t.baseOption : this._newBaseOption);
}, r.prototype.getTimelineOption = function(e) {
var t, n = this._timelineOptions;
if (n.length) {
var a = e.getComponent("timeline");
a && (t = tt(
n[a.getCurrentIndex()]
));
}
return t;
}, r.prototype.getMediaOption = function(e) {
var t = this._api.getWidth(), n = this._api.getHeight(), a = this._mediaList, i = this._mediaDefault, o = [], s = [];
if (!a.length && !i)
return s;
for (var l = 0, u = a.length; l < u; l++)
mk(a[l].query, t, n) && o.push(l);
return !o.length && i && (o = [-1]), o.length && !Sk(o, this._currentMediaIndices) && (s = G(o, function(f) {
return tt(f === -1 ? i.option : a[f].option);
})), this._currentMediaIndices = o, s;
}, r;
}();
function yk(r, e, t) {
var n = [], a, i, o = r.baseOption, s = r.timeline, l = r.options, u = r.media, f = !!r.media, h = !!(l || s || o && o.timeline);
o ? (i = o, i.timeline || (i.timeline = s)) : ((h || f) && (r.options = r.media = null), i = r), f && (z(u) ? C(u, function(v) {
process.env.NODE_ENV !== "production" && v && !v.option && j(v.query) && j(v.query.option) && he("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"), v && v.option && (v.query ? n.push(v) : a || (a = v));
}) : process.env.NODE_ENV !== "production" && he("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")), c(i), C(l, function(v) {
return c(v);
}), C(n, function(v) {
return c(v.option);
});
function c(v) {
C(e, function(p) {
p(v, t);
});
}
return {
baseOption: i,
timelineOptions: l || [],
mediaDefault: a,
mediaList: n
};
}
function mk(r, e, t) {
var n = {
width: e,
height: t,
aspectratio: e / t
}, a = !0;
return C(r, function(i, o) {
var s = o.match(dk);
if (!(!s || !s[1] || !s[2])) {
var l = s[1], u = s[2].toLowerCase();
_k(n[u], i, l) || (a = !1);
}
}), a;
}
function _k(r, e, t) {
return t === "min" ? r >= e : t === "max" ? r <= e : r === e;
}
function Sk(r, e) {
return r.join(",") === e.join(",");
}
const xk = gk;
var Ze = C, ul = j, h_ = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"];
function Qc(r) {
var e = r && r.itemStyle;
if (!!e)
for (var t = 0, n = h_.length; t < n; t++) {
var a = h_[t], i = e.normal, o = e.emphasis;
i && i[a] && (process.env.NODE_ENV !== "production" && Xt("itemStyle.normal." + a, a), r[a] = r[a] || {}, r[a].normal ? lt(r[a].normal, i[a]) : r[a].normal = i[a], i[a] = null), o && o[a] && (process.env.NODE_ENV !== "production" && Xt("itemStyle.emphasis." + a, "emphasis." + a), r[a] = r[a] || {}, r[a].emphasis ? lt(r[a].emphasis, o[a]) : r[a].emphasis = o[a], o[a] = null);
}
}
function ye(r, e, t) {
if (r && r[e] && (r[e].normal || r[e].emphasis)) {
var n = r[e].normal, a = r[e].emphasis;
n && (process.env.NODE_ENV !== "production" && Mr("'normal' hierarchy in " + e + " has been removed since 4.0. All style properties are configured in " + e + " directly now."), t ? (r[e].normal = r[e].emphasis = null, J(r[e], n)) : r[e] = n), a && (process.env.NODE_ENV !== "production" && Mr(e + ".emphasis has been changed to emphasis." + e + " since 4.0"), r.emphasis = r.emphasis || {}, r.emphasis[e] = a, a.focus && (r.emphasis.focus = a.focus), a.blurScope && (r.emphasis.blurScope = a.blurScope));
}
}
function Ps(r) {
ye(r, "itemStyle"), ye(r, "lineStyle"), ye(r, "areaStyle"), ye(r, "label"), ye(r, "labelLine"), ye(r, "upperLabel"), ye(r, "edgeLabel");
}
function Zt(r, e) {
var t = ul(r) && r[e], n = ul(t) && t.textStyle;
if (n) {
process.env.NODE_ENV !== "production" && Mr("textStyle hierarchy in " + e + " has been removed since 4.0. All textStyle properties are configured in " + e + " directly now.");
for (var a = 0, i = v0.length; a < i; a++) {
var o = v0[a];
n.hasOwnProperty(o) && (t[o] = n[o]);
}
}
}
function er(r) {
r && (Ps(r), Zt(r, "label"), r.emphasis && Zt(r.emphasis, "label"));
}
function wk(r) {
if (!!ul(r)) {
Qc(r), Ps(r), Zt(r, "label"), Zt(r, "upperLabel"), Zt(r, "edgeLabel"), r.emphasis && (Zt(r.emphasis, "label"), Zt(r.emphasis, "upperLabel"), Zt(r.emphasis, "edgeLabel"));
var e = r.markPoint;
e && (Qc(e), er(e));
var t = r.markLine;
t && (Qc(t), er(t));
var n = r.markArea;
n && er(n);
var a = r.data;
if (r.type === "graph") {
a = a || r.nodes;
var i = r.links || r.edges;
if (i && !Oe(i))
for (var o = 0; o < i.length; o++)
er(i[o]);
C(r.categories, function(u) {
Ps(u);
});
}
if (a && !Oe(a))
for (var o = 0; o < a.length; o++)
er(a[o]);
if (e = r.markPoint, e && e.data)
for (var s = e.data, o = 0; o < s.length; o++)
er(s[o]);
if (t = r.markLine, t && t.data)
for (var l = t.data, o = 0; o < l.length; o++)
z(l[o]) ? (er(l[o][0]), er(l[o][1])) : er(l[o]);
r.type === "gauge" ? (Zt(r, "axisLabel"), Zt(r, "title"), Zt(r, "detail")) : r.type === "treemap" ? (ye(r.breadcrumb, "itemStyle"), C(r.levels, function(u) {
Ps(u);
})) : r.type === "tree" && Ps(r.leaves);
}
}
function an(r) {
return z(r) ? r : r ? [r] : [];
}
function c_(r) {
return (z(r) ? r[0] : r) || {};
}
function bk(r, e) {
Ze(an(r.series), function(n) {
ul(n) && wk(n);
});
var t = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
e && t.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Ze(t, function(n) {
Ze(an(r[n]), function(a) {
a && (Zt(a, "axisLabel"), Zt(a.axisPointer, "label"));
});
}), Ze(an(r.parallel), function(n) {
var a = n && n.parallelAxisDefault;
Zt(a, "axisLabel"), Zt(a && a.axisPointer, "label");
}), Ze(an(r.calendar), function(n) {
ye(n, "itemStyle"), Zt(n, "dayLabel"), Zt(n, "monthLabel"), Zt(n, "yearLabel");
}), Ze(an(r.radar), function(n) {
Zt(n, "name"), n.name && n.axisName == null && (n.axisName = n.name, delete n.name, process.env.NODE_ENV !== "production" && Mr("name property in radar component has been changed to axisName")), n.nameGap != null && n.axisNameGap == null && (n.axisNameGap = n.nameGap, delete n.nameGap, process.env.NODE_ENV !== "production" && Mr("nameGap property in radar component has been changed to axisNameGap")), process.env.NODE_ENV !== "production" && Ze(n.indicator, function(a) {
a.text && Xt("text", "name", "radar.indicator");
});
}), Ze(an(r.geo), function(n) {
ul(n) && (er(n), Ze(an(n.regions), function(a) {
er(a);
}));
}), Ze(an(r.timeline), function(n) {
er(n), ye(n, "label"), ye(n, "itemStyle"), ye(n, "controlStyle", !0);
var a = n.data;
z(a) && C(a, function(i) {
j(i) && (ye(i, "label"), ye(i, "itemStyle"));
});
}), Ze(an(r.toolbox), function(n) {
ye(n, "iconStyle"), Ze(n.feature, function(a) {
ye(a, "iconStyle");
});
}), Zt(c_(r.axisPointer), "label"), Zt(c_(r.tooltip).axisPointer, "label");
}
function Tk(r, e) {
for (var t = e.split(","), n = r, a = 0; a < t.length && (n = n && n[t[a]], n != null); a++)
;
return n;
}
function Ck(r, e, t, n) {
for (var a = e.split(","), i = r, o, s = 0; s < a.length - 1; s++)
o = a[s], i[o] == null && (i[o] = {}), i = i[o];
(n || i[a[s]] == null) && (i[a[s]] = t);
}
function v_(r) {
r && C(Dk, function(e) {
e[0] in r && !(e[1] in r) && (r[e[1]] = r[e[0]]);
});
}
var Dk = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], Ak = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], tv = [["borderRadius", "barBorderRadius"], ["borderColor", "barBorderColor"], ["borderWidth", "barBorderWidth"]];
function is(r) {
var e = r && r.itemStyle;
if (e)
for (var t = 0; t < tv.length; t++) {
var n = tv[t][1], a = tv[t][0];
e[n] != null && (e[a] = e[n], process.env.NODE_ENV !== "production" && Xt(n, a));
}
}
function p_(r) {
!r || r.alignTo === "edge" && r.margin != null && r.edgeDistance == null && (process.env.NODE_ENV !== "production" && Xt("label.margin", "label.edgeDistance", "pie"), r.edgeDistance = r.margin);
}
function d_(r) {
!r || r.downplay && !r.blur && (r.blur = r.downplay, process.env.NODE_ENV !== "production" && Xt("downplay", "blur", "sunburst"));
}
function Mk(r) {
!r || r.focusNodeAdjacency != null && (r.emphasis = r.emphasis || {}, r.emphasis.focus == null && (process.env.NODE_ENV !== "production" && Xt("focusNodeAdjacency", "emphasis: { focus: 'adjacency'}", "graph/sankey"), r.emphasis.focus = "adjacency"));
}
function gD(r, e) {
if (r)
for (var t = 0; t < r.length; t++)
e(r[t]), r[t] && gD(r[t].children, e);
}
function yD(r, e) {
bk(r, e), r.series = Pt(r.series), C(r.series, function(t) {
if (!!j(t)) {
var n = t.type;
if (n === "line")
t.clipOverflow != null && (t.clip = t.clipOverflow, process.env.NODE_ENV !== "production" && Xt("clipOverflow", "clip", "line"));
else if (n === "pie" || n === "gauge") {
t.clockWise != null && (t.clockwise = t.clockWise, process.env.NODE_ENV !== "production" && Xt("clockWise", "clockwise")), p_(t.label);
var a = t.data;
if (a && !Oe(a))
for (var i = 0; i < a.length; i++)
p_(a[i]);
t.hoverOffset != null && (t.emphasis = t.emphasis || {}, (t.emphasis.scaleSize = null) && (process.env.NODE_ENV !== "production" && Xt("hoverOffset", "emphasis.scaleSize"), t.emphasis.scaleSize = t.hoverOffset));
} else if (n === "gauge") {
var o = Tk(t, "pointer.color");
o != null && Ck(t, "itemStyle.color", o);
} else if (n === "bar") {
is(t), is(t.backgroundStyle), is(t.emphasis);
var a = t.data;
if (a && !Oe(a))
for (var i = 0; i < a.length; i++)
typeof a[i] == "object" && (is(a[i]), is(a[i] && a[i].emphasis));
} else if (n === "sunburst") {
var s = t.highlightPolicy;
s && (t.emphasis = t.emphasis || {}, t.emphasis.focus || (t.emphasis.focus = s, process.env.NODE_ENV !== "production" && Xt("highlightPolicy", "emphasis.focus", "sunburst"))), d_(t), gD(t.data, d_);
} else
n === "graph" || n === "sankey" ? Mk(t) : n === "map" && (t.mapType && !t.map && (process.env.NODE_ENV !== "production" && Xt("mapType", "map", "map"), t.map = t.mapType), t.mapLocation && (process.env.NODE_ENV !== "production" && Mr("`mapLocation` is not used anymore."), J(t, t.mapLocation)));
t.hoverAnimation != null && (t.emphasis = t.emphasis || {}, t.emphasis && t.emphasis.scale == null && (process.env.NODE_ENV !== "production" && Xt("hoverAnimation", "emphasis.scale"), t.emphasis.scale = t.hoverAnimation)), v_(t);
}
}), r.dataRange && (r.visualMap = r.dataRange), C(Ak, function(t) {
var n = r[t];
n && (z(n) || (n = [n]), C(n, function(a) {
v_(a);
}));
});
}
function Lk(r) {
var e = K();
r.eachSeries(function(t) {
var n = t.get("stack");
if (n) {
var a = e.get(n) || e.set(n, []), i = t.getData(), o = {
stackResultDimension: i.getCalculationInfo("stackResultDimension"),
stackedOverDimension: i.getCalculationInfo("stackedOverDimension"),
stackedDimension: i.getCalculationInfo("stackedDimension"),
stackedByDimension: i.getCalculationInfo("stackedByDimension"),
isStackedByIndex: i.getCalculationInfo("isStackedByIndex"),
data: i,
seriesModel: t
};
if (!o.stackedDimension || !(o.isStackedByIndex || o.stackedByDimension))
return;
a.length && i.setCalculationInfo("stackedOnSeries", a[a.length - 1].seriesModel), a.push(o);
}
}), e.each(Ik);
}
function Ik(r) {
C(r, function(e, t) {
var n = [], a = [NaN, NaN], i = [e.stackResultDimension, e.stackedOverDimension], o = e.data, s = e.isStackedByIndex, l = e.seriesModel.get("stackStrategy") || "samesign";
o.modify(i, function(u, f, h) {
var c = o.get(e.stackedDimension, h);
if (isNaN(c))
return a;
var v, p;
s ? p = o.getRawIndex(h) : v = o.get(e.stackedByDimension, h);
for (var d = NaN, g = t - 1; g >= 0; g--) {
var y = r[g];
if (s || (p = y.data.rawIndexOf(y.stackedByDimension, v)), p >= 0) {
var m = y.data.getByRawIndex(y.stackResultDimension, p);
if (l === "all" || l === "positive" && m > 0 || l === "negative" && m < 0 || l === "samesign" && c >= 0 && m > 0 || l === "samesign" && c <= 0 && m < 0) {
c = oP(c, m), d = m;
break;
}
}
}
return n[0] = c, n[1] = d, n;
});
});
}
var Wh = function() {
function r(e) {
this.data = e.data || (e.sourceFormat === tn ? {} : []), this.sourceFormat = e.sourceFormat || sD, this.seriesLayoutBy = e.seriesLayoutBy || Zr, this.startIndex = e.startIndex || 0, this.dimensionsDetectedCount = e.dimensionsDetectedCount, this.metaRawOption = e.metaRawOption;
var t = this.dimensionsDefine = e.dimensionsDefine;
if (t)
for (var n = 0; n < t.length; n++) {
var a = t[n];
a.type == null && fD(this, n) === le.Must && (a.type = "ordinal");
}
}
return r;
}();
function fy(r) {
return r instanceof Wh;
}
function Dd(r, e, t) {
t = t || mD(r);
var n = e.seriesLayoutBy, a = Pk(r, t, n, e.sourceHeader, e.dimensions), i = new Wh({
data: r,
sourceFormat: t,
seriesLayoutBy: n,
dimensionsDefine: a.dimensionsDefine,
startIndex: a.startIndex,
dimensionsDetectedCount: a.dimensionsDetectedCount,
metaRawOption: tt(e)
});
return i;
}
function hy(r) {
return new Wh({
data: r,
sourceFormat: Oe(r) ? pn : pr
});
}
function Ek(r) {
return new Wh({
data: r.data,
sourceFormat: r.sourceFormat,
seriesLayoutBy: r.seriesLayoutBy,
dimensionsDefine: tt(r.dimensionsDefine),
startIndex: r.startIndex,
dimensionsDetectedCount: r.dimensionsDetectedCount
});
}
function mD(r) {
var e = sD;
if (Oe(r))
e = pn;
else if (z(r)) {
r.length === 0 && (e = Se);
for (var t = 0, n = r.length; t < n; t++) {
var a = r[t];
if (a != null) {
if (z(a)) {
e = Se;
break;
} else if (j(a)) {
e = dr;
break;
}
}
}
} else if (j(r)) {
for (var i in r)
if (U(r, i) && me(r[i])) {
e = tn;
break;
}
}
return e;
}
function Pk(r, e, t, n, a) {
var i, o;
if (!r)
return {
dimensionsDefine: g_(a),
startIndex: o,
dimensionsDetectedCount: i
};
if (e === Se) {
var s = r;
n === "auto" || n == null ? y_(function(u) {
u != null && u !== "-" && (W(u) ? o == null && (o = 1) : o = 0);
}, t, s, 10) : o = wt(n) ? n : n ? 1 : 0, !a && o === 1 && (a = [], y_(function(u, f) {
a[f] = u != null ? u + "" : "";
}, t, s, 1 / 0)), i = a ? a.length : t === Ho ? s.length : s[0] ? s[0].length : null;
} else if (e === dr)
a || (a = Nk(r));
else if (e === tn)
a || (a = [], C(r, function(u, f) {
a.push(f);
}));
else if (e === pr) {
var l = No(r[0]);
i = z(l) && l.length || 1;
} else
e === pn && process.env.NODE_ENV !== "production" && Q(!!a, "dimensions must be given if data is TypedArray.");
return {
startIndex: o,
dimensionsDefine: g_(a),
dimensionsDetectedCount: i
};
}
function Nk(r) {
for (var e = 0, t; e < r.length && !(t = r[e++]); )
;
if (t) {
var n = [];
return C(t, function(a, i) {
n.push(i);
}), n;
}
}
function g_(r) {
if (!!r) {
var e = K();
return G(r, function(t, n) {
t = j(t) ? t : {
name: t
};
var a = {
name: t.name,
displayName: t.displayName,
type: t.type
};
if (a.name == null)
return a;
a.name += "", a.displayName == null && (a.displayName = a.name);
var i = e.get(a.name);
return i ? a.name += "-" + i.count++ : e.set(a.name, {
count: 1
}), a;
});
}
}
function y_(r, e, t, n) {
if (e === Ho)
for (var a = 0; a < t.length && a < n; a++)
r(t[a] ? t[a][0] : null, a);
else
for (var i = t[0] || [], a = 0; a < i.length && a < n; a++)
r(i[a], a);
}
function _D(r) {
var e = r.sourceFormat;
return e === dr || e === tn;
}
var Na, Ra, ka, m_, __, SD = function() {
function r(e, t) {
var n = fy(e) ? e : hy(e);
this._source = n;
var a = this._data = n.data;
if (n.sourceFormat === pn) {
if (process.env.NODE_ENV !== "production" && t == null)
throw new Error("Typed array data must specify dimension size");
this._offset = 0, this._dimSize = t, this._data = a;
}
__(this, a, n);
}
return r.prototype.getSource = function() {
return this._source;
}, r.prototype.count = function() {
return 0;
}, r.prototype.getItem = function(e, t) {
}, r.prototype.appendData = function(e) {
}, r.prototype.clean = function() {
}, r.protoInitialize = function() {
var e = r.prototype;
e.pure = !1, e.persistent = !0;
}(), r.internalField = function() {
var e;
__ = function(o, s, l) {
var u = l.sourceFormat, f = l.seriesLayoutBy, h = l.startIndex, c = l.dimensionsDefine, v = m_[cy(u, f)];
if (process.env.NODE_ENV !== "production" && Q(v, "Invalide sourceFormat: " + u), B(o, v), u === pn)
o.getItem = t, o.count = a, o.fillStorage = n;
else {
var p = xD(u, f);
o.getItem = Y(p, null, s, h, c);
var d = wD(u, f);
o.count = Y(d, null, s, h, c);
}
};
var t = function(o, s) {
o = o - this._offset, s = s || [];
for (var l = this._data, u = this._dimSize, f = u * o, h = 0; h < u; h++)
s[h] = l[f + h];
return s;
}, n = function(o, s, l, u) {
for (var f = this._data, h = this._dimSize, c = 0; c < h; c++) {
for (var v = u[c], p = v[0] == null ? 1 / 0 : v[0], d = v[1] == null ? -1 / 0 : v[1], g = s - o, y = l[c], m = 0; m < g; m++) {
var _ = f[m * h + c];
y[o + m] = _, _ < p && (p = _), _ > d && (d = _);
}
v[0] = p, v[1] = d;
}
}, a = function() {
return this._data ? this._data.length / this._dimSize : 0;
};
m_ = (e = {}, e[Se + "_" + Zr] = {
pure: !0,
appendData: i
}, e[Se + "_" + Ho] = {
pure: !0,
appendData: function() {
throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
}
}, e[dr] = {
pure: !0,
appendData: i
}, e[tn] = {
pure: !0,
appendData: function(o) {
var s = this._data;
C(o, function(l, u) {
for (var f = s[u] || (s[u] = []), h = 0; h < (l || []).length; h++)
f.push(l[h]);
});
}
}, e[pr] = {
appendData: i
}, e[pn] = {
persistent: !1,
pure: !0,
appendData: function(o) {
process.env.NODE_ENV !== "production" && Q(Oe(o), "Added data must be TypedArray if data in initialization is TypedArray"), this._data = o;
},
clean: function() {
this._offset += this.count(), this._data = null;
}
}, e);
function i(o) {
for (var s = 0; s < o.length; s++)
this._data.push(o[s]);
}
}(), r;
}(), S_ = function(r, e, t, n) {
return r[n];
}, Rk = (Na = {}, Na[Se + "_" + Zr] = function(r, e, t, n) {
return r[n + e];
}, Na[Se + "_" + Ho] = function(r, e, t, n, a) {
n += e;
for (var i = a || [], o = r, s = 0; s < o.length; s++) {
var l = o[s];
i[s] = l ? l[n] : null;
}
return i;
}, Na[dr] = S_, Na[tn] = function(r, e, t, n, a) {
for (var i = a || [], o = 0; o < t.length; o++) {
var s = t[o].name;
if (process.env.NODE_ENV !== "production" && s == null)
throw new Error();
var l = r[s];
i[o] = l ? l[n] : null;
}
return i;
}, Na[pr] = S_, Na);
function xD(r, e) {
var t = Rk[cy(r, e)];
return process.env.NODE_ENV !== "production" && Q(t, 'Do not support get item on "' + r + '", "' + e + '".'), t;
}
var x_ = function(r, e, t) {
return r.length;
}, kk = (Ra = {}, Ra[Se + "_" + Zr] = function(r, e, t) {
return Math.max(0, r.length - e);
}, Ra[Se + "_" + Ho] = function(r, e, t) {
var n = r[0];
return n ? Math.max(0, n.length - e) : 0;
}, Ra[dr] = x_, Ra[tn] = function(r, e, t) {
var n = t[0].name;
if (process.env.NODE_ENV !== "production" && n == null)
throw new Error();
var a = r[n];
return a ? a.length : 0;
}, Ra[pr] = x_, Ra);
function wD(r, e) {
var t = kk[cy(r, e)];
return process.env.NODE_ENV !== "production" && Q(t, 'Do not suppport count on "' + r + '", "' + e + '".'), t;
}
var ev = function(r, e, t) {
return r[e];
}, Ok = (ka = {}, ka[Se] = ev, ka[dr] = function(r, e, t) {
return r[t];
}, ka[tn] = ev, ka[pr] = function(r, e, t) {
var n = No(r);
return n instanceof Array ? n[e] : n;
}, ka[pn] = ev, ka);
function bD(r) {
var e = Ok[r];
return process.env.NODE_ENV !== "production" && Q(e, 'Do not suppport get value on "' + r + '".'), e;
}
function cy(r, e) {
return r === Se ? r + "_" + e : r;
}
function wo(r, e, t) {
if (!!r) {
var n = r.getRawDataItem(e);
if (n != null) {
var a = r.getStore(), i = a.getSource().sourceFormat;
if (t != null) {
var o = r.getDimensionIndex(t), s = a.getDimensionProperty(o);
return bD(i)(n, o, s);
} else {
var l = n;
return i === pr && (l = No(n)), l;
}
}
}
}
var Vk = /\{@(.+?)\}/g, vy = function() {
function r() {
}
return r.prototype.getDataParams = function(e, t) {
var n = this.getData(t), a = this.getRawValue(e, t), i = n.getRawIndex(e), o = n.getName(e), s = n.getRawDataItem(e), l = n.getItemVisual(e, "style"), u = l && l[n.getItemVisual(e, "drawType") || "fill"], f = l && l.stroke, h = this.mainType, c = h === "series", v = n.userOutput && n.userOutput.get();
return {
componentType: h,
componentSubType: this.subType,
componentIndex: this.componentIndex,
seriesType: c ? this.subType : null,
seriesIndex: this.seriesIndex,
seriesId: c ? this.id : null,
seriesName: c ? this.name : null,
name: o,
dataIndex: i,
data: s,
dataType: t,
value: a,
color: u,
borderColor: f,
dimensionNames: v ? v.fullDimensions : null,
encode: v ? v.encode : null,
$vars: ["seriesName", "name", "value"]
};
}, r.prototype.getFormattedLabel = function(e, t, n, a, i, o) {
t = t || "normal";
var s = this.getData(n), l = this.getDataParams(e, n);
if (o && (l.value = o.interpolatedValue), a != null && z(l.value) && (l.value = l.value[a]), !i) {
var u = s.getItemModel(e);
i = u.get(t === "normal" ? ["label", "formatter"] : [t, "label", "formatter"]);
}
if (q(i))
return l.status = t, l.dimensionIndex = a, i(l);
if (W(i)) {
var f = nD(i, l);
return f.replace(Vk, function(h, c) {
var v = c.length, p = c;
p.charAt(0) === "[" && p.charAt(v - 1) === "]" && (p = +p.slice(1, v - 1), process.env.NODE_ENV !== "production" && isNaN(p) && he("Invalide label formatter: @" + c + ", only support @[0], @[1], @[2], ..."));
var d = wo(s, e, p);
if (o && z(o.interpolatedValue)) {
var g = s.getDimensionIndex(p);
g >= 0 && (d = o.interpolatedValue[g]);
}
return d != null ? d + "" : "";
});
}
}, r.prototype.getRawValue = function(e, t) {
return wo(this.getData(t), e);
}, r.prototype.formatTooltip = function(e, t, n) {
}, r;
}();
function w_(r) {
var e, t;
return j(r) ? r.type ? t = r : process.env.NODE_ENV !== "production" && console.warn("The return type of `formatTooltip` is not supported: " + Me(r)) : e = r, {
text: e,
frag: t
};
}
function Zs(r) {
return new Bk(r);
}
var Bk = function() {
function r(e) {
e = e || {}, this._reset = e.reset, this._plan = e.plan, this._count = e.count, this._onDirty = e.onDirty, this._dirty = !0;
}
return r.prototype.perform = function(e) {
var t = this._upstream, n = e && e.skip;
if (this._dirty && t) {
var a = this.context;
a.data = a.outputData = t.context.outputData;
}
this.__pipeline && (this.__pipeline.currentTask = this);
var i;
this._plan && !n && (i = this._plan(this.context));
var o = f(this._modBy), s = this._modDataCount || 0, l = f(e && e.modBy), u = e && e.modDataCount || 0;
(o !== l || s !== u) && (i = "reset");
function f(m) {
return !(m >= 1) && (m = 1), m;
}
var h;
(this._dirty || i === "reset") && (this._dirty = !1, h = this._doReset(n)), this._modBy = l, this._modDataCount = u;
var c = e && e.step;
if (t ? (process.env.NODE_ENV !== "production" && Q(t._outputDueEnd != null), this._dueEnd = t._outputDueEnd) : (process.env.NODE_ENV !== "production" && Q(!this._progress || this._count), this._dueEnd = this._count ? this._count(this.context) : 1 / 0), this._progress) {
var v = this._dueIndex, p = Math.min(c != null ? this._dueIndex + c : 1 / 0, this._dueEnd);
if (!n && (h || v < p)) {
var d = this._progress;
if (z(d))
for (var g = 0; g < d.length; g++)
this._doProgress(d[g], v, p, l, u);
else
this._doProgress(d, v, p, l, u);
}
this._dueIndex = p;
var y = this._settedOutputEnd != null ? this._settedOutputEnd : p;
process.env.NODE_ENV !== "production" && Q(y >= this._outputDueEnd), this._outputDueEnd = y;
} else
this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;
return this.unfinished();
}, r.prototype.dirty = function() {
this._dirty = !0, this._onDirty && this._onDirty(this.context);
}, r.prototype._doProgress = function(e, t, n, a, i) {
b_.reset(t, n, a, i), this._callingProgress = e, this._callingProgress({
start: t,
end: n,
count: n - t,
next: b_.next
}, this.context);
}, r.prototype._doReset = function(e) {
this._dueIndex = this._outputDueEnd = this._dueEnd = 0, this._settedOutputEnd = null;
var t, n;
!e && this._reset && (t = this._reset(this.context), t && t.progress && (n = t.forceFirstProgress, t = t.progress), z(t) && !t.length && (t = null)), this._progress = t, this._modBy = this._modDataCount = null;
var a = this._downstream;
return a && a.dirty(), n;
}, r.prototype.unfinished = function() {
return this._progress && this._dueIndex < this._dueEnd;
}, r.prototype.pipe = function(e) {
process.env.NODE_ENV !== "production" && Q(e && !e._disposed && e !== this), (this._downstream !== e || this._dirty) && (this._downstream = e, e._upstream = this, e.dirty());
}, r.prototype.dispose = function() {
this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
}, r.prototype.getUpstream = function() {
return this._upstream;
}, r.prototype.getDownstream = function() {
return this._downstream;
}, r.prototype.setOutputEnd = function(e) {
this._outputDueEnd = this._settedOutputEnd = e;
}, r;
}(), b_ = function() {
var r, e, t, n, a, i = {
reset: function(l, u, f, h) {
e = l, r = u, t = f, n = h, a = Math.ceil(n / t), i.next = t > 1 && n > 0 ? s : o;
}
};
return i;
function o() {
return e < r ? e++ : null;
}
function s() {
var l = e % a * t + Math.ceil(e / a), u = e >= r ? null : l < n ? l : e;
return e++, u;
}
}();
function ta(r, e) {
var t = e && e.type;
return t === "ordinal" ? r : (t === "time" && !wt(r) && r != null && r !== "-" && (r = +jr(r)), r == null || r === "" ? NaN : +r);
}
var zk = K({
number: function(r) {
return parseFloat(r);
},
time: function(r) {
return +jr(r);
},
trim: function(r) {
return W(r) ? xr(r) : r;
}
});
function TD(r) {
return zk.get(r);
}
var CD = {
lt: function(r, e) {
return r < e;
},
lte: function(r, e) {
return r <= e;
},
gt: function(r, e) {
return r > e;
},
gte: function(r, e) {
return r >= e;
}
}, Gk = function() {
function r(e, t) {
if (!wt(t)) {
var n = "";
process.env.NODE_ENV !== "production" && (n = 'rvalue of "<", ">", "<=", ">=" can only be number in filter.'), Mt(n);
}
this._opFn = CD[e], this._rvalFloat = _n(t);
}
return r.prototype.evaluate = function(e) {
return wt(e) ? this._opFn(e, this._rvalFloat) : this._opFn(_n(e), this._rvalFloat);
}, r;
}(), DD = function() {
function r(e, t) {
var n = e === "desc";
this._resultLT = n ? 1 : -1, t == null && (t = n ? "min" : "max"), this._incomparable = t === "min" ? -1 / 0 : 1 / 0;
}
return r.prototype.evaluate = function(e, t) {
var n = wt(e) ? e : _n(e), a = wt(t) ? t : _n(t), i = isNaN(n), o = isNaN(a);
if (i && (n = this._incomparable), o && (a = this._incomparable), i && o) {
var s = W(e), l = W(t);
s && (n = l ? e : 0), l && (a = s ? t : 0);
}
return n < a ? this._resultLT : n > a ? -this._resultLT : 0;
}, r;
}(), Fk = function() {
function r(e, t) {
this._rval = t, this._isEQ = e, this._rvalTypeof = typeof t, this._rvalFloat = _n(t);
}
return r.prototype.evaluate = function(e) {
var t = e === this._rval;
if (!t) {
var n = typeof e;
n !== this._rvalTypeof && (n === "number" || this._rvalTypeof === "number") && (t = _n(e) === this._rvalFloat);
}
return this._isEQ ? t : !t;
}, r;
}();
function Hk(r, e) {
return r === "eq" || r === "ne" ? new Fk(r === "eq", e) : U(CD, r) ? new Gk(r, e) : null;
}
var $k = function() {
function r() {
}
return r.prototype.getRawData = function() {
throw new Error("not supported");
}, r.prototype.getRawDataItem = function(e) {
throw new Error("not supported");
}, r.prototype.cloneRawData = function() {
}, r.prototype.getDimensionInfo = function(e) {
}, r.prototype.cloneAllDimensionInfo = function() {
}, r.prototype.count = function() {
}, r.prototype.retrieveValue = function(e, t) {
}, r.prototype.retrieveValueFromItem = function(e, t) {
}, r.prototype.convertValue = function(e, t) {
return ta(e, t);
}, r;
}();
function Wk(r, e) {
var t = new $k(), n = r.data, a = t.sourceFormat = r.sourceFormat, i = r.startIndex, o = "";
r.seriesLayoutBy !== Zr && (process.env.NODE_ENV !== "production" && (o = '`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'), Mt(o));
var s = [], l = {}, u = r.dimensionsDefine;
if (u)
C(u, function(d, g) {
var y = d.name, m = {
index: g,
name: y,
displayName: d.displayName
};
if (s.push(m), y != null) {
var _ = "";
U(l, y) && (process.env.NODE_ENV !== "production" && (_ = 'dimension name "' + y + '" duplicated.'), Mt(_)), l[y] = m;
}
});
else
for (var f = 0; f < r.dimensionsDetectedCount; f++)
s.push({
index: f
});
var h = xD(a, Zr);
e.__isBuiltIn && (t.getRawDataItem = function(d) {
return h(n, i, s, d);
}, t.getRawData = Y(Uk, null, r)), t.cloneRawData = Y(Yk, null, r);
var c = wD(a, Zr);
t.count = Y(c, null, n, i, s);
var v = bD(a);
t.retrieveValue = function(d, g) {
var y = h(n, i, s, d);
return p(y, g);
};
var p = t.retrieveValueFromItem = function(d, g) {
if (d != null) {
var y = s[g];
if (y)
return v(d, g, y.name);
}
};
return t.getDimensionInfo = Y(Zk, null, s, l), t.cloneAllDimensionInfo = Y(Xk, null, s), t;
}
function Uk(r) {
var e = r.sourceFormat;
if (!py(e)) {
var t = "";
process.env.NODE_ENV !== "production" && (t = "`getRawData` is not supported in source format " + e), Mt(t);
}
return r.data;
}
function Yk(r) {
var e = r.sourceFormat, t = r.data;
if (!py(e)) {
var n = "";
process.env.NODE_ENV !== "production" && (n = "`cloneRawData` is not supported in source format " + e), Mt(n);
}
if (e === Se) {
for (var a = [], i = 0, o = t.length; i < o; i++)
a.push(t[i].slice());
return a;
} else if (e === dr) {
for (var a = [], i = 0, o = t.length; i < o; i++)
a.push(B({}, t[i]));
return a;
}
}
function Zk(r, e, t) {
if (t != null) {
if (wt(t) || !isNaN(t) && !U(e, t))
return r[t];
if (U(e, t))
return e[t];
}
}
function Xk(r) {
return tt(r);
}
var AD = K();
function qk(r) {
r = tt(r);
var e = r.type, t = "";
e || (process.env.NODE_ENV !== "production" && (t = "Must have a `type` when `registerTransform`."), Mt(t));
var n = e.split(":");
n.length !== 2 && (process.env.NODE_ENV !== "production" && (t = 'Name must include namespace like "ns:regression".'), Mt(t));
var a = !1;
n[0] === "echarts" && (e = n[1], a = !0), r.__isBuiltIn = a, AD.set(e, r);
}
function Kk(r, e, t) {
var n = Pt(r), a = n.length, i = "";
a || (process.env.NODE_ENV !== "production" && (i = "If `transform` declared, it should at least contain one transform."), Mt(i));
for (var o = 0, s = a; o < s; o++) {
var l = n[o];
e = jk(l, e, t, a === 1 ? null : o), o !== s - 1 && (e.length = Math.max(e.length, 1));
}
return e;
}
function jk(r, e, t, n) {
var a = "";
e.length || (process.env.NODE_ENV !== "production" && (a = "Must have at least one upstream dataset."), Mt(a)), j(r) || (process.env.NODE_ENV !== "production" && (a = "transform declaration must be an object rather than " + typeof r + "."), Mt(a));
var i = r.type, o = AD.get(i);
o || (process.env.NODE_ENV !== "production" && (a = 'Can not find transform on type "' + i + '".'), Mt(a));
var s = G(e, function(f) {
return Wk(f, o);
}), l = Pt(o.transform({
upstream: s[0],
upstreamList: s,
config: tt(r.config)
}));
if (process.env.NODE_ENV !== "production" && r.print) {
var u = G(l, function(f) {
var h = n != null ? " === pipe index: " + n : "";
return ["=== dataset index: " + t.datasetIndex + h + " ===", "- transform result data:", Me(f.data), "- transform result dimensions:", Me(f.dimensions)].join(`
`);
}).join(`
`);
hP(u);
}
return G(l, function(f, h) {
var c = "";
j(f) || (process.env.NODE_ENV !== "production" && (c = "A transform should not return some empty results."), Mt(c)), f.data || (process.env.NODE_ENV !== "production" && (c = "Transform result data should be not be null or undefined"), Mt(c));
var v = mD(f.data);
py(v) || (process.env.NODE_ENV !== "production" && (c = "Transform result data should be array rows or object rows."), Mt(c));
var p, d = e[0];
if (d && h === 0 && !f.dimensions) {
var g = d.startIndex;
g && (f.data = d.data.slice(0, g).concat(f.data)), p = {
seriesLayoutBy: Zr,
sourceHeader: g,
dimensions: d.metaRawOption.dimensions
};
} else
p = {
seriesLayoutBy: Zr,
sourceHeader: 0,
dimensions: f.dimensions
};
return Dd(f.data, p, null);
});
}
function py(r) {
return r === Se || r === dr;
}
var Uh = "undefined", Jk = typeof Uint32Array === Uh ? Array : Uint32Array, Qk = typeof Uint16Array === Uh ? Array : Uint16Array, MD = typeof Int32Array === Uh ? Array : Int32Array, T_ = typeof Float64Array === Uh ? Array : Float64Array, LD = {
float: T_,
int: MD,
ordinal: Array,
number: Array,
time: T_
}, rv;
function os(r) {
return r > 65535 ? Jk : Qk;
}
function Bi() {
return [1 / 0, -1 / 0];
}
function tO(r) {
var e = r.constructor;
return e === Array ? r.slice() : new e(r);
}
function C_(r, e, t, n, a) {
var i = LD[t || "float"];
if (a) {
var o = r[e], s = o && o.length;
if (s !== n) {
for (var l = new i(n), u = 0; u < s; u++)
l[u] = o[u];
r[e] = l;
}
} else
r[e] = new i(n);
}
var Ad = function() {
function r() {
this._chunks = [], this._rawExtent = [], this._extent = [], this._count = 0, this._rawCount = 0, this._calcDimNameToIdx = K();
}
return r.prototype.initData = function(e, t, n) {
process.env.NODE_ENV !== "production" && Q(q(e.getItem) && q(e.count), "Invalid data provider."), this._provider = e, this._chunks = [], this._indices = null, this.getRawIndex = this._getRawIdxIdentity;
var a = e.getSource(), i = this.defaultDimValueGetter = rv[a.sourceFormat];
this._dimValueGetter = n || i, this._rawExtent = [];
var o = _D(a);
this._dimensions = G(t, function(s) {
return process.env.NODE_ENV !== "production" && o && Q(s.property != null), {
type: s.type,
property: s.property
};
}), this._initDataFromProvider(0, e.count());
}, r.prototype.getProvider = function() {
return this._provider;
}, r.prototype.getSource = function() {
return this._provider.getSource();
}, r.prototype.ensureCalculationDimension = function(e, t) {
var n = this._calcDimNameToIdx, a = this._dimensions, i = n.get(e);
if (i != null) {
if (a[i].type === t)
return i;
} else
i = a.length;
return a[i] = {
type: t
}, n.set(e, i), this._chunks[i] = new LD[t || "float"](this._rawCount), this._rawExtent[i] = Bi(), i;
}, r.prototype.collectOrdinalMeta = function(e, t) {
var n = this._chunks[e], a = this._dimensions[e], i = this._rawExtent, o = a.ordinalOffset || 0, s = n.length;
o === 0 && (i[e] = Bi());
for (var l = i[e], u = o; u < s; u++) {
var f = n[u] = t.parseAndCollect(n[u]);
isNaN(f) || (l[0] = Math.min(f, l[0]), l[1] = Math.max(f, l[1]));
}
a.ordinalMeta = t, a.ordinalOffset = s, a.type = "ordinal";
}, r.prototype.getOrdinalMeta = function(e) {
var t = this._dimensions[e], n = t.ordinalMeta;
return n;
}, r.prototype.getDimensionProperty = function(e) {
var t = this._dimensions[e];
return t && t.property;
}, r.prototype.appendData = function(e) {
process.env.NODE_ENV !== "production" && Q(!this._indices, "appendData can only be called on raw data.");
var t = this._provider, n = this.count();
t.appendData(e);
var a = t.count();
return t.persistent || (a += n), n < a && this._initDataFromProvider(n, a, !0), [n, a];
}, r.prototype.appendValues = function(e, t) {
for (var n = this._chunks, a = this._dimensions, i = a.length, o = this._rawExtent, s = this.count(), l = s + Math.max(e.length, t || 0), u = 0; u < i; u++) {
var f = a[u];
C_(n, u, f.type, l, !0);
}
for (var h = [], c = s; c < l; c++)
for (var v = c - s, p = 0; p < i; p++) {
var f = a[p], d = rv.arrayRows.call(this, e[v] || h, f.property, v, p);
n[p][c] = d;
var g = o[p];
d < g[0] && (g[0] = d), d > g[1] && (g[1] = d);
}
return this._rawCount = this._count = l, {
start: s,
end: l
};
}, r.prototype._initDataFromProvider = function(e, t, n) {
for (var a = this._provider, i = this._chunks, o = this._dimensions, s = o.length, l = this._rawExtent, u = G(o, function(m) {
return m.property;
}), f = 0; f < s; f++) {
var h = o[f];
l[f] || (l[f] = Bi()), C_(i, f, h.type, t, n);
}
if (a.fillStorage)
a.fillStorage(e, t, i, l);
else
for (var c = [], v = e; v < t; v++) {
c = a.getItem(v, c);
for (var p = 0; p < s; p++) {
var d = i[p], g = this._dimValueGetter(c, u[p], v, p);
d[v] = g;
var y = l[p];
g < y[0] && (y[0] = g), g > y[1] && (y[1] = g);
}
}
!a.persistent && a.clean && a.clean(), this._rawCount = this._count = t, this._extent = [];
}, r.prototype.count = function() {
return this._count;
}, r.prototype.get = function(e, t) {
if (!(t >= 0 && t < this._count))
return NaN;
var n = this._chunks[e];
return n ? n[this.getRawIndex(t)] : NaN;
}, r.prototype.getValues = function(e, t) {
var n = [], a = [];
if (t == null) {
t = e, e = [];
for (var i = 0; i < this._dimensions.length; i++)
a.push(i);
} else
a = e;
for (var i = 0, o = a.length; i < o; i++)
n.push(this.get(a[i], t));
return n;
}, r.prototype.getByRawIndex = function(e, t) {
if (!(t >= 0 && t < this._rawCount))
return NaN;
var n = this._chunks[e];
return n ? n[t] : NaN;
}, r.prototype.getSum = function(e) {
var t = this._chunks[e], n = 0;
if (t)
for (var a = 0, i = this.count(); a < i; a++) {
var o = this.get(e, a);
isNaN(o) || (n += o);
}
return n;
}, r.prototype.getMedian = function(e) {
var t = [];
this.each([e], function(i) {
isNaN(i) || t.push(i);
});
var n = t.sort(function(i, o) {
return i - o;
}), a = this.count();
return a === 0 ? 0 : a % 2 === 1 ? n[(a - 1) / 2] : (n[a / 2] + n[a / 2 - 1]) / 2;
}, r.prototype.indexOfRawIndex = function(e) {
if (e >= this._rawCount || e < 0)
return -1;
if (!this._indices)
return e;
var t = this._indices, n = t[e];
if (n != null && n < this._count && n === e)
return e;
for (var a = 0, i = this._count - 1; a <= i; ) {
var o = (a + i) / 2 | 0;
if (t[o] < e)
a = o + 1;
else if (t[o] > e)
i = o - 1;
else
return o;
}
return -1;
}, r.prototype.indicesOfNearest = function(e, t, n) {
var a = this._chunks, i = a[e], o = [];
if (!i)
return o;
n == null && (n = 1 / 0);
for (var s = 1 / 0, l = -1, u = 0, f = 0, h = this.count(); f < h; f++) {
var c = this.getRawIndex(f), v = t - i[c], p = Math.abs(v);
p <= n && ((p < s || p === s && v >= 0 && l < 0) && (s = p, l = v, u = 0), v === l && (o[u++] = f));
}
return o.length = u, o;
}, r.prototype.getIndices = function() {
var e, t = this._indices;
if (t) {
var n = t.constructor, a = this._count;
if (n === Array) {
e = new n(a);
for (var i = 0; i < a; i++)
e[i] = t[i];
} else
e = new n(t.buffer, 0, a);
} else {
var n = os(this._rawCount);
e = new n(this.count());
for (var i = 0; i < e.length; i++)
e[i] = i;
}
return e;
}, r.prototype.filter = function(e, t) {
if (!this._count)
return this;
for (var n = this.clone(), a = n.count(), i = os(n._rawCount), o = new i(a), s = [], l = e.length, u = 0, f = e[0], h = n._chunks, c = 0; c < a; c++) {
var v = void 0, p = n.getRawIndex(c);
if (l === 0)
v = t(c);
else if (l === 1) {
var d = h[f][p];
v = t(d, c);
} else {
for (var g = 0; g < l; g++)
s[g] = h[e[g]][p];
s[g] = c, v = t.apply(null, s);
}
v && (o[u++] = p);
}
return u < a && (n._indices = o), n._count = u, n._extent = [], n._updateGetRawIdx(), n;
}, r.prototype.selectRange = function(e) {
var t = this.clone(), n = t._count;
if (!n)
return this;
var a = mt(e), i = a.length;
if (!i)
return this;
var o = t.count(), s = os(t._rawCount), l = new s(o), u = 0, f = a[0], h = e[f][0], c = e[f][1], v = t._chunks, p = !1;
if (!t._indices) {
var d = 0;
if (i === 1) {
for (var g = v[a[0]], y = 0; y < n; y++) {
var m = g[y];
(m >= h && m <= c || isNaN(m)) && (l[u++] = d), d++;
}
p = !0;
} else if (i === 2) {
for (var g = v[a[0]], _ = v[a[1]], S = e[a[1]][0], w = e[a[1]][1], y = 0; y < n; y++) {
var m = g[y], x = _[y];
(m >= h && m <= c || isNaN(m)) && (x >= S && x <= w || isNaN(x)) && (l[u++] = d), d++;
}
p = !0;
}
}
if (!p)
if (i === 1)
for (var y = 0; y < o; y++) {
var b = t.getRawIndex(y), m = v[a[0]][b];
(m >= h && m <= c || isNaN(m)) && (l[u++] = b);
}
else
for (var y = 0; y < o; y++) {
for (var T = !0, b = t.getRawIndex(y), D = 0; D < i; D++) {
var A = a[D], m = v[A][b];
(m < e[A][0] || m > e[A][1]) && (T = !1);
}
T && (l[u++] = t.getRawIndex(y));
}
return u < o && (t._indices = l), t._count = u, t._extent = [], t._updateGetRawIdx(), t;
}, r.prototype.map = function(e, t) {
var n = this.clone(e);
return this._updateDims(n, e, t), n;
}, r.prototype.modify = function(e, t) {
this._updateDims(this, e, t);
}, r.prototype._updateDims = function(e, t, n) {
for (var a = e._chunks, i = [], o = t.length, s = e.count(), l = [], u = e._rawExtent, f = 0; f < t.length; f++)
u[t[f]] = Bi();
for (var h = 0; h < s; h++) {
for (var c = e.getRawIndex(h), v = 0; v < o; v++)
l[v] = a[t[v]][c];
l[o] = h;
var p = n && n.apply(null, l);
if (p != null) {
typeof p != "object" && (i[0] = p, p = i);
for (var f = 0; f < p.length; f++) {
var d = t[f], g = p[f], y = u[d], m = a[d];
m && (m[c] = g), g < y[0] && (y[0] = g), g > y[1] && (y[1] = g);
}
}
}
}, r.prototype.lttbDownSample = function(e, t) {
var n = this.clone([e], !0), a = n._chunks, i = a[e], o = this.count(), s = 0, l = Math.floor(1 / t), u = this.getRawIndex(0), f, h, c, v = new (os(this._rawCount))(Math.min((Math.ceil(o / l) + 2) * 2, o));
v[s++] = u;
for (var p = 1; p < o - 1; p += l) {
for (var d = Math.min(p + l, o - 1), g = Math.min(p + l * 2, o), y = (g + d) / 2, m = 0, _ = d; _ < g; _++) {
var S = this.getRawIndex(_), w = i[S];
isNaN(w) || (m += w);
}
m /= g - d;
var x = p, b = Math.min(p + l, o), T = p - 1, D = i[u];
f = -1, c = x;
for (var A = -1, M = 0, _ = x; _ < b; _++) {
var S = this.getRawIndex(_), w = i[S];
if (isNaN(w)) {
M++, A < 0 && (A = S);
continue;
}
h = Math.abs((T - y) * (w - D) - (T - _) * (m - D)), h > f && (f = h, c = S);
}
M > 0 && M < b - x && (v[s++] = Math.min(A, c), c = Math.max(A, c)), v[s++] = c, u = c;
}
return v[s++] = this.getRawIndex(o - 1), n._count = s, n._indices = v, n.getRawIndex = this._getRawIdx, n;
}, r.prototype.downSample = function(e, t, n, a) {
for (var i = this.clone([e], !0), o = i._chunks, s = [], l = Math.floor(1 / t), u = o[e], f = this.count(), h = i._rawExtent[e] = Bi(), c = new (os(this._rawCount))(Math.ceil(f / l)), v = 0, p = 0; p < f; p += l) {
l > f - p && (l = f - p, s.length = l);
for (var d = 0; d < l; d++) {
var g = this.getRawIndex(p + d);
s[d] = u[g];
}
var y = n(s), m = this.getRawIndex(Math.min(p + a(s, y) || 0, f - 1));
u[m] = y, y < h[0] && (h[0] = y), y > h[1] && (h[1] = y), c[v++] = m;
}
return i._count = v, i._indices = c, i._updateGetRawIdx(), i;
}, r.prototype.each = function(e, t) {
if (!!this._count)
for (var n = e.length, a = this._chunks, i = 0, o = this.count(); i < o; i++) {
var s = this.getRawIndex(i);
switch (n) {
case 0:
t(i);
break;
case 1:
t(a[e[0]][s], i);
break;
case 2:
t(a[e[0]][s], a[e[1]][s], i);
break;
default:
for (var l = 0, u = []; l < n; l++)
u[l] = a[e[l]][s];
u[l] = i, t.apply(null, u);
}
}
}, r.prototype.getDataExtent = function(e) {
var t = this._chunks[e], n = Bi();
if (!t)
return n;
var a = this.count(), i = !this._indices, o;
if (i)
return this._rawExtent[e].slice();
if (o = this._extent[e], o)
return o.slice();
o = n;
for (var s = o[0], l = o[1], u = 0; u < a; u++) {
var f = this.getRawIndex(u), h = t[f];
h < s && (s = h), h > l && (l = h);
}
return o = [s, l], this._extent[e] = o, o;
}, r.prototype.getRawDataItem = function(e) {
var t = this.getRawIndex(e);
if (this._provider.persistent)
return this._provider.getItem(t);
for (var n = [], a = this._chunks, i = 0; i < a.length; i++)
n.push(a[i][t]);
return n;
}, r.prototype.clone = function(e, t) {
var n = new r(), a = this._chunks, i = e && Xr(e, function(s, l) {
return s[l] = !0, s;
}, {});
if (i)
for (var o = 0; o < a.length; o++)
n._chunks[o] = i[o] ? tO(a[o]) : a[o];
else
n._chunks = a;
return this._copyCommonProps(n), t || (n._indices = this._cloneIndices()), n._updateGetRawIdx(), n;
}, r.prototype._copyCommonProps = function(e) {
e._count = this._count, e._rawCount = this._rawCount, e._provider = this._provider, e._dimensions = this._dimensions, e._extent = tt(this._extent), e._rawExtent = tt(this._rawExtent);
}, r.prototype._cloneIndices = function() {
if (this._indices) {
var e = this._indices.constructor, t = void 0;
if (e === Array) {
var n = this._indices.length;
t = new e(n);
for (var a = 0; a < n; a++)
t[a] = this._indices[a];
} else
t = new e(this._indices);
return t;
}
return null;
}, r.prototype._getRawIdxIdentity = function(e) {
return e;
}, r.prototype._getRawIdx = function(e) {
return e < this._count && e >= 0 ? this._indices[e] : -1;
}, r.prototype._updateGetRawIdx = function() {
this.getRawIndex = this._indices ? this._getRawIdx : this._getRawIdxIdentity;
}, r.internalField = function() {
function e(t, n, a, i) {
return ta(t[i], this._dimensions[i]);
}
rv = {
arrayRows: e,
objectRows: function(t, n, a, i) {
return ta(t[n], this._dimensions[i]);
},
keyedColumns: e,
original: function(t, n, a, i) {
var o = t && (t.value == null ? t : t.value);
return ta(o instanceof Array ? o[i] : o, this._dimensions[i]);
},
typedArray: function(t, n, a, i) {
return t[i];
}
};
}(), r;
}(), ID = function() {
function r(e) {
this._sourceList = [], this._storeList = [], this._upstreamSignList = [], this._versionSignBase = 0, this._dirty = !0, this._sourceHost = e;
}
return r.prototype.dirty = function() {
this._setLocalSource([], []), this._storeList = [], this._dirty = !0;
}, r.prototype._setLocalSource = function(e, t) {
this._sourceList = e, this._upstreamSignList = t, this._versionSignBase++, this._versionSignBase > 9e10 && (this._versionSignBase = 0);
}, r.prototype._getVersionSign = function() {
return this._sourceHost.uid + "_" + this._versionSignBase;
}, r.prototype.prepareSource = function() {
this._isDirty() && (this._createSource(), this._dirty = !1);
}, r.prototype._createSource = function() {
this._setLocalSource([], []);
var e = this._sourceHost, t = this._getUpstreamSourceManagers(), n = !!t.length, a, i;
if (ss(e)) {
var o = e, s = void 0, l = void 0, u = void 0;
if (n) {
var f = t[0];
f.prepareSource(), u = f.getSource(), s = u.data, l = u.sourceFormat, i = [f._getVersionSign()];
} else
s = o.get("data", !0), l = Oe(s) ? pn : pr, i = [];
var h = this._getSourceMetaRawOption() || {}, c = u && u.metaRawOption || {}, v = vt(h.seriesLayoutBy, c.seriesLayoutBy) || null, p = vt(h.sourceHeader, c.sourceHeader), d = vt(h.dimensions, c.dimensions), g = v !== c.seriesLayoutBy || !!p != !!c.sourceHeader || d;
a = g ? [Dd(s, {
seriesLayoutBy: v,
sourceHeader: p,
dimensions: d
}, l)] : [];
} else {
var y = e;
if (n) {
var m = this._applyTransform(t);
a = m.sourceList, i = m.upstreamSignList;
} else {
var _ = y.get("source", !0);
a = [Dd(_, this._getSourceMetaRawOption(), null)], i = [];
}
}
process.env.NODE_ENV !== "production" && Q(a && i), this._setLocalSource(a, i);
}, r.prototype._applyTransform = function(e) {
var t = this._sourceHost, n = t.get("transform", !0), a = t.get("fromTransformResult", !0);
if (process.env.NODE_ENV !== "production" && Q(a != null || n != null), a != null) {
var i = "";
e.length !== 1 && (process.env.NODE_ENV !== "production" && (i = "When using `fromTransformResult`, there should be only one upstream dataset"), A_(i));
}
var o, s = [], l = [];
return C(e, function(u) {
u.prepareSource();
var f = u.getSource(a || 0), h = "";
a != null && !f && (process.env.NODE_ENV !== "production" && (h = "Can not retrieve result by `fromTransformResult`: " + a), A_(h)), s.push(f), l.push(u._getVersionSign());
}), n ? o = Kk(n, s, {
datasetIndex: t.componentIndex
}) : a != null && (o = [Ek(s[0])]), {
sourceList: o,
upstreamSignList: l
};
}, r.prototype._isDirty = function() {
if (this._dirty)
return !0;
for (var e = this._getUpstreamSourceManagers(), t = 0; t < e.length; t++) {
var n = e[t];
if (n._isDirty() || this._upstreamSignList[t] !== n._getVersionSign())
return !0;
}
}, r.prototype.getSource = function(e) {
e = e || 0;
var t = this._sourceList[e];
if (!t) {
var n = this._getUpstreamSourceManagers();
return n[0] && n[0].getSource(e);
}
return t;
}, r.prototype.getSharedDataStore = function(e) {
process.env.NODE_ENV !== "production" && Q(ss(this._sourceHost), "Can only call getDataStore on series source manager.");
var t = e.makeStoreSchema();
return this._innerGetDataStore(t.dimensions, e.source, t.hash);
}, r.prototype._innerGetDataStore = function(e, t, n) {
var a = 0, i = this._storeList, o = i[a];
o || (o = i[a] = {});
var s = o[n];
if (!s) {
var l = this._getUpstreamSourceManagers()[0];
ss(this._sourceHost) && l ? s = l._innerGetDataStore(e, t, n) : (s = new Ad(), s.initData(new SD(t, e.length), e)), o[n] = s;
}
return s;
}, r.prototype._getUpstreamSourceManagers = function() {
var e = this._sourceHost;
if (ss(e)) {
var t = ly(e);
return t ? [t.getSourceManager()] : [];
} else
return G(ek(e), function(n) {
return n.getSourceManager();
});
}, r.prototype._getSourceMetaRawOption = function() {
var e = this._sourceHost, t, n, a;
if (ss(e))
t = e.get("seriesLayoutBy", !0), n = e.get("sourceHeader", !0), a = e.get("dimensions", !0);
else if (!this._getUpstreamSourceManagers().length) {
var i = e;
t = i.get("seriesLayoutBy", !0), n = i.get("sourceHeader", !0), a = i.get("dimensions", !0);
}
return {
seriesLayoutBy: t,
sourceHeader: n,
dimensions: a
};
}, r;
}();
function D_(r) {
var e = r.option.transform;
e && mf(r.option.transform);
}
function ss(r) {
return r.mainType === "series";
}
function A_(r) {
throw new Error(r);
}
var ED = "line-height:1";
function PD(r, e) {
var t = r.color || "#6e7079", n = r.fontSize || 12, a = r.fontWeight || "400", i = r.color || "#464646", o = r.fontSize || 14, s = r.fontWeight || "900";
return e === "html" ? {
nameStyle: "font-size:" + $e(n + "") + "px;color:" + $e(t) + ";font-weight:" + $e(a + ""),
valueStyle: "font-size:" + $e(o + "") + "px;color:" + $e(i) + ";font-weight:" + $e(s + "")
} : {
nameStyle: {
fontSize: n,
fill: t,
fontWeight: a
},
valueStyle: {
fontSize: o,
fill: i,
fontWeight: s
}
};
}
var eO = [0, 10, 20, 30], rO = ["", `
`, `
`, `
`];
function ae(r, e) {
return e.type = r, e;
}
function Md(r) {
return r.type === "section";
}
function ND(r) {
return Md(r) ? nO : aO;
}
function RD(r) {
if (Md(r)) {
var e = 0, t = r.blocks.length, n = t > 1 || t > 0 && !r.noHeader;
return C(r.blocks, function(a) {
var i = RD(a);
i >= e && (e = i + +(n && (!i || Md(a) && !a.noHeader)));
}), e;
}
return 0;
}
function nO(r, e, t, n) {
var a = e.noHeader, i = iO(RD(e)), o = [], s = e.blocks || [];
Q(!s || z(s)), s = s || [];
var l = r.orderMode;
if (e.sortBlocks && l) {
s = s.slice();
var u = {
valueAsc: "asc",
valueDesc: "desc"
};
if (U(u, l)) {
var f = new DD(u[l], null);
s.sort(function(p, d) {
return f.evaluate(p.sortParam, d.sortParam);
});
} else
l === "seriesDesc" && s.reverse();
}
C(s, function(p, d) {
var g = e.valueFormatter, y = ND(p)(
g ? B(B({}, r), {
valueFormatter: g
}) : r,
p,
d > 0 ? i.html : 0,
n
);
y != null && o.push(y);
});
var h = r.renderMode === "richText" ? o.join(i.richText) : Ld(o.join(""), a ? t : i.html);
if (a)
return h;
var c = wd(e.header, "ordinal", r.useUTC), v = PD(n, r.renderMode).nameStyle;
return r.renderMode === "richText" ? kD(r, c, v) + i.richText + h : Ld('
' + $e(c) + "
" + h, t);
}
function aO(r, e, t, n) {
var a = r.renderMode, i = e.noName, o = e.noValue, s = !e.markerType, l = e.name, u = r.useUTC, f = e.valueFormatter || r.valueFormatter || function(S) {
return S = z(S) ? S : [S], G(S, function(w, x) {
return wd(w, z(v) ? v[x] : v, u);
});
};
if (!(i && o)) {
var h = s ? "" : r.markupStyleCreator.makeTooltipMarker(e.markerType, e.markerColor || "#333", a), c = i ? "" : wd(l, "ordinal", u), v = e.valueType, p = o ? [] : f(e.value), d = !s || !i, g = !s && i, y = PD(n, a), m = y.nameStyle, _ = y.valueStyle;
return a === "richText" ? (s ? "" : h) + (i ? "" : kD(r, c, m)) + (o ? "" : lO(r, p, d, g, _)) : Ld((s ? "" : h) + (i ? "" : oO(c, !s, m)) + (o ? "" : sO(p, d, g, _)), t);
}
}
function M_(r, e, t, n, a, i) {
if (!!r) {
var o = ND(r), s = {
useUTC: a,
renderMode: t,
orderMode: n,
markupStyleCreator: e,
valueFormatter: r.valueFormatter
};
return o(s, r, 0, i);
}
}
function iO(r) {
return {
html: eO[r],
richText: rO[r]
};
}
function Ld(r, e) {
var t = '', n = "margin: " + e + "px 0 0";
return '' + r + t + "
";
}
function oO(r, e, t) {
var n = e ? "margin-left:2px" : "";
return '' + $e(r) + "";
}
function sO(r, e, t, n) {
var a = t ? "10px" : "20px", i = e ? "float:right;margin-left:" + a : "";
return r = z(r) ? r : [r], '' + G(r, function(o) {
return $e(o);
}).join(" ") + "";
}
function kD(r, e, t) {
return r.markupStyleCreator.wrapRichTextStyle(e, t);
}
function lO(r, e, t, n, a) {
var i = [a], o = n ? 10 : 20;
return t && i.push({
padding: [0, 0, 0, o],
align: "right"
}), r.markupStyleCreator.wrapRichTextStyle(z(e) ? e.join(" ") : e, i);
}
function OD(r, e) {
var t = r.getData().getItemVisual(e, "style"), n = t[r.visualDrawType];
return mi(n);
}
function VD(r, e) {
var t = r.get("padding");
return t != null ? t : e === "richText" ? [8, 10] : 10;
}
var nv = function() {
function r() {
this.richTextStyles = {}, this._nextStyleNameId = OT();
}
return r.prototype._generateStyleName = function() {
return "__EC_aUTo_" + this._nextStyleNameId++;
}, r.prototype.makeTooltipMarker = function(e, t, n) {
var a = n === "richText" ? this._generateStyleName() : null, i = XR({
color: t,
type: e,
renderMode: n,
markerId: a
});
return W(i) ? i : (process.env.NODE_ENV !== "production" && Q(a), this.richTextStyles[a] = i.style, i.content);
}, r.prototype.wrapRichTextStyle = function(e, t) {
var n = {};
z(t) ? C(t, function(i) {
return B(n, i);
}) : B(n, t);
var a = this._generateStyleName();
return this.richTextStyles[a] = n, "{" + a + "|" + e + "}";
}, r;
}();
function BD(r) {
var e = r.series, t = r.dataIndex, n = r.multipleSeries, a = e.getData(), i = a.mapDimensionsAll("defaultedTooltip"), o = i.length, s = e.getRawValue(t), l = z(s), u = OD(e, t), f, h, c, v;
if (o > 1 || l && !o) {
var p = uO(s, e, t, i, u);
f = p.inlineValues, h = p.inlineValueTypes, c = p.blocks, v = p.inlineValues[0];
} else if (o) {
var d = a.getDimensionInfo(i[0]);
v = f = wo(a, t, i[0]), h = d.type;
} else
v = f = l ? s[0] : s;
var g = Gg(e), y = g && e.name || "", m = a.getName(t), _ = n ? y : m;
return ae("section", {
header: y,
noHeader: n || !g,
sortParam: v,
blocks: [ae("nameValue", {
markerType: "item",
markerColor: u,
name: _,
noName: !xr(_),
value: f,
valueType: h
})].concat(c || [])
});
}
function uO(r, e, t, n, a) {
var i = e.getData(), o = Xr(r, function(h, c, v) {
var p = i.getDimensionInfo(v);
return h = h || p && p.tooltip !== !1 && p.displayName != null;
}, !1), s = [], l = [], u = [];
n.length ? C(n, function(h) {
f(wo(i, t, h), h);
}) : C(r, f);
function f(h, c) {
var v = i.getDimensionInfo(c);
!v || v.otherDims.tooltip === !1 || (o ? u.push(ae("nameValue", {
markerType: "subItem",
markerColor: a,
name: v.displayName,
value: h,
valueType: v.type
})) : (s.push(h), l.push(v.type)));
}
return {
inlineValues: s,
inlineValueTypes: l,
blocks: u
};
}
var Nn = Tt();
function pu(r, e) {
return r.getName(e) || r.getId(e);
}
var uf = "__universalTransitionEnabled", Yh = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t._selectedDataIndicesMap = {}, t;
}
return e.prototype.init = function(t, n, a) {
this.seriesIndex = this.componentIndex, this.dataTask = Zs({
count: hO,
reset: cO
}), this.dataTask.context = {
model: this
}, this.mergeDefaultAndTheme(t, a);
var i = Nn(this).sourceManager = new ID(this);
i.prepareSource();
var o = this.getInitialData(t, a);
I_(o, this), this.dataTask.context.data = o, process.env.NODE_ENV !== "production" && Q(o, "getInitialData returned invalid data."), Nn(this).dataBeforeProcessed = o, L_(this), this._initSelectedMapFromData(o);
}, e.prototype.mergeDefaultAndTheme = function(t, n) {
var a = ll(this), i = a ? Go(t) : {}, o = this.subType;
_t.hasClass(o) && (o += "Series"), lt(t, n.getTheme().get(this.subType)), lt(t, this.getDefaultOption()), pi(t, "label", ["show"]), this.fillDataTextStyle(t.data), a && oa(t, i, a);
}, e.prototype.mergeOption = function(t, n) {
t = lt(this.option, t, !0), this.fillDataTextStyle(t.data);
var a = ll(this);
a && oa(this.option, t, a);
var i = Nn(this).sourceManager;
i.dirty(), i.prepareSource();
var o = this.getInitialData(t, n);
I_(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, Nn(this).dataBeforeProcessed = o, L_(this), this._initSelectedMapFromData(o);
}, e.prototype.fillDataTextStyle = function(t) {
if (t && !Oe(t))
for (var n = ["show"], a = 0; a < t.length; a++)
t[a] && t[a].label && pi(t[a], "label", n);
}, e.prototype.getInitialData = function(t, n) {
}, e.prototype.appendData = function(t) {
var n = this.getRawData();
n.appendData(t.data);
}, e.prototype.getData = function(t) {
var n = Id(this);
if (n) {
var a = n.context.data;
return t == null ? a : a.getLinkedData(t);
} else
return Nn(this).data;
}, e.prototype.getAllData = function() {
var t = this.getData();
return t && t.getLinkedDataAll ? t.getLinkedDataAll() : [{
data: t
}];
}, e.prototype.setData = function(t) {
var n = Id(this);
if (n) {
var a = n.context;
a.outputData = t, n !== this.dataTask && (a.data = t);
}
Nn(this).data = t;
}, e.prototype.getEncode = function() {
var t = this.get("encode", !0);
if (t)
return K(t);
}, e.prototype.getSourceManager = function() {
return Nn(this).sourceManager;
}, e.prototype.getSource = function() {
return this.getSourceManager().getSource();
}, e.prototype.getRawData = function() {
return Nn(this).dataBeforeProcessed;
}, e.prototype.getColorBy = function() {
var t = this.get("colorBy");
return t || "series";
}, e.prototype.isColorBySeries = function() {
return this.getColorBy() === "series";
}, e.prototype.getBaseAxis = function() {
var t = this.coordinateSystem;
return t && t.getBaseAxis && t.getBaseAxis();
}, e.prototype.formatTooltip = function(t, n, a) {
return BD({
series: this,
dataIndex: t,
multipleSeries: n
});
}, e.prototype.isAnimationEnabled = function() {
var t = this.ecModel;
if (Dt.node && !(t && t.ssr))
return !1;
var n = this.getShallow("animation");
return n && this.getData().count() > this.getShallow("animationThreshold") && (n = !1), !!n;
}, e.prototype.restoreData = function() {
this.dataTask.dirty();
}, e.prototype.getColorFromPalette = function(t, n, a) {
var i = this.ecModel, o = uy.prototype.getColorFromPalette.call(this, t, n, a);
return o || (o = i.getColorFromPalette(t, n, a)), o;
}, e.prototype.coordDimToDataDim = function(t) {
return this.getRawData().mapDimensionsAll(t);
}, e.prototype.getProgressive = function() {
return this.get("progressive");
}, e.prototype.getProgressiveThreshold = function() {
return this.get("progressiveThreshold");
}, e.prototype.select = function(t, n) {
this._innerSelect(this.getData(n), t);
}, e.prototype.unselect = function(t, n) {
var a = this.option.selectedMap;
if (!!a) {
var i = this.option.selectedMode, o = this.getData(n);
if (i === "series" || a === "all") {
this.option.selectedMap = {}, this._selectedDataIndicesMap = {};
return;
}
for (var s = 0; s < t.length; s++) {
var l = t[s], u = pu(o, l);
a[u] = !1, this._selectedDataIndicesMap[u] = -1;
}
}
}, e.prototype.toggleSelect = function(t, n) {
for (var a = [], i = 0; i < t.length; i++)
a[0] = t[i], this.isSelected(t[i], n) ? this.unselect(a, n) : this.select(a, n);
}, e.prototype.getSelectedDataIndices = function() {
if (this.option.selectedMap === "all")
return [].slice.call(this.getData().getIndices());
for (var t = this._selectedDataIndicesMap, n = mt(t), a = [], i = 0; i < n.length; i++) {
var o = t[n[i]];
o >= 0 && a.push(o);
}
return a;
}, e.prototype.isSelected = function(t, n) {
var a = this.option.selectedMap;
if (!a)
return !1;
var i = this.getData(n);
return (a === "all" || a[pu(i, t)]) && !i.getItemModel(t).get(["select", "disabled"]);
}, e.prototype.isUniversalTransitionEnabled = function() {
if (this[uf])
return !0;
var t = this.option.universalTransition;
return t ? t === !0 ? !0 : t && t.enabled : !1;
}, e.prototype._innerSelect = function(t, n) {
var a, i, o = this.option, s = o.selectedMode, l = n.length;
if (!(!s || !l)) {
if (s === "series")
o.selectedMap = "all";
else if (s === "multiple") {
j(o.selectedMap) || (o.selectedMap = {});
for (var u = o.selectedMap, f = 0; f < l; f++) {
var h = n[f], c = pu(t, h);
u[c] = !0, this._selectedDataIndicesMap[c] = t.getRawIndex(h);
}
} else if (s === "single" || s === !0) {
var v = n[l - 1], c = pu(t, v);
o.selectedMap = (a = {}, a[c] = !0, a), this._selectedDataIndicesMap = (i = {}, i[c] = t.getRawIndex(v), i);
}
}
}, e.prototype._initSelectedMapFromData = function(t) {
if (!this.option.selectedMap) {
var n = [];
t.hasItemOption && t.each(function(a) {
var i = t.getRawDataItem(a);
i && i.selected && n.push(a);
}), n.length > 0 && this._innerSelect(t, n);
}
}, e.registerClass = function(t) {
return _t.registerClass(t);
}, e.protoInitialize = function() {
var t = e.prototype;
t.type = "series.__base__", t.seriesIndex = 0, t.ignoreStyleOnData = !1, t.hasSymbolVisual = !1, t.defaultSymbol = "circle", t.visualStyleAccessPath = "itemStyle", t.visualDrawType = "fill";
}(), e;
}(_t);
Qt(Yh, vy);
Qt(Yh, uy);
UT(Yh, _t);
function L_(r) {
var e = r.name;
Gg(r) || (r.name = fO(r) || e);
}
function fO(r) {
var e = r.getRawData(), t = e.mapDimensionsAll("seriesName"), n = [];
return C(t, function(a) {
var i = e.getDimensionInfo(a);
i.displayName && n.push(i.displayName);
}), n.join(" ");
}
function hO(r) {
return r.model.getRawData().count();
}
function cO(r) {
var e = r.model;
return e.setData(e.getRawData().cloneShallow()), vO;
}
function vO(r, e) {
e.outputData && r.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
}
function I_(r, e) {
C(_f(r.CHANGABLE_METHODS, r.DOWNSAMPLE_METHODS), function(t) {
r.wrapMethod(t, it(pO, e));
});
}
function pO(r, e) {
var t = Id(r);
return t && t.setOutputEnd((e || this).count()), e;
}
function Id(r) {
var e = (r.ecModel || {}).scheduler, t = e && e.getPipeline(r.uid);
if (t) {
var n = t.currentTask;
if (n) {
var a = n.agentStubMap;
a && (n = a.get(r.uid));
}
return n;
}
}
const Gt = Yh;
var dy = function() {
function r() {
this.group = new nt(), this.uid = Bo("viewComponent");
}
return r.prototype.init = function(e, t) {
}, r.prototype.render = function(e, t, n, a) {
}, r.prototype.dispose = function(e, t) {
}, r.prototype.updateView = function(e, t, n, a) {
}, r.prototype.updateLayout = function(e, t, n, a) {
}, r.prototype.updateVisual = function(e, t, n, a) {
}, r.prototype.toggleBlurSeries = function(e, t, n) {
}, r.prototype.eachRendered = function(e) {
var t = this.group;
t && t.traverse(e);
}, r;
}();
Hg(dy);
Ah(dy);
const Ht = dy;
function Wo() {
var r = Tt();
return function(e) {
var t = r(e), n = e.pipelineContext, a = !!t.large, i = !!t.progressiveRender, o = t.large = !!(n && n.large), s = t.progressiveRender = !!(n && n.progressiveRender);
return (a !== o || i !== s) && "reset";
};
}
var zD = Tt(), dO = Wo(), gy = function() {
function r() {
this.group = new nt(), this.uid = Bo("viewChart"), this.renderTask = Zs({
plan: gO,
reset: yO
}), this.renderTask.context = {
view: this
};
}
return r.prototype.init = function(e, t) {
}, r.prototype.render = function(e, t, n, a) {
if (process.env.NODE_ENV !== "production")
throw new Error("render method must been implemented");
}, r.prototype.highlight = function(e, t, n, a) {
var i = e.getData(a && a.dataType);
if (!i) {
process.env.NODE_ENV !== "production" && he("Unknown dataType " + a.dataType);
return;
}
P_(i, a, "emphasis");
}, r.prototype.downplay = function(e, t, n, a) {
var i = e.getData(a && a.dataType);
if (!i) {
process.env.NODE_ENV !== "production" && he("Unknown dataType " + a.dataType);
return;
}
P_(i, a, "normal");
}, r.prototype.remove = function(e, t) {
this.group.removeAll();
}, r.prototype.dispose = function(e, t) {
}, r.prototype.updateView = function(e, t, n, a) {
this.render(e, t, n, a);
}, r.prototype.updateLayout = function(e, t, n, a) {
this.render(e, t, n, a);
}, r.prototype.updateVisual = function(e, t, n, a) {
this.render(e, t, n, a);
}, r.prototype.eachRendered = function(e) {
ca(this.group, e);
}, r.markUpdateMethod = function(e, t) {
zD(e).updateMethod = t;
}, r.protoInitialize = function() {
var e = r.prototype;
e.type = "chart";
}(), r;
}();
function E_(r, e, t) {
r && aa(r) && (e === "emphasis" ? Sn : xn)(r, t);
}
function P_(r, e, t) {
var n = di(r, e), a = e && e.highlightKey != null ? BN(e.highlightKey) : null;
n != null ? C(Pt(n), function(i) {
E_(r.getItemGraphicEl(i), t, a);
}) : r.eachItemGraphicEl(function(i) {
E_(i, t, a);
});
}
Hg(gy, ["dispose"]);
Ah(gy);
function gO(r) {
return dO(r.model);
}
function yO(r) {
var e = r.model, t = r.ecModel, n = r.api, a = r.payload, i = e.pipelineContext.progressiveRender, o = r.view, s = a && zD(a).updateMethod, l = i ? "incrementalPrepareRender" : s && o[s] ? s : "render";
return l !== "render" && o[l](e, t, n, a), mO[l];
}
var mO = {
incrementalPrepareRender: {
progress: function(r, e) {
e.view.incrementalRender(r, e.model, e.ecModel, e.api, e.payload);
}
},
render: {
forceFirstProgress: !0,
progress: function(r, e) {
e.view.render(e.model, e.ecModel, e.api, e.payload);
}
}
};
const Ot = gy;
var Vf = "\0__throttleOriginMethod", N_ = "\0__throttleRate", R_ = "\0__throttleType";
function yy(r, e, t) {
var n, a = 0, i = 0, o = null, s, l, u, f;
e = e || 0;
function h() {
i = new Date().getTime(), o = null, r.apply(l, u || []);
}
var c = function() {
for (var v = [], p = 0; p < arguments.length; p++)
v[p] = arguments[p];
n = new Date().getTime(), l = this, u = v;
var d = f || e, g = f || t;
f = null, s = n - (g ? a : i) - d, clearTimeout(o), g ? o = setTimeout(h, d) : s >= 0 ? h() : o = setTimeout(h, -s), a = n;
};
return c.clear = function() {
o && (clearTimeout(o), o = null);
}, c.debounceNextCall = function(v) {
f = v;
}, c;
}
function Uo(r, e, t, n) {
var a = r[e];
if (!!a) {
var i = a[Vf] || a, o = a[R_], s = a[N_];
if (s !== t || o !== n) {
if (t == null || !n)
return r[e] = i;
a = r[e] = yy(i, t, n === "debounce"), a[Vf] = i, a[R_] = n, a[N_] = t;
}
return a;
}
}
function fl(r, e) {
var t = r[e];
t && t[Vf] && (t.clear && t.clear(), r[e] = t[Vf]);
}
var k_ = Tt(), O_ = {
itemStyle: gi(WC, !0),
lineStyle: gi($C, !0)
}, _O = {
lineStyle: "stroke",
itemStyle: "fill"
};
function GD(r, e) {
var t = r.visualStyleMapper || O_[e];
return t || (console.warn("Unkown style type '" + e + "'."), O_.itemStyle);
}
function FD(r, e) {
var t = r.visualDrawType || _O[e];
return t || (console.warn("Unkown style type '" + e + "'."), "fill");
}
var SO = {
createOnAllSeries: !0,
performRawSeries: !0,
reset: function(r, e) {
var t = r.getData(), n = r.visualStyleAccessPath || "itemStyle", a = r.getModel(n), i = GD(r, n), o = i(a), s = a.getShallow("decal");
s && (t.setVisual("decal", s), s.dirty = !0);
var l = FD(r, n), u = o[l], f = q(u) ? u : null, h = o.fill === "auto" || o.stroke === "auto";
if (!o[l] || f || h) {
var c = r.getColorFromPalette(
r.name,
null,
e.getSeriesCount()
);
o[l] || (o[l] = c, t.setVisual("colorFromPalette", !0)), o.fill = o.fill === "auto" || q(o.fill) ? c : o.fill, o.stroke = o.stroke === "auto" || q(o.stroke) ? c : o.stroke;
}
if (t.setVisual("style", o), t.setVisual("drawType", l), !e.isSeriesFiltered(r) && f)
return t.setVisual("colorFromPalette", !1), {
dataEach: function(v, p) {
var d = r.getDataParams(p), g = B({}, o);
g[l] = f(d), v.setItemVisual(p, "style", g);
}
};
}
}, ls = new kt(), xO = {
createOnAllSeries: !0,
performRawSeries: !0,
reset: function(r, e) {
if (!(r.ignoreStyleOnData || e.isSeriesFiltered(r))) {
var t = r.getData(), n = r.visualStyleAccessPath || "itemStyle", a = GD(r, n), i = t.getVisual("drawType");
return {
dataEach: t.hasItemOption ? function(o, s) {
var l = o.getRawDataItem(s);
if (l && l[n]) {
ls.option = l[n];
var u = a(ls), f = o.ensureUniqueItemVisual(s, "style");
B(f, u), ls.option.decal && (o.setItemVisual(s, "decal", ls.option.decal), ls.option.decal.dirty = !0), i in u && o.setItemVisual(s, "colorFromPalette", !1);
}
} : null
};
}
}
}, wO = {
performRawSeries: !0,
overallReset: function(r) {
var e = K();
r.eachSeries(function(t) {
var n = t.getColorBy();
if (!t.isColorBySeries()) {
var a = t.type + "-" + n, i = e.get(a);
i || (i = {}, e.set(a, i)), k_(t).scope = i;
}
}), r.eachSeries(function(t) {
if (!(t.isColorBySeries() || r.isSeriesFiltered(t))) {
var n = t.getRawData(), a = {}, i = t.getData(), o = k_(t).scope, s = t.visualStyleAccessPath || "itemStyle", l = FD(t, s);
i.each(function(u) {
var f = i.getRawIndex(u);
a[f] = u;
}), n.each(function(u) {
var f = a[u], h = i.getItemVisual(f, "colorFromPalette");
if (h) {
var c = i.ensureUniqueItemVisual(f, "style"), v = n.getName(u) || u + "", p = n.count();
c[l] = t.getColorFromPalette(v, o, p);
}
});
}
});
}
}, du = Math.PI;
function bO(r, e) {
e = e || {}, J(e, {
text: "loading",
textColor: "#000",
fontSize: 12,
fontWeight: "normal",
fontStyle: "normal",
fontFamily: "sans-serif",
maskColor: "rgba(255, 255, 255, 0.8)",
showSpinner: !0,
color: "#5470c6",
spinnerRadius: 10,
lineWidth: 5,
zlevel: 0
});
var t = new nt(), n = new xt({
style: {
fill: e.maskColor
},
zlevel: e.zlevel,
z: 1e4
});
t.add(n);
var a = new Ct({
style: {
text: e.text,
fill: e.textColor,
fontSize: e.fontSize,
fontWeight: e.fontWeight,
fontStyle: e.fontStyle,
fontFamily: e.fontFamily
},
zlevel: e.zlevel,
z: 10001
}), i = new xt({
style: {
fill: "none"
},
textContent: a,
textConfig: {
position: "right",
distance: 10
},
zlevel: e.zlevel,
z: 10001
});
t.add(i);
var o;
return e.showSpinner && (o = new jg({
shape: {
startAngle: -du / 2,
endAngle: -du / 2 + 0.1,
r: e.spinnerRadius
},
style: {
stroke: e.color,
lineCap: "round",
lineWidth: e.lineWidth
},
zlevel: e.zlevel,
z: 10001
}), o.animateShape(!0).when(1e3, {
endAngle: du * 3 / 2
}).start("circularInOut"), o.animateShape(!0).when(1e3, {
startAngle: du * 3 / 2
}).delay(300).start("circularInOut"), t.add(o)), t.resize = function() {
var s = a.getBoundingRect().width, l = e.showSpinner ? e.spinnerRadius : 0, u = (r.getWidth() - l * 2 - (e.showSpinner && s ? 10 : 0) - s) / 2 - (e.showSpinner && s ? 0 : 5 + s / 2) + (e.showSpinner ? 0 : s / 2) + (s ? 0 : l), f = r.getHeight() / 2;
e.showSpinner && o.setShape({
cx: u,
cy: f
}), i.setShape({
x: u - l,
y: f - l,
width: l * 2,
height: l * 2
}), n.setShape({
x: 0,
y: 0,
width: r.getWidth(),
height: r.getHeight()
});
}, t.resize(), t;
}
var TO = function() {
function r(e, t, n, a) {
this._stageTaskMap = K(), this.ecInstance = e, this.api = t, n = this._dataProcessorHandlers = n.slice(), a = this._visualHandlers = a.slice(), this._allHandlers = n.concat(a);
}
return r.prototype.restoreData = function(e, t) {
e.restoreData(t), this._stageTaskMap.each(function(n) {
var a = n.overallTask;
a && a.dirty();
});
}, r.prototype.getPerformArgs = function(e, t) {
if (!!e.__pipeline) {
var n = this._pipelineMap.get(e.__pipeline.id), a = n.context, i = !t && n.progressiveEnabled && (!a || a.progressiveRender) && e.__idxInPipeline > n.blockIndex, o = i ? n.step : null, s = a && a.modDataCount, l = s != null ? Math.ceil(s / o) : null;
return {
step: o,
modBy: l,
modDataCount: s
};
}
}, r.prototype.getPipeline = function(e) {
return this._pipelineMap.get(e);
}, r.prototype.updateStreamModes = function(e, t) {
var n = this._pipelineMap.get(e.uid), a = e.getData(), i = a.count(), o = n.progressiveEnabled && t.incrementalPrepareRender && i >= n.threshold, s = e.get("large") && i >= e.get("largeThreshold"), l = e.get("progressiveChunkMode") === "mod" ? i : null;
e.pipelineContext = n.context = {
progressiveRender: o,
modDataCount: l,
large: s
};
}, r.prototype.restorePipelines = function(e) {
var t = this, n = t._pipelineMap = K();
e.eachSeries(function(a) {
var i = a.getProgressive(), o = a.uid;
n.set(o, {
id: o,
head: null,
tail: null,
threshold: a.getProgressiveThreshold(),
progressiveEnabled: i && !(a.preventIncremental && a.preventIncremental()),
blockIndex: -1,
step: Math.round(i || 700),
count: 0
}), t._pipe(a, a.dataTask);
});
}, r.prototype.prepareStageTasks = function() {
var e = this._stageTaskMap, t = this.api.getModel(), n = this.api;
C(this._allHandlers, function(a) {
var i = e.get(a.uid) || e.set(a.uid, {}), o = "";
process.env.NODE_ENV !== "production" && (o = '"reset" and "overallReset" must not be both specified.'), Q(!(a.reset && a.overallReset), o), a.reset && this._createSeriesStageTask(a, i, t, n), a.overallReset && this._createOverallStageTask(a, i, t, n);
}, this);
}, r.prototype.prepareView = function(e, t, n, a) {
var i = e.renderTask, o = i.context;
o.model = t, o.ecModel = n, o.api = a, i.__block = !e.incrementalPrepareRender, this._pipe(t, i);
}, r.prototype.performDataProcessorTasks = function(e, t) {
this._performStageTasks(this._dataProcessorHandlers, e, t, {
block: !0
});
}, r.prototype.performVisualTasks = function(e, t, n) {
this._performStageTasks(this._visualHandlers, e, t, n);
}, r.prototype._performStageTasks = function(e, t, n, a) {
a = a || {};
var i = !1, o = this;
C(e, function(l, u) {
if (!(a.visualType && a.visualType !== l.visualType)) {
var f = o._stageTaskMap.get(l.uid), h = f.seriesTaskMap, c = f.overallTask;
if (c) {
var v, p = c.agentStubMap;
p.each(function(g) {
s(a, g) && (g.dirty(), v = !0);
}), v && c.dirty(), o.updatePayload(c, n);
var d = o.getPerformArgs(c, a.block);
p.each(function(g) {
g.perform(d);
}), c.perform(d) && (i = !0);
} else
h && h.each(function(g, y) {
s(a, g) && g.dirty();
var m = o.getPerformArgs(g, a.block);
m.skip = !l.performRawSeries && t.isSeriesFiltered(g.context.model), o.updatePayload(g, n), g.perform(m) && (i = !0);
});
}
});
function s(l, u) {
return l.setDirty && (!l.dirtyMap || l.dirtyMap.get(u.__pipeline.id));
}
this.unfinished = i || this.unfinished;
}, r.prototype.performSeriesTasks = function(e) {
var t;
e.eachSeries(function(n) {
t = n.dataTask.perform() || t;
}), this.unfinished = t || this.unfinished;
}, r.prototype.plan = function() {
this._pipelineMap.each(function(e) {
var t = e.tail;
do {
if (t.__block) {
e.blockIndex = t.__idxInPipeline;
break;
}
t = t.getUpstream();
} while (t);
});
}, r.prototype.updatePayload = function(e, t) {
t !== "remain" && (e.context.payload = t);
}, r.prototype._createSeriesStageTask = function(e, t, n, a) {
var i = this, o = t.seriesTaskMap, s = t.seriesTaskMap = K(), l = e.seriesType, u = e.getTargetSeries;
e.createOnAllSeries ? n.eachRawSeries(f) : l ? n.eachRawSeriesByType(l, f) : u && u(n, a).each(f);
function f(h) {
var c = h.uid, v = s.set(c, o && o.get(c) || Zs({
plan: LO,
reset: IO,
count: PO
}));
v.context = {
model: h,
ecModel: n,
api: a,
useClearVisual: e.isVisual && !e.isLayout,
plan: e.plan,
reset: e.reset,
scheduler: i
}, i._pipe(h, v);
}
}, r.prototype._createOverallStageTask = function(e, t, n, a) {
var i = this, o = t.overallTask = t.overallTask || Zs({
reset: CO
});
o.context = {
ecModel: n,
api: a,
overallReset: e.overallReset,
scheduler: i
};
var s = o.agentStubMap, l = o.agentStubMap = K(), u = e.seriesType, f = e.getTargetSeries, h = !0, c = !1, v = "";
process.env.NODE_ENV !== "production" && (v = '"createOnAllSeries" do not supported for "overallReset", becuase it will block all streams.'), Q(!e.createOnAllSeries, v), u ? n.eachRawSeriesByType(u, p) : f ? f(n, a).each(p) : (h = !1, C(n.getSeries(), p));
function p(d) {
var g = d.uid, y = l.set(g, s && s.get(g) || (c = !0, Zs({
reset: DO,
onDirty: MO
})));
y.context = {
model: d,
overallProgress: h
}, y.agent = o, y.__block = h, i._pipe(d, y);
}
c && o.dirty();
}, r.prototype._pipe = function(e, t) {
var n = e.uid, a = this._pipelineMap.get(n);
!a.head && (a.head = t), a.tail && a.tail.pipe(t), a.tail = t, t.__idxInPipeline = a.count++, t.__pipeline = a;
}, r.wrapStageHandler = function(e, t) {
return q(e) && (e = {
overallReset: e,
seriesType: NO(e)
}), e.uid = Bo("stageHandler"), t && (e.visualType = t), e;
}, r;
}();
function CO(r) {
r.overallReset(r.ecModel, r.api, r.payload);
}
function DO(r) {
return r.overallProgress && AO;
}
function AO() {
this.agent.dirty(), this.getDownstream().dirty();
}
function MO() {
this.agent && this.agent.dirty();
}
function LO(r) {
return r.plan ? r.plan(r.model, r.ecModel, r.api, r.payload) : null;
}
function IO(r) {
r.useClearVisual && r.data.clearAllVisual();
var e = r.resetDefines = Pt(r.reset(r.model, r.ecModel, r.api, r.payload));
return e.length > 1 ? G(e, function(t, n) {
return HD(n);
}) : EO;
}
var EO = HD(0);
function HD(r) {
return function(e, t) {
var n = t.data, a = t.resetDefines[r];
if (a && a.dataEach)
for (var i = e.start; i < e.end; i++)
a.dataEach(n, i);
else
a && a.progress && a.progress(e, n);
};
}
function PO(r) {
return r.data.count();
}
function NO(r) {
Bf = null;
try {
r(hl, $D);
} catch {
}
return Bf;
}
var hl = {}, $D = {}, Bf;
WD(hl, pD);
WD($D, dD);
hl.eachSeriesByType = hl.eachRawSeriesByType = function(r) {
Bf = r;
};
hl.eachComponent = function(r) {
r.mainType === "series" && r.subType && (Bf = r.subType);
};
function WD(r, e) {
for (var t in e.prototype)
r[t] = jt;
}
const UD = TO;
var V_ = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"];
const RO = {
color: V_,
colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], V_]
};
var we = "#B9B8CE", B_ = "#100C2A", gu = function() {
return {
axisLine: {
lineStyle: {
color: we
}
},
splitLine: {
lineStyle: {
color: "#484753"
}
},
splitArea: {
areaStyle: {
color: ["rgba(255,255,255,0.02)", "rgba(255,255,255,0.05)"]
}
},
minorSplitLine: {
lineStyle: {
color: "#20203B"
}
}
};
}, z_ = ["#4992ff", "#7cffb2", "#fddd60", "#ff6e76", "#58d9f9", "#05c091", "#ff8a45", "#8d48e3", "#dd79ff"], YD = {
darkMode: !0,
color: z_,
backgroundColor: B_,
axisPointer: {
lineStyle: {
color: "#817f91"
},
crossStyle: {
color: "#817f91"
},
label: {
color: "#fff"
}
},
legend: {
textStyle: {
color: we
}
},
textStyle: {
color: we
},
title: {
textStyle: {
color: "#EEF1FA"
},
subtextStyle: {
color: "#B9B8CE"
}
},
toolbox: {
iconStyle: {
borderColor: we
}
},
dataZoom: {
borderColor: "#71708A",
textStyle: {
color: we
},
brushStyle: {
color: "rgba(135,163,206,0.3)"
},
handleStyle: {
color: "#353450",
borderColor: "#C5CBE3"
},
moveHandleStyle: {
color: "#B0B6C3",
opacity: 0.3
},
fillerColor: "rgba(135,163,206,0.2)",
emphasis: {
handleStyle: {
borderColor: "#91B7F2",
color: "#4D587D"
},
moveHandleStyle: {
color: "#636D9A",
opacity: 0.7
}
},
dataBackground: {
lineStyle: {
color: "#71708A",
width: 1
},
areaStyle: {
color: "#71708A"
}
},
selectedDataBackground: {
lineStyle: {
color: "#87A3CE"
},
areaStyle: {
color: "#87A3CE"
}
}
},
visualMap: {
textStyle: {
color: we
}
},
timeline: {
lineStyle: {
color: we
},
label: {
color: we
},
controlStyle: {
color: we,
borderColor: we
}
},
calendar: {
itemStyle: {
color: B_
},
dayLabel: {
color: we
},
monthLabel: {
color: we
},
yearLabel: {
color: we
}
},
timeAxis: gu(),
logAxis: gu(),
valueAxis: gu(),
categoryAxis: gu(),
line: {
symbol: "circle"
},
graph: {
color: z_
},
gauge: {
title: {
color: we
},
axisLine: {
lineStyle: {
color: [[1, "rgba(207,212,219,0.2)"]]
}
},
axisLabel: {
color: we
},
detail: {
color: "#EEF1FA"
}
},
candlestick: {
itemStyle: {
color: "#f64e56",
color0: "#54ea92",
borderColor: "#f64e56",
borderColor0: "#54ea92"
}
}
};
YD.categoryAxis.splitLine.show = !1;
const kO = YD;
var OO = function() {
function r() {
}
return r.prototype.normalizeQuery = function(e) {
var t = {}, n = {}, a = {};
if (W(e)) {
var i = $r(e);
t.mainType = i.main || null, t.subType = i.sub || null;
} else {
var o = ["Index", "Name", "Id"], s = {
name: 1,
dataIndex: 1,
dataType: 1
};
C(e, function(l, u) {
for (var f = !1, h = 0; h < o.length; h++) {
var c = o[h], v = u.lastIndexOf(c);
if (v > 0 && v === u.length - c.length) {
var p = u.slice(0, v);
p !== "data" && (t.mainType = p, t[c.toLowerCase()] = l, f = !0);
}
}
s.hasOwnProperty(u) && (n[u] = l, f = !0), f || (a[u] = l);
});
}
return {
cptQuery: t,
dataQuery: n,
otherQuery: a
};
}, r.prototype.filter = function(e, t) {
var n = this.eventInfo;
if (!n)
return !0;
var a = n.targetEl, i = n.packedEvent, o = n.model, s = n.view;
if (!o || !s)
return !0;
var l = t.cptQuery, u = t.dataQuery;
return f(l, o, "mainType") && f(l, o, "subType") && f(l, o, "index", "componentIndex") && f(l, o, "name") && f(l, o, "id") && f(u, i, "name") && f(u, i, "dataIndex") && f(u, i, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(e, t.otherQuery, a, i));
function f(h, c, v, p) {
return h[v] == null || c[p || v] === h[v];
}
}, r.prototype.afterTrigger = function() {
this.eventInfo = null;
}, r;
}(), Ed = ["symbol", "symbolSize", "symbolRotate", "symbolOffset"], G_ = Ed.concat(["symbolKeepAspect"]), VO = {
createOnAllSeries: !0,
performRawSeries: !0,
reset: function(r, e) {
var t = r.getData();
if (r.legendIcon && t.setVisual("legendIcon", r.legendIcon), !r.hasSymbolVisual)
return;
for (var n = {}, a = {}, i = !1, o = 0; o < Ed.length; o++) {
var s = Ed[o], l = r.get(s);
q(l) ? (i = !0, a[s] = l) : n[s] = l;
}
if (n.symbol = n.symbol || r.defaultSymbol, t.setVisual(B({
legendIcon: r.legendIcon || n.symbol,
symbolKeepAspect: r.get("symbolKeepAspect")
}, n)), e.isSeriesFiltered(r))
return;
var u = mt(a);
function f(h, c) {
for (var v = r.getRawValue(c), p = r.getDataParams(c), d = 0; d < u.length; d++) {
var g = u[d];
h.setItemVisual(c, g, a[g](v, p));
}
}
return {
dataEach: i ? f : null
};
}
}, BO = {
createOnAllSeries: !0,
performRawSeries: !0,
reset: function(r, e) {
if (!r.hasSymbolVisual || e.isSeriesFiltered(r))
return;
var t = r.getData();
function n(a, i) {
for (var o = a.getItemModel(i), s = 0; s < G_.length; s++) {
var l = G_[s], u = o.getShallow(l, !0);
u != null && a.setItemVisual(i, l, u);
}
}
return {
dataEach: t.hasItemOption ? n : null
};
}
};
function my(r, e, t) {
switch (t) {
case "color":
var n = r.getItemVisual(e, "style");
return n[r.getVisual("drawType")];
case "opacity":
return r.getItemVisual(e, "style").opacity;
case "symbol":
case "symbolSize":
case "liftZ":
return r.getItemVisual(e, t);
default:
process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + t);
}
}
function Rl(r, e) {
switch (e) {
case "color":
var t = r.getVisual("style");
return t[r.getVisual("drawType")];
case "opacity":
return r.getVisual("style").opacity;
case "symbol":
case "symbolSize":
case "liftZ":
return r.getVisual(e);
default:
process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + e);
}
}
function ZD(r, e, t, n) {
switch (t) {
case "color":
var a = r.ensureUniqueItemVisual(e, "style");
a[r.getVisual("drawType")] = n, r.setItemVisual(e, "colorFromPalette", !1);
break;
case "opacity":
r.ensureUniqueItemVisual(e, "style").opacity = n;
break;
case "symbol":
case "symbolSize":
case "liftZ":
r.setItemVisual(e, t, n);
break;
default:
process.env.NODE_ENV !== "production" && console.warn("Unknown visual type " + t);
}
}
function XD(r, e) {
function t(n, a) {
var i = [];
return n.eachComponent({
mainType: "series",
subType: r,
query: a
}, function(o) {
i.push(o.seriesIndex);
}), i;
}
C([[r + "ToggleSelect", "toggleSelect"], [r + "Select", "select"], [r + "UnSelect", "unselect"]], function(n) {
e(n[0], function(a, i, o) {
a = B({}, a), process.env.NODE_ENV !== "production" && Xt(a.type, n[1]), o.dispatchAction(B(a, {
type: n[1],
seriesIndex: t(i, a)
}));
});
});
}
function zi(r, e, t, n, a) {
var i = r + e;
t.isSilent(i) || (process.env.NODE_ENV !== "production" && Mr("event " + i + " is deprecated."), n.eachComponent({
mainType: "series",
subType: "pie"
}, function(o) {
for (var s = o.seriesIndex, l = o.option.selectedMap, u = a.selected, f = 0; f < u.length; f++)
if (u[f].seriesIndex === s) {
var h = o.getData(), c = di(h, a.fromActionPayload);
t.trigger(i, {
type: i,
seriesId: o.id,
name: z(c) ? h.getName(c[0]) : h.getName(c),
selected: W(l) ? l : B({}, l)
});
}
}));
}
function zO(r, e, t) {
r.on("selectchanged", function(n) {
var a = t.getModel();
n.isFromClick ? (zi("map", "selectchanged", e, a, n), zi("pie", "selectchanged", e, a, n)) : n.fromAction === "select" ? (zi("map", "selected", e, a, n), zi("pie", "selected", e, a, n)) : n.fromAction === "unselect" && (zi("map", "unselected", e, a, n), zi("pie", "unselected", e, a, n));
});
}
function oo(r, e, t) {
for (var n; r && !(e(r) && (n = r, t)); )
r = r.__hostTarget || r.parent;
return n;
}
var GO = Math.round(Math.random() * 9), FO = typeof Object.defineProperty == "function", HO = function() {
function r() {
this._id = "__ec_inner_" + GO++;
}
return r.prototype.get = function(e) {
return this._guard(e)[this._id];
}, r.prototype.set = function(e, t) {
var n = this._guard(e);
return FO ? Object.defineProperty(n, this._id, {
value: t,
enumerable: !1,
configurable: !0
}) : n[this._id] = t, this;
}, r.prototype.delete = function(e) {
return this.has(e) ? (delete this._guard(e)[this._id], !0) : !1;
}, r.prototype.has = function(e) {
return !!this._guard(e)[this._id];
}, r.prototype._guard = function(e) {
if (e !== Object(e))
throw TypeError("Value of WeakMap is not a non-null object.");
return e;
}, r;
}();
const $O = HO;
var WO = gt.extend({
type: "triangle",
shape: {
cx: 0,
cy: 0,
width: 0,
height: 0
},
buildPath: function(r, e) {
var t = e.cx, n = e.cy, a = e.width / 2, i = e.height / 2;
r.moveTo(t, n - i), r.lineTo(t + a, n + i), r.lineTo(t - a, n + i), r.closePath();
}
}), UO = gt.extend({
type: "diamond",
shape: {
cx: 0,
cy: 0,
width: 0,
height: 0
},
buildPath: function(r, e) {
var t = e.cx, n = e.cy, a = e.width / 2, i = e.height / 2;
r.moveTo(t, n - i), r.lineTo(t + a, n), r.lineTo(t, n + i), r.lineTo(t - a, n), r.closePath();
}
}), YO = gt.extend({
type: "pin",
shape: {
x: 0,
y: 0,
width: 0,
height: 0
},
buildPath: function(r, e) {
var t = e.x, n = e.y, a = e.width / 5 * 3, i = Math.max(a, e.height), o = a / 2, s = o * o / (i - o), l = n - i + o + s, u = Math.asin(s / o), f = Math.cos(u) * o, h = Math.sin(u), c = Math.cos(u), v = o * 0.6, p = o * 0.7;
r.moveTo(t - f, l + s), r.arc(t, l, o, Math.PI - u, Math.PI * 2 + u), r.bezierCurveTo(t + f - h * v, l + s + c * v, t, n - p, t, n), r.bezierCurveTo(t, n - p, t - f + h * v, l + s + c * v, t - f, l + s), r.closePath();
}
}), ZO = gt.extend({
type: "arrow",
shape: {
x: 0,
y: 0,
width: 0,
height: 0
},
buildPath: function(r, e) {
var t = e.height, n = e.width, a = e.x, i = e.y, o = n / 3 * 2;
r.moveTo(a, i), r.lineTo(a + o, i + t), r.lineTo(a, i + t / 4 * 3), r.lineTo(a - o, i + t), r.lineTo(a, i), r.closePath();
}
}), XO = {
line: oe,
rect: xt,
roundRect: xt,
square: xt,
circle: Qr,
diamond: UO,
pin: YO,
arrow: ZO,
triangle: WO
}, qO = {
line: function(r, e, t, n, a) {
a.x1 = r, a.y1 = e + n / 2, a.x2 = r + t, a.y2 = e + n / 2;
},
rect: function(r, e, t, n, a) {
a.x = r, a.y = e, a.width = t, a.height = n;
},
roundRect: function(r, e, t, n, a) {
a.x = r, a.y = e, a.width = t, a.height = n, a.r = Math.min(t, n) / 4;
},
square: function(r, e, t, n, a) {
var i = Math.min(t, n);
a.x = r, a.y = e, a.width = i, a.height = i;
},
circle: function(r, e, t, n, a) {
a.cx = r + t / 2, a.cy = e + n / 2, a.r = Math.min(t, n) / 2;
},
diamond: function(r, e, t, n, a) {
a.cx = r + t / 2, a.cy = e + n / 2, a.width = t, a.height = n;
},
pin: function(r, e, t, n, a) {
a.x = r + t / 2, a.y = e + n / 2, a.width = t, a.height = n;
},
arrow: function(r, e, t, n, a) {
a.x = r + t / 2, a.y = e + n / 2, a.width = t, a.height = n;
},
triangle: function(r, e, t, n, a) {
a.cx = r + t / 2, a.cy = e + n / 2, a.width = t, a.height = n;
}
}, zf = {};
C(XO, function(r, e) {
zf[e] = new r();
});
var KO = gt.extend({
type: "symbol",
shape: {
symbolType: "",
x: 0,
y: 0,
width: 0,
height: 0
},
calculateTextPosition: function(r, e, t) {
var n = Df(r, e, t), a = this.shape;
return a && a.symbolType === "pin" && e.position === "inside" && (n.y = t.y + t.height * 0.4), n;
},
buildPath: function(r, e, t) {
var n = e.symbolType;
if (n !== "none") {
var a = zf[n];
a || (n = "rect", a = zf[n]), qO[n](e.x, e.y, e.width, e.height, a.shape), a.buildPath(r, a.shape, t);
}
}
});
function jO(r, e) {
if (this.type !== "image") {
var t = this.style;
this.__isEmptyBrush ? (t.stroke = r, t.fill = e || "#fff", t.lineWidth = 2) : this.shape.symbolType === "line" ? t.stroke = r : t.fill = r, this.markRedraw();
}
}
function Jt(r, e, t, n, a, i, o) {
var s = r.indexOf("empty") === 0;
s && (r = r.substr(5, 1).toLowerCase() + r.substr(6));
var l;
return r.indexOf("image://") === 0 ? l = RC(r.slice(8), new ft(e, t, n, a), o ? "center" : "cover") : r.indexOf("path://") === 0 ? l = kh(r.slice(7), {}, new ft(e, t, n, a), o ? "center" : "cover") : l = new KO({
shape: {
symbolType: r,
x: e,
y: t,
width: n,
height: a
}
}), l.__isEmptyBrush = s, l.setColor = jO, i && l.setColor(i), l;
}
function kl(r) {
return z(r) || (r = [+r, +r]), [r[0] || 0, r[1] || 0];
}
function Yo(r, e) {
if (r != null)
return z(r) || (r = [r, r]), [H(r[0], e[0]) || 0, H(vt(r[1], r[0]), e[1]) || 0];
}
function ri(r) {
return isFinite(r);
}
function JO(r, e, t) {
var n = e.x == null ? 0 : e.x, a = e.x2 == null ? 1 : e.x2, i = e.y == null ? 0 : e.y, o = e.y2 == null ? 0 : e.y2;
e.global || (n = n * t.width + t.x, a = a * t.width + t.x, i = i * t.height + t.y, o = o * t.height + t.y), n = ri(n) ? n : 0, a = ri(a) ? a : 1, i = ri(i) ? i : 0, o = ri(o) ? o : 0;
var s = r.createLinearGradient(n, i, a, o);
return s;
}
function QO(r, e, t) {
var n = t.width, a = t.height, i = Math.min(n, a), o = e.x == null ? 0.5 : e.x, s = e.y == null ? 0.5 : e.y, l = e.r == null ? 0.5 : e.r;
e.global || (o = o * n + t.x, s = s * a + t.y, l = l * i), o = ri(o) ? o : 0.5, s = ri(s) ? s : 0.5, l = l >= 0 && ri(l) ? l : 0.5;
var u = r.createRadialGradient(o, s, 0, o, s, l);
return u;
}
function Pd(r, e, t) {
for (var n = e.type === "radial" ? QO(r, e, t) : JO(r, e, t), a = e.colorStops, i = 0; i < a.length; i++)
n.addColorStop(a[i].offset, a[i].color);
return n;
}
function tV(r, e) {
if (r === e || !r && !e)
return !1;
if (!r || !e || r.length !== e.length)
return !0;
for (var t = 0; t < r.length; t++)
if (r[t] !== e[t])
return !0;
return !1;
}
function yu(r) {
return parseInt(r, 10);
}
function so(r, e, t) {
var n = ["width", "height"][e], a = ["clientWidth", "clientHeight"][e], i = ["paddingLeft", "paddingTop"][e], o = ["paddingRight", "paddingBottom"][e];
if (t[n] != null && t[n] !== "auto")
return parseFloat(t[n]);
var s = document.defaultView.getComputedStyle(r);
return (r[a] || yu(s[n]) || yu(r.style[n])) - (yu(s[i]) || 0) - (yu(s[o]) || 0) | 0;
}
function eV(r, e) {
return !r || r === "solid" || !(e > 0) ? null : r === "dashed" ? [4 * e, 2 * e] : r === "dotted" ? [e] : wt(r) ? [r] : z(r) ? r : null;
}
function _y(r) {
var e = r.style, t = e.lineDash && e.lineWidth > 0 && eV(e.lineDash, e.lineWidth), n = e.lineDashOffset;
if (t) {
var a = e.strokeNoScale && r.getLineScale ? r.getLineScale() : 1;
a && a !== 1 && (t = G(t, function(i) {
return i / a;
}), n /= a);
}
return [t, n];
}
var rV = new Jr(!0);
function Gf(r) {
var e = r.stroke;
return !(e == null || e === "none" || !(r.lineWidth > 0));
}
function F_(r) {
return typeof r == "string" && r !== "none";
}
function Ff(r) {
var e = r.fill;
return e != null && e !== "none";
}
function H_(r, e) {
if (e.fillOpacity != null && e.fillOpacity !== 1) {
var t = r.globalAlpha;
r.globalAlpha = e.fillOpacity * e.opacity, r.fill(), r.globalAlpha = t;
} else
r.fill();
}
function $_(r, e) {
if (e.strokeOpacity != null && e.strokeOpacity !== 1) {
var t = r.globalAlpha;
r.globalAlpha = e.strokeOpacity * e.opacity, r.stroke(), r.globalAlpha = t;
} else
r.stroke();
}
function Nd(r, e, t) {
var n = $g(e.image, e.__image, t);
if (Mh(n)) {
var a = r.createPattern(n, e.repeat || "repeat");
if (typeof DOMMatrix == "function" && a && a.setTransform) {
var i = new DOMMatrix();
i.translateSelf(e.x || 0, e.y || 0), i.rotateSelf(0, 0, (e.rotation || 0) * Ku), i.scaleSelf(e.scaleX || 1, e.scaleY || 1), a.setTransform(i);
}
return a;
}
}
function nV(r, e, t, n) {
var a, i = Gf(t), o = Ff(t), s = t.strokePercent, l = s < 1, u = !e.path;
(!e.silent || l) && u && e.createPathProxy();
var f = e.path || rV, h = e.__dirty;
if (!n) {
var c = t.fill, v = t.stroke, p = o && !!c.colorStops, d = i && !!v.colorStops, g = o && !!c.image, y = i && !!v.image, m = void 0, _ = void 0, S = void 0, w = void 0, x = void 0;
(p || d) && (x = e.getBoundingRect()), p && (m = h ? Pd(r, c, x) : e.__canvasFillGradient, e.__canvasFillGradient = m), d && (_ = h ? Pd(r, v, x) : e.__canvasStrokeGradient, e.__canvasStrokeGradient = _), g && (S = h || !e.__canvasFillPattern ? Nd(r, c, e) : e.__canvasFillPattern, e.__canvasFillPattern = S), y && (w = h || !e.__canvasStrokePattern ? Nd(r, v, e) : e.__canvasStrokePattern, e.__canvasStrokePattern = S), p ? r.fillStyle = m : g && (S ? r.fillStyle = S : o = !1), d ? r.strokeStyle = _ : y && (w ? r.strokeStyle = w : i = !1);
}
var b = e.getGlobalScale();
f.setScale(b[0], b[1], e.segmentIgnoreThreshold);
var T, D;
r.setLineDash && t.lineDash && (a = _y(e), T = a[0], D = a[1]);
var A = !0;
(u || h & Qi) && (f.setDPR(r.dpr), l ? f.setContext(null) : (f.setContext(r), A = !1), f.reset(), e.buildPath(f, e.shape, n), f.toStatic(), e.pathUpdated()), A && f.rebuildPath(r, l ? s : 1), T && (r.setLineDash(T), r.lineDashOffset = D), n || (t.strokeFirst ? (i && $_(r, t), o && H_(r, t)) : (o && H_(r, t), i && $_(r, t))), T && r.setLineDash([]);
}
function aV(r, e, t) {
var n = e.__image = $g(t.image, e.__image, e, e.onload);
if (!(!n || !Mh(n))) {
var a = t.x || 0, i = t.y || 0, o = e.getWidth(), s = e.getHeight(), l = n.width / n.height;
if (o == null && s != null ? o = s * l : s == null && o != null ? s = o / l : o == null && s == null && (o = n.width, s = n.height), t.sWidth && t.sHeight) {
var u = t.sx || 0, f = t.sy || 0;
r.drawImage(n, u, f, t.sWidth, t.sHeight, a, i, o, s);
} else if (t.sx && t.sy) {
var u = t.sx, f = t.sy, h = o - u, c = s - f;
r.drawImage(n, u, f, h, c, a, i, o, s);
} else
r.drawImage(n, a, i, o, s);
}
}
function iV(r, e, t) {
var n, a = t.text;
if (a != null && (a += ""), a) {
r.font = t.font || ra, r.textAlign = t.textAlign, r.textBaseline = t.textBaseline;
var i = void 0, o = void 0;
r.setLineDash && t.lineDash && (n = _y(e), i = n[0], o = n[1]), i && (r.setLineDash(i), r.lineDashOffset = o), t.strokeFirst ? (Gf(t) && r.strokeText(a, t.x, t.y), Ff(t) && r.fillText(a, t.x, t.y)) : (Ff(t) && r.fillText(a, t.x, t.y), Gf(t) && r.strokeText(a, t.x, t.y)), i && r.setLineDash([]);
}
}
var W_ = ["shadowBlur", "shadowOffsetX", "shadowOffsetY"], U_ = [
["lineCap", "butt"],
["lineJoin", "miter"],
["miterLimit", 10]
];
function qD(r, e, t, n, a) {
var i = !1;
if (!n && (t = t || {}, e === t))
return !1;
if (n || e.opacity !== t.opacity) {
ke(r, a), i = !0;
var o = Math.max(Math.min(e.opacity, 1), 0);
r.globalAlpha = isNaN(o) ? ii.opacity : o;
}
(n || e.blend !== t.blend) && (i || (ke(r, a), i = !0), r.globalCompositeOperation = e.blend || ii.blend);
for (var s = 0; s < W_.length; s++) {
var l = W_[s];
(n || e[l] !== t[l]) && (i || (ke(r, a), i = !0), r[l] = r.dpr * (e[l] || 0));
}
return (n || e.shadowColor !== t.shadowColor) && (i || (ke(r, a), i = !0), r.shadowColor = e.shadowColor || ii.shadowColor), i;
}
function Y_(r, e, t, n, a) {
var i = cl(e, a.inHover), o = n ? null : t && cl(t, a.inHover) || {};
if (i === o)
return !1;
var s = qD(r, i, o, n, a);
if ((n || i.fill !== o.fill) && (s || (ke(r, a), s = !0), F_(i.fill) && (r.fillStyle = i.fill)), (n || i.stroke !== o.stroke) && (s || (ke(r, a), s = !0), F_(i.stroke) && (r.strokeStyle = i.stroke)), (n || i.opacity !== o.opacity) && (s || (ke(r, a), s = !0), r.globalAlpha = i.opacity == null ? 1 : i.opacity), e.hasStroke()) {
var l = i.lineWidth, u = l / (i.strokeNoScale && e.getLineScale ? e.getLineScale() : 1);
r.lineWidth !== u && (s || (ke(r, a), s = !0), r.lineWidth = u);
}
for (var f = 0; f < U_.length; f++) {
var h = U_[f], c = h[0];
(n || i[c] !== o[c]) && (s || (ke(r, a), s = !0), r[c] = i[c] || h[1]);
}
return s;
}
function oV(r, e, t, n, a) {
return qD(r, cl(e, a.inHover), t && cl(t, a.inHover), n, a);
}
function KD(r, e) {
var t = e.transform, n = r.dpr || 1;
t ? r.setTransform(n * t[0], n * t[1], n * t[2], n * t[3], n * t[4], n * t[5]) : r.setTransform(n, 0, 0, n, 0, 0);
}
function sV(r, e, t) {
for (var n = !1, a = 0; a < r.length; a++) {
var i = r[a];
n = n || i.isZeroArea(), KD(e, i), e.beginPath(), i.buildPath(e, i.shape), e.clip();
}
t.allClipped = n;
}
function lV(r, e) {
return r && e ? r[0] !== e[0] || r[1] !== e[1] || r[2] !== e[2] || r[3] !== e[3] || r[4] !== e[4] || r[5] !== e[5] : !(!r && !e);
}
var Z_ = 1, X_ = 2, q_ = 3, K_ = 4;
function uV(r) {
var e = Ff(r), t = Gf(r);
return !(r.lineDash || !(+e ^ +t) || e && typeof r.fill != "string" || t && typeof r.stroke != "string" || r.strokePercent < 1 || r.strokeOpacity < 1 || r.fillOpacity < 1);
}
function ke(r, e) {
e.batchFill && r.fill(), e.batchStroke && r.stroke(), e.batchFill = "", e.batchStroke = "";
}
function cl(r, e) {
return e && r.__hoverStyle || r.style;
}
function jD(r, e) {
ni(r, e, { inHover: !1, viewWidth: 0, viewHeight: 0 }, !0);
}
function ni(r, e, t, n) {
var a = e.transform;
if (!e.shouldBePainted(t.viewWidth, t.viewHeight, !1, !1)) {
e.__dirty &= ~We, e.__isRendered = !1;
return;
}
var i = e.__clipPaths, o = t.prevElClipPaths, s = !1, l = !1;
if ((!o || tV(i, o)) && (o && o.length && (ke(r, t), r.restore(), l = s = !0, t.prevElClipPaths = null, t.allClipped = !1, t.prevEl = null), i && i.length && (ke(r, t), r.save(), sV(i, r, t), s = !0), t.prevElClipPaths = i), t.allClipped) {
e.__isRendered = !1;
return;
}
e.beforeBrush && e.beforeBrush(), e.innerBeforeBrush();
var u = t.prevEl;
u || (l = s = !0);
var f = e instanceof gt && e.autoBatch && uV(e.style);
s || lV(a, u.transform) ? (ke(r, t), KD(r, e)) : f || ke(r, t);
var h = cl(e, t.inHover);
e instanceof gt ? (t.lastDrawType !== Z_ && (l = !0, t.lastDrawType = Z_), Y_(r, e, u, l, t), (!f || !t.batchFill && !t.batchStroke) && r.beginPath(), nV(r, e, h, f), f && (t.batchFill = h.fill || "", t.batchStroke = h.stroke || "")) : e instanceof nl ? (t.lastDrawType !== q_ && (l = !0, t.lastDrawType = q_), Y_(r, e, u, l, t), iV(r, e, h)) : e instanceof ve ? (t.lastDrawType !== X_ && (l = !0, t.lastDrawType = X_), oV(r, e, u, l, t), aV(r, e, h)) : e.getTemporalDisplayables && (t.lastDrawType !== K_ && (l = !0, t.lastDrawType = K_), fV(r, e, t)), f && n && ke(r, t), e.innerAfterBrush(), e.afterBrush && e.afterBrush(), t.prevEl = e, e.__dirty = 0, e.__isRendered = !0;
}
function fV(r, e, t) {
var n = e.getDisplayables(), a = e.getTemporalDisplayables();
r.save();
var i = {
prevElClipPaths: null,
prevEl: null,
allClipped: !1,
viewWidth: t.viewWidth,
viewHeight: t.viewHeight,
inHover: t.inHover
}, o, s;
for (o = e.getCursor(), s = n.length; o < s; o++) {
var l = n[o];
l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), ni(r, l, i, o === s - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), i.prevEl = l;
}
for (var u = 0, f = a.length; u < f; u++) {
var l = a[u];
l.beforeBrush && l.beforeBrush(), l.innerBeforeBrush(), ni(r, l, i, u === f - 1), l.innerAfterBrush(), l.afterBrush && l.afterBrush(), i.prevEl = l;
}
e.clearTemporalDisplayables(), e.notClear = !0, r.restore();
}
var av = new $O(), j_ = new Dl(100), J_ = ["symbol", "symbolSize", "symbolKeepAspect", "color", "backgroundColor", "dashArrayX", "dashArrayY", "maxTileWidth", "maxTileHeight"];
function bo(r, e) {
if (r === "none")
return null;
var t = e.getDevicePixelRatio(), n = e.getZr(), a = n.painter.type === "svg";
r.dirty && av.delete(r);
var i = av.get(r);
if (i)
return i;
var o = J(r, {
symbol: "rect",
symbolSize: 1,
symbolKeepAspect: !0,
color: "rgba(0, 0, 0, 0.2)",
backgroundColor: null,
dashArrayX: 5,
dashArrayY: 5,
rotation: 0,
maxTileWidth: 512,
maxTileHeight: 512
});
o.backgroundColor === "none" && (o.backgroundColor = null);
var s = {
repeat: "repeat"
};
return l(s), s.rotation = o.rotation, s.scaleX = s.scaleY = a ? 1 : 1 / t, av.set(r, s), r.dirty = !1, s;
function l(u) {
for (var f = [t], h = !0, c = 0; c < J_.length; ++c) {
var v = o[J_[c]];
if (v != null && !z(v) && !W(v) && !wt(v) && typeof v != "boolean") {
h = !1;
break;
}
f.push(v);
}
var p;
if (h) {
p = f.join(",") + (a ? "-svg" : "");
var d = j_.get(p);
d && (a ? u.svgElement = d : u.image = d);
}
var g = QD(o.dashArrayX), y = hV(o.dashArrayY), m = JD(o.symbol), _ = cV(g), S = tA(y), w = !a && yn.createCanvas(), x = a && {
tag: "g",
attrs: {},
key: "dcl",
children: []
}, b = D(), T;
w && (w.width = b.width * t, w.height = b.height * t, T = w.getContext("2d")), A(), h && j_.put(p, w || x), u.image = w, u.svgElement = x, u.svgWidth = b.width, u.svgHeight = b.height;
function D() {
for (var M = 1, L = 0, I = _.length; L < I; ++L)
M = f0(M, _[L]);
for (var E = 1, L = 0, I = m.length; L < I; ++L)
E = f0(E, m[L].length);
M *= E;
var P = S * _.length * m.length;
if (process.env.NODE_ENV !== "production") {
var N = function(O) {
console.warn("Calculated decal size is greater than " + O + " due to decal option settings so " + O + " is used for the decal size. Please consider changing the decal option to make a smaller decal or set " + O + " to be larger to avoid incontinuity.");
};
M > o.maxTileWidth && N("maxTileWidth"), P > o.maxTileHeight && N("maxTileHeight");
}
return {
width: Math.max(1, Math.min(M, o.maxTileWidth)),
height: Math.max(1, Math.min(P, o.maxTileHeight))
};
}
function A() {
T && (T.clearRect(0, 0, w.width, w.height), o.backgroundColor && (T.fillStyle = o.backgroundColor, T.fillRect(0, 0, w.width, w.height)));
for (var M = 0, L = 0; L < y.length; ++L)
M += y[L];
if (M <= 0)
return;
for (var I = -S, E = 0, P = 0, N = 0; I < b.height; ) {
if (E % 2 === 0) {
for (var O = P / 2 % m.length, k = 0, V = 0, F = 0; k < b.width * 2; ) {
for (var $ = 0, L = 0; L < g[N].length; ++L)
$ += g[N][L];
if ($ <= 0)
break;
if (V % 2 === 0) {
var Z = (1 - o.symbolSize) * 0.5, et = k + g[N][V] * Z, ht = I + y[E] * Z, Lt = g[N][V] * o.symbolSize, At = y[E] * o.symbolSize, dt = F / 2 % m[O].length;
rt(et, ht, Lt, At, m[O][dt]);
}
k += g[N][V], ++F, ++V, V === g[N].length && (V = 0);
}
++N, N === g.length && (N = 0);
}
I += y[E], ++P, ++E, E === y.length && (E = 0);
}
function rt(yt, ut, X, ot, Vt) {
var St = a ? 1 : t, $t = Jt(Vt, yt * St, ut * St, X * St, ot * St, o.color, o.symbolKeepAspect);
if (a) {
var Ft = n.painter.renderOneToVNode($t);
Ft && x.children.push(Ft);
} else
jD(T, $t);
}
}
}
}
function JD(r) {
if (!r || r.length === 0)
return [["rect"]];
if (W(r))
return [[r]];
for (var e = !0, t = 0; t < r.length; ++t)
if (!W(r[t])) {
e = !1;
break;
}
if (e)
return JD([r]);
for (var n = [], t = 0; t < r.length; ++t)
W(r[t]) ? n.push([r[t]]) : n.push(r[t]);
return n;
}
function QD(r) {
if (!r || r.length === 0)
return [[0, 0]];
if (wt(r)) {
var e = Math.ceil(r);
return [[e, e]];
}
for (var t = !0, n = 0; n < r.length; ++n)
if (!wt(r[n])) {
t = !1;
break;
}
if (t)
return QD([r]);
for (var a = [], n = 0; n < r.length; ++n)
if (wt(r[n])) {
var e = Math.ceil(r[n]);
a.push([e, e]);
} else {
var e = G(r[n], function(s) {
return Math.ceil(s);
});
e.length % 2 === 1 ? a.push(e.concat(e)) : a.push(e);
}
return a;
}
function hV(r) {
if (!r || typeof r == "object" && r.length === 0)
return [0, 0];
if (wt(r)) {
var e = Math.ceil(r);
return [e, e];
}
var t = G(r, function(n) {
return Math.ceil(n);
});
return r.length % 2 ? t.concat(t) : t;
}
function cV(r) {
return G(r, function(e) {
return tA(e);
});
}
function tA(r) {
for (var e = 0, t = 0; t < r.length; ++t)
e += r[t];
return r.length % 2 === 1 ? e * 2 : e;
}
function vV(r, e) {
r.eachRawSeries(function(t) {
if (!r.isSeriesFiltered(t)) {
var n = t.getData();
n.hasItemVisual() && n.each(function(o) {
var s = n.getItemVisual(o, "decal");
if (s) {
var l = n.ensureUniqueItemVisual(o, "style");
l.decal = bo(s, e);
}
});
var a = n.getVisual("decal");
if (a) {
var i = n.getVisual("style");
i.decal = bo(a, e);
}
}
});
}
var pV = new vr();
const mr = pV;
var Hf = {};
function dV(r, e) {
process.env.NODE_ENV !== "production" && Hf[r] && he("Already has an implementation of " + r + "."), Hf[r] = e;
}
function gV(r) {
return process.env.NODE_ENV !== "production" && (Hf[r] || he("Implementation of " + r + " doesn't exists.")), Hf[r];
}
var Q_ = typeof window < "u", yV = 1, mV = 800, _V = 900, SV = 1e3, xV = 2e3, wV = 5e3, eA = 1e3, bV = 1100, Sy = 2e3, rA = 3e3, TV = 4e3, Zh = 4500, CV = 4600, DV = 5e3, AV = 6e3, nA = 7e3, MV = {
PROCESSOR: {
FILTER: SV,
SERIES_FILTER: mV,
STATISTIC: wV
},
VISUAL: {
LAYOUT: eA,
PROGRESSIVE_LAYOUT: bV,
GLOBAL: Sy,
CHART: rA,
POST_CHART_LAYOUT: CV,
COMPONENT: TV,
BRUSH: DV,
CHART_ITEM: Zh,
ARIA: AV,
DECAL: nA
}
}, ge = "__flagInMainProcess", Pe = "__pendingUpdate", iv = "__needsUpdateStatus", t1 = /^[a-zA-Z0-9_]+$/, ov = "__connectUpdateStatus", e1 = 0, LV = 1, IV = 2;
function aA(r) {
return function() {
for (var e = [], t = 0; t < arguments.length; t++)
e[t] = arguments[t];
if (this.isDisposed()) {
He(this.id);
return;
}
return oA(this, r, e);
};
}
function iA(r) {
return function() {
for (var e = [], t = 0; t < arguments.length; t++)
e[t] = arguments[t];
return oA(this, r, e);
};
}
function oA(r, e, t) {
return t[0] = t[0] && t[0].toLowerCase(), vr.prototype[e].apply(r, t);
}
var sA = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e;
}(vr), lA = sA.prototype;
lA.on = iA("on");
lA.off = iA("off");
var Gi, sv, mu, Rn, lv, uv, fv, us, fs, r1, n1, hv, a1, _u, i1, uA, Xe, o1, fA = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this, new OO()) || this;
i._chartsViews = [], i._chartsMap = {}, i._componentsViews = [], i._componentsMap = {}, i._pendingActions = [], a = a || {}, W(n) && (n = hA[n]), i._dom = t;
var o = "canvas", s = !1;
if (process.env.NODE_ENV !== "production") {
var l = Q_ ? window : global;
o = l.__ECHARTS__DEFAULT__RENDERER__ || o;
var u = l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__;
s = u == null ? s : u;
}
var f = i._zr = o0(t, {
renderer: a.renderer || o,
devicePixelRatio: a.devicePixelRatio,
width: a.width,
height: a.height,
ssr: a.ssr,
useDirtyRect: a.useDirtyRect == null ? s : a.useDirtyRect
});
i._ssr = a.ssr, i._throttledZrFlush = yy(Y(f.flush, f), 17), n = tt(n), n && yD(n, !0), i._theme = n, i._locale = zR(a.locale || UC), i._coordSysMgr = new $o();
var h = i._api = i1(i);
function c(v, p) {
return v.__prio - p.__prio;
}
return Ju(Wf, c), Ju(Rd, c), i._scheduler = new UD(i, h, Rd, Wf), i._messageCenter = new sA(), i._initEvents(), i.resize = Y(i.resize, i), f.animation.on("frame", i._onframe, i), r1(f, i), n1(f, i), mf(i), i;
}
return e.prototype._onframe = function() {
if (!this._disposed) {
o1(this);
var t = this._scheduler;
if (this[Pe]) {
var n = this[Pe].silent;
this[ge] = !0;
try {
Gi(this), Rn.update.call(this, null, this[Pe].updateParams);
} catch (l) {
throw this[ge] = !1, this[Pe] = null, l;
}
this._zr.flush(), this[ge] = !1, this[Pe] = null, us.call(this, n), fs.call(this, n);
} else if (t.unfinished) {
var a = yV, i = this._model, o = this._api;
t.unfinished = !1;
do {
var s = +new Date();
t.performSeriesTasks(i), t.performDataProcessorTasks(i), uv(this, i), t.performVisualTasks(i), _u(this, this._model, o, "remain", {}), a -= +new Date() - s;
} while (a > 0 && t.unfinished);
t.unfinished || this._zr.flush();
}
}
}, e.prototype.getDom = function() {
return this._dom;
}, e.prototype.getId = function() {
return this.id;
}, e.prototype.getZr = function() {
return this._zr;
}, e.prototype.isSSR = function() {
return this._ssr;
}, e.prototype.setOption = function(t, n, a) {
if (this[ge]) {
process.env.NODE_ENV !== "production" && he("`setOption` should not be called during main process.");
return;
}
if (this._disposed) {
He(this.id);
return;
}
var i, o, s;
if (j(n) && (a = n.lazyUpdate, i = n.silent, o = n.replaceMerge, s = n.transition, n = n.notMerge), this[ge] = !0, !this._model || n) {
var l = new xk(this._api), u = this._theme, f = this._model = new pD();
f.scheduler = this._scheduler, f.ssr = this._ssr, f.init(null, null, null, u, this._locale, l);
}
this._model.setOption(t, {
replaceMerge: o
}, kd);
var h = {
seriesTransition: s,
optionChanged: !0
};
if (a)
this[Pe] = {
silent: i,
updateParams: h
}, this[ge] = !1, this.getZr().wakeUp();
else {
try {
Gi(this), Rn.update.call(this, null, h);
} catch (c) {
throw this[Pe] = null, this[ge] = !1, c;
}
this._ssr || this._zr.flush(), this[Pe] = null, this[ge] = !1, us.call(this, i), fs.call(this, i);
}
}, e.prototype.setTheme = function() {
Mr("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
}, e.prototype.getModel = function() {
return this._model;
}, e.prototype.getOption = function() {
return this._model && this._model.getOption();
}, e.prototype.getWidth = function() {
return this._zr.getWidth();
}, e.prototype.getHeight = function() {
return this._zr.getHeight();
}, e.prototype.getDevicePixelRatio = function() {
return this._zr.painter.dpr || Q_ && window.devicePixelRatio || 1;
}, e.prototype.getRenderedCanvas = function(t) {
return process.env.NODE_ENV !== "production" && Xt("getRenderedCanvas", "renderToCanvas"), this.renderToCanvas(t);
}, e.prototype.renderToCanvas = function(t) {
t = t || {};
var n = this._zr.painter;
if (process.env.NODE_ENV !== "production" && n.type !== "canvas")
throw new Error("renderToCanvas can only be used in the canvas renderer.");
return n.getRenderedCanvas({
backgroundColor: t.backgroundColor || this._model.get("backgroundColor"),
pixelRatio: t.pixelRatio || this.getDevicePixelRatio()
});
}, e.prototype.renderToSVGString = function(t) {
t = t || {};
var n = this._zr.painter;
if (process.env.NODE_ENV !== "production" && n.type !== "svg")
throw new Error("renderToSVGString can only be used in the svg renderer.");
return n.renderToString({
useViewBox: t.useViewBox
});
}, e.prototype.getSvgDataURL = function() {
if (!!Dt.svgSupported) {
var t = this._zr, n = t.storage.getDisplayList();
return C(n, function(a) {
a.stopAnimation(null, !0);
}), t.painter.toDataURL();
}
}, e.prototype.getDataURL = function(t) {
if (this._disposed) {
He(this.id);
return;
}
t = t || {};
var n = t.excludeComponents, a = this._model, i = [], o = this;
C(n, function(l) {
a.eachComponent({
mainType: l
}, function(u) {
var f = o._componentsMap[u.__viewId];
f.group.ignore || (i.push(f), f.group.ignore = !0);
});
});
var s = this._zr.painter.getType() === "svg" ? this.getSvgDataURL() : this.renderToCanvas(t).toDataURL("image/" + (t && t.type || "png"));
return C(i, function(l) {
l.group.ignore = !1;
}), s;
}, e.prototype.getConnectedDataURL = function(t) {
if (this._disposed) {
He(this.id);
return;
}
var n = t.type === "svg", a = this.group, i = Math.min, o = Math.max, s = 1 / 0;
if (s1[a]) {
var l = s, u = s, f = -s, h = -s, c = [], v = t && t.pixelRatio || this.getDevicePixelRatio();
C(qs, function(_, S) {
if (_.group === a) {
var w = n ? _.getZr().painter.getSvgDom().innerHTML : _.renderToCanvas(tt(t)), x = _.getDom().getBoundingClientRect();
l = i(x.left, l), u = i(x.top, u), f = o(x.right, f), h = o(x.bottom, h), c.push({
dom: w,
left: x.left,
top: x.top
});
}
}), l *= v, u *= v, f *= v, h *= v;
var p = f - l, d = h - u, g = yn.createCanvas(), y = o0(g, {
renderer: n ? "svg" : "canvas"
});
if (y.resize({
width: p,
height: d
}), n) {
var m = "";
return C(c, function(_) {
var S = _.left - l, w = _.top - u;
m += '' + _.dom + "";
}), y.painter.getSvgRoot().innerHTML = m, t.connectedBackgroundColor && y.painter.setBackgroundColor(t.connectedBackgroundColor), y.refreshImmediately(), y.painter.toDataURL();
} else
return t.connectedBackgroundColor && y.add(new xt({
shape: {
x: 0,
y: 0,
width: p,
height: d
},
style: {
fill: t.connectedBackgroundColor
}
})), C(c, function(_) {
var S = new ve({
style: {
x: _.left * v - l,
y: _.top * v - u,
image: _.dom
}
});
y.add(S);
}), y.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png"));
} else
return this.getDataURL(t);
}, e.prototype.convertToPixel = function(t, n) {
return lv(this, "convertToPixel", t, n);
}, e.prototype.convertFromPixel = function(t, n) {
return lv(this, "convertFromPixel", t, n);
}, e.prototype.containPixel = function(t, n) {
if (this._disposed) {
He(this.id);
return;
}
var a = this._model, i, o = Hs(a, t);
return C(o, function(s, l) {
l.indexOf("Models") >= 0 && C(s, function(u) {
var f = u.coordinateSystem;
if (f && f.containPoint)
i = i || !!f.containPoint(n);
else if (l === "seriesModels") {
var h = this._chartsMap[u.__viewId];
h && h.containPoint ? i = i || h.containPoint(n, u) : process.env.NODE_ENV !== "production" && console.warn(l + ": " + (h ? "The found component do not support containPoint." : "No view mapping to the found component."));
} else
process.env.NODE_ENV !== "production" && console.warn(l + ": containPoint is not supported");
}, this);
}, this), !!i;
}, e.prototype.getVisual = function(t, n) {
var a = this._model, i = Hs(a, t, {
defaultMainType: "series"
}), o = i.seriesModel;
process.env.NODE_ENV !== "production" && (o || console.warn("There is no specified seires model"));
var s = o.getData(), l = i.hasOwnProperty("dataIndexInside") ? i.dataIndexInside : i.hasOwnProperty("dataIndex") ? s.indexOfRawIndex(i.dataIndex) : null;
return l != null ? my(s, l, n) : Rl(s, n);
}, e.prototype.getViewOfComponentModel = function(t) {
return this._componentsMap[t.__viewId];
}, e.prototype.getViewOfSeriesModel = function(t) {
return this._chartsMap[t.__viewId];
}, e.prototype._initEvents = function() {
var t = this;
C(EV, function(n) {
var a = function(i) {
var o = t.getModel(), s = i.target, l, u = n === "globalout";
if (u ? l = {} : s && oo(s, function(p) {
var d = at(p);
if (d && d.dataIndex != null) {
var g = d.dataModel || o.getSeriesByIndex(d.seriesIndex);
return l = g && g.getDataParams(d.dataIndex, d.dataType) || {}, !0;
} else if (d.eventData)
return l = B({}, d.eventData), !0;
}, !0), l) {
var f = l.componentType, h = l.componentIndex;
(f === "markLine" || f === "markPoint" || f === "markArea") && (f = "series", h = l.seriesIndex);
var c = f && h != null && o.getComponent(f, h), v = c && t[c.mainType === "series" ? "_chartsMap" : "_componentsMap"][c.__viewId];
process.env.NODE_ENV !== "production" && !u && !(c && v) && console.warn("model or view can not be found by params"), l.event = i, l.type = n, t._$eventProcessor.eventInfo = {
targetEl: s,
packedEvent: l,
model: c,
view: v
}, t.trigger(n, l);
}
};
a.zrEventfulCallAtLast = !0, t._zr.on(n, a, t);
}), C(Xs, function(n, a) {
t._messageCenter.on(a, function(i) {
this.trigger(a, i);
}, t);
}), C(["selectchanged"], function(n) {
t._messageCenter.on(n, function(a) {
this.trigger(n, a);
}, t);
}), zO(this._messageCenter, this, this._api);
}, e.prototype.isDisposed = function() {
return this._disposed;
}, e.prototype.clear = function() {
if (this._disposed) {
He(this.id);
return;
}
this.setOption({
series: []
}, !0);
}, e.prototype.dispose = function() {
if (this._disposed) {
He(this.id);
return;
}
this._disposed = !0;
var t = this.getDom();
t && HT(this.getDom(), wy, "");
var n = this, a = n._api, i = n._model;
C(n._componentsViews, function(o) {
o.dispose(i, a);
}), C(n._chartsViews, function(o) {
o.dispose(i, a);
}), n._zr.dispose(), n._dom = n._model = n._chartsMap = n._componentsMap = n._chartsViews = n._componentsViews = n._scheduler = n._api = n._zr = n._throttledZrFlush = n._theme = n._coordSysMgr = n._messageCenter = null, delete qs[n.id];
}, e.prototype.resize = function(t) {
if (this[ge]) {
process.env.NODE_ENV !== "production" && he("`resize` should not be called during main process.");
return;
}
if (this._disposed) {
He(this.id);
return;
}
this._zr.resize(t);
var n = this._model;
if (this._loadingFX && this._loadingFX.resize(), !!n) {
var a = n.resetOption("media"), i = t && t.silent;
this[Pe] && (i == null && (i = this[Pe].silent), a = !0, this[Pe] = null), this[ge] = !0;
try {
a && Gi(this), Rn.update.call(this, {
type: "resize",
animation: B({
duration: 0
}, t && t.animation)
});
} catch (o) {
throw this[ge] = !1, o;
}
this[ge] = !1, us.call(this, i), fs.call(this, i);
}
}, e.prototype.showLoading = function(t, n) {
if (this._disposed) {
He(this.id);
return;
}
if (j(t) && (n = t, t = ""), t = t || "default", this.hideLoading(), !Od[t]) {
process.env.NODE_ENV !== "production" && console.warn("Loading effects " + t + " not exists.");
return;
}
var a = Od[t](this._api, n), i = this._zr;
this._loadingFX = a, i.add(a);
}, e.prototype.hideLoading = function() {
if (this._disposed) {
He(this.id);
return;
}
this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null;
}, e.prototype.makeActionFromEvent = function(t) {
var n = B({}, t);
return n.type = Xs[t.type], n;
}, e.prototype.dispatchAction = function(t, n) {
if (this._disposed) {
He(this.id);
return;
}
if (j(n) || (n = {
silent: !!n
}), !!$f[t.type] && !!this._model) {
if (this[ge]) {
this._pendingActions.push(t);
return;
}
var a = n.silent;
fv.call(this, t, a);
var i = n.flush;
i ? this._zr.flush() : i !== !1 && Dt.browser.weChat && this._throttledZrFlush(), us.call(this, a), fs.call(this, a);
}
}, e.prototype.updateLabelLayout = function() {
mr.trigger("series:layoutlabels", this._model, this._api, {
updatedSeries: []
});
}, e.prototype.appendData = function(t) {
if (this._disposed) {
He(this.id);
return;
}
var n = t.seriesIndex, a = this.getModel(), i = a.getSeriesByIndex(n);
process.env.NODE_ENV !== "production" && Q(t.data && i), i.appendData(t), this._scheduler.unfinished = !0, this.getZr().wakeUp();
}, e.internalField = function() {
Gi = function(h) {
var c = h._scheduler;
c.restorePipelines(h._model), c.prepareStageTasks(), sv(h, !0), sv(h, !1), c.plan();
}, sv = function(h, c) {
for (var v = h._model, p = h._scheduler, d = c ? h._componentsViews : h._chartsViews, g = c ? h._componentsMap : h._chartsMap, y = h._zr, m = h._api, _ = 0; _ < d.length; _++)
d[_].__alive = !1;
c ? v.eachComponent(function(x, b) {
x !== "series" && S(b);
}) : v.eachSeries(S);
function S(x) {
var b = x.__requireNewView;
x.__requireNewView = !1;
var T = "_ec_" + x.id + "_" + x.type, D = !b && g[T];
if (!D) {
var A = $r(x.type), M = c ? Ht.getClass(A.main, A.sub) : Ot.getClass(A.sub);
process.env.NODE_ENV !== "production" && Q(M, A.sub + " does not exist."), D = new M(), D.init(v, m), g[T] = D, d.push(D), y.add(D.group);
}
x.__viewId = D.__id = T, D.__alive = !0, D.__model = x, D.group.__ecComponentInfo = {
mainType: x.mainType,
index: x.componentIndex
}, !c && p.prepareView(D, x, v, m);
}
for (var _ = 0; _ < d.length; ) {
var w = d[_];
w.__alive ? _++ : (!c && w.renderTask.dispose(), y.remove(w.group), w.dispose(v, m), d.splice(_, 1), g[w.__id] === w && delete g[w.__id], w.__id = w.group.__ecComponentInfo = null);
}
}, mu = function(h, c, v, p, d) {
var g = h._model;
if (g.setUpdatePayload(v), !p) {
C([].concat(h._componentsViews).concat(h._chartsViews), w);
return;
}
var y = {};
y[p + "Id"] = v[p + "Id"], y[p + "Index"] = v[p + "Index"], y[p + "Name"] = v[p + "Name"];
var m = {
mainType: p,
query: y
};
d && (m.subType = d);
var _ = v.excludeSeriesId, S;
_ != null && (S = K(), C(Pt(_), function(x) {
var b = te(x, null);
b != null && S.set(b, !0);
})), g && g.eachComponent(m, function(x) {
var b = S && S.get(x.id) !== null;
if (!b)
if (F0(v))
if (x instanceof Gt)
v.type === oi && !v.notBlur && !x.get(["emphasis", "disabled"]) && IN(x, v, h._api);
else {
var T = Xg(x.mainType, x.componentIndex, v.name, h._api), D = T.focusSelf, A = T.dispatchers;
v.type === oi && D && !v.notBlur && dd(x.mainType, x.componentIndex, h._api), A && C(A, function(M) {
v.type === oi ? Sn(M) : xn(M);
});
}
else
yd(v) && x instanceof Gt && (NN(x, v, h._api), z0(x), Xe(h));
}, h), g && g.eachComponent(m, function(x) {
var b = S && S.get(x.id) !== null;
b || w(h[p === "series" ? "_chartsMap" : "_componentsMap"][x.__viewId]);
}, h);
function w(x) {
x && x.__alive && x[c] && x[c](x.__model, g, h._api, v);
}
}, Rn = {
prepareAndUpdate: function(h) {
Gi(this), Rn.update.call(this, h, {
optionChanged: h.newOption != null
});
},
update: function(h, c) {
var v = this._model, p = this._api, d = this._zr, g = this._coordSysMgr, y = this._scheduler;
if (!!v) {
v.setUpdatePayload(h), y.restoreData(v, h), y.performSeriesTasks(v), g.create(v, p), y.performDataProcessorTasks(v, h), uv(this, v), g.update(v, p), t(v), y.performVisualTasks(v, h), hv(this, v, p, h, c);
var m = v.get("backgroundColor") || "transparent", _ = v.get("darkMode");
d.setBackgroundColor(m), _ != null && _ !== "auto" && d.setDarkMode(_), mr.trigger("afterupdate", v, p);
}
},
updateTransform: function(h) {
var c = this, v = this._model, p = this._api;
if (!!v) {
v.setUpdatePayload(h);
var d = [];
v.eachComponent(function(y, m) {
if (y !== "series") {
var _ = c.getViewOfComponentModel(m);
if (_ && _.__alive)
if (_.updateTransform) {
var S = _.updateTransform(m, v, p, h);
S && S.update && d.push(_);
} else
d.push(_);
}
});
var g = K();
v.eachSeries(function(y) {
var m = c._chartsMap[y.__viewId];
if (m.updateTransform) {
var _ = m.updateTransform(y, v, p, h);
_ && _.update && g.set(y.uid, 1);
} else
g.set(y.uid, 1);
}), t(v), this._scheduler.performVisualTasks(v, h, {
setDirty: !0,
dirtyMap: g
}), _u(this, v, p, h, {}, g), mr.trigger("afterupdate", v, p);
}
},
updateView: function(h) {
var c = this._model;
!c || (c.setUpdatePayload(h), Ot.markUpdateMethod(h, "updateView"), t(c), this._scheduler.performVisualTasks(c, h, {
setDirty: !0
}), hv(this, c, this._api, h, {}), mr.trigger("afterupdate", c, this._api));
},
updateVisual: function(h) {
var c = this, v = this._model;
!v || (v.setUpdatePayload(h), v.eachSeries(function(p) {
p.getData().clearAllVisual();
}), Ot.markUpdateMethod(h, "updateVisual"), t(v), this._scheduler.performVisualTasks(v, h, {
visualType: "visual",
setDirty: !0
}), v.eachComponent(function(p, d) {
if (p !== "series") {
var g = c.getViewOfComponentModel(d);
g && g.__alive && g.updateVisual(d, v, c._api, h);
}
}), v.eachSeries(function(p) {
var d = c._chartsMap[p.__viewId];
d.updateVisual(p, v, c._api, h);
}), mr.trigger("afterupdate", v, this._api));
},
updateLayout: function(h) {
Rn.update.call(this, h);
}
}, lv = function(h, c, v, p) {
if (h._disposed) {
He(h.id);
return;
}
for (var d = h._model, g = h._coordSysMgr.getCoordinateSystems(), y, m = Hs(d, v), _ = 0; _ < g.length; _++) {
var S = g[_];
if (S[c] && (y = S[c](d, m, p)) != null)
return y;
}
process.env.NODE_ENV !== "production" && console.warn("No coordinate system that supports " + c + " found by the given finder.");
}, uv = function(h, c) {
var v = h._chartsMap, p = h._scheduler;
c.eachSeries(function(d) {
p.updateStreamModes(d, v[d.__viewId]);
});
}, fv = function(h, c) {
var v = this, p = this.getModel(), d = h.type, g = h.escapeConnect, y = $f[d], m = y.actionInfo, _ = (m.update || "update").split(":"), S = _.pop(), w = _[0] != null && $r(_[0]);
this[ge] = !0;
var x = [h], b = !1;
h.batch && (b = !0, x = G(h.batch, function(E) {
return E = J(B({}, E), h), E.batch = null, E;
}));
var T = [], D, A = yd(h), M = F0(h);
if (M && pC(this._api), C(x, function(E) {
if (D = y.action(E, v._model, v._api), D = D || B({}, E), D.type = m.event || D.type, T.push(D), M) {
var P = Fg(h), N = P.queryOptionMap, O = P.mainTypeSpecified, k = O ? N.keys()[0] : "series";
mu(v, S, E, k), Xe(v);
} else
A ? (mu(v, S, E, "series"), Xe(v)) : w && mu(v, S, E, w.main, w.sub);
}), S !== "none" && !M && !A && !w)
try {
this[Pe] ? (Gi(this), Rn.update.call(this, h), this[Pe] = null) : Rn[S].call(this, h);
} catch (E) {
throw this[ge] = !1, E;
}
if (b ? D = {
type: m.event || d,
escapeConnect: g,
batch: T
} : D = T[0], this[ge] = !1, !c) {
var L = this._messageCenter;
if (L.trigger(D.type, D), A) {
var I = {
type: "selectchanged",
escapeConnect: g,
selected: RN(p),
isFromClick: h.isFromClick || !1,
fromAction: h.type,
fromActionPayload: h
};
L.trigger(I.type, I);
}
}
}, us = function(h) {
for (var c = this._pendingActions; c.length; ) {
var v = c.shift();
fv.call(this, v, h);
}
}, fs = function(h) {
!h && this.trigger("updated");
}, r1 = function(h, c) {
h.on("rendered", function(v) {
c.trigger("rendered", v), h.animation.isFinished() && !c[Pe] && !c._scheduler.unfinished && !c._pendingActions.length && c.trigger("finished");
});
}, n1 = function(h, c) {
h.on("mouseover", function(v) {
var p = v.target, d = oo(p, aa);
d && (EN(d, v, c._api), Xe(c));
}).on("mouseout", function(v) {
var p = v.target, d = oo(p, aa);
d && (PN(d, v, c._api), Xe(c));
}).on("click", function(v) {
var p = v.target, d = oo(p, function(m) {
return at(m).dataIndex != null;
}, !0);
if (d) {
var g = d.selected ? "unselect" : "select", y = at(d);
c._api.dispatchAction({
type: g,
dataType: y.dataType,
dataIndexInside: y.dataIndex,
seriesIndex: y.seriesIndex,
isFromClick: !0
});
}
});
};
function t(h) {
h.clearColorPalette(), h.eachSeries(function(c) {
c.clearColorPalette();
});
}
function n(h) {
var c = [], v = [], p = !1;
if (h.eachComponent(function(m, _) {
var S = _.get("zlevel") || 0, w = _.get("z") || 0, x = _.getZLevelKey();
p = p || !!x, (m === "series" ? v : c).push({
zlevel: S,
z: w,
idx: _.componentIndex,
type: m,
key: x
});
}), p) {
var d = c.concat(v), g, y;
Ju(d, function(m, _) {
return m.zlevel === _.zlevel ? m.z - _.z : m.zlevel - _.zlevel;
}), C(d, function(m) {
var _ = h.getComponent(m.type, m.idx), S = m.zlevel, w = m.key;
g != null && (S = Math.max(g, S)), w ? (S === g && w !== y && S++, y = w) : y && (S === g && S++, y = ""), g = S, _.setZLevel(S);
});
}
}
hv = function(h, c, v, p, d) {
n(c), a1(h, c, v, p, d), C(h._chartsViews, function(g) {
g.__alive = !1;
}), _u(h, c, v, p, d), C(h._chartsViews, function(g) {
g.__alive || g.remove(c, v);
});
}, a1 = function(h, c, v, p, d, g) {
C(g || h._componentsViews, function(y) {
var m = y.__model;
u(m, y), y.render(m, c, v, p), s(m, y), f(m, y);
});
}, _u = function(h, c, v, p, d, g) {
var y = h._scheduler;
d = B(d || {}, {
updatedSeries: c.getSeries()
}), mr.trigger("series:beforeupdate", c, v, d);
var m = !1;
c.eachSeries(function(_) {
var S = h._chartsMap[_.__viewId];
S.__alive = !0;
var w = S.renderTask;
y.updatePayload(w, p), u(_, S), g && g.get(_.uid) && w.dirty(), w.perform(y.getPerformArgs(w)) && (m = !0), S.group.silent = !!_.get("silent"), o(_, S), z0(_);
}), y.unfinished = m || y.unfinished, mr.trigger("series:layoutlabels", c, v, d), mr.trigger("series:transition", c, v, d), c.eachSeries(function(_) {
var S = h._chartsMap[_.__viewId];
s(_, S), f(_, S);
}), i(h, c), mr.trigger("series:afterupdate", c, v, d);
}, Xe = function(h) {
h[iv] = !0, h.getZr().wakeUp();
}, o1 = function(h) {
!h[iv] || (h.getZr().storage.traverse(function(c) {
co(c) || a(c);
}), h[iv] = !1);
};
function a(h) {
for (var c = [], v = h.currentStates, p = 0; p < v.length; p++) {
var d = v[p];
d === "emphasis" || d === "blur" || d === "select" || c.push(d);
}
h.selected && h.states.select && c.push("select"), h.hoverState === Eh && h.states.emphasis ? c.push("emphasis") : h.hoverState === Ll && h.states.blur && c.push("blur"), h.useStates(c);
}
function i(h, c) {
var v = h._zr, p = v.storage, d = 0;
p.traverse(function(g) {
g.isGroup || d++;
}), d > c.get("hoverLayerThreshold") && !Dt.node && !Dt.worker && c.eachSeries(function(g) {
if (!g.preventUsingHoverLayer) {
var y = h._chartsMap[g.__viewId];
y.__alive && y.eachRendered(function(m) {
m.states.emphasis && (m.states.emphasis.hoverLayer = !0);
});
}
});
}
function o(h, c) {
var v = h.get("blendMode") || null;
c.eachRendered(function(p) {
p.isGroup || (p.style.blend = v);
});
}
function s(h, c) {
if (!h.preventAutoZ) {
var v = h.get("z") || 0, p = h.get("zlevel") || 0;
c.eachRendered(function(d) {
return l(d, v, p, -1 / 0), !0;
});
}
}
function l(h, c, v, p) {
var d = h.getTextContent(), g = h.getTextGuideLine(), y = h.isGroup;
if (y)
for (var m = h.childrenRef(), _ = 0; _ < m.length; _++)
p = Math.max(l(m[_], c, v, p), p);
else
h.z = c, h.zlevel = v, p = Math.max(h.z2, p);
if (d && (d.z = c, d.zlevel = v, isFinite(p) && (d.z2 = p + 2)), g) {
var S = h.textGuideLineConfig;
g.z = c, g.zlevel = v, isFinite(p) && (g.z2 = p + (S && S.showAbove ? 1 : -1));
}
return p;
}
function u(h, c) {
c.eachRendered(function(v) {
if (!co(v)) {
var p = v.getTextContent(), d = v.getTextGuideLine();
v.stateTransition && (v.stateTransition = null), p && p.stateTransition && (p.stateTransition = null), d && d.stateTransition && (d.stateTransition = null), v.hasState() ? (v.prevStates = v.currentStates, v.clearStates()) : v.prevStates && (v.prevStates = null);
}
});
}
function f(h, c) {
var v = h.getModel("stateAnimation"), p = h.isAnimationEnabled(), d = v.get("duration"), g = d > 0 ? {
duration: d,
delay: v.get("delay"),
easing: v.get("easing")
} : null;
c.eachRendered(function(y) {
if (y.states && y.states.emphasis) {
if (co(y))
return;
if (y instanceof gt && zN(y), y.__dirty) {
var m = y.prevStates;
m && y.useStates(m);
}
if (p) {
y.stateTransition = g;
var _ = y.getTextContent(), S = y.getTextGuideLine();
_ && (_.stateTransition = g), S && (S.stateTransition = g);
}
y.__dirty && a(y);
}
});
}
i1 = function(h) {
return new (function(c) {
R(v, c);
function v() {
return c !== null && c.apply(this, arguments) || this;
}
return v.prototype.getCoordinateSystems = function() {
return h._coordSysMgr.getCoordinateSystems();
}, v.prototype.getComponentByElement = function(p) {
for (; p; ) {
var d = p.__ecComponentInfo;
if (d != null)
return h._model.getComponent(d.mainType, d.index);
p = p.parent;
}
}, v.prototype.enterEmphasis = function(p, d) {
Sn(p, d), Xe(h);
}, v.prototype.leaveEmphasis = function(p, d) {
xn(p, d), Xe(h);
}, v.prototype.enterBlur = function(p) {
fC(p), Xe(h);
}, v.prototype.leaveBlur = function(p) {
Zg(p), Xe(h);
}, v.prototype.enterSelect = function(p) {
hC(p), Xe(h);
}, v.prototype.leaveSelect = function(p) {
cC(p), Xe(h);
}, v.prototype.getModel = function() {
return h.getModel();
}, v.prototype.getViewOfComponentModel = function(p) {
return h.getViewOfComponentModel(p);
}, v.prototype.getViewOfSeriesModel = function(p) {
return h.getViewOfSeriesModel(p);
}, v;
}(dD))(h);
}, uA = function(h) {
function c(v, p) {
for (var d = 0; d < v.length; d++) {
var g = v[d];
g[ov] = p;
}
}
C(Xs, function(v, p) {
h._messageCenter.on(p, function(d) {
if (s1[h.group] && h[ov] !== e1) {
if (d && d.escapeConnect)
return;
var g = h.makeActionFromEvent(d), y = [];
C(qs, function(m) {
m !== h && m.group === h.group && y.push(m);
}), c(y, e1), C(y, function(m) {
m[ov] !== LV && m.dispatchAction(g);
}), c(y, IV);
}
});
});
};
}(), e;
}(vr), xy = fA.prototype;
xy.on = aA("on");
xy.off = aA("off");
xy.one = function(r, e, t) {
var n = this;
Mr("ECharts#one is deprecated.");
function a() {
for (var i = [], o = 0; o < arguments.length; o++)
i[o] = arguments[o];
e && e.apply && e.apply(this, i), n.off(r, a);
}
this.on.call(this, r, a, t);
};
var EV = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
function He(r) {
process.env.NODE_ENV !== "production" && console.warn("Instance " + r + " has been disposed");
}
var $f = {}, Xs = {}, Rd = [], kd = [], Wf = [], hA = {}, Od = {}, qs = {}, s1 = {}, PV = +new Date() - 0, wy = "_echarts_instance_";
function NV(r, e, t) {
var n = !(t && t.ssr);
if (n) {
if (process.env.NODE_ENV !== "production" && !r)
throw new Error("Initialize failed: invalid dom.");
var a = cA(r);
if (a)
return process.env.NODE_ENV !== "production" && console.warn("There is a chart instance already initialized on the dom."), a;
process.env.NODE_ENV !== "production" && mo(r) && r.nodeName.toUpperCase() !== "CANVAS" && (!r.clientWidth && (!t || t.width == null) || !r.clientHeight && (!t || t.height == null)) && console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.");
}
var i = new fA(r, e, t);
return i.id = "ec_" + PV++, qs[i.id] = i, n && HT(r, wy, i.id), uA(i), mr.trigger("afterinit", i), i;
}
function cA(r) {
return qs[CP(r, wy)];
}
function vA(r, e) {
hA[r] = e;
}
function pA(r) {
ct(kd, r) < 0 && kd.push(r);
}
function dA(r, e) {
Ty(Rd, r, e, xV);
}
function RV(r) {
by("afterinit", r);
}
function kV(r) {
by("afterupdate", r);
}
function by(r, e) {
mr.on(r, e);
}
function en(r, e, t) {
q(e) && (t = e, e = "");
var n = j(r) ? r.type : [r, r = {
event: e
}][0];
r.event = (r.event || n).toLowerCase(), e = r.event, !Xs[e] && (Q(t1.test(n) && t1.test(e)), $f[n] || ($f[n] = {
action: t,
actionInfo: r
}), Xs[e] = n);
}
function OV(r, e) {
$o.register(r, e);
}
function VV(r, e) {
Ty(Wf, r, e, eA, "layout");
}
function Ci(r, e) {
Ty(Wf, r, e, rA, "visual");
}
var l1 = [];
function Ty(r, e, t, n, a) {
if ((q(e) || j(e)) && (t = e, e = n), process.env.NODE_ENV !== "production") {
if (isNaN(e) || e == null)
throw new Error("Illegal priority");
C(r, function(o) {
Q(o.__raw !== t);
});
}
if (!(ct(l1, t) >= 0)) {
l1.push(t);
var i = UD.wrapStageHandler(t, a);
i.__prio = e, i.__raw = t, r.push(i);
}
}
function gA(r, e) {
Od[r] = e;
}
function yA(r, e, t) {
var n = gV("registerMap");
n && n(r, e, t);
}
var BV = qk;
Ci(Sy, SO);
Ci(Zh, xO);
Ci(Zh, wO);
Ci(Sy, VO);
Ci(Zh, BO);
Ci(nA, vV);
pA(yD);
dA(_V, Lk);
gA("default", bO);
en({
type: oi,
event: oi,
update: oi
}, jt);
en({
type: nf,
event: nf,
update: nf
}, jt);
en({
type: $s,
event: $s,
update: $s
}, jt);
en({
type: af,
event: af,
update: af
}, jt);
en({
type: Ws,
event: Ws,
update: Ws
}, jt);
vA("light", RO);
vA("dark", kO);
var u1 = [], zV = {
registerPreprocessor: pA,
registerProcessor: dA,
registerPostInit: RV,
registerPostUpdate: kV,
registerUpdateLifecycle: by,
registerAction: en,
registerCoordinateSystem: OV,
registerLayout: VV,
registerVisual: Ci,
registerTransform: BV,
registerLoading: gA,
registerMap: yA,
registerImpl: dV,
PRIORITY: MV,
ComponentModel: _t,
ComponentView: Ht,
SeriesModel: Gt,
ChartView: Ot,
registerComponentModel: function(r) {
_t.registerClass(r);
},
registerComponentView: function(r) {
Ht.registerClass(r);
},
registerSeriesModel: function(r) {
Gt.registerClass(r);
},
registerChartView: function(r) {
Ot.registerClass(r);
},
registerSubTypeDefaulter: function(r, e) {
_t.registerSubTypeDefaulter(r, e);
},
registerPainter: function(r, e) {
nP(r, e);
}
};
function pt(r) {
if (z(r)) {
C(r, function(e) {
pt(e);
});
return;
}
ct(u1, r) >= 0 || (u1.push(r), q(r) && (r = {
install: r
}), r.install(zV));
}
function hs(r) {
return r == null ? 0 : r.length || 1;
}
function f1(r) {
return r;
}
var GV = function() {
function r(e, t, n, a, i, o) {
this._old = e, this._new = t, this._oldKeyGetter = n || f1, this._newKeyGetter = a || f1, this.context = i, this._diffModeMultiple = o === "multiple";
}
return r.prototype.add = function(e) {
return this._add = e, this;
}, r.prototype.update = function(e) {
return this._update = e, this;
}, r.prototype.updateManyToOne = function(e) {
return this._updateManyToOne = e, this;
}, r.prototype.updateOneToMany = function(e) {
return this._updateOneToMany = e, this;
}, r.prototype.updateManyToMany = function(e) {
return this._updateManyToMany = e, this;
}, r.prototype.remove = function(e) {
return this._remove = e, this;
}, r.prototype.execute = function() {
this[this._diffModeMultiple ? "_executeMultiple" : "_executeOneToOne"]();
}, r.prototype._executeOneToOne = function() {
var e = this._old, t = this._new, n = {}, a = new Array(e.length), i = new Array(t.length);
this._initIndexMap(e, null, a, "_oldKeyGetter"), this._initIndexMap(t, n, i, "_newKeyGetter");
for (var o = 0; o < e.length; o++) {
var s = a[o], l = n[s], u = hs(l);
if (u > 1) {
var f = l.shift();
l.length === 1 && (n[s] = l[0]), this._update && this._update(f, o);
} else
u === 1 ? (n[s] = null, this._update && this._update(l, o)) : this._remove && this._remove(o);
}
this._performRestAdd(i, n);
}, r.prototype._executeMultiple = function() {
var e = this._old, t = this._new, n = {}, a = {}, i = [], o = [];
this._initIndexMap(e, n, i, "_oldKeyGetter"), this._initIndexMap(t, a, o, "_newKeyGetter");
for (var s = 0; s < i.length; s++) {
var l = i[s], u = n[l], f = a[l], h = hs(u), c = hs(f);
if (h > 1 && c === 1)
this._updateManyToOne && this._updateManyToOne(f, u), a[l] = null;
else if (h === 1 && c > 1)
this._updateOneToMany && this._updateOneToMany(f, u), a[l] = null;
else if (h === 1 && c === 1)
this._update && this._update(f, u), a[l] = null;
else if (h > 1 && c > 1)
this._updateManyToMany && this._updateManyToMany(f, u), a[l] = null;
else if (h > 1)
for (var v = 0; v < h; v++)
this._remove && this._remove(u[v]);
else
this._remove && this._remove(u);
}
this._performRestAdd(o, a);
}, r.prototype._performRestAdd = function(e, t) {
for (var n = 0; n < e.length; n++) {
var a = e[n], i = t[a], o = hs(i);
if (o > 1)
for (var s = 0; s < o; s++)
this._add && this._add(i[s]);
else
o === 1 && this._add && this._add(i);
t[a] = null;
}
}, r.prototype._initIndexMap = function(e, t, n, a) {
for (var i = this._diffModeMultiple, o = 0; o < e.length; o++) {
var s = "_ec_" + this[a](e[o], o);
if (i || (n[o] = s), !!t) {
var l = t[s], u = hs(l);
u === 0 ? (t[s] = o, i && n.push(s)) : u === 1 ? t[s] = [l, o] : l.push(o);
}
}
}, r;
}();
const wn = GV;
var FV = function() {
function r(e, t) {
this._encode = e, this._schema = t;
}
return r.prototype.get = function() {
return {
fullDimensions: this._getFullDimensionNames(),
encode: this._encode
};
}, r.prototype._getFullDimensionNames = function() {
return this._cachedDimNames || (this._cachedDimNames = this._schema ? this._schema.makeOutputDimensionNames() : []), this._cachedDimNames;
}, r;
}();
function HV(r, e) {
var t = {}, n = t.encode = {}, a = K(), i = [], o = [], s = {};
C(r.dimensions, function(c) {
var v = r.getDimensionInfo(c), p = v.coordDim;
if (p) {
process.env.NODE_ENV !== "production" && Q(bd.get(p) == null);
var d = v.coordDimIndex;
cv(n, p)[d] = c, v.isExtraCoord || (a.set(p, 1), $V(v.type) && (i[0] = c), cv(s, p)[d] = r.getDimensionIndex(v.name)), v.defaultTooltip && o.push(c);
}
bd.each(function(g, y) {
var m = cv(n, y), _ = v.otherDims[y];
_ != null && _ !== !1 && (m[_] = v.name);
});
});
var l = [], u = {};
a.each(function(c, v) {
var p = n[v];
u[v] = p[0], l = l.concat(p);
}), t.dataDimsOnCoord = l, t.dataDimIndicesOnCoord = G(l, function(c) {
return r.getDimensionInfo(c).storeDimIndex;
}), t.encodeFirstDimNotExtra = u;
var f = n.label;
f && f.length && (i = f.slice());
var h = n.tooltip;
return h && h.length ? o = h.slice() : o.length || (o = i.slice()), n.defaultedLabel = i, n.defaultedTooltip = o, t.userOutput = new FV(s, e), t;
}
function cv(r, e) {
return r.hasOwnProperty(e) || (r[e] = []), r[e];
}
function Uf(r) {
return r === "category" ? "ordinal" : r === "time" ? "time" : "float";
}
function $V(r) {
return !(r === "ordinal" || r === "time");
}
var WV = function() {
function r(e) {
this.otherDims = {}, e != null && B(this, e);
}
return r;
}();
const ff = WV;
var UV = Tt(), YV = {
float: "f",
int: "i",
ordinal: "o",
number: "n",
time: "t"
}, mA = function() {
function r(e) {
this.dimensions = e.dimensions, this._dimOmitted = e.dimensionOmitted, this.source = e.source, this._fullDimCount = e.fullDimensionCount, this._updateDimOmitted(e.dimensionOmitted);
}
return r.prototype.isDimensionOmitted = function() {
return this._dimOmitted;
}, r.prototype._updateDimOmitted = function(e) {
this._dimOmitted = e, e && (this._dimNameMap || (this._dimNameMap = xA(this.source)));
}, r.prototype.getSourceDimensionIndex = function(e) {
return vt(this._dimNameMap.get(e), -1);
}, r.prototype.getSourceDimension = function(e) {
var t = this.source.dimensionsDefine;
if (t)
return t[e];
}, r.prototype.makeStoreSchema = function() {
for (var e = this._fullDimCount, t = _D(this.source), n = !wA(e), a = "", i = [], o = 0, s = 0; o < e; o++) {
var l = void 0, u = void 0, f = void 0, h = this.dimensions[s];
if (h && h.storeDimIndex === o)
l = t ? h.name : null, u = h.type, f = h.ordinalMeta, s++;
else {
var c = this.getSourceDimension(o);
c && (l = t ? c.name : null, u = c.type);
}
i.push({
property: l,
type: u,
ordinalMeta: f
}), t && l != null && (!h || !h.isCalculationCoord) && (a += n ? l.replace(/\`/g, "`1").replace(/\$/g, "`2") : l), a += "$", a += YV[u] || "f", f && (a += f.uid), a += "$";
}
var v = this.source, p = [v.seriesLayoutBy, v.startIndex, a].join("$$");
return {
dimensions: i,
hash: p
};
}, r.prototype.makeOutputDimensionNames = function() {
for (var e = [], t = 0, n = 0; t < this._fullDimCount; t++) {
var a = void 0, i = this.dimensions[n];
if (i && i.storeDimIndex === t)
i.isCalculationCoord || (a = i.name), n++;
else {
var o = this.getSourceDimension(t);
o && (a = o.name);
}
e.push(a);
}
return e;
}, r.prototype.appendCalculationDimension = function(e) {
this.dimensions.push(e), e.isCalculationCoord = !0, this._fullDimCount++, this._updateDimOmitted(!0);
}, r;
}();
function _A(r) {
return r instanceof mA;
}
function SA(r) {
for (var e = K(), t = 0; t < (r || []).length; t++) {
var n = r[t], a = j(n) ? n.name : n;
a != null && e.get(a) == null && e.set(a, t);
}
return e;
}
function xA(r) {
var e = UV(r);
return e.dimNameMap || (e.dimNameMap = SA(r.dimensionsDefine));
}
function wA(r) {
return r > 30;
}
var cs = j, kn = G, ZV = typeof Int32Array > "u" ? Array : Int32Array, XV = "e\0\0", h1 = -1, qV = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_dimSummary", "userOutput", "_rawData", "_dimValueGetter", "_nameDimIdx", "_idDimIdx", "_nameRepeatCount"], KV = ["_approximateExtent"], c1, Su, vs, Fi, vv, xu, pv, jV = function() {
function r(e, t) {
this.type = "list", this._dimOmitted = !1, this._nameList = [], this._idList = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this._itemLayouts = [], this._graphicEls = [], this._approximateExtent = {}, this._calculationInfo = {}, this.hasItemOption = !1, this.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "lttbDownSample", "map"], this.CHANGABLE_METHODS = ["filterSelf", "selectRange"], this.DOWNSAMPLE_METHODS = ["downSample", "lttbDownSample"];
var n, a = !1;
_A(e) ? (n = e.dimensions, this._dimOmitted = e.isDimensionOmitted(), this._schema = e) : (a = !0, n = e), n = n || ["x", "y"];
for (var i = {}, o = [], s = {}, l = !1, u = {}, f = 0; f < n.length; f++) {
var h = n[f], c = W(h) ? new ff({
name: h
}) : h instanceof ff ? h : new ff(h), v = c.name;
c.type = c.type || "float", c.coordDim || (c.coordDim = v, c.coordDimIndex = 0);
var p = c.otherDims = c.otherDims || {};
o.push(v), i[v] = c, u[v] != null && (l = !0), c.createInvertedIndices && (s[v] = []), p.itemName === 0 && (this._nameDimIdx = f), p.itemId === 0 && (this._idDimIdx = f), process.env.NODE_ENV !== "production" && Q(a || c.storeDimIndex >= 0), a && (c.storeDimIndex = f);
}
if (this.dimensions = o, this._dimInfos = i, this._initGetDimensionInfo(l), this.hostModel = t, this._invertedIndicesMap = s, this._dimOmitted) {
var d = this._dimIdxToName = K();
C(o, function(g) {
d.set(i[g].storeDimIndex, g);
});
}
}
return r.prototype.getDimension = function(e) {
var t = this._recognizeDimIndex(e);
if (t == null)
return e;
if (t = e, !this._dimOmitted)
return this.dimensions[t];
var n = this._dimIdxToName.get(t);
if (n != null)
return n;
var a = this._schema.getSourceDimension(t);
if (a)
return a.name;
}, r.prototype.getDimensionIndex = function(e) {
var t = this._recognizeDimIndex(e);
if (t != null)
return t;
if (e == null)
return -1;
var n = this._getDimInfo(e);
return n ? n.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(e) : -1;
}, r.prototype._recognizeDimIndex = function(e) {
if (wt(e) || e != null && !isNaN(e) && !this._getDimInfo(e) && (!this._dimOmitted || this._schema.getSourceDimensionIndex(e) < 0))
return +e;
}, r.prototype._getStoreDimIndex = function(e) {
var t = this.getDimensionIndex(e);
if (process.env.NODE_ENV !== "production" && t == null)
throw new Error("Unkown dimension " + e);
return t;
}, r.prototype.getDimensionInfo = function(e) {
return this._getDimInfo(this.getDimension(e));
}, r.prototype._initGetDimensionInfo = function(e) {
var t = this._dimInfos;
this._getDimInfo = e ? function(n) {
return t.hasOwnProperty(n) ? t[n] : void 0;
} : function(n) {
return t[n];
};
}, r.prototype.getDimensionsOnCoord = function() {
return this._dimSummary.dataDimsOnCoord.slice();
}, r.prototype.mapDimension = function(e, t) {
var n = this._dimSummary;
if (t == null)
return n.encodeFirstDimNotExtra[e];
var a = n.encode[e];
return a ? a[t] : null;
}, r.prototype.mapDimensionsAll = function(e) {
var t = this._dimSummary, n = t.encode[e];
return (n || []).slice();
}, r.prototype.getStore = function() {
return this._store;
}, r.prototype.initData = function(e, t, n) {
var a = this, i;
if (e instanceof Ad && (i = e), !i) {
var o = this.dimensions, s = fy(e) || me(e) ? new SD(e, o.length) : e;
i = new Ad();
var l = kn(o, function(u) {
return {
type: a._dimInfos[u].type,
property: u
};
});
i.initData(s, l, n);
}
this._store = i, this._nameList = (t || []).slice(), this._idList = [], this._nameRepeatCount = {}, this._doInit(0, i.count()), this._dimSummary = HV(this, this._schema), this.userOutput = this._dimSummary.userOutput;
}, r.prototype.appendData = function(e) {
var t = this._store.appendData(e);
this._doInit(t[0], t[1]);
}, r.prototype.appendValues = function(e, t) {
var n = this._store.appendValues(e, t.length), a = n.start, i = n.end, o = this._shouldMakeIdFromName();
if (this._updateOrdinalMeta(), t)
for (var s = a; s < i; s++) {
var l = s - a;
this._nameList[s] = t[l], o && pv(this, s);
}
}, r.prototype._updateOrdinalMeta = function() {
for (var e = this._store, t = this.dimensions, n = 0; n < t.length; n++) {
var a = this._dimInfos[t[n]];
a.ordinalMeta && e.collectOrdinalMeta(a.storeDimIndex, a.ordinalMeta);
}
}, r.prototype._shouldMakeIdFromName = function() {
var e = this._store.getProvider();
return this._idDimIdx == null && e.getSource().sourceFormat !== pn && !e.fillStorage;
}, r.prototype._doInit = function(e, t) {
if (!(e >= t)) {
var n = this._store, a = n.getProvider();
this._updateOrdinalMeta();
var i = this._nameList, o = this._idList, s = a.getSource().sourceFormat, l = s === pr;
if (l && !a.pure)
for (var u = [], f = e; f < t; f++) {
var h = a.getItem(f, u);
if (!this.hasItemOption && cP(h) && (this.hasItemOption = !0), h) {
var c = h.name;
i[f] == null && c != null && (i[f] = te(c, null));
var v = h.id;
o[f] == null && v != null && (o[f] = te(v, null));
}
}
if (this._shouldMakeIdFromName())
for (var f = e; f < t; f++)
pv(this, f);
c1(this);
}
}, r.prototype.getApproximateExtent = function(e) {
return this._approximateExtent[e] || this._store.getDataExtent(this._getStoreDimIndex(e));
}, r.prototype.setApproximateExtent = function(e, t) {
t = this.getDimension(t), this._approximateExtent[t] = e.slice();
}, r.prototype.getCalculationInfo = function(e) {
return this._calculationInfo[e];
}, r.prototype.setCalculationInfo = function(e, t) {
cs(e) ? B(this._calculationInfo, e) : this._calculationInfo[e] = t;
}, r.prototype.getName = function(e) {
var t = this.getRawIndex(e), n = this._nameList[t];
return n == null && this._nameDimIdx != null && (n = vs(this, this._nameDimIdx, t)), n == null && (n = ""), n;
}, r.prototype._getCategory = function(e, t) {
var n = this._store.get(e, t), a = this._store.getOrdinalMeta(e);
return a ? a.categories[n] : n;
}, r.prototype.getId = function(e) {
return Su(this, this.getRawIndex(e));
}, r.prototype.count = function() {
return this._store.count();
}, r.prototype.get = function(e, t) {
var n = this._store, a = this._dimInfos[e];
if (a)
return n.get(a.storeDimIndex, t);
}, r.prototype.getByRawIndex = function(e, t) {
var n = this._store, a = this._dimInfos[e];
if (a)
return n.getByRawIndex(a.storeDimIndex, t);
}, r.prototype.getIndices = function() {
return this._store.getIndices();
}, r.prototype.getDataExtent = function(e) {
return this._store.getDataExtent(this._getStoreDimIndex(e));
}, r.prototype.getSum = function(e) {
return this._store.getSum(this._getStoreDimIndex(e));
}, r.prototype.getMedian = function(e) {
return this._store.getMedian(this._getStoreDimIndex(e));
}, r.prototype.getValues = function(e, t) {
var n = this, a = this._store;
return z(e) ? a.getValues(kn(e, function(i) {
return n._getStoreDimIndex(i);
}), t) : a.getValues(e);
}, r.prototype.hasValue = function(e) {
for (var t = this._dimSummary.dataDimIndicesOnCoord, n = 0, a = t.length; n < a; n++)
if (isNaN(this._store.get(t[n], e)))
return !1;
return !0;
}, r.prototype.indexOfName = function(e) {
for (var t = 0, n = this._store.count(); t < n; t++)
if (this.getName(t) === e)
return t;
return -1;
}, r.prototype.getRawIndex = function(e) {
return this._store.getRawIndex(e);
}, r.prototype.indexOfRawIndex = function(e) {
return this._store.indexOfRawIndex(e);
}, r.prototype.rawIndexOf = function(e, t) {
var n = e && this._invertedIndicesMap[e];
if (process.env.NODE_ENV !== "production" && !n)
throw new Error("Do not supported yet");
var a = n[t];
return a == null || isNaN(a) ? h1 : a;
}, r.prototype.indicesOfNearest = function(e, t, n) {
return this._store.indicesOfNearest(this._getStoreDimIndex(e), t, n);
}, r.prototype.each = function(e, t, n) {
q(e) && (n = t, t = e, e = []);
var a = n || this, i = kn(Fi(e), this._getStoreDimIndex, this);
this._store.each(i, a ? Y(t, a) : t);
}, r.prototype.filterSelf = function(e, t, n) {
q(e) && (n = t, t = e, e = []);
var a = n || this, i = kn(Fi(e), this._getStoreDimIndex, this);
return this._store = this._store.filter(i, a ? Y(t, a) : t), this;
}, r.prototype.selectRange = function(e) {
var t = this, n = {}, a = mt(e);
return C(a, function(i) {
var o = t._getStoreDimIndex(i);
n[o] = e[i];
}), this._store = this._store.selectRange(n), this;
}, r.prototype.mapArray = function(e, t, n) {
q(e) && (n = t, t = e, e = []), n = n || this;
var a = [];
return this.each(e, function() {
a.push(t && t.apply(this, arguments));
}, n), a;
}, r.prototype.map = function(e, t, n, a) {
var i = n || a || this, o = kn(Fi(e), this._getStoreDimIndex, this), s = xu(this);
return s._store = this._store.map(o, i ? Y(t, i) : t), s;
}, r.prototype.modify = function(e, t, n, a) {
var i = this, o = n || a || this;
process.env.NODE_ENV !== "production" && C(Fi(e), function(l) {
var u = i.getDimensionInfo(l);
u.isCalculationCoord || console.error("Danger: only stack dimension can be modified");
});
var s = kn(Fi(e), this._getStoreDimIndex, this);
this._store.modify(s, o ? Y(t, o) : t);
}, r.prototype.downSample = function(e, t, n, a) {
var i = xu(this);
return i._store = this._store.downSample(this._getStoreDimIndex(e), t, n, a), i;
}, r.prototype.lttbDownSample = function(e, t) {
var n = xu(this);
return n._store = this._store.lttbDownSample(this._getStoreDimIndex(e), t), n;
}, r.prototype.getRawDataItem = function(e) {
return this._store.getRawDataItem(e);
}, r.prototype.getItemModel = function(e) {
var t = this.hostModel, n = this.getRawDataItem(e);
return new kt(n, t, t && t.ecModel);
}, r.prototype.diff = function(e) {
var t = this;
return new wn(e ? e.getStore().getIndices() : [], this.getStore().getIndices(), function(n) {
return Su(e, n);
}, function(n) {
return Su(t, n);
});
}, r.prototype.getVisual = function(e) {
var t = this._visual;
return t && t[e];
}, r.prototype.setVisual = function(e, t) {
this._visual = this._visual || {}, cs(e) ? B(this._visual, e) : this._visual[e] = t;
}, r.prototype.getItemVisual = function(e, t) {
var n = this._itemVisuals[e], a = n && n[t];
return a == null ? this.getVisual(t) : a;
}, r.prototype.hasItemVisual = function() {
return this._itemVisuals.length > 0;
}, r.prototype.ensureUniqueItemVisual = function(e, t) {
var n = this._itemVisuals, a = n[e];
a || (a = n[e] = {});
var i = a[t];
return i == null && (i = this.getVisual(t), z(i) ? i = i.slice() : cs(i) && (i = B({}, i)), a[t] = i), i;
}, r.prototype.setItemVisual = function(e, t, n) {
var a = this._itemVisuals[e] || {};
this._itemVisuals[e] = a, cs(t) ? B(a, t) : a[t] = n;
}, r.prototype.clearAllVisual = function() {
this._visual = {}, this._itemVisuals = [];
}, r.prototype.setLayout = function(e, t) {
cs(e) ? B(this._layout, e) : this._layout[e] = t;
}, r.prototype.getLayout = function(e) {
return this._layout[e];
}, r.prototype.getItemLayout = function(e) {
return this._itemLayouts[e];
}, r.prototype.setItemLayout = function(e, t, n) {
this._itemLayouts[e] = n ? B(this._itemLayouts[e] || {}, t) : t;
}, r.prototype.clearItemLayouts = function() {
this._itemLayouts.length = 0;
}, r.prototype.setItemGraphicEl = function(e, t) {
var n = this.hostModel && this.hostModel.seriesIndex;
vd(n, this.dataType, e, t), this._graphicEls[e] = t;
}, r.prototype.getItemGraphicEl = function(e) {
return this._graphicEls[e];
}, r.prototype.eachItemGraphicEl = function(e, t) {
C(this._graphicEls, function(n, a) {
n && e && e.call(t, n, a);
});
}, r.prototype.cloneShallow = function(e) {
return e || (e = new r(this._schema ? this._schema : kn(this.dimensions, this._getDimInfo, this), this.hostModel)), vv(e, this), e._store = this._store, e;
}, r.prototype.wrapMethod = function(e, t) {
var n = this[e];
!q(n) || (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(e), this[e] = function() {
var a = n.apply(this, arguments);
return t.apply(this, [a].concat(Eg(arguments)));
});
}, r.internalField = function() {
c1 = function(e) {
var t = e._invertedIndicesMap;
C(t, function(n, a) {
var i = e._dimInfos[a], o = i.ordinalMeta, s = e._store;
if (o) {
n = t[a] = new ZV(o.categories.length);
for (var l = 0; l < n.length; l++)
n[l] = h1;
for (var l = 0; l < s.count(); l++)
n[s.get(i.storeDimIndex, l)] = l;
}
});
}, vs = function(e, t, n) {
return te(e._getCategory(t, n), null);
}, Su = function(e, t) {
var n = e._idList[t];
return n == null && e._idDimIdx != null && (n = vs(e, e._idDimIdx, t)), n == null && (n = XV + t), n;
}, Fi = function(e) {
return z(e) || (e = e != null ? [e] : []), e;
}, xu = function(e) {
var t = new r(e._schema ? e._schema : kn(e.dimensions, e._getDimInfo, e), e.hostModel);
return vv(t, e), t;
}, vv = function(e, t) {
C(qV.concat(t.__wrappedMethods || []), function(n) {
t.hasOwnProperty(n) && (e[n] = t[n]);
}), e.__wrappedMethods = t.__wrappedMethods, C(KV, function(n) {
e[n] = tt(t[n]);
}), e._calculationInfo = B({}, t._calculationInfo);
}, pv = function(e, t) {
var n = e._nameList, a = e._idList, i = e._nameDimIdx, o = e._idDimIdx, s = n[t], l = a[t];
if (s == null && i != null && (n[t] = s = vs(e, i, t)), l == null && o != null && (a[t] = l = vs(e, o, t)), l == null && s != null) {
var u = e._nameRepeatCount, f = u[s] = (u[s] || 0) + 1;
l = s, f > 1 && (l += "__ec__" + f), a[t] = l;
}
};
}(), r;
}();
const Ae = jV;
function Ol(r, e) {
fy(r) || (r = hy(r)), e = e || {};
var t = e.coordDimensions || [], n = e.dimensionsDefine || r.dimensionsDefine || [], a = K(), i = [], o = QV(r, t, n, e.dimensionsCount), s = e.canOmitUnusedDimensions && wA(o), l = n === r.dimensionsDefine, u = l ? xA(r) : SA(n), f = e.encodeDefine;
!f && e.encodeDefaulter && (f = e.encodeDefaulter(r, o));
for (var h = K(f), c = new MD(o), v = 0; v < c.length; v++)
c[v] = -1;
function p(D) {
var A = c[D];
if (A < 0) {
var M = n[D], L = j(M) ? M : {
name: M
}, I = new ff(), E = L.name;
E != null && u.get(E) != null && (I.name = I.displayName = E), L.type != null && (I.type = L.type), L.displayName != null && (I.displayName = L.displayName);
var P = i.length;
return c[D] = P, I.storeDimIndex = D, i.push(I), I;
}
return i[A];
}
if (!s)
for (var v = 0; v < o; v++)
p(v);
h.each(function(D, A) {
var M = Pt(D).slice();
if (M.length === 1 && !W(M[0]) && M[0] < 0) {
h.set(A, !1);
return;
}
var L = h.set(A, []);
C(M, function(I, E) {
var P = W(I) ? u.get(I) : I;
P != null && P < o && (L[E] = P, g(p(P), A, E));
});
});
var d = 0;
C(t, function(D) {
var A, M, L, I;
if (W(D))
A = D, I = {};
else {
I = D, A = I.name;
var E = I.ordinalMeta;
I.ordinalMeta = null, I = B({}, I), I.ordinalMeta = E, M = I.dimsDef, L = I.otherDims, I.name = I.coordDim = I.coordDimIndex = I.dimsDef = I.otherDims = null;
}
var P = h.get(A);
if (P !== !1) {
if (P = Pt(P), !P.length)
for (var N = 0; N < (M && M.length || 1); N++) {
for (; d < o && p(d).coordDim != null; )
d++;
d < o && P.push(d++);
}
C(P, function(O, k) {
var V = p(O);
if (l && I.type != null && (V.type = I.type), g(J(V, I), A, k), V.name == null && M) {
var F = M[k];
!j(F) && (F = {
name: F
}), V.name = V.displayName = F.name, V.defaultTooltip = F.defaultTooltip;
}
L && J(V.otherDims, L);
});
}
});
function g(D, A, M) {
bd.get(A) != null ? D.otherDims[A] = M : (D.coordDim = A, D.coordDimIndex = M, a.set(A, !0));
}
var y = e.generateCoord, m = e.generateCoordCount, _ = m != null;
m = y ? m || 1 : 0;
var S = y || "value";
function w(D) {
D.name == null && (D.name = D.coordDim);
}
if (s)
C(i, function(D) {
w(D);
}), i.sort(function(D, A) {
return D.storeDimIndex - A.storeDimIndex;
});
else
for (var x = 0; x < o; x++) {
var b = p(x), T = b.coordDim;
T == null && (b.coordDim = tB(S, a, _), b.coordDimIndex = 0, (!y || m <= 0) && (b.isExtraCoord = !0), m--), w(b), b.type == null && (fD(r, x) === le.Must || b.isExtraCoord && (b.otherDims.itemName != null || b.otherDims.seriesName != null)) && (b.type = "ordinal");
}
return JV(i), new mA({
source: r,
dimensions: i,
fullDimensionCount: o,
dimensionOmitted: s
});
}
function JV(r) {
for (var e = K(), t = 0; t < r.length; t++) {
var n = r[t], a = n.name, i = e.get(a) || 0;
i > 0 && (n.name = a + (i - 1)), i++, e.set(a, i);
}
}
function QV(r, e, t, n) {
var a = Math.max(r.dimensionsDetectedCount || 1, e.length, t.length, n || 0);
return C(e, function(i) {
var o;
j(i) && (o = i.dimsDef) && (a = Math.max(a, o.length));
}), a;
}
function tB(r, e, t) {
var n = e.data;
if (t || n.hasOwnProperty(r)) {
for (var a = 0; n.hasOwnProperty(r + a); )
a++;
r += a;
}
return e.set(r, !0), r;
}
var eB = function() {
function r(e) {
this.coordSysDims = [], this.axisMap = K(), this.categoryAxisMap = K(), this.coordSysName = e;
}
return r;
}();
function rB(r) {
var e = r.get("coordinateSystem"), t = new eB(e), n = nB[e];
if (n)
return n(r, t, t.axisMap, t.categoryAxisMap), t;
}
var nB = {
cartesian2d: function(r, e, t, n) {
var a = r.getReferringComponents("xAxis", Kt).models[0], i = r.getReferringComponents("yAxis", Kt).models[0];
if (process.env.NODE_ENV !== "production") {
if (!a)
throw new Error('xAxis "' + qt(r.get("xAxisIndex"), r.get("xAxisId"), 0) + '" not found');
if (!i)
throw new Error('yAxis "' + qt(r.get("xAxisIndex"), r.get("yAxisId"), 0) + '" not found');
}
e.coordSysDims = ["x", "y"], t.set("x", a), t.set("y", i), Hi(a) && (n.set("x", a), e.firstCategoryDimIndex = 0), Hi(i) && (n.set("y", i), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
},
singleAxis: function(r, e, t, n) {
var a = r.getReferringComponents("singleAxis", Kt).models[0];
if (process.env.NODE_ENV !== "production" && !a)
throw new Error("singleAxis should be specified.");
e.coordSysDims = ["single"], t.set("single", a), Hi(a) && (n.set("single", a), e.firstCategoryDimIndex = 0);
},
polar: function(r, e, t, n) {
var a = r.getReferringComponents("polar", Kt).models[0], i = a.findAxisModel("radiusAxis"), o = a.findAxisModel("angleAxis");
if (process.env.NODE_ENV !== "production") {
if (!o)
throw new Error("angleAxis option not found");
if (!i)
throw new Error("radiusAxis option not found");
}
e.coordSysDims = ["radius", "angle"], t.set("radius", i), t.set("angle", o), Hi(i) && (n.set("radius", i), e.firstCategoryDimIndex = 0), Hi(o) && (n.set("angle", o), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = 1));
},
geo: function(r, e, t, n) {
e.coordSysDims = ["lng", "lat"];
},
parallel: function(r, e, t, n) {
var a = r.ecModel, i = a.getComponent("parallel", r.get("parallelIndex")), o = e.coordSysDims = i.dimensions.slice();
C(i.parallelAxisIndex, function(s, l) {
var u = a.getComponent("parallelAxis", s), f = o[l];
t.set(f, u), Hi(u) && (n.set(f, u), e.firstCategoryDimIndex == null && (e.firstCategoryDimIndex = l));
});
}
};
function Hi(r) {
return r.get("type") === "category";
}
function aB(r, e, t) {
t = t || {};
var n = t.byIndex, a = t.stackedCoordDimension, i, o, s;
iB(e) ? i = e : (o = e.schema, i = o.dimensions, s = e.store);
var l = !!(r && r.get("stack")), u, f, h, c;
if (C(i, function(m, _) {
W(m) && (i[_] = m = {
name: m
}), l && !m.isExtraCoord && (!n && !u && m.ordinalMeta && (u = m), !f && m.type !== "ordinal" && m.type !== "time" && (!a || a === m.coordDim) && (f = m));
}), f && !n && !u && (n = !0), f) {
h = "__\0ecstackresult_" + r.id, c = "__\0ecstackedover_" + r.id, u && (u.createInvertedIndices = !0);
var v = f.coordDim, p = f.type, d = 0;
C(i, function(m) {
m.coordDim === v && d++;
});
var g = {
name: h,
coordDim: v,
coordDimIndex: d,
type: p,
isExtraCoord: !0,
isCalculationCoord: !0,
storeDimIndex: i.length
}, y = {
name: c,
coordDim: c,
coordDimIndex: d + 1,
type: p,
isExtraCoord: !0,
isCalculationCoord: !0,
storeDimIndex: i.length + 1
};
o ? (s && (g.storeDimIndex = s.ensureCalculationDimension(c, p), y.storeDimIndex = s.ensureCalculationDimension(h, p)), o.appendCalculationDimension(g), o.appendCalculationDimension(y)) : (i.push(g), i.push(y));
}
return {
stackedDimension: f && f.name,
stackedByDimension: u && u.name,
isStackedByIndex: n,
stackedOverDimension: c,
stackResultDimension: h
};
}
function iB(r) {
return !_A(r.schema);
}
function sa(r, e) {
return !!e && e === r.getCalculationInfo("stackedDimension");
}
function bA(r, e) {
return sa(r, e) ? r.getCalculationInfo("stackResultDimension") : e;
}
function oB(r, e) {
var t = r.get("coordinateSystem"), n = $o.get(t), a;
return e && e.coordSysDims && (a = G(e.coordSysDims, function(i) {
var o = {
name: i
}, s = e.axisMap.get(i);
if (s) {
var l = s.get("type");
o.type = Uf(l);
}
return o;
})), a || (a = n && (n.getDimensionsInfo ? n.getDimensionsInfo() : n.dimensions.slice()) || ["x", "y"]), a;
}
function sB(r, e, t) {
var n, a;
return t && C(r, function(i, o) {
var s = i.coordDim, l = t.categoryAxisMap.get(s);
l && (n == null && (n = o), i.ordinalMeta = l.getOrdinalMeta(), e && (i.createInvertedIndices = !0)), i.otherDims.itemName != null && (a = !0);
}), !a && n != null && (r[n].otherDims.itemName = 0), n;
}
function An(r, e, t) {
t = t || {};
var n = e.getSourceManager(), a, i = !1;
r ? (i = !0, a = hy(r)) : (a = n.getSource(), i = a.sourceFormat === pr);
var o = rB(e), s = oB(e, o), l = t.useEncodeDefaulter, u = q(l) ? l : l ? it(uD, s, e) : null, f = {
coordDimensions: s,
generateCoord: t.generateCoord,
encodeDefine: e.getEncode(),
encodeDefaulter: u,
canOmitUnusedDimensions: !i
}, h = Ol(a, f), c = sB(h.dimensions, t.createInvertedIndices, o), v = i ? null : n.getSharedDataStore(h), p = aB(e, {
schema: h,
store: v
}), d = new Ae(h, e);
d.setCalculationInfo(p);
var g = c != null && lB(a) ? function(y, m, _, S) {
return S === c ? _ : this.defaultDimValueGetter(y, m, _, S);
} : null;
return d.hasItemOption = !1, d.initData(
i ? a : v,
null,
g
), d;
}
function lB(r) {
if (r.sourceFormat === pr) {
var e = uB(r.data || []);
return !z(No(e));
}
}
function uB(r) {
for (var e = 0; e < r.length && r[e] == null; )
e++;
return r[e];
}
var TA = function() {
function r(e) {
this._setting = e || {}, this._extent = [1 / 0, -1 / 0];
}
return r.prototype.getSetting = function(e) {
return this._setting[e];
}, r.prototype.unionExtent = function(e) {
var t = this._extent;
e[0] < t[0] && (t[0] = e[0]), e[1] > t[1] && (t[1] = e[1]);
}, r.prototype.unionExtentFromData = function(e, t) {
this.unionExtent(e.getApproximateExtent(t));
}, r.prototype.getExtent = function() {
return this._extent.slice();
}, r.prototype.setExtent = function(e, t) {
var n = this._extent;
isNaN(e) || (n[0] = e), isNaN(t) || (n[1] = t);
}, r.prototype.isInExtentRange = function(e) {
return this._extent[0] <= e && this._extent[1] >= e;
}, r.prototype.isBlank = function() {
return this._isBlank;
}, r.prototype.setBlank = function(e) {
this._isBlank = e;
}, r;
}();
Ah(TA);
const Mn = TA;
var fB = 0, hB = function() {
function r(e) {
this.categories = e.categories || [], this._needCollect = e.needCollect, this._deduplication = e.deduplication, this.uid = ++fB;
}
return r.createByAxisModel = function(e) {
var t = e.option, n = t.data, a = n && G(n, cB);
return new r({
categories: a,
needCollect: !a,
deduplication: t.dedplication !== !1
});
}, r.prototype.getOrdinal = function(e) {
return this._getOrCreateMap().get(e);
}, r.prototype.parseAndCollect = function(e) {
var t, n = this._needCollect;
if (!W(e) && !n)
return e;
if (n && !this._deduplication)
return t = this.categories.length, this.categories[t] = e, t;
var a = this._getOrCreateMap();
return t = a.get(e), t == null && (n ? (t = this.categories.length, this.categories[t] = e, a.set(e, t)) : t = NaN), t;
}, r.prototype._getOrCreateMap = function() {
return this._map || (this._map = K(this.categories));
}, r;
}();
function cB(r) {
return j(r) && r.value != null ? r.value : r + "";
}
const Vd = hB;
function vB(r) {
var e = Math.pow(10, Ch(Math.abs(r))), t = Math.abs(r / e);
return t === 0 || t === 1 || t === 2 || t === 3 || t === 5;
}
function Bd(r) {
return r.type === "interval" || r.type === "log";
}
function pB(r, e, t, n) {
var a = {}, i = r[1] - r[0], o = a.interval = kT(i / e, !0);
t != null && o < t && (o = a.interval = t), n != null && o > n && (o = a.interval = n);
var s = a.intervalPrecision = CA(o), l = a.niceTickExtent = [Wt(Math.ceil(r[0] / o) * o, s), Wt(Math.floor(r[1] / o) * o, s)];
return dB(l, r), a;
}
function dv(r) {
var e = Math.pow(10, Ch(r)), t = r / e;
return t ? t === 2 ? t = 3 : t === 3 ? t = 5 : t *= 2 : t = 1, Wt(t * e);
}
function CA(r) {
return Hr(r) + 2;
}
function v1(r, e, t) {
r[e] = Math.max(Math.min(r[e], t[1]), t[0]);
}
function dB(r, e) {
!isFinite(r[0]) && (r[0] = e[0]), !isFinite(r[1]) && (r[1] = e[1]), v1(r, 0, e), v1(r, 1, e), r[0] > r[1] && (r[0] = r[1]);
}
function Xh(r, e) {
return r >= e[0] && r <= e[1];
}
function qh(r, e) {
return e[1] === e[0] ? 0.5 : (r - e[0]) / (e[1] - e[0]);
}
function Kh(r, e) {
return r * (e[1] - e[0]) + e[0];
}
var DA = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
n.type = "ordinal";
var a = n.getSetting("ordinalMeta");
return a || (a = new Vd({})), z(a) && (a = new Vd({
categories: G(a, function(i) {
return j(i) ? i.value : i;
})
})), n._ordinalMeta = a, n._extent = n.getSetting("extent") || [0, a.categories.length - 1], n;
}
return e.prototype.parse = function(t) {
return t == null ? NaN : W(t) ? this._ordinalMeta.getOrdinal(t) : Math.round(t);
}, e.prototype.contain = function(t) {
return t = this.parse(t), Xh(t, this._extent) && this._ordinalMeta.categories[t] != null;
}, e.prototype.normalize = function(t) {
return t = this._getTickNumber(this.parse(t)), qh(t, this._extent);
}, e.prototype.scale = function(t) {
return t = Math.round(Kh(t, this._extent)), this.getRawOrdinalNumber(t);
}, e.prototype.getTicks = function() {
for (var t = [], n = this._extent, a = n[0]; a <= n[1]; )
t.push({
value: a
}), a++;
return t;
}, e.prototype.getMinorTicks = function(t) {
}, e.prototype.setSortInfo = function(t) {
if (t == null) {
this._ordinalNumbersByTick = this._ticksByOrdinalNumber = null;
return;
}
for (var n = t.ordinalNumbers, a = this._ordinalNumbersByTick = [], i = this._ticksByOrdinalNumber = [], o = 0, s = this._ordinalMeta.categories.length, l = Math.min(s, n.length); o < l; ++o) {
var u = n[o];
a[o] = u, i[u] = o;
}
for (var f = 0; o < s; ++o) {
for (; i[f] != null; )
f++;
a.push(f), i[f] = o;
}
}, e.prototype._getTickNumber = function(t) {
var n = this._ticksByOrdinalNumber;
return n && t >= 0 && t < n.length ? n[t] : t;
}, e.prototype.getRawOrdinalNumber = function(t) {
var n = this._ordinalNumbersByTick;
return n && t >= 0 && t < n.length ? n[t] : t;
}, e.prototype.getLabel = function(t) {
if (!this.isBlank()) {
var n = this.getRawOrdinalNumber(t.value), a = this._ordinalMeta.categories[n];
return a == null ? "" : a + "";
}
}, e.prototype.count = function() {
return this._extent[1] - this._extent[0] + 1;
}, e.prototype.unionExtentFromData = function(t, n) {
this.unionExtent(t.getApproximateExtent(n));
}, e.prototype.isInExtentRange = function(t) {
return t = this._getTickNumber(t), this._extent[0] <= t && this._extent[1] >= t;
}, e.prototype.getOrdinalMeta = function() {
return this._ordinalMeta;
}, e.prototype.calcNiceTicks = function() {
}, e.prototype.calcNiceExtent = function() {
}, e.type = "ordinal", e;
}(Mn);
Mn.registerClass(DA);
const Cy = DA;
var Oa = Wt, AA = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "interval", t._interval = 0, t._intervalPrecision = 2, t;
}
return e.prototype.parse = function(t) {
return t;
}, e.prototype.contain = function(t) {
return Xh(t, this._extent);
}, e.prototype.normalize = function(t) {
return qh(t, this._extent);
}, e.prototype.scale = function(t) {
return Kh(t, this._extent);
}, e.prototype.setExtent = function(t, n) {
var a = this._extent;
isNaN(t) || (a[0] = parseFloat(t)), isNaN(n) || (a[1] = parseFloat(n));
}, e.prototype.unionExtent = function(t) {
var n = this._extent;
t[0] < n[0] && (n[0] = t[0]), t[1] > n[1] && (n[1] = t[1]), this.setExtent(n[0], n[1]);
}, e.prototype.getInterval = function() {
return this._interval;
}, e.prototype.setInterval = function(t) {
this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = CA(t);
}, e.prototype.getTicks = function(t) {
var n = this._interval, a = this._extent, i = this._niceExtent, o = this._intervalPrecision, s = [];
if (!n)
return s;
var l = 1e4;
a[0] < i[0] && (t ? s.push({
value: Oa(i[0] - n, o)
}) : s.push({
value: a[0]
}));
for (var u = i[0]; u <= i[1] && (s.push({
value: u
}), u = Oa(u + n, o), u !== s[s.length - 1].value); )
if (s.length > l)
return [];
var f = s.length ? s[s.length - 1].value : i[1];
return a[1] > f && (t ? s.push({
value: Oa(f + n, o)
}) : s.push({
value: a[1]
})), s;
}, e.prototype.getMinorTicks = function(t) {
for (var n = this.getTicks(!0), a = [], i = this.getExtent(), o = 1; o < n.length; o++) {
for (var s = n[o], l = n[o - 1], u = 0, f = [], h = s.value - l.value, c = h / t; u < t - 1; ) {
var v = Oa(l.value + (u + 1) * c);
v > i[0] && v < i[1] && f.push(v), u++;
}
a.push(f);
}
return a;
}, e.prototype.getLabel = function(t, n) {
if (t == null)
return "";
var a = n && n.precision;
a == null ? a = Hr(t.value) || 0 : a === "auto" && (a = this._intervalPrecision);
var i = Oa(t.value, a, !0);
return eD(i);
}, e.prototype.calcNiceTicks = function(t, n, a) {
t = t || 5;
var i = this._extent, o = i[1] - i[0];
if (!!isFinite(o)) {
o < 0 && (o = -o, i.reverse());
var s = pB(i, t, n, a);
this._intervalPrecision = s.intervalPrecision, this._interval = s.interval, this._niceExtent = s.niceTickExtent;
}
}, e.prototype.calcNiceExtent = function(t) {
var n = this._extent;
if (n[0] === n[1])
if (n[0] !== 0) {
var a = n[0];
t.fixMax || (n[1] += a / 2), n[0] -= a / 2;
} else
n[1] = 1;
var i = n[1] - n[0];
isFinite(i) || (n[0] = 0, n[1] = 1), this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
var o = this._interval;
t.fixMin || (n[0] = Oa(Math.floor(n[0] / o) * o)), t.fixMax || (n[1] = Oa(Math.ceil(n[1] / o) * o));
}, e.prototype.setNiceExtent = function(t, n) {
this._niceExtent = [t, n];
}, e.type = "interval", e;
}(Mn);
Mn.registerClass(AA);
const la = AA;
var MA = typeof Float32Array < "u", gB = MA ? Float32Array : Array;
function Wr(r) {
return z(r) ? MA ? new Float32Array(r) : r : new gB(r);
}
var zd = "__ec_stack_";
function Dy(r) {
return r.get("stack") || zd + r.seriesIndex;
}
function Ay(r) {
return r.dim + r.index;
}
function yB(r) {
var e = [], t = r.axis, n = "axis0";
if (t.type === "category") {
for (var a = t.getBandWidth(), i = 0; i < r.count; i++)
e.push(J({
bandWidth: a,
axisKey: n,
stackId: zd + i
}, r));
for (var o = EA(e), s = [], i = 0; i < r.count; i++) {
var l = o[n][zd + i];
l.offsetCenter = l.offset + l.width / 2, s.push(l);
}
return s;
}
}
function LA(r, e) {
var t = [];
return e.eachSeriesByType(r, function(n) {
RA(n) && t.push(n);
}), t;
}
function mB(r) {
var e = {};
C(r, function(l) {
var u = l.coordinateSystem, f = u.getBaseAxis();
if (!(f.type !== "time" && f.type !== "value"))
for (var h = l.getData(), c = f.dim + "_" + f.index, v = h.getDimensionIndex(h.mapDimension(f.dim)), p = h.getStore(), d = 0, g = p.count(); d < g; ++d) {
var y = p.get(v, d);
e[c] ? e[c].push(y) : e[c] = [y];
}
});
var t = {};
for (var n in e)
if (e.hasOwnProperty(n)) {
var a = e[n];
if (a) {
a.sort(function(l, u) {
return l - u;
});
for (var i = null, o = 1; o < a.length; ++o) {
var s = a[o] - a[o - 1];
s > 0 && (i = i === null ? s : Math.min(i, s));
}
t[n] = i;
}
}
return t;
}
function IA(r) {
var e = mB(r), t = [];
return C(r, function(n) {
var a = n.coordinateSystem, i = a.getBaseAxis(), o = i.getExtent(), s;
if (i.type === "category")
s = i.getBandWidth();
else if (i.type === "value" || i.type === "time") {
var l = i.dim + "_" + i.index, u = e[l], f = Math.abs(o[1] - o[0]), h = i.scale.getExtent(), c = Math.abs(h[1] - h[0]);
s = u ? f / c * u : f;
} else {
var v = n.getData();
s = Math.abs(o[1] - o[0]) / v.count();
}
var p = H(n.get("barWidth"), s), d = H(n.get("barMaxWidth"), s), g = H(
n.get("barMinWidth") || (kA(n) ? 0.5 : 1),
s
), y = n.get("barGap"), m = n.get("barCategoryGap");
t.push({
bandWidth: s,
barWidth: p,
barMaxWidth: d,
barMinWidth: g,
barGap: y,
barCategoryGap: m,
axisKey: Ay(i),
stackId: Dy(n)
});
}), EA(t);
}
function EA(r) {
var e = {};
C(r, function(n, a) {
var i = n.axisKey, o = n.bandWidth, s = e[i] || {
bandWidth: o,
remainedWidth: o,
autoWidthCount: 0,
categoryGap: null,
gap: "20%",
stacks: {}
}, l = s.stacks;
e[i] = s;
var u = n.stackId;
l[u] || s.autoWidthCount++, l[u] = l[u] || {
width: 0,
maxWidth: 0
};
var f = n.barWidth;
f && !l[u].width && (l[u].width = f, f = Math.min(s.remainedWidth, f), s.remainedWidth -= f);
var h = n.barMaxWidth;
h && (l[u].maxWidth = h);
var c = n.barMinWidth;
c && (l[u].minWidth = c);
var v = n.barGap;
v != null && (s.gap = v);
var p = n.barCategoryGap;
p != null && (s.categoryGap = p);
});
var t = {};
return C(e, function(n, a) {
t[a] = {};
var i = n.stacks, o = n.bandWidth, s = n.categoryGap;
if (s == null) {
var l = mt(i).length;
s = Math.max(35 - l * 4, 15) + "%";
}
var u = H(s, o), f = H(n.gap, 1), h = n.remainedWidth, c = n.autoWidthCount, v = (h - u) / (c + (c - 1) * f);
v = Math.max(v, 0), C(i, function(y) {
var m = y.maxWidth, _ = y.minWidth;
if (y.width) {
var S = y.width;
m && (S = Math.min(S, m)), _ && (S = Math.max(S, _)), y.width = S, h -= S + f * S, c--;
} else {
var S = v;
m && m < S && (S = Math.min(m, h)), _ && _ > S && (S = _), S !== v && (y.width = S, h -= S + f * S, c--);
}
}), v = (h - u) / (c + (c - 1) * f), v = Math.max(v, 0);
var p = 0, d;
C(i, function(y, m) {
y.width || (y.width = v), d = y, p += y.width * (1 + f);
}), d && (p -= d.width * f);
var g = -p / 2;
C(i, function(y, m) {
t[a][m] = t[a][m] || {
bandWidth: o,
offset: g,
width: y.width
}, g += y.width * (1 + f);
});
}), t;
}
function _B(r, e, t) {
if (r && e) {
var n = r[Ay(e)];
return n != null && t != null ? n[Dy(t)] : n;
}
}
function PA(r, e) {
var t = LA(r, e), n = IA(t);
C(t, function(a) {
var i = a.getData(), o = a.coordinateSystem, s = o.getBaseAxis(), l = Dy(a), u = n[Ay(s)][l], f = u.offset, h = u.width;
i.setLayout({
bandWidth: u.bandWidth,
offset: f,
size: h
});
});
}
function NA(r) {
return {
seriesType: r,
plan: Wo(),
reset: function(e) {
if (!!RA(e)) {
var t = e.getData(), n = e.coordinateSystem, a = n.getBaseAxis(), i = n.getOtherAxis(a), o = t.getDimensionIndex(t.mapDimension(i.dim)), s = t.getDimensionIndex(t.mapDimension(a.dim)), l = e.get("showBackground", !0), u = t.mapDimension(i.dim), f = t.getCalculationInfo("stackResultDimension"), h = sa(t, u) && !!t.getCalculationInfo("stackedOnSeries"), c = i.isHorizontal(), v = SB(a, i), p = kA(e), d = e.get("barMinHeight") || 0, g = f && t.getDimensionIndex(f), y = t.getLayout("size"), m = t.getLayout("offset");
return {
progress: function(_, S) {
for (var w = _.count, x = p && Wr(w * 3), b = p && l && Wr(w * 3), T = p && Wr(w), D = n.master.getRect(), A = c ? D.width : D.height, M, L = S.getStore(), I = 0; (M = _.next()) != null; ) {
var E = L.get(h ? g : o, M), P = L.get(s, M), N = v, O = void 0;
h && (O = +E - L.get(o, M));
var k = void 0, V = void 0, F = void 0, $ = void 0;
if (c) {
var Z = n.dataToPoint([E, P]);
if (h) {
var et = n.dataToPoint([O, P]);
N = et[0];
}
k = N, V = Z[1] + m, F = Z[0] - N, $ = y, Math.abs(F) < d && (F = (F < 0 ? -1 : 1) * d);
} else {
var Z = n.dataToPoint([P, E]);
if (h) {
var et = n.dataToPoint([P, O]);
N = et[1];
}
k = Z[0] + m, V = N, F = y, $ = Z[1] - N, Math.abs($) < d && ($ = ($ <= 0 ? -1 : 1) * d);
}
p ? (x[I] = k, x[I + 1] = V, x[I + 2] = c ? F : $, b && (b[I] = c ? D.x : k, b[I + 1] = c ? V : D.y, b[I + 2] = A), T[M] = M) : S.setItemLayout(M, {
x: k,
y: V,
width: F,
height: $
}), I += 3;
}
p && S.setLayout({
largePoints: x,
largeDataIndices: T,
largeBackgroundPoints: b,
valueAxisHorizontal: c
});
}
};
}
}
};
}
function RA(r) {
return r.coordinateSystem && r.coordinateSystem.type === "cartesian2d";
}
function kA(r) {
return r.pipelineContext && r.pipelineContext.large;
}
function SB(r, e) {
return e.toGlobalCoord(e.dataToCoord(e.type === "log" ? 1 : 0));
}
var xB = function(r, e, t, n) {
for (; t < n; ) {
var a = t + n >>> 1;
r[a][1] < e ? t = a + 1 : n = a;
}
return t;
}, OA = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "time", n;
}
return e.prototype.getLabel = function(t) {
var n = this.getSetting("useUTC");
return Bh(t.value, r_[HR(vo(this._minLevelUnit))] || r_.second, n, this.getSetting("locale"));
}, e.prototype.getFormattedLabel = function(t, n, a) {
var i = this.getSetting("useUTC"), o = this.getSetting("locale");
return $R(t, n, a, o, i);
}, e.prototype.getTicks = function() {
var t = this._interval, n = this._extent, a = [];
if (!t)
return a;
a.push({
value: n[0],
level: 0
});
var i = this.getSetting("useUTC"), o = MB(this._minLevelUnit, this._approxInterval, i, n);
return a = a.concat(o), a.push({
value: n[1],
level: 0
}), a;
}, e.prototype.calcNiceExtent = function(t) {
var n = this._extent;
if (n[0] === n[1] && (n[0] -= sr, n[1] += sr), n[1] === -1 / 0 && n[0] === 1 / 0) {
var a = new Date();
n[1] = +new Date(a.getFullYear(), a.getMonth(), a.getDate()), n[0] = n[1] - sr;
}
this.calcNiceTicks(t.splitNumber, t.minInterval, t.maxInterval);
}, e.prototype.calcNiceTicks = function(t, n, a) {
t = t || 10;
var i = this._extent, o = i[1] - i[0];
this._approxInterval = o / t, n != null && this._approxInterval < n && (this._approxInterval = n), a != null && this._approxInterval > a && (this._approxInterval = a);
var s = wu.length, l = Math.min(xB(wu, this._approxInterval, 0, s), s - 1);
this._interval = wu[l][1], this._minLevelUnit = wu[Math.max(l - 1, 0)][0];
}, e.prototype.parse = function(t) {
return wt(t) ? t : +jr(t);
}, e.prototype.contain = function(t) {
return Xh(this.parse(t), this._extent);
}, e.prototype.normalize = function(t) {
return qh(this.parse(t), this._extent);
}, e.prototype.scale = function(t) {
return Kh(t, this._extent);
}, e.type = "time", e;
}(la), wu = [
["second", ny],
["minute", ay],
["hour", Ys],
["quarter-day", Ys * 6],
["half-day", Ys * 12],
["day", sr * 1.2],
["half-week", sr * 3.5],
["week", sr * 7],
["month", sr * 31],
["quarter", sr * 95],
["half-year", e_ / 2],
["year", e_]
];
function wB(r, e, t, n) {
var a = jr(e), i = jr(t), o = function(p) {
return n_(a, p, n) === n_(i, p, n);
}, s = function() {
return o("year");
}, l = function() {
return s() && o("month");
}, u = function() {
return l() && o("day");
}, f = function() {
return u() && o("hour");
}, h = function() {
return f() && o("minute");
}, c = function() {
return h() && o("second");
}, v = function() {
return c() && o("millisecond");
};
switch (r) {
case "year":
return s();
case "month":
return l();
case "day":
return u();
case "hour":
return f();
case "minute":
return h();
case "second":
return c();
case "millisecond":
return v();
}
}
function bB(r, e) {
return r /= sr, r > 16 ? 16 : r > 7.5 ? 7 : r > 3.5 ? 4 : r > 1.5 ? 2 : 1;
}
function TB(r) {
var e = 30 * sr;
return r /= e, r > 6 ? 6 : r > 3 ? 3 : r > 2 ? 2 : 1;
}
function CB(r) {
return r /= Ys, r > 12 ? 12 : r > 6 ? 6 : r > 3.5 ? 4 : r > 2 ? 2 : 1;
}
function p1(r, e) {
return r /= e ? ay : ny, r > 30 ? 30 : r > 20 ? 20 : r > 15 ? 15 : r > 10 ? 10 : r > 5 ? 5 : r > 2 ? 2 : 1;
}
function DB(r) {
return kT(r, !0);
}
function AB(r, e, t) {
var n = new Date(r);
switch (vo(e)) {
case "year":
case "month":
n[qC(t)](0);
case "day":
n[KC(t)](1);
case "hour":
n[jC(t)](0);
case "minute":
n[JC(t)](0);
case "second":
n[QC(t)](0), n[tD(t)](0);
}
return n.getTime();
}
function MB(r, e, t, n) {
var a = 1e4, i = ZC, o = 0;
function s(A, M, L, I, E, P, N) {
for (var O = new Date(M), k = M, V = O[I](); k < L && k <= n[1]; )
N.push({
value: k
}), V += A, O[E](V), k = O.getTime();
N.push({
value: k,
notAdd: !0
});
}
function l(A, M, L) {
var I = [], E = !M.length;
if (!wB(vo(A), n[0], n[1], t)) {
E && (M = [{
value: AB(new Date(n[0]), A, t)
}, {
value: n[1]
}]);
for (var P = 0; P < M.length - 1; P++) {
var N = M[P].value, O = M[P + 1].value;
if (N !== O) {
var k = void 0, V = void 0, F = void 0, $ = !1;
switch (A) {
case "year":
k = Math.max(1, Math.round(e / sr / 365)), V = iy(t), F = WR(t);
break;
case "half-year":
case "quarter":
case "month":
k = TB(e), V = po(t), F = qC(t);
break;
case "week":
case "half-week":
case "day":
k = bB(e), V = zh(t), F = KC(t), $ = !0;
break;
case "half-day":
case "quarter-day":
case "hour":
k = CB(e), V = sl(t), F = jC(t);
break;
case "minute":
k = p1(e, !0), V = Gh(t), F = JC(t);
break;
case "second":
k = p1(e, !1), V = Fh(t), F = QC(t);
break;
case "millisecond":
k = DB(e), V = Hh(t), F = tD(t);
break;
}
s(k, N, O, V, F, $, I), A === "year" && L.length > 1 && P === 0 && L.unshift({
value: L[0].value - k
});
}
}
for (var P = 0; P < I.length; P++)
L.push(I[P]);
return I;
}
}
for (var u = [], f = [], h = 0, c = 0, v = 0; v < i.length && o++ < a; ++v) {
var p = vo(i[v]);
if (!!FR(i[v])) {
l(i[v], u[u.length - 1] || [], f);
var d = i[v + 1] ? vo(i[v + 1]) : null;
if (p !== d) {
if (f.length) {
c = h, f.sort(function(A, M) {
return A.value - M.value;
});
for (var g = [], y = 0; y < f.length; ++y) {
var m = f[y].value;
(y === 0 || f[y - 1].value !== m) && (g.push(f[y]), m >= n[0] && m <= n[1] && h++);
}
var _ = (n[1] - n[0]) / e;
if (h > _ * 1.5 && c > _ / 1.5 || (u.push(g), h > _ || r === i[v]))
break;
}
f = [];
}
}
}
process.env.NODE_ENV !== "production" && o >= a && _e("Exceed safe limit.");
for (var S = Et(G(u, function(A) {
return Et(A, function(M) {
return M.value >= n[0] && M.value <= n[1] && !M.notAdd;
});
}), function(A) {
return A.length > 0;
}), w = [], x = S.length - 1, v = 0; v < S.length; ++v)
for (var b = S[v], T = 0; T < b.length; ++T)
w.push({
value: b[T].value,
level: x - v
});
w.sort(function(A, M) {
return A.value - M.value;
});
for (var D = [], v = 0; v < w.length; ++v)
(v === 0 || w[v].value !== w[v - 1].value) && D.push(w[v]);
return D;
}
Mn.registerClass(OA);
const VA = OA;
var d1 = Mn.prototype, Ks = la.prototype, LB = Wt, IB = Math.floor, EB = Math.ceil, bu = Math.pow, qe = Math.log, My = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "log", t.base = 10, t._originalScale = new la(), t._interval = 0, t;
}
return e.prototype.getTicks = function(t) {
var n = this._originalScale, a = this._extent, i = n.getExtent(), o = Ks.getTicks.call(this, t);
return G(o, function(s) {
var l = s.value, u = Wt(bu(this.base, l));
return u = l === a[0] && this._fixMin ? Tu(u, i[0]) : u, u = l === a[1] && this._fixMax ? Tu(u, i[1]) : u, {
value: u
};
}, this);
}, e.prototype.setExtent = function(t, n) {
var a = this.base;
t = qe(t) / qe(a), n = qe(n) / qe(a), Ks.setExtent.call(this, t, n);
}, e.prototype.getExtent = function() {
var t = this.base, n = d1.getExtent.call(this);
n[0] = bu(t, n[0]), n[1] = bu(t, n[1]);
var a = this._originalScale, i = a.getExtent();
return this._fixMin && (n[0] = Tu(n[0], i[0])), this._fixMax && (n[1] = Tu(n[1], i[1])), n;
}, e.prototype.unionExtent = function(t) {
this._originalScale.unionExtent(t);
var n = this.base;
t[0] = qe(t[0]) / qe(n), t[1] = qe(t[1]) / qe(n), d1.unionExtent.call(this, t);
}, e.prototype.unionExtentFromData = function(t, n) {
this.unionExtent(t.getApproximateExtent(n));
}, e.prototype.calcNiceTicks = function(t) {
t = t || 10;
var n = this._extent, a = n[1] - n[0];
if (!(a === 1 / 0 || a <= 0)) {
var i = lP(a), o = t / a * i;
for (o <= 0.5 && (i *= 10); !isNaN(i) && Math.abs(i) < 1 && Math.abs(i) > 0; )
i *= 10;
var s = [Wt(EB(n[0] / i) * i), Wt(IB(n[1] / i) * i)];
this._interval = i, this._niceExtent = s;
}
}, e.prototype.calcNiceExtent = function(t) {
Ks.calcNiceExtent.call(this, t), this._fixMin = t.fixMin, this._fixMax = t.fixMax;
}, e.prototype.parse = function(t) {
return t;
}, e.prototype.contain = function(t) {
return t = qe(t) / qe(this.base), Xh(t, this._extent);
}, e.prototype.normalize = function(t) {
return t = qe(t) / qe(this.base), qh(t, this._extent);
}, e.prototype.scale = function(t) {
return t = Kh(t, this._extent), bu(this.base, t);
}, e.type = "log", e;
}(Mn), BA = My.prototype;
BA.getMinorTicks = Ks.getMinorTicks;
BA.getLabel = Ks.getLabel;
function Tu(r, e) {
return LB(r, Hr(e));
}
Mn.registerClass(My);
const PB = My;
var NB = function() {
function r(e, t, n) {
this._prepareParams(e, t, n);
}
return r.prototype._prepareParams = function(e, t, n) {
n[1] < n[0] && (n = [NaN, NaN]), this._dataMin = n[0], this._dataMax = n[1];
var a = this._isOrdinal = e.type === "ordinal";
this._needCrossZero = e.type === "interval" && t.getNeedCrossZero && t.getNeedCrossZero();
var i = this._modelMinRaw = t.get("min", !0);
q(i) ? this._modelMinNum = Cu(e, i({
min: n[0],
max: n[1]
})) : i !== "dataMin" && (this._modelMinNum = Cu(e, i));
var o = this._modelMaxRaw = t.get("max", !0);
if (q(o) ? this._modelMaxNum = Cu(e, o({
min: n[0],
max: n[1]
})) : o !== "dataMax" && (this._modelMaxNum = Cu(e, o)), a)
this._axisDataLen = t.getCategories().length;
else {
var s = t.get("boundaryGap"), l = z(s) ? s : [s || 0, s || 0];
typeof l[0] == "boolean" || typeof l[1] == "boolean" ? (process.env.NODE_ENV !== "production" && console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'), this._boundaryGapInner = [0, 0]) : this._boundaryGapInner = [Ar(l[0], 1), Ar(l[1], 1)];
}
}, r.prototype.calculate = function() {
var e = this._isOrdinal, t = this._dataMin, n = this._dataMax, a = this._axisDataLen, i = this._boundaryGapInner, o = e ? null : n - t || Math.abs(t), s = this._modelMinRaw === "dataMin" ? t : this._modelMinNum, l = this._modelMaxRaw === "dataMax" ? n : this._modelMaxNum, u = s != null, f = l != null;
s == null && (s = e ? a ? 0 : NaN : t - i[0] * o), l == null && (l = e ? a ? a - 1 : NaN : n + i[1] * o), (s == null || !isFinite(s)) && (s = NaN), (l == null || !isFinite(l)) && (l = NaN);
var h = vi(s) || vi(l) || e && !a;
this._needCrossZero && (s > 0 && l > 0 && !u && (s = 0), s < 0 && l < 0 && !f && (l = 0));
var c = this._determinedMin, v = this._determinedMax;
return c != null && (s = c, u = !0), v != null && (l = v, f = !0), {
min: s,
max: l,
minFixed: u,
maxFixed: f,
isBlank: h
};
}, r.prototype.modifyDataMinMax = function(e, t) {
process.env.NODE_ENV !== "production" && Q(!this.frozen), this[kB[e]] = t;
}, r.prototype.setDeterminedMinMax = function(e, t) {
var n = RB[e];
process.env.NODE_ENV !== "production" && Q(!this.frozen && this[n] == null), this[n] = t;
}, r.prototype.freeze = function() {
this.frozen = !0;
}, r;
}(), RB = {
min: "_determinedMin",
max: "_determinedMax"
}, kB = {
min: "_dataMin",
max: "_dataMax"
};
function zA(r, e, t) {
var n = r.rawExtentInfo;
return n || (n = new NB(r, e, t), r.rawExtentInfo = n, n);
}
function Cu(r, e) {
return e == null ? null : vi(e) ? NaN : r.parse(e);
}
function GA(r, e) {
var t = r.type, n = zA(r, e, r.getExtent()).calculate();
r.setBlank(n.isBlank);
var a = n.min, i = n.max, o = e.ecModel;
if (o && t === "time") {
var s = LA("bar", o), l = !1;
if (C(s, function(h) {
l = l || h.getBaseAxis() === e.axis;
}), l) {
var u = IA(s), f = OB(a, i, e, u);
a = f.min, i = f.max;
}
}
return {
extent: [a, i],
fixMin: n.minFixed,
fixMax: n.maxFixed
};
}
function OB(r, e, t, n) {
var a = t.axis.getExtent(), i = a[1] - a[0], o = _B(n, t.axis);
if (o === void 0)
return {
min: r,
max: e
};
var s = 1 / 0;
C(o, function(v) {
s = Math.min(v.offset, s);
});
var l = -1 / 0;
C(o, function(v) {
l = Math.max(v.offset + v.width, l);
}), s = Math.abs(s), l = Math.abs(l);
var u = s + l, f = e - r, h = 1 - (s + l) / i, c = f / h - f;
return e += c * (l / u), r -= c * (s / u), {
min: r,
max: e
};
}
function To(r, e) {
var t = e, n = GA(r, t), a = n.extent, i = t.get("splitNumber");
r instanceof PB && (r.base = t.get("logBase"));
var o = r.type, s = t.get("interval"), l = o === "interval" || o === "time";
r.setExtent(a[0], a[1]), r.calcNiceExtent({
splitNumber: i,
fixMin: n.fixMin,
fixMax: n.fixMax,
minInterval: l ? t.get("minInterval") : null,
maxInterval: l ? t.get("maxInterval") : null
}), s != null && r.setInterval && r.setInterval(s);
}
function jh(r, e) {
if (e = e || r.get("type"), e)
switch (e) {
case "category":
return new Cy({
ordinalMeta: r.getOrdinalMeta ? r.getOrdinalMeta() : r.getCategories(),
extent: [1 / 0, -1 / 0]
});
case "time":
return new VA({
locale: r.ecModel.getLocaleModel(),
useUTC: r.ecModel.get("useUTC")
});
default:
return new (Mn.getClass(e) || la)();
}
}
function VB(r) {
var e = r.scale.getExtent(), t = e[0], n = e[1];
return !(t > 0 && n > 0 || t < 0 && n < 0);
}
function Vl(r) {
var e = r.getLabelModel().get("formatter"), t = r.type === "category" ? r.scale.getExtent()[0] : null;
return r.scale.type === "time" ? function(n) {
return function(a, i) {
return r.scale.getFormattedLabel(a, i, n);
};
}(e) : W(e) ? function(n) {
return function(a) {
var i = r.scale.getLabel(a), o = n.replace("{value}", i != null ? i : "");
return o;
};
}(e) : q(e) ? function(n) {
return function(a, i) {
return t != null && (i = a.value - t), n(Ly(r, a), i, a.level != null ? {
level: a.level
} : null);
};
}(e) : function(n) {
return r.scale.getLabel(n);
};
}
function Ly(r, e) {
return r.type === "category" ? r.scale.getLabel(e) : e.value;
}
function BB(r) {
var e = r.model, t = r.scale;
if (!(!e.get(["axisLabel", "show"]) || t.isBlank())) {
var n, a, i = t.getExtent();
t instanceof Cy ? a = t.count() : (n = t.getTicks(), a = n.length);
var o = r.getLabelModel(), s = Vl(r), l, u = 1;
a > 40 && (u = Math.ceil(a / 40));
for (var f = 0; f < a; f += u) {
var h = n ? n[f] : {
value: i[0] + f
}, c = s(h, f), v = o.getTextRect(c), p = zB(v, o.get("rotate") || 0);
l ? l.union(p) : l = p;
}
return l;
}
}
function zB(r, e) {
var t = e * Math.PI / 180, n = r.width, a = r.height, i = n * Math.abs(Math.cos(t)) + Math.abs(a * Math.sin(t)), o = n * Math.abs(Math.sin(t)) + Math.abs(a * Math.cos(t)), s = new ft(r.x, r.y, i, o);
return s;
}
function Iy(r) {
var e = r.get("interval");
return e == null ? "auto" : e;
}
function FA(r) {
return r.type === "category" && Iy(r.getLabelModel()) === 0;
}
function Yf(r, e) {
var t = {};
return C(r.mapDimensionsAll(e), function(n) {
t[bA(r, n)] = !0;
}), mt(t);
}
function GB(r, e, t) {
e && C(Yf(e, t), function(n) {
var a = e.getApproximateExtent(n);
a[0] < r[0] && (r[0] = a[0]), a[1] > r[1] && (r[1] = a[1]);
});
}
var Bl = function() {
function r() {
}
return r.prototype.getNeedCrossZero = function() {
var e = this.option;
return !e.scale;
}, r.prototype.getCoordSysModel = function() {
}, r;
}(), FB = 1e-8;
function g1(r, e) {
return Math.abs(r - e) < FB;
}
function Xa(r, e, t) {
var n = 0, a = r[0];
if (!a)
return !1;
for (var i = 1; i < r.length; i++) {
var o = r[i];
n += ln(a[0], a[1], o[0], o[1], e, t), a = o;
}
var s = r[0];
return (!g1(a[0], s[0]) || !g1(a[1], s[1])) && (n += ln(a[0], a[1], s[0], s[1], e, t)), n !== 0;
}
var HB = [];
function gv(r, e) {
for (var t = 0; t < r.length; t++)
ue(r[t], r[t], e);
}
function y1(r, e, t, n) {
for (var a = 0; a < r.length; a++) {
var i = r[a];
n && (i = n.project(i)), i && isFinite(i[0]) && isFinite(i[1]) && (Wn(e, e, i), Un(t, t, i));
}
}
function $B(r) {
for (var e = 0, t = 0, n = 0, a = r.length, i = r[a - 1][0], o = r[a - 1][1], s = 0; s < a; s++) {
var l = r[s][0], u = r[s][1], f = i * u - l * o;
e += f, t += (i + l) * f, n += (o + u) * f, i = l, o = u;
}
return e ? [t / e / 3, n / e / 3, e] : [r[0][0] || 0, r[0][1] || 0];
}
var HA = function() {
function r(e) {
this.name = e;
}
return r.prototype.setCenter = function(e) {
this._center = e;
}, r.prototype.getCenter = function() {
var e = this._center;
return e || (e = this._center = this.calcCenter()), e;
}, r;
}(), m1 = function() {
function r(e, t) {
this.type = "polygon", this.exterior = e, this.interiors = t;
}
return r;
}(), _1 = function() {
function r(e) {
this.type = "linestring", this.points = e;
}
return r;
}(), $A = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this, t) || this;
return i.type = "geoJSON", i.geometries = n, i._center = a && [a[0], a[1]], i;
}
return e.prototype.calcCenter = function() {
for (var t = this.geometries, n, a = 0, i = 0; i < t.length; i++) {
var o = t[i], s = o.exterior, l = s && s.length;
l > a && (n = o, a = l);
}
if (n)
return $B(n.exterior);
var u = this.getBoundingRect();
return [u.x + u.width / 2, u.y + u.height / 2];
}, e.prototype.getBoundingRect = function(t) {
var n = this._rect;
if (n && !t)
return n;
var a = [1 / 0, 1 / 0], i = [-1 / 0, -1 / 0], o = this.geometries;
return C(o, function(s) {
s.type === "polygon" ? y1(s.exterior, a, i, t) : C(s.points, function(l) {
y1(l, a, i, t);
});
}), isFinite(a[0]) && isFinite(a[1]) && isFinite(i[0]) && isFinite(i[1]) || (a[0] = a[1] = i[0] = i[1] = 0), n = new ft(a[0], a[1], i[0] - a[0], i[1] - a[1]), t || (this._rect = n), n;
}, e.prototype.contain = function(t) {
var n = this.getBoundingRect(), a = this.geometries;
if (!n.contain(t[0], t[1]))
return !1;
t:
for (var i = 0, o = a.length; i < o; i++) {
var s = a[i];
if (s.type === "polygon") {
var l = s.exterior, u = s.interiors;
if (Xa(l, t[0], t[1])) {
for (var f = 0; f < (u ? u.length : 0); f++)
if (Xa(u[f], t[0], t[1]))
continue t;
return !0;
}
}
}
return !1;
}, e.prototype.transformTo = function(t, n, a, i) {
var o = this.getBoundingRect(), s = o.width / o.height;
a ? i || (i = a / s) : a = s * i;
for (var l = new ft(t, n, a, i), u = o.calculateTransform(l), f = this.geometries, h = 0; h < f.length; h++) {
var c = f[h];
c.type === "polygon" ? (gv(c.exterior, u), C(c.interiors, function(v) {
gv(v, u);
})) : C(c.points, function(v) {
gv(v, u);
});
}
o = this._rect, o.copy(l), this._center = [o.x + o.width / 2, o.y + o.height / 2];
}, e.prototype.cloneShallow = function(t) {
t == null && (t = this.name);
var n = new e(t, this.geometries, this._center);
return n._rect = this._rect, n.transformTo = null, n;
}, e;
}(HA), WB = function(r) {
R(e, r);
function e(t, n) {
var a = r.call(this, t) || this;
return a.type = "geoSVG", a._elOnlyForCalculate = n, a;
}
return e.prototype.calcCenter = function() {
for (var t = this._elOnlyForCalculate, n = t.getBoundingRect(), a = [n.x + n.width / 2, n.y + n.height / 2], i = bh(HB), o = t; o && !o.isGeoSVGGraphicRoot; )
vn(i, o.getLocalTransform(), i), o = o.parent;
return Po(i, i), ue(a, a, i), a;
}, e;
}(HA);
function UB(r) {
if (!r.UTF8Encoding)
return r;
var e = r, t = e.UTF8Scale;
t == null && (t = 1024);
var n = e.features;
return C(n, function(a) {
var i = a.geometry, o = i.encodeOffsets, s = i.coordinates;
if (!!o)
switch (i.type) {
case "LineString":
i.coordinates = WA(s, o, t);
break;
case "Polygon":
yv(s, o, t);
break;
case "MultiLineString":
yv(s, o, t);
break;
case "MultiPolygon":
C(s, function(l, u) {
return yv(l, o[u], t);
});
}
}), e.UTF8Encoding = !1, e;
}
function yv(r, e, t) {
for (var n = 0; n < r.length; n++)
r[n] = WA(r[n], e[n], t);
}
function WA(r, e, t) {
for (var n = [], a = e[0], i = e[1], o = 0; o < r.length; o += 2) {
var s = r.charCodeAt(o) - 64, l = r.charCodeAt(o + 1) - 64;
s = s >> 1 ^ -(s & 1), l = l >> 1 ^ -(l & 1), s += a, l += i, a = s, i = l, n.push([s / t, l / t]);
}
return n;
}
function YB(r, e) {
return r = UB(r), G(Et(r.features, function(t) {
return t.geometry && t.properties && t.geometry.coordinates.length > 0;
}), function(t) {
var n = t.properties, a = t.geometry, i = [];
switch (a.type) {
case "Polygon":
var o = a.coordinates;
i.push(new m1(o[0], o.slice(1)));
break;
case "MultiPolygon":
C(a.coordinates, function(l) {
l[0] && i.push(new m1(l[0], l.slice(1)));
});
break;
case "LineString":
i.push(new _1([a.coordinates]));
break;
case "MultiLineString":
i.push(new _1(a.coordinates));
}
var s = new $A(n[e || "name"], i, n.cp);
return s.properties = n, s;
});
}
var vl = Tt();
function ZB(r) {
return r.type === "category" ? qB(r) : jB(r);
}
function XB(r, e) {
return r.type === "category" ? KB(r, e) : {
ticks: G(r.scale.getTicks(), function(t) {
return t.value;
})
};
}
function qB(r) {
var e = r.getLabelModel(), t = UA(r, e);
return !e.get("show") || r.scale.isBlank() ? {
labels: [],
labelCategoryInterval: t.labelCategoryInterval
} : t;
}
function UA(r, e) {
var t = YA(r, "labels"), n = Iy(e), a = ZA(t, n);
if (a)
return a;
var i, o;
return q(n) ? i = KA(r, n) : (o = n === "auto" ? JB(r) : n, i = qA(r, o)), XA(t, n, {
labels: i,
labelCategoryInterval: o
});
}
function KB(r, e) {
var t = YA(r, "ticks"), n = Iy(e), a = ZA(t, n);
if (a)
return a;
var i, o;
if ((!e.get("show") || r.scale.isBlank()) && (i = []), q(n))
i = KA(r, n, !0);
else if (n === "auto") {
var s = UA(r, r.getLabelModel());
o = s.labelCategoryInterval, i = G(s.labels, function(l) {
return l.tickValue;
});
} else
o = n, i = qA(r, o, !0);
return XA(t, n, {
ticks: i,
tickCategoryInterval: o
});
}
function jB(r) {
var e = r.scale.getTicks(), t = Vl(r);
return {
labels: G(e, function(n, a) {
return {
level: n.level,
formattedLabel: t(n, a),
rawLabel: r.scale.getLabel(n),
tickValue: n.value
};
})
};
}
function YA(r, e) {
return vl(r)[e] || (vl(r)[e] = []);
}
function ZA(r, e) {
for (var t = 0; t < r.length; t++)
if (r[t].key === e)
return r[t].value;
}
function XA(r, e, t) {
return r.push({
key: e,
value: t
}), t;
}
function JB(r) {
var e = vl(r).autoInterval;
return e != null ? e : vl(r).autoInterval = r.calculateCategoryInterval();
}
function QB(r) {
var e = tz(r), t = Vl(r), n = (e.axisRotate - e.labelRotate) / 180 * Math.PI, a = r.scale, i = a.getExtent(), o = a.count();
if (i[1] - i[0] < 1)
return 0;
var s = 1;
o > 40 && (s = Math.max(1, Math.floor(o / 40)));
for (var l = i[0], u = r.dataToCoord(l + 1) - r.dataToCoord(l), f = Math.abs(u * Math.cos(n)), h = Math.abs(u * Math.sin(n)), c = 0, v = 0; l <= i[1]; l += s) {
var p = 0, d = 0, g = Al(t({
value: l
}), e.font, "center", "top");
p = g.width * 1.3, d = g.height * 1.3, c = Math.max(c, p, 7), v = Math.max(v, d, 7);
}
var y = c / f, m = v / h;
isNaN(y) && (y = 1 / 0), isNaN(m) && (m = 1 / 0);
var _ = Math.max(0, Math.floor(Math.min(y, m))), S = vl(r.model), w = r.getExtent(), x = S.lastAutoInterval, b = S.lastTickCount;
return x != null && b != null && Math.abs(x - _) <= 1 && Math.abs(b - o) <= 1 && x > _ && S.axisExtent0 === w[0] && S.axisExtent1 === w[1] ? _ = x : (S.lastTickCount = o, S.lastAutoInterval = _, S.axisExtent0 = w[0], S.axisExtent1 = w[1]), _;
}
function tz(r) {
var e = r.getLabelModel();
return {
axisRotate: r.getRotate ? r.getRotate() : r.isHorizontal && !r.isHorizontal() ? 90 : 0,
labelRotate: e.get("rotate") || 0,
font: e.getFont()
};
}
function qA(r, e, t) {
var n = Vl(r), a = r.scale, i = a.getExtent(), o = r.getLabelModel(), s = [], l = Math.max((e || 0) + 1, 1), u = i[0], f = a.count();
u !== 0 && l > 1 && f / l > 2 && (u = Math.round(Math.ceil(u / l) * l));
var h = FA(r), c = o.get("showMinLabel") || h, v = o.get("showMaxLabel") || h;
c && u !== i[0] && d(i[0]);
for (var p = u; p <= i[1]; p += l)
d(p);
v && p - l !== i[1] && d(i[1]);
function d(g) {
var y = {
value: g
};
s.push(t ? g : {
formattedLabel: n(y),
rawLabel: a.getLabel(y),
tickValue: g
});
}
return s;
}
function KA(r, e, t) {
var n = r.scale, a = Vl(r), i = [];
return C(n.getTicks(), function(o) {
var s = n.getLabel(o), l = o.value;
e(o.value, s) && i.push(t ? l : {
formattedLabel: a(o),
rawLabel: s,
tickValue: l
});
}), i;
}
var S1 = [0, 1], ez = function() {
function r(e, t, n) {
this.onBand = !1, this.inverse = !1, this.dim = e, this.scale = t, this._extent = n || [0, 0];
}
return r.prototype.contain = function(e) {
var t = this._extent, n = Math.min(t[0], t[1]), a = Math.max(t[0], t[1]);
return e >= n && e <= a;
}, r.prototype.containData = function(e) {
return this.scale.contain(e);
}, r.prototype.getExtent = function() {
return this._extent.slice();
}, r.prototype.getPixelPrecision = function(e) {
return NT(e || this.scale.getExtent(), this._extent);
}, r.prototype.setExtent = function(e, t) {
var n = this._extent;
n[0] = e, n[1] = t;
}, r.prototype.dataToCoord = function(e, t) {
var n = this._extent, a = this.scale;
return e = a.normalize(e), this.onBand && a.type === "ordinal" && (n = n.slice(), x1(n, a.count())), It(e, S1, n, t);
}, r.prototype.coordToData = function(e, t) {
var n = this._extent, a = this.scale;
this.onBand && a.type === "ordinal" && (n = n.slice(), x1(n, a.count()));
var i = It(e, n, S1, t);
return this.scale.scale(i);
}, r.prototype.pointToData = function(e, t) {
}, r.prototype.getTicksCoords = function(e) {
e = e || {};
var t = e.tickModel || this.getTickModel(), n = XB(this, t), a = n.ticks, i = G(a, function(s) {
return {
coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(s) : s),
tickValue: s
};
}, this), o = t.get("alignWithLabel");
return rz(this, i, o, e.clamp), i;
}, r.prototype.getMinorTicksCoords = function() {
if (this.scale.type === "ordinal")
return [];
var e = this.model.getModel("minorTick"), t = e.get("splitNumber");
t > 0 && t < 100 || (t = 5);
var n = this.scale.getMinorTicks(t), a = G(n, function(i) {
return G(i, function(o) {
return {
coord: this.dataToCoord(o),
tickValue: o
};
}, this);
}, this);
return a;
}, r.prototype.getViewLabels = function() {
return ZB(this).labels;
}, r.prototype.getLabelModel = function() {
return this.model.getModel("axisLabel");
}, r.prototype.getTickModel = function() {
return this.model.getModel("axisTick");
}, r.prototype.getBandWidth = function() {
var e = this._extent, t = this.scale.getExtent(), n = t[1] - t[0] + (this.onBand ? 1 : 0);
n === 0 && (n = 1);
var a = Math.abs(e[1] - e[0]);
return Math.abs(a) / n;
}, r.prototype.calculateCategoryInterval = function() {
return QB(this);
}, r;
}();
function x1(r, e) {
var t = r[1] - r[0], n = e, a = t / n / 2;
r[0] += a, r[1] -= a;
}
function rz(r, e, t, n) {
var a = e.length;
if (!r.onBand || t || !a)
return;
var i = r.getExtent(), o, s;
if (a === 1)
e[0].coord = i[0], o = e[1] = {
coord: i[0]
};
else {
var l = e[a - 1].tickValue - e[0].tickValue, u = (e[a - 1].coord - e[0].coord) / l;
C(e, function(v) {
v.coord -= u / 2;
});
var f = r.scale.getExtent();
s = 1 + f[1] - e[a - 1].tickValue, o = {
coord: e[a - 1].coord + u * s
}, e.push(o);
}
var h = i[0] > i[1];
c(e[0].coord, i[0]) && (n ? e[0].coord = i[0] : e.shift()), n && c(i[0], e[0].coord) && e.unshift({
coord: i[0]
}), c(i[1], o.coord) && (n ? o.coord = i[1] : e.pop()), n && c(o.coord, i[1]) && e.push({
coord: i[1]
});
function c(v, p) {
return v = Wt(v), p = Wt(p), h ? v > p : v < p;
}
}
const Er = ez;
var ps = Math.PI * 2, Va = Jr.CMD, nz = ["top", "right", "bottom", "left"];
function az(r, e, t, n, a) {
var i = t.width, o = t.height;
switch (r) {
case "top":
n.set(t.x + i / 2, t.y - e), a.set(0, -1);
break;
case "bottom":
n.set(t.x + i / 2, t.y + o + e), a.set(0, 1);
break;
case "left":
n.set(t.x - e, t.y + o / 2), a.set(-1, 0);
break;
case "right":
n.set(t.x + i + e, t.y + o / 2), a.set(1, 0);
break;
}
}
function iz(r, e, t, n, a, i, o, s, l) {
o -= r, s -= e;
var u = Math.sqrt(o * o + s * s);
o /= u, s /= u;
var f = o * t + r, h = s * t + e;
if (Math.abs(n - a) % ps < 1e-4)
return l[0] = f, l[1] = h, u - t;
if (i) {
var c = n;
n = qn(a), a = qn(c);
} else
n = qn(n), a = qn(a);
n > a && (a += ps);
var v = Math.atan2(s, o);
if (v < 0 && (v += ps), v >= n && v <= a || v + ps >= n && v + ps <= a)
return l[0] = f, l[1] = h, u - t;
var p = t * Math.cos(n) + r, d = t * Math.sin(n) + e, g = t * Math.cos(a) + r, y = t * Math.sin(a) + e, m = (p - o) * (p - o) + (d - s) * (d - s), _ = (g - o) * (g - o) + (y - s) * (y - s);
return m < _ ? (l[0] = p, l[1] = d, Math.sqrt(m)) : (l[0] = g, l[1] = y, Math.sqrt(_));
}
function Zf(r, e, t, n, a, i, o, s) {
var l = a - r, u = i - e, f = t - r, h = n - e, c = Math.sqrt(f * f + h * h);
f /= c, h /= c;
var v = l * f + u * h, p = v / c;
s && (p = Math.min(Math.max(p, 0), 1)), p *= c;
var d = o[0] = r + p * f, g = o[1] = e + p * h;
return Math.sqrt((d - a) * (d - a) + (g - i) * (g - i));
}
function jA(r, e, t, n, a, i, o) {
t < 0 && (r = r + t, t = -t), n < 0 && (e = e + n, n = -n);
var s = r + t, l = e + n, u = o[0] = Math.min(Math.max(a, r), s), f = o[1] = Math.min(Math.max(i, e), l);
return Math.sqrt((u - a) * (u - a) + (f - i) * (f - i));
}
var _r = [];
function oz(r, e, t) {
var n = jA(e.x, e.y, e.width, e.height, r.x, r.y, _r);
return t.set(_r[0], _r[1]), n;
}
function sz(r, e, t) {
for (var n = 0, a = 0, i = 0, o = 0, s, l, u = 1 / 0, f = e.data, h = r.x, c = r.y, v = 0; v < f.length; ) {
var p = f[v++];
v === 1 && (n = f[v], a = f[v + 1], i = n, o = a);
var d = u;
switch (p) {
case Va.M:
i = f[v++], o = f[v++], n = i, a = o;
break;
case Va.L:
d = Zf(n, a, f[v], f[v + 1], h, c, _r, !0), n = f[v++], a = f[v++];
break;
case Va.C:
d = pT(n, a, f[v++], f[v++], f[v++], f[v++], f[v], f[v + 1], h, c, _r), n = f[v++], a = f[v++];
break;
case Va.Q:
d = gT(n, a, f[v++], f[v++], f[v], f[v + 1], h, c, _r), n = f[v++], a = f[v++];
break;
case Va.A:
var g = f[v++], y = f[v++], m = f[v++], _ = f[v++], S = f[v++], w = f[v++];
v += 1;
var x = !!(1 - f[v++]);
s = Math.cos(S) * m + g, l = Math.sin(S) * _ + y, v <= 1 && (i = s, o = l);
var b = (h - g) * _ / m + g;
d = iz(g, y, _, S, S + w, x, b, c, _r), n = Math.cos(S + w) * m + g, a = Math.sin(S + w) * _ + y;
break;
case Va.R:
i = n = f[v++], o = a = f[v++];
var T = f[v++], D = f[v++];
d = jA(i, o, T, D, h, c, _r);
break;
case Va.Z:
d = Zf(n, a, i, o, h, c, _r, !0), n = i, a = o;
break;
}
d < u && (u = d, t.set(_r[0], _r[1]));
}
return u;
}
var wr = new st(), Rt = new st(), Yt = new st(), Ur = new st(), Fr = new st();
function w1(r, e) {
if (!!r) {
var t = r.getTextGuideLine(), n = r.getTextContent();
if (!!(n && t)) {
var a = r.textGuideLineConfig || {}, i = [[0, 0], [0, 0], [0, 0]], o = a.candidates || nz, s = n.getBoundingRect().clone();
s.applyTransform(n.getComputedTransform());
var l = 1 / 0, u = a.anchor, f = r.getComputedTransform(), h = f && Po([], f), c = e.get("length2") || 0;
u && Yt.copy(u);
for (var v = 0; v < o.length; v++) {
var p = o[v];
az(p, 0, s, wr, Ur), st.scaleAndAdd(Rt, wr, Ur, c), Rt.transform(h);
var d = r.getBoundingRect(), g = u ? u.distance(Rt) : r instanceof gt ? sz(Rt, r.path, Yt) : oz(Rt, d, Yt);
g < l && (l = g, Rt.transform(f), Yt.transform(f), Yt.toArray(i[0]), Rt.toArray(i[1]), wr.toArray(i[2]));
}
JA(i, e.get("minTurnAngle")), t.setShape({
points: i
});
}
}
}
var Xf = [], De = new st();
function JA(r, e) {
if (e <= 180 && e > 0) {
e = e / 180 * Math.PI, wr.fromArray(r[0]), Rt.fromArray(r[1]), Yt.fromArray(r[2]), st.sub(Ur, wr, Rt), st.sub(Fr, Yt, Rt);
var t = Ur.len(), n = Fr.len();
if (!(t < 1e-3 || n < 1e-3)) {
Ur.scale(1 / t), Fr.scale(1 / n);
var a = Ur.dot(Fr), i = Math.cos(e);
if (i < a) {
var o = Zf(Rt.x, Rt.y, Yt.x, Yt.y, wr.x, wr.y, Xf, !1);
De.fromArray(Xf), De.scaleAndAdd(Fr, o / Math.tan(Math.PI - e));
var s = Yt.x !== Rt.x ? (De.x - Rt.x) / (Yt.x - Rt.x) : (De.y - Rt.y) / (Yt.y - Rt.y);
if (isNaN(s))
return;
s < 0 ? st.copy(De, Rt) : s > 1 && st.copy(De, Yt), De.toArray(r[1]);
}
}
}
}
function lz(r, e, t) {
if (t <= 180 && t > 0) {
t = t / 180 * Math.PI, wr.fromArray(r[0]), Rt.fromArray(r[1]), Yt.fromArray(r[2]), st.sub(Ur, Rt, wr), st.sub(Fr, Yt, Rt);
var n = Ur.len(), a = Fr.len();
if (!(n < 1e-3 || a < 1e-3)) {
Ur.scale(1 / n), Fr.scale(1 / a);
var i = Ur.dot(e), o = Math.cos(t);
if (i < o) {
var s = Zf(Rt.x, Rt.y, Yt.x, Yt.y, wr.x, wr.y, Xf, !1);
De.fromArray(Xf);
var l = Math.PI / 2, u = Math.acos(Fr.dot(e)), f = l + u - t;
if (f >= l)
st.copy(De, Yt);
else {
De.scaleAndAdd(Fr, s / Math.tan(Math.PI / 2 - f));
var h = Yt.x !== Rt.x ? (De.x - Rt.x) / (Yt.x - Rt.x) : (De.y - Rt.y) / (Yt.y - Rt.y);
if (isNaN(h))
return;
h < 0 ? st.copy(De, Rt) : h > 1 && st.copy(De, Yt);
}
De.toArray(r[1]);
}
}
}
}
function b1(r, e, t, n) {
var a = t === "normal", i = a ? r : r.ensureState(t);
i.ignore = e;
var o = n.get("smooth");
o && o === !0 && (o = 0.3), i.shape = i.shape || {}, o > 0 && (i.shape.smooth = o);
var s = n.getModel("lineStyle").getLineStyle();
a ? r.useStyle(s) : i.style = s;
}
function uz(r, e) {
var t = e.smooth, n = e.points;
if (!!n)
if (r.moveTo(n[0][0], n[0][1]), t > 0 && n.length >= 3) {
var a = $n(n[0], n[1]), i = $n(n[1], n[2]);
if (!a || !i) {
r.lineTo(n[1][0], n[1][1]), r.lineTo(n[2][0], n[2][1]);
return;
}
var o = Math.min(a, i) * t, s = ju([], n[1], n[0], o / a), l = ju([], n[1], n[2], o / i), u = ju([], s, l, 0.5);
r.bezierCurveTo(s[0], s[1], s[0], s[1], u[0], u[1]), r.bezierCurveTo(l[0], l[1], l[0], l[1], n[2][0], n[2][1]);
} else
for (var f = 1; f < n.length; f++)
r.lineTo(n[f][0], n[f][1]);
}
function Ey(r, e, t) {
var n = r.getTextGuideLine(), a = r.getTextContent();
if (!a) {
n && r.removeTextGuideLine();
return;
}
for (var i = e.normal, o = i.get("show"), s = a.ignore, l = 0; l < al.length; l++) {
var u = al[l], f = e[u], h = u === "normal";
if (f) {
var c = f.get("show"), v = h ? s : vt(a.states[u] && a.states[u].ignore, s);
if (v || !vt(c, o)) {
var p = h ? n : n && n.states[u];
p && (p.ignore = !0);
continue;
}
n || (n = new ze(), r.setTextGuideLine(n), !h && (s || !o) && b1(n, !0, "normal", e.normal), r.stateProxy && (n.stateProxy = r.stateProxy)), b1(n, !1, u, f);
}
}
if (n) {
J(n.style, t), n.style.fill = null;
var d = i.get("showAbove"), g = r.textGuideLineConfig = r.textGuideLineConfig || {};
g.showAbove = d || !1, n.buildPath = uz;
}
}
function Py(r, e) {
e = e || "labelLine";
for (var t = {
normal: r.getModel(e)
}, n = 0; n < Le.length; n++) {
var a = Le[n];
t[a] = r.getModel([a, e]);
}
return t;
}
function QA(r) {
for (var e = [], t = 0; t < r.length; t++) {
var n = r[t];
if (!n.defaultAttr.ignore) {
var a = n.label, i = a.getComputedTransform(), o = a.getBoundingRect(), s = !i || i[1] < 1e-5 && i[2] < 1e-5, l = a.style.margin || 0, u = o.clone();
u.applyTransform(i), u.x -= l / 2, u.y -= l / 2, u.width += l, u.height += l;
var f = s ? new If(o, i) : null;
e.push({
label: a,
labelLine: n.labelLine,
rect: u,
localRect: o,
obb: f,
priority: n.priority,
defaultAttr: n.defaultAttr,
layoutOption: n.computedLayoutOption,
axisAligned: s,
transform: i
});
}
}
return e;
}
function tM(r, e, t, n, a, i) {
var o = r.length;
if (o < 2)
return;
r.sort(function(T, D) {
return T.rect[e] - D.rect[e];
});
for (var s = 0, l, u = !1, f = 0, h = 0; h < o; h++) {
var c = r[h], v = c.rect;
l = v[e] - s, l < 0 && (v[e] -= l, c.label[e] -= l, u = !0);
var p = Math.max(-l, 0);
f += p, s = v[e] + v[t];
}
f > 0 && i && w(-f / o, 0, o);
var d = r[0], g = r[o - 1], y, m;
_(), y < 0 && x(-y, 0.8), m < 0 && x(m, 0.8), _(), S(y, m, 1), S(m, y, -1), _(), y < 0 && b(-y), m < 0 && b(m);
function _() {
y = d.rect[e] - n, m = a - g.rect[e] - g.rect[t];
}
function S(T, D, A) {
if (T < 0) {
var M = Math.min(D, -T);
if (M > 0) {
w(M * A, 0, o);
var L = M + T;
L < 0 && x(-L * A, 1);
} else
x(-T * A, 1);
}
}
function w(T, D, A) {
T !== 0 && (u = !0);
for (var M = D; M < A; M++) {
var L = r[M], I = L.rect;
I[e] += T, L.label[e] += T;
}
}
function x(T, D) {
for (var A = [], M = 0, L = 1; L < o; L++) {
var I = r[L - 1].rect, E = Math.max(r[L].rect[e] - I[e] - I[t], 0);
A.push(E), M += E;
}
if (!!M) {
var P = Math.min(Math.abs(T) / M, D);
if (T > 0)
for (var L = 0; L < o - 1; L++) {
var N = A[L] * P;
w(N, 0, L + 1);
}
else
for (var L = o - 1; L > 0; L--) {
var N = A[L - 1] * P;
w(-N, L, o);
}
}
}
function b(T) {
var D = T < 0 ? -1 : 1;
T = Math.abs(T);
for (var A = Math.ceil(T / (o - 1)), M = 0; M < o - 1; M++)
if (D > 0 ? w(A, 0, M + 1) : w(-A, o - M - 1, o), T -= A, T <= 0)
return;
}
return u;
}
function fz(r, e, t, n) {
return tM(r, "x", "width", e, t, n);
}
function eM(r, e, t, n) {
return tM(r, "y", "height", e, t, n);
}
function rM(r) {
var e = [];
r.sort(function(d, g) {
return g.priority - d.priority;
});
var t = new ft(0, 0, 0, 0);
function n(d) {
if (!d.ignore) {
var g = d.ensureState("emphasis");
g.ignore == null && (g.ignore = !1);
}
d.ignore = !0;
}
for (var a = 0; a < r.length; a++) {
var i = r[a], o = i.axisAligned, s = i.localRect, l = i.transform, u = i.label, f = i.labelLine;
t.copy(i.rect), t.width -= 0.1, t.height -= 0.1, t.x += 0.05, t.y += 0.05;
for (var h = i.obb, c = !1, v = 0; v < e.length; v++) {
var p = e[v];
if (!!t.intersect(p.rect)) {
if (o && p.axisAligned) {
c = !0;
break;
}
if (p.obb || (p.obb = new If(p.localRect, p.transform)), h || (h = new If(s, l)), h.intersect(p.obb)) {
c = !0;
break;
}
}
}
c ? (n(u), f && n(f)) : (u.attr("ignore", i.defaultAttr.ignore), f && f.attr("ignore", i.defaultAttr.labelGuideIgnore), e.push(i));
}
}
function hz(r) {
if (r) {
for (var e = [], t = 0; t < r.length; t++)
e.push(r[t].slice());
return e;
}
}
function cz(r, e) {
var t = r.label, n = e && e.getTextGuideLine();
return {
dataIndex: r.dataIndex,
dataType: r.dataType,
seriesIndex: r.seriesModel.seriesIndex,
text: r.label.style.text,
rect: r.hostRect,
labelRect: r.rect,
align: t.style.align,
verticalAlign: t.style.verticalAlign,
labelLinePoints: hz(n && n.shape.points)
};
}
var T1 = ["align", "verticalAlign", "width", "height", "fontSize"], Ge = new un(), mv = Tt(), vz = Tt();
function Du(r, e, t) {
for (var n = 0; n < t.length; n++) {
var a = t[n];
e[a] != null && (r[a] = e[a]);
}
}
var Au = ["x", "y", "rotation"], pz = function() {
function r() {
this._labelList = [], this._chartViewList = [];
}
return r.prototype.clearLabels = function() {
this._labelList = [], this._chartViewList = [];
}, r.prototype._addLabel = function(e, t, n, a, i) {
var o = a.style, s = a.__hostTarget, l = s.textConfig || {}, u = a.getComputedTransform(), f = a.getBoundingRect().plain();
ft.applyTransform(f, f, u), u ? Ge.setLocalTransform(u) : (Ge.x = Ge.y = Ge.rotation = Ge.originX = Ge.originY = 0, Ge.scaleX = Ge.scaleY = 1);
var h = a.__hostTarget, c;
if (h) {
c = h.getBoundingRect().plain();
var v = h.getComputedTransform();
ft.applyTransform(c, c, v);
}
var p = c && h.getTextGuideLine();
this._labelList.push({
label: a,
labelLine: p,
seriesModel: n,
dataIndex: e,
dataType: t,
layoutOption: i,
computedLayoutOption: null,
rect: f,
hostRect: c,
priority: c ? c.width * c.height : 0,
defaultAttr: {
ignore: a.ignore,
labelGuideIgnore: p && p.ignore,
x: Ge.x,
y: Ge.y,
scaleX: Ge.scaleX,
scaleY: Ge.scaleY,
rotation: Ge.rotation,
style: {
x: o.x,
y: o.y,
align: o.align,
verticalAlign: o.verticalAlign,
width: o.width,
height: o.height,
fontSize: o.fontSize
},
cursor: a.cursor,
attachedPos: l.position,
attachedRot: l.rotation
}
});
}, r.prototype.addLabelsOfSeries = function(e) {
var t = this;
this._chartViewList.push(e);
var n = e.__model, a = n.get("labelLayout");
!(q(a) || mt(a).length) || e.group.traverse(function(i) {
if (i.ignore)
return !0;
var o = i.getTextContent(), s = at(i);
o && !o.disableLabelLayout && t._addLabel(s.dataIndex, s.dataType, n, o, a);
});
}, r.prototype.updateLayoutConfig = function(e) {
var t = e.getWidth(), n = e.getHeight();
function a(_, S) {
return function() {
w1(_, S);
};
}
for (var i = 0; i < this._labelList.length; i++) {
var o = this._labelList[i], s = o.label, l = s.__hostTarget, u = o.defaultAttr, f = void 0;
q(o.layoutOption) ? f = o.layoutOption(cz(o, l)) : f = o.layoutOption, f = f || {}, o.computedLayoutOption = f;
var h = Math.PI / 180;
l && l.setTextConfig({
local: !1,
position: f.x != null || f.y != null ? null : u.attachedPos,
rotation: f.rotate != null ? f.rotate * h : u.attachedRot,
offset: [f.dx || 0, f.dy || 0]
});
var c = !1;
if (f.x != null ? (s.x = H(f.x, t), s.setStyle("x", 0), c = !0) : (s.x = u.x, s.setStyle("x", u.style.x)), f.y != null ? (s.y = H(f.y, n), s.setStyle("y", 0), c = !0) : (s.y = u.y, s.setStyle("y", u.style.y)), f.labelLinePoints) {
var v = l.getTextGuideLine();
v && (v.setShape({
points: f.labelLinePoints
}), c = !1);
}
var p = mv(s);
p.needsUpdateLabelLine = c, s.rotation = f.rotate != null ? f.rotate * h : u.rotation, s.scaleX = u.scaleX, s.scaleY = u.scaleY;
for (var d = 0; d < T1.length; d++) {
var g = T1[d];
s.setStyle(g, f[g] != null ? f[g] : u.style[g]);
}
if (f.draggable) {
if (s.draggable = !0, s.cursor = "move", l) {
var y = o.seriesModel;
if (o.dataIndex != null) {
var m = o.seriesModel.getData(o.dataType);
y = m.getItemModel(o.dataIndex);
}
s.on("drag", a(l, y.getModel("labelLine")));
}
} else
s.off("drag"), s.cursor = u.cursor;
}
}, r.prototype.layout = function(e) {
var t = e.getWidth(), n = e.getHeight(), a = QA(this._labelList), i = Et(a, function(l) {
return l.layoutOption.moveOverlap === "shiftX";
}), o = Et(a, function(l) {
return l.layoutOption.moveOverlap === "shiftY";
});
fz(i, 0, t), eM(o, 0, n);
var s = Et(a, function(l) {
return l.layoutOption.hideOverlap;
});
rM(s);
}, r.prototype.processLabelsOverall = function() {
var e = this;
C(this._chartViewList, function(t) {
var n = t.__model, a = t.ignoreLabelLineUpdate, i = n.isAnimationEnabled();
t.group.traverse(function(o) {
if (o.ignore && !o.forceLabelAnimation)
return !0;
var s = !a, l = o.getTextContent();
!s && l && (s = mv(l).needsUpdateLabelLine), s && e._updateLabelLine(o, n), i && e._animateLabels(o, n);
});
});
}, r.prototype._updateLabelLine = function(e, t) {
var n = e.getTextContent(), a = at(e), i = a.dataIndex;
if (n && i != null) {
var o = t.getData(a.dataType), s = o.getItemModel(i), l = {}, u = o.getItemVisual(i, "style"), f = o.getVisual("drawType");
l.stroke = u[f];
var h = s.getModel("labelLine");
Ey(e, Py(s), l), w1(e, h);
}
}, r.prototype._animateLabels = function(e, t) {
var n = e.getTextContent(), a = e.getTextGuideLine();
if (n && (e.forceLabelAnimation || !n.ignore && !n.invisible && !e.disableLabelAnimation && !co(e))) {
var i = mv(n), o = i.oldLayout, s = at(e), l = s.dataIndex, u = {
x: n.x,
y: n.y,
rotation: n.rotation
}, f = t.getData(s.dataType);
if (o) {
n.attr(o);
var c = e.prevStates;
c && (ct(c, "select") >= 0 && n.attr(i.oldLayoutSelect), ct(c, "emphasis") >= 0 && n.attr(i.oldLayoutEmphasis)), bt(n, u, t, l);
} else if (n.attr(u), !Vo(n).valueAnimation) {
var h = vt(n.style.opacity, 1);
n.style.opacity = 0, Bt(n, {
style: {
opacity: h
}
}, t, l);
}
if (i.oldLayout = u, n.states.select) {
var v = i.oldLayoutSelect = {};
Du(v, u, Au), Du(v, n.states.select, Au);
}
if (n.states.emphasis) {
var p = i.oldLayoutEmphasis = {};
Du(p, u, Au), Du(p, n.states.emphasis, Au);
}
HC(n, l, f, t, t);
}
if (a && !a.ignore && !a.invisible) {
var i = vz(a), o = i.oldLayout, d = {
points: a.shape.points
};
o ? (a.attr({
shape: o
}), bt(a, {
shape: d
}, t)) : (a.setShape(d), a.style.strokePercent = 0, Bt(a, {
style: {
strokePercent: 1
}
}, t)), i.oldLayout = d;
}
}, r;
}();
const dz = pz;
var _v = Tt();
function gz(r) {
r.registerUpdateLifecycle("series:beforeupdate", function(e, t, n) {
var a = _v(t).labelManager;
a || (a = _v(t).labelManager = new dz()), a.clearLabels();
}), r.registerUpdateLifecycle("series:layoutlabels", function(e, t, n) {
var a = _v(t).labelManager;
n.updatedSeries.forEach(function(i) {
a.addLabelsOfSeries(t.getViewOfSeriesModel(i));
}), a.updateLayoutConfig(t), a.layout(t), a.processLabelsOverall();
});
}
var Sv = Math.sin, xv = Math.cos, nM = Math.PI, Ba = Math.PI * 2, yz = 180 / nM, mz = function() {
function r() {
}
return r.prototype.reset = function(e) {
this._start = !0, this._d = [], this._str = "", this._p = Math.pow(10, e || 4);
}, r.prototype.moveTo = function(e, t) {
this._add("M", e, t);
}, r.prototype.lineTo = function(e, t) {
this._add("L", e, t);
}, r.prototype.bezierCurveTo = function(e, t, n, a, i, o) {
this._add("C", e, t, n, a, i, o);
}, r.prototype.quadraticCurveTo = function(e, t, n, a) {
this._add("Q", e, t, n, a);
}, r.prototype.arc = function(e, t, n, a, i, o) {
this.ellipse(e, t, n, n, 0, a, i, o);
}, r.prototype.ellipse = function(e, t, n, a, i, o, s, l) {
var u = s - o, f = !l, h = Math.abs(u), c = Xn(h - Ba) || (f ? u >= Ba : -u >= Ba), v = u > 0 ? u % Ba : u % Ba + Ba, p = !1;
c ? p = !0 : Xn(h) ? p = !1 : p = v >= nM == !!f;
var d = e + n * xv(o), g = t + a * Sv(o);
this._start && this._add("M", d, g);
var y = Math.round(i * yz);
if (c) {
var m = 1 / this._p, _ = (f ? 1 : -1) * (Ba - m);
this._add("A", n, a, y, 1, +f, e + n * xv(o + _), t + a * Sv(o + _)), m > 0.01 && this._add("A", n, a, y, 0, +f, d, g);
} else {
var S = e + n * xv(s), w = t + a * Sv(s);
this._add("A", n, a, y, +p, +f, S, w);
}
}, r.prototype.rect = function(e, t, n, a) {
this._add("M", e, t), this._add("l", n, 0), this._add("l", 0, a), this._add("l", -n, 0), this._add("Z");
}, r.prototype.closePath = function() {
this._d.length > 0 && this._add("Z");
}, r.prototype._add = function(e, t, n, a, i, o, s, l, u) {
for (var f = [], h = this._p, c = 1; c < arguments.length; c++) {
var v = arguments[c];
if (isNaN(v)) {
this._invalid = !0;
return;
}
f.push(Math.round(v * h) / h);
}
this._d.push(e + f.join(" ")), this._start = e === "Z";
}, r.prototype.generateStr = function() {
this._str = this._invalid ? "" : this._d.join(""), this._d = [];
}, r.prototype.getStr = function() {
return this._str;
}, r;
}();
const aM = mz;
var js = "none", _z = Math.round;
function Sz(r) {
var e = r.fill;
return e != null && e !== js;
}
function xz(r) {
var e = r.stroke;
return e != null && e !== js;
}
var Gd = ["lineCap", "miterLimit", "lineJoin"], wz = G(Gd, function(r) {
return "stroke-" + r.toLowerCase();
});
function bz(r, e, t, n) {
var a = e.opacity == null ? 1 : e.opacity;
if (t instanceof ve) {
r("opacity", a);
return;
}
if (Sz(e)) {
var i = So(e.fill);
r("fill", i.color);
var o = e.fillOpacity != null ? e.fillOpacity * i.opacity * a : i.opacity * a;
(n || o < 1) && r("fill-opacity", o);
} else
r("fill", js);
if (xz(e)) {
var s = So(e.stroke);
r("stroke", s.color);
var l = e.strokeNoScale ? t.getLineScale() : 1, u = l ? (e.lineWidth || 0) / l : 0, f = e.strokeOpacity != null ? e.strokeOpacity * s.opacity * a : s.opacity * a, h = e.strokeFirst;
if ((n || u !== 1) && r("stroke-width", u), (n || h) && r("paint-order", h ? "stroke" : "fill"), (n || f < 1) && r("stroke-opacity", f), e.lineDash) {
var c = _y(t), v = c[0], p = c[1];
v && (p = _z(p || 0), r("stroke-dasharray", v.join(",")), (p || n) && r("stroke-dashoffset", p));
} else
n && r("stroke-dasharray", js);
for (var d = 0; d < Gd.length; d++) {
var g = Gd[d];
if (n || e[g] !== Mf[g]) {
var y = e[g] || Mf[g];
y && r(wz[d], y);
}
}
} else
n && r("stroke", js);
}
var iM = "http://www.w3.org/2000/svg", oM = "http://www.w3.org/1999/xlink", Tz = "http://www.w3.org/2000/xmlns/", Cz = "http://www.w3.org/XML/1998/namespace";
function sM(r) {
return document.createElementNS(iM, r);
}
function ne(r, e, t, n, a) {
return {
tag: r,
attrs: t || {},
children: n,
text: a,
key: e
};
}
function Dz(r, e) {
var t = [];
if (e)
for (var n in e) {
var a = e[n], i = n;
a !== !1 && (a !== !0 && a != null && (i += '="' + a + '"'), t.push(i));
}
return "<" + r + " " + t.join(" ") + ">";
}
function Az(r) {
return "" + r + ">";
}
function Ny(r, e) {
e = e || {};
var t = e.newline ? `
` : "";
function n(a) {
var i = a.children, o = a.tag, s = a.attrs;
return Dz(o, s) + (a.text || "") + (i ? "" + t + G(i, function(l) {
return n(l);
}).join(t) + t : "") + Az(o);
}
return n(r);
}
function Mz(r, e, t) {
t = t || {};
var n = t.newline ? `
` : "", a = " {" + n, i = n + "}", o = G(mt(r), function(l) {
return l + a + G(mt(r[l]), function(u) {
return u + ":" + r[l][u] + ";";
}).join(n) + i;
}).join(n), s = G(mt(e), function(l) {
return "@keyframes " + l + a + G(mt(e[l]), function(u) {
return u + a + G(mt(e[l][u]), function(f) {
var h = e[l][u][f];
return f === "d" && (h = 'path("' + h + '")'), f + ":" + h + ";";
}).join(n) + i;
}).join(n) + i;
}).join(n);
return !o && !s ? "" : [""].join(n);
}
function Fd(r) {
return {
zrId: r,
shadowCache: {},
patternCache: {},
gradientCache: {},
clipPathCache: {},
defs: {},
cssNodes: {},
cssAnims: {},
cssClassIdx: 0,
cssAnimIdx: 0,
shadowIdx: 0,
gradientIdx: 0,
patternIdx: 0,
clipPathIdx: 0
};
}
function C1(r, e, t, n) {
return ne("svg", "root", {
width: r,
height: e,
xmlns: iM,
"xmlns:xlink": oM,
version: "1.1",
baseProfile: "full",
viewBox: n ? "0 0 " + r + " " + e : !1
}, t);
}
var D1 = {
cubicIn: "0.32,0,0.67,0",
cubicOut: "0.33,1,0.68,1",
cubicInOut: "0.65,0,0.35,1",
quadraticIn: "0.11,0,0.5,0",
quadraticOut: "0.5,1,0.89,1",
quadraticInOut: "0.45,0,0.55,1",
quarticIn: "0.5,0,0.75,0",
quarticOut: "0.25,1,0.5,1",
quarticInOut: "0.76,0,0.24,1",
quinticIn: "0.64,0,0.78,0",
quinticOut: "0.22,1,0.36,1",
quinticInOut: "0.83,0,0.17,1",
sinusoidalIn: "0.12,0,0.39,0",
sinusoidalOut: "0.61,1,0.88,1",
sinusoidalInOut: "0.37,0,0.63,1",
exponentialIn: "0.7,0,0.84,0",
exponentialOut: "0.16,1,0.3,1",
exponentialInOut: "0.87,0,0.13,1",
circularIn: "0.55,0,1,0.45",
circularOut: "0,0.55,0.45,1",
circularInOut: "0.85,0,0.15,1"
}, Ha = "transform-origin";
function Lz(r, e, t) {
var n = B({}, r.shape);
B(n, e), r.buildPath(t, n);
var a = new aM();
return a.reset(wT(r)), t.rebuildPath(a, 1), a.generateStr(), a.getStr();
}
function Iz(r, e) {
var t = e.originX, n = e.originY;
(t || n) && (r[Ha] = t + "px " + n + "px");
}
var Ez = {
fill: "fill",
opacity: "opacity",
lineWidth: "stroke-width",
lineDashOffset: "stroke-dashoffset"
};
function lM(r, e) {
var t = e.zrId + "-ani-" + e.cssAnimIdx++;
return e.cssAnims[t] = r, t;
}
function Pz(r, e, t) {
var n = r.shape.paths, a = {}, i, o;
if (C(n, function(l) {
var u = Fd(t.zrId);
u.animation = !0, Jh(l, {}, u, !0);
var f = u.cssAnims, h = u.cssNodes, c = mt(f), v = c.length;
if (!!v) {
o = c[v - 1];
var p = f[o];
for (var d in p) {
var g = p[d];
a[d] = a[d] || { d: "" }, a[d].d += g.d || "";
}
for (var y in h) {
var m = h[y].animation;
m.indexOf(o) >= 0 && (i = m);
}
}
}), !!i) {
e.d = !1;
var s = lM(a, t);
return i.replace(o, s);
}
}
function A1(r) {
return W(r) ? D1[r] ? "cubic-bezier(" + D1[r] + ")" : Rg(r) ? r : "" : "";
}
function Jh(r, e, t, n) {
var a = r.animators, i = a.length, o = [];
if (r instanceof Jg) {
var s = Pz(r, e, t);
if (s)
o.push(s);
else if (!i)
return;
} else if (!i)
return;
for (var l = {}, u = 0; u < i; u++) {
var f = a[u], h = [f.getMaxTime() / 1e3 + "s"], c = A1(f.getClip().easing), v = f.getDelay();
c ? h.push(c) : h.push("linear"), v && h.push(v / 1e3 + "s"), f.getLoop() && h.push("infinite");
var p = h.join(" ");
l[p] = l[p] || [p, []], l[p][1].push(f);
}
function d(m) {
var _ = m[1], S = _.length, w = {}, x = {}, b = {}, T = "animation-timing-function";
function D(rt, yt, ut) {
for (var X = rt.getTracks(), ot = rt.getMaxTime(), Vt = 0; Vt < X.length; Vt++) {
var St = X[Vt];
if (St.needsAnimate()) {
var $t = St.keyframes, Ft = St.propName;
if (ut && (Ft = ut(Ft)), Ft)
for (var pe = 0; pe < $t.length; pe++) {
var rn = $t[pe], Ie = Math.round(rn.time / ot * 100) + "%", Zl = A1(rn.easing), In = rn.rawValue;
(W(In) || wt(In)) && (yt[Ie] = yt[Ie] || {}, yt[Ie][Ft] = rn.rawValue, Zl && (yt[Ie][T] = Zl));
}
}
}
}
for (var A = 0; A < S; A++) {
var M = _[A], L = M.targetName;
L ? L === "shape" && D(M, x) : !n && D(M, w);
}
for (var I in w) {
var E = {};
AT(E, r), B(E, w[I]);
var P = bT(E), N = w[I][T];
b[I] = P ? {
transform: P
} : {}, Iz(b[I], E), N && (b[I][T] = N);
}
var O, k = !0;
for (var I in x) {
b[I] = b[I] || {};
var V = !O, N = x[I][T];
V && (O = new Jr());
var F = O.len();
O.reset(), b[I].d = Lz(r, x[I], O);
var $ = O.len();
if (!V && F !== $) {
k = !1;
break;
}
N && (b[I][T] = N);
}
if (!k)
for (var I in b)
delete b[I].d;
if (!n)
for (var A = 0; A < S; A++) {
var M = _[A], L = M.targetName;
L === "style" && D(M, b, function(X) {
return Ez[X];
});
}
for (var Z = mt(b), et = !0, ht, A = 1; A < Z.length; A++) {
var Lt = Z[A - 1], At = Z[A];
if (b[Lt][Ha] !== b[At][Ha]) {
et = !1;
break;
}
ht = b[Lt][Ha];
}
if (et && ht) {
for (var I in b)
b[I][Ha] && delete b[I][Ha];
e[Ha] = ht;
}
if (Et(Z, function(rt) {
return mt(b[rt]).length > 0;
}).length) {
var dt = lM(b, t);
return dt + " " + m[0] + " both";
}
}
for (var g in l) {
var s = d(l[g]);
s && o.push(s);
}
if (o.length) {
var y = t.zrId + "-cls-" + t.cssClassIdx++;
t.cssNodes["." + y] = {
animation: o.join(",")
}, e.class = y;
}
}
var pl = Math.round;
function uM(r) {
return r && W(r.src);
}
function fM(r) {
return r && q(r.toDataURL);
}
function Ry(r, e, t, n) {
bz(function(a, i) {
var o = a === "fill" || a === "stroke";
o && DE(i) ? Gz(e, r, a, n) : o && CE(i) ? Fz(t, r, a, n) : r[a] = i;
}, e, t, !1), zz(t, r, n);
}
function M1(r) {
return Xn(r[0] - 1) && Xn(r[1]) && Xn(r[2]) && Xn(r[3] - 1);
}
function Nz(r) {
return Xn(r[4]) && Xn(r[5]);
}
function ky(r, e, t) {
if (e && !(Nz(e) && M1(e))) {
var n = t ? 10 : 1e4;
r.transform = M1(e) ? "translate(" + pl(e[4] * n) / n + " " + pl(e[5] * n) / n + ")" : _E(e);
}
}
function L1(r, e, t) {
for (var n = r.points, a = [], i = 0; i < n.length; i++)
a.push(pl(n[i][0] * t) / t), a.push(pl(n[i][1] * t) / t);
e.points = a.join(" ");
}
function I1(r) {
return !r.smooth;
}
function Rz(r) {
var e = G(r, function(t) {
return typeof t == "string" ? [t, t] : t;
});
return function(t, n, a) {
for (var i = 0; i < e.length; i++) {
var o = e[i], s = t[o[0]];
s != null && (n[o[1]] = pl(s * a) / a);
}
};
}
var kz = {
circle: [Rz(["cx", "cy", "r"])],
polyline: [L1, I1],
polygon: [L1, I1]
};
function Oz(r) {
for (var e = r.animators, t = 0; t < e.length; t++)
if (e[t].targetName === "shape")
return !0;
return !1;
}
function hM(r, e) {
var t = r.style, n = r.shape, a = kz[r.type], i = {}, o = e.animation, s = "path", l = r.style.strokePercent, u = e.compress && wT(r) || 4;
if (a && !e.willUpdate && !(a[1] && !a[1](n)) && !(o && Oz(r)) && !(l < 1)) {
s = r.type;
var f = Math.pow(10, u);
a[0](n, i, f);
} else {
r.path || r.createPathProxy();
var h = r.path;
r.shapeChanged() && (h.beginPath(), r.buildPath(h, r.shape), r.pathUpdated());
var c = h.getVersion(), v = r, p = v.__svgPathBuilder;
(v.__svgPathVersion !== c || !p || l !== v.__svgPathStrokePercent) && (p || (p = v.__svgPathBuilder = new aM()), p.reset(u), h.rebuildPath(p, l), p.generateStr(), v.__svgPathVersion = c, v.__svgPathStrokePercent = l), i.d = p.getStr();
}
return ky(i, r.transform), Ry(i, t, r, e), e.animation && Jh(r, i, e), ne(s, r.id + "", i);
}
function Vz(r, e) {
var t = r.style, n = t.image;
if (n && !W(n) && (uM(n) ? n = n.src : fM(n) && (n = n.toDataURL())), !!n) {
var a = t.x || 0, i = t.y || 0, o = t.width, s = t.height, l = {
href: n,
width: o,
height: s
};
return a && (l.x = a), i && (l.y = i), ky(l, r.transform), Ry(l, t, r, e), e.animation && Jh(r, l, e), ne("image", r.id + "", l);
}
}
function Bz(r, e) {
var t = r.style, n = t.text;
if (n != null && (n += ""), !(!n || isNaN(t.x) || isNaN(t.y))) {
var a = t.font || ra, i = t.x || 0, o = xE(t.y || 0, Th(a), t.textBaseline), s = SE[t.textAlign] || t.textAlign, l = {
"dominant-baseline": "central",
"text-anchor": s
};
if (iC(t)) {
var u = "", f = t.fontStyle, h = aC(t.fontSize);
if (!parseFloat(h))
return;
var c = t.fontFamily || jb, v = t.fontWeight;
u += "font-size:" + h + ";font-family:" + c + ";", f && f !== "normal" && (u += "font-style:" + f + ";"), v && v !== "normal" && (u += "font-weight:" + v + ";"), l.style = u;
} else
l.style = "font: " + a;
return n.match(/\s/) && (l["xml:space"] = "preserve"), i && (l.x = i), o && (l.y = o), ky(l, r.transform), Ry(l, t, r, e), e.animation && Jh(r, l, e), ne("text", r.id + "", l, void 0, n);
}
}
function E1(r, e) {
if (r instanceof gt)
return hM(r, e);
if (r instanceof ve)
return Vz(r, e);
if (r instanceof nl)
return Bz(r, e);
}
function zz(r, e, t) {
var n = r.style;
if (wE(n)) {
var a = bE(r), i = t.shadowCache, o = i[a];
if (!o) {
var s = r.getGlobalScale(), l = s[0], u = s[1];
if (!l || !u)
return;
var f = n.shadowOffsetX || 0, h = n.shadowOffsetY || 0, c = n.shadowBlur, v = So(n.shadowColor), p = v.opacity, d = v.color, g = c / 2 / l, y = c / 2 / u, m = g + " " + y;
o = t.zrId + "-s" + t.shadowIdx++, t.defs[o] = ne("filter", o, {
id: o,
x: "-100%",
y: "-100%",
width: "300%",
height: "300%"
}, [
ne("feDropShadow", "", {
dx: f / l,
dy: h / u,
stdDeviation: m,
"flood-color": d,
"flood-opacity": p
})
]), i[a] = o;
}
e.filter = wh(o);
}
}
function Gz(r, e, t, n) {
var a = r[t], i, o = {
gradientUnits: a.global ? "userSpaceOnUse" : "objectBoundingBox"
};
if (ST(a))
i = "linearGradient", o.x1 = a.x, o.y1 = a.y, o.x2 = a.x2, o.y2 = a.y2;
else if (xT(a))
i = "radialGradient", o.cx = vt(a.x, 0.5), o.cy = vt(a.y, 0.5), o.r = vt(a.r, 0.5);
else {
process.env.NODE_ENV !== "production" && br("Illegal gradient type.");
return;
}
for (var s = a.colorStops, l = [], u = 0, f = s.length; u < f; ++u) {
var h = Qp(s[u].offset) * 100 + "%", c = s[u].color, v = So(c), p = v.color, d = v.opacity, g = {
offset: h
};
g["stop-color"] = p, d < 1 && (g["stop-opacity"] = d), l.push(ne("stop", u + "", g));
}
var y = ne(i, "", o, l), m = Ny(y), _ = n.gradientCache, S = _[m];
S || (S = n.zrId + "-g" + n.gradientIdx++, _[m] = S, o.id = S, n.defs[S] = ne(i, S, o, l)), e[t] = wh(S);
}
function Fz(r, e, t, n) {
var a = r.style[t], i = {
patternUnits: "userSpaceOnUse"
}, o;
if (_T(a)) {
var s = a.imageWidth, l = a.imageHeight, u = void 0, f = a.image;
if (W(f) ? u = f : uM(f) ? u = f.src : fM(f) && (u = f.toDataURL()), typeof Image > "u") {
var h = "Image width/height must been given explictly in svg-ssr renderer.";
Q(s, h), Q(l, h);
} else if (s == null || l == null) {
var c = function(m, _) {
if (m) {
var S = m.elm, w = m.attrs.width = s || _.width, x = m.attrs.height = l || _.height;
S && (S.setAttribute("width", w), S.setAttribute("height", x));
}
}, v = $g(u, null, r, function(m) {
c(p, m), c(o, m);
});
v && v.width && v.height && (s = s || v.width, l = l || v.height);
}
o = ne("image", "img", {
href: u,
width: s,
height: l
}), i.width = s, i.height = l;
} else
a.svgElement && (o = tt(a.svgElement), i.width = a.svgWidth, i.height = a.svgHeight);
if (!!o) {
i.patternTransform = bT(a);
var p = ne("pattern", "", i, [o]), d = Ny(p), g = n.patternCache, y = g[d];
y || (y = n.zrId + "-p" + n.patternIdx++, g[d] = y, i.id = y, p = n.defs[y] = ne("pattern", y, i, [o])), e[t] = wh(y);
}
}
function Hz(r, e, t) {
var n = t.clipPathCache, a = t.defs, i = n[r.id];
if (!i) {
i = t.zrId + "-c" + t.clipPathIdx++;
var o = {
id: i
};
n[r.id] = i, a[i] = ne("clipPath", i, o, [hM(r, t)]);
}
e["clip-path"] = wh(i);
}
function P1(r) {
return document.createTextNode(r);
}
function qa(r, e, t) {
r.insertBefore(e, t);
}
function N1(r, e) {
r.removeChild(e);
}
function R1(r, e) {
r.appendChild(e);
}
function cM(r) {
return r.parentNode;
}
function vM(r) {
return r.nextSibling;
}
function wv(r, e) {
r.textContent = e;
}
var k1 = 58, $z = 120, Wz = ne("", "");
function Hd(r) {
return r === void 0;
}
function zr(r) {
return r !== void 0;
}
function Uz(r, e, t) {
for (var n = {}, a = e; a <= t; ++a) {
var i = r[a].key;
i !== void 0 && (process.env.NODE_ENV !== "production" && n[i] != null && console.error("Duplicate key " + i), n[i] = a);
}
return n;
}
function Ns(r, e) {
var t = r.key === e.key, n = r.tag === e.tag;
return n && t;
}
function dl(r) {
var e, t = r.children, n = r.tag;
if (zr(n)) {
var a = r.elm = sM(n);
if (Oy(Wz, r), z(t))
for (e = 0; e < t.length; ++e) {
var i = t[e];
i != null && R1(a, dl(i));
}
else
zr(r.text) && !j(r.text) && R1(a, P1(r.text));
} else
r.elm = P1(r.text);
return r.elm;
}
function pM(r, e, t, n, a) {
for (; n <= a; ++n) {
var i = t[n];
i != null && qa(r, dl(i), e);
}
}
function qf(r, e, t, n) {
for (; t <= n; ++t) {
var a = e[t];
if (a != null)
if (zr(a.tag)) {
var i = cM(a.elm);
N1(i, a.elm);
} else
N1(r, a.elm);
}
}
function Oy(r, e) {
var t, n = e.elm, a = r && r.attrs || {}, i = e.attrs || {};
if (a !== i) {
for (t in i) {
var o = i[t], s = a[t];
s !== o && (o === !0 ? n.setAttribute(t, "") : o === !1 ? n.removeAttribute(t) : t.charCodeAt(0) !== $z ? n.setAttribute(t, o) : t === "xmlns:xlink" || t === "xmlns" ? n.setAttributeNS(Tz, t, o) : t.charCodeAt(3) === k1 ? n.setAttributeNS(Cz, t, o) : t.charCodeAt(5) === k1 ? n.setAttributeNS(oM, t, o) : n.setAttribute(t, o));
}
for (t in a)
t in i || n.removeAttribute(t);
}
}
function Yz(r, e, t) {
for (var n = 0, a = 0, i = e.length - 1, o = e[0], s = e[i], l = t.length - 1, u = t[0], f = t[l], h, c, v, p; n <= i && a <= l; )
o == null ? o = e[++n] : s == null ? s = e[--i] : u == null ? u = t[++a] : f == null ? f = t[--l] : Ns(o, u) ? (eo(o, u), o = e[++n], u = t[++a]) : Ns(s, f) ? (eo(s, f), s = e[--i], f = t[--l]) : Ns(o, f) ? (eo(o, f), qa(r, o.elm, vM(s.elm)), o = e[++n], f = t[--l]) : Ns(s, u) ? (eo(s, u), qa(r, s.elm, o.elm), s = e[--i], u = t[++a]) : (Hd(h) && (h = Uz(e, n, i)), c = h[u.key], Hd(c) ? qa(r, dl(u), o.elm) : (v = e[c], v.tag !== u.tag ? qa(r, dl(u), o.elm) : (eo(v, u), e[c] = void 0, qa(r, v.elm, o.elm))), u = t[++a]);
(n <= i || a <= l) && (n > i ? (p = t[l + 1] == null ? null : t[l + 1].elm, pM(r, p, t, a, l)) : qf(r, e, n, i));
}
function eo(r, e) {
var t = e.elm = r.elm, n = r.children, a = e.children;
r !== e && (Oy(r, e), Hd(e.text) ? zr(n) && zr(a) ? n !== a && Yz(t, n, a) : zr(a) ? (zr(r.text) && wv(t, ""), pM(t, null, a, 0, a.length - 1)) : zr(n) ? qf(t, n, 0, n.length - 1) : zr(r.text) && wv(t, "") : r.text !== e.text && (zr(n) && qf(t, n, 0, n.length - 1), wv(t, e.text)));
}
function Zz(r, e) {
if (Ns(r, e))
eo(r, e);
else {
var t = r.elm, n = cM(t);
dl(e), n !== null && (qa(n, e.elm, vM(t)), qf(n, [r], 0, 0));
}
return e;
}
var Xz = 0, qz = function() {
function r(e, t, n) {
if (this.type = "svg", this.refreshHover = O1("refreshHover"), this.configLayer = O1("configLayer"), this.storage = t, this._opts = n = B({}, n), this.root = e, this._id = "zr" + Xz++, this._oldVNode = C1(n.width, n.height), e && !n.ssr) {
var a = this._viewport = document.createElement("div");
a.style.cssText = "position:relative;overflow:hidden";
var i = this._svgDom = this._oldVNode.elm = sM("svg");
Oy(null, this._oldVNode), a.appendChild(i), e.appendChild(a);
}
this.resize(n.width, n.height);
}
return r.prototype.getType = function() {
return this.type;
}, r.prototype.getViewportRoot = function() {
return this._viewport;
}, r.prototype.getViewportRootOffset = function() {
var e = this.getViewportRoot();
if (e)
return {
offsetLeft: e.offsetLeft || 0,
offsetTop: e.offsetTop || 0
};
}, r.prototype.getSvgDom = function() {
return this._svgDom;
}, r.prototype.refresh = function() {
if (this.root) {
var e = this.renderToVNode({
willUpdate: !0
});
e.attrs.style = "position:absolute;left:0;top:0;user-select:none", Zz(this._oldVNode, e), this._oldVNode = e;
}
}, r.prototype.renderOneToVNode = function(e) {
return E1(e, Fd(this._id));
}, r.prototype.renderToVNode = function(e) {
e = e || {};
var t = this.storage.getDisplayList(!0), n = this._backgroundColor, a = this._width, i = this._height, o = Fd(this._id);
o.animation = e.animation, o.willUpdate = e.willUpdate, o.compress = e.compress;
var s = [];
if (n && n !== "none") {
var l = So(n), u = l.color, f = l.opacity;
this._bgVNode = ne("rect", "bg", {
width: a,
height: i,
x: "0",
y: "0",
id: "0",
fill: u,
"fill-opacity": f
}), s.push(this._bgVNode);
} else
this._bgVNode = null;
var h = e.compress ? null : this._mainVNode = ne("g", "main", {}, []);
this._paintList(t, o, h ? h.children : s), h && s.push(h);
var c = G(mt(o.defs), function(d) {
return o.defs[d];
});
if (c.length && s.push(ne("defs", "defs", {}, c)), e.animation) {
var v = Mz(o.cssNodes, o.cssAnims, { newline: !0 });
if (v) {
var p = ne("style", "stl", {}, [], v);
s.push(p);
}
}
return C1(a, i, s, e.useViewBox);
}, r.prototype.renderToString = function(e) {
return e = e || {}, Ny(this.renderToVNode({
animation: vt(e.cssAnimation, !0),
willUpdate: !1,
compress: !0,
useViewBox: vt(e.useViewBox, !0)
}), { newline: !0 });
}, r.prototype.setBackgroundColor = function(e) {
this._backgroundColor = e;
var t = this._bgVNode;
if (t && t.elm) {
var n = So(e), a = n.color, i = n.opacity;
t.elm.setAttribute("fill", a), i < 1 && t.elm.setAttribute("fill-opacity", i);
}
}, r.prototype.getSvgRoot = function() {
return this._mainVNode && this._mainVNode.elm;
}, r.prototype._paintList = function(e, t, n) {
for (var a = e.length, i = [], o = 0, s, l, u = 0, f = 0; f < a; f++) {
var h = e[f];
if (!h.invisible) {
var c = h.__clipPaths, v = c && c.length || 0, p = l && l.length || 0, d = void 0;
for (d = Math.max(v - 1, p - 1); d >= 0 && !(c && l && c[d] === l[d]); d--)
;
for (var g = p - 1; g > d; g--)
o--, s = i[o - 1];
for (var y = d + 1; y < v; y++) {
var m = {};
Hz(c[y], m, t);
var _ = ne("g", "clip-g-" + u++, m, []);
(s ? s.children : n).push(_), i[o++] = _, s = _;
}
l = c;
var S = E1(h, t);
S && (s ? s.children : n).push(S);
}
}
}, r.prototype.resize = function(e, t) {
var n = this._opts, a = this.root, i = this._viewport;
if (e != null && (n.width = e), t != null && (n.height = t), a && i && (i.style.display = "none", e = so(a, 0, n), t = so(a, 1, n), i.style.display = ""), this._width !== e || this._height !== t) {
if (this._width = e, this._height = t, i) {
var o = i.style;
o.width = e + "px", o.height = t + "px";
}
var s = this._svgDom;
s && (s.setAttribute("width", e), s.setAttribute("height", t));
}
}, r.prototype.getWidth = function() {
return this._width;
}, r.prototype.getHeight = function() {
return this._height;
}, r.prototype.dispose = function() {
this.root && (this.root.innerHTML = ""), this._svgDom = this._viewport = this.storage = this._oldVNode = this._bgVNode = this._mainVNode = null;
}, r.prototype.clear = function() {
this._svgDom && (this._svgDom.innerHTML = null), this._oldVNode = null;
}, r.prototype.toDataURL = function(e) {
var t = encodeURIComponent(this.renderToString()), n = "data:image/svg+xml;";
return e ? (t = AE(t), t && n + "base64," + t) : n + "charset=UTF-8," + t;
}, r;
}();
function O1(r) {
return function() {
process.env.NODE_ENV !== "production" && br('In SVG mode painter not support method "' + r + '"');
};
}
const Kz = qz;
function jz(r) {
r.registerPainter("svg", Kz);
}
function V1(r, e, t) {
var n = yn.createCanvas(), a = e.getWidth(), i = e.getHeight(), o = n.style;
return o && (o.position = "absolute", o.left = "0", o.top = "0", o.width = a + "px", o.height = i + "px", n.setAttribute("data-zr-dom-id", r)), n.width = a * t, n.height = i * t, n;
}
var Jz = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this) || this;
i.motionBlur = !1, i.lastFrameAlpha = 0.7, i.dpr = 1, i.virtual = !1, i.config = {}, i.incremental = !1, i.zlevel = 0, i.maxRepaintRectCount = 5, i.__dirty = !0, i.__firstTimePaint = !0, i.__used = !1, i.__drawIndex = 0, i.__startIndex = 0, i.__endIndex = 0, i.__prevStartIndex = null, i.__prevEndIndex = null;
var o;
a = a || Cf, typeof t == "string" ? o = V1(t, n, a) : j(t) && (o = t, t = o.id), i.id = t, i.dom = o;
var s = o.style;
return s && (nT(o), o.onselectstart = function() {
return !1;
}, s.padding = "0", s.margin = "0", s.borderWidth = "0"), i.painter = n, i.dpr = a, i;
}
return e.prototype.getElementCount = function() {
return this.__endIndex - this.__startIndex;
}, e.prototype.afterBrush = function() {
this.__prevStartIndex = this.__startIndex, this.__prevEndIndex = this.__endIndex;
}, e.prototype.initContext = function() {
this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
}, e.prototype.setUnpainted = function() {
this.__firstTimePaint = !0;
}, e.prototype.createBackBuffer = function() {
var t = this.dpr;
this.domBack = V1("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), t !== 1 && this.ctxBack.scale(t, t);
}, e.prototype.createRepaintRects = function(t, n, a, i) {
if (this.__firstTimePaint)
return this.__firstTimePaint = !1, null;
var o = [], s = this.maxRepaintRectCount, l = !1, u = new ft(0, 0, 0, 0);
function f(m) {
if (!(!m.isFinite() || m.isZero()))
if (o.length === 0) {
var _ = new ft(0, 0, 0, 0);
_.copy(m), o.push(_);
} else {
for (var S = !1, w = 1 / 0, x = 0, b = 0; b < o.length; ++b) {
var T = o[b];
if (T.intersect(m)) {
var D = new ft(0, 0, 0, 0);
D.copy(T), D.union(m), o[b] = D, S = !0;
break;
} else if (l) {
u.copy(m), u.union(T);
var A = m.width * m.height, M = T.width * T.height, L = u.width * u.height, I = L - A - M;
I < w && (w = I, x = b);
}
}
if (l && (o[x].union(m), S = !0), !S) {
var _ = new ft(0, 0, 0, 0);
_.copy(m), o.push(_);
}
l || (l = o.length >= s);
}
}
for (var h = this.__startIndex; h < this.__endIndex; ++h) {
var c = t[h];
if (c) {
var v = c.shouldBePainted(a, i, !0, !0), p = c.__isRendered && (c.__dirty & We || !v) ? c.getPrevPaintRect() : null;
p && f(p);
var d = v && (c.__dirty & We || !c.__isRendered) ? c.getPaintRect() : null;
d && f(d);
}
}
for (var h = this.__prevStartIndex; h < this.__prevEndIndex; ++h) {
var c = n[h], v = c.shouldBePainted(a, i, !0, !0);
if (c && (!v || !c.__zr) && c.__isRendered) {
var p = c.getPrevPaintRect();
p && f(p);
}
}
var g;
do {
g = !1;
for (var h = 0; h < o.length; ) {
if (o[h].isZero()) {
o.splice(h, 1);
continue;
}
for (var y = h + 1; y < o.length; )
o[h].intersect(o[y]) ? (g = !0, o[h].union(o[y]), o.splice(y, 1)) : y++;
h++;
}
} while (g);
return this._paintRects = o, o;
}, e.prototype.debugGetPaintRects = function() {
return (this._paintRects || []).slice();
}, e.prototype.resize = function(t, n) {
var a = this.dpr, i = this.dom, o = i.style, s = this.domBack;
o && (o.width = t + "px", o.height = n + "px"), i.width = t * a, i.height = n * a, s && (s.width = t * a, s.height = n * a, a !== 1 && this.ctxBack.scale(a, a));
}, e.prototype.clear = function(t, n, a) {
var i = this.dom, o = this.ctx, s = i.width, l = i.height;
n = n || this.clearColor;
var u = this.motionBlur && !t, f = this.lastFrameAlpha, h = this.dpr, c = this;
u && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, s / h, l / h));
var v = this.domBack;
function p(d, g, y, m) {
if (o.clearRect(d, g, y, m), n && n !== "transparent") {
var _ = void 0;
Sh(n) ? (_ = n.__canvasGradient || Pd(o, n, {
x: 0,
y: 0,
width: y,
height: m
}), n.__canvasGradient = _) : N2(n) && (_ = Nd(o, n, {
dirty: function() {
c.setUnpainted(), c.__painter.refresh();
}
})), o.save(), o.fillStyle = _ || n, o.fillRect(d, g, y, m), o.restore();
}
u && (o.save(), o.globalAlpha = f, o.drawImage(v, d, g, y, m), o.restore());
}
!a || u ? p(0, 0, s, l) : a.length && C(a, function(d) {
p(d.x * h, d.y * h, d.width * h, d.height * h);
});
}, e;
}(vr);
const bv = Jz;
var B1 = 1e5, za = 314159, Mu = 0.01, Qz = 1e-3;
function t5(r) {
return r ? r.__builtin__ ? !0 : !(typeof r.resize != "function" || typeof r.refresh != "function") : !1;
}
function e5(r, e) {
var t = document.createElement("div");
return t.style.cssText = [
"position:relative",
"width:" + r + "px",
"height:" + e + "px",
"padding:0",
"margin:0",
"border-width:0"
].join(";") + ";", t;
}
var r5 = function() {
function r(e, t, n, a) {
this.type = "canvas", this._zlevelList = [], this._prevDisplayList = [], this._layers = {}, this._layerConfig = {}, this._needsManuallyCompositing = !1, this.type = "canvas";
var i = !e.nodeName || e.nodeName.toUpperCase() === "CANVAS";
this._opts = n = B({}, n || {}), this.dpr = n.devicePixelRatio || Cf, this._singleCanvas = i, this.root = e;
var o = e.style;
o && (nT(e), e.innerHTML = ""), this.storage = t;
var s = this._zlevelList;
this._prevDisplayList = [];
var l = this._layers;
if (i) {
var f = e, h = f.width, c = f.height;
n.width != null && (h = n.width), n.height != null && (c = n.height), this.dpr = n.devicePixelRatio || 1, f.width = h * this.dpr, f.height = c * this.dpr, this._width = h, this._height = c;
var v = new bv(f, this, this.dpr);
v.__builtin__ = !0, v.initContext(), l[za] = v, v.zlevel = za, s.push(za), this._domRoot = e;
} else {
this._width = so(e, 0, n), this._height = so(e, 1, n);
var u = this._domRoot = e5(this._width, this._height);
e.appendChild(u);
}
}
return r.prototype.getType = function() {
return "canvas";
}, r.prototype.isSingleCanvas = function() {
return this._singleCanvas;
}, r.prototype.getViewportRoot = function() {
return this._domRoot;
}, r.prototype.getViewportRootOffset = function() {
var e = this.getViewportRoot();
if (e)
return {
offsetLeft: e.offsetLeft || 0,
offsetTop: e.offsetTop || 0
};
}, r.prototype.refresh = function(e) {
var t = this.storage.getDisplayList(!0), n = this._prevDisplayList, a = this._zlevelList;
this._redrawId = Math.random(), this._paintList(t, n, e, this._redrawId);
for (var i = 0; i < a.length; i++) {
var o = a[i], s = this._layers[o];
if (!s.__builtin__ && s.refresh) {
var l = i === 0 ? this._backgroundColor : null;
s.refresh(l);
}
}
return this._opts.useDirtyRect && (this._prevDisplayList = t.slice()), this;
}, r.prototype.refreshHover = function() {
this._paintHoverList(this.storage.getDisplayList(!1));
}, r.prototype._paintHoverList = function(e) {
var t = e.length, n = this._hoverlayer;
if (n && n.clear(), !!t) {
for (var a = {
inHover: !0,
viewWidth: this._width,
viewHeight: this._height
}, i, o = 0; o < t; o++) {
var s = e[o];
s.__inHover && (n || (n = this._hoverlayer = this.getLayer(B1)), i || (i = n.ctx, i.save()), ni(i, s, a, o === t - 1));
}
i && i.restore();
}
}, r.prototype.getHoverLayer = function() {
return this.getLayer(B1);
}, r.prototype.paintOne = function(e, t) {
jD(e, t);
}, r.prototype._paintList = function(e, t, n, a) {
if (this._redrawId === a) {
n = n || !1, this._updateLayerStatus(e);
var i = this._doPaintList(e, t, n), o = i.finished, s = i.needsRefreshHover;
if (this._needsManuallyCompositing && this._compositeManually(), s && this._paintHoverList(e), o)
this.eachLayer(function(u) {
u.afterBrush && u.afterBrush();
});
else {
var l = this;
Xp(function() {
l._paintList(e, t, n, a);
});
}
}
}, r.prototype._compositeManually = function() {
var e = this.getLayer(za).ctx, t = this._domRoot.width, n = this._domRoot.height;
e.clearRect(0, 0, t, n), this.eachBuiltinLayer(function(a) {
a.virtual && e.drawImage(a.dom, 0, 0, t, n);
});
}, r.prototype._doPaintList = function(e, t, n) {
for (var a = this, i = [], o = this._opts.useDirtyRect, s = 0; s < this._zlevelList.length; s++) {
var l = this._zlevelList[s], u = this._layers[l];
u.__builtin__ && u !== this._hoverlayer && (u.__dirty || n) && i.push(u);
}
for (var f = !0, h = !1, c = function(d) {
var g = i[d], y = g.ctx, m = o && g.createRepaintRects(e, t, v._width, v._height), _ = n ? g.__startIndex : g.__drawIndex, S = !n && g.incremental && Date.now, w = S && Date.now(), x = g.zlevel === v._zlevelList[0] ? v._backgroundColor : null;
if (g.__startIndex === g.__endIndex)
g.clear(!1, x, m);
else if (_ === g.__startIndex) {
var b = e[_];
(!b.incremental || !b.notClear || n) && g.clear(!1, x, m);
}
_ === -1 && (console.error("For some unknown reason. drawIndex is -1"), _ = g.__startIndex);
var T, D = function(I) {
var E = {
inHover: !1,
allClipped: !1,
prevEl: null,
viewWidth: a._width,
viewHeight: a._height
};
for (T = _; T < g.__endIndex; T++) {
var P = e[T];
if (P.__inHover && (h = !0), a._doPaintEl(P, g, o, I, E, T === g.__endIndex - 1), S) {
var N = Date.now() - w;
if (N > 15)
break;
}
}
E.prevElClipPaths && y.restore();
};
if (m)
if (m.length === 0)
T = g.__endIndex;
else
for (var A = v.dpr, M = 0; M < m.length; ++M) {
var L = m[M];
y.save(), y.beginPath(), y.rect(L.x * A, L.y * A, L.width * A, L.height * A), y.clip(), D(L), y.restore();
}
else
y.save(), D(), y.restore();
g.__drawIndex = T, g.__drawIndex < g.__endIndex && (f = !1);
}, v = this, p = 0; p < i.length; p++)
c(p);
return Dt.wxa && C(this._layers, function(d) {
d && d.ctx && d.ctx.draw && d.ctx.draw();
}), {
finished: f,
needsRefreshHover: h
};
}, r.prototype._doPaintEl = function(e, t, n, a, i, o) {
var s = t.ctx;
if (n) {
var l = e.getPaintRect();
(!a || l && l.intersect(a)) && (ni(s, e, i, o), e.setPrevPaintRect(l));
} else
ni(s, e, i, o);
}, r.prototype.getLayer = function(e, t) {
this._singleCanvas && !this._needsManuallyCompositing && (e = za);
var n = this._layers[e];
return n || (n = new bv("zr_" + e, this, this.dpr), n.zlevel = e, n.__builtin__ = !0, this._layerConfig[e] ? lt(n, this._layerConfig[e], !0) : this._layerConfig[e - Mu] && lt(n, this._layerConfig[e - Mu], !0), t && (n.virtual = t), this.insertLayer(e, n), n.initContext()), n;
}, r.prototype.insertLayer = function(e, t) {
var n = this._layers, a = this._zlevelList, i = a.length, o = this._domRoot, s = null, l = -1;
if (n[e]) {
process.env.NODE_ENV !== "production" && br("ZLevel " + e + " has been used already");
return;
}
if (!t5(t)) {
process.env.NODE_ENV !== "production" && br("Layer of zlevel " + e + " is not valid");
return;
}
if (i > 0 && e > a[0]) {
for (l = 0; l < i - 1 && !(a[l] < e && a[l + 1] > e); l++)
;
s = n[a[l]];
}
if (a.splice(l + 1, 0, e), n[e] = t, !t.virtual)
if (s) {
var u = s.dom;
u.nextSibling ? o.insertBefore(t.dom, u.nextSibling) : o.appendChild(t.dom);
} else
o.firstChild ? o.insertBefore(t.dom, o.firstChild) : o.appendChild(t.dom);
t.__painter = this;
}, r.prototype.eachLayer = function(e, t) {
for (var n = this._zlevelList, a = 0; a < n.length; a++) {
var i = n[a];
e.call(t, this._layers[i], i);
}
}, r.prototype.eachBuiltinLayer = function(e, t) {
for (var n = this._zlevelList, a = 0; a < n.length; a++) {
var i = n[a], o = this._layers[i];
o.__builtin__ && e.call(t, o, i);
}
}, r.prototype.eachOtherLayer = function(e, t) {
for (var n = this._zlevelList, a = 0; a < n.length; a++) {
var i = n[a], o = this._layers[i];
o.__builtin__ || e.call(t, o, i);
}
}, r.prototype.getLayers = function() {
return this._layers;
}, r.prototype._updateLayerStatus = function(e) {
this.eachBuiltinLayer(function(h, c) {
h.__dirty = h.__used = !1;
});
function t(h) {
i && (i.__endIndex !== h && (i.__dirty = !0), i.__endIndex = h);
}
if (this._singleCanvas)
for (var n = 1; n < e.length; n++) {
var a = e[n];
if (a.zlevel !== e[n - 1].zlevel || a.incremental) {
this._needsManuallyCompositing = !0;
break;
}
}
var i = null, o = 0, s, l;
for (l = 0; l < e.length; l++) {
var a = e[l], u = a.zlevel, f = void 0;
s !== u && (s = u, o = 0), a.incremental ? (f = this.getLayer(u + Qz, this._needsManuallyCompositing), f.incremental = !0, o = 1) : f = this.getLayer(u + (o > 0 ? Mu : 0), this._needsManuallyCompositing), f.__builtin__ || br("ZLevel " + u + " has been used by unkown layer " + f.id), f !== i && (f.__used = !0, f.__startIndex !== l && (f.__dirty = !0), f.__startIndex = l, f.incremental ? f.__drawIndex = -1 : f.__drawIndex = l, t(l), i = f), a.__dirty & We && !a.__inHover && (f.__dirty = !0, f.incremental && f.__drawIndex < 0 && (f.__drawIndex = l));
}
t(l), this.eachBuiltinLayer(function(h, c) {
!h.__used && h.getElementCount() > 0 && (h.__dirty = !0, h.__startIndex = h.__endIndex = h.__drawIndex = 0), h.__dirty && h.__drawIndex < 0 && (h.__drawIndex = h.__startIndex);
});
}, r.prototype.clear = function() {
return this.eachBuiltinLayer(this._clearLayer), this;
}, r.prototype._clearLayer = function(e) {
e.clear();
}, r.prototype.setBackgroundColor = function(e) {
this._backgroundColor = e, C(this._layers, function(t) {
t.setUnpainted();
});
}, r.prototype.configLayer = function(e, t) {
if (t) {
var n = this._layerConfig;
n[e] ? lt(n[e], t, !0) : n[e] = t;
for (var a = 0; a < this._zlevelList.length; a++) {
var i = this._zlevelList[a];
if (i === e || i === e + Mu) {
var o = this._layers[i];
lt(o, n[e], !0);
}
}
}
}, r.prototype.delLayer = function(e) {
var t = this._layers, n = this._zlevelList, a = t[e];
!a || (a.dom.parentNode.removeChild(a.dom), delete t[e], n.splice(ct(n, e), 1));
}, r.prototype.resize = function(e, t) {
if (this._domRoot.style) {
var n = this._domRoot;
n.style.display = "none";
var a = this._opts, i = this.root;
if (e != null && (a.width = e), t != null && (a.height = t), e = so(i, 0, a), t = so(i, 1, a), n.style.display = "", this._width !== e || t !== this._height) {
n.style.width = e + "px", n.style.height = t + "px";
for (var o in this._layers)
this._layers.hasOwnProperty(o) && this._layers[o].resize(e, t);
this.refresh(!0);
}
this._width = e, this._height = t;
} else {
if (e == null || t == null)
return;
this._width = e, this._height = t, this.getLayer(za).resize(e, t);
}
return this;
}, r.prototype.clearLayer = function(e) {
var t = this._layers[e];
t && t.clear();
}, r.prototype.dispose = function() {
this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
}, r.prototype.getRenderedCanvas = function(e) {
if (e = e || {}, this._singleCanvas && !this._compositeManually)
return this._layers[za].dom;
var t = new bv("image", this, e.pixelRatio || this.dpr);
t.initContext(), t.clear(!1, e.backgroundColor || this._backgroundColor);
var n = t.ctx;
if (e.pixelRatio <= this.dpr) {
this.refresh();
var a = t.dom.width, i = t.dom.height;
this.eachLayer(function(h) {
h.__builtin__ ? n.drawImage(h.dom, 0, 0, a, i) : h.renderToCanvas && (n.save(), h.renderToCanvas(n), n.restore());
});
} else
for (var o = {
inHover: !1,
viewWidth: this._width,
viewHeight: this._height
}, s = this.storage.getDisplayList(!0), l = 0, u = s.length; l < u; l++) {
var f = s[l];
ni(n, f, o, l === u - 1);
}
return t.dom;
}, r.prototype.getWidth = function() {
return this._width;
}, r.prototype.getHeight = function() {
return this._height;
}, r;
}();
const n5 = r5;
function a5(r) {
r.registerPainter("canvas", n5);
}
var i5 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.hasSymbolVisual = !0, t;
}
return e.prototype.getInitialData = function(t) {
if (process.env.NODE_ENV !== "production") {
var n = t.coordinateSystem;
if (n !== "polar" && n !== "cartesian2d")
throw new Error("Line not support coordinateSystem besides cartesian and polar");
}
return An(null, this, {
useEncodeDefaulter: !0
});
}, e.prototype.getLegendIcon = function(t) {
var n = new nt(), a = Jt("line", 0, t.itemHeight / 2, t.itemWidth, 0, t.lineStyle.stroke, !1);
n.add(a), a.setStyle(t.lineStyle);
var i = this.getData().getVisual("symbol"), o = this.getData().getVisual("symbolRotate"), s = i === "none" ? "circle" : i, l = t.itemHeight * 0.8, u = Jt(s, (t.itemWidth - l) / 2, (t.itemHeight - l) / 2, l, l, t.itemStyle.fill);
n.add(u), u.setStyle(t.itemStyle);
var f = t.iconRotate === "inherit" ? o : t.iconRotate || 0;
return u.rotation = f * Math.PI / 180, u.setOrigin([t.itemWidth / 2, t.itemHeight / 2]), s.indexOf("empty") > -1 && (u.style.stroke = u.style.fill, u.style.fill = "#fff", u.style.lineWidth = 2), n;
}, e.type = "series.line", e.dependencies = ["grid", "polar"], e.defaultOption = {
z: 3,
coordinateSystem: "cartesian2d",
legendHoverLink: !0,
clip: !0,
label: {
position: "top"
},
endLabel: {
show: !1,
valueAnimation: !0,
distance: 8
},
lineStyle: {
width: 2,
type: "solid"
},
emphasis: {
scale: !0
},
step: !1,
smooth: !1,
smoothMonotone: null,
symbol: "emptyCircle",
symbolSize: 4,
symbolRotate: null,
showSymbol: !0,
showAllSymbol: "auto",
connectNulls: !1,
sampling: "none",
animationEasing: "linear",
progressive: 0,
hoverLayerThreshold: 1 / 0,
universalTransition: {
divideShape: "clone"
},
triggerLineEvent: !1
}, e;
}(Gt);
const o5 = i5;
function Co(r, e) {
var t = r.mapDimensionsAll("defaultedLabel"), n = t.length;
if (n === 1) {
var a = wo(r, e, t[0]);
return a != null ? a + "" : null;
} else if (n) {
for (var i = [], o = 0; o < t.length; o++)
i.push(wo(r, e, t[o]));
return i.join(" ");
}
}
function dM(r, e) {
var t = r.mapDimensionsAll("defaultedLabel");
if (!z(e))
return e + "";
for (var n = [], a = 0; a < t.length; a++) {
var i = r.getDimensionIndex(t[a]);
i >= 0 && n.push(e[i]);
}
return n.join(" ");
}
var s5 = function(r) {
R(e, r);
function e(t, n, a, i) {
var o = r.call(this) || this;
return o.updateData(t, n, a, i), o;
}
return e.prototype._createSymbol = function(t, n, a, i, o) {
this.removeAll();
var s = Jt(t, -1, -1, 2, 2, null, o);
s.attr({
z2: 100,
culling: !0,
scaleX: i[0] / 2,
scaleY: i[1] / 2
}), s.drift = l5, this._symbolType = t, this.add(s);
}, e.prototype.stopSymbolAnimation = function(t) {
this.childAt(0).stopAnimation(null, t);
}, e.prototype.getSymbolType = function() {
return this._symbolType;
}, e.prototype.getSymbolPath = function() {
return this.childAt(0);
}, e.prototype.highlight = function() {
Sn(this.childAt(0));
}, e.prototype.downplay = function() {
xn(this.childAt(0));
}, e.prototype.setZ = function(t, n) {
var a = this.childAt(0);
a.zlevel = t, a.z = n;
}, e.prototype.setDraggable = function(t, n) {
var a = this.childAt(0);
a.draggable = t, a.cursor = !n && t ? "move" : a.cursor;
}, e.prototype.updateData = function(t, n, a, i) {
this.silent = !1;
var o = t.getItemVisual(n, "symbol") || "circle", s = t.hostModel, l = e.getSymbolSize(t, n), u = o !== this._symbolType, f = i && i.disableAnimation;
if (u) {
var h = t.getItemVisual(n, "symbolKeepAspect");
this._createSymbol(o, t, n, l, h);
} else {
var c = this.childAt(0);
c.silent = !1;
var v = {
scaleX: l[0] / 2,
scaleY: l[1] / 2
};
f ? c.attr(v) : bt(c, v, s, n), Lr(c);
}
if (this._updateCommon(t, n, l, a, i), u) {
var c = this.childAt(0);
if (!f) {
var v = {
scaleX: this._sizeX,
scaleY: this._sizeY,
style: {
opacity: c.style.opacity
}
};
c.scaleX = c.scaleY = 0, c.style.opacity = 0, Bt(c, v, s, n);
}
}
f && this.childAt(0).stopAnimation("leave");
}, e.prototype._updateCommon = function(t, n, a, i, o) {
var s = this.childAt(0), l = t.hostModel, u, f, h, c, v, p, d, g, y;
if (i && (u = i.emphasisItemStyle, f = i.blurItemStyle, h = i.selectItemStyle, c = i.focus, v = i.blurScope, d = i.labelStatesModels, g = i.hoverScale, y = i.cursorStyle, p = i.emphasisDisabled), !i || t.hasItemOption) {
var m = i && i.itemModel ? i.itemModel : t.getItemModel(n), _ = m.getModel("emphasis");
u = _.getModel("itemStyle").getItemStyle(), h = m.getModel(["select", "itemStyle"]).getItemStyle(), f = m.getModel(["blur", "itemStyle"]).getItemStyle(), c = _.get("focus"), v = _.get("blurScope"), p = _.get("disabled"), d = se(m), g = _.getShallow("scale"), y = m.getShallow("cursor");
}
var S = t.getItemVisual(n, "symbolRotate");
s.attr("rotation", (S || 0) * Math.PI / 180 || 0);
var w = Yo(t.getItemVisual(n, "symbolOffset"), a);
w && (s.x = w[0], s.y = w[1]), y && s.attr("cursor", y);
var x = t.getItemVisual(n, "style"), b = x.fill;
if (s instanceof ve) {
var T = s.style;
s.useStyle(B({
image: T.image,
x: T.x,
y: T.y,
width: T.width,
height: T.height
}, x));
} else
s.__isEmptyBrush ? s.useStyle(B({}, x)) : s.useStyle(x), s.style.decal = null, s.setColor(b, o && o.symbolInnerColor), s.style.strokeNoScale = !0;
var D = t.getItemVisual(n, "liftZ"), A = this._z2;
D != null ? A == null && (this._z2 = s.z2, s.z2 += D) : A != null && (s.z2 = A, this._z2 = null);
var M = o && o.useNameLabel;
xe(s, d, {
labelFetcher: l,
labelDataIndex: n,
defaultText: L,
inheritColor: b,
defaultOpacity: x.opacity
});
function L(P) {
return M ? t.getName(P) : Co(t, P);
}
this._sizeX = a[0] / 2, this._sizeY = a[1] / 2;
var I = s.ensureState("emphasis");
if (I.style = u, s.ensureState("select").style = h, s.ensureState("blur").style = f, g) {
var E = Math.max(wt(g) ? g : 1.1, 3 / this._sizeY);
I.scaleX = this._sizeX * E, I.scaleY = this._sizeY * E;
}
this.setSymbolScale(1), Ut(this, c, v, p);
}, e.prototype.setSymbolScale = function(t) {
this.scaleX = this.scaleY = t;
}, e.prototype.fadeOut = function(t, n, a) {
var i = this.childAt(0), o = at(this).dataIndex, s = a && a.animation;
if (this.silent = i.silent = !0, a && a.fadeLabel) {
var l = i.getTextContent();
l && ia(l, {
style: {
opacity: 0
}
}, n, {
dataIndex: o,
removeOpt: s,
cb: function() {
i.removeTextContent();
}
});
} else
i.removeTextContent();
ia(i, {
style: {
opacity: 0
},
scaleX: 0,
scaleY: 0
}, n, {
dataIndex: o,
cb: t,
removeOpt: s
});
}, e.getSymbolSize = function(t, n) {
return kl(t.getItemVisual(n, "symbolSize"));
}, e;
}(nt);
function l5(r, e) {
this.parent.drift(r, e);
}
const zl = s5;
function Tv(r, e, t, n) {
return e && !isNaN(e[0]) && !isNaN(e[1]) && !(n.isIgnore && n.isIgnore(t)) && !(n.clipShape && !n.clipShape.contain(e[0], e[1])) && r.getItemVisual(t, "symbol") !== "none";
}
function z1(r) {
return r != null && !j(r) && (r = {
isIgnore: r
}), r || {};
}
function G1(r) {
var e = r.hostModel, t = e.getModel("emphasis");
return {
emphasisItemStyle: t.getModel("itemStyle").getItemStyle(),
blurItemStyle: e.getModel(["blur", "itemStyle"]).getItemStyle(),
selectItemStyle: e.getModel(["select", "itemStyle"]).getItemStyle(),
focus: t.get("focus"),
blurScope: t.get("blurScope"),
emphasisDisabled: t.get("disabled"),
hoverScale: t.get("scale"),
labelStatesModels: se(e),
cursorStyle: e.get("cursor")
};
}
var u5 = function() {
function r(e) {
this.group = new nt(), this._SymbolCtor = e || zl;
}
return r.prototype.updateData = function(e, t) {
this._progressiveEls = null, t = z1(t);
var n = this.group, a = e.hostModel, i = this._data, o = this._SymbolCtor, s = t.disableAnimation, l = G1(e), u = {
disableAnimation: s
}, f = t.getSymbolPoint || function(h) {
return e.getItemLayout(h);
};
i || n.removeAll(), e.diff(i).add(function(h) {
var c = f(h);
if (Tv(e, c, h, t)) {
var v = new o(e, h, l, u);
v.setPosition(c), e.setItemGraphicEl(h, v), n.add(v);
}
}).update(function(h, c) {
var v = i.getItemGraphicEl(c), p = f(h);
if (!Tv(e, p, h, t)) {
n.remove(v);
return;
}
var d = e.getItemVisual(h, "symbol") || "circle", g = v && v.getSymbolType && v.getSymbolType();
if (!v || g && g !== d)
n.remove(v), v = new o(e, h, l, u), v.setPosition(p);
else {
v.updateData(e, h, l, u);
var y = {
x: p[0],
y: p[1]
};
s ? v.attr(y) : bt(v, y, a);
}
n.add(v), e.setItemGraphicEl(h, v);
}).remove(function(h) {
var c = i.getItemGraphicEl(h);
c && c.fadeOut(function() {
n.remove(c);
}, a);
}).execute(), this._getSymbolPoint = f, this._data = e;
}, r.prototype.updateLayout = function() {
var e = this, t = this._data;
t && t.eachItemGraphicEl(function(n, a) {
var i = e._getSymbolPoint(a);
n.setPosition(i), n.markRedraw();
});
}, r.prototype.incrementalPrepareUpdate = function(e) {
this._seriesScope = G1(e), this._data = null, this.group.removeAll();
}, r.prototype.incrementalUpdate = function(e, t, n) {
this._progressiveEls = [], n = z1(n);
function a(l) {
l.isGroup || (l.incremental = !0, l.ensureState("emphasis").hoverLayer = !0);
}
for (var i = e.start; i < e.end; i++) {
var o = t.getItemLayout(i);
if (Tv(t, o, i, n)) {
var s = new this._SymbolCtor(t, i, this._seriesScope);
s.traverse(a), s.setPosition(o), this.group.add(s), t.setItemGraphicEl(i, s), this._progressiveEls.push(s);
}
}
}, r.prototype.eachRendered = function(e) {
ca(this._progressiveEls || this.group, e);
}, r.prototype.remove = function(e) {
var t = this.group, n = this._data;
n && e ? n.eachItemGraphicEl(function(a) {
a.fadeOut(function() {
t.remove(a);
}, n.hostModel);
}) : t.removeAll();
}, r;
}();
const Gl = u5;
function gM(r, e, t) {
var n = r.getBaseAxis(), a = r.getOtherAxis(n), i = f5(a, t), o = n.dim, s = a.dim, l = e.mapDimension(s), u = e.mapDimension(o), f = s === "x" || s === "radius" ? 1 : 0, h = G(r.dimensions, function(p) {
return e.mapDimension(p);
}), c = !1, v = e.getCalculationInfo("stackResultDimension");
return sa(
e,
h[0]
) && (c = !0, h[0] = v), sa(
e,
h[1]
) && (c = !0, h[1] = v), {
dataDimsForPoint: h,
valueStart: i,
valueAxisDim: s,
baseAxisDim: o,
stacked: !!c,
valueDim: l,
baseDim: u,
baseDataOffset: f,
stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
};
}
function f5(r, e) {
var t = 0, n = r.scale.getExtent();
return e === "start" ? t = n[0] : e === "end" ? t = n[1] : wt(e) && !isNaN(e) ? t = e : n[0] > 0 ? t = n[0] : n[1] < 0 && (t = n[1]), t;
}
function yM(r, e, t, n) {
var a = NaN;
r.stacked && (a = t.get(t.getCalculationInfo("stackedOverDimension"), n)), isNaN(a) && (a = r.valueStart);
var i = r.baseDataOffset, o = [];
return o[i] = t.get(r.baseDim, n), o[1 - i] = a, e.dataToPoint(o);
}
function h5(r, e) {
var t = [];
return e.diff(r).add(function(n) {
t.push({
cmd: "+",
idx: n
});
}).update(function(n, a) {
t.push({
cmd: "=",
idx: a,
idx1: n
});
}).remove(function(n) {
t.push({
cmd: "-",
idx: n
});
}).execute(), t;
}
function c5(r, e, t, n, a, i, o, s) {
for (var l = h5(r, e), u = [], f = [], h = [], c = [], v = [], p = [], d = [], g = gM(a, e, o), y = r.getLayout("points") || [], m = e.getLayout("points") || [], _ = 0; _ < l.length; _++) {
var S = l[_], w = !0, x = void 0, b = void 0;
switch (S.cmd) {
case "=":
x = S.idx * 2, b = S.idx1 * 2;
var T = y[x], D = y[x + 1], A = m[b], M = m[b + 1];
(isNaN(T) || isNaN(D)) && (T = A, D = M), u.push(T, D), f.push(A, M), h.push(t[x], t[x + 1]), c.push(n[b], n[b + 1]), d.push(e.getRawIndex(S.idx1));
break;
case "+":
var L = S.idx, I = g.dataDimsForPoint, E = a.dataToPoint([e.get(I[0], L), e.get(I[1], L)]);
b = L * 2, u.push(E[0], E[1]), f.push(m[b], m[b + 1]);
var P = yM(g, a, e, L);
h.push(P[0], P[1]), c.push(n[b], n[b + 1]), d.push(e.getRawIndex(L));
break;
case "-":
w = !1;
}
w && (v.push(S), p.push(p.length));
}
p.sort(function(Lt, At) {
return d[Lt] - d[At];
});
for (var N = u.length, O = Wr(N), k = Wr(N), V = Wr(N), F = Wr(N), $ = [], _ = 0; _ < p.length; _++) {
var Z = p[_], et = _ * 2, ht = Z * 2;
O[et] = u[ht], O[et + 1] = u[ht + 1], k[et] = f[ht], k[et + 1] = f[ht + 1], V[et] = h[ht], V[et + 1] = h[ht + 1], F[et] = c[ht], F[et + 1] = c[ht + 1], $[_] = v[Z];
}
return {
current: O,
next: k,
stackedOnCurrent: V,
stackedOnNext: F,
status: $
};
}
var On = Math.min, Vn = Math.max;
function fi(r, e) {
return isNaN(r) || isNaN(e);
}
function $d(r, e, t, n, a, i, o, s, l) {
for (var u, f, h, c, v, p, d = t, g = 0; g < n; g++) {
var y = e[d * 2], m = e[d * 2 + 1];
if (d >= a || d < 0)
break;
if (fi(y, m)) {
if (l) {
d += i;
continue;
}
break;
}
if (d === t)
r[i > 0 ? "moveTo" : "lineTo"](y, m), h = y, c = m;
else {
var _ = y - u, S = m - f;
if (_ * _ + S * S < 0.5) {
d += i;
continue;
}
if (o > 0) {
for (var w = d + i, x = e[w * 2], b = e[w * 2 + 1]; x === y && b === m && g < n; )
g++, w += i, d += i, x = e[w * 2], b = e[w * 2 + 1], y = e[d * 2], m = e[d * 2 + 1], _ = y - u, S = m - f;
var T = g + 1;
if (l)
for (; fi(x, b) && T < n; )
T++, w += i, x = e[w * 2], b = e[w * 2 + 1];
var D = 0.5, A = 0, M = 0, L = void 0, I = void 0;
if (T >= n || fi(x, b))
v = y, p = m;
else {
A = x - u, M = b - f;
var E = y - u, P = x - y, N = m - f, O = b - m, k = void 0, V = void 0;
if (s === "x") {
k = Math.abs(E), V = Math.abs(P);
var F = A > 0 ? 1 : -1;
v = y - F * k * o, p = m, L = y + F * V * o, I = m;
} else if (s === "y") {
k = Math.abs(N), V = Math.abs(O);
var $ = M > 0 ? 1 : -1;
v = y, p = m - $ * k * o, L = y, I = m + $ * V * o;
} else
k = Math.sqrt(E * E + N * N), V = Math.sqrt(P * P + O * O), D = V / (V + k), v = y - A * o * (1 - D), p = m - M * o * (1 - D), L = y + A * o * D, I = m + M * o * D, L = On(L, Vn(x, y)), I = On(I, Vn(b, m)), L = Vn(L, On(x, y)), I = Vn(I, On(b, m)), A = L - y, M = I - m, v = y - A * k / V, p = m - M * k / V, v = On(v, Vn(u, y)), p = On(p, Vn(f, m)), v = Vn(v, On(u, y)), p = Vn(p, On(f, m)), A = y - v, M = m - p, L = y + A * V / k, I = m + M * V / k;
}
r.bezierCurveTo(h, c, v, p, y, m), h = L, c = I;
} else
r.lineTo(y, m);
}
u = y, f = m, d += i;
}
return g;
}
var mM = function() {
function r() {
this.smooth = 0, this.smoothConstraint = !0;
}
return r;
}(), v5 = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "ec-polyline", n;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new mM();
}, e.prototype.buildPath = function(t, n) {
var a = n.points, i = 0, o = a.length / 2;
if (n.connectNulls) {
for (; o > 0 && fi(a[o * 2 - 2], a[o * 2 - 1]); o--)
;
for (; i < o && fi(a[i * 2], a[i * 2 + 1]); i++)
;
}
for (; i < o; )
i += $d(t, a, i, o, o, 1, n.smooth, n.smoothMonotone, n.connectNulls) + 1;
}, e.prototype.getPointOn = function(t, n) {
this.path || (this.createPathProxy(), this.buildPath(this.path, this.shape));
for (var a = this.path, i = a.data, o = Jr.CMD, s, l, u = n === "x", f = [], h = 0; h < i.length; ) {
var c = i[h++], v = void 0, p = void 0, d = void 0, g = void 0, y = void 0, m = void 0, _ = void 0;
switch (c) {
case o.M:
s = i[h++], l = i[h++];
break;
case o.L:
if (v = i[h++], p = i[h++], _ = u ? (t - s) / (v - s) : (t - l) / (p - l), _ <= 1 && _ >= 0) {
var S = u ? (p - l) * _ + l : (v - s) * _ + s;
return u ? [t, S] : [S, t];
}
s = v, l = p;
break;
case o.C:
v = i[h++], p = i[h++], d = i[h++], g = i[h++], y = i[h++], m = i[h++];
var w = u ? xf(s, v, d, y, t, f) : xf(l, p, g, m, t, f);
if (w > 0)
for (var x = 0; x < w; x++) {
var b = f[x];
if (b <= 1 && b >= 0) {
var S = u ? re(l, p, g, m, b) : re(s, v, d, y, b);
return u ? [t, S] : [S, t];
}
}
s = y, l = m;
break;
}
}
}, e;
}(gt), p5 = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e;
}(mM), _M = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "ec-polygon", n;
}
return e.prototype.getDefaultShape = function() {
return new p5();
}, e.prototype.buildPath = function(t, n) {
var a = n.points, i = n.stackedOnPoints, o = 0, s = a.length / 2, l = n.smoothMonotone;
if (n.connectNulls) {
for (; s > 0 && fi(a[s * 2 - 2], a[s * 2 - 1]); s--)
;
for (; o < s && fi(a[o * 2], a[o * 2 + 1]); o++)
;
}
for (; o < s; ) {
var u = $d(t, a, o, s, s, 1, n.smooth, l, n.connectNulls);
$d(t, i, o + u - 1, u, s, -1, n.stackedOnSmooth, l, n.connectNulls), o += u + 1, t.closePath();
}
}, e;
}(gt);
function SM(r, e, t, n, a) {
var i = r.getArea(), o = i.x, s = i.y, l = i.width, u = i.height, f = t.get(["lineStyle", "width"]) || 2;
o -= f / 2, s -= f / 2, l += f, u += f, o = Math.floor(o), l = Math.round(l);
var h = new xt({
shape: {
x: o,
y: s,
width: l,
height: u
}
});
if (e) {
var c = r.getBaseAxis(), v = c.isHorizontal(), p = c.inverse;
v ? (p && (h.shape.x += l), h.shape.width = 0) : (p || (h.shape.y += u), h.shape.height = 0);
var d = q(a) ? function(g) {
a(g, h);
} : null;
Bt(h, {
shape: {
width: l,
height: u,
x: o,
y: s
}
}, t, null, n, d);
}
return h;
}
function xM(r, e, t) {
var n = r.getArea(), a = Wt(n.r0, 1), i = Wt(n.r, 1), o = new Ve({
shape: {
cx: Wt(r.cx, 1),
cy: Wt(r.cy, 1),
r0: a,
r: i,
startAngle: n.startAngle,
endAngle: n.endAngle,
clockwise: n.clockwise
}
});
if (e) {
var s = r.getBaseAxis().dim === "angle";
s ? o.shape.endAngle = n.startAngle : o.shape.r = a, Bt(o, {
shape: {
endAngle: n.endAngle,
r: i
}
}, t);
}
return o;
}
function Qh(r, e, t, n, a) {
if (r) {
if (r.type === "polar")
return xM(r, e, t);
if (r.type === "cartesian2d")
return SM(r, e, t, n, a);
} else
return null;
return null;
}
function Di(r, e) {
return r.type === e;
}
function F1(r, e) {
if (r.length === e.length) {
for (var t = 0; t < r.length; t++)
if (r[t] !== e[t])
return;
return !0;
}
}
function H1(r) {
for (var e = 1 / 0, t = 1 / 0, n = -1 / 0, a = -1 / 0, i = 0; i < r.length; ) {
var o = r[i++], s = r[i++];
isNaN(o) || (e = Math.min(o, e), n = Math.max(o, n)), isNaN(s) || (t = Math.min(s, t), a = Math.max(s, a));
}
return [[e, t], [n, a]];
}
function $1(r, e) {
var t = H1(r), n = t[0], a = t[1], i = H1(e), o = i[0], s = i[1];
return Math.max(Math.abs(n[0] - o[0]), Math.abs(n[1] - o[1]), Math.abs(a[0] - s[0]), Math.abs(a[1] - s[1]));
}
function W1(r) {
return wt(r) ? r : r ? 0.5 : 0;
}
function d5(r, e, t) {
if (!t.valueDim)
return [];
for (var n = e.count(), a = Wr(n * 2), i = 0; i < n; i++) {
var o = yM(t, r, e, i);
a[i * 2] = o[0], a[i * 2 + 1] = o[1];
}
return a;
}
function Bn(r, e, t, n) {
var a = e.getBaseAxis(), i = a.dim === "x" || a.dim === "radius" ? 0 : 1, o = [], s = 0, l = [], u = [], f = [], h = [];
if (n) {
for (s = 0; s < r.length; s += 2)
!isNaN(r[s]) && !isNaN(r[s + 1]) && h.push(r[s], r[s + 1]);
r = h;
}
for (s = 0; s < r.length - 2; s += 2)
switch (f[0] = r[s + 2], f[1] = r[s + 3], u[0] = r[s], u[1] = r[s + 1], o.push(u[0], u[1]), t) {
case "end":
l[i] = f[i], l[1 - i] = u[1 - i], o.push(l[0], l[1]);
break;
case "middle":
var c = (u[i] + f[i]) / 2, v = [];
l[i] = v[i] = c, l[1 - i] = u[1 - i], v[1 - i] = f[1 - i], o.push(l[0], l[1]), o.push(v[0], v[1]);
break;
default:
l[i] = u[i], l[1 - i] = f[1 - i], o.push(l[0], l[1]);
}
return o.push(r[s++], r[s++]), o;
}
function g5(r, e) {
var t = [], n = r.length, a, i;
function o(f, h, c) {
var v = f.coord, p = (c - v) / (h.coord - v), d = mE(p, [f.color, h.color]);
return {
coord: c,
color: d
};
}
for (var s = 0; s < n; s++) {
var l = r[s], u = l.coord;
if (u < 0)
a = l;
else if (u > e) {
i ? t.push(o(i, l, e)) : a && t.push(o(a, l, 0), o(a, l, e));
break;
} else
a && (t.push(o(a, l, 0)), a = null), t.push(l), i = l;
}
return t;
}
function y5(r, e, t) {
var n = r.getVisual("visualMeta");
if (!(!n || !n.length || !r.count())) {
if (e.type !== "cartesian2d") {
process.env.NODE_ENV !== "production" && console.warn("Visual map on line style is only supported on cartesian2d.");
return;
}
for (var a, i, o = n.length - 1; o >= 0; o--) {
var s = r.getDimensionInfo(n[o].dimension);
if (a = s && s.coordDim, a === "x" || a === "y") {
i = n[o];
break;
}
}
if (!i) {
process.env.NODE_ENV !== "production" && console.warn("Visual map on line style only support x or y dimension.");
return;
}
var l = e.getAxis(a), u = G(i.stops, function(_) {
return {
coord: l.toGlobalCoord(l.dataToCoord(_.value)),
color: _.color
};
}), f = u.length, h = i.outerColors.slice();
f && u[0].coord > u[f - 1].coord && (u.reverse(), h.reverse());
var c = g5(u, a === "x" ? t.getWidth() : t.getHeight()), v = c.length;
if (!v && f)
return u[0].coord < 0 ? h[1] ? h[1] : u[f - 1].color : h[0] ? h[0] : u[0].color;
var p = 10, d = c[0].coord - p, g = c[v - 1].coord + p, y = g - d;
if (y < 1e-3)
return "transparent";
C(c, function(_) {
_.offset = (_.coord - d) / y;
}), c.push({
offset: v ? c[v - 1].offset : 0.5,
color: h[1] || "transparent"
}), c.unshift({
offset: v ? c[0].offset : 0.5,
color: h[0] || "transparent"
});
var m = new Il(0, 0, 0, 0, c, !0);
return m[a] = d, m[a + "2"] = g, m;
}
}
function m5(r, e, t) {
var n = r.get("showAllSymbol"), a = n === "auto";
if (!(n && !a)) {
var i = t.getAxesByScale("ordinal")[0];
if (!!i && !(a && _5(i, e))) {
var o = e.mapDimension(i.dim), s = {};
return C(i.getViewLabels(), function(l) {
var u = i.scale.getRawOrdinalNumber(l.tickValue);
s[u] = 1;
}), function(l) {
return !s.hasOwnProperty(e.get(o, l));
};
}
}
}
function _5(r, e) {
var t = r.getExtent(), n = Math.abs(t[1] - t[0]) / r.scale.count();
isNaN(n) && (n = 0);
for (var a = e.count(), i = Math.max(1, Math.round(a / 5)), o = 0; o < a; o += i)
if (zl.getSymbolSize(
e,
o
)[r.isHorizontal() ? 1 : 0] * 1.5 > n)
return !1;
return !0;
}
function S5(r, e) {
return isNaN(r) || isNaN(e);
}
function x5(r) {
for (var e = r.length / 2; e > 0 && S5(r[e * 2 - 2], r[e * 2 - 1]); e--)
;
return e - 1;
}
function U1(r, e) {
return [r[e * 2], r[e * 2 + 1]];
}
function w5(r, e, t) {
for (var n = r.length / 2, a = t === "x" ? 0 : 1, i, o, s = 0, l = -1, u = 0; u < n; u++)
if (o = r[u * 2 + a], !(isNaN(o) || isNaN(r[u * 2 + 1 - a]))) {
if (u === 0) {
i = o;
continue;
}
if (i <= e && o >= e || i >= e && o <= e) {
l = u;
break;
}
s = u, i = o;
}
return {
range: [s, l],
t: (e - i) / (o - i)
};
}
function wM(r) {
if (r.get(["endLabel", "show"]))
return !0;
for (var e = 0; e < Le.length; e++)
if (r.get([Le[e], "endLabel", "show"]))
return !0;
return !1;
}
function Cv(r, e, t, n) {
if (Di(e, "cartesian2d")) {
var a = n.getModel("endLabel"), i = a.get("valueAnimation"), o = n.getData(), s = {
lastFrameIndex: 0
}, l = wM(n) ? function(v, p) {
r._endLabelOnDuring(v, p, o, s, i, a, e);
} : null, u = e.getBaseAxis().isHorizontal(), f = SM(e, t, n, function() {
var v = r._endLabel;
v && t && s.originalX != null && v.attr({
x: s.originalX,
y: s.originalY
});
}, l);
if (!n.get("clip", !0)) {
var h = f.shape, c = Math.max(h.width, h.height);
u ? (h.y -= c, h.height += c * 2) : (h.x -= c, h.width += c * 2);
}
return l && l(1, f), f;
} else
return process.env.NODE_ENV !== "production" && n.get(["endLabel", "show"]) && console.warn("endLabel is not supported for lines in polar systems."), xM(e, t, n);
}
function b5(r, e) {
var t = e.getBaseAxis(), n = t.isHorizontal(), a = t.inverse, i = n ? a ? "right" : "left" : "center", o = n ? "middle" : a ? "top" : "bottom";
return {
normal: {
align: r.get("align") || i,
verticalAlign: r.get("verticalAlign") || o
}
};
}
var T5 = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.init = function() {
var t = new nt(), n = new Gl();
this.group.add(n.group), this._symbolDraw = n, this._lineGroup = t;
}, e.prototype.render = function(t, n, a) {
var i = this, o = t.coordinateSystem, s = this.group, l = t.getData(), u = t.getModel("lineStyle"), f = t.getModel("areaStyle"), h = l.getLayout("points") || [], c = o.type === "polar", v = this._coordSys, p = this._symbolDraw, d = this._polyline, g = this._polygon, y = this._lineGroup, m = t.get("animation"), _ = !f.isEmpty(), S = f.get("origin"), w = gM(o, l, S), x = _ && d5(o, l, w), b = t.get("showSymbol"), T = t.get("connectNulls"), D = b && !c && m5(t, l, o), A = this._data;
A && A.eachItemGraphicEl(function(At, dt) {
At.__temp && (s.remove(At), A.setItemGraphicEl(dt, null));
}), b || p.remove(), s.add(y);
var M = c ? !1 : t.get("step"), L;
o && o.getArea && t.get("clip", !0) && (L = o.getArea(), L.width != null ? (L.x -= 0.1, L.y -= 0.1, L.width += 0.2, L.height += 0.2) : L.r0 && (L.r0 -= 0.5, L.r += 0.5)), this._clipShapeForSymbol = L;
var I = y5(l, o, a) || l.getVisual("style")[l.getVisual("drawType")];
if (!(d && v.type === o.type && M === this._step))
b && p.updateData(l, {
isIgnore: D,
clipShape: L,
disableAnimation: !0,
getSymbolPoint: function(At) {
return [h[At * 2], h[At * 2 + 1]];
}
}), m && this._initSymbolLabelAnimation(l, o, L), M && (h = Bn(h, o, M, T), x && (x = Bn(x, o, M, T))), d = this._newPolyline(h), _ ? g = this._newPolygon(h, x) : g && (y.remove(g), g = this._polygon = null), c || this._initOrUpdateEndLabel(t, o, mi(I)), y.setClipPath(Cv(this, o, !0, t));
else {
_ && !g ? g = this._newPolygon(h, x) : g && !_ && (y.remove(g), g = this._polygon = null), c || this._initOrUpdateEndLabel(t, o, mi(I));
var E = y.getClipPath();
if (E) {
var P = Cv(this, o, !1, t);
Bt(E, {
shape: P.shape
}, t);
} else
y.setClipPath(Cv(this, o, !0, t));
b && p.updateData(l, {
isIgnore: D,
clipShape: L,
disableAnimation: !0,
getSymbolPoint: function(At) {
return [h[At * 2], h[At * 2 + 1]];
}
}), (!F1(this._stackedOnPoints, x) || !F1(this._points, h)) && (m ? this._doUpdateAnimation(l, x, o, a, M, S, T) : (M && (h = Bn(h, o, M, T), x && (x = Bn(x, o, M, T))), d.setShape({
points: h
}), g && g.setShape({
points: h,
stackedOnPoints: x
})));
}
var N = t.getModel("emphasis"), O = N.get("focus"), k = N.get("blurScope"), V = N.get("disabled");
if (d.useStyle(J(
u.getLineStyle(),
{
fill: "none",
stroke: I,
lineJoin: "bevel"
}
)), ce(d, t, "lineStyle"), d.style.lineWidth > 0 && t.get(["emphasis", "lineStyle", "width"]) === "bolder") {
var F = d.getState("emphasis").style;
F.lineWidth = +d.style.lineWidth + 1;
}
at(d).seriesIndex = t.seriesIndex, Ut(d, O, k, V);
var $ = W1(t.get("smooth")), Z = t.get("smoothMonotone");
if (d.setShape({
smooth: $,
smoothMonotone: Z,
connectNulls: T
}), g) {
var et = l.getCalculationInfo("stackedOnSeries"), ht = 0;
g.useStyle(J(f.getAreaStyle(), {
fill: I,
opacity: 0.7,
lineJoin: "bevel",
decal: l.getVisual("style").decal
})), et && (ht = W1(et.get("smooth"))), g.setShape({
smooth: $,
stackedOnSmooth: ht,
smoothMonotone: Z,
connectNulls: T
}), ce(g, t, "areaStyle"), at(g).seriesIndex = t.seriesIndex, Ut(g, O, k, V);
}
var Lt = function(At) {
i._changePolyState(At);
};
l.eachItemGraphicEl(function(At) {
At && (At.onHoverStateChange = Lt);
}), this._polyline.onHoverStateChange = Lt, this._data = l, this._coordSys = o, this._stackedOnPoints = x, this._points = h, this._step = M, this._valueOrigin = S, t.get("triggerLineEvent") && (this.packEventData(t, d), g && this.packEventData(t, g));
}, e.prototype.packEventData = function(t, n) {
at(n).eventData = {
componentType: "series",
componentSubType: "line",
componentIndex: t.componentIndex,
seriesIndex: t.seriesIndex,
seriesName: t.name,
seriesType: "line"
};
}, e.prototype.highlight = function(t, n, a, i) {
var o = t.getData(), s = di(o, i);
if (this._changePolyState("emphasis"), !(s instanceof Array) && s != null && s >= 0) {
var l = o.getLayout("points"), u = o.getItemGraphicEl(s);
if (!u) {
var f = l[s * 2], h = l[s * 2 + 1];
if (isNaN(f) || isNaN(h) || this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(f, h))
return;
var c = t.get("zlevel"), v = t.get("z");
u = new zl(o, s), u.x = f, u.y = h, u.setZ(c, v);
var p = u.getSymbolPath().getTextContent();
p && (p.zlevel = c, p.z = v, p.z2 = this._polyline.z2 + 1), u.__temp = !0, o.setItemGraphicEl(s, u), u.stopSymbolAnimation(!0), this.group.add(u);
}
u.highlight();
} else
Ot.prototype.highlight.call(this, t, n, a, i);
}, e.prototype.downplay = function(t, n, a, i) {
var o = t.getData(), s = di(o, i);
if (this._changePolyState("normal"), s != null && s >= 0) {
var l = o.getItemGraphicEl(s);
l && (l.__temp ? (o.setItemGraphicEl(s, null), this.group.remove(l)) : l.downplay());
} else
Ot.prototype.downplay.call(this, t, n, a, i);
}, e.prototype._changePolyState = function(t) {
var n = this._polygon;
Lf(this._polyline, t), n && Lf(n, t);
}, e.prototype._newPolyline = function(t) {
var n = this._polyline;
return n && this._lineGroup.remove(n), n = new v5({
shape: {
points: t
},
segmentIgnoreThreshold: 2,
z2: 10
}), this._lineGroup.add(n), this._polyline = n, n;
}, e.prototype._newPolygon = function(t, n) {
var a = this._polygon;
return a && this._lineGroup.remove(a), a = new _M({
shape: {
points: t,
stackedOnPoints: n
},
segmentIgnoreThreshold: 2
}), this._lineGroup.add(a), this._polygon = a, a;
}, e.prototype._initSymbolLabelAnimation = function(t, n, a) {
var i, o, s = n.getBaseAxis(), l = s.inverse;
n.type === "cartesian2d" ? (i = s.isHorizontal(), o = !1) : n.type === "polar" && (i = s.dim === "angle", o = !0);
var u = t.hostModel, f = u.get("animationDuration");
q(f) && (f = f(null));
var h = u.get("animationDelay") || 0, c = q(h) ? h(null) : h;
t.eachItemGraphicEl(function(v, p) {
var d = v;
if (d) {
var g = [v.x, v.y], y = void 0, m = void 0, _ = void 0;
if (a)
if (o) {
var S = a, w = n.pointToCoord(g);
i ? (y = S.startAngle, m = S.endAngle, _ = -w[1] / 180 * Math.PI) : (y = S.r0, m = S.r, _ = w[0]);
} else {
var x = a;
i ? (y = x.x, m = x.x + x.width, _ = v.x) : (y = x.y + x.height, m = x.y, _ = v.y);
}
var b = m === y ? 0 : (_ - y) / (m - y);
l && (b = 1 - b);
var T = q(h) ? h(p) : f * b + c, D = d.getSymbolPath(), A = D.getTextContent();
d.attr({
scaleX: 0,
scaleY: 0
}), d.animateTo({
scaleX: 1,
scaleY: 1
}, {
duration: 200,
setToFinal: !0,
delay: T
}), A && A.animateFrom({
style: {
opacity: 0
}
}, {
duration: 300,
delay: T
}), D.disableLabelAnimation = !0;
}
});
}, e.prototype._initOrUpdateEndLabel = function(t, n, a) {
var i = t.getModel("endLabel");
if (wM(t)) {
var o = t.getData(), s = this._polyline, l = o.getLayout("points");
if (!l) {
s.removeTextContent(), this._endLabel = null;
return;
}
var u = this._endLabel;
u || (u = this._endLabel = new Ct({
z2: 200
}), u.ignoreClip = !0, s.setTextContent(this._endLabel), s.disableLabelAnimation = !0);
var f = x5(l);
f >= 0 && (xe(s, se(t, "endLabel"), {
inheritColor: a,
labelFetcher: t,
labelDataIndex: f,
defaultText: function(h, c, v) {
return v != null ? dM(o, v) : Co(o, h);
},
enableTextSetter: !0
}, b5(i, n)), s.textConfig.position = null);
} else
this._endLabel && (this._polyline.removeTextContent(), this._endLabel = null);
}, e.prototype._endLabelOnDuring = function(t, n, a, i, o, s, l) {
var u = this._endLabel, f = this._polyline;
if (u) {
t < 1 && i.originalX == null && (i.originalX = u.x, i.originalY = u.y);
var h = a.getLayout("points"), c = a.hostModel, v = c.get("connectNulls"), p = s.get("precision"), d = s.get("distance") || 0, g = l.getBaseAxis(), y = g.isHorizontal(), m = g.inverse, _ = n.shape, S = m ? y ? _.x : _.y + _.height : y ? _.x + _.width : _.y, w = (y ? d : 0) * (m ? -1 : 1), x = (y ? 0 : -d) * (m ? -1 : 1), b = y ? "x" : "y", T = w5(h, S, b), D = T.range, A = D[1] - D[0], M = void 0;
if (A >= 1) {
if (A > 1 && !v) {
var L = U1(h, D[0]);
u.attr({
x: L[0] + w,
y: L[1] + x
}), o && (M = c.getRawValue(D[0]));
} else {
var L = f.getPointOn(S, b);
L && u.attr({
x: L[0] + w,
y: L[1] + x
});
var I = c.getRawValue(D[0]), E = c.getRawValue(D[1]);
o && (M = $T(a, p, I, E, T.t));
}
i.lastFrameIndex = D[0];
} else {
var P = t === 1 || i.lastFrameIndex > 0 ? D[0] : 0, L = U1(h, P);
o && (M = c.getRawValue(P)), u.attr({
x: L[0] + w,
y: L[1] + x
});
}
o && Vo(u).setLabelText(M);
}
}, e.prototype._doUpdateAnimation = function(t, n, a, i, o, s, l) {
var u = this._polyline, f = this._polygon, h = t.hostModel, c = c5(this._data, t, this._stackedOnPoints, n, this._coordSys, a, this._valueOrigin), v = c.current, p = c.stackedOnCurrent, d = c.next, g = c.stackedOnNext;
if (o && (v = Bn(c.current, a, o, l), p = Bn(c.stackedOnCurrent, a, o, l), d = Bn(c.next, a, o, l), g = Bn(c.stackedOnNext, a, o, l)), $1(v, d) > 3e3 || f && $1(p, g) > 3e3) {
u.stopAnimation(), u.setShape({
points: d
}), f && (f.stopAnimation(), f.setShape({
points: d,
stackedOnPoints: g
}));
return;
}
u.shape.__points = c.current, u.shape.points = v;
var y = {
shape: {
points: d
}
};
c.current !== v && (y.shape.__points = c.next), u.stopAnimation(), bt(u, y, h), f && (f.setShape({
points: v,
stackedOnPoints: p
}), f.stopAnimation(), bt(f, {
shape: {
stackedOnPoints: g
}
}, h), u.shape.points !== f.shape.points && (f.shape.points = u.shape.points));
for (var m = [], _ = c.status, S = 0; S < _.length; S++) {
var w = _[S].cmd;
if (w === "=") {
var x = t.getItemGraphicEl(_[S].idx1);
x && m.push({
el: x,
ptIdx: S
});
}
}
u.animators && u.animators.length && u.animators[0].during(function() {
f && f.dirtyShape();
for (var b = u.shape.__points, T = 0; T < m.length; T++) {
var D = m[T].el, A = m[T].ptIdx * 2;
D.x = b[A], D.y = b[A + 1], D.markRedraw();
}
});
}, e.prototype.remove = function(t) {
var n = this.group, a = this._data;
this._lineGroup.removeAll(), this._symbolDraw.remove(!0), a && a.eachItemGraphicEl(function(i, o) {
i.__temp && (n.remove(i), a.setItemGraphicEl(o, null));
}), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;
}, e.type = "line", e;
}(Ot);
const C5 = T5;
function Fl(r, e) {
return {
seriesType: r,
plan: Wo(),
reset: function(t) {
var n = t.getData(), a = t.coordinateSystem, i = t.pipelineContext, o = e || i.large;
if (!!a) {
var s = G(a.dimensions, function(v) {
return n.mapDimension(v);
}).slice(0, 2), l = s.length, u = n.getCalculationInfo("stackResultDimension");
sa(n, s[0]) && (s[0] = u), sa(n, s[1]) && (s[1] = u);
var f = n.getStore(), h = n.getDimensionIndex(s[0]), c = n.getDimensionIndex(s[1]);
return l && {
progress: function(v, p) {
for (var d = v.end - v.start, g = o && Wr(d * l), y = [], m = [], _ = v.start, S = 0; _ < v.end; _++) {
var w = void 0;
if (l === 1) {
var x = f.get(h, _);
w = a.dataToPoint(x, null, m);
} else
y[0] = f.get(h, _), y[1] = f.get(c, _), w = a.dataToPoint(y, null, m);
o ? (g[S++] = w[0], g[S++] = w[1]) : p.setItemLayout(_, w.slice());
}
o && p.setLayout("points", g);
}
};
}
}
};
}
var D5 = {
average: function(r) {
for (var e = 0, t = 0, n = 0; n < r.length; n++)
isNaN(r[n]) || (e += r[n], t++);
return t === 0 ? NaN : e / t;
},
sum: function(r) {
for (var e = 0, t = 0; t < r.length; t++)
e += r[t] || 0;
return e;
},
max: function(r) {
for (var e = -1 / 0, t = 0; t < r.length; t++)
r[t] > e && (e = r[t]);
return isFinite(e) ? e : NaN;
},
min: function(r) {
for (var e = 1 / 0, t = 0; t < r.length; t++)
r[t] < e && (e = r[t]);
return isFinite(e) ? e : NaN;
},
nearest: function(r) {
return r[0];
}
}, A5 = function(r) {
return Math.round(r.length / 2);
};
function bM(r) {
return {
seriesType: r,
reset: function(e, t, n) {
var a = e.getData(), i = e.get("sampling"), o = e.coordinateSystem, s = a.count();
if (s > 10 && o.type === "cartesian2d" && i) {
var l = o.getBaseAxis(), u = o.getOtherAxis(l), f = l.getExtent(), h = n.getDevicePixelRatio(), c = Math.abs(f[1] - f[0]) * (h || 1), v = Math.round(s / c);
if (isFinite(v) && v > 1) {
i === "lttb" && e.setData(a.lttbDownSample(a.mapDimension(u.dim), 1 / v));
var p = void 0;
W(i) ? p = D5[i] : q(i) && (p = i), p && e.setData(a.downSample(a.mapDimension(u.dim), 1 / v, p, A5));
}
}
}
};
}
function M5(r) {
r.registerChartView(C5), r.registerSeriesModel(o5), r.registerLayout(Fl("line", !0)), r.registerVisual({
seriesType: "line",
reset: function(e) {
var t = e.getData(), n = e.getModel("lineStyle").getLineStyle();
n && !n.stroke && (n.stroke = t.getVisual("style").fill), t.setVisual("legendLineStyle", n);
}
}), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, bM("line"));
}
var TM = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.getInitialData = function(t, n) {
return An(null, this, {
useEncodeDefaulter: !0
});
}, e.prototype.getMarkerPosition = function(t) {
var n = this.coordinateSystem;
if (n && n.clampData) {
var a = n.dataToPoint(n.clampData(t)), i = this.getData(), o = i.getLayout("offset"), s = i.getLayout("size"), l = n.getBaseAxis().isHorizontal() ? 0 : 1;
return a[l] += o + s / 2, a;
}
return [NaN, NaN];
}, e.type = "series.__base_bar__", e.defaultOption = {
z: 2,
coordinateSystem: "cartesian2d",
legendHoverLink: !0,
barMinHeight: 0,
barMinAngle: 0,
large: !1,
largeThreshold: 400,
progressive: 3e3,
progressiveChunkMode: "mod"
}, e;
}(Gt);
Gt.registerClass(TM);
const Kf = TM;
var L5 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.getInitialData = function() {
return An(null, this, {
useEncodeDefaulter: !0,
createInvertedIndices: !!this.get("realtimeSort", !0) || null
});
}, e.prototype.getProgressive = function() {
return this.get("large") ? this.get("progressive") : !1;
}, e.prototype.getProgressiveThreshold = function() {
var t = this.get("progressiveThreshold"), n = this.get("largeThreshold");
return n > t && (t = n), t;
}, e.prototype.brushSelector = function(t, n, a) {
return a.rect(n.getItemLayout(t));
}, e.type = "series.bar", e.dependencies = ["grid", "polar"], e.defaultOption = va(Kf.defaultOption, {
clip: !0,
roundCap: !1,
showBackground: !1,
backgroundStyle: {
color: "rgba(180, 180, 180, 0.2)",
borderColor: null,
borderWidth: 0,
borderType: "solid",
borderRadius: 0,
shadowBlur: 0,
shadowColor: null,
shadowOffsetX: 0,
shadowOffsetY: 0,
opacity: 1
},
select: {
itemStyle: {
borderColor: "#212121"
}
},
realtimeSort: !1
}), e;
}(Kf);
const I5 = L5;
var E5 = function() {
function r() {
this.cx = 0, this.cy = 0, this.r0 = 0, this.r = 0, this.startAngle = 0, this.endAngle = Math.PI * 2, this.clockwise = !0;
}
return r;
}(), P5 = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "sausage", n;
}
return e.prototype.getDefaultShape = function() {
return new E5();
}, e.prototype.buildPath = function(t, n) {
var a = n.cx, i = n.cy, o = Math.max(n.r0 || 0, 0), s = Math.max(n.r, 0), l = (s - o) * 0.5, u = o + l, f = n.startAngle, h = n.endAngle, c = n.clockwise, v = Math.PI * 2, p = c ? h - f < v : f - h < v;
p || (f = h - (c ? v : -v));
var d = Math.cos(f), g = Math.sin(f), y = Math.cos(h), m = Math.sin(h);
p ? (t.moveTo(d * o + a, g * o + i), t.arc(d * u + a, g * u + i, l, -Math.PI + f, f, !c)) : t.moveTo(d * s + a, g * s + i), t.arc(a, i, s, f, h, !c), t.arc(y * u + a, m * u + i, l, h - Math.PI * 2, h - Math.PI, !c), o !== 0 && t.arc(a, i, o, h, f, c);
}, e;
}(gt);
const jf = P5;
function N5(r, e) {
e = e || {};
var t = e.isRoundCap;
return function(n, a, i) {
var o = a.position;
if (!o || o instanceof Array)
return Df(n, a, i);
var s = r(o), l = a.distance != null ? a.distance : 5, u = this.shape, f = u.cx, h = u.cy, c = u.r, v = u.r0, p = (c + v) / 2, d = u.startAngle, g = u.endAngle, y = (d + g) / 2, m = t ? Math.abs(c - v) / 2 : 0, _ = Math.cos, S = Math.sin, w = f + c * _(d), x = h + c * S(d), b = "left", T = "top";
switch (s) {
case "startArc":
w = f + (v - l) * _(y), x = h + (v - l) * S(y), b = "center", T = "top";
break;
case "insideStartArc":
w = f + (v + l) * _(y), x = h + (v + l) * S(y), b = "center", T = "bottom";
break;
case "startAngle":
w = f + p * _(d) + Lu(d, l + m, !1), x = h + p * S(d) + Iu(d, l + m, !1), b = "right", T = "middle";
break;
case "insideStartAngle":
w = f + p * _(d) + Lu(d, -l + m, !1), x = h + p * S(d) + Iu(d, -l + m, !1), b = "left", T = "middle";
break;
case "middle":
w = f + p * _(y), x = h + p * S(y), b = "center", T = "middle";
break;
case "endArc":
w = f + (c + l) * _(y), x = h + (c + l) * S(y), b = "center", T = "bottom";
break;
case "insideEndArc":
w = f + (c - l) * _(y), x = h + (c - l) * S(y), b = "center", T = "top";
break;
case "endAngle":
w = f + p * _(g) + Lu(g, l + m, !0), x = h + p * S(g) + Iu(g, l + m, !0), b = "left", T = "middle";
break;
case "insideEndAngle":
w = f + p * _(g) + Lu(g, -l + m, !0), x = h + p * S(g) + Iu(g, -l + m, !0), b = "right", T = "middle";
break;
default:
return Df(n, a, i);
}
return n = n || {}, n.x = w, n.y = x, n.align = b, n.verticalAlign = T, n;
};
}
function R5(r, e, t, n) {
if (wt(n)) {
r.setTextConfig({
rotation: n
});
return;
} else if (z(e)) {
r.setTextConfig({
rotation: 0
});
return;
}
var a = r.shape, i = a.clockwise ? a.startAngle : a.endAngle, o = a.clockwise ? a.endAngle : a.startAngle, s = (i + o) / 2, l, u = t(e);
switch (u) {
case "startArc":
case "insideStartArc":
case "middle":
case "insideEndArc":
case "endArc":
l = s;
break;
case "startAngle":
case "insideStartAngle":
l = i;
break;
case "endAngle":
case "insideEndAngle":
l = o;
break;
default:
r.setTextConfig({
rotation: 0
});
return;
}
var f = Math.PI * 1.5 - l;
u === "middle" && f > Math.PI / 2 && f < Math.PI * 1.5 && (f -= Math.PI), r.setTextConfig({
rotation: f
});
}
function Lu(r, e, t) {
return e * Math.sin(r) * (t ? -1 : 1);
}
function Iu(r, e, t) {
return e * Math.cos(r) * (t ? 1 : -1);
}
var Dv = Math.max, Av = Math.min;
function k5(r, e) {
var t = r.getArea && r.getArea();
if (Di(r, "cartesian2d")) {
var n = r.getBaseAxis();
if (n.type !== "category" || !n.onBand) {
var a = e.getLayout("bandWidth");
n.isHorizontal() ? (t.x -= a, t.width += a * 2) : (t.y -= a, t.height += a * 2);
}
}
return t;
}
var O5 = function(r) {
R(e, r);
function e() {
var t = r.call(this) || this;
return t.type = e.type, t._isFirstFrame = !0, t;
}
return e.prototype.render = function(t, n, a, i) {
this._model = t, this._removeOnRenderedListener(a), this._updateDrawMode(t);
var o = t.get("coordinateSystem");
o === "cartesian2d" || o === "polar" ? (this._progressiveEls = null, this._isLargeDraw ? this._renderLarge(t, n, a) : this._renderNormal(t, n, a, i)) : process.env.NODE_ENV !== "production" && _e("Only cartesian2d and polar supported for bar.");
}, e.prototype.incrementalPrepareRender = function(t) {
this._clear(), this._updateDrawMode(t), this._updateLargeClip(t);
}, e.prototype.incrementalRender = function(t, n) {
this._progressiveEls = [], this._incrementalRenderLarge(t, n);
}, e.prototype.eachRendered = function(t) {
ca(this._progressiveEls || this.group, t);
}, e.prototype._updateDrawMode = function(t) {
var n = t.pipelineContext.large;
(this._isLargeDraw == null || n !== this._isLargeDraw) && (this._isLargeDraw = n, this._clear());
}, e.prototype._renderNormal = function(t, n, a, i) {
var o = this.group, s = t.getData(), l = this._data, u = t.coordinateSystem, f = u.getBaseAxis(), h;
u.type === "cartesian2d" ? h = f.isHorizontal() : u.type === "polar" && (h = f.dim === "angle");
var c = t.isAnimationEnabled() ? t : null, v = V5(t, u);
v && this._enableRealtimeSort(v, s, a);
var p = t.get("clip", !0) || v, d = k5(u, s);
o.removeClipPath();
var g = t.get("roundCap", !0), y = t.get("showBackground", !0), m = t.getModel("backgroundStyle"), _ = m.get("borderRadius") || 0, S = [], w = this._backgroundEls, x = i && i.isInitSort, b = i && i.type === "changeAxisOrder";
function T(M) {
var L = Eu[u.type](s, M), I = W5(u, h, L);
return I.useStyle(m.getItemStyle()), u.type === "cartesian2d" && I.setShape("r", _), S[M] = I, I;
}
s.diff(l).add(function(M) {
var L = s.getItemModel(M), I = Eu[u.type](s, M, L);
if (y && T(M), !(!s.hasValue(M) || !K1[u.type](I))) {
var E = !1;
p && (E = Y1[u.type](d, I));
var P = Z1[u.type](t, s, M, I, h, c, f.model, !1, g);
v && (P.forceLabelAnimation = !0), j1(P, s, M, L, I, t, h, u.type === "polar"), x ? P.attr({
shape: I
}) : v ? X1(v, c, P, I, M, h, !1, !1) : Bt(P, {
shape: I
}, t, M), s.setItemGraphicEl(M, P), o.add(P), P.ignore = E;
}
}).update(function(M, L) {
var I = s.getItemModel(M), E = Eu[u.type](s, M, I);
if (y) {
var P = void 0;
w.length === 0 ? P = T(L) : (P = w[L], P.useStyle(m.getItemStyle()), u.type === "cartesian2d" && P.setShape("r", _), S[M] = P);
var N = Eu[u.type](s, M), O = DM(h, N, u);
bt(P, {
shape: O
}, c, M);
}
var k = l.getItemGraphicEl(L);
if (!s.hasValue(M) || !K1[u.type](E)) {
o.remove(k);
return;
}
var V = !1;
if (p && (V = Y1[u.type](d, E), V && o.remove(k)), k ? Lr(k) : k = Z1[u.type](t, s, M, E, h, c, f.model, !!k, g), v && (k.forceLabelAnimation = !0), b) {
var F = k.getTextContent();
if (F) {
var $ = Vo(F);
$.prevValue != null && ($.prevValue = $.value);
}
} else
j1(k, s, M, I, E, t, h, u.type === "polar");
x ? k.attr({
shape: E
}) : v ? X1(v, c, k, E, M, h, !0, b) : bt(k, {
shape: E
}, t, M, null), s.setItemGraphicEl(M, k), k.ignore = V, o.add(k);
}).remove(function(M) {
var L = l.getItemGraphicEl(M);
L && il(L, t, M);
}).execute();
var D = this._backgroundGroup || (this._backgroundGroup = new nt());
D.removeAll();
for (var A = 0; A < S.length; ++A)
D.add(S[A]);
o.add(D), this._backgroundEls = S, this._data = s;
}, e.prototype._renderLarge = function(t, n, a) {
this._clear(), Q1(t, this.group), this._updateLargeClip(t);
}, e.prototype._incrementalRenderLarge = function(t, n) {
this._removeBackground(), Q1(n, this.group, this._progressiveEls, !0);
}, e.prototype._updateLargeClip = function(t) {
var n = t.get("clip", !0) && Qh(t.coordinateSystem, !1, t), a = this.group;
n ? a.setClipPath(n) : a.removeClipPath();
}, e.prototype._enableRealtimeSort = function(t, n, a) {
var i = this;
if (!!n.count()) {
var o = t.baseAxis;
if (this._isFirstFrame)
this._dispatchInitSort(n, t, a), this._isFirstFrame = !1;
else {
var s = function(l) {
var u = n.getItemGraphicEl(l), f = u && u.shape;
return f && Math.abs(o.isHorizontal() ? f.height : f.width) || 0;
};
this._onRendered = function() {
i._updateSortWithinSameData(n, s, o, a);
}, a.getZr().on("rendered", this._onRendered);
}
}
}, e.prototype._dataSort = function(t, n, a) {
var i = [];
return t.each(t.mapDimension(n.dim), function(o, s) {
var l = a(s);
l = l == null ? NaN : l, i.push({
dataIndex: s,
mappedValue: l,
ordinalNumber: o
});
}), i.sort(function(o, s) {
return s.mappedValue - o.mappedValue;
}), {
ordinalNumbers: G(i, function(o) {
return o.ordinalNumber;
})
};
}, e.prototype._isOrderChangedWithinSameData = function(t, n, a) {
for (var i = a.scale, o = t.mapDimension(a.dim), s = Number.MAX_VALUE, l = 0, u = i.getOrdinalMeta().categories.length; l < u; ++l) {
var f = t.rawIndexOf(o, i.getRawOrdinalNumber(l)), h = f < 0 ? Number.MIN_VALUE : n(t.indexOfRawIndex(f));
if (h > s)
return !0;
s = h;
}
return !1;
}, e.prototype._isOrderDifferentInView = function(t, n) {
for (var a = n.scale, i = a.getExtent(), o = Math.max(0, i[0]), s = Math.min(i[1], a.getOrdinalMeta().categories.length - 1); o <= s; ++o)
if (t.ordinalNumbers[o] !== a.getRawOrdinalNumber(o))
return !0;
}, e.prototype._updateSortWithinSameData = function(t, n, a, i) {
if (!!this._isOrderChangedWithinSameData(t, n, a)) {
var o = this._dataSort(t, a, n);
this._isOrderDifferentInView(o, a) && (this._removeOnRenderedListener(i), i.dispatchAction({
type: "changeAxisOrder",
componentType: a.dim + "Axis",
axisId: a.index,
sortInfo: o
}));
}
}, e.prototype._dispatchInitSort = function(t, n, a) {
var i = n.baseAxis, o = this._dataSort(t, i, function(s) {
return t.get(t.mapDimension(n.otherAxis.dim), s);
});
a.dispatchAction({
type: "changeAxisOrder",
componentType: i.dim + "Axis",
isInitSort: !0,
axisId: i.index,
sortInfo: o
});
}, e.prototype.remove = function(t, n) {
this._clear(this._model), this._removeOnRenderedListener(n);
}, e.prototype.dispose = function(t, n) {
this._removeOnRenderedListener(n);
}, e.prototype._removeOnRenderedListener = function(t) {
this._onRendered && (t.getZr().off("rendered", this._onRendered), this._onRendered = null);
}, e.prototype._clear = function(t) {
var n = this.group, a = this._data;
t && t.isAnimationEnabled() && a && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], a.eachItemGraphicEl(function(i) {
il(i, t, at(i).dataIndex);
})) : n.removeAll(), this._data = null, this._isFirstFrame = !0;
}, e.prototype._removeBackground = function() {
this.group.remove(this._backgroundGroup), this._backgroundGroup = null;
}, e.type = "bar", e;
}(Ot), Y1 = {
cartesian2d: function(r, e) {
var t = e.width < 0 ? -1 : 1, n = e.height < 0 ? -1 : 1;
t < 0 && (e.x += e.width, e.width = -e.width), n < 0 && (e.y += e.height, e.height = -e.height);
var a = r.x + r.width, i = r.y + r.height, o = Dv(e.x, r.x), s = Av(e.x + e.width, a), l = Dv(e.y, r.y), u = Av(e.y + e.height, i), f = s < o, h = u < l;
return e.x = f && o > a ? s : o, e.y = h && l > i ? u : l, e.width = f ? 0 : s - o, e.height = h ? 0 : u - l, t < 0 && (e.x += e.width, e.width = -e.width), n < 0 && (e.y += e.height, e.height = -e.height), f || h;
},
polar: function(r, e) {
var t = e.r0 <= e.r ? 1 : -1;
if (t < 0) {
var n = e.r;
e.r = e.r0, e.r0 = n;
}
var a = Av(e.r, r.r), i = Dv(e.r0, r.r0);
e.r = a, e.r0 = i;
var o = a - i < 0;
if (t < 0) {
var n = e.r;
e.r = e.r0, e.r0 = n;
}
return o;
}
}, Z1 = {
cartesian2d: function(r, e, t, n, a, i, o, s, l) {
var u = new xt({
shape: B({}, n),
z2: 1
});
if (u.__dataIndex = t, u.name = "item", i) {
var f = u.shape, h = a ? "height" : "width";
f[h] = 0;
}
return u;
},
polar: function(r, e, t, n, a, i, o, s, l) {
var u = !a && l ? jf : Ve, f = new u({
shape: n,
z2: 1
});
f.name = "item";
var h = CM(a);
if (f.calculateTextPosition = N5(h, {
isRoundCap: u === jf
}), i) {
var c = f.shape, v = a ? "r" : "endAngle", p = {};
c[v] = a ? 0 : n.startAngle, p[v] = n[v], (s ? bt : Bt)(f, {
shape: p
}, i);
}
return f;
}
};
function V5(r, e) {
var t = r.get("realtimeSort", !0), n = e.getBaseAxis();
if (process.env.NODE_ENV !== "production" && t && (n.type !== "category" && _e("`realtimeSort` will not work because this bar series is not based on a category axis."), e.type !== "cartesian2d" && _e("`realtimeSort` will not work because this bar series is not on cartesian2d.")), t && n.type === "category" && e.type === "cartesian2d")
return {
baseAxis: n,
otherAxis: e.getOtherAxis(n)
};
}
function X1(r, e, t, n, a, i, o, s) {
var l, u;
i ? (u = {
x: n.x,
width: n.width
}, l = {
y: n.y,
height: n.height
}) : (u = {
y: n.y,
height: n.height
}, l = {
x: n.x,
width: n.width
}), s || (o ? bt : Bt)(t, {
shape: l
}, e, a, null);
var f = e ? r.baseAxis.model : null;
(o ? bt : Bt)(t, {
shape: u
}, f, a);
}
function q1(r, e) {
for (var t = 0; t < e.length; t++)
if (!isFinite(r[e[t]]))
return !0;
return !1;
}
var B5 = ["x", "y", "width", "height"], z5 = ["cx", "cy", "r", "startAngle", "endAngle"], K1 = {
cartesian2d: function(r) {
return !q1(r, B5);
},
polar: function(r) {
return !q1(r, z5);
}
}, Eu = {
cartesian2d: function(r, e, t) {
var n = r.getItemLayout(e), a = t ? F5(t, n) : 0, i = n.width > 0 ? 1 : -1, o = n.height > 0 ? 1 : -1;
return {
x: n.x + i * a / 2,
y: n.y + o * a / 2,
width: n.width - i * a,
height: n.height - o * a
};
},
polar: function(r, e, t) {
var n = r.getItemLayout(e);
return {
cx: n.cx,
cy: n.cy,
r0: n.r0,
r: n.r,
startAngle: n.startAngle,
endAngle: n.endAngle,
clockwise: n.clockwise
};
}
};
function G5(r) {
return r.startAngle != null && r.endAngle != null && r.startAngle === r.endAngle;
}
function CM(r) {
return function(e) {
var t = e ? "Arc" : "Angle";
return function(n) {
switch (n) {
case "start":
case "insideStart":
case "end":
case "insideEnd":
return n + t;
default:
return n;
}
};
}(r);
}
function j1(r, e, t, n, a, i, o, s) {
var l = e.getItemVisual(t, "style");
s || r.setShape("r", n.get(["itemStyle", "borderRadius"]) || 0), r.useStyle(l);
var u = n.getShallow("cursor");
u && r.attr("cursor", u);
var f = s ? o ? a.r >= a.r0 ? "endArc" : "startArc" : a.endAngle >= a.startAngle ? "endAngle" : "startAngle" : o ? a.height >= 0 ? "bottom" : "top" : a.width >= 0 ? "right" : "left", h = se(n);
xe(r, h, {
labelFetcher: i,
labelDataIndex: t,
defaultText: Co(i.getData(), t),
inheritColor: l.fill,
defaultOpacity: l.opacity,
defaultOutsidePosition: f
});
var c = r.getTextContent();
if (s && c) {
var v = n.get(["label", "position"]);
r.textConfig.inside = v === "middle" ? !0 : null, R5(r, v === "outside" ? f : v, CM(o), n.get(["label", "rotate"]));
}
FC(c, h, i.getRawValue(t), function(d) {
return dM(e, d);
});
var p = n.getModel(["emphasis"]);
Ut(r, p.get("focus"), p.get("blurScope"), p.get("disabled")), ce(r, n), G5(a) && (r.style.fill = "none", r.style.stroke = "none", C(r.states, function(d) {
d.style && (d.style.fill = d.style.stroke = "none");
}));
}
function F5(r, e) {
var t = r.get(["itemStyle", "borderColor"]);
if (!t || t === "none")
return 0;
var n = r.get(["itemStyle", "borderWidth"]) || 0, a = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width), i = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
return Math.min(n, a, i);
}
var H5 = function() {
function r() {
}
return r;
}(), J1 = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "largeBar", n;
}
return e.prototype.getDefaultShape = function() {
return new H5();
}, e.prototype.buildPath = function(t, n) {
for (var a = n.points, i = this.baseDimIdx, o = 1 - this.baseDimIdx, s = [], l = [], u = this.barWidth, f = 0; f < a.length; f += 3)
l[i] = u, l[o] = a[f + 2], s[i] = a[f + i], s[o] = a[f + o], t.rect(s[0], s[1], l[0], l[1]);
}, e;
}(gt);
function Q1(r, e, t, n) {
var a = r.getData(), i = a.getLayout("valueAxisHorizontal") ? 1 : 0, o = a.getLayout("largeDataIndices"), s = a.getLayout("size"), l = r.getModel("backgroundStyle"), u = a.getLayout("largeBackgroundPoints");
if (u) {
var f = new J1({
shape: {
points: u
},
incremental: !!n,
silent: !0,
z2: 0
});
f.baseDimIdx = i, f.largeDataIndices = o, f.barWidth = s, f.useStyle(l.getItemStyle()), e.add(f), t && t.push(f);
}
var h = new J1({
shape: {
points: a.getLayout("largePoints")
},
incremental: !!n,
z2: 1
});
h.baseDimIdx = i, h.largeDataIndices = o, h.barWidth = s, e.add(h), h.useStyle(a.getVisual("style")), at(h).seriesIndex = r.seriesIndex, r.get("silent") || (h.on("mousedown", tS), h.on("mousemove", tS)), t && t.push(h);
}
var tS = yy(function(r) {
var e = this, t = $5(e, r.offsetX, r.offsetY);
at(e).dataIndex = t >= 0 ? t : null;
}, 30, !1);
function $5(r, e, t) {
for (var n = r.baseDimIdx, a = 1 - n, i = r.shape.points, o = r.largeDataIndices, s = [], l = [], u = r.barWidth, f = 0, h = i.length / 3; f < h; f++) {
var c = f * 3;
if (l[n] = u, l[a] = i[c + 2], s[n] = i[c + n], s[a] = i[c + a], l[a] < 0 && (s[a] += l[a], l[a] = -l[a]), e >= s[0] && e <= s[0] + l[0] && t >= s[1] && t <= s[1] + l[1])
return o[f];
}
return -1;
}
function DM(r, e, t) {
if (Di(t, "cartesian2d")) {
var n = e, a = t.getArea();
return {
x: r ? n.x : a.x,
y: r ? a.y : n.y,
width: r ? n.width : a.width,
height: r ? a.height : n.height
};
} else {
var a = t.getArea(), i = e;
return {
cx: a.cx,
cy: a.cy,
r0: r ? a.r0 : i.r0,
r: r ? a.r : i.r,
startAngle: r ? i.startAngle : 0,
endAngle: r ? i.endAngle : Math.PI * 2
};
}
}
function W5(r, e, t) {
var n = r.type === "polar" ? Ve : xt;
return new n({
shape: DM(e, t, r),
silent: !0,
z2: 0
});
}
const U5 = O5;
function Y5(r) {
r.registerChartView(U5), r.registerSeriesModel(I5), r.registerLayout(r.PRIORITY.VISUAL.LAYOUT, it(PA, "bar")), r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, NA("bar")), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, bM("bar")), r.registerAction({
type: "changeAxisOrder",
event: "changeAxisOrder",
update: "update"
}, function(e, t) {
var n = e.componentType || "series";
t.eachComponent({
mainType: n,
query: e
}, function(a) {
e.sortInfo && a.axis.setCategorySortInfo(e.sortInfo);
});
});
}
var Pu = Math.PI * 2, eS = Math.PI / 180;
function AM(r, e) {
return ee(r.getBoxLayoutParams(), {
width: e.getWidth(),
height: e.getHeight()
});
}
function MM(r, e) {
var t = AM(r, e), n = r.get("center"), a = r.get("radius");
z(a) || (a = [0, a]), z(n) || (n = [n, n]);
var i = H(t.width, e.getWidth()), o = H(t.height, e.getHeight()), s = Math.min(i, o), l = H(n[0], i) + t.x, u = H(n[1], o) + t.y, f = H(a[0], s / 2), h = H(a[1], s / 2);
return {
cx: l,
cy: u,
r0: f,
r: h
};
}
function Z5(r, e, t) {
e.eachSeriesByType(r, function(n) {
var a = n.getData(), i = a.mapDimension("value"), o = AM(n, t), s = MM(n, t), l = s.cx, u = s.cy, f = s.r, h = s.r0, c = -n.get("startAngle") * eS, v = n.get("minAngle") * eS, p = 0;
a.each(i, function(A) {
!isNaN(A) && p++;
});
var d = a.getSum(i), g = Math.PI / (d || p) * 2, y = n.get("clockwise"), m = n.get("roseType"), _ = n.get("stillShowZeroSum"), S = a.getDataExtent(i);
S[0] = 0;
var w = Pu, x = 0, b = c, T = y ? 1 : -1;
if (a.setLayout({
viewRect: o,
r: f
}), a.each(i, function(A, M) {
var L;
if (isNaN(A)) {
a.setItemLayout(M, {
angle: NaN,
startAngle: NaN,
endAngle: NaN,
clockwise: y,
cx: l,
cy: u,
r0: h,
r: m ? NaN : f
});
return;
}
m !== "area" ? L = d === 0 && _ ? g : A * g : L = Pu / p, L < v ? (L = v, w -= v) : x += A;
var I = b + T * L;
a.setItemLayout(M, {
angle: L,
startAngle: b,
endAngle: I,
clockwise: y,
cx: l,
cy: u,
r0: h,
r: m ? It(A, S, [h, f]) : f
}), b = I;
}), w < Pu && p)
if (w <= 1e-3) {
var D = Pu / p;
a.each(i, function(A, M) {
if (!isNaN(A)) {
var L = a.getItemLayout(M);
L.angle = D, L.startAngle = c + T * M * D, L.endAngle = c + T * (M + 1) * D;
}
});
} else
g = w / x, b = c, a.each(i, function(A, M) {
if (!isNaN(A)) {
var L = a.getItemLayout(M), I = L.angle === v ? v : A * g;
L.startAngle = b, L.endAngle = b + T * I, b += T * I;
}
});
});
}
function Hl(r) {
return {
seriesType: r,
reset: function(e, t) {
var n = t.findComponents({
mainType: "legend"
});
if (!(!n || !n.length)) {
var a = e.getData();
a.filterSelf(function(i) {
for (var o = a.getName(i), s = 0; s < n.length; s++)
if (!n[s].isSelected(o))
return !1;
return !0;
});
}
}
};
}
var X5 = Math.PI / 180;
function rS(r, e, t, n, a, i, o, s, l, u) {
if (r.length < 2)
return;
function f(d) {
for (var g = d.rB, y = g * g, m = 0; m < d.list.length; m++) {
var _ = d.list[m], S = Math.abs(_.label.y - t), w = n + _.len, x = w * w, b = Math.sqrt((1 - Math.abs(S * S / y)) * x), T = e + (b + _.len2) * a, D = T - _.label.x, A = _.targetTextWidth - D * a;
LM(_, A, !0), _.label.x = T;
}
}
function h(d) {
for (var g = {
list: [],
maxY: 0
}, y = {
list: [],
maxY: 0
}, m = 0; m < d.length; m++)
if (d[m].labelAlignTo === "none") {
var _ = d[m], S = _.label.y > t ? y : g, w = Math.abs(_.label.y - t);
if (w >= S.maxY) {
var x = _.label.x - e - _.len2 * a, b = n + _.len, T = Math.abs(x) < b ? Math.sqrt(w * w / (1 - x * x / b / b)) : b;
S.rB = T, S.maxY = w;
}
S.list.push(_);
}
f(g), f(y);
}
for (var c = r.length, v = 0; v < c; v++)
if (r[v].position === "outer" && r[v].labelAlignTo === "labelLine") {
var p = r[v].label.x - u;
r[v].linePoints[1][0] += p, r[v].label.x = u;
}
eM(r, l, l + o) && h(r);
}
function q5(r, e, t, n, a, i, o, s) {
for (var l = [], u = [], f = Number.MAX_VALUE, h = -Number.MAX_VALUE, c = 0; c < r.length; c++) {
var v = r[c].label;
Mv(r[c]) || (v.x < e ? (f = Math.min(f, v.x), l.push(r[c])) : (h = Math.max(h, v.x), u.push(r[c])));
}
for (var c = 0; c < r.length; c++) {
var p = r[c];
if (!Mv(p) && p.linePoints) {
if (p.labelStyleWidth != null)
continue;
var v = p.label, d = p.linePoints, g = void 0;
p.labelAlignTo === "edge" ? v.x < e ? g = d[2][0] - p.labelDistance - o - p.edgeDistance : g = o + a - p.edgeDistance - d[2][0] - p.labelDistance : p.labelAlignTo === "labelLine" ? v.x < e ? g = f - o - p.bleedMargin : g = o + a - h - p.bleedMargin : v.x < e ? g = v.x - o - p.bleedMargin : g = o + a - v.x - p.bleedMargin, p.targetTextWidth = g, LM(p, g);
}
}
rS(u, e, t, n, 1, a, i, o, s, h), rS(l, e, t, n, -1, a, i, o, s, f);
for (var c = 0; c < r.length; c++) {
var p = r[c];
if (!Mv(p) && p.linePoints) {
var v = p.label, d = p.linePoints, y = p.labelAlignTo === "edge", m = v.style.padding, _ = m ? m[1] + m[3] : 0, S = v.style.backgroundColor ? 0 : _, w = p.rect.width + S, x = d[1][0] - d[2][0];
y ? v.x < e ? d[2][0] = o + p.edgeDistance + w + p.labelDistance : d[2][0] = o + a - p.edgeDistance - w - p.labelDistance : (v.x < e ? d[2][0] = v.x + p.labelDistance : d[2][0] = v.x - p.labelDistance, d[1][0] = d[2][0] + x), d[1][1] = d[2][1] = v.y;
}
}
}
function LM(r, e, t) {
if (t === void 0 && (t = !1), r.labelStyleWidth == null) {
var n = r.label, a = n.style, i = r.rect, o = a.backgroundColor, s = a.padding, l = s ? s[1] + s[3] : 0, u = a.overflow, f = i.width + (o ? 0 : l);
if (e < f || t) {
var h = i.height;
if (u && u.match("break")) {
n.setStyle("backgroundColor", null), n.setStyle("width", e - l);
var c = n.getBoundingRect();
n.setStyle("width", Math.ceil(c.width)), n.setStyle("backgroundColor", o);
} else {
var v = e - l, p = e < f ? v : t ? v > r.unconstrainedWidth ? null : v : null;
n.setStyle("width", p);
}
var d = n.getBoundingRect();
i.width = d.width;
var g = (n.style.margin || 0) + 2.1;
i.height = d.height + g, i.y -= (i.height - h) / 2;
}
}
}
function Mv(r) {
return r.position === "center";
}
function K5(r) {
var e = r.getData(), t = [], n, a, i = !1, o = (r.get("minShowLabelAngle") || 0) * X5, s = e.getLayout("viewRect"), l = e.getLayout("r"), u = s.width, f = s.x, h = s.y, c = s.height;
function v(x) {
x.ignore = !0;
}
function p(x) {
if (!x.ignore)
return !0;
for (var b in x.states)
if (x.states[b].ignore === !1)
return !0;
return !1;
}
e.each(function(x) {
var b = e.getItemGraphicEl(x), T = b.shape, D = b.getTextContent(), A = b.getTextGuideLine(), M = e.getItemModel(x), L = M.getModel("label"), I = L.get("position") || M.get(["emphasis", "label", "position"]), E = L.get("distanceToLabelLine"), P = L.get("alignTo"), N = H(L.get("edgeDistance"), u), O = L.get("bleedMargin"), k = M.getModel("labelLine"), V = k.get("length");
V = H(V, u);
var F = k.get("length2");
if (F = H(F, u), Math.abs(T.endAngle - T.startAngle) < o) {
C(D.states, v), D.ignore = !0;
return;
}
if (!!p(D)) {
var $ = (T.startAngle + T.endAngle) / 2, Z = Math.cos($), et = Math.sin($), ht, Lt, At, dt;
n = T.cx, a = T.cy;
var rt = I === "inside" || I === "inner";
if (I === "center")
ht = T.cx, Lt = T.cy, dt = "center";
else {
var yt = (rt ? (T.r + T.r0) / 2 * Z : T.r * Z) + n, ut = (rt ? (T.r + T.r0) / 2 * et : T.r * et) + a;
if (ht = yt + Z * 3, Lt = ut + et * 3, !rt) {
var X = yt + Z * (V + l - T.r), ot = ut + et * (V + l - T.r), Vt = X + (Z < 0 ? -1 : 1) * F, St = ot;
P === "edge" ? ht = Z < 0 ? f + N : f + u - N : ht = Vt + (Z < 0 ? -E : E), Lt = St, At = [[yt, ut], [X, ot], [Vt, St]];
}
dt = rt ? "center" : P === "edge" ? Z > 0 ? "right" : "left" : Z > 0 ? "left" : "right";
}
var $t = Math.PI, Ft = 0, pe = L.get("rotate");
if (wt(pe))
Ft = pe * ($t / 180);
else if (I === "center")
Ft = 0;
else if (pe === "radial" || pe === !0) {
var rn = Z < 0 ? -$ + $t : -$;
Ft = rn;
} else if (pe === "tangential" && I !== "outside" && I !== "outer") {
var Ie = Math.atan2(Z, et);
Ie < 0 && (Ie = $t * 2 + Ie);
var Zl = et > 0;
Zl && (Ie = $t + Ie), Ft = Ie - $t;
}
if (i = !!Ft, D.x = ht, D.y = Lt, D.rotation = Ft, D.setStyle({
verticalAlign: "middle"
}), rt) {
D.setStyle({
align: dt
});
var sc = D.states.select;
sc && (sc.x += D.x, sc.y += D.y);
} else {
var In = D.getBoundingRect().clone();
In.applyTransform(D.getComputedTransform());
var Pm = (D.style.margin || 0) + 2.1;
In.y -= Pm / 2, In.height += Pm, t.push({
label: D,
labelLine: A,
position: I,
len: V,
len2: F,
minTurnAngle: k.get("minTurnAngle"),
maxSurfaceAngle: k.get("maxSurfaceAngle"),
surfaceNormal: new st(Z, et),
linePoints: At,
textAlign: dt,
labelDistance: E,
labelAlignTo: P,
edgeDistance: N,
bleedMargin: O,
rect: In,
unconstrainedWidth: In.width,
labelStyleWidth: D.style.width
});
}
b.setTextConfig({
inside: rt
});
}
}), !i && r.get("avoidLabelOverlap") && q5(t, n, a, l, u, c, f, h);
for (var d = 0; d < t.length; d++) {
var g = t[d], y = g.label, m = g.labelLine, _ = isNaN(y.x) || isNaN(y.y);
if (y) {
y.setStyle({
align: g.textAlign
}), _ && (C(y.states, v), y.ignore = !0);
var S = y.states.select;
S && (S.x += y.x, S.y += y.y);
}
if (m) {
var w = g.linePoints;
_ || !w ? (C(m.states, v), m.ignore = !0) : (JA(w, g.minTurnAngle), lz(w, g.surfaceNormal, g.maxSurfaceAngle), m.setShape({
points: w
}), y.__hostTarget.textGuideLineConfig = {
anchor: new st(w[0][0], w[0][1])
});
}
}
}
function lo(r, e, t) {
var n = r.get("borderRadius");
if (n == null)
return t ? {
cornerRadius: 0
} : null;
z(n) || (n = [n, n, n, n]);
var a = Math.abs(e.r || 0 - e.r0 || 0);
return {
cornerRadius: G(n, function(i) {
return Ar(i, a);
})
};
}
var j5 = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this) || this;
i.z2 = 2;
var o = new Ct();
return i.setTextContent(o), i.updateData(t, n, a, !0), i;
}
return e.prototype.updateData = function(t, n, a, i) {
var o = this, s = t.hostModel, l = t.getItemModel(n), u = l.getModel("emphasis"), f = t.getItemLayout(n), h = B(lo(l.getModel("itemStyle"), f, !0), f);
if (isNaN(h.startAngle)) {
o.setShape(h);
return;
}
if (i) {
o.setShape(h);
var c = s.getShallow("animationType");
s.ecModel.ssr ? (Bt(o, {
scaleX: 0,
scaleY: 0
}, s, {
dataIndex: n,
isFrom: !0
}), o.originX = h.cx, o.originY = h.cy) : c === "scale" ? (o.shape.r = f.r0, Bt(o, {
shape: {
r: f.r
}
}, s, n)) : a != null ? (o.setShape({
startAngle: a,
endAngle: a
}), Bt(o, {
shape: {
startAngle: f.startAngle,
endAngle: f.endAngle
}
}, s, n)) : (o.shape.endAngle = f.startAngle, bt(o, {
shape: {
endAngle: f.endAngle
}
}, s, n));
} else
Lr(o), bt(o, {
shape: h
}, s, n);
o.useStyle(t.getItemVisual(n, "style")), ce(o, l);
var v = (f.startAngle + f.endAngle) / 2, p = s.get("selectedOffset"), d = Math.cos(v) * p, g = Math.sin(v) * p, y = l.getShallow("cursor");
y && o.attr("cursor", y), this._updateLabel(s, t, n), o.ensureState("emphasis").shape = B({
r: f.r + (u.get("scale") && u.get("scaleSize") || 0)
}, lo(u.getModel("itemStyle"), f)), B(o.ensureState("select"), {
x: d,
y: g,
shape: lo(l.getModel(["select", "itemStyle"]), f)
}), B(o.ensureState("blur"), {
shape: lo(l.getModel(["blur", "itemStyle"]), f)
});
var m = o.getTextGuideLine(), _ = o.getTextContent();
m && B(m.ensureState("select"), {
x: d,
y: g
}), B(_.ensureState("select"), {
x: d,
y: g
}), Ut(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
}, e.prototype._updateLabel = function(t, n, a) {
var i = this, o = n.getItemModel(a), s = o.getModel("labelLine"), l = n.getItemVisual(a, "style"), u = l && l.fill, f = l && l.opacity;
xe(i, se(o), {
labelFetcher: n.hostModel,
labelDataIndex: a,
inheritColor: u,
defaultOpacity: f,
defaultText: t.getFormattedLabel(a, "normal") || n.getName(a)
});
var h = i.getTextContent();
i.setTextConfig({
position: null,
rotation: null
}), h.attr({
z2: 10
});
var c = t.get(["label", "position"]);
if (c !== "outside" && c !== "outer")
i.removeTextGuideLine();
else {
var v = this.getTextGuideLine();
v || (v = new ze(), this.setTextGuideLine(v)), Ey(this, Py(o), {
stroke: u,
opacity: Tr(s.get(["lineStyle", "opacity"]), f, 1)
});
}
}, e;
}(Ve), J5 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.ignoreLabelLineUpdate = !0, t;
}
return e.prototype.render = function(t, n, a, i) {
var o = t.getData(), s = this._data, l = this.group, u;
if (!s && o.count() > 0) {
for (var f = o.getItemLayout(0), h = 1; isNaN(f && f.startAngle) && h < o.count(); ++h)
f = o.getItemLayout(h);
f && (u = f.startAngle);
}
if (this._emptyCircleSector && l.remove(this._emptyCircleSector), o.count() === 0 && t.get("showEmptyCircle")) {
var c = new Ve({
shape: MM(t, a)
});
c.useStyle(t.getModel("emptyCircleStyle").getItemStyle()), this._emptyCircleSector = c, l.add(c);
}
o.diff(s).add(function(v) {
var p = new j5(o, v, u);
o.setItemGraphicEl(v, p), l.add(p);
}).update(function(v, p) {
var d = s.getItemGraphicEl(p);
d.updateData(o, v, u), d.off("click"), l.add(d), o.setItemGraphicEl(v, d);
}).remove(function(v) {
var p = s.getItemGraphicEl(v);
il(p, t, v);
}).execute(), K5(t), t.get("animationTypeUpdate") !== "expansion" && (this._data = o);
}, e.prototype.dispose = function() {
}, e.prototype.containPoint = function(t, n) {
var a = n.getData(), i = a.getItemLayout(0);
if (i) {
var o = t[0] - i.cx, s = t[1] - i.cy, l = Math.sqrt(o * o + s * s);
return l <= i.r && l >= i.r0;
}
}, e.type = "pie", e;
}(Ot);
const Q5 = J5;
function Zo(r, e, t) {
e = z(e) && {
coordDimensions: e
} || B({
encodeDefine: r.getEncode()
}, e);
var n = r.getSource(), a = Ol(n, e).dimensions, i = new Ae(a, r);
return i.initData(n, t), i;
}
var tG = function() {
function r(e, t) {
this._getDataWithEncodedVisual = e, this._getRawData = t;
}
return r.prototype.getAllNames = function() {
var e = this._getRawData();
return e.mapArray(e.getName);
}, r.prototype.containName = function(e) {
var t = this._getRawData();
return t.indexOfName(e) >= 0;
}, r.prototype.indexOfName = function(e) {
var t = this._getDataWithEncodedVisual();
return t.indexOfName(e);
}, r.prototype.getItemVisual = function(e, t) {
var n = this._getDataWithEncodedVisual();
return n.getItemVisual(e, t);
}, r;
}();
const $l = tG;
var eG = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.init = function(t) {
r.prototype.init.apply(this, arguments), this.legendVisualProvider = new $l(Y(this.getData, this), Y(this.getRawData, this)), this._defaultLabelLine(t);
}, e.prototype.mergeOption = function() {
r.prototype.mergeOption.apply(this, arguments);
}, e.prototype.getInitialData = function() {
return Zo(this, {
coordDimensions: ["value"],
encodeDefaulter: it(sy, this)
});
}, e.prototype.getDataParams = function(t) {
var n = this.getData(), a = r.prototype.getDataParams.call(this, t), i = [];
return n.each(n.mapDimension("value"), function(o) {
i.push(o);
}), a.percent = iP(i, t, n.hostModel.get("percentPrecision")), a.$vars.push("percent"), a;
}, e.prototype._defaultLabelLine = function(t) {
pi(t, "labelLine", ["show"]);
var n = t.labelLine, a = t.emphasis.labelLine;
n.show = n.show && t.label.show, a.show = a.show && t.emphasis.label.show;
}, e.type = "series.pie", e.defaultOption = {
z: 2,
legendHoverLink: !0,
colorBy: "data",
center: ["50%", "50%"],
radius: [0, "75%"],
clockwise: !0,
startAngle: 90,
minAngle: 0,
minShowLabelAngle: 0,
selectedOffset: 10,
percentPrecision: 2,
stillShowZeroSum: !0,
left: 0,
top: 0,
right: 0,
bottom: 0,
width: null,
height: null,
label: {
rotate: 0,
show: !0,
overflow: "truncate",
position: "outer",
alignTo: "none",
edgeDistance: "25%",
bleedMargin: 10,
distanceToLabelLine: 5
},
labelLine: {
show: !0,
length: 15,
length2: 15,
smooth: !1,
minTurnAngle: 90,
maxSurfaceAngle: 90,
lineStyle: {
width: 1,
type: "solid"
}
},
itemStyle: {
borderWidth: 1,
borderJoin: "round"
},
showEmptyCircle: !0,
emptyCircleStyle: {
color: "lightgray",
opacity: 1
},
labelLayout: {
hideOverlap: !0
},
emphasis: {
scale: !0,
scaleSize: 5
},
avoidLabelOverlap: !0,
animationType: "expansion",
animationDuration: 1e3,
animationTypeUpdate: "transition",
animationEasingUpdate: "cubicInOut",
animationDurationUpdate: 500,
animationEasing: "cubicInOut"
}, e;
}(Gt);
const rG = eG;
function nG(r) {
return {
seriesType: r,
reset: function(e, t) {
var n = e.getData();
n.filterSelf(function(a) {
var i = n.mapDimension("value"), o = n.get(i, a);
return !(wt(o) && !isNaN(o) && o < 0);
});
}
};
}
function aG(r) {
r.registerChartView(Q5), r.registerSeriesModel(rG), XD("pie", r.registerAction), r.registerLayout(it(Z5, "pie")), r.registerProcessor(Hl("pie")), r.registerProcessor(nG("pie"));
}
var iG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.hasSymbolVisual = !0, t;
}
return e.prototype.getInitialData = function(t, n) {
return An(null, this, {
useEncodeDefaulter: !0
});
}, e.prototype.getProgressive = function() {
var t = this.option.progressive;
return t == null ? this.option.large ? 5e3 : this.get("progressive") : t;
}, e.prototype.getProgressiveThreshold = function() {
var t = this.option.progressiveThreshold;
return t == null ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t;
}, e.prototype.brushSelector = function(t, n, a) {
return a.point(n.getItemLayout(t));
}, e.prototype.getZLevelKey = function() {
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
}, e.type = "series.scatter", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
coordinateSystem: "cartesian2d",
z: 2,
legendHoverLink: !0,
symbolSize: 10,
large: !1,
largeThreshold: 2e3,
itemStyle: {
opacity: 0.8
},
emphasis: {
scale: !0
},
clip: !0,
select: {
itemStyle: {
borderColor: "#212121"
}
},
universalTransition: {
divideShape: "clone"
}
}, e;
}(Gt);
const oG = iG;
var IM = 4, sG = function() {
function r() {
}
return r;
}(), lG = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n._off = 0, n.hoverDataIdx = -1, n;
}
return e.prototype.getDefaultShape = function() {
return new sG();
}, e.prototype.reset = function() {
this.notClear = !1, this._off = 0;
}, e.prototype.buildPath = function(t, n) {
var a = n.points, i = n.size, o = this.symbolProxy, s = o.shape, l = t.getContext ? t.getContext() : t, u = l && i[0] < IM, f = this.softClipShape, h;
if (u) {
this._ctx = l;
return;
}
for (this._ctx = null, h = this._off; h < a.length; ) {
var c = a[h++], v = a[h++];
isNaN(c) || isNaN(v) || f && !f.contain(c, v) || (s.x = c - i[0] / 2, s.y = v - i[1] / 2, s.width = i[0], s.height = i[1], o.buildPath(t, s, !0));
}
this.incremental && (this._off = h, this.notClear = !0);
}, e.prototype.afterBrush = function() {
var t = this.shape, n = t.points, a = t.size, i = this._ctx, o = this.softClipShape, s;
if (!!i) {
for (s = this._off; s < n.length; ) {
var l = n[s++], u = n[s++];
isNaN(l) || isNaN(u) || o && !o.contain(l, u) || i.fillRect(l - a[0] / 2, u - a[1] / 2, a[0], a[1]);
}
this.incremental && (this._off = s, this.notClear = !0);
}
}, e.prototype.findDataIndex = function(t, n) {
for (var a = this.shape, i = a.points, o = a.size, s = Math.max(o[0], 4), l = Math.max(o[1], 4), u = i.length / 2 - 1; u >= 0; u--) {
var f = u * 2, h = i[f] - s / 2, c = i[f + 1] - l / 2;
if (t >= h && n >= c && t <= h + s && n <= c + l)
return u;
}
return -1;
}, e.prototype.contain = function(t, n) {
var a = this.transformCoordToLocal(t, n), i = this.getBoundingRect();
if (t = a[0], n = a[1], i.contain(t, n)) {
var o = this.hoverDataIdx = this.findDataIndex(t, n);
return o >= 0;
}
return this.hoverDataIdx = -1, !1;
}, e.prototype.getBoundingRect = function() {
var t = this._rect;
if (!t) {
for (var n = this.shape, a = n.points, i = n.size, o = i[0], s = i[1], l = 1 / 0, u = 1 / 0, f = -1 / 0, h = -1 / 0, c = 0; c < a.length; ) {
var v = a[c++], p = a[c++];
l = Math.min(v, l), f = Math.max(v, f), u = Math.min(p, u), h = Math.max(p, h);
}
t = this._rect = new ft(l - o / 2, u - s / 2, f - l + o, h - u + s);
}
return t;
}, e;
}(gt), uG = function() {
function r() {
this.group = new nt();
}
return r.prototype.updateData = function(e, t) {
this._clear();
var n = this._create();
n.setShape({
points: e.getLayout("points")
}), this._setCommon(n, e, t);
}, r.prototype.updateLayout = function(e) {
var t = e.getLayout("points");
this.group.eachChild(function(n) {
if (n.startIndex != null) {
var a = (n.endIndex - n.startIndex) * 2, i = n.startIndex * 4 * 2;
t = new Float32Array(t.buffer, i, a);
}
n.setShape("points", t), n.reset();
});
}, r.prototype.incrementalPrepareUpdate = function(e) {
this._clear();
}, r.prototype.incrementalUpdate = function(e, t, n) {
var a = this._newAdded[0], i = t.getLayout("points"), o = a && a.shape.points;
if (o && o.length < 2e4) {
var s = o.length, l = new Float32Array(s + i.length);
l.set(o), l.set(i, s), a.endIndex = e.end, a.setShape({
points: l
});
} else {
this._newAdded = [];
var u = this._create();
u.startIndex = e.start, u.endIndex = e.end, u.incremental = !0, u.setShape({
points: i
}), this._setCommon(u, t, n);
}
}, r.prototype.eachRendered = function(e) {
this._newAdded[0] && e(this._newAdded[0]);
}, r.prototype._create = function() {
var e = new lG({
cursor: "default"
});
return this.group.add(e), this._newAdded.push(e), e;
}, r.prototype._setCommon = function(e, t, n) {
var a = t.hostModel;
n = n || {};
var i = t.getVisual("symbolSize");
e.setShape("size", i instanceof Array ? i : [i, i]), e.softClipShape = n.clipShape || null, e.symbolProxy = Jt(t.getVisual("symbol"), 0, 0, 0, 0), e.setColor = e.symbolProxy.setColor;
var o = e.shape.size[0] < IM;
e.useStyle(
a.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"])
);
var s = t.getVisual("style"), l = s && s.fill;
l && e.setColor(l);
var u = at(e);
u.seriesIndex = a.seriesIndex, e.on("mousemove", function(f) {
u.dataIndex = null;
var h = e.hoverDataIdx;
h >= 0 && (u.dataIndex = h + (e.startIndex || 0));
});
}, r.prototype.remove = function() {
this._clear();
}, r.prototype._clear = function() {
this._newAdded = [], this.group.removeAll();
}, r;
}();
const fG = uG;
var hG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = t.getData(), o = this._updateSymbolDraw(i, t);
o.updateData(i, {
clipShape: this._getClipShape(t)
}), this._finished = !0;
}, e.prototype.incrementalPrepareRender = function(t, n, a) {
var i = t.getData(), o = this._updateSymbolDraw(i, t);
o.incrementalPrepareUpdate(i), this._finished = !1;
}, e.prototype.incrementalRender = function(t, n, a) {
this._symbolDraw.incrementalUpdate(t, n.getData(), {
clipShape: this._getClipShape(n)
}), this._finished = t.end === n.getData().count();
}, e.prototype.updateTransform = function(t, n, a) {
var i = t.getData();
if (this.group.dirty(), !this._finished || i.count() > 1e4)
return {
update: !0
};
var o = Fl("").reset(t, n, a);
o.progress && o.progress({
start: 0,
end: i.count(),
count: i.count()
}, i), this._symbolDraw.updateLayout(i);
}, e.prototype.eachRendered = function(t) {
this._symbolDraw && this._symbolDraw.eachRendered(t);
}, e.prototype._getClipShape = function(t) {
var n = t.coordinateSystem, a = n && n.getArea && n.getArea();
return t.get("clip", !0) ? a : null;
}, e.prototype._updateSymbolDraw = function(t, n) {
var a = this._symbolDraw, i = n.pipelineContext, o = i.large;
return (!a || o !== this._isLargeDraw) && (a && a.remove(), a = this._symbolDraw = o ? new fG() : new Gl(), this._isLargeDraw = o, this.group.removeAll()), this.group.add(a.group), a;
}, e.prototype.remove = function(t, n) {
this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null;
}, e.prototype.dispose = function() {
}, e.type = "scatter", e;
}(Ot);
const cG = hG;
var vG = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.type = "grid", e.dependencies = ["xAxis", "yAxis"], e.layoutMode = "box", e.defaultOption = {
show: !1,
z: 0,
left: "10%",
top: 60,
right: "10%",
bottom: 70,
containLabel: !1,
backgroundColor: "rgba(0,0,0,0)",
borderWidth: 1,
borderColor: "#ccc"
}, e;
}(_t);
const pG = vG;
var Wd = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.getCoordSysModel = function() {
return this.getReferringComponents("grid", Kt).models[0];
}, e.type = "cartesian2dAxis", e;
}(_t);
Qt(Wd, Bl);
var EM = {
show: !0,
z: 0,
inverse: !1,
name: "",
nameLocation: "end",
nameRotate: null,
nameTruncate: {
maxWidth: null,
ellipsis: "...",
placeholder: "."
},
nameTextStyle: {},
nameGap: 15,
silent: !1,
triggerEvent: !1,
tooltip: {
show: !1
},
axisPointer: {},
axisLine: {
show: !0,
onZero: !0,
onZeroAxisIndex: null,
lineStyle: {
color: "#6E7079",
width: 1,
type: "solid"
},
symbol: ["none", "none"],
symbolSize: [10, 15]
},
axisTick: {
show: !0,
inside: !1,
length: 5,
lineStyle: {
width: 1
}
},
axisLabel: {
show: !0,
inside: !1,
rotate: 0,
showMinLabel: null,
showMaxLabel: null,
margin: 8,
fontSize: 12
},
splitLine: {
show: !0,
lineStyle: {
color: ["#E0E6F1"],
width: 1,
type: "solid"
}
},
splitArea: {
show: !1,
areaStyle: {
color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
}
}
}, dG = lt({
boundaryGap: !0,
deduplication: null,
splitLine: {
show: !1
},
axisTick: {
alignWithLabel: !1,
interval: "auto"
},
axisLabel: {
interval: "auto"
}
}, EM), Vy = lt({
boundaryGap: [0, 0],
axisLine: {
show: "auto"
},
axisTick: {
show: "auto"
},
splitNumber: 5,
minorTick: {
show: !1,
splitNumber: 5,
length: 3,
lineStyle: {}
},
minorSplitLine: {
show: !1,
lineStyle: {
color: "#F4F7FD",
width: 1
}
}
}, EM), gG = lt({
splitNumber: 6,
axisLabel: {
showMinLabel: !1,
showMaxLabel: !1,
rich: {
primary: {
fontWeight: "bold"
}
}
},
splitLine: {
show: !1
}
}, Vy), yG = J({
logBase: 10
}, Vy);
const PM = {
category: dG,
value: Vy,
time: gG,
log: yG
};
var mG = {
value: 1,
category: 1,
time: 1,
log: 1
};
function Do(r, e, t, n) {
C(mG, function(a, i) {
var o = lt(lt({}, PM[i], !0), n, !0), s = function(l) {
R(u, l);
function u() {
var f = l !== null && l.apply(this, arguments) || this;
return f.type = e + "Axis." + i, f;
}
return u.prototype.mergeDefaultAndTheme = function(f, h) {
var c = ll(this), v = c ? Go(f) : {}, p = h.getTheme();
lt(f, p.get(i + "Axis")), lt(f, this.getDefaultOption()), f.type = nS(f), c && oa(f, v, c);
}, u.prototype.optionUpdated = function() {
var f = this.option;
f.type === "category" && (this.__ordinalMeta = Vd.createByAxisModel(this));
}, u.prototype.getCategories = function(f) {
var h = this.option;
if (h.type === "category")
return f ? h.data : this.__ordinalMeta.categories;
}, u.prototype.getOrdinalMeta = function() {
return this.__ordinalMeta;
}, u.type = e + "Axis." + i, u.defaultOption = o, u;
}(t);
r.registerComponentModel(s);
}), r.registerSubTypeDefaulter(e + "Axis", nS);
}
function nS(r) {
return r.type || (r.data ? "category" : "value");
}
var _G = function() {
function r(e) {
this.type = "cartesian", this._dimList = [], this._axes = {}, this.name = e || "";
}
return r.prototype.getAxis = function(e) {
return this._axes[e];
}, r.prototype.getAxes = function() {
return G(this._dimList, function(e) {
return this._axes[e];
}, this);
}, r.prototype.getAxesByScale = function(e) {
return e = e.toLowerCase(), Et(this.getAxes(), function(t) {
return t.scale.type === e;
});
}, r.prototype.addAxis = function(e) {
var t = e.dim;
this._axes[t] = e, this._dimList.push(t);
}, r;
}();
const SG = _G;
var Ud = ["x", "y"];
function aS(r) {
return r.type === "interval" || r.type === "time";
}
var xG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "cartesian2d", t.dimensions = Ud, t;
}
return e.prototype.calcAffineTransform = function() {
this._transform = this._invTransform = null;
var t = this.getAxis("x").scale, n = this.getAxis("y").scale;
if (!(!aS(t) || !aS(n))) {
var a = t.getExtent(), i = n.getExtent(), o = this.dataToPoint([a[0], i[0]]), s = this.dataToPoint([a[1], i[1]]), l = a[1] - a[0], u = i[1] - i[0];
if (!(!l || !u)) {
var f = (s[0] - o[0]) / l, h = (s[1] - o[1]) / u, c = o[0] - a[0] * f, v = o[1] - i[0] * h, p = this._transform = [f, 0, 0, h, c, v];
this._invTransform = Po([], p);
}
}
}, e.prototype.getBaseAxis = function() {
return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
}, e.prototype.containPoint = function(t) {
var n = this.getAxis("x"), a = this.getAxis("y");
return n.contain(n.toLocalCoord(t[0])) && a.contain(a.toLocalCoord(t[1]));
}, e.prototype.containData = function(t) {
return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1]);
}, e.prototype.containZone = function(t, n) {
var a = this.dataToPoint(t), i = this.dataToPoint(n), o = this.getArea(), s = new ft(a[0], a[1], i[0] - a[0], i[1] - a[1]);
return o.intersect(s);
}, e.prototype.dataToPoint = function(t, n, a) {
a = a || [];
var i = t[0], o = t[1];
if (this._transform && i != null && isFinite(i) && o != null && isFinite(o))
return ue(a, t, this._transform);
var s = this.getAxis("x"), l = this.getAxis("y");
return a[0] = s.toGlobalCoord(s.dataToCoord(i, n)), a[1] = l.toGlobalCoord(l.dataToCoord(o, n)), a;
}, e.prototype.clampData = function(t, n) {
var a = this.getAxis("x").scale, i = this.getAxis("y").scale, o = a.getExtent(), s = i.getExtent(), l = a.parse(t[0]), u = i.parse(t[1]);
return n = n || [], n[0] = Math.min(Math.max(Math.min(o[0], o[1]), l), Math.max(o[0], o[1])), n[1] = Math.min(Math.max(Math.min(s[0], s[1]), u), Math.max(s[0], s[1])), n;
}, e.prototype.pointToData = function(t, n) {
var a = [];
if (this._invTransform)
return ue(a, t, this._invTransform);
var i = this.getAxis("x"), o = this.getAxis("y");
return a[0] = i.coordToData(i.toLocalCoord(t[0]), n), a[1] = o.coordToData(o.toLocalCoord(t[1]), n), a;
}, e.prototype.getOtherAxis = function(t) {
return this.getAxis(t.dim === "x" ? "y" : "x");
}, e.prototype.getArea = function() {
var t = this.getAxis("x").getGlobalExtent(), n = this.getAxis("y").getGlobalExtent(), a = Math.min(t[0], t[1]), i = Math.min(n[0], n[1]), o = Math.max(t[0], t[1]) - a, s = Math.max(n[0], n[1]) - i;
return new ft(a, i, o, s);
}, e;
}(SG), wG = function(r) {
R(e, r);
function e(t, n, a, i, o) {
var s = r.call(this, t, n, a) || this;
return s.index = 0, s.type = i || "value", s.position = o || "bottom", s;
}
return e.prototype.isHorizontal = function() {
var t = this.position;
return t === "top" || t === "bottom";
}, e.prototype.getGlobalExtent = function(t) {
var n = this.getExtent();
return n[0] = this.toGlobalCoord(n[0]), n[1] = this.toGlobalCoord(n[1]), t && n[0] > n[1] && n.reverse(), n;
}, e.prototype.pointToData = function(t, n) {
return this.coordToData(this.toLocalCoord(t[this.dim === "x" ? 0 : 1]), n);
}, e.prototype.setCategorySortInfo = function(t) {
if (this.type !== "category")
return !1;
this.model.option.categorySortInfo = t, this.scale.setSortInfo(t);
}, e;
}(Er);
const bG = wG;
function Yd(r, e, t) {
t = t || {};
var n = r.coordinateSystem, a = e.axis, i = {}, o = a.getAxesOnZeroOf()[0], s = a.position, l = o ? "onZero" : s, u = a.dim, f = n.getRect(), h = [f.x, f.x + f.width, f.y, f.y + f.height], c = {
left: 0,
right: 1,
top: 0,
bottom: 1,
onZero: 2
}, v = e.get("offset") || 0, p = u === "x" ? [h[2] - v, h[3] + v] : [h[0] - v, h[1] + v];
if (o) {
var d = o.toGlobalCoord(o.dataToCoord(0));
p[c.onZero] = Math.max(Math.min(d, p[1]), p[0]);
}
i.position = [u === "y" ? p[c[l]] : h[0], u === "x" ? p[c[l]] : h[3]], i.rotation = Math.PI / 2 * (u === "x" ? 0 : 1);
var g = {
top: -1,
bottom: 1,
left: -1,
right: 1
};
i.labelDirection = i.tickDirection = i.nameDirection = g[s], i.labelOffset = o ? p[c[s]] - p[c.onZero] : 0, e.get(["axisTick", "inside"]) && (i.tickDirection = -i.tickDirection), qt(t.labelInside, e.get(["axisLabel", "inside"])) && (i.labelDirection = -i.labelDirection);
var y = e.get(["axisLabel", "rotate"]);
return i.labelRotate = l === "top" ? -y : y, i.z2 = 1, i;
}
function iS(r) {
return r.get("coordinateSystem") === "cartesian2d";
}
function oS(r) {
var e = {
xAxisModel: null,
yAxisModel: null
};
return C(e, function(t, n) {
var a = n.replace(/Model$/, ""), i = r.getReferringComponents(a, Kt).models[0];
if (process.env.NODE_ENV !== "production" && !i)
throw new Error(a + ' "' + Tr(r.get(a + "Index"), r.get(a + "Id"), 0) + '" not found');
e[n] = i;
}), e;
}
var Lv = Math.log;
function NM(r, e, t) {
var n = la.prototype, a = n.getTicks.call(t), i = n.getTicks.call(t, !0), o = a.length - 1, s = n.getInterval.call(t), l = GA(r, e), u = l.extent, f = l.fixMin, h = l.fixMax;
if (r.type === "log") {
var c = Lv(r.base);
u = [Lv(u[0]) / c, Lv(u[1]) / c];
}
r.setExtent(u[0], u[1]), r.calcNiceExtent({
splitNumber: o,
fixMin: f,
fixMax: h
});
var v = n.getExtent.call(r);
f && (u[0] = v[0]), h && (u[1] = v[1]);
var p = n.getInterval.call(r), d = u[0], g = u[1];
if (f && h)
p = (g - d) / o;
else if (f)
for (g = u[0] + p * o; g < u[1] && isFinite(g) && isFinite(u[1]); )
p = dv(p), g = u[0] + p * o;
else if (h)
for (d = u[1] - p * o; d > u[0] && isFinite(d) && isFinite(u[0]); )
p = dv(p), d = u[1] - p * o;
else {
var y = r.getTicks().length - 1;
y > o && (p = dv(p));
var m = p * o;
g = Math.ceil(u[1] / p) * p, d = Wt(g - m), d < 0 && u[0] >= 0 ? (d = 0, g = Wt(m)) : g > 0 && u[1] <= 0 && (g = 0, d = -Wt(m));
}
var _ = (a[0].value - i[0].value) / s, S = (a[o].value - i[o].value) / s;
if (n.setExtent.call(r, d + p * _, g + p * S), n.setInterval.call(r, p), (_ || S) && n.setNiceExtent.call(r, d + p, g - p), process.env.NODE_ENV !== "production") {
var w = n.getTicks.call(r);
w[1] && (!vB(p) || ld(w[1].value) > ld(p)) && _e(
"The ticks may be not readable when set min: " + e.get("min") + ", max: " + e.get("max") + " and alignTicks: true"
);
}
}
var TG = function() {
function r(e, t, n) {
this.type = "grid", this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this.axisPointerEnabled = !0, this.dimensions = Ud, this._initCartesian(e, t, n), this.model = e;
}
return r.prototype.getRect = function() {
return this._rect;
}, r.prototype.update = function(e, t) {
var n = this._axesMap;
this._updateScale(e, this.model);
function a(o) {
var s, l = mt(o), u = l.length;
if (!!u) {
for (var f = [], h = u - 1; h >= 0; h--) {
var c = +l[h], v = o[c], p = v.model, d = v.scale;
Bd(d) && p.get("alignTicks") && p.get("interval") == null ? f.push(v) : (To(d, p), Bd(d) && (s = v));
}
f.length && (s || (s = f.pop(), To(s.scale, s.model)), C(f, function(g) {
NM(g.scale, g.model, s.scale);
}));
}
}
a(n.x), a(n.y);
var i = {};
C(n.x, function(o) {
sS(n, "y", o, i);
}), C(n.y, function(o) {
sS(n, "x", o, i);
}), this.resize(this.model, t);
}, r.prototype.resize = function(e, t, n) {
var a = e.getBoxLayoutParams(), i = !n && e.get("containLabel"), o = ee(a, {
width: t.getWidth(),
height: t.getHeight()
});
this._rect = o;
var s = this._axesList;
l(), i && (C(s, function(u) {
if (!u.model.get(["axisLabel", "inside"])) {
var f = BB(u);
if (f) {
var h = u.isHorizontal() ? "height" : "width", c = u.model.get(["axisLabel", "margin"]);
o[h] -= f[h] + c, u.position === "top" ? o.y += f.height + c : u.position === "left" && (o.x += f.width + c);
}
}
}), l()), C(this._coordsList, function(u) {
u.calcAffineTransform();
});
function l() {
C(s, function(u) {
var f = u.isHorizontal(), h = f ? [0, o.width] : [0, o.height], c = u.inverse ? 1 : 0;
u.setExtent(h[c], h[1 - c]), CG(u, f ? o.x : o.y);
});
}
}, r.prototype.getAxis = function(e, t) {
var n = this._axesMap[e];
if (n != null)
return n[t || 0];
}, r.prototype.getAxes = function() {
return this._axesList.slice();
}, r.prototype.getCartesian = function(e, t) {
if (e != null && t != null) {
var n = "x" + e + "y" + t;
return this._coordsMap[n];
}
j(e) && (t = e.yAxisIndex, e = e.xAxisIndex);
for (var a = 0, i = this._coordsList; a < i.length; a++)
if (i[a].getAxis("x").index === e || i[a].getAxis("y").index === t)
return i[a];
}, r.prototype.getCartesians = function() {
return this._coordsList.slice();
}, r.prototype.convertToPixel = function(e, t, n) {
var a = this._findConvertTarget(t);
return a.cartesian ? a.cartesian.dataToPoint(n) : a.axis ? a.axis.toGlobalCoord(a.axis.dataToCoord(n)) : null;
}, r.prototype.convertFromPixel = function(e, t, n) {
var a = this._findConvertTarget(t);
return a.cartesian ? a.cartesian.pointToData(n) : a.axis ? a.axis.coordToData(a.axis.toLocalCoord(n)) : null;
}, r.prototype._findConvertTarget = function(e) {
var t = e.seriesModel, n = e.xAxisModel || t && t.getReferringComponents("xAxis", Kt).models[0], a = e.yAxisModel || t && t.getReferringComponents("yAxis", Kt).models[0], i = e.gridModel, o = this._coordsList, s, l;
if (t)
s = t.coordinateSystem, ct(o, s) < 0 && (s = null);
else if (n && a)
s = this.getCartesian(n.componentIndex, a.componentIndex);
else if (n)
l = this.getAxis("x", n.componentIndex);
else if (a)
l = this.getAxis("y", a.componentIndex);
else if (i) {
var u = i.coordinateSystem;
u === this && (s = this._coordsList[0]);
}
return {
cartesian: s,
axis: l
};
}, r.prototype.containPoint = function(e) {
var t = this._coordsList[0];
if (t)
return t.containPoint(e);
}, r.prototype._initCartesian = function(e, t, n) {
var a = this, i = this, o = {
left: !1,
right: !1,
top: !1,
bottom: !1
}, s = {
x: {},
y: {}
}, l = {
x: 0,
y: 0
};
if (t.eachComponent("xAxis", u("x"), this), t.eachComponent("yAxis", u("y"), this), !l.x || !l.y) {
this._axesMap = {}, this._axesList = [];
return;
}
this._axesMap = s, C(s.x, function(f, h) {
C(s.y, function(c, v) {
var p = "x" + h + "y" + v, d = new xG(p);
d.master = a, d.model = e, a._coordsMap[p] = d, a._coordsList.push(d), d.addAxis(f), d.addAxis(c);
});
});
function u(f) {
return function(h, c) {
if (!!Iv(h, e)) {
var v = h.get("position");
f === "x" ? v !== "top" && v !== "bottom" && (v = o.bottom ? "top" : "bottom") : v !== "left" && v !== "right" && (v = o.left ? "right" : "left"), o[v] = !0;
var p = new bG(f, jh(h), [0, 0], h.get("type"), v), d = p.type === "category";
p.onBand = d && h.get("boundaryGap"), p.inverse = h.get("inverse"), h.axis = p, p.model = h, p.grid = i, p.index = c, i._axesList.push(p), s[f][c] = p, l[f]++;
}
};
}
}, r.prototype._updateScale = function(e, t) {
C(this._axesList, function(a) {
if (a.scale.setExtent(1 / 0, -1 / 0), a.type === "category") {
var i = a.model.get("categorySortInfo");
a.scale.setSortInfo(i);
}
}), e.eachSeries(function(a) {
if (iS(a)) {
var i = oS(a), o = i.xAxisModel, s = i.yAxisModel;
if (!Iv(o, t) || !Iv(s, t))
return;
var l = this.getCartesian(o.componentIndex, s.componentIndex), u = a.getData(), f = l.getAxis("x"), h = l.getAxis("y");
n(u, f), n(u, h);
}
}, this);
function n(a, i) {
C(Yf(a, i.dim), function(o) {
i.scale.unionExtentFromData(a, o);
});
}
}, r.prototype.getTooltipAxes = function(e) {
var t = [], n = [];
return C(this.getCartesians(), function(a) {
var i = e != null && e !== "auto" ? a.getAxis(e) : a.getBaseAxis(), o = a.getOtherAxis(i);
ct(t, i) < 0 && t.push(i), ct(n, o) < 0 && n.push(o);
}), {
baseAxes: t,
otherAxes: n
};
}, r.create = function(e, t) {
var n = [];
return e.eachComponent("grid", function(a, i) {
var o = new r(a, e, t);
o.name = "grid_" + i, o.resize(a, t, !0), a.coordinateSystem = o, n.push(o);
}), e.eachSeries(function(a) {
if (!!iS(a)) {
var i = oS(a), o = i.xAxisModel, s = i.yAxisModel, l = o.getCoordSysModel();
if (process.env.NODE_ENV !== "production") {
if (!l)
throw new Error('Grid "' + Tr(o.get("gridIndex"), o.get("gridId"), 0) + '" not found');
if (o.getCoordSysModel() !== s.getCoordSysModel())
throw new Error("xAxis and yAxis must use the same grid");
}
var u = l.coordinateSystem;
a.coordinateSystem = u.getCartesian(o.componentIndex, s.componentIndex);
}
}), n;
}, r.dimensions = Ud, r;
}();
function Iv(r, e) {
return r.getCoordSysModel() === e;
}
function sS(r, e, t, n) {
t.getAxesOnZeroOf = function() {
return i ? [i] : [];
};
var a = r[e], i, o = t.model, s = o.get(["axisLine", "onZero"]), l = o.get(["axisLine", "onZeroAxisIndex"]);
if (!s)
return;
if (l != null)
lS(a[l]) && (i = a[l]);
else
for (var u in a)
if (a.hasOwnProperty(u) && lS(a[u]) && !n[f(a[u])]) {
i = a[u];
break;
}
i && (n[f(i)] = !0);
function f(h) {
return h.dim + "_" + h.index;
}
}
function lS(r) {
return r && r.type !== "category" && r.type !== "time" && VB(r);
}
function CG(r, e) {
var t = r.getExtent(), n = t[0] + t[1];
r.toGlobalCoord = r.dim === "x" ? function(a) {
return a + e;
} : function(a) {
return n - a + e;
}, r.toLocalCoord = r.dim === "x" ? function(a) {
return a - e;
} : function(a) {
return n - a + e;
};
}
const DG = TG;
var Kn = Math.PI, hi = function() {
function r(e, t) {
this.group = new nt(), this.opt = t, this.axisModel = e, J(t, {
labelOffset: 0,
nameDirection: 1,
tickDirection: 1,
labelDirection: 1,
silent: !0,
handleAutoShown: function() {
return !0;
}
});
var n = new nt({
x: t.position[0],
y: t.position[1],
rotation: t.rotation
});
n.updateTransform(), this._transformGroup = n;
}
return r.prototype.hasBuilder = function(e) {
return !!uS[e];
}, r.prototype.add = function(e) {
uS[e](this.opt, this.axisModel, this.group, this._transformGroup);
}, r.prototype.getGroup = function() {
return this.group;
}, r.innerTextLayout = function(e, t, n) {
var a = RT(t - e), i, o;
return Af(a) ? (o = n > 0 ? "top" : "bottom", i = "center") : Af(a - Kn) ? (o = n > 0 ? "bottom" : "top", i = "center") : (o = "middle", a > 0 && a < Kn ? i = n > 0 ? "right" : "left" : i = n > 0 ? "left" : "right"), {
rotation: a,
textAlign: i,
textVerticalAlign: o
};
}, r.makeAxisEventDataBase = function(e) {
var t = {
componentType: e.mainType,
componentIndex: e.componentIndex
};
return t[e.mainType + "Index"] = e.componentIndex, t;
}, r.isLabelSilent = function(e) {
var t = e.get("tooltip");
return e.get("silent") || !(e.get("triggerEvent") || t && t.show);
}, r;
}(), uS = {
axisLine: function(r, e, t, n) {
var a = e.get(["axisLine", "show"]);
if (a === "auto" && r.handleAutoShown && (a = r.handleAutoShown("axisLine")), !!a) {
var i = e.axis.getExtent(), o = n.transform, s = [i[0], 0], l = [i[1], 0];
o && (ue(s, s, o), ue(l, l, o));
var u = B({
lineCap: "round"
}, e.getModel(["axisLine", "lineStyle"]).getLineStyle()), f = new oe({
subPixelOptimize: !0,
shape: {
x1: s[0],
y1: s[1],
x2: l[0],
y2: l[1]
},
style: u,
strokeContainThreshold: r.strokeContainThreshold || 5,
silent: !0,
z2: 1
});
f.anid = "line", t.add(f);
var h = e.get(["axisLine", "symbol"]);
if (h != null) {
var c = e.get(["axisLine", "symbolSize"]);
W(h) && (h = [h, h]), (W(c) || wt(c)) && (c = [c, c]);
var v = Yo(e.get(["axisLine", "symbolOffset"]) || 0, c), p = c[0], d = c[1];
C([{
rotate: r.rotation + Math.PI / 2,
offset: v[0],
r: 0
}, {
rotate: r.rotation - Math.PI / 2,
offset: v[1],
r: Math.sqrt((s[0] - l[0]) * (s[0] - l[0]) + (s[1] - l[1]) * (s[1] - l[1]))
}], function(g, y) {
if (h[y] !== "none" && h[y] != null) {
var m = Jt(h[y], -p / 2, -d / 2, p, d, u.stroke, !0), _ = g.r + g.offset;
m.attr({
rotation: g.rotate,
x: s[0] + _ * Math.cos(r.rotation),
y: s[1] - _ * Math.sin(r.rotation),
silent: !0,
z2: 11
}), t.add(m);
}
});
}
}
},
axisTickLabel: function(r, e, t, n) {
var a = LG(t, n, e, r), i = EG(t, n, e, r);
if (MG(e, i, a), IG(t, n, e, r.tickDirection), e.get(["axisLabel", "hideOverlap"])) {
var o = QA(G(i, function(s) {
return {
label: s,
priority: s.z2,
defaultAttr: {
ignore: s.ignore
}
};
}));
rM(o);
}
},
axisName: function(r, e, t, n) {
var a = qt(r.axisName, e.get("name"));
if (!!a) {
var i = e.get("nameLocation"), o = r.nameDirection, s = e.getModel("nameTextStyle"), l = e.get("nameGap") || 0, u = e.axis.getExtent(), f = u[0] > u[1] ? -1 : 1, h = [
i === "start" ? u[0] - f * l : i === "end" ? u[1] + f * l : (u[0] + u[1]) / 2,
hS(i) ? r.labelOffset + o * l : 0
], c, v = e.get("nameRotate");
v != null && (v = v * Kn / 180);
var p;
hS(i) ? c = hi.innerTextLayout(
r.rotation,
v != null ? v : r.rotation,
o
) : (c = AG(r.rotation, i, v || 0, u), p = r.axisNameAvailableWidth, p != null && (p = Math.abs(p / Math.sin(c.rotation)), !isFinite(p) && (p = null)));
var d = s.getFont(), g = e.get("nameTruncate", !0) || {}, y = g.ellipsis, m = qt(r.nameTruncateMaxWidth, g.maxWidth, p), _ = new Ct({
x: h[0],
y: h[1],
rotation: c.rotation,
silent: hi.isLabelSilent(e),
style: zt(s, {
text: a,
font: d,
overflow: "truncate",
width: m,
ellipsis: y,
fill: s.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
align: s.get("align") || c.textAlign,
verticalAlign: s.get("verticalAlign") || c.textVerticalAlign
}),
z2: 1
});
if (Oo({
el: _,
componentModel: e,
itemName: a
}), _.__fullText = a, _.anid = "name", e.get("triggerEvent")) {
var S = hi.makeAxisEventDataBase(e);
S.targetType = "axisName", S.name = a, at(_).eventData = S;
}
n.add(_), _.updateTransform(), t.add(_), _.decomposeTransform();
}
}
};
function AG(r, e, t, n) {
var a = RT(t - r), i, o, s = n[0] > n[1], l = e === "start" && !s || e !== "start" && s;
return Af(a - Kn / 2) ? (o = l ? "bottom" : "top", i = "center") : Af(a - Kn * 1.5) ? (o = l ? "top" : "bottom", i = "center") : (o = "middle", a < Kn * 1.5 && a > Kn / 2 ? i = l ? "left" : "right" : i = l ? "right" : "left"), {
rotation: a,
textAlign: i,
textVerticalAlign: o
};
}
function MG(r, e, t) {
if (!FA(r.axis)) {
var n = r.get(["axisLabel", "showMinLabel"]), a = r.get(["axisLabel", "showMaxLabel"]);
e = e || [], t = t || [];
var i = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = t[0], f = t[1], h = t[t.length - 1], c = t[t.length - 2];
n === !1 ? (Ke(i), Ke(u)) : fS(i, o) && (n ? (Ke(o), Ke(f)) : (Ke(i), Ke(u))), a === !1 ? (Ke(s), Ke(h)) : fS(l, s) && (a ? (Ke(l), Ke(c)) : (Ke(s), Ke(h)));
}
}
function Ke(r) {
r && (r.ignore = !0);
}
function fS(r, e) {
var t = r && r.getBoundingRect().clone(), n = e && e.getBoundingRect().clone();
if (!(!t || !n)) {
var a = bh([]);
return bi(a, a, -r.rotation), t.applyTransform(vn([], a, r.getLocalTransform())), n.applyTransform(vn([], a, e.getLocalTransform())), t.intersect(n);
}
}
function hS(r) {
return r === "middle" || r === "center";
}
function RM(r, e, t, n, a) {
for (var i = [], o = [], s = [], l = 0; l < r.length; l++) {
var u = r[l].coord;
o[0] = u, o[1] = 0, s[0] = u, s[1] = t, e && (ue(o, o, e), ue(s, s, e));
var f = new oe({
subPixelOptimize: !0,
shape: {
x1: o[0],
y1: o[1],
x2: s[0],
y2: s[1]
},
style: n,
z2: 2,
autoBatch: !0,
silent: !0
});
f.anid = a + "_" + r[l].tickValue, i.push(f);
}
return i;
}
function LG(r, e, t, n) {
var a = t.axis, i = t.getModel("axisTick"), o = i.get("show");
if (o === "auto" && n.handleAutoShown && (o = n.handleAutoShown("axisTick")), !(!o || a.scale.isBlank())) {
for (var s = i.getModel("lineStyle"), l = n.tickDirection * i.get("length"), u = a.getTicksCoords(), f = RM(u, e.transform, l, J(s.getLineStyle(), {
stroke: t.get(["axisLine", "lineStyle", "color"])
}), "ticks"), h = 0; h < f.length; h++)
r.add(f[h]);
return f;
}
}
function IG(r, e, t, n) {
var a = t.axis, i = t.getModel("minorTick");
if (!(!i.get("show") || a.scale.isBlank())) {
var o = a.getMinorTicksCoords();
if (!!o.length)
for (var s = i.getModel("lineStyle"), l = n * i.get("length"), u = J(s.getLineStyle(), J(t.getModel("axisTick").getLineStyle(), {
stroke: t.get(["axisLine", "lineStyle", "color"])
})), f = 0; f < o.length; f++)
for (var h = RM(o[f], e.transform, l, u, "minorticks_" + f), c = 0; c < h.length; c++)
r.add(h[c]);
}
}
function EG(r, e, t, n) {
var a = t.axis, i = qt(n.axisLabelShow, t.get(["axisLabel", "show"]));
if (!(!i || a.scale.isBlank())) {
var o = t.getModel("axisLabel"), s = o.get("margin"), l = a.getViewLabels(), u = (qt(n.labelRotate, o.get("rotate")) || 0) * Kn / 180, f = hi.innerTextLayout(n.rotation, u, n.labelDirection), h = t.getCategories && t.getCategories(!0), c = [], v = hi.isLabelSilent(t), p = t.get("triggerEvent");
return C(l, function(d, g) {
var y = a.scale.type === "ordinal" ? a.scale.getRawOrdinalNumber(d.tickValue) : d.tickValue, m = d.formattedLabel, _ = d.rawLabel, S = o;
if (h && h[y]) {
var w = h[y];
j(w) && w.textStyle && (S = new kt(w.textStyle, o, t.ecModel));
}
var x = S.getTextColor() || t.get(["axisLine", "lineStyle", "color"]), b = a.dataToCoord(y), T = new Ct({
x: b,
y: n.labelOffset + n.labelDirection * s,
rotation: f.rotation,
silent: v,
z2: 10 + (d.level || 0),
style: zt(S, {
text: m,
align: S.getShallow("align", !0) || f.textAlign,
verticalAlign: S.getShallow("verticalAlign", !0) || S.getShallow("baseline", !0) || f.textVerticalAlign,
fill: q(x) ? x(
a.type === "category" ? _ : a.type === "value" ? y + "" : y,
g
) : x
})
});
if (T.anid = "label_" + y, p) {
var D = hi.makeAxisEventDataBase(t);
D.targetType = "axisLabel", D.value = _, D.tickIndex = g, a.type === "category" && (D.dataIndex = y), at(T).eventData = D;
}
e.add(T), T.updateTransform(), c.push(T), r.add(T), T.decomposeTransform();
}), c;
}
}
const bn = hi;
function PG(r, e) {
var t = {
axesInfo: {},
seriesInvolved: !1,
coordSysAxesInfo: {},
coordSysMap: {}
};
return NG(t, r, e), t.seriesInvolved && kG(t, r), t;
}
function NG(r, e, t) {
var n = e.getComponent("tooltip"), a = e.getComponent("axisPointer"), i = a.get("link", !0) || [], o = [];
C(t.getCoordinateSystems(), function(s) {
if (!s.axisPointerEnabled)
return;
var l = gl(s.model), u = r.coordSysAxesInfo[l] = {};
r.coordSysMap[l] = s;
var f = s.model, h = f.getModel("tooltip", n);
if (C(s.getAxes(), it(d, !1, null)), s.getTooltipAxes && n && h.get("show")) {
var c = h.get("trigger") === "axis", v = h.get(["axisPointer", "type"]) === "cross", p = s.getTooltipAxes(h.get(["axisPointer", "axis"]));
(c || v) && C(p.baseAxes, it(d, v ? "cross" : !0, c)), v && C(p.otherAxes, it(d, "cross", !1));
}
function d(g, y, m) {
var _ = m.model.getModel("axisPointer", a), S = _.get("show");
if (!(!S || S === "auto" && !g && !Zd(_))) {
y == null && (y = _.get("triggerTooltip")), _ = g ? RG(m, h, a, e, g, y) : _;
var w = _.get("snap"), x = gl(m.model), b = y || w || m.type === "category", T = r.axesInfo[x] = {
key: x,
axis: m,
coordSys: s,
axisPointerModel: _,
triggerTooltip: y,
involveSeries: b,
snap: w,
useHandle: Zd(_),
seriesModels: [],
linkGroup: null
};
u[x] = T, r.seriesInvolved = r.seriesInvolved || b;
var D = OG(i, m);
if (D != null) {
var A = o[D] || (o[D] = {
axesInfo: {}
});
A.axesInfo[x] = T, A.mapper = i[D].mapper, T.linkGroup = A;
}
}
}
});
}
function RG(r, e, t, n, a, i) {
var o = e.getModel("axisPointer"), s = ["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], l = {};
C(s, function(c) {
l[c] = tt(o.get(c));
}), l.snap = r.type !== "category" && !!i, o.get("type") === "cross" && (l.type = "line");
var u = l.label || (l.label = {});
if (u.show == null && (u.show = !1), a === "cross") {
var f = o.get(["label", "show"]);
if (u.show = f != null ? f : !0, !i) {
var h = l.lineStyle = o.get("crossStyle");
h && J(u, h.textStyle);
}
}
return r.model.getModel("axisPointer", new kt(l, t, n));
}
function kG(r, e) {
e.eachSeries(function(t) {
var n = t.coordinateSystem, a = t.get(["tooltip", "trigger"], !0), i = t.get(["tooltip", "show"], !0);
!n || a === "none" || a === !1 || a === "item" || i === !1 || t.get(["axisPointer", "show"], !0) === !1 || C(r.coordSysAxesInfo[gl(n.model)], function(o) {
var s = o.axis;
n.getAxis(s.dim) === s && (o.seriesModels.push(t), o.seriesDataCount == null && (o.seriesDataCount = 0), o.seriesDataCount += t.getData().count());
});
});
}
function OG(r, e) {
for (var t = e.model, n = e.dim, a = 0; a < r.length; a++) {
var i = r[a] || {};
if (Ev(i[n + "AxisId"], t.id) || Ev(i[n + "AxisIndex"], t.componentIndex) || Ev(i[n + "AxisName"], t.name))
return a;
}
}
function Ev(r, e) {
return r === "all" || z(r) && ct(r, e) >= 0 || r === e;
}
function VG(r) {
var e = By(r);
if (!!e) {
var t = e.axisPointerModel, n = e.axis.scale, a = t.option, i = t.get("status"), o = t.get("value");
o != null && (o = n.parse(o));
var s = Zd(t);
i == null && (a.status = s ? "show" : "hide");
var l = n.getExtent().slice();
l[0] > l[1] && l.reverse(), (o == null || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), a.value = o, s && (a.status = e.axis.scale.isBlank() ? "hide" : "show");
}
}
function By(r) {
var e = (r.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
return e && e.axesInfo[gl(r)];
}
function BG(r) {
var e = By(r);
return e && e.axisPointerModel;
}
function Zd(r) {
return !!r.get(["handle", "show"]);
}
function gl(r) {
return r.type + "||" + r.id;
}
var Pv = {}, zG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a, i) {
this.axisPointerClass && VG(t), r.prototype.render.apply(this, arguments), this._doUpdateAxisPointerClass(t, a, !0);
}, e.prototype.updateAxisPointer = function(t, n, a, i) {
this._doUpdateAxisPointerClass(t, a, !1);
}, e.prototype.remove = function(t, n) {
var a = this._axisPointer;
a && a.remove(n);
}, e.prototype.dispose = function(t, n) {
this._disposeAxisPointer(n), r.prototype.dispose.apply(this, arguments);
}, e.prototype._doUpdateAxisPointerClass = function(t, n, a) {
var i = e.getAxisPointerClass(this.axisPointerClass);
if (!!i) {
var o = BG(t);
o ? (this._axisPointer || (this._axisPointer = new i())).render(t, o, n, a) : this._disposeAxisPointer(n);
}
}, e.prototype._disposeAxisPointer = function(t) {
this._axisPointer && this._axisPointer.dispose(t), this._axisPointer = null;
}, e.registerAxisPointerClass = function(t, n) {
if (process.env.NODE_ENV !== "production" && Pv[t])
throw new Error("axisPointer " + t + " exists");
Pv[t] = n;
}, e.getAxisPointerClass = function(t) {
return t && Pv[t];
}, e.type = "axis", e;
}(Ht);
const Ai = zG;
var Xd = Tt();
function kM(r, e, t, n) {
var a = t.axis;
if (!a.scale.isBlank()) {
var i = t.getModel("splitArea"), o = i.getModel("areaStyle"), s = o.get("color"), l = n.coordinateSystem.getRect(), u = a.getTicksCoords({
tickModel: i,
clamp: !0
});
if (!!u.length) {
var f = s.length, h = Xd(r).splitAreaColors, c = K(), v = 0;
if (h)
for (var p = 0; p < u.length; p++) {
var d = h.get(u[p].tickValue);
if (d != null) {
v = (d + (f - 1) * p) % f;
break;
}
}
var g = a.toGlobalCoord(u[0].coord), y = o.getAreaStyle();
s = z(s) ? s : [s];
for (var p = 1; p < u.length; p++) {
var m = a.toGlobalCoord(u[p].coord), _ = void 0, S = void 0, w = void 0, x = void 0;
a.isHorizontal() ? (_ = g, S = l.y, w = m - _, x = l.height, g = _ + w) : (_ = l.x, S = g, w = l.width, x = m - S, g = S + x);
var b = u[p - 1].tickValue;
b != null && c.set(b, v), e.add(new xt({
anid: b != null ? "area_" + b : null,
shape: {
x: _,
y: S,
width: w,
height: x
},
style: J({
fill: s[v]
}, y),
autoBatch: !0,
silent: !0
})), v = (v + 1) % f;
}
Xd(r).splitAreaColors = c;
}
}
}
function OM(r) {
Xd(r).splitAreaColors = null;
}
var GG = ["axisLine", "axisTickLabel", "axisName"], FG = ["splitArea", "splitLine", "minorSplitLine"], VM = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.axisPointerClass = "CartesianAxisPointer", t;
}
return e.prototype.render = function(t, n, a, i) {
this.group.removeAll();
var o = this._axisGroup;
if (this._axisGroup = new nt(), this.group.add(this._axisGroup), !!t.get("show")) {
var s = t.getCoordSysModel(), l = Yd(s, t), u = new bn(t, B({
handleAutoShown: function(h) {
for (var c = s.coordinateSystem.getCartesians(), v = 0; v < c.length; v++)
if (Bd(c[v].getOtherAxis(t.axis).scale))
return !0;
return !1;
}
}, l));
C(GG, u.add, u), this._axisGroup.add(u.getGroup()), C(FG, function(h) {
t.get([h, "show"]) && HG[h](this, this._axisGroup, t, s);
}, this);
var f = i && i.type === "changeAxisOrder" && i.isInitSort;
f || El(o, this._axisGroup, t), r.prototype.render.call(this, t, n, a, i);
}
}, e.prototype.remove = function() {
OM(this);
}, e.type = "cartesianAxis", e;
}(Ai), HG = {
splitLine: function(r, e, t, n) {
var a = t.axis;
if (!a.scale.isBlank()) {
var i = t.getModel("splitLine"), o = i.getModel("lineStyle"), s = o.get("color");
s = z(s) ? s : [s];
for (var l = n.coordinateSystem.getRect(), u = a.isHorizontal(), f = 0, h = a.getTicksCoords({
tickModel: i
}), c = [], v = [], p = o.getLineStyle(), d = 0; d < h.length; d++) {
var g = a.toGlobalCoord(h[d].coord);
u ? (c[0] = g, c[1] = l.y, v[0] = g, v[1] = l.y + l.height) : (c[0] = l.x, c[1] = g, v[0] = l.x + l.width, v[1] = g);
var y = f++ % s.length, m = h[d].tickValue;
e.add(new oe({
anid: m != null ? "line_" + h[d].tickValue : null,
subPixelOptimize: !0,
autoBatch: !0,
shape: {
x1: c[0],
y1: c[1],
x2: v[0],
y2: v[1]
},
style: J({
stroke: s[y]
}, p),
silent: !0
}));
}
}
},
minorSplitLine: function(r, e, t, n) {
var a = t.axis, i = t.getModel("minorSplitLine"), o = i.getModel("lineStyle"), s = n.coordinateSystem.getRect(), l = a.isHorizontal(), u = a.getMinorTicksCoords();
if (!!u.length)
for (var f = [], h = [], c = o.getLineStyle(), v = 0; v < u.length; v++)
for (var p = 0; p < u[v].length; p++) {
var d = a.toGlobalCoord(u[v][p].coord);
l ? (f[0] = d, f[1] = s.y, h[0] = d, h[1] = s.y + s.height) : (f[0] = s.x, f[1] = d, h[0] = s.x + s.width, h[1] = d), e.add(new oe({
anid: "minor_line_" + u[v][p].tickValue,
subPixelOptimize: !0,
autoBatch: !0,
shape: {
x1: f[0],
y1: f[1],
x2: h[0],
y2: h[1]
},
style: c,
silent: !0
}));
}
},
splitArea: function(r, e, t, n) {
kM(r, e, t, n);
}
}, BM = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "xAxis", e;
}(VM), $G = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = BM.type, t;
}
return e.type = "yAxis", e;
}(VM), WG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "grid", t;
}
return e.prototype.render = function(t, n) {
this.group.removeAll(), t.get("show") && this.group.add(new xt({
shape: t.coordinateSystem.getRect(),
style: J({
fill: t.get("backgroundColor")
}, t.getItemStyle()),
silent: !0,
z2: -1
}));
}, e.type = "grid", e;
}(Ht), cS = {
offset: 0
};
function zM(r) {
r.registerComponentView(WG), r.registerComponentModel(pG), r.registerCoordinateSystem("cartesian2d", DG), Do(r, "x", Wd, cS), Do(r, "y", Wd, cS), r.registerComponentView(BM), r.registerComponentView($G), r.registerPreprocessor(function(e) {
e.xAxis && e.yAxis && !e.grid && (e.grid = {});
});
}
function UG(r) {
pt(zM), r.registerSeriesModel(oG), r.registerChartView(cG), r.registerLayout(Fl("scatter"));
}
function YG(r) {
r.eachSeriesByType("radar", function(e) {
var t = e.getData(), n = [], a = e.coordinateSystem;
if (!!a) {
var i = a.getIndicatorAxes();
C(i, function(o, s) {
t.each(t.mapDimension(i[s].dim), function(l, u) {
n[u] = n[u] || [];
var f = a.dataToPoint(l, s);
n[u][s] = vS(f) ? f : pS(a);
});
}), t.each(function(o) {
var s = E2(n[o], function(l) {
return vS(l);
}) || pS(a);
n[o].push(s.slice()), t.setItemLayout(o, n[o]);
});
}
});
}
function vS(r) {
return !isNaN(r[0]) && !isNaN(r[1]);
}
function pS(r) {
return [r.cx, r.cy];
}
function ZG(r) {
var e = r.polar;
if (e) {
z(e) || (e = [e]);
var t = [];
C(e, function(n, a) {
n.indicator ? (n.type && !n.shape && (n.shape = n.type), r.radar = r.radar || [], z(r.radar) || (r.radar = [r.radar]), r.radar.push(n)) : t.push(n);
}), r.polar = t;
}
C(r.series, function(n) {
n && n.type === "radar" && n.polarIndex && (n.radarIndex = n.polarIndex);
});
}
var XG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = t.coordinateSystem, o = this.group, s = t.getData(), l = this._data;
function u(c, v) {
var p = c.getItemVisual(v, "symbol") || "circle";
if (p !== "none") {
var d = kl(c.getItemVisual(v, "symbolSize")), g = Jt(p, -1, -1, 2, 2), y = c.getItemVisual(v, "symbolRotate") || 0;
return g.attr({
style: {
strokeNoScale: !0
},
z2: 100,
scaleX: d[0] / 2,
scaleY: d[1] / 2,
rotation: y * Math.PI / 180 || 0
}), g;
}
}
function f(c, v, p, d, g, y) {
p.removeAll();
for (var m = 0; m < v.length - 1; m++) {
var _ = u(d, g);
_ && (_.__dimIdx = m, c[m] ? (_.setPosition(c[m]), Nl[y ? "initProps" : "updateProps"](_, {
x: v[m][0],
y: v[m][1]
}, t, g)) : _.setPosition(v[m]), p.add(_));
}
}
function h(c) {
return G(c, function(v) {
return [i.cx, i.cy];
});
}
s.diff(l).add(function(c) {
var v = s.getItemLayout(c);
if (!!v) {
var p = new Be(), d = new ze(), g = {
shape: {
points: v
}
};
p.shape.points = h(v), d.shape.points = h(v), Bt(p, g, t, c), Bt(d, g, t, c);
var y = new nt(), m = new nt();
y.add(d), y.add(p), y.add(m), f(d.shape.points, v, m, s, c, !0), s.setItemGraphicEl(c, y);
}
}).update(function(c, v) {
var p = l.getItemGraphicEl(v), d = p.childAt(0), g = p.childAt(1), y = p.childAt(2), m = {
shape: {
points: s.getItemLayout(c)
}
};
!m.shape.points || (f(d.shape.points, m.shape.points, y, s, c, !1), Lr(g), Lr(d), bt(d, m, t), bt(g, m, t), s.setItemGraphicEl(c, p));
}).remove(function(c) {
o.remove(l.getItemGraphicEl(c));
}).execute(), s.eachItemGraphicEl(function(c, v) {
var p = s.getItemModel(v), d = c.childAt(0), g = c.childAt(1), y = c.childAt(2), m = s.getItemVisual(v, "style"), _ = m.fill;
o.add(c), d.useStyle(J(p.getModel("lineStyle").getLineStyle(), {
fill: "none",
stroke: _
})), ce(d, p, "lineStyle"), ce(g, p, "areaStyle");
var S = p.getModel("areaStyle"), w = S.isEmpty() && S.parentModel.isEmpty();
g.ignore = w, C(["emphasis", "select", "blur"], function(T) {
var D = p.getModel([T, "areaStyle"]), A = D.isEmpty() && D.parentModel.isEmpty();
g.ensureState(T).ignore = A && w;
}), g.useStyle(J(S.getAreaStyle(), {
fill: _,
opacity: 0.7,
decal: m.decal
}));
var x = p.getModel("emphasis"), b = x.getModel("itemStyle").getItemStyle();
y.eachChild(function(T) {
if (T instanceof ve) {
var D = T.style;
T.useStyle(B({
image: D.image,
x: D.x,
y: D.y,
width: D.width,
height: D.height
}, m));
} else
T.useStyle(m), T.setColor(_), T.style.strokeNoScale = !0;
var A = T.ensureState("emphasis");
A.style = tt(b);
var M = s.getStore().get(s.getDimensionIndex(T.__dimIdx), v);
(M == null || isNaN(M)) && (M = ""), xe(T, se(p), {
labelFetcher: s.hostModel,
labelDataIndex: v,
labelDimIndex: T.__dimIdx,
defaultText: M,
inheritColor: _,
defaultOpacity: m.opacity
});
}), Ut(c, x.get("focus"), x.get("blurScope"), x.get("disabled"));
}), this._data = s;
}, e.prototype.remove = function() {
this.group.removeAll(), this._data = null;
}, e.type = "radar", e;
}(Ot);
const qG = XG;
var KG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.hasSymbolVisual = !0, t;
}
return e.prototype.init = function(t) {
r.prototype.init.apply(this, arguments), this.legendVisualProvider = new $l(Y(this.getData, this), Y(this.getRawData, this));
}, e.prototype.getInitialData = function(t, n) {
return Zo(this, {
generateCoord: "indicator_",
generateCoordCount: 1 / 0
});
}, e.prototype.formatTooltip = function(t, n, a) {
var i = this.getData(), o = this.coordinateSystem, s = o.getIndicatorAxes(), l = this.getData().getName(t), u = l === "" ? this.name : l, f = OD(this, t);
return ae("section", {
header: u,
sortBlocks: !0,
blocks: G(s, function(h) {
var c = i.get(i.mapDimension(h.dim), t);
return ae("nameValue", {
markerType: "subItem",
markerColor: f,
name: h.name,
value: c,
sortParam: c
});
})
});
}, e.prototype.getTooltipPosition = function(t) {
if (t != null) {
for (var n = this.getData(), a = this.coordinateSystem, i = n.getValues(G(a.dimensions, function(u) {
return n.mapDimension(u);
}), t), o = 0, s = i.length; o < s; o++)
if (!isNaN(i[o])) {
var l = a.getIndicatorAxes();
return a.coordToPoint(l[o].dataToCoord(i[o]), o);
}
}
}, e.type = "series.radar", e.dependencies = ["radar"], e.defaultOption = {
z: 2,
colorBy: "data",
coordinateSystem: "radar",
legendHoverLink: !0,
radarIndex: 0,
lineStyle: {
width: 2,
type: "solid",
join: "round"
},
label: {
position: "top"
},
symbolSize: 8
}, e;
}(Gt);
const jG = KG;
var ds = PM.value;
function Nu(r, e) {
return J({
show: e
}, r);
}
var JG = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.optionUpdated = function() {
var t = this.get("boundaryGap"), n = this.get("splitNumber"), a = this.get("scale"), i = this.get("axisLine"), o = this.get("axisTick"), s = this.get("axisLabel"), l = this.get("axisName"), u = this.get(["axisName", "show"]), f = this.get(["axisName", "formatter"]), h = this.get("axisNameGap"), c = this.get("triggerEvent"), v = G(this.get("indicator") || [], function(p) {
p.max != null && p.max > 0 && !p.min ? p.min = 0 : p.min != null && p.min < 0 && !p.max && (p.max = 0);
var d = l;
p.color != null && (d = J({
color: p.color
}, l));
var g = lt(tt(p), {
boundaryGap: t,
splitNumber: n,
scale: a,
axisLine: i,
axisTick: o,
axisLabel: s,
name: p.text,
showName: u,
nameLocation: "end",
nameGap: h,
nameTextStyle: d,
triggerEvent: c
}, !1);
if (W(f)) {
var y = g.name;
g.name = f.replace("{value}", y != null ? y : "");
} else
q(f) && (g.name = f(g.name, g));
var m = new kt(g, null, this.ecModel);
return Qt(m, Bl.prototype), m.mainType = "radar", m.componentIndex = this.componentIndex, m;
}, this);
this._indicatorModels = v;
}, e.prototype.getIndicatorModels = function() {
return this._indicatorModels;
}, e.type = "radar", e.defaultOption = {
z: 0,
center: ["50%", "50%"],
radius: "75%",
startAngle: 90,
axisName: {
show: !0
},
boundaryGap: [0, 0],
splitNumber: 5,
axisNameGap: 15,
scale: !1,
shape: "polygon",
axisLine: lt({
lineStyle: {
color: "#bbb"
}
}, ds.axisLine),
axisLabel: Nu(ds.axisLabel, !1),
axisTick: Nu(ds.axisTick, !1),
splitLine: Nu(ds.splitLine, !0),
splitArea: Nu(ds.splitArea, !0),
indicator: []
}, e;
}(_t);
const QG = JG;
var tF = ["axisLine", "axisTickLabel", "axisName"], eF = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = this.group;
i.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t);
}, e.prototype._buildAxes = function(t) {
var n = t.coordinateSystem, a = n.getIndicatorAxes(), i = G(a, function(o) {
var s = o.model.get("showName") ? o.name : "", l = new bn(o.model, {
axisName: s,
position: [n.cx, n.cy],
rotation: o.angle,
labelDirection: -1,
tickDirection: -1,
nameDirection: 1
});
return l;
});
C(i, function(o) {
C(tF, o.add, o), this.group.add(o.getGroup());
}, this);
}, e.prototype._buildSplitLineAndArea = function(t) {
var n = t.coordinateSystem, a = n.getIndicatorAxes();
if (!a.length)
return;
var i = t.get("shape"), o = t.getModel("splitLine"), s = t.getModel("splitArea"), l = o.getModel("lineStyle"), u = s.getModel("areaStyle"), f = o.get("show"), h = s.get("show"), c = l.get("color"), v = u.get("color"), p = z(c) ? c : [c], d = z(v) ? v : [v], g = [], y = [];
function m(P, N, O) {
var k = O % N.length;
return P[k] = P[k] || [], k;
}
if (i === "circle")
for (var _ = a[0].getTicksCoords(), S = n.cx, w = n.cy, x = 0; x < _.length; x++) {
if (f) {
var b = m(g, p, x);
g[b].push(new Qr({
shape: {
cx: S,
cy: w,
r: _[x].coord
}
}));
}
if (h && x < _.length - 1) {
var b = m(y, d, x);
y[b].push(new Nh({
shape: {
cx: S,
cy: w,
r0: _[x].coord,
r: _[x + 1].coord
}
}));
}
}
else
for (var T, D = G(a, function(P, N) {
var O = P.getTicksCoords();
return T = T == null ? O.length - 1 : Math.min(O.length - 1, T), G(O, function(k) {
return n.coordToPoint(k.coord, N);
});
}), A = [], x = 0; x <= T; x++) {
for (var M = [], L = 0; L < a.length; L++)
M.push(D[L][x]);
if (M[0] ? M.push(M[0].slice()) : process.env.NODE_ENV !== "production" && console.error("Can't draw value axis " + x), f) {
var b = m(g, p, x);
g[b].push(new ze({
shape: {
points: M
}
}));
}
if (h && A) {
var b = m(y, d, x - 1);
y[b].push(new Be({
shape: {
points: M.concat(A)
}
}));
}
A = M.slice().reverse();
}
var I = l.getLineStyle(), E = u.getAreaStyle();
C(y, function(P, N) {
this.group.add(or(P, {
style: J({
stroke: "none",
fill: d[N % d.length]
}, E),
silent: !0
}));
}, this), C(g, function(P, N) {
this.group.add(or(P, {
style: J({
fill: "none",
stroke: p[N % p.length]
}, I),
silent: !0
}));
}, this);
}, e.type = "radar", e;
}(Ht);
const rF = eF;
var nF = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this, t, n, a) || this;
return i.type = "value", i.angle = 0, i.name = "", i;
}
return e;
}(Er);
const aF = nF;
var iF = function() {
function r(e, t, n) {
this.dimensions = [], this._model = e, this._indicatorAxes = G(e.getIndicatorModels(), function(a, i) {
var o = "indicator_" + i, s = new aF(
o,
new la()
);
return s.name = a.get("name"), s.model = a, a.axis = s, this.dimensions.push(o), s;
}, this), this.resize(e, n);
}
return r.prototype.getIndicatorAxes = function() {
return this._indicatorAxes;
}, r.prototype.dataToPoint = function(e, t) {
var n = this._indicatorAxes[t];
return this.coordToPoint(n.dataToCoord(e), t);
}, r.prototype.coordToPoint = function(e, t) {
var n = this._indicatorAxes[t], a = n.angle, i = this.cx + e * Math.cos(a), o = this.cy - e * Math.sin(a);
return [i, o];
}, r.prototype.pointToData = function(e) {
var t = e[0] - this.cx, n = e[1] - this.cy, a = Math.sqrt(t * t + n * n);
t /= a, n /= a;
for (var i = Math.atan2(-n, t), o = 1 / 0, s, l = -1, u = 0; u < this._indicatorAxes.length; u++) {
var f = this._indicatorAxes[u], h = Math.abs(i - f.angle);
h < o && (s = f, l = u, o = h);
}
return [l, +(s && s.coordToData(a))];
}, r.prototype.resize = function(e, t) {
var n = e.get("center"), a = t.getWidth(), i = t.getHeight(), o = Math.min(a, i) / 2;
this.cx = H(n[0], a), this.cy = H(n[1], i), this.startAngle = e.get("startAngle") * Math.PI / 180;
var s = e.get("radius");
(W(s) || wt(s)) && (s = [0, s]), this.r0 = H(s[0], o), this.r = H(s[1], o), C(this._indicatorAxes, function(l, u) {
l.setExtent(this.r0, this.r);
var f = this.startAngle + u * Math.PI * 2 / this._indicatorAxes.length;
f = Math.atan2(Math.sin(f), Math.cos(f)), l.angle = f;
}, this);
}, r.prototype.update = function(e, t) {
var n = this._indicatorAxes, a = this._model;
C(n, function(s) {
s.scale.setExtent(1 / 0, -1 / 0);
}), e.eachSeriesByType("radar", function(s, l) {
if (!(s.get("coordinateSystem") !== "radar" || e.getComponent("radar", s.get("radarIndex")) !== a)) {
var u = s.getData();
C(n, function(f) {
f.scale.unionExtentFromData(u, u.mapDimension(f.dim));
});
}
}, this);
var i = a.get("splitNumber"), o = new la();
o.setExtent(0, i), o.setInterval(1), C(n, function(s, l) {
NM(s.scale, s.model, o);
});
}, r.prototype.convertToPixel = function(e, t, n) {
return console.warn("Not implemented."), null;
}, r.prototype.convertFromPixel = function(e, t, n) {
return console.warn("Not implemented."), null;
}, r.prototype.containPoint = function(e) {
return console.warn("Not implemented."), !1;
}, r.create = function(e, t) {
var n = [];
return e.eachComponent("radar", function(a) {
var i = new r(a, e, t);
n.push(i), a.coordinateSystem = i;
}), e.eachSeriesByType("radar", function(a) {
a.get("coordinateSystem") === "radar" && (a.coordinateSystem = n[a.get("radarIndex") || 0]);
}), n;
}, r.dimensions = [], r;
}();
const oF = iF;
function sF(r) {
r.registerCoordinateSystem("radar", oF), r.registerComponentModel(QG), r.registerComponentView(rF), r.registerVisual({
seriesType: "radar",
reset: function(e) {
var t = e.getData();
t.each(function(n) {
t.setItemVisual(n, "legendIcon", "roundRect");
}), t.setVisual("legendIcon", "roundRect");
}
});
}
function lF(r) {
pt(sF), r.registerChartView(qG), r.registerSeriesModel(jG), r.registerLayout(YG), r.registerProcessor(Hl("radar")), r.registerPreprocessor(ZG);
}
var dS = "\0_ec_interaction_mutex";
function uF(r, e, t) {
var n = zy(r);
n[e] = t;
}
function fF(r, e, t) {
var n = zy(r), a = n[e];
a === t && (n[e] = null);
}
function gS(r, e) {
return !!zy(r)[e];
}
function zy(r) {
return r[dS] || (r[dS] = {});
}
en({
type: "takeGlobalCursor",
event: "globalCursorTaken",
update: "update"
}, jt);
var hF = function(r) {
R(e, r);
function e(t) {
var n = r.call(this) || this;
n._zr = t;
var a = Y(n._mousedownHandler, n), i = Y(n._mousemoveHandler, n), o = Y(n._mouseupHandler, n), s = Y(n._mousewheelHandler, n), l = Y(n._pinchHandler, n);
return n.enable = function(u, f) {
this.disable(), this._opt = J(tt(f) || {}, {
zoomOnMouseWheel: !0,
moveOnMouseMove: !0,
moveOnMouseWheel: !1,
preventDefaultMouseMove: !0
}), u == null && (u = !0), (u === !0 || u === "move" || u === "pan") && (t.on("mousedown", a), t.on("mousemove", i), t.on("mouseup", o)), (u === !0 || u === "scale" || u === "zoom") && (t.on("mousewheel", s), t.on("pinch", l));
}, n.disable = function() {
t.off("mousedown", a), t.off("mousemove", i), t.off("mouseup", o), t.off("mousewheel", s), t.off("pinch", l);
}, n;
}
return e.prototype.isDragging = function() {
return this._dragging;
}, e.prototype.isPinching = function() {
return this._pinching;
}, e.prototype.setPointerChecker = function(t) {
this.pointerChecker = t;
}, e.prototype.dispose = function() {
this.disable();
}, e.prototype._mousedownHandler = function(t) {
if (!(Gm(t) || t.target && t.target.draggable)) {
var n = t.offsetX, a = t.offsetY;
this.pointerChecker && this.pointerChecker(t, n, a) && (this._x = n, this._y = a, this._dragging = !0);
}
}, e.prototype._mousemoveHandler = function(t) {
if (!(!this._dragging || !hf("moveOnMouseMove", t, this._opt) || t.gestureEvent === "pinch" || gS(this._zr, "globalPan"))) {
var n = t.offsetX, a = t.offsetY, i = this._x, o = this._y, s = n - i, l = a - o;
this._x = n, this._y = a, this._opt.preventDefaultMouseMove && mn(t.event), GM(this, "pan", "moveOnMouseMove", t, {
dx: s,
dy: l,
oldX: i,
oldY: o,
newX: n,
newY: a,
isAvailableBehavior: null
});
}
}, e.prototype._mouseupHandler = function(t) {
Gm(t) || (this._dragging = !1);
}, e.prototype._mousewheelHandler = function(t) {
var n = hf("zoomOnMouseWheel", t, this._opt), a = hf("moveOnMouseWheel", t, this._opt), i = t.wheelDelta, o = Math.abs(i), s = t.offsetX, l = t.offsetY;
if (!(i === 0 || !n && !a)) {
if (n) {
var u = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1, f = i > 0 ? u : 1 / u;
Nv(this, "zoom", "zoomOnMouseWheel", t, {
scale: f,
originX: s,
originY: l,
isAvailableBehavior: null
});
}
if (a) {
var h = Math.abs(i), c = (i > 0 ? 1 : -1) * (h > 3 ? 0.4 : h > 1 ? 0.15 : 0.05);
Nv(this, "scrollMove", "moveOnMouseWheel", t, {
scrollDelta: c,
originX: s,
originY: l,
isAvailableBehavior: null
});
}
}
}, e.prototype._pinchHandler = function(t) {
if (!gS(this._zr, "globalPan")) {
var n = t.pinchScale > 1 ? 1.1 : 1 / 1.1;
Nv(this, "zoom", null, t, {
scale: n,
originX: t.pinchX,
originY: t.pinchY,
isAvailableBehavior: null
});
}
}, e;
}(vr);
function Nv(r, e, t, n, a) {
r.pointerChecker && r.pointerChecker(n, a.originX, a.originY) && (mn(n.event), GM(r, e, t, n, a));
}
function GM(r, e, t, n, a) {
a.isAvailableBehavior = Y(hf, null, t, n), r.trigger(e, a);
}
function hf(r, e, t) {
var n = t[r];
return !r || n && (!W(n) || e.event[n + "Key"]);
}
const Wl = hF;
function Gy(r, e, t) {
var n = r.target;
n.x += e, n.y += t, n.dirty();
}
function Fy(r, e, t, n) {
var a = r.target, i = r.zoomLimit, o = r.zoom = r.zoom || 1;
if (o *= e, i) {
var s = i.min || 0, l = i.max || 1 / 0;
o = Math.max(Math.min(l, o), s);
}
var u = o / r.zoom;
r.zoom = o, a.x -= (t - a.x) * (u - 1), a.y -= (n - a.y) * (u - 1), a.scaleX *= u, a.scaleY *= u, a.dirty();
}
var cF = {
axisPointer: 1,
tooltip: 1,
brush: 1
};
function tc(r, e, t) {
var n = e.getComponentByElement(r.topTarget), a = n && n.coordinateSystem;
return n && n !== t && !cF.hasOwnProperty(n.mainType) && a && a.model !== t;
}
function FM(r) {
if (W(r)) {
var e = new DOMParser();
r = e.parseFromString(r, "text/xml");
}
var t = r;
for (t.nodeType === 9 && (t = t.firstChild); t.nodeName.toLowerCase() !== "svg" || t.nodeType !== 1; )
t = t.nextSibling;
return t;
}
var Rv, Jf = {
fill: "fill",
stroke: "stroke",
"stroke-width": "lineWidth",
opacity: "opacity",
"fill-opacity": "fillOpacity",
"stroke-opacity": "strokeOpacity",
"stroke-dasharray": "lineDash",
"stroke-dashoffset": "lineDashOffset",
"stroke-linecap": "lineCap",
"stroke-linejoin": "lineJoin",
"stroke-miterlimit": "miterLimit",
"font-family": "fontFamily",
"font-size": "fontSize",
"font-style": "fontStyle",
"font-weight": "fontWeight",
"text-anchor": "textAlign",
visibility: "visibility",
display: "display"
}, yS = mt(Jf), Qf = {
"alignment-baseline": "textBaseline",
"stop-color": "stopColor"
}, mS = mt(Qf), vF = function() {
function r() {
this._defs = {}, this._root = null;
}
return r.prototype.parse = function(e, t) {
t = t || {};
var n = FM(e);
if (process.env.NODE_ENV !== "production" && !n)
throw new Error("Illegal svg");
this._defsUsePending = [];
var a = new nt();
this._root = a;
var i = [], o = n.getAttribute("viewBox") || "", s = parseFloat(n.getAttribute("width") || t.width), l = parseFloat(n.getAttribute("height") || t.height);
isNaN(s) && (s = null), isNaN(l) && (l = null), Fe(n, a, null, !0, !1);
for (var u = n.firstChild; u; )
this._parseNode(u, a, i, null, !1, !1), u = u.nextSibling;
gF(this._defs, this._defsUsePending), this._defsUsePending = [];
var f, h;
if (o) {
var c = ec(o);
c.length >= 4 && (f = {
x: parseFloat(c[0] || 0),
y: parseFloat(c[1] || 0),
width: parseFloat(c[2]),
height: parseFloat(c[3])
});
}
if (f && s != null && l != null && (h = $M(f, { x: 0, y: 0, width: s, height: l }), !t.ignoreViewBox)) {
var v = a;
a = new nt(), a.add(v), v.scaleX = v.scaleY = h.scale, v.x = h.x, v.y = h.y;
}
return !t.ignoreRootClip && s != null && l != null && a.setClipPath(new xt({
shape: { x: 0, y: 0, width: s, height: l }
})), {
root: a,
width: s,
height: l,
viewBoxRect: f,
viewBoxTransform: h,
named: i
};
}, r.prototype._parseNode = function(e, t, n, a, i, o) {
var s = e.nodeName.toLowerCase(), l, u = a;
if (s === "defs" && (i = !0), s === "text" && (o = !0), s === "defs" || s === "switch")
l = t;
else {
if (!i) {
var f = Rv[s];
if (f && U(Rv, s)) {
l = f.call(this, e, t);
var h = e.getAttribute("name");
if (h) {
var c = {
name: h,
namedFrom: null,
svgNodeTagLower: s,
el: l
};
n.push(c), s === "g" && (u = c);
} else
a && n.push({
name: a.name,
namedFrom: a,
svgNodeTagLower: s,
el: l
});
t.add(l);
}
}
var v = _S[s];
if (v && U(_S, s)) {
var p = v.call(this, e), d = e.getAttribute("id");
d && (this._defs[d] = p);
}
}
if (l && l.isGroup)
for (var g = e.firstChild; g; )
g.nodeType === 1 ? this._parseNode(g, l, n, u, i, o) : g.nodeType === 3 && o && this._parseText(g, l), g = g.nextSibling;
}, r.prototype._parseText = function(e, t) {
var n = new nl({
style: {
text: e.textContent
},
silent: !0,
x: this._textX || 0,
y: this._textY || 0
});
je(t, n), Fe(e, n, this._defsUsePending, !1, !1), pF(n, t);
var a = n.style, i = a.fontSize;
i && i < 9 && (a.fontSize = 9, n.scaleX *= i / 9, n.scaleY *= i / 9);
var o = (a.fontSize || a.fontFamily) && [
a.fontStyle,
a.fontWeight,
(a.fontSize || 12) + "px",
a.fontFamily || "sans-serif"
].join(" ");
a.font = o;
var s = n.getBoundingRect();
return this._textX += s.width, t.add(n), n;
}, r.internalField = function() {
Rv = {
g: function(e, t) {
var n = new nt();
return je(t, n), Fe(e, n, this._defsUsePending, !1, !1), n;
},
rect: function(e, t) {
var n = new xt();
return je(t, n), Fe(e, n, this._defsUsePending, !1, !1), n.setShape({
x: parseFloat(e.getAttribute("x") || "0"),
y: parseFloat(e.getAttribute("y") || "0"),
width: parseFloat(e.getAttribute("width") || "0"),
height: parseFloat(e.getAttribute("height") || "0")
}), n.silent = !0, n;
},
circle: function(e, t) {
var n = new Qr();
return je(t, n), Fe(e, n, this._defsUsePending, !1, !1), n.setShape({
cx: parseFloat(e.getAttribute("cx") || "0"),
cy: parseFloat(e.getAttribute("cy") || "0"),
r: parseFloat(e.getAttribute("r") || "0")
}), n.silent = !0, n;
},
line: function(e, t) {
var n = new oe();
return je(t, n), Fe(e, n, this._defsUsePending, !1, !1), n.setShape({
x1: parseFloat(e.getAttribute("x1") || "0"),
y1: parseFloat(e.getAttribute("y1") || "0"),
x2: parseFloat(e.getAttribute("x2") || "0"),
y2: parseFloat(e.getAttribute("y2") || "0")
}), n.silent = !0, n;
},
ellipse: function(e, t) {
var n = new Kg();
return je(t, n), Fe(e, n, this._defsUsePending, !1, !1), n.setShape({
cx: parseFloat(e.getAttribute("cx") || "0"),
cy: parseFloat(e.getAttribute("cy") || "0"),
rx: parseFloat(e.getAttribute("rx") || "0"),
ry: parseFloat(e.getAttribute("ry") || "0")
}), n.silent = !0, n;
},
polygon: function(e, t) {
var n = e.getAttribute("points"), a;
n && (a = wS(n));
var i = new Be({
shape: {
points: a || []
},
silent: !0
});
return je(t, i), Fe(e, i, this._defsUsePending, !1, !1), i;
},
polyline: function(e, t) {
var n = e.getAttribute("points"), a;
n && (a = wS(n));
var i = new ze({
shape: {
points: a || []
},
silent: !0
});
return je(t, i), Fe(e, i, this._defsUsePending, !1, !1), i;
},
image: function(e, t) {
var n = new ve();
return je(t, n), Fe(e, n, this._defsUsePending, !1, !1), n.setStyle({
image: e.getAttribute("xlink:href") || e.getAttribute("href"),
x: +e.getAttribute("x"),
y: +e.getAttribute("y"),
width: +e.getAttribute("width"),
height: +e.getAttribute("height")
}), n.silent = !0, n;
},
text: function(e, t) {
var n = e.getAttribute("x") || "0", a = e.getAttribute("y") || "0", i = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0";
this._textX = parseFloat(n) + parseFloat(i), this._textY = parseFloat(a) + parseFloat(o);
var s = new nt();
return je(t, s), Fe(e, s, this._defsUsePending, !1, !0), s;
},
tspan: function(e, t) {
var n = e.getAttribute("x"), a = e.getAttribute("y");
n != null && (this._textX = parseFloat(n)), a != null && (this._textY = parseFloat(a));
var i = e.getAttribute("dx") || "0", o = e.getAttribute("dy") || "0", s = new nt();
return je(t, s), Fe(e, s, this._defsUsePending, !1, !0), this._textX += parseFloat(i), this._textY += parseFloat(o), s;
},
path: function(e, t) {
var n = e.getAttribute("d") || "", a = _C(n);
return je(t, a), Fe(e, a, this._defsUsePending, !1, !1), a.silent = !0, a;
}
};
}(), r;
}(), _S = {
lineargradient: function(r) {
var e = parseInt(r.getAttribute("x1") || "0", 10), t = parseInt(r.getAttribute("y1") || "0", 10), n = parseInt(r.getAttribute("x2") || "10", 10), a = parseInt(r.getAttribute("y2") || "0", 10), i = new Il(e, t, n, a);
return SS(r, i), xS(r, i), i;
},
radialgradient: function(r) {
var e = parseInt(r.getAttribute("cx") || "0", 10), t = parseInt(r.getAttribute("cy") || "0", 10), n = parseInt(r.getAttribute("r") || "0", 10), a = new PC(e, t, n);
return SS(r, a), xS(r, a), a;
}
};
function SS(r, e) {
var t = r.getAttribute("gradientUnits");
t === "userSpaceOnUse" && (e.global = !0);
}
function xS(r, e) {
for (var t = r.firstChild; t; ) {
if (t.nodeType === 1 && t.nodeName.toLocaleLowerCase() === "stop") {
var n = t.getAttribute("offset"), a = void 0;
n && n.indexOf("%") > 0 ? a = parseInt(n, 10) / 100 : n ? a = parseFloat(n) : a = 0;
var i = {};
HM(t, i, i);
var o = i.stopColor || t.getAttribute("stop-color") || "#000000";
e.colorStops.push({
offset: a,
color: o
});
}
t = t.nextSibling;
}
}
function je(r, e) {
r && r.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), J(e.__inheritedStyle, r.__inheritedStyle));
}
function wS(r) {
for (var e = ec(r), t = [], n = 0; n < e.length; n += 2) {
var a = parseFloat(e[n]), i = parseFloat(e[n + 1]);
t.push([a, i]);
}
return t;
}
function Fe(r, e, t, n, a) {
var i = e, o = i.__inheritedStyle = i.__inheritedStyle || {}, s = {};
r.nodeType === 1 && (_F(r, e), HM(r, o, s), n || SF(r, o, s)), i.style = i.style || {}, o.fill != null && (i.style.fill = bS(i, "fill", o.fill, t)), o.stroke != null && (i.style.stroke = bS(i, "stroke", o.stroke, t)), C([
"lineWidth",
"opacity",
"fillOpacity",
"strokeOpacity",
"miterLimit",
"fontSize"
], function(l) {
o[l] != null && (i.style[l] = parseFloat(o[l]));
}), C([
"lineDashOffset",
"lineCap",
"lineJoin",
"fontWeight",
"fontFamily",
"fontStyle",
"textAlign"
], function(l) {
o[l] != null && (i.style[l] = o[l]);
}), a && (i.__selfStyle = s), o.lineDash && (i.style.lineDash = G(ec(o.lineDash), function(l) {
return parseFloat(l);
})), (o.visibility === "hidden" || o.visibility === "collapse") && (i.invisible = !0), o.display === "none" && (i.ignore = !0);
}
function pF(r, e) {
var t = e.__selfStyle;
if (t) {
var n = t.textBaseline, a = n;
!n || n === "auto" || n === "baseline" ? a = "alphabetic" : n === "before-edge" || n === "text-before-edge" ? a = "top" : n === "after-edge" || n === "text-after-edge" ? a = "bottom" : (n === "central" || n === "mathematical") && (a = "middle"), r.style.textBaseline = a;
}
var i = e.__inheritedStyle;
if (i) {
var o = i.textAlign, s = o;
o && (o === "middle" && (s = "center"), r.style.textAlign = s);
}
}
var dF = /^url\(\s*#(.*?)\)/;
function bS(r, e, t, n) {
var a = t && t.match(dF);
if (a) {
var i = xr(a[1]);
n.push([r, e, i]);
return;
}
return t === "none" && (t = null), t;
}
function gF(r, e) {
for (var t = 0; t < e.length; t++) {
var n = e[t];
n[0].style[n[1]] = r[n[2]];
}
}
var yF = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;
function ec(r) {
return r.match(yF) || [];
}
var mF = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g, kv = Math.PI / 180;
function _F(r, e) {
var t = r.getAttribute("transform");
if (t) {
t = t.replace(/,/g, " ");
var n = [], a = null;
t.replace(mF, function(h, c, v) {
return n.push(c, v), "";
});
for (var i = n.length - 1; i > 0; i -= 2) {
var o = n[i], s = n[i - 1], l = ec(o);
switch (a = a || hr(), s) {
case "translate":
qr(a, a, [parseFloat(l[0]), parseFloat(l[1] || "0")]);
break;
case "scale":
Vg(a, a, [parseFloat(l[0]), parseFloat(l[1] || l[0])]);
break;
case "rotate":
bi(a, a, -parseFloat(l[0]) * kv);
break;
case "skewX":
var u = Math.tan(parseFloat(l[0]) * kv);
vn(a, [1, 0, u, 1, 0, 0], a);
break;
case "skewY":
var f = Math.tan(parseFloat(l[0]) * kv);
vn(a, [1, f, 0, 1, 0, 0], a);
break;
case "matrix":
a[0] = parseFloat(l[0]), a[1] = parseFloat(l[1]), a[2] = parseFloat(l[2]), a[3] = parseFloat(l[3]), a[4] = parseFloat(l[4]), a[5] = parseFloat(l[5]);
break;
}
}
e.setLocalTransform(a);
}
}
var TS = /([^\s:;]+)\s*:\s*([^:;]+)/g;
function HM(r, e, t) {
var n = r.getAttribute("style");
if (!!n) {
TS.lastIndex = 0;
for (var a; (a = TS.exec(n)) != null; ) {
var i = a[1], o = U(Jf, i) ? Jf[i] : null;
o && (e[o] = a[2]);
var s = U(Qf, i) ? Qf[i] : null;
s && (t[s] = a[2]);
}
}
}
function SF(r, e, t) {
for (var n = 0; n < yS.length; n++) {
var a = yS[n], i = r.getAttribute(a);
i != null && (e[Jf[a]] = i);
}
for (var n = 0; n < mS.length; n++) {
var a = mS[n], i = r.getAttribute(a);
i != null && (t[Qf[a]] = i);
}
}
function $M(r, e) {
var t = e.width / r.width, n = e.height / r.height, a = Math.min(t, n);
return {
scale: a,
x: -(r.x + r.width / 2) * a + (e.x + e.width / 2),
y: -(r.y + r.height / 2) * a + (e.y + e.height / 2)
};
}
function xF(r, e) {
var t = new vF();
return t.parse(r, e);
}
var wF = K([
"rect",
"circle",
"line",
"ellipse",
"polygon",
"polyline",
"path",
"text",
"tspan",
"g"
]), bF = function() {
function r(e, t) {
this.type = "geoSVG", this._usedGraphicMap = K(), this._freedGraphics = [], this._mapName = e, this._parsedXML = FM(t);
}
return r.prototype.load = function() {
var e = this._firstGraphic;
if (!e) {
e = this._firstGraphic = this._buildGraphic(this._parsedXML), this._freedGraphics.push(e), this._boundingRect = this._firstGraphic.boundingRect.clone();
var t = CF(e.named), n = t.regions, a = t.regionsMap;
this._regions = n, this._regionsMap = a;
}
return {
boundingRect: this._boundingRect,
regions: this._regions,
regionsMap: this._regionsMap
};
}, r.prototype._buildGraphic = function(e) {
var t, n;
try {
t = e && xF(e, {
ignoreViewBox: !0,
ignoreRootClip: !0
}) || {}, n = t.root, Q(n != null);
} catch (g) {
throw new Error(`Invalid svg format
` + g.message);
}
var a = new nt();
a.add(n), a.isGeoSVGGraphicRoot = !0;
var i = t.width, o = t.height, s = t.viewBoxRect, l = this._boundingRect;
if (!l) {
var u = void 0, f = void 0, h = void 0, c = void 0;
if (i != null ? (u = 0, h = i) : s && (u = s.x, h = s.width), o != null ? (f = 0, c = o) : s && (f = s.y, c = s.height), u == null || f == null) {
var v = n.getBoundingRect();
u == null && (u = v.x, h = v.width), f == null && (f = v.y, c = v.height);
}
l = this._boundingRect = new ft(u, f, h, c);
}
if (s) {
var p = $M(s, l);
n.scaleX = n.scaleY = p.scale, n.x = p.x, n.y = p.y;
}
a.setClipPath(new xt({
shape: l.plain()
}));
var d = [];
return C(t.named, function(g) {
wF.get(g.svgNodeTagLower) != null && (d.push(g), TF(g.el));
}), {
root: a,
boundingRect: l,
named: d
};
}, r.prototype.useGraphic = function(e) {
var t = this._usedGraphicMap, n = t.get(e);
return n || (n = this._freedGraphics.pop() || this._buildGraphic(this._parsedXML), t.set(e, n), n);
}, r.prototype.freeGraphic = function(e) {
var t = this._usedGraphicMap, n = t.get(e);
n && (t.removeKey(e), this._freedGraphics.push(n));
}, r;
}();
function TF(r) {
r.silent = !1, r.isGroup && r.traverse(function(e) {
e.silent = !1;
});
}
function CF(r) {
var e = [], t = K();
return C(r, function(n) {
if (n.namedFrom == null) {
var a = new WB(n.name, n.el);
e.push(a), t.set(n.name, a);
}
}), {
regions: e,
regionsMap: t
};
}
var qd = [126, 25], CS = "\u5357\u6D77\u8BF8\u5C9B", $a = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];
for (var Ga = 0; Ga < $a.length; Ga++)
for (var $i = 0; $i < $a[Ga].length; $i++)
$a[Ga][$i][0] /= 10.5, $a[Ga][$i][1] /= -10.5 / 0.75, $a[Ga][$i][0] += qd[0], $a[Ga][$i][1] += qd[1];
function DF(r, e) {
if (r === "china") {
for (var t = 0; t < e.length; t++)
if (e[t].name === CS)
return;
e.push(new $A(CS, G($a, function(n) {
return {
type: "polygon",
exterior: n
};
}), qd));
}
}
var AF = {
\u5357\u6D77\u8BF8\u5C9B: [32, 80],
\u5E7F\u4E1C: [0, -10],
\u9999\u6E2F: [10, 5],
\u6FB3\u95E8: [-10, 10],
\u5929\u6D25: [5, 5]
};
function MF(r, e) {
if (r === "china") {
var t = AF[e.name];
if (t) {
var n = e.getCenter();
n[0] += t[0] / 10.5, n[1] += -t[1] / (10.5 / 0.75), e.setCenter(n);
}
}
}
var LF = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
function IF(r, e) {
r === "china" && e.name === "\u53F0\u6E7E" && e.geometries.push({
type: "polygon",
exterior: LF[0]
});
}
var EF = "name", PF = function() {
function r(e, t, n) {
this.type = "geoJSON", this._parsedMap = K(), this._mapName = e, this._specialAreas = n, this._geoJSON = RF(t);
}
return r.prototype.load = function(e, t) {
t = t || EF;
var n = this._parsedMap.get(t);
if (!n) {
var a = this._parseToRegions(t);
n = this._parsedMap.set(t, {
regions: a,
boundingRect: NF(a)
});
}
var i = K(), o = [];
return C(n.regions, function(s) {
var l = s.name;
e && U(e, l) && (s = s.cloneShallow(l = e[l])), o.push(s), i.set(l, s);
}), {
regions: o,
boundingRect: n.boundingRect || new ft(0, 0, 0, 0),
regionsMap: i
};
}, r.prototype._parseToRegions = function(e) {
var t = this._mapName, n = this._geoJSON, a;
try {
a = n ? YB(n, e) : [];
} catch (i) {
throw new Error(`Invalid geoJson format
` + i.message);
}
return DF(t, a), C(a, function(i) {
var o = i.name;
MF(t, i), IF(t, i);
var s = this._specialAreas && this._specialAreas[o];
s && i.transformTo(s.left, s.top, s.width, s.height);
}, this), a;
}, r.prototype.getMapForUser = function() {
return {
geoJson: this._geoJSON,
geoJSON: this._geoJSON,
specialAreas: this._specialAreas
};
}, r;
}();
function NF(r) {
for (var e, t = 0; t < r.length; t++) {
var n = r[t].getBoundingRect();
e = e || n.clone(), e.union(n);
}
return e;
}
function RF(r) {
return W(r) ? typeof JSON < "u" && JSON.parse ? JSON.parse(r) : new Function("return (" + r + ");")() : r;
}
var gs = K();
const Tn = {
registerMap: function(r, e, t) {
if (e.svg) {
var n = new bF(r, e.svg);
gs.set(r, n);
} else {
var a = e.geoJson || e.geoJSON;
a && !e.features ? t = e.specialAreas : a = e;
var n = new PF(r, a, t);
gs.set(r, n);
}
},
getGeoResource: function(r) {
return gs.get(r);
},
getMapForUser: function(r) {
var e = gs.get(r);
return e && e.type === "geoJSON" && e.getMapForUser();
},
load: function(r, e, t) {
var n = gs.get(r);
if (!n) {
process.env.NODE_ENV !== "production" && console.error("Map " + r + " not exists. The GeoJSON of the map must be provided.");
return;
}
return n.load(e, t);
}
};
var Hy = ["rect", "circle", "line", "ellipse", "polygon", "polyline", "path"], kF = K(Hy), OF = K(Hy.concat(["g"])), VF = K(Hy.concat(["g"])), WM = Tt();
function Ru(r) {
var e = r.getItemStyle(), t = r.get("areaColor");
return t != null && (e.fill = t), e;
}
function DS(r) {
var e = r.style;
e && (e.stroke = e.stroke || e.fill, e.fill = null);
}
var BF = function() {
function r(e) {
var t = new nt();
this.uid = Bo("ec_map_draw"), this._controller = new Wl(e.getZr()), this._controllerHost = {
target: t
}, this.group = t, t.add(this._regionsGroup = new nt()), t.add(this._svgGroup = new nt());
}
return r.prototype.draw = function(e, t, n, a, i) {
var o = e.mainType === "geo", s = e.getData && e.getData();
o && t.eachComponent({
mainType: "series",
subType: "map"
}, function(y) {
!s && y.getHostGeoModel() === e && (s = y.getData());
});
var l = e.coordinateSystem, u = this._regionsGroup, f = this.group, h = l.getTransformInfo(), c = h.raw, v = h.roam, p = !u.childAt(0) || i;
p ? (f.x = v.x, f.y = v.y, f.scaleX = v.scaleX, f.scaleY = v.scaleY, f.dirty()) : bt(f, v, e);
var d = s && s.getVisual("visualMeta") && s.getVisual("visualMeta").length > 0, g = {
api: n,
geo: l,
mapOrGeoModel: e,
data: s,
isVisualEncodedByVisualMap: d,
isGeo: o,
transformInfoRaw: c
};
l.resourceType === "geoJSON" ? this._buildGeoJSON(g) : l.resourceType === "geoSVG" && this._buildSVG(g), this._updateController(e, t, n), this._updateMapSelectHandler(e, u, n, a);
}, r.prototype._buildGeoJSON = function(e) {
var t = this._regionsGroupByName = K(), n = K(), a = this._regionsGroup, i = e.transformInfoRaw, o = e.mapOrGeoModel, s = e.data, l = e.geo.projection, u = l && l.stream;
function f(v, p) {
return p && (v = p(v)), v && [v[0] * i.scaleX + i.x, v[1] * i.scaleY + i.y];
}
function h(v) {
for (var p = [], d = !u && l && l.project, g = 0; g < v.length; ++g) {
var y = f(v[g], d);
y && p.push(y);
}
return p;
}
function c(v) {
return {
shape: {
points: h(v)
}
};
}
a.removeAll(), C(e.geo.regions, function(v) {
var p = v.name, d = t.get(p), g = n.get(p) || {}, y = g.dataIdx, m = g.regionModel;
d || (d = t.set(p, new nt()), a.add(d), y = s ? s.indexOfName(p) : null, m = e.isGeo ? o.getRegionModel(p) : s ? s.getItemModel(y) : null, n.set(p, {
dataIdx: y,
regionModel: m
}));
var _ = [], S = [];
C(v.geometries, function(b) {
if (b.type === "polygon") {
var T = [b.exterior].concat(b.interiors || []);
u && (T = PS(T, u)), C(T, function(A) {
_.push(new Be(c(A)));
});
} else {
var D = b.points;
u && (D = PS(D, u, !0)), C(D, function(A) {
S.push(new ze(c(A)));
});
}
});
var w = f(v.getCenter(), l && l.project);
function x(b, T) {
if (!!b.length) {
var D = new Jg({
culling: !0,
segmentIgnoreThreshold: 1,
shape: {
paths: b
}
});
d.add(D), AS(e, D, y, m), MS(e, D, p, m, o, y, w), T && (DS(D), C(D.states, DS));
}
}
x(_), x(S, !0);
}), t.each(function(v, p) {
var d = n.get(p), g = d.dataIdx, y = d.regionModel;
LS(e, v, p, y, o, g), IS(e, v, p, y, o), ES(e, v, p, y, o);
}, this);
}, r.prototype._buildSVG = function(e) {
var t = e.geo.map, n = e.transformInfoRaw;
this._svgGroup.x = n.x, this._svgGroup.y = n.y, this._svgGroup.scaleX = n.scaleX, this._svgGroup.scaleY = n.scaleY, this._svgResourceChanged(t) && (this._freeSVG(), this._useSVG(t));
var a = this._svgDispatcherMap = K(), i = !1;
C(this._svgGraphicRecord.named, function(o) {
var s = o.name, l = e.mapOrGeoModel, u = e.data, f = o.svgNodeTagLower, h = o.el, c = u ? u.indexOfName(s) : null, v = l.getRegionModel(s);
if (kF.get(f) != null && h instanceof cr && AS(e, h, c, v), h instanceof cr && (h.culling = !0), h.z2EmphasisLift = 0, !o.namedFrom && (VF.get(f) != null && MS(e, h, s, v, l, c, null), LS(e, h, s, v, l, c), IS(e, h, s, v, l), OF.get(f) != null)) {
var p = ES(e, h, s, v, l);
p === "self" && (i = !0);
var d = a.get(s) || a.set(s, []);
d.push(h);
}
}, this), this._enableBlurEntireSVG(i, e);
}, r.prototype._enableBlurEntireSVG = function(e, t) {
if (e && t.isGeo) {
var n = t.mapOrGeoModel.getModel(["blur", "itemStyle"]).getItemStyle(), a = n.opacity;
this._svgGraphicRecord.root.traverse(function(i) {
if (!i.isGroup) {
yi(i);
var o = i.ensureState("blur").style || {};
o.opacity == null && a != null && (o.opacity = a), i.ensureState("emphasis");
}
});
}
}, r.prototype.remove = function() {
this._regionsGroup.removeAll(), this._regionsGroupByName = null, this._svgGroup.removeAll(), this._freeSVG(), this._controller.dispose(), this._controllerHost = null;
}, r.prototype.findHighDownDispatchers = function(e, t) {
if (e == null)
return [];
var n = t.coordinateSystem;
if (n.resourceType === "geoJSON") {
var a = this._regionsGroupByName;
if (a) {
var i = a.get(e);
return i ? [i] : [];
}
} else if (n.resourceType === "geoSVG")
return this._svgDispatcherMap && this._svgDispatcherMap.get(e) || [];
}, r.prototype._svgResourceChanged = function(e) {
return this._svgMapName !== e;
}, r.prototype._useSVG = function(e) {
var t = Tn.getGeoResource(e);
if (t && t.type === "geoSVG") {
var n = t.useGraphic(this.uid);
this._svgGroup.add(n.root), this._svgGraphicRecord = n, this._svgMapName = e;
}
}, r.prototype._freeSVG = function() {
var e = this._svgMapName;
if (e != null) {
var t = Tn.getGeoResource(e);
t && t.type === "geoSVG" && t.freeGraphic(this.uid), this._svgGraphicRecord = null, this._svgDispatcherMap = null, this._svgGroup.removeAll(), this._svgMapName = null;
}
}, r.prototype._updateController = function(e, t, n) {
var a = e.coordinateSystem, i = this._controller, o = this._controllerHost;
o.zoomLimit = e.get("scaleLimit"), o.zoom = a.getZoom(), i.enable(e.get("roam") || !1);
var s = e.mainType;
function l() {
var u = {
type: "geoRoam",
componentType: s
};
return u[s + "Id"] = e.id, u;
}
i.off("pan").on("pan", function(u) {
this._mouseDownFlag = !1, Gy(o, u.dx, u.dy), n.dispatchAction(B(l(), {
dx: u.dx,
dy: u.dy,
animation: {
duration: 0
}
}));
}, this), i.off("zoom").on("zoom", function(u) {
this._mouseDownFlag = !1, Fy(o, u.scale, u.originX, u.originY), n.dispatchAction(B(l(), {
zoom: u.scale,
originX: u.originX,
originY: u.originY,
animation: {
duration: 0
}
}));
}, this), i.setPointerChecker(function(u, f, h) {
return a.containPoint([f, h]) && !tc(u, n, e);
});
}, r.prototype.resetForLabelLayout = function() {
this.group.traverse(function(e) {
var t = e.getTextContent();
t && (t.ignore = WM(t).ignore);
});
}, r.prototype._updateMapSelectHandler = function(e, t, n, a) {
var i = this;
t.off("mousedown"), t.off("click"), e.get("selectedMode") && (t.on("mousedown", function() {
i._mouseDownFlag = !0;
}), t.on("click", function(o) {
!i._mouseDownFlag || (i._mouseDownFlag = !1);
}));
}, r;
}();
function AS(r, e, t, n) {
var a = n.getModel("itemStyle"), i = n.getModel(["emphasis", "itemStyle"]), o = n.getModel(["blur", "itemStyle"]), s = n.getModel(["select", "itemStyle"]), l = Ru(a), u = Ru(i), f = Ru(s), h = Ru(o), c = r.data;
if (c) {
var v = c.getItemVisual(t, "style"), p = c.getItemVisual(t, "decal");
r.isVisualEncodedByVisualMap && v.fill && (l.fill = v.fill), p && (l.decal = bo(p, r.api));
}
e.setStyle(l), e.style.strokeNoScale = !0, e.ensureState("emphasis").style = u, e.ensureState("select").style = f, e.ensureState("blur").style = h, yi(e);
}
function MS(r, e, t, n, a, i, o) {
var s = r.data, l = r.isGeo, u = s && isNaN(s.get(s.mapDimension("value"), i)), f = s && s.getItemLayout(i);
if (l || u || f && f.showLabel) {
var h = l ? t : i, c = void 0;
(!s || i >= 0) && (c = a);
var v = o ? {
normal: {
align: "center",
verticalAlign: "middle"
}
} : null;
xe(e, se(n), {
labelFetcher: c,
labelDataIndex: h,
defaultText: t
}, v);
var p = e.getTextContent();
if (p && (WM(p).ignore = p.ignore, e.textConfig && o)) {
var d = e.getBoundingRect().clone();
e.textConfig.layoutRect = d, e.textConfig.position = [(o[0] - d.x) / d.width * 100 + "%", (o[1] - d.y) / d.height * 100 + "%"];
}
e.disableLabelAnimation = !0;
} else
e.removeTextContent(), e.removeTextConfig(), e.disableLabelAnimation = null;
}
function LS(r, e, t, n, a, i) {
r.data ? r.data.setItemGraphicEl(i, e) : at(e).eventData = {
componentType: "geo",
componentIndex: a.componentIndex,
geoIndex: a.componentIndex,
name: t,
region: n && n.option || {}
};
}
function IS(r, e, t, n, a) {
r.data || Oo({
el: e,
componentModel: a,
itemName: t,
itemTooltipOption: n.get("tooltip")
});
}
function ES(r, e, t, n, a) {
e.highDownSilentOnTouch = !!a.get("selectedMode");
var i = n.getModel("emphasis"), o = i.get("focus");
return Ut(e, o, i.get("blurScope"), i.get("disabled")), r.isGeo && VN(e, a, t), o;
}
function PS(r, e, t) {
var n = [], a;
function i() {
a = [];
}
function o() {
a.length && (n.push(a), a = []);
}
var s = e({
polygonStart: i,
polygonEnd: o,
lineStart: i,
lineEnd: o,
point: function(l, u) {
isFinite(l) && isFinite(u) && a.push([l, u]);
},
sphere: function() {
}
});
return !t && s.polygonStart(), C(r, function(l) {
s.lineStart();
for (var u = 0; u < l.length; u++)
s.point(l[u][0], l[u][1]);
s.lineEnd();
}), !t && s.polygonEnd(), n;
}
const UM = BF;
var zF = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a, i) {
if (!(i && i.type === "mapToggleSelect" && i.from === this.uid)) {
var o = this.group;
if (o.removeAll(), !t.getHostGeoModel()) {
if (this._mapDraw && i && i.type === "geoRoam" && this._mapDraw.resetForLabelLayout(), i && i.type === "geoRoam" && i.componentType === "series" && i.seriesId === t.id) {
var s = this._mapDraw;
s && o.add(s.group);
} else if (t.needsDrawMap) {
var s = this._mapDraw || new UM(a);
o.add(s.group), s.draw(t, n, a, this, i), this._mapDraw = s;
} else
this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
t.get("showLegendSymbol") && n.getComponent("legend") && this._renderSymbols(t, n, a);
}
}
}, e.prototype.remove = function() {
this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
}, e.prototype.dispose = function() {
this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
}, e.prototype._renderSymbols = function(t, n, a) {
var i = t.originalData, o = this.group;
i.each(i.mapDimension("value"), function(s, l) {
if (!isNaN(s)) {
var u = i.getItemLayout(l);
if (!(!u || !u.point)) {
var f = u.point, h = u.offset, c = new Qr({
style: {
fill: t.getData().getVisual("style").fill
},
shape: {
cx: f[0] + h * 9,
cy: f[1],
r: 3
},
silent: !0,
z2: 8 + (h ? 0 : Ro + 1)
});
if (!h) {
var v = t.mainSeries.getData(), p = i.getName(l), d = v.indexOfName(p), g = i.getItemModel(l), y = g.getModel("label"), m = v.getItemGraphicEl(d);
xe(c, se(g), {
labelFetcher: {
getFormattedLabel: function(_, S) {
return t.getFormattedLabel(d, S);
}
},
defaultText: p
}), c.disableLabelAnimation = !0, y.get("position") || c.setTextConfig({
position: "bottom"
}), m.onHoverStateChange = function(_) {
Lf(c, _);
};
}
o.add(c);
}
}
});
}, e.type = "map", e;
}(Ot);
const GF = zF;
var FF = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.needsDrawMap = !1, t.seriesGroup = [], t.getTooltipPosition = function(n) {
if (n != null) {
var a = this.getData().getName(n), i = this.coordinateSystem, o = i.getRegion(a);
return o && i.dataToPoint(o.getCenter());
}
}, t;
}
return e.prototype.getInitialData = function(t) {
for (var n = Zo(this, {
coordDimensions: ["value"],
encodeDefaulter: it(sy, this)
}), a = K(), i = [], o = 0, s = n.count(); o < s; o++) {
var l = n.getName(o);
a.set(l, !0);
}
var u = Tn.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);
return C(u.regions, function(f) {
var h = f.name;
a.get(h) || i.push(h);
}), n.appendValues([], i), n;
}, e.prototype.getHostGeoModel = function() {
var t = this.option.geoIndex;
return t != null ? this.ecModel.getComponent("geo", t) : null;
}, e.prototype.getMapType = function() {
return (this.getHostGeoModel() || this).option.map;
}, e.prototype.getRawValue = function(t) {
var n = this.getData();
return n.get(n.mapDimension("value"), t);
}, e.prototype.getRegionModel = function(t) {
var n = this.getData();
return n.getItemModel(n.indexOfName(t));
}, e.prototype.formatTooltip = function(t, n, a) {
for (var i = this.getData(), o = this.getRawValue(t), s = i.getName(t), l = this.seriesGroup, u = [], f = 0; f < l.length; f++) {
var h = l[f].originalData.indexOfName(s), c = i.mapDimension("value");
isNaN(l[f].originalData.get(c, h)) || u.push(l[f].name);
}
return ae("section", {
header: u.join(", "),
noHeader: !u.length,
blocks: [ae("nameValue", {
name: s,
value: o
})]
});
}, e.prototype.setZoom = function(t) {
this.option.zoom = t;
}, e.prototype.setCenter = function(t) {
this.option.center = t;
}, e.prototype.getLegendIcon = function(t) {
var n = t.icon || "roundRect", a = Jt(n, 0, 0, t.itemWidth, t.itemHeight, t.itemStyle.fill);
return a.setStyle(t.itemStyle), a.style.stroke = "none", n.indexOf("empty") > -1 && (a.style.stroke = a.style.fill, a.style.fill = "#fff", a.style.lineWidth = 2), a;
}, e.type = "series.map", e.dependencies = ["geo"], e.layoutMode = "box", e.defaultOption = {
z: 2,
coordinateSystem: "geo",
map: "",
left: "center",
top: "center",
aspectScale: null,
showLegendSymbol: !0,
boundingCoords: null,
center: null,
zoom: 1,
scaleLimit: null,
selectedMode: !0,
label: {
show: !1,
color: "#000"
},
itemStyle: {
borderWidth: 0.5,
borderColor: "#444",
areaColor: "#eee"
},
emphasis: {
label: {
show: !0,
color: "rgb(100,0,0)"
},
itemStyle: {
areaColor: "rgba(255,215,0,0.8)"
}
},
select: {
label: {
show: !0,
color: "rgb(100,0,0)"
},
itemStyle: {
color: "rgba(255,215,0,0.8)"
}
},
nameProperty: "name"
}, e;
}(Gt);
const HF = FF;
function $F(r, e) {
var t = {};
return C(r, function(n) {
n.each(n.mapDimension("value"), function(a, i) {
var o = "ec-" + n.getName(i);
t[o] = t[o] || [], isNaN(a) || t[o].push(a);
});
}), r[0].map(r[0].mapDimension("value"), function(n, a) {
for (var i = "ec-" + r[0].getName(a), o = 0, s = 1 / 0, l = -1 / 0, u = t[i].length, f = 0; f < u; f++)
s = Math.min(s, t[i][f]), l = Math.max(l, t[i][f]), o += t[i][f];
var h;
return e === "min" ? h = s : e === "max" ? h = l : e === "average" ? h = o / u : h = o, u === 0 ? NaN : h;
});
}
function WF(r) {
var e = {};
r.eachSeriesByType("map", function(t) {
var n = t.getHostGeoModel(), a = n ? "o" + n.id : "i" + t.getMapType();
(e[a] = e[a] || []).push(t);
}), C(e, function(t, n) {
for (var a = $F(G(t, function(o) {
return o.getData();
}), t[0].get("mapValueCalculation")), i = 0; i < t.length; i++)
t[i].originalData = t[i].getData();
for (var i = 0; i < t.length; i++)
t[i].seriesGroup = t, t[i].needsDrawMap = i === 0 && !t[i].getHostGeoModel(), t[i].setData(a.cloneShallow()), t[i].mainSeries = t[0];
});
}
function UF(r) {
var e = {};
r.eachSeriesByType("map", function(t) {
var n = t.getMapType();
if (!(t.getHostGeoModel() || e[n])) {
var a = {};
C(t.seriesGroup, function(o) {
var s = o.coordinateSystem, l = o.originalData;
o.get("showLegendSymbol") && r.getComponent("legend") && l.each(l.mapDimension("value"), function(u, f) {
var h = l.getName(f), c = s.getRegion(h);
if (!(!c || isNaN(u))) {
var v = a[h] || 0, p = s.dataToPoint(c.getCenter());
a[h] = v + 1, l.setItemLayout(f, {
point: p,
offset: v
});
}
});
});
var i = t.getData();
i.each(function(o) {
var s = i.getName(o), l = i.getItemLayout(o) || {};
l.showLabel = !a[s], i.setItemLayout(o, l);
}), e[n] = !0;
}
});
}
var NS = ue, YF = function(r) {
R(e, r);
function e(t) {
var n = r.call(this) || this;
return n.type = "view", n.dimensions = ["x", "y"], n._roamTransformable = new un(), n._rawTransformable = new un(), n.name = t, n;
}
return e.prototype.setBoundingRect = function(t, n, a, i) {
return this._rect = new ft(t, n, a, i), this._rect;
}, e.prototype.getBoundingRect = function() {
return this._rect;
}, e.prototype.setViewRect = function(t, n, a, i) {
this._transformTo(t, n, a, i), this._viewRect = new ft(t, n, a, i);
}, e.prototype._transformTo = function(t, n, a, i) {
var o = this.getBoundingRect(), s = this._rawTransformable;
s.transform = o.calculateTransform(new ft(t, n, a, i));
var l = s.parent;
s.parent = null, s.decomposeTransform(), s.parent = l, this._updateTransform();
}, e.prototype.setCenter = function(t, n) {
!t || (this._center = [H(t[0], n.getWidth()), H(t[1], n.getHeight())], this._updateCenterAndZoom());
}, e.prototype.setZoom = function(t) {
t = t || 1;
var n = this.zoomLimit;
n && (n.max != null && (t = Math.min(n.max, t)), n.min != null && (t = Math.max(n.min, t))), this._zoom = t, this._updateCenterAndZoom();
}, e.prototype.getDefaultCenter = function() {
var t = this.getBoundingRect(), n = t.x + t.width / 2, a = t.y + t.height / 2;
return [n, a];
}, e.prototype.getCenter = function() {
return this._center || this.getDefaultCenter();
}, e.prototype.getZoom = function() {
return this._zoom || 1;
}, e.prototype.getRoamTransform = function() {
return this._roamTransformable.getLocalTransform();
}, e.prototype._updateCenterAndZoom = function() {
var t = this._rawTransformable.getLocalTransform(), n = this._roamTransformable, a = this.getDefaultCenter(), i = this.getCenter(), o = this.getZoom();
i = ue([], i, t), a = ue([], a, t), n.originX = i[0], n.originY = i[1], n.x = a[0] - i[0], n.y = a[1] - i[1], n.scaleX = n.scaleY = o, this._updateTransform();
}, e.prototype._updateTransform = function() {
var t = this._roamTransformable, n = this._rawTransformable;
n.parent = t, t.updateTransform(), n.updateTransform(), Og(this.transform || (this.transform = []), n.transform || hr()), this._rawTransform = n.getLocalTransform(), this.invTransform = this.invTransform || [], Po(this.invTransform, this.transform), this.decomposeTransform();
}, e.prototype.getTransformInfo = function() {
var t = this._rawTransformable, n = this._roamTransformable, a = new un();
return a.transform = n.transform, a.decomposeTransform(), {
roam: {
x: a.x,
y: a.y,
scaleX: a.scaleX,
scaleY: a.scaleY
},
raw: {
x: t.x,
y: t.y,
scaleX: t.scaleX,
scaleY: t.scaleY
}
};
}, e.prototype.getViewRect = function() {
return this._viewRect;
}, e.prototype.getViewRectAfterRoam = function() {
var t = this.getBoundingRect().clone();
return t.applyTransform(this.transform), t;
}, e.prototype.dataToPoint = function(t, n, a) {
var i = n ? this._rawTransform : this.transform;
return a = a || [], i ? NS(a, t, i) : be(a, t);
}, e.prototype.pointToData = function(t) {
var n = this.invTransform;
return n ? NS([], t, n) : [t[0], t[1]];
}, e.prototype.convertToPixel = function(t, n, a) {
var i = RS(n);
return i === this ? i.dataToPoint(a) : null;
}, e.prototype.convertFromPixel = function(t, n, a) {
var i = RS(n);
return i === this ? i.pointToData(a) : null;
}, e.prototype.containPoint = function(t) {
return this.getViewRectAfterRoam().contain(t[0], t[1]);
}, e.dimensions = ["x", "y"], e;
}(un);
function RS(r) {
var e = r.seriesModel;
return e ? e.coordinateSystem : null;
}
const Ul = YF;
var ZF = {
geoJSON: {
aspectScale: 0.75,
invertLongitute: !0
},
geoSVG: {
aspectScale: 1,
invertLongitute: !1
}
}, YM = ["lng", "lat"], ZM = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this, t) || this;
i.dimensions = YM, i.type = "geo", i._nameCoordMap = K(), i.map = n;
var o = a.projection, s = Tn.load(n, a.nameMap, a.nameProperty), l = Tn.getGeoResource(n), u = i.resourceType = l ? l.type : null, f = i.regions = s.regions, h = ZF[l.type];
i._regionsMap = s.regionsMap, i.regions = s.regions, process.env.NODE_ENV !== "production" && o && (u === "geoSVG" && (process.env.NODE_ENV !== "production" && _e("Map " + n + " with SVG source can't use projection. Only GeoJSON source supports projection."), o = null), o.project && o.unproject || (process.env.NODE_ENV !== "production" && _e("project and unproject must be both provided in the projeciton."), o = null)), i.projection = o;
var c;
if (o)
for (var v = 0; v < f.length; v++) {
var p = f[v].getBoundingRect(o);
c = c || p.clone(), c.union(p);
}
else
c = s.boundingRect;
return i.setBoundingRect(c.x, c.y, c.width, c.height), i.aspectScale = o ? 1 : vt(a.aspectScale, h.aspectScale), i._invertLongitute = o ? !1 : h.invertLongitute, i;
}
return e.prototype._transformTo = function(t, n, a, i) {
var o = this.getBoundingRect(), s = this._invertLongitute;
o = o.clone(), s && (o.y = -o.y - o.height);
var l = this._rawTransformable;
l.transform = o.calculateTransform(new ft(t, n, a, i));
var u = l.parent;
l.parent = null, l.decomposeTransform(), l.parent = u, s && (l.scaleY = -l.scaleY), this._updateTransform();
}, e.prototype.getRegion = function(t) {
return this._regionsMap.get(t);
}, e.prototype.getRegionByCoord = function(t) {
for (var n = this.regions, a = 0; a < n.length; a++) {
var i = n[a];
if (i.type === "geoJSON" && i.contain(t))
return n[a];
}
}, e.prototype.addGeoCoord = function(t, n) {
this._nameCoordMap.set(t, n);
}, e.prototype.getGeoCoord = function(t) {
var n = this._regionsMap.get(t);
return this._nameCoordMap.get(t) || n && n.getCenter();
}, e.prototype.dataToPoint = function(t, n, a) {
if (W(t) && (t = this.getGeoCoord(t)), t) {
var i = this.projection;
return i && (t = i.project(t)), t && this.projectedToPoint(t, n, a);
}
}, e.prototype.pointToData = function(t) {
var n = this.projection;
return n && (t = n.unproject(t)), t && this.pointToProjected(t);
}, e.prototype.pointToProjected = function(t) {
return r.prototype.pointToData.call(this, t);
}, e.prototype.projectedToPoint = function(t, n, a) {
return r.prototype.dataToPoint.call(this, t, n, a);
}, e.prototype.convertToPixel = function(t, n, a) {
var i = kS(n);
return i === this ? i.dataToPoint(a) : null;
}, e.prototype.convertFromPixel = function(t, n, a) {
var i = kS(n);
return i === this ? i.pointToData(a) : null;
}, e;
}(Ul);
Qt(ZM, Ul);
function kS(r) {
var e = r.geoModel, t = r.seriesModel;
return e ? e.coordinateSystem : t ? t.coordinateSystem || (t.getReferringComponents("geo", Kt).models[0] || {}).coordinateSystem : null;
}
const OS = ZM;
function VS(r, e) {
var t = r.get("boundingCoords");
if (t != null) {
var n = t[0], a = t[1];
if (!(isFinite(n[0]) && isFinite(n[1]) && isFinite(a[0]) && isFinite(a[1])))
process.env.NODE_ENV !== "production" && console.error("Invalid boundingCoords");
else {
var i = this.projection;
if (i) {
var o = n[0], s = n[1], l = a[0], u = a[1];
n = [1 / 0, 1 / 0], a = [-1 / 0, -1 / 0];
var f = function(x, b, T, D) {
for (var A = T - x, M = D - b, L = 0; L <= 100; L++) {
var I = L / 100, E = i.project([x + A * I, b + M * I]);
Wn(n, n, E), Un(a, a, E);
}
};
f(o, s, l, s), f(l, s, l, u), f(l, u, o, u), f(o, u, l, s);
}
this.setBoundingRect(n[0], n[1], a[0] - n[0], a[1] - n[1]);
}
}
var h = this.getBoundingRect(), c = r.get("layoutCenter"), v = r.get("layoutSize"), p = e.getWidth(), d = e.getHeight(), g = h.width / h.height * this.aspectScale, y = !1, m, _;
c && v && (m = [H(c[0], p), H(c[1], d)], _ = H(v, Math.min(p, d)), !isNaN(m[0]) && !isNaN(m[1]) && !isNaN(_) ? y = !0 : process.env.NODE_ENV !== "production" && console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));
var S;
if (y)
S = {}, g > 1 ? (S.width = _, S.height = _ / g) : (S.height = _, S.width = _ * g), S.y = m[1] - S.height / 2, S.x = m[0] - S.width / 2;
else {
var w = r.getBoxLayoutParams();
w.aspect = g, S = ee(w, {
width: p,
height: d
});
}
this.setViewRect(S.x, S.y, S.width, S.height), this.setCenter(r.get("center"), e), this.setZoom(r.get("zoom"));
}
function XF(r, e) {
C(e.get("geoCoord"), function(t, n) {
r.addGeoCoord(n, t);
});
}
var qF = function() {
function r() {
this.dimensions = YM;
}
return r.prototype.create = function(e, t) {
var n = [];
function a(o) {
return {
nameProperty: o.get("nameProperty"),
aspectScale: o.get("aspectScale"),
projection: o.get("projection")
};
}
e.eachComponent("geo", function(o, s) {
var l = o.get("map"), u = new OS(l + s, l, B({
nameMap: o.get("nameMap")
}, a(o)));
u.zoomLimit = o.get("scaleLimit"), n.push(u), o.coordinateSystem = u, u.model = o, u.resize = VS, u.resize(o, t);
}), e.eachSeries(function(o) {
var s = o.get("coordinateSystem");
if (s === "geo") {
var l = o.get("geoIndex") || 0;
o.coordinateSystem = n[l];
}
});
var i = {};
return e.eachSeriesByType("map", function(o) {
if (!o.getHostGeoModel()) {
var s = o.getMapType();
i[s] = i[s] || [], i[s].push(o);
}
}), C(i, function(o, s) {
var l = G(o, function(f) {
return f.get("nameMap");
}), u = new OS(s, s, B({
nameMap: Ig(l)
}, a(o[0])));
u.zoomLimit = qt.apply(null, G(o, function(f) {
return f.get("scaleLimit");
})), n.push(u), u.resize = VS, u.resize(o[0], t), C(o, function(f) {
f.coordinateSystem = u, XF(u, f);
});
}), n;
}, r.prototype.getFilledRegions = function(e, t, n, a) {
for (var i = (e || []).slice(), o = K(), s = 0; s < i.length; s++)
o.set(i[s].name, i[s]);
var l = Tn.load(t, n, a);
return C(l.regions, function(u) {
var f = u.name;
!o.get(f) && i.push({
name: f
});
}), i;
}, r;
}(), KF = new qF();
const XM = KF;
var jF = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n, a) {
var i = Tn.getGeoResource(t.map);
if (i && i.type === "geoJSON") {
var o = t.itemStyle = t.itemStyle || {};
"color" in o || (o.color = "#eee");
}
this.mergeDefaultAndTheme(t, a), pi(t, "label", ["show"]);
}, e.prototype.optionUpdated = function() {
var t = this, n = this.option;
n.regions = XM.getFilledRegions(n.regions, n.map, n.nameMap, n.nameProperty);
var a = {};
this._optionModelMap = Xr(n.regions || [], function(i, o) {
var s = o.name;
return s && (i.set(s, new kt(o, t, t.ecModel)), o.selected && (a[s] = !0)), i;
}, K()), n.selectedMap || (n.selectedMap = a);
}, e.prototype.getRegionModel = function(t) {
return this._optionModelMap.get(t) || new kt(null, this, this.ecModel);
}, e.prototype.getFormattedLabel = function(t, n) {
var a = this.getRegionModel(t), i = n === "normal" ? a.get(["label", "formatter"]) : a.get(["emphasis", "label", "formatter"]), o = {
name: t
};
if (q(i))
return o.status = n, i(o);
if (W(i))
return i.replace("{a}", t != null ? t : "");
}, e.prototype.setZoom = function(t) {
this.option.zoom = t;
}, e.prototype.setCenter = function(t) {
this.option.center = t;
}, e.prototype.select = function(t) {
var n = this.option, a = n.selectedMode;
if (!!a) {
a !== "multiple" && (n.selectedMap = null);
var i = n.selectedMap || (n.selectedMap = {});
i[t] = !0;
}
}, e.prototype.unSelect = function(t) {
var n = this.option.selectedMap;
n && (n[t] = !1);
}, e.prototype.toggleSelected = function(t) {
this[this.isSelected(t) ? "unSelect" : "select"](t);
}, e.prototype.isSelected = function(t) {
var n = this.option.selectedMap;
return !!(n && n[t]);
}, e.type = "geo", e.layoutMode = "box", e.defaultOption = {
z: 0,
show: !0,
left: "center",
top: "center",
aspectScale: null,
silent: !1,
map: "",
boundingCoords: null,
center: null,
zoom: 1,
scaleLimit: null,
label: {
show: !1,
color: "#000"
},
itemStyle: {
borderWidth: 0.5,
borderColor: "#444"
},
emphasis: {
label: {
show: !0,
color: "rgb(100,0,0)"
},
itemStyle: {
color: "rgba(255,215,0,0.8)"
}
},
select: {
label: {
show: !0,
color: "rgb(100,0,0)"
},
itemStyle: {
color: "rgba(255,215,0,0.8)"
}
},
regions: []
}, e;
}(_t);
const JF = jF;
function BS(r, e) {
return r.pointToProjected ? r.pointToProjected(e) : r.pointToData(e);
}
function $y(r, e, t, n) {
var a = r.getZoom(), i = r.getCenter(), o = e.zoom, s = r.projectedToPoint ? r.projectedToPoint(i) : r.dataToPoint(i);
if (e.dx != null && e.dy != null && (s[0] -= e.dx, s[1] -= e.dy, r.setCenter(BS(r, s), n)), o != null) {
if (t) {
var l = t.min || 0, u = t.max || 1 / 0;
o = Math.max(Math.min(a * o, u), l) / a;
}
r.scaleX *= o, r.scaleY *= o;
var f = (e.originX - r.x) * (o - 1), h = (e.originY - r.y) * (o - 1);
r.x -= f, r.y -= h, r.updateTransform(), r.setCenter(BS(r, s), n), r.setZoom(o * a);
}
return {
center: r.getCenter(),
zoom: r.getZoom()
};
}
var QF = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.focusBlurEnabled = !0, t;
}
return e.prototype.init = function(t, n) {
this._api = n;
}, e.prototype.render = function(t, n, a, i) {
if (this._model = t, !t.get("show")) {
this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
return;
}
this._mapDraw || (this._mapDraw = new UM(a));
var o = this._mapDraw;
o.draw(t, n, a, this, i), o.group.on("click", this._handleRegionClick, this), o.group.silent = t.get("silent"), this.group.add(o.group), this.updateSelectStatus(t, n, a);
}, e.prototype._handleRegionClick = function(t) {
var n;
oo(t.target, function(a) {
return (n = at(a).eventData) != null;
}, !0), n && this._api.dispatchAction({
type: "geoToggleSelect",
geoId: this._model.id,
name: n.name
});
}, e.prototype.updateSelectStatus = function(t, n, a) {
var i = this;
this._mapDraw.group.traverse(function(o) {
var s = at(o).eventData;
if (s)
return i._model.isSelected(s.name) ? a.enterSelect(o) : a.leaveSelect(o), !0;
});
}, e.prototype.findHighDownDispatchers = function(t) {
return this._mapDraw && this._mapDraw.findHighDownDispatchers(t, this._model);
}, e.prototype.dispose = function() {
this._mapDraw && this._mapDraw.remove();
}, e.type = "geo", e;
}(Ht);
const t3 = QF;
function e3(r, e, t) {
Tn.registerMap(r, e, t);
}
function qM(r) {
r.registerCoordinateSystem("geo", XM), r.registerComponentModel(JF), r.registerComponentView(t3), r.registerImpl("registerMap", e3), r.registerImpl("getMap", function(t) {
return Tn.getMapForUser(t);
});
function e(t, n) {
n.update = "geo:updateSelectStatus", r.registerAction(n, function(a, i) {
var o = {}, s = [];
return i.eachComponent({
mainType: "geo",
query: a
}, function(l) {
l[t](a.name);
var u = l.coordinateSystem;
C(u.regions, function(h) {
o[h.name] = l.isSelected(h.name) || !1;
});
var f = [];
C(o, function(h, c) {
o[c] && f.push(c);
}), s.push({
geoIndex: l.componentIndex,
name: f
});
}), {
selected: o,
allSelected: s,
name: a.name
};
});
}
e("toggleSelected", {
type: "geoToggleSelect",
event: "geoselectchanged"
}), e("select", {
type: "geoSelect",
event: "geoselected"
}), e("unSelect", {
type: "geoUnSelect",
event: "geounselected"
}), r.registerAction({
type: "geoRoam",
event: "geoRoam",
update: "updateTransform"
}, function(t, n, a) {
var i = t.componentType || "series";
n.eachComponent({
mainType: i,
query: t
}, function(o) {
var s = o.coordinateSystem;
if (s.type === "geo") {
var l = $y(s, t, o.get("scaleLimit"), a);
o.setCenter && o.setCenter(l.center), o.setZoom && o.setZoom(l.zoom), i === "series" && C(o.seriesGroup, function(u) {
u.setCenter(l.center), u.setZoom(l.zoom);
});
}
});
});
}
function r3(r) {
pt(qM), r.registerChartView(GF), r.registerSeriesModel(HF), r.registerLayout(UF), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, WF), XD("map", r.registerAction);
}
function n3(r) {
var e = r;
e.hierNode = {
defaultAncestor: null,
ancestor: e,
prelim: 0,
modifier: 0,
change: 0,
shift: 0,
i: 0,
thread: null
};
for (var t = [e], n, a; n = t.pop(); )
if (a = n.children, n.isExpand && a.length)
for (var i = a.length, o = i - 1; o >= 0; o--) {
var s = a[o];
s.hierNode = {
defaultAncestor: null,
ancestor: s,
prelim: 0,
modifier: 0,
change: 0,
shift: 0,
i: o,
thread: null
}, t.push(s);
}
}
function a3(r, e) {
var t = r.isExpand ? r.children : [], n = r.parentNode.children, a = r.hierNode.i ? n[r.hierNode.i - 1] : null;
if (t.length) {
s3(r);
var i = (t[0].hierNode.prelim + t[t.length - 1].hierNode.prelim) / 2;
a ? (r.hierNode.prelim = a.hierNode.prelim + e(r, a), r.hierNode.modifier = r.hierNode.prelim - i) : r.hierNode.prelim = i;
} else
a && (r.hierNode.prelim = a.hierNode.prelim + e(r, a));
r.parentNode.hierNode.defaultAncestor = l3(r, a, r.parentNode.hierNode.defaultAncestor || n[0], e);
}
function i3(r) {
var e = r.hierNode.prelim + r.parentNode.hierNode.modifier;
r.setLayout({
x: e
}, !0), r.hierNode.modifier += r.parentNode.hierNode.modifier;
}
function zS(r) {
return arguments.length ? r : h3;
}
function Rs(r, e) {
return r -= Math.PI / 2, {
x: e * Math.cos(r),
y: e * Math.sin(r)
};
}
function o3(r, e) {
return ee(r.getBoxLayoutParams(), {
width: e.getWidth(),
height: e.getHeight()
});
}
function s3(r) {
for (var e = r.children, t = e.length, n = 0, a = 0; --t >= 0; ) {
var i = e[t];
i.hierNode.prelim += n, i.hierNode.modifier += n, a += i.hierNode.change, n += i.hierNode.shift + a;
}
}
function l3(r, e, t, n) {
if (e) {
for (var a = r, i = r, o = i.parentNode.children[0], s = e, l = a.hierNode.modifier, u = i.hierNode.modifier, f = o.hierNode.modifier, h = s.hierNode.modifier; s = Ov(s), i = Vv(i), s && i; ) {
a = Ov(a), o = Vv(o), a.hierNode.ancestor = r;
var c = s.hierNode.prelim + h - i.hierNode.prelim - u + n(s, i);
c > 0 && (f3(u3(s, r, t), r, c), u += c, l += c), h += s.hierNode.modifier, u += i.hierNode.modifier, l += a.hierNode.modifier, f += o.hierNode.modifier;
}
s && !Ov(a) && (a.hierNode.thread = s, a.hierNode.modifier += h - l), i && !Vv(o) && (o.hierNode.thread = i, o.hierNode.modifier += u - f, t = r);
}
return t;
}
function Ov(r) {
var e = r.children;
return e.length && r.isExpand ? e[e.length - 1] : r.hierNode.thread;
}
function Vv(r) {
var e = r.children;
return e.length && r.isExpand ? e[0] : r.hierNode.thread;
}
function u3(r, e, t) {
return r.hierNode.ancestor.parentNode === e.parentNode ? r.hierNode.ancestor : t;
}
function f3(r, e, t) {
var n = t / (e.hierNode.i - r.hierNode.i);
e.hierNode.change -= n, e.hierNode.shift += t, e.hierNode.modifier += t, e.hierNode.prelim += t, r.hierNode.change += n;
}
function h3(r, e) {
return r.parentNode === e.parentNode ? 1 : 2;
}
var c3 = function() {
function r() {
this.parentPoint = [], this.childPoints = [];
}
return r;
}(), v3 = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new c3();
}, e.prototype.buildPath = function(t, n) {
var a = n.childPoints, i = a.length, o = n.parentPoint, s = a[0], l = a[i - 1];
if (i === 1) {
t.moveTo(o[0], o[1]), t.lineTo(s[0], s[1]);
return;
}
var u = n.orient, f = u === "TB" || u === "BT" ? 0 : 1, h = 1 - f, c = H(n.forkPosition, 1), v = [];
v[f] = o[f], v[h] = o[h] + (l[h] - o[h]) * c, t.moveTo(o[0], o[1]), t.lineTo(v[0], v[1]), t.moveTo(s[0], s[1]), v[f] = s[f], t.lineTo(v[0], v[1]), v[f] = l[f], t.lineTo(v[0], v[1]), t.lineTo(l[0], l[1]);
for (var p = 1; p < i - 1; p++) {
var d = a[p];
t.moveTo(d[0], d[1]), v[f] = d[f], t.lineTo(v[0], v[1]);
}
}, e;
}(gt), p3 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._mainGroup = new nt(), t;
}
return e.prototype.init = function(t, n) {
this._controller = new Wl(n.getZr()), this._controllerHost = {
target: this.group
}, this.group.add(this._mainGroup);
}, e.prototype.render = function(t, n, a) {
var i = t.getData(), o = t.layoutInfo, s = this._mainGroup, l = t.get("layout");
l === "radial" ? (s.x = o.x + o.width / 2, s.y = o.y + o.height / 2) : (s.x = o.x, s.y = o.y), this._updateViewCoordSys(t, a), this._updateController(t, n, a);
var u = this._data;
i.diff(u).add(function(f) {
GS(i, f) && FS(i, f, null, s, t);
}).update(function(f, h) {
var c = u.getItemGraphicEl(h);
if (!GS(i, f)) {
c && $S(u, h, c, s, t);
return;
}
FS(i, f, c, s, t);
}).remove(function(f) {
var h = u.getItemGraphicEl(f);
h && $S(u, f, h, s, t);
}).execute(), this._nodeScaleRatio = t.get("nodeScaleRatio"), this._updateNodeAndLinkScale(t), t.get("expandAndCollapse") === !0 && i.eachItemGraphicEl(function(f, h) {
f.off("click").on("click", function() {
a.dispatchAction({
type: "treeExpandAndCollapse",
seriesId: t.id,
dataIndex: h
});
});
}), this._data = i;
}, e.prototype._updateViewCoordSys = function(t, n) {
var a = t.getData(), i = [];
a.each(function(h) {
var c = a.getItemLayout(h);
c && !isNaN(c.x) && !isNaN(c.y) && i.push([+c.x, +c.y]);
});
var o = [], s = [];
Ih(i, o, s);
var l = this._min, u = this._max;
s[0] - o[0] === 0 && (o[0] = l ? l[0] : o[0] - 1, s[0] = u ? u[0] : s[0] + 1), s[1] - o[1] === 0 && (o[1] = l ? l[1] : o[1] - 1, s[1] = u ? u[1] : s[1] + 1);
var f = t.coordinateSystem = new Ul();
f.zoomLimit = t.get("scaleLimit"), f.setBoundingRect(o[0], o[1], s[0] - o[0], s[1] - o[1]), f.setCenter(t.get("center"), n), f.setZoom(t.get("zoom")), this.group.attr({
x: f.x,
y: f.y,
scaleX: f.scaleX,
scaleY: f.scaleY
}), this._min = o, this._max = s;
}, e.prototype._updateController = function(t, n, a) {
var i = this, o = this._controller, s = this._controllerHost, l = this.group;
o.setPointerChecker(function(u, f, h) {
var c = l.getBoundingRect();
return c.applyTransform(l.transform), c.contain(f, h) && !tc(u, a, t);
}), o.enable(t.get("roam")), s.zoomLimit = t.get("scaleLimit"), s.zoom = t.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
Gy(s, u.dx, u.dy), a.dispatchAction({
seriesId: t.id,
type: "treeRoam",
dx: u.dx,
dy: u.dy
});
}).on("zoom", function(u) {
Fy(s, u.scale, u.originX, u.originY), a.dispatchAction({
seriesId: t.id,
type: "treeRoam",
zoom: u.scale,
originX: u.originX,
originY: u.originY
}), i._updateNodeAndLinkScale(t), a.updateLabelLayout();
});
}, e.prototype._updateNodeAndLinkScale = function(t) {
var n = t.getData(), a = this._getNodeGlobalScale(t);
n.eachItemGraphicEl(function(i, o) {
i.setSymbolScale(a);
});
}, e.prototype._getNodeGlobalScale = function(t) {
var n = t.coordinateSystem;
if (n.type !== "view")
return 1;
var a = this._nodeScaleRatio, i = n.scaleX || 1, o = n.getZoom(), s = (o - 1) * a + 1;
return s / i;
}, e.prototype.dispose = function() {
this._controller && this._controller.dispose(), this._controllerHost = null;
}, e.prototype.remove = function() {
this._mainGroup.removeAll(), this._data = null;
}, e.type = "tree", e;
}(Ot);
function GS(r, e) {
var t = r.getItemLayout(e);
return t && !isNaN(t.x) && !isNaN(t.y);
}
function FS(r, e, t, n, a) {
var i = !t, o = r.tree.getNodeByDataIndex(e), s = o.getModel(), l = o.getVisual("style").fill, u = o.isExpand === !1 && o.children.length !== 0 ? l : "#fff", f = r.tree.root, h = o.parentNode === f ? o : o.parentNode || o, c = r.getItemGraphicEl(h.dataIndex), v = h.getLayout(), p = c ? {
x: c.__oldX,
y: c.__oldY,
rawX: c.__radialOldRawX,
rawY: c.__radialOldRawY
} : v, d = o.getLayout();
i ? (t = new zl(r, e, null, {
symbolInnerColor: u,
useNameLabel: !0
}), t.x = p.x, t.y = p.y) : t.updateData(r, e, null, {
symbolInnerColor: u,
useNameLabel: !0
}), t.__radialOldRawX = t.__radialRawX, t.__radialOldRawY = t.__radialRawY, t.__radialRawX = d.rawX, t.__radialRawY = d.rawY, n.add(t), r.setItemGraphicEl(e, t), t.__oldX = t.x, t.__oldY = t.y, bt(t, {
x: d.x,
y: d.y
}, a);
var g = t.getSymbolPath();
if (a.get("layout") === "radial") {
var y = f.children[0], m = y.getLayout(), _ = y.children.length, S = void 0, w = void 0;
if (d.x === m.x && o.isExpand === !0 && y.children.length) {
var x = {
x: (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2,
y: (y.children[0].getLayout().y + y.children[_ - 1].getLayout().y) / 2
};
S = Math.atan2(x.y - m.y, x.x - m.x), S < 0 && (S = Math.PI * 2 + S), w = x.x < m.x, w && (S = S - Math.PI);
} else
S = Math.atan2(d.y - m.y, d.x - m.x), S < 0 && (S = Math.PI * 2 + S), o.children.length === 0 || o.children.length !== 0 && o.isExpand === !1 ? (w = d.x < m.x, w && (S = S - Math.PI)) : (w = d.x > m.x, w || (S = S - Math.PI));
var b = w ? "left" : "right", T = s.getModel("label"), D = T.get("rotate"), A = D * (Math.PI / 180), M = g.getTextContent();
M && (g.setTextConfig({
position: T.get("position") || b,
rotation: D == null ? -S : A,
origin: "center"
}), M.setStyle("verticalAlign", "middle"));
}
var L = s.get(["emphasis", "focus"]), I = L === "relative" ? _f(o.getAncestorsIndices(), o.getDescendantIndices()) : L === "ancestor" ? o.getAncestorsIndices() : L === "descendant" ? o.getDescendantIndices() : null;
I && (at(t).focus = I), d3(a, o, f, t, p, v, d, n), t.__edge && (t.onHoverStateChange = function(E) {
if (E !== "blur") {
var P = o.parentNode && r.getItemGraphicEl(o.parentNode.dataIndex);
P && P.hoverState === Ll || Lf(t.__edge, E);
}
});
}
function d3(r, e, t, n, a, i, o, s) {
var l = e.getModel(), u = r.get("edgeShape"), f = r.get("layout"), h = r.getOrient(), c = r.get(["lineStyle", "curveness"]), v = r.get("edgeForkPosition"), p = l.getModel("lineStyle").getLineStyle(), d = n.__edge;
if (u === "curve")
e.parentNode && e.parentNode !== t && (d || (d = n.__edge = new Rh({
shape: Kd(f, h, c, a, a)
})), bt(d, {
shape: Kd(f, h, c, i, o)
}, r));
else if (u === "polyline") {
if (f === "orthogonal") {
if (e !== t && e.children && e.children.length !== 0 && e.isExpand === !0) {
for (var g = e.children, y = [], m = 0; m < g.length; m++) {
var _ = g[m].getLayout();
y.push([_.x, _.y]);
}
d || (d = n.__edge = new v3({
shape: {
parentPoint: [o.x, o.y],
childPoints: [[o.x, o.y]],
orient: h,
forkPosition: v
}
})), bt(d, {
shape: {
parentPoint: [o.x, o.y],
childPoints: y
}
}, r);
}
} else if (process.env.NODE_ENV !== "production")
throw new Error("The polyline edgeShape can only be used in orthogonal layout");
}
d && !(u === "polyline" && !e.isExpand) && (d.useStyle(J({
strokeNoScale: !0,
fill: null
}, p)), ce(d, l, "lineStyle"), yi(d), s.add(d));
}
function HS(r, e, t, n, a) {
var i = e.tree.root, o = KM(i, r), s = o.source, l = o.sourceLayout, u = e.getItemGraphicEl(r.dataIndex);
if (!!u) {
var f = e.getItemGraphicEl(s.dataIndex), h = f.__edge, c = u.__edge || (s.isExpand === !1 || s.children.length === 1 ? h : void 0), v = n.get("edgeShape"), p = n.get("layout"), d = n.get("orient"), g = n.get(["lineStyle", "curveness"]);
c && (v === "curve" ? ia(c, {
shape: Kd(p, d, g, l, l),
style: {
opacity: 0
}
}, n, {
cb: function() {
t.remove(c);
},
removeOpt: a
}) : v === "polyline" && n.get("layout") === "orthogonal" && ia(c, {
shape: {
parentPoint: [l.x, l.y],
childPoints: [[l.x, l.y]]
},
style: {
opacity: 0
}
}, n, {
cb: function() {
t.remove(c);
},
removeOpt: a
}));
}
}
function KM(r, e) {
for (var t = e.parentNode === r ? e : e.parentNode || e, n; n = t.getLayout(), n == null; )
t = t.parentNode === r ? t : t.parentNode || t;
return {
source: t,
sourceLayout: n
};
}
function $S(r, e, t, n, a) {
var i = r.tree.getNodeByDataIndex(e), o = r.tree.root, s = KM(o, i).sourceLayout, l = {
duration: a.get("animationDurationUpdate"),
easing: a.get("animationEasingUpdate")
};
ia(t, {
x: s.x + 1,
y: s.y + 1
}, a, {
cb: function() {
n.remove(t), r.setItemGraphicEl(e, null);
},
removeOpt: l
}), t.fadeOut(null, r.hostModel, {
fadeLabel: !0,
animation: l
}), i.children.forEach(function(u) {
HS(u, r, n, a, l);
}), HS(i, r, n, a, l);
}
function Kd(r, e, t, n, a) {
var i, o, s, l, u, f, h, c;
if (r === "radial") {
u = n.rawX, h = n.rawY, f = a.rawX, c = a.rawY;
var v = Rs(u, h), p = Rs(u, h + (c - h) * t), d = Rs(f, c + (h - c) * t), g = Rs(f, c);
return {
x1: v.x || 0,
y1: v.y || 0,
x2: g.x || 0,
y2: g.y || 0,
cpx1: p.x || 0,
cpy1: p.y || 0,
cpx2: d.x || 0,
cpy2: d.y || 0
};
} else
u = n.x, h = n.y, f = a.x, c = a.y, (e === "LR" || e === "RL") && (i = u + (f - u) * t, o = h, s = f + (u - f) * t, l = c), (e === "TB" || e === "BT") && (i = u, o = h + (c - h) * t, s = f, l = c + (h - c) * t);
return {
x1: u,
y1: h,
x2: f,
y2: c,
cpx1: i,
cpy1: o,
cpx2: s,
cpy2: l
};
}
const g3 = p3;
var ur = Tt();
function jM(r) {
var e = r.mainData, t = r.datas;
t || (t = {
main: e
}, r.datasAttr = {
main: "data"
}), r.datas = r.mainData = null, JM(e, t, r), C(t, function(n) {
C(e.TRANSFERABLE_METHODS, function(a) {
n.wrapMethod(a, it(y3, r));
});
}), e.wrapMethod("cloneShallow", it(_3, r)), C(e.CHANGABLE_METHODS, function(n) {
e.wrapMethod(n, it(m3, r));
}), Q(t[e.dataType] === e);
}
function y3(r, e) {
if (w3(this)) {
var t = B({}, ur(this).datas);
t[this.dataType] = e, JM(e, t, r);
} else
Wy(e, this.dataType, ur(this).mainData, r);
return e;
}
function m3(r, e) {
return r.struct && r.struct.update(), e;
}
function _3(r, e) {
return C(ur(e).datas, function(t, n) {
t !== e && Wy(t.cloneShallow(), n, e, r);
}), e;
}
function S3(r) {
var e = ur(this).mainData;
return r == null || e == null ? e : ur(e).datas[r];
}
function x3() {
var r = ur(this).mainData;
return r == null ? [{
data: r
}] : G(mt(ur(r).datas), function(e) {
return {
type: e,
data: ur(r).datas[e]
};
});
}
function w3(r) {
return ur(r).mainData === r;
}
function JM(r, e, t) {
ur(r).datas = {}, C(e, function(n, a) {
Wy(n, a, r, t);
});
}
function Wy(r, e, t, n) {
ur(t).datas[e] = r, ur(r).mainData = t, r.dataType = e, n.struct && (r[n.structAttr] = n.struct, n.struct[n.datasAttr[e]] = r), r.getLinkedData = S3, r.getLinkedDataAll = x3;
}
var b3 = function() {
function r(e, t) {
this.depth = 0, this.height = 0, this.dataIndex = -1, this.children = [], this.viewChildren = [], this.isExpand = !1, this.name = e || "", this.hostTree = t;
}
return r.prototype.isRemoved = function() {
return this.dataIndex < 0;
}, r.prototype.eachNode = function(e, t, n) {
q(e) && (n = t, t = e, e = null), e = e || {}, W(e) && (e = {
order: e
});
var a = e.order || "preorder", i = this[e.attr || "children"], o;
a === "preorder" && (o = t.call(n, this));
for (var s = 0; !o && s < i.length; s++)
i[s].eachNode(e, t, n);
a === "postorder" && t.call(n, this);
}, r.prototype.updateDepthAndHeight = function(e) {
var t = 0;
this.depth = e;
for (var n = 0; n < this.children.length; n++) {
var a = this.children[n];
a.updateDepthAndHeight(e + 1), a.height > t && (t = a.height);
}
this.height = t + 1;
}, r.prototype.getNodeById = function(e) {
if (this.getId() === e)
return this;
for (var t = 0, n = this.children, a = n.length; t < a; t++) {
var i = n[t].getNodeById(e);
if (i)
return i;
}
}, r.prototype.contains = function(e) {
if (e === this)
return !0;
for (var t = 0, n = this.children, a = n.length; t < a; t++) {
var i = n[t].contains(e);
if (i)
return i;
}
}, r.prototype.getAncestors = function(e) {
for (var t = [], n = e ? this : this.parentNode; n; )
t.push(n), n = n.parentNode;
return t.reverse(), t;
}, r.prototype.getAncestorsIndices = function() {
for (var e = [], t = this; t; )
e.push(t.dataIndex), t = t.parentNode;
return e.reverse(), e;
}, r.prototype.getDescendantIndices = function() {
var e = [];
return this.eachNode(function(t) {
e.push(t.dataIndex);
}), e;
}, r.prototype.getValue = function(e) {
var t = this.hostTree.data;
return t.getStore().get(t.getDimensionIndex(e || "value"), this.dataIndex);
}, r.prototype.setLayout = function(e, t) {
this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, e, t);
}, r.prototype.getLayout = function() {
return this.hostTree.data.getItemLayout(this.dataIndex);
}, r.prototype.getModel = function(e) {
if (!(this.dataIndex < 0)) {
var t = this.hostTree, n = t.data.getItemModel(this.dataIndex);
return n.getModel(e);
}
}, r.prototype.getLevelModel = function() {
return (this.hostTree.levelModels || [])[this.depth];
}, r.prototype.setVisual = function(e, t) {
this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, e, t);
}, r.prototype.getVisual = function(e) {
return this.hostTree.data.getItemVisual(this.dataIndex, e);
}, r.prototype.getRawIndex = function() {
return this.hostTree.data.getRawIndex(this.dataIndex);
}, r.prototype.getId = function() {
return this.hostTree.data.getId(this.dataIndex);
}, r.prototype.getChildIndex = function() {
if (this.parentNode) {
for (var e = this.parentNode.children, t = 0; t < e.length; ++t)
if (e[t] === this)
return t;
return -1;
}
return -1;
}, r.prototype.isAncestorOf = function(e) {
for (var t = e.parentNode; t; ) {
if (t === this)
return !0;
t = t.parentNode;
}
return !1;
}, r.prototype.isDescendantOf = function(e) {
return e !== this && e.isAncestorOf(this);
}, r;
}(), T3 = function() {
function r(e) {
this.type = "tree", this._nodes = [], this.hostModel = e;
}
return r.prototype.eachNode = function(e, t, n) {
this.root.eachNode(e, t, n);
}, r.prototype.getNodeByDataIndex = function(e) {
var t = this.data.getRawIndex(e);
return this._nodes[t];
}, r.prototype.getNodeById = function(e) {
return this.root.getNodeById(e);
}, r.prototype.update = function() {
for (var e = this.data, t = this._nodes, n = 0, a = t.length; n < a; n++)
t[n].dataIndex = -1;
for (var n = 0, a = e.count(); n < a; n++)
t[e.getRawIndex(n)].dataIndex = n;
}, r.prototype.clearLayouts = function() {
this.data.clearItemLayouts();
}, r.createTree = function(e, t, n) {
var a = new r(t), i = [], o = 1;
s(e);
function s(f, h) {
var c = f.value;
o = Math.max(o, z(c) ? c.length : 1), i.push(f);
var v = new b3(te(f.name, ""), a);
h ? C3(v, h) : a.root = v, a._nodes.push(v);
var p = f.children;
if (p)
for (var d = 0; d < p.length; d++)
s(p[d], v);
}
a.root.updateDepthAndHeight(0);
var l = Ol(i, {
coordDimensions: ["value"],
dimensionsCount: o
}).dimensions, u = new Ae(l, t);
return u.initData(i), n && n(u), jM({
mainData: u,
struct: a,
structAttr: "tree"
}), a.update(), a;
}, r;
}();
function C3(r, e) {
var t = e.children;
r.parentNode !== e && (t.push(r), r.parentNode = e);
}
const Uy = T3;
function yl(r, e, t) {
if (r && ct(e, r.type) >= 0) {
var n = t.getData().tree.root, a = r.targetNode;
if (W(a) && (a = n.getNodeById(a)), a && n.contains(a))
return {
node: a
};
var i = r.targetNodeId;
if (i != null && (a = n.getNodeById(i)))
return {
node: a
};
}
}
function QM(r) {
for (var e = []; r; )
r = r.parentNode, r && e.push(r);
return e.reverse();
}
function Yy(r, e) {
var t = QM(r);
return ct(t, e) >= 0;
}
function rc(r, e) {
for (var t = []; r; ) {
var n = r.dataIndex;
t.push({
name: r.name,
dataIndex: n,
value: e.getRawValue(n)
}), r = r.parentNode;
}
return t.reverse(), t;
}
var D3 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.hasSymbolVisual = !0, t.ignoreStyleOnData = !0, t;
}
return e.prototype.getInitialData = function(t) {
var n = {
name: t.name,
children: t.data
}, a = t.leaves || {}, i = new kt(a, this, this.ecModel), o = Uy.createTree(n, this, s);
function s(h) {
h.wrapMethod("getItemModel", function(c, v) {
var p = o.getNodeByDataIndex(v);
return p && p.children.length && p.isExpand || (c.parentModel = i), c;
});
}
var l = 0;
o.eachNode("preorder", function(h) {
h.depth > l && (l = h.depth);
});
var u = t.expandAndCollapse, f = u && t.initialTreeDepth >= 0 ? t.initialTreeDepth : l;
return o.root.eachNode("preorder", function(h) {
var c = h.hostTree.data.getRawDataItem(h.dataIndex);
h.isExpand = c && c.collapsed != null ? !c.collapsed : h.depth <= f;
}), o.data;
}, e.prototype.getOrient = function() {
var t = this.get("orient");
return t === "horizontal" ? t = "LR" : t === "vertical" && (t = "TB"), t;
}, e.prototype.setZoom = function(t) {
this.option.zoom = t;
}, e.prototype.setCenter = function(t) {
this.option.center = t;
}, e.prototype.formatTooltip = function(t, n, a) {
for (var i = this.getData().tree, o = i.root.children[0], s = i.getNodeByDataIndex(t), l = s.getValue(), u = s.name; s && s !== o; )
u = s.parentNode.name + "." + u, s = s.parentNode;
return ae("nameValue", {
name: u,
value: l,
noValue: isNaN(l) || l == null
});
}, e.prototype.getDataParams = function(t) {
var n = r.prototype.getDataParams.apply(this, arguments), a = this.getData().tree.getNodeByDataIndex(t);
return n.treeAncestors = rc(a, this), n.collapsed = !a.isExpand, n;
}, e.type = "series.tree", e.layoutMode = "box", e.defaultOption = {
z: 2,
coordinateSystem: "view",
left: "12%",
top: "12%",
right: "12%",
bottom: "12%",
layout: "orthogonal",
edgeShape: "curve",
edgeForkPosition: "50%",
roam: !1,
nodeScaleRatio: 0.4,
center: null,
zoom: 1,
orient: "LR",
symbol: "emptyCircle",
symbolSize: 7,
expandAndCollapse: !0,
initialTreeDepth: 2,
lineStyle: {
color: "#ccc",
width: 1.5,
curveness: 0.5
},
itemStyle: {
color: "lightsteelblue",
borderWidth: 1.5
},
label: {
show: !0
},
animationEasing: "linear",
animationDuration: 700,
animationDurationUpdate: 500
}, e;
}(Gt);
const A3 = D3;
function M3(r, e, t) {
for (var n = [r], a = [], i; i = n.pop(); )
if (a.push(i), i.isExpand) {
var o = i.children;
if (o.length)
for (var s = 0; s < o.length; s++)
n.push(o[s]);
}
for (; i = a.pop(); )
e(i, t);
}
function ys(r, e) {
for (var t = [r], n; n = t.pop(); )
if (e(n), n.isExpand) {
var a = n.children;
if (a.length)
for (var i = a.length - 1; i >= 0; i--)
t.push(a[i]);
}
}
function L3(r, e) {
r.eachSeriesByType("tree", function(t) {
I3(t, e);
});
}
function I3(r, e) {
var t = o3(r, e);
r.layoutInfo = t;
var n = r.get("layout"), a = 0, i = 0, o = null;
n === "radial" ? (a = 2 * Math.PI, i = Math.min(t.height, t.width) / 2, o = zS(function(_, S) {
return (_.parentNode === S.parentNode ? 1 : 2) / _.depth;
})) : (a = t.width, i = t.height, o = zS());
var s = r.getData().tree.root, l = s.children[0];
if (l) {
n3(s), M3(l, a3, o), s.hierNode.modifier = -l.hierNode.prelim, ys(l, i3);
var u = l, f = l, h = l;
ys(l, function(_) {
var S = _.getLayout().x;
S < u.getLayout().x && (u = _), S > f.getLayout().x && (f = _), _.depth > h.depth && (h = _);
});
var c = u === f ? 1 : o(u, f) / 2, v = c - u.getLayout().x, p = 0, d = 0, g = 0, y = 0;
if (n === "radial")
p = a / (f.getLayout().x + c + v), d = i / (h.depth - 1 || 1), ys(l, function(_) {
g = (_.getLayout().x + v) * p, y = (_.depth - 1) * d;
var S = Rs(g, y);
_.setLayout({
x: S.x,
y: S.y,
rawX: g,
rawY: y
}, !0);
});
else {
var m = r.getOrient();
m === "RL" || m === "LR" ? (d = i / (f.getLayout().x + c + v), p = a / (h.depth - 1 || 1), ys(l, function(_) {
y = (_.getLayout().x + v) * d, g = m === "LR" ? (_.depth - 1) * p : a - (_.depth - 1) * p, _.setLayout({
x: g,
y
}, !0);
})) : (m === "TB" || m === "BT") && (p = a / (f.getLayout().x + c + v), d = i / (h.depth - 1 || 1), ys(l, function(_) {
g = (_.getLayout().x + v) * p, y = m === "TB" ? (_.depth - 1) * d : i - (_.depth - 1) * d, _.setLayout({
x: g,
y
}, !0);
}));
}
}
}
function E3(r) {
r.eachSeriesByType("tree", function(e) {
var t = e.getData(), n = t.tree;
n.eachNode(function(a) {
var i = a.getModel(), o = i.getModel("itemStyle").getItemStyle(), s = t.ensureUniqueItemVisual(a.dataIndex, "style");
B(s, o);
});
});
}
function P3(r) {
r.registerAction({
type: "treeExpandAndCollapse",
event: "treeExpandAndCollapse",
update: "update"
}, function(e, t) {
t.eachComponent({
mainType: "series",
subType: "tree",
query: e
}, function(n) {
var a = e.dataIndex, i = n.getData().tree, o = i.getNodeByDataIndex(a);
o.isExpand = !o.isExpand;
});
}), r.registerAction({
type: "treeRoam",
event: "treeRoam",
update: "none"
}, function(e, t, n) {
t.eachComponent({
mainType: "series",
subType: "tree",
query: e
}, function(a) {
var i = a.coordinateSystem, o = $y(i, e, void 0, n);
a.setCenter && a.setCenter(o.center), a.setZoom && a.setZoom(o.zoom);
});
});
}
function N3(r) {
r.registerChartView(g3), r.registerSeriesModel(A3), r.registerLayout(L3), r.registerVisual(E3), P3(r);
}
var WS = ["treemapZoomToNode", "treemapRender", "treemapMove"];
function R3(r) {
for (var e = 0; e < WS.length; e++)
r.registerAction({
type: WS[e],
update: "updateView"
}, jt);
r.registerAction({
type: "treemapRootToNode",
update: "updateView"
}, function(t, n) {
n.eachComponent({
mainType: "series",
subType: "treemap",
query: t
}, a);
function a(i, o) {
var s = ["treemapZoomToNode", "treemapRootToNode"], l = yl(t, s, i);
if (l) {
var u = i.getViewRoot();
u && (t.direction = Yy(u, l.node) ? "rollUp" : "drillDown"), i.resetViewRoot(l.node);
}
}
});
}
function tL(r) {
var e = r.getData(), t = e.tree, n = {};
t.eachNode(function(a) {
for (var i = a; i && i.depth > 1; )
i = i.parentNode;
var o = Cd(r.ecModel, i.name || i.dataIndex + "", n);
a.setVisual("decal", o);
});
}
var k3 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.preventUsingHoverLayer = !0, t;
}
return e.prototype.getInitialData = function(t, n) {
var a = {
name: t.name,
children: t.data
};
eL(a);
var i = t.levels || [], o = this.designatedVisualItemStyle = {}, s = new kt({
itemStyle: o
}, this, n);
i = t.levels = O3(i, n);
var l = G(i || [], function(h) {
return new kt(h, s, n);
}, this), u = Uy.createTree(a, this, f);
function f(h) {
h.wrapMethod("getItemModel", function(c, v) {
var p = u.getNodeByDataIndex(v), d = p ? l[p.depth] : null;
return c.parentModel = d || s, c;
});
}
return u.data;
}, e.prototype.optionUpdated = function() {
this.resetViewRoot();
}, e.prototype.formatTooltip = function(t, n, a) {
var i = this.getData(), o = this.getRawValue(t), s = i.getName(t);
return ae("nameValue", {
name: s,
value: o
});
}, e.prototype.getDataParams = function(t) {
var n = r.prototype.getDataParams.apply(this, arguments), a = this.getData().tree.getNodeByDataIndex(t);
return n.treeAncestors = rc(a, this), n.treePathInfo = n.treeAncestors, n;
}, e.prototype.setLayoutInfo = function(t) {
this.layoutInfo = this.layoutInfo || {}, B(this.layoutInfo, t);
}, e.prototype.mapIdToIndex = function(t) {
var n = this._idIndexMap;
n || (n = this._idIndexMap = K(), this._idIndexMapCount = 0);
var a = n.get(t);
return a == null && n.set(t, a = this._idIndexMapCount++), a;
}, e.prototype.getViewRoot = function() {
return this._viewRoot;
}, e.prototype.resetViewRoot = function(t) {
t ? this._viewRoot = t : t = this._viewRoot;
var n = this.getRawData().tree.root;
(!t || t !== n && !n.contains(t)) && (this._viewRoot = n);
}, e.prototype.enableAriaDecal = function() {
tL(this);
}, e.type = "series.treemap", e.layoutMode = "box", e.defaultOption = {
progressive: 0,
left: "center",
top: "middle",
width: "80%",
height: "80%",
sort: !0,
clipWindow: "origin",
squareRatio: 0.5 * (1 + Math.sqrt(5)),
leafDepth: null,
drillDownIcon: "\u25B6",
zoomToNodeRatio: 0.32 * 0.32,
roam: !0,
nodeClick: "zoomToNode",
animation: !0,
animationDurationUpdate: 900,
animationEasing: "quinticInOut",
breadcrumb: {
show: !0,
height: 22,
left: "center",
top: "bottom",
emptyItemWidth: 25,
itemStyle: {
color: "rgba(0,0,0,0.7)",
textStyle: {
color: "#fff"
}
}
},
label: {
show: !0,
distance: 0,
padding: 5,
position: "inside",
color: "#fff",
overflow: "truncate"
},
upperLabel: {
show: !1,
position: [0, "50%"],
height: 20,
overflow: "truncate",
verticalAlign: "middle"
},
itemStyle: {
color: null,
colorAlpha: null,
colorSaturation: null,
borderWidth: 0,
gapWidth: 0,
borderColor: "#fff",
borderColorSaturation: null
},
emphasis: {
upperLabel: {
show: !0,
position: [0, "50%"],
overflow: "truncate",
verticalAlign: "middle"
}
},
visualDimension: 0,
visualMin: null,
visualMax: null,
color: [],
colorAlpha: null,
colorSaturation: null,
colorMappingBy: "index",
visibleMin: 10,
childrenVisibleMin: null,
levels: []
}, e;
}(Gt);
function eL(r) {
var e = 0;
C(r.children, function(n) {
eL(n);
var a = n.value;
z(a) && (a = a[0]), e += a;
});
var t = r.value;
z(t) && (t = t[0]), (t == null || isNaN(t)) && (t = e), t < 0 && (t = 0), z(r.value) ? r.value[0] = t : r.value = t;
}
function O3(r, e) {
var t = Pt(e.get("color")), n = Pt(e.get(["aria", "decal", "decals"]));
if (!!t) {
r = r || [];
var a, i;
C(r, function(s) {
var l = new kt(s), u = l.get("color"), f = l.get("decal");
(l.get(["itemStyle", "color"]) || u && u !== "none") && (a = !0), (l.get(["itemStyle", "decal"]) || f && f !== "none") && (i = !0);
});
var o = r[0] || (r[0] = {});
return a || (o.color = t.slice()), !i && n && (o.decal = n.slice()), r;
}
}
const V3 = k3;
var B3 = 8, US = 8, Bv = 5, z3 = function() {
function r(e) {
this.group = new nt(), e.add(this.group);
}
return r.prototype.render = function(e, t, n, a) {
var i = e.getModel("breadcrumb"), o = this.group;
if (o.removeAll(), !(!i.get("show") || !n)) {
var s = i.getModel("itemStyle"), l = s.getModel("textStyle"), u = {
pos: {
left: i.get("left"),
right: i.get("right"),
top: i.get("top"),
bottom: i.get("bottom")
},
box: {
width: t.getWidth(),
height: t.getHeight()
},
emptyItemWidth: i.get("emptyItemWidth"),
totalWidth: 0,
renderList: []
};
this._prepare(n, u, l), this._renderContent(e, u, s, l, a), $h(o, u.pos, u.box);
}
}, r.prototype._prepare = function(e, t, n) {
for (var a = e; a; a = a.parentNode) {
var i = te(a.getModel().get("name"), ""), o = n.getTextRect(i), s = Math.max(o.width + B3 * 2, t.emptyItemWidth);
t.totalWidth += s + US, t.renderList.push({
node: a,
text: i,
width: s
});
}
}, r.prototype._renderContent = function(e, t, n, a, i) {
for (var o = 0, s = t.emptyItemWidth, l = e.get(["breadcrumb", "height"]), u = qR(t.pos, t.box), f = t.totalWidth, h = t.renderList, c = h.length - 1; c >= 0; c--) {
var v = h[c], p = v.node, d = v.width, g = v.text;
f > u.width && (f -= d - s, d = s, g = null);
var y = new Be({
shape: {
points: G3(o, 0, d, l, c === h.length - 1, c === 0)
},
style: J(n.getItemStyle(), {
lineJoin: "bevel"
}),
textContent: new Ct({
style: {
text: g,
fill: a.getTextColor(),
font: a.getFont()
}
}),
textConfig: {
position: "inside"
},
z2: Ro * 1e4,
onclick: it(i, p)
});
y.disableLabelAnimation = !0, this.group.add(y), F3(y, e, p), o += d + US;
}
}, r.prototype.remove = function() {
this.group.removeAll();
}, r;
}();
function G3(r, e, t, n, a, i) {
var o = [[a ? r : r - Bv, e], [r + t, e], [r + t, e + n], [a ? r : r - Bv, e + n]];
return !i && o.splice(2, 0, [r + t + Bv, e + n / 2]), !a && o.push([r, e + n / 2]), o;
}
function F3(r, e, t) {
at(r).eventData = {
componentType: "series",
componentSubType: "treemap",
componentIndex: e.componentIndex,
seriesIndex: e.seriesIndex,
seriesName: e.name,
seriesType: "treemap",
selfType: "breadcrumb",
nodeData: {
dataIndex: t && t.dataIndex,
name: t && t.name
},
treePathInfo: t && rc(t, e)
};
}
const H3 = z3;
var $3 = function() {
function r() {
this._storage = [], this._elExistsMap = {};
}
return r.prototype.add = function(e, t, n, a, i) {
return this._elExistsMap[e.id] ? !1 : (this._elExistsMap[e.id] = !0, this._storage.push({
el: e,
target: t,
duration: n,
delay: a,
easing: i
}), !0);
}, r.prototype.finished = function(e) {
return this._finishedCallback = e, this;
}, r.prototype.start = function() {
for (var e = this, t = this._storage.length, n = function() {
t--, t <= 0 && (e._storage.length = 0, e._elExistsMap = {}, e._finishedCallback && e._finishedCallback());
}, a = 0, i = this._storage.length; a < i; a++) {
var o = this._storage[a];
o.el.animateTo(o.target, {
duration: o.duration,
delay: o.delay,
easing: o.easing,
setToFinal: !0,
done: n,
aborted: n
});
}
return this;
}, r;
}();
function W3() {
return new $3();
}
var jd = nt, YS = xt, ZS = 3, XS = "label", qS = "upperLabel", U3 = Ro * 10, Y3 = Ro * 2, Z3 = Ro * 3, Wa = gi([
["fill", "color"],
["stroke", "strokeColor"],
["lineWidth", "strokeWidth"],
["shadowBlur"],
["shadowOffsetX"],
["shadowOffsetY"],
["shadowColor"]
]), KS = function(r) {
var e = Wa(r);
return e.stroke = e.fill = e.lineWidth = null, e;
}, th = Tt(), X3 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._state = "ready", t._storage = ms(), t;
}
return e.prototype.render = function(t, n, a, i) {
var o = n.findComponents({
mainType: "series",
subType: "treemap",
query: i
});
if (!(ct(o, t) < 0)) {
this.seriesModel = t, this.api = a, this.ecModel = n;
var s = ["treemapZoomToNode", "treemapRootToNode"], l = yl(i, s, t), u = i && i.type, f = t.layoutInfo, h = !this._oldTree, c = this._storage, v = u === "treemapRootToNode" && l && c ? {
rootNodeGroup: c.nodeGroup[l.node.getRawIndex()],
direction: i.direction
} : null, p = this._giveContainerGroup(f), d = t.get("animation"), g = this._doRender(p, t, v);
d && !h && (!u || u === "treemapZoomToNode" || u === "treemapRootToNode") ? this._doAnimation(p, g, t, v) : g.renderFinally(), this._resetController(a), this._renderBreadcrumb(t, a, l);
}
}, e.prototype._giveContainerGroup = function(t) {
var n = this._containerGroup;
return n || (n = this._containerGroup = new jd(), this._initEvents(n), this.group.add(n)), n.x = t.x, n.y = t.y, n;
}, e.prototype._doRender = function(t, n, a) {
var i = n.getData().tree, o = this._oldTree, s = ms(), l = ms(), u = this._storage, f = [];
function h(g, y, m, _) {
return q3(n, l, u, a, s, f, g, y, m, _);
}
v(i.root ? [i.root] : [], o && o.root ? [o.root] : [], t, i === o || !o, 0);
var c = p(u);
return this._oldTree = i, this._storage = l, {
lastsForAnimation: s,
willDeleteEls: c,
renderFinally: d
};
function v(g, y, m, _, S) {
_ ? (y = g, C(g, function(b, T) {
!b.isRemoved() && x(T, T);
})) : new wn(y, g, w, w).add(x).update(x).remove(it(x, null)).execute();
function w(b) {
return b.getId();
}
function x(b, T) {
var D = b != null ? g[b] : null, A = T != null ? y[T] : null, M = h(D, A, m, S);
M && v(D && D.viewChildren || [], A && A.viewChildren || [], M, _, S + 1);
}
}
function p(g) {
var y = ms();
return g && C(g, function(m, _) {
var S = y[_];
C(m, function(w) {
w && (S.push(w), th(w).willDelete = !0);
});
}), y;
}
function d() {
C(c, function(g) {
C(g, function(y) {
y.parent && y.parent.remove(y);
});
}), C(f, function(g) {
g.invisible = !0, g.dirty();
});
}
}, e.prototype._doAnimation = function(t, n, a, i) {
var o = a.get("animationDurationUpdate"), s = a.get("animationEasing"), l = (q(o) ? 0 : o) || 0, u = (q(s) ? null : s) || "cubicOut", f = W3();
C(n.willDeleteEls, function(h, c) {
C(h, function(v, p) {
if (!v.invisible) {
var d = v.parent, g, y = th(d);
if (i && i.direction === "drillDown")
g = d === i.rootNodeGroup ? {
shape: {
x: 0,
y: 0,
width: y.nodeWidth,
height: y.nodeHeight
},
style: {
opacity: 0
}
} : {
style: {
opacity: 0
}
};
else {
var m = 0, _ = 0;
y.willDelete || (m = y.nodeWidth / 2, _ = y.nodeHeight / 2), g = c === "nodeGroup" ? {
x: m,
y: _,
style: {
opacity: 0
}
} : {
shape: {
x: m,
y: _,
width: 0,
height: 0
},
style: {
opacity: 0
}
};
}
g && f.add(v, g, l, 0, u);
}
});
}), C(this._storage, function(h, c) {
C(h, function(v, p) {
var d = n.lastsForAnimation[c][p], g = {};
!d || (v instanceof nt ? d.oldX != null && (g.x = v.x, g.y = v.y, v.x = d.oldX, v.y = d.oldY) : (d.oldShape && (g.shape = B({}, v.shape), v.setShape(d.oldShape)), d.fadein ? (v.setStyle("opacity", 0), g.style = {
opacity: 1
}) : v.style.opacity !== 1 && (g.style = {
opacity: 1
})), f.add(v, g, l, 0, u));
});
}, this), this._state = "animating", f.finished(Y(function() {
this._state = "ready", n.renderFinally();
}, this)).start();
}, e.prototype._resetController = function(t) {
var n = this._controller;
n || (n = this._controller = new Wl(t.getZr()), n.enable(this.seriesModel.get("roam")), n.on("pan", Y(this._onPan, this)), n.on("zoom", Y(this._onZoom, this)));
var a = new ft(0, 0, t.getWidth(), t.getHeight());
n.setPointerChecker(function(i, o, s) {
return a.contain(o, s);
});
}, e.prototype._clearController = function() {
var t = this._controller;
t && (t.dispose(), t = null);
}, e.prototype._onPan = function(t) {
if (this._state !== "animating" && (Math.abs(t.dx) > ZS || Math.abs(t.dy) > ZS)) {
var n = this.seriesModel.getData().tree.root;
if (!n)
return;
var a = n.getLayout();
if (!a)
return;
this.api.dispatchAction({
type: "treemapMove",
from: this.uid,
seriesId: this.seriesModel.id,
rootRect: {
x: a.x + t.dx,
y: a.y + t.dy,
width: a.width,
height: a.height
}
});
}
}, e.prototype._onZoom = function(t) {
var n = t.originX, a = t.originY;
if (this._state !== "animating") {
var i = this.seriesModel.getData().tree.root;
if (!i)
return;
var o = i.getLayout();
if (!o)
return;
var s = new ft(o.x, o.y, o.width, o.height), l = this.seriesModel.layoutInfo;
n -= l.x, a -= l.y;
var u = hr();
qr(u, u, [-n, -a]), Vg(u, u, [t.scale, t.scale]), qr(u, u, [n, a]), s.applyTransform(u), this.api.dispatchAction({
type: "treemapRender",
from: this.uid,
seriesId: this.seriesModel.id,
rootRect: {
x: s.x,
y: s.y,
width: s.width,
height: s.height
}
});
}
}, e.prototype._initEvents = function(t) {
var n = this;
t.on("click", function(a) {
if (n._state === "ready") {
var i = n.seriesModel.get("nodeClick", !0);
if (!!i) {
var o = n.findTarget(a.offsetX, a.offsetY);
if (!!o) {
var s = o.node;
if (s.getLayout().isLeafRoot)
n._rootToNode(o);
else if (i === "zoomToNode")
n._zoomToNode(o);
else if (i === "link") {
var l = s.hostTree.data.getItemModel(s.dataIndex), u = l.get("link", !0), f = l.get("target", !0) || "blank";
u && kf(u, f);
}
}
}
}
}, this);
}, e.prototype._renderBreadcrumb = function(t, n, a) {
var i = this;
a || (a = t.get("leafDepth", !0) != null ? {
node: t.getViewRoot()
} : this.findTarget(n.getWidth() / 2, n.getHeight() / 2), a || (a = {
node: t.getData().tree.root
})), (this._breadcrumb || (this._breadcrumb = new H3(this.group))).render(t, n, a.node, function(o) {
i._state !== "animating" && (Yy(t.getViewRoot(), o) ? i._rootToNode({
node: o
}) : i._zoomToNode({
node: o
}));
});
}, e.prototype.remove = function() {
this._clearController(), this._containerGroup && this._containerGroup.removeAll(), this._storage = ms(), this._state = "ready", this._breadcrumb && this._breadcrumb.remove();
}, e.prototype.dispose = function() {
this._clearController();
}, e.prototype._zoomToNode = function(t) {
this.api.dispatchAction({
type: "treemapZoomToNode",
from: this.uid,
seriesId: this.seriesModel.id,
targetNode: t.node
});
}, e.prototype._rootToNode = function(t) {
this.api.dispatchAction({
type: "treemapRootToNode",
from: this.uid,
seriesId: this.seriesModel.id,
targetNode: t.node
});
}, e.prototype.findTarget = function(t, n) {
var a, i = this.seriesModel.getViewRoot();
return i.eachNode({
attr: "viewChildren",
order: "preorder"
}, function(o) {
var s = this._storage.background[o.getRawIndex()];
if (s) {
var l = s.transformCoordToLocal(t, n), u = s.shape;
if (u.x <= l[0] && l[0] <= u.x + u.width && u.y <= l[1] && l[1] <= u.y + u.height)
a = {
node: o,
offsetX: l[0],
offsetY: l[1]
};
else
return !1;
}
}, this), a;
}, e.type = "treemap", e;
}(Ot);
function ms() {
return {
nodeGroup: [],
background: [],
content: []
};
}
function q3(r, e, t, n, a, i, o, s, l, u) {
if (!o)
return;
var f = o.getLayout(), h = r.getData(), c = o.getModel();
if (h.setItemGraphicEl(o.dataIndex, null), !f || !f.isInView)
return;
var v = f.width, p = f.height, d = f.borderWidth, g = f.invisible, y = o.getRawIndex(), m = s && s.getRawIndex(), _ = o.viewChildren, S = f.upperHeight, w = _ && _.length, x = c.getModel("itemStyle"), b = c.getModel(["emphasis", "itemStyle"]), T = c.getModel(["blur", "itemStyle"]), D = c.getModel(["select", "itemStyle"]), A = x.get("borderRadius") || 0, M = ht("nodeGroup", jd);
if (!M)
return;
if (l.add(M), M.x = f.x || 0, M.y = f.y || 0, M.markRedraw(), th(M).nodeWidth = v, th(M).nodeHeight = p, f.isAboveViewRoot)
return M;
var L = ht("background", YS, u, Y3);
L && V(M, L, w && f.upperLabelHeight);
var I = c.getModel("emphasis"), E = I.get("focus"), P = I.get("blurScope"), N = I.get("disabled"), O = E === "ancestor" ? o.getAncestorsIndices() : E === "descendant" ? o.getDescendantIndices() : E;
if (w)
aa(M) && ti(M, !1), L && (ti(L, !N), h.setItemGraphicEl(o.dataIndex, L), gd(L, O, P));
else {
var k = ht("content", YS, u, Z3);
k && F(M, k), L.disableMorphing = !0, L && aa(L) && ti(L, !1), ti(M, !N), h.setItemGraphicEl(o.dataIndex, M), gd(M, O, P);
}
return M;
function V(dt, rt, yt) {
var ut = at(rt);
if (ut.dataIndex = o.dataIndex, ut.seriesIndex = r.seriesIndex, rt.setShape({
x: 0,
y: 0,
width: v,
height: p,
r: A
}), g)
$(rt);
else {
rt.invisible = !1;
var X = o.getVisual("style"), ot = X.stroke, Vt = KS(x);
Vt.fill = ot;
var St = Wa(b);
St.fill = b.get("borderColor");
var $t = Wa(T);
$t.fill = T.get("borderColor");
var Ft = Wa(D);
if (Ft.fill = D.get("borderColor"), yt) {
var pe = v - 2 * d;
Z(
rt,
ot,
X.opacity,
{
x: d,
y: 0,
width: pe,
height: S
}
);
} else
rt.removeTextContent();
rt.setStyle(Vt), rt.ensureState("emphasis").style = St, rt.ensureState("blur").style = $t, rt.ensureState("select").style = Ft, yi(rt);
}
dt.add(rt);
}
function F(dt, rt) {
var yt = at(rt);
yt.dataIndex = o.dataIndex, yt.seriesIndex = r.seriesIndex;
var ut = Math.max(v - 2 * d, 0), X = Math.max(p - 2 * d, 0);
if (rt.culling = !0, rt.setShape({
x: d,
y: d,
width: ut,
height: X,
r: A
}), g)
$(rt);
else {
rt.invisible = !1;
var ot = o.getVisual("style"), Vt = ot.fill, St = KS(x);
St.fill = Vt, St.decal = ot.decal;
var $t = Wa(b), Ft = Wa(T), pe = Wa(D);
Z(rt, Vt, ot.opacity, null), rt.setStyle(St), rt.ensureState("emphasis").style = $t, rt.ensureState("blur").style = Ft, rt.ensureState("select").style = pe, yi(rt);
}
dt.add(rt);
}
function $(dt) {
!dt.invisible && i.push(dt);
}
function Z(dt, rt, yt, ut) {
var X = c.getModel(ut ? qS : XS), ot = te(c.get("name"), null), Vt = X.getShallow("show");
xe(dt, se(c, ut ? qS : XS), {
defaultText: Vt ? ot : null,
inheritColor: rt,
defaultOpacity: yt,
labelFetcher: r,
labelDataIndex: o.dataIndex
});
var St = dt.getTextContent();
if (!!St) {
var $t = St.style, Ft = Pg($t.padding || 0);
ut && (dt.setTextConfig({
layoutRect: ut
}), St.disableLabelLayout = !0), St.beforeUpdate = function() {
var rn = Math.max((ut ? ut.width : dt.shape.width) - Ft[1] - Ft[3], 0), Ie = Math.max((ut ? ut.height : dt.shape.height) - Ft[0] - Ft[2], 0);
($t.width !== rn || $t.height !== Ie) && St.setStyle({
width: rn,
height: Ie
});
}, $t.truncateMinChar = 2, $t.lineOverflow = "truncate", et($t, ut, f);
var pe = St.getState("emphasis");
et(pe ? pe.style : null, ut, f);
}
}
function et(dt, rt, yt) {
var ut = dt ? dt.text : null;
if (!rt && yt.isLeafRoot && ut != null) {
var X = r.get("drillDownIcon", !0);
dt.text = X ? X + " " + ut : ut;
}
}
function ht(dt, rt, yt, ut) {
var X = m != null && t[dt][m], ot = a[dt];
return X ? (t[dt][m] = null, Lt(ot, X)) : g || (X = new rt(), X instanceof cr && (X.z2 = K3(yt, ut)), At(ot, X)), e[dt][y] = X;
}
function Lt(dt, rt) {
var yt = dt[y] = {};
rt instanceof jd ? (yt.oldX = rt.x, yt.oldY = rt.y) : yt.oldShape = B({}, rt.shape);
}
function At(dt, rt) {
var yt = dt[y] = {}, ut = o.parentNode, X = rt instanceof nt;
if (ut && (!n || n.direction === "drillDown")) {
var ot = 0, Vt = 0, St = a.background[ut.getRawIndex()];
!n && St && St.oldShape && (ot = St.oldShape.width, Vt = St.oldShape.height), X ? (yt.oldX = 0, yt.oldY = Vt) : yt.oldShape = {
x: ot,
y: Vt,
width: 0,
height: 0
};
}
yt.fadein = !X;
}
}
function K3(r, e) {
return r * U3 + e;
}
const j3 = X3;
var ml = C, J3 = j, eh = -1, Zy = function() {
function r(e) {
var t = e.mappingMethod, n = e.type, a = this.option = tt(e);
this.type = n, this.mappingMethod = t, this._normalizeData = e4[t];
var i = r.visualHandlers[n];
this.applyVisual = i.applyVisual, this.getColorMapper = i.getColorMapper, this._normalizedToVisual = i._normalizedToVisual[t], t === "piecewise" ? (zv(a), Q3(a)) : t === "category" ? a.categories ? t4(a) : zv(a, !0) : (Q(t !== "linear" || a.dataExtent), zv(a));
}
return r.prototype.mapValueToVisual = function(e) {
var t = this._normalizeData(e);
return this._normalizedToVisual(t, e);
}, r.prototype.getNormalizer = function() {
return Y(this._normalizeData, this);
}, r.listVisualTypes = function() {
return mt(r.visualHandlers);
}, r.isValidType = function(e) {
return r.visualHandlers.hasOwnProperty(e);
}, r.eachVisual = function(e, t, n) {
j(e) ? C(e, t, n) : t.call(n, e);
}, r.mapVisual = function(e, t, n) {
var a, i = z(e) ? [] : j(e) ? {} : (a = !0, null);
return r.eachVisual(e, function(o, s) {
var l = t.call(n, o, s);
a ? i = l : i[s] = l;
}), i;
}, r.retrieveVisuals = function(e) {
var t = {}, n;
return e && ml(r.visualHandlers, function(a, i) {
e.hasOwnProperty(i) && (t[i] = e[i], n = !0);
}), n ? t : null;
}, r.prepareVisualTypes = function(e) {
if (z(e))
e = e.slice();
else if (J3(e)) {
var t = [];
ml(e, function(n, a) {
t.push(a);
}), e = t;
} else
return [];
return e.sort(function(n, a) {
return a === "color" && n !== "color" && n.indexOf("color") === 0 ? 1 : -1;
}), e;
}, r.dependsOn = function(e, t) {
return t === "color" ? !!(e && e.indexOf(t) === 0) : e === t;
}, r.findPieceIndex = function(e, t, n) {
for (var a, i = 1 / 0, o = 0, s = t.length; o < s; o++) {
var l = t[o].value;
if (l != null) {
if (l === e || W(l) && l === e + "")
return o;
n && c(l, o);
}
}
for (var o = 0, s = t.length; o < s; o++) {
var u = t[o], f = u.interval, h = u.close;
if (f) {
if (f[0] === -1 / 0) {
if (Ou(h[1], e, f[1]))
return o;
} else if (f[1] === 1 / 0) {
if (Ou(h[0], f[0], e))
return o;
} else if (Ou(h[0], f[0], e) && Ou(h[1], e, f[1]))
return o;
n && c(f[0], o), n && c(f[1], o);
}
}
if (n)
return e === 1 / 0 ? t.length - 1 : e === -1 / 0 ? 0 : a;
function c(v, p) {
var d = Math.abs(v - e);
d < i && (i = d, a = p);
}
}, r.visualHandlers = {
color: {
applyVisual: _s("color"),
getColorMapper: function() {
var e = this.option;
return Y(e.mappingMethod === "category" ? function(t, n) {
return !n && (t = this._normalizeData(t)), ks.call(this, t);
} : function(t, n, a) {
var i = !!a;
return !n && (t = this._normalizeData(t)), a = mc(t, e.parsedVisual, a), i ? a : cn(a, "rgba");
}, this);
},
_normalizedToVisual: {
linear: function(e) {
return cn(mc(e, this.option.parsedVisual), "rgba");
},
category: ks,
piecewise: function(e, t) {
var n = Qd.call(this, t);
return n == null && (n = cn(mc(e, this.option.parsedVisual), "rgba")), n;
},
fixed: Ua
}
},
colorHue: ku(function(e, t) {
return zs(e, t);
}),
colorSaturation: ku(function(e, t) {
return zs(e, null, t);
}),
colorLightness: ku(function(e, t) {
return zs(e, null, null, t);
}),
colorAlpha: ku(function(e, t) {
return wf(e, t);
}),
decal: {
applyVisual: _s("decal"),
_normalizedToVisual: {
linear: null,
category: ks,
piecewise: null,
fixed: null
}
},
opacity: {
applyVisual: _s("opacity"),
_normalizedToVisual: Jd([0, 1])
},
liftZ: {
applyVisual: _s("liftZ"),
_normalizedToVisual: {
linear: Ua,
category: Ua,
piecewise: Ua,
fixed: Ua
}
},
symbol: {
applyVisual: function(e, t, n) {
var a = this.mapValueToVisual(e);
n("symbol", a);
},
_normalizedToVisual: {
linear: jS,
category: ks,
piecewise: function(e, t) {
var n = Qd.call(this, t);
return n == null && (n = jS.call(this, e)), n;
},
fixed: Ua
}
},
symbolSize: {
applyVisual: _s("symbolSize"),
_normalizedToVisual: Jd([0, 1])
}
}, r;
}();
function Q3(r) {
var e = r.pieceList;
r.hasSpecialVisual = !1, C(e, function(t, n) {
t.originIndex = n, t.visual != null && (r.hasSpecialVisual = !0);
});
}
function t4(r) {
var e = r.categories, t = r.categoryMap = {}, n = r.visual;
if (ml(e, function(o, s) {
t[o] = s;
}), !z(n)) {
var a = [];
j(n) ? ml(n, function(o, s) {
var l = t[s];
a[l != null ? l : eh] = o;
}) : a[eh] = n, n = rL(r, a);
}
for (var i = e.length - 1; i >= 0; i--)
n[i] == null && (delete t[e[i]], e.pop());
}
function zv(r, e) {
var t = r.visual, n = [];
j(t) ? ml(t, function(i) {
n.push(i);
}) : t != null && n.push(t);
var a = {
color: 1,
symbol: 1
};
!e && n.length === 1 && !a.hasOwnProperty(r.type) && (n[1] = n[0]), rL(r, n);
}
function ku(r) {
return {
applyVisual: function(e, t, n) {
var a = this.mapValueToVisual(e);
n("color", r(t("color"), a));
},
_normalizedToVisual: Jd([0, 1])
};
}
function jS(r) {
var e = this.option.visual;
return e[Math.round(It(r, [0, 1], [0, e.length - 1], !0))] || {};
}
function _s(r) {
return function(e, t, n) {
n(r, this.mapValueToVisual(e));
};
}
function ks(r) {
var e = this.option.visual;
return e[this.option.loop && r !== eh ? r % e.length : r];
}
function Ua() {
return this.option.visual[0];
}
function Jd(r) {
return {
linear: function(e) {
return It(e, r, this.option.visual, !0);
},
category: ks,
piecewise: function(e, t) {
var n = Qd.call(this, t);
return n == null && (n = It(e, r, this.option.visual, !0)), n;
},
fixed: Ua
};
}
function Qd(r) {
var e = this.option, t = e.pieceList;
if (e.hasSpecialVisual) {
var n = Zy.findPieceIndex(r, t), a = t[n];
if (a && a.visual)
return a.visual[this.type];
}
}
function rL(r, e) {
return r.visual = e, r.type === "color" && (r.parsedVisual = G(e, function(t) {
var n = Ue(t);
return !n && process.env.NODE_ENV !== "production" && _e("'" + t + "' is an illegal color, fallback to '#000000'", !0), n || [0, 0, 0, 1];
})), e;
}
var e4 = {
linear: function(r) {
return It(r, this.option.dataExtent, [0, 1], !0);
},
piecewise: function(r) {
var e = this.option.pieceList, t = Zy.findPieceIndex(r, e, !0);
if (t != null)
return It(t, [0, e.length - 1], [0, 1], !0);
},
category: function(r) {
var e = this.option.categories ? this.option.categoryMap[r] : r;
return e == null ? eh : e;
},
fixed: jt
};
function Ou(r, e, t) {
return r ? e <= t : e < t;
}
const fe = Zy;
var r4 = "itemStyle", nL = Tt();
const n4 = {
seriesType: "treemap",
reset: function(r) {
var e = r.getData().tree, t = e.root;
t.isRemoved() || aL(
t,
{},
r.getViewRoot().getAncestors(),
r
);
}
};
function aL(r, e, t, n) {
var a = r.getModel(), i = r.getLayout(), o = r.hostTree.data;
if (!(!i || i.invisible || !i.isInView)) {
var s = a.getModel(r4), l = a4(s, e, n), u = o.ensureUniqueItemVisual(r.dataIndex, "style"), f = s.get("borderColor"), h = s.get("borderColorSaturation"), c;
h != null && (c = JS(l), f = i4(h, c)), u.stroke = f;
var v = r.viewChildren;
if (!v || !v.length)
c = JS(l), u.fill = c;
else {
var p = o4(r, a, i, s, l, v);
C(v, function(d, g) {
if (d.depth >= t.length || d === t[d.depth]) {
var y = s4(a, l, d, g, p, n);
aL(d, y, t, n);
}
});
}
}
}
function a4(r, e, t) {
var n = B({}, e), a = t.designatedVisualItemStyle;
return C(["color", "colorAlpha", "colorSaturation"], function(i) {
a[i] = e[i];
var o = r.get(i);
a[i] = null, o != null && (n[i] = o);
}), n;
}
function JS(r) {
var e = Gv(r, "color");
if (e) {
var t = Gv(r, "colorAlpha"), n = Gv(r, "colorSaturation");
return n && (e = zs(e, null, null, n)), t && (e = wf(e, t)), e;
}
}
function i4(r, e) {
return e != null ? zs(e, null, null, r) : null;
}
function Gv(r, e) {
var t = r[e];
if (t != null && t !== "none")
return t;
}
function o4(r, e, t, n, a, i) {
if (!(!i || !i.length)) {
var o = Fv(e, "color") || a.color != null && a.color !== "none" && (Fv(e, "colorAlpha") || Fv(e, "colorSaturation"));
if (!!o) {
var s = e.get("visualMin"), l = e.get("visualMax"), u = t.dataExtent.slice();
s != null && s < u[0] && (u[0] = s), l != null && l > u[1] && (u[1] = l);
var f = e.get("colorMappingBy"), h = {
type: o.name,
dataExtent: u,
visual: o.range
};
h.type === "color" && (f === "index" || f === "id") ? (h.mappingMethod = "category", h.loop = !0) : h.mappingMethod = "linear";
var c = new fe(h);
return nL(c).drColorMappingBy = f, c;
}
}
}
function Fv(r, e) {
var t = r.get(e);
return z(t) && t.length ? {
name: e,
range: t
} : null;
}
function s4(r, e, t, n, a, i) {
var o = B({}, e);
if (a) {
var s = a.type, l = s === "color" && nL(a).drColorMappingBy, u = l === "index" ? n : l === "id" ? i.mapIdToIndex(t.getId()) : t.getValue(r.get("visualDimension"));
o[s] = a.mapValueToVisual(u);
}
return o;
}
var _l = Math.max, rh = Math.min, QS = qt, Xy = C, iL = ["itemStyle", "borderWidth"], l4 = ["itemStyle", "gapWidth"], u4 = ["upperLabel", "show"], f4 = ["upperLabel", "height"];
const h4 = {
seriesType: "treemap",
reset: function(r, e, t, n) {
var a = t.getWidth(), i = t.getHeight(), o = r.option, s = ee(r.getBoxLayoutParams(), {
width: t.getWidth(),
height: t.getHeight()
}), l = o.size || [], u = H(QS(s.width, l[0]), a), f = H(QS(s.height, l[1]), i), h = n && n.type, c = ["treemapZoomToNode", "treemapRootToNode"], v = yl(n, c, r), p = h === "treemapRender" || h === "treemapMove" ? n.rootRect : null, d = r.getViewRoot(), g = QM(d);
if (h !== "treemapMove") {
var y = h === "treemapZoomToNode" ? y4(r, v, d, u, f) : p ? [p.width, p.height] : [u, f], m = o.sort;
m && m !== "asc" && m !== "desc" && (m = "desc");
var _ = {
squareRatio: o.squareRatio,
sort: m,
leafDepth: o.leafDepth
};
d.hostTree.clearLayouts();
var S = {
x: 0,
y: 0,
width: y[0],
height: y[1],
area: y[0] * y[1]
};
d.setLayout(S), oL(d, _, !1, 0), S = d.getLayout(), Xy(g, function(x, b) {
var T = (g[b + 1] || d).getValue();
x.setLayout(B({
dataExtent: [T, T],
borderWidth: 0,
upperHeight: 0
}, S));
});
}
var w = r.getData().tree.root;
w.setLayout(m4(s, p, v), !0), r.setLayoutInfo(s), sL(
w,
new ft(-s.x, -s.y, a, i),
g,
d,
0
);
}
};
function oL(r, e, t, n) {
var a, i;
if (!r.isRemoved()) {
var o = r.getLayout();
a = o.width, i = o.height;
var s = r.getModel(), l = s.get(iL), u = s.get(l4) / 2, f = lL(s), h = Math.max(l, f), c = l - u, v = h - u;
r.setLayout({
borderWidth: l,
upperHeight: h,
upperLabelHeight: f
}, !0), a = _l(a - 2 * c, 0), i = _l(i - c - v, 0);
var p = a * i, d = c4(r, s, p, e, t, n);
if (!!d.length) {
var g = {
x: c,
y: v,
width: a,
height: i
}, y = rh(a, i), m = 1 / 0, _ = [];
_.area = 0;
for (var S = 0, w = d.length; S < w; ) {
var x = d[S];
_.push(x), _.area += x.getLayout().area;
var b = g4(_, y, e.squareRatio);
b <= m ? (S++, m = b) : (_.area -= _.pop().getLayout().area, tx(_, y, g, u, !1), y = rh(g.width, g.height), _.length = _.area = 0, m = 1 / 0);
}
if (_.length && tx(_, y, g, u, !0), !t) {
var T = s.get("childrenVisibleMin");
T != null && p < T && (t = !0);
}
for (var S = 0, w = d.length; S < w; S++)
oL(d[S], e, t, n + 1);
}
}
}
function c4(r, e, t, n, a, i) {
var o = r.children || [], s = n.sort;
s !== "asc" && s !== "desc" && (s = null);
var l = n.leafDepth != null && n.leafDepth <= i;
if (a && !l)
return r.viewChildren = [];
o = Et(o, function(v) {
return !v.isRemoved();
}), p4(o, s);
var u = d4(e, o, s);
if (u.sum === 0)
return r.viewChildren = [];
if (u.sum = v4(e, t, u.sum, s, o), u.sum === 0)
return r.viewChildren = [];
for (var f = 0, h = o.length; f < h; f++) {
var c = o[f].getValue() / u.sum * t;
o[f].setLayout({
area: c
});
}
return l && (o.length && r.setLayout({
isLeafRoot: !0
}, !0), o.length = 0), r.viewChildren = o, r.setLayout({
dataExtent: u.dataExtent
}, !0), o;
}
function v4(r, e, t, n, a) {
if (!n)
return t;
for (var i = r.get("visibleMin"), o = a.length, s = o, l = o - 1; l >= 0; l--) {
var u = a[n === "asc" ? o - l - 1 : l].getValue();
u / t * e < i && (s = l, t -= u);
}
return n === "asc" ? a.splice(0, o - s) : a.splice(s, o - s), t;
}
function p4(r, e) {
return e && r.sort(function(t, n) {
var a = e === "asc" ? t.getValue() - n.getValue() : n.getValue() - t.getValue();
return a === 0 ? e === "asc" ? t.dataIndex - n.dataIndex : n.dataIndex - t.dataIndex : a;
}), r;
}
function d4(r, e, t) {
for (var n = 0, a = 0, i = e.length; a < i; a++)
n += e[a].getValue();
var o = r.get("visualDimension"), s;
return !e || !e.length ? s = [NaN, NaN] : o === "value" && t ? (s = [e[e.length - 1].getValue(), e[0].getValue()], t === "asc" && s.reverse()) : (s = [1 / 0, -1 / 0], Xy(e, function(l) {
var u = l.getValue(o);
u < s[0] && (s[0] = u), u > s[1] && (s[1] = u);
})), {
sum: n,
dataExtent: s
};
}
function g4(r, e, t) {
for (var n = 0, a = 1 / 0, i = 0, o = void 0, s = r.length; i < s; i++)
o = r[i].getLayout().area, o && (o < a && (a = o), o > n && (n = o));
var l = r.area * r.area, u = e * e * t;
return l ? _l(u * n / l, l / (u * a)) : 1 / 0;
}
function tx(r, e, t, n, a) {
var i = e === t.width ? 0 : 1, o = 1 - i, s = ["x", "y"], l = ["width", "height"], u = t[s[i]], f = e ? r.area / e : 0;
(a || f > t[l[o]]) && (f = t[l[o]]);
for (var h = 0, c = r.length; h < c; h++) {
var v = r[h], p = {}, d = f ? v.getLayout().area / f : 0, g = p[l[o]] = _l(f - 2 * n, 0), y = t[s[i]] + t[l[i]] - u, m = h === c - 1 || y < d ? y : d, _ = p[l[i]] = _l(m - 2 * n, 0);
p[s[o]] = t[s[o]] + rh(n, g / 2), p[s[i]] = u + rh(n, _ / 2), u += m, v.setLayout(p, !0);
}
t[s[o]] += f, t[l[o]] -= f;
}
function y4(r, e, t, n, a) {
var i = (e || {}).node, o = [n, a];
if (!i || i === t)
return o;
for (var s, l = n * a, u = l * r.option.zoomToNodeRatio; s = i.parentNode; ) {
for (var f = 0, h = s.children, c = 0, v = h.length; c < v; c++)
f += h[c].getValue();
var p = i.getValue();
if (p === 0)
return o;
u *= f / p;
var d = s.getModel(), g = d.get(iL), y = Math.max(g, lL(d));
u += 4 * g * g + (3 * g + y) * Math.pow(u, 0.5), u > l0 && (u = l0), i = s;
}
u < l && (u = l);
var m = Math.pow(u / l, 0.5);
return [n * m, a * m];
}
function m4(r, e, t) {
if (e)
return {
x: e.x,
y: e.y
};
var n = {
x: 0,
y: 0
};
if (!t)
return n;
var a = t.node, i = a.getLayout();
if (!i)
return n;
for (var o = [i.width / 2, i.height / 2], s = a; s; ) {
var l = s.getLayout();
o[0] += l.x, o[1] += l.y, s = s.parentNode;
}
return {
x: r.width / 2 - o[0],
y: r.height / 2 - o[1]
};
}
function sL(r, e, t, n, a) {
var i = r.getLayout(), o = t[a], s = o && o === r;
if (!(o && !s || a === t.length && r !== n)) {
r.setLayout({
isInView: !0,
invisible: !s && !e.intersect(i),
isAboveViewRoot: s
}, !0);
var l = new ft(e.x - i.x, e.y - i.y, e.width, e.height);
Xy(r.viewChildren || [], function(u) {
sL(u, l, t, n, a + 1);
});
}
}
function lL(r) {
return r.get(u4) ? r.get(f4) : 0;
}
function _4(r) {
r.registerSeriesModel(V3), r.registerChartView(j3), r.registerVisual(n4), r.registerLayout(h4), R3(r);
}
function S4(r) {
var e = r.findComponents({
mainType: "legend"
});
!e || !e.length || r.eachSeriesByType("graph", function(t) {
var n = t.getCategoriesData(), a = t.getGraph(), i = a.data, o = n.mapArray(n.getName);
i.filterSelf(function(s) {
var l = i.getItemModel(s), u = l.getShallow("category");
if (u != null) {
wt(u) && (u = o[u]);
for (var f = 0; f < e.length; f++)
if (!e[f].isSelected(u))
return !1;
}
return !0;
});
});
}
function x4(r) {
var e = {};
r.eachSeriesByType("graph", function(t) {
var n = t.getCategoriesData(), a = t.getData(), i = {};
n.each(function(o) {
var s = n.getName(o);
i["ec-" + s] = o;
var l = n.getItemModel(o), u = l.getModel("itemStyle").getItemStyle();
u.fill || (u.fill = t.getColorFromPalette(s, e)), n.setItemVisual(o, "style", u);
for (var f = ["symbol", "symbolSize", "symbolKeepAspect"], h = 0; h < f.length; h++) {
var c = l.getShallow(f[h], !0);
c != null && n.setItemVisual(o, f[h], c);
}
}), n.count() && a.each(function(o) {
var s = a.getItemModel(o), l = s.getShallow("category");
if (l != null) {
W(l) && (l = i["ec-" + l]);
var u = n.getItemVisual(l, "style"), f = a.ensureUniqueItemVisual(o, "style");
B(f, u);
for (var h = ["symbol", "symbolSize", "symbolKeepAspect"], c = 0; c < h.length; c++)
a.setItemVisual(o, h[c], n.getItemVisual(l, h[c]));
}
});
});
}
function Vu(r) {
return r instanceof Array || (r = [r, r]), r;
}
function w4(r) {
r.eachSeriesByType("graph", function(e) {
var t = e.getGraph(), n = e.getEdgeData(), a = Vu(e.get("edgeSymbol")), i = Vu(e.get("edgeSymbolSize"));
n.setVisual("fromSymbol", a && a[0]), n.setVisual("toSymbol", a && a[1]), n.setVisual("fromSymbolSize", i && i[0]), n.setVisual("toSymbolSize", i && i[1]), n.setVisual("style", e.getModel("lineStyle").getLineStyle()), n.each(function(o) {
var s = n.getItemModel(o), l = t.getEdgeByIndex(o), u = Vu(s.getShallow("symbol", !0)), f = Vu(s.getShallow("symbolSize", !0)), h = s.getModel("lineStyle").getLineStyle(), c = n.ensureUniqueItemVisual(o, "style");
switch (B(c, h), c.stroke) {
case "source": {
var v = l.node1.getVisual("style");
c.stroke = v && v.fill;
break;
}
case "target": {
var v = l.node2.getVisual("style");
c.stroke = v && v.fill;
break;
}
}
u[0] && l.setVisual("fromSymbol", u[0]), u[1] && l.setVisual("toSymbol", u[1]), f[0] && l.setVisual("fromSymbolSize", f[0]), f[1] && l.setVisual("toSymbolSize", f[1]);
});
});
}
var tg = "-->", nc = function(r) {
return r.get("autoCurveness") || null;
}, uL = function(r, e) {
var t = nc(r), n = 20, a = [];
if (wt(t))
n = t;
else if (z(t)) {
r.__curvenessList = t;
return;
}
e > n && (n = e);
var i = n % 2 ? n + 2 : n + 3;
a = [];
for (var o = 0; o < i; o++)
a.push((o % 2 ? o + 1 : o) / 10 * (o % 2 ? -1 : 1));
r.__curvenessList = a;
}, Sl = function(r, e, t) {
var n = [r.id, r.dataIndex].join("."), a = [e.id, e.dataIndex].join(".");
return [t.uid, n, a].join(tg);
}, fL = function(r) {
var e = r.split(tg);
return [e[0], e[2], e[1]].join(tg);
}, b4 = function(r, e) {
var t = Sl(r.node1, r.node2, e);
return e.__edgeMap[t];
}, T4 = function(r, e) {
var t = eg(Sl(r.node1, r.node2, e), e), n = eg(Sl(r.node2, r.node1, e), e);
return t + n;
}, eg = function(r, e) {
var t = e.__edgeMap;
return t[r] ? t[r].length : 0;
};
function C4(r) {
!nc(r) || (r.__curvenessList = [], r.__edgeMap = {}, uL(r));
}
function D4(r, e, t, n) {
if (!!nc(t)) {
var a = Sl(r, e, t), i = t.__edgeMap, o = i[fL(a)];
i[a] && !o ? i[a].isForward = !0 : o && i[a] && (o.isForward = !0, i[a].isForward = !1), i[a] = i[a] || [], i[a].push(n);
}
}
function qy(r, e, t, n) {
var a = nc(e), i = z(a);
if (!a)
return null;
var o = b4(r, e);
if (!o)
return null;
for (var s = -1, l = 0; l < o.length; l++)
if (o[l] === t) {
s = l;
break;
}
var u = T4(r, e);
uL(e, u), r.lineStyle = r.lineStyle || {};
var f = Sl(r.node1, r.node2, e), h = e.__curvenessList, c = i || u % 2 ? 0 : 1;
if (o.isForward)
return h[c + s];
var v = fL(f), p = eg(v, e), d = h[s + p + c];
return n ? i ? a && a[0] === 0 ? (p + c) % 2 ? d : -d : ((p % 2 ? 0 : 1) + c) % 2 ? d : -d : (p + c) % 2 ? d : -d : h[s + p + c];
}
function hL(r) {
var e = r.coordinateSystem;
if (!(e && e.type !== "view")) {
var t = r.getGraph();
t.eachNode(function(n) {
var a = n.getModel();
n.setLayout([+a.get("x"), +a.get("y")]);
}), cL(t, r);
}
}
function cL(r, e) {
r.eachEdge(function(t, n) {
var a = Tr(t.getModel().get(["lineStyle", "curveness"]), -qy(t, e, n, !0), 0), i = hn(t.node1.getLayout()), o = hn(t.node2.getLayout()), s = [i, o];
+a && s.push([(i[0] + o[0]) / 2 - (i[1] - o[1]) * a, (i[1] + o[1]) / 2 - (o[0] - i[0]) * a]), t.setLayout(s);
});
}
function A4(r, e) {
r.eachSeriesByType("graph", function(t) {
var n = t.get("layout"), a = t.coordinateSystem;
if (a && a.type !== "view") {
var i = t.getData(), o = [];
C(a.dimensions, function(c) {
o = o.concat(i.mapDimensionsAll(c));
});
for (var s = 0; s < i.count(); s++) {
for (var l = [], u = !1, f = 0; f < o.length; f++) {
var h = i.get(o[f], s);
isNaN(h) || (u = !0), l.push(h);
}
u ? i.setItemLayout(s, a.dataToPoint(l)) : i.setItemLayout(s, [NaN, NaN]);
}
cL(i.graph, t);
} else
(!n || n === "none") && hL(t);
});
}
function Os(r) {
var e = r.coordinateSystem;
if (e.type !== "view")
return 1;
var t = r.option.nodeScaleRatio, n = e.scaleX, a = e.getZoom(), i = (a - 1) * t + 1;
return i / n;
}
function Vs(r) {
var e = r.getVisual("symbolSize");
return e instanceof Array && (e = (e[0] + e[1]) / 2), +e;
}
var ex = Math.PI, Hv = [];
function vL(r, e) {
var t = r.coordinateSystem;
if (!(t && t.type !== "view")) {
var n = t.getBoundingRect(), a = r.getData(), i = a.graph, o = n.width / 2 + n.x, s = n.height / 2 + n.y, l = Math.min(n.width, n.height) / 2, u = a.count();
a.setLayout({
cx: o,
cy: s
}), u && (M4[e](r, i, a, l, o, s, u), i.eachEdge(function(f, h) {
var c = Tr(f.getModel().get(["lineStyle", "curveness"]), qy(f, r, h), 0), v = hn(f.node1.getLayout()), p = hn(f.node2.getLayout()), d, g = (v[0] + p[0]) / 2, y = (v[1] + p[1]) / 2;
+c && (c *= 3, d = [o * c + g * (1 - c), s * c + y * (1 - c)]), f.setLayout([v, p, d]);
}));
}
}
var M4 = {
value: function(r, e, t, n, a, i, o) {
var s = 0, l = t.getSum("value"), u = Math.PI * 2 / (l || o);
e.eachNode(function(f) {
var h = f.getValue("value"), c = u * (l ? h : 1) / 2;
s += c, f.setLayout([n * Math.cos(s) + a, n * Math.sin(s) + i]), s += c;
});
},
symbolSize: function(r, e, t, n, a, i, o) {
var s = 0;
Hv.length = o;
var l = Os(r);
e.eachNode(function(h) {
var c = Vs(h);
isNaN(c) && (c = 2), c < 0 && (c = 0), c *= l;
var v = Math.asin(c / 2 / n);
isNaN(v) && (v = ex / 2), Hv[h.dataIndex] = v, s += v * 2;
});
var u = (2 * ex - s) / o / 2, f = 0;
e.eachNode(function(h) {
var c = u + Hv[h.dataIndex];
f += c, h.setLayout([n * Math.cos(f) + a, n * Math.sin(f) + i]), f += c;
});
}
};
function L4(r) {
r.eachSeriesByType("graph", function(e) {
e.get("layout") === "circular" && vL(e, "symbolSize");
});
}
var Wi = Fp;
function I4(r, e, t) {
for (var n = r, a = e, i = t.rect, o = i.width, s = i.height, l = [i.x + o / 2, i.y + s / 2], u = t.gravity == null ? 0.1 : t.gravity, f = 0; f < n.length; f++) {
var h = n[f];
h.p || (h.p = wi(o * (Math.random() - 0.5) + l[0], s * (Math.random() - 0.5) + l[1])), h.pp = hn(h.p), h.edges = null;
}
var c = t.friction == null ? 0.6 : t.friction, v = c, p, d;
return {
warmUp: function() {
v = c * 0.8;
},
setFixed: function(g) {
n[g].fixed = !0;
},
setUnfixed: function(g) {
n[g].fixed = !1;
},
beforeStep: function(g) {
p = g;
},
afterStep: function(g) {
d = g;
},
step: function(g) {
p && p(n, a);
for (var y = [], m = n.length, _ = 0; _ < a.length; _++) {
var S = a[_];
if (!S.ignoreForceLayout) {
var w = S.n1, x = S.n2;
Ja(y, x.p, w.p);
var b = Hp(y) - S.d, T = x.w / (w.w + x.w);
isNaN(T) && (T = 0), Cl(y, y), !w.fixed && Wi(w.p, w.p, y, T * b * v), !x.fixed && Wi(x.p, x.p, y, -(1 - T) * b * v);
}
}
for (var _ = 0; _ < m; _++) {
var D = n[_];
D.fixed || (Ja(y, l, D.p), Wi(D.p, D.p, y, u * v));
}
for (var _ = 0; _ < m; _++)
for (var w = n[_], A = _ + 1; A < m; A++) {
var x = n[A];
Ja(y, x.p, w.p);
var b = Hp(y);
b === 0 && (k2(y, Math.random() - 0.5, Math.random() - 0.5), b = 1);
var M = (w.rep + x.rep) / b / b;
!w.fixed && Wi(w.pp, w.pp, y, M), !x.fixed && Wi(x.pp, x.pp, y, -M);
}
for (var L = [], _ = 0; _ < m; _++) {
var D = n[_];
D.fixed || (Ja(L, D.p, D.pp), Wi(D.p, D.p, L, v), be(D.pp, D.p));
}
v = v * 0.992;
var I = v < 0.01;
d && d(n, a, I), g && g(I);
}
};
}
function E4(r) {
r.eachSeriesByType("graph", function(e) {
var t = e.coordinateSystem;
if (!(t && t.type !== "view"))
if (e.get("layout") === "force") {
var n = e.preservedPoints || {}, a = e.getGraph(), i = a.data, o = a.edgeData, s = e.getModel("force"), l = s.get("initLayout");
e.preservedPoints ? i.each(function(_) {
var S = i.getId(_);
i.setItemLayout(_, n[S] || [NaN, NaN]);
}) : !l || l === "none" ? hL(e) : l === "circular" && vL(e, "value");
var u = i.getDataExtent("value"), f = o.getDataExtent("value"), h = s.get("repulsion"), c = s.get("edgeLength"), v = z(h) ? h : [h, h], p = z(c) ? c : [c, c];
p = [p[1], p[0]];
var d = i.mapArray("value", function(_, S) {
var w = i.getItemLayout(S), x = It(_, u, v);
return isNaN(x) && (x = (v[0] + v[1]) / 2), {
w: x,
rep: x,
fixed: i.getItemModel(S).get("fixed"),
p: !w || isNaN(w[0]) || isNaN(w[1]) ? null : w
};
}), g = o.mapArray("value", function(_, S) {
var w = a.getEdgeByIndex(S), x = It(_, f, p);
isNaN(x) && (x = (p[0] + p[1]) / 2);
var b = w.getModel(), T = Tr(w.getModel().get(["lineStyle", "curveness"]), -qy(w, e, S, !0), 0);
return {
n1: d[w.node1.dataIndex],
n2: d[w.node2.dataIndex],
d: x,
curveness: T,
ignoreForceLayout: b.get("ignoreForceLayout")
};
}), y = t.getBoundingRect(), m = I4(d, g, {
rect: y,
gravity: s.get("gravity"),
friction: s.get("friction")
});
m.beforeStep(function(_, S) {
for (var w = 0, x = _.length; w < x; w++)
_[w].fixed && be(_[w].p, a.getNodeByIndex(w).getLayout());
}), m.afterStep(function(_, S, w) {
for (var x = 0, b = _.length; x < b; x++)
_[x].fixed || a.getNodeByIndex(x).setLayout(_[x].p), n[i.getId(x)] = _[x].p;
for (var x = 0, b = S.length; x < b; x++) {
var T = S[x], D = a.getEdgeByIndex(x), A = T.n1.p, M = T.n2.p, L = D.getLayout();
L = L ? L.slice() : [], L[0] = L[0] || [], L[1] = L[1] || [], be(L[0], A), be(L[1], M), +T.curveness && (L[2] = [(A[0] + M[0]) / 2 - (A[1] - M[1]) * T.curveness, (A[1] + M[1]) / 2 - (M[0] - A[0]) * T.curveness]), D.setLayout(L);
}
}), e.forceLayout = m, e.preservedPoints = n, m.step();
} else
e.forceLayout = null;
});
}
function P4(r, e, t) {
var n = B(r.getBoxLayoutParams(), {
aspect: t
});
return ee(n, {
width: e.getWidth(),
height: e.getHeight()
});
}
function N4(r, e) {
var t = [];
return r.eachSeriesByType("graph", function(n) {
var a = n.get("coordinateSystem");
if (!a || a === "view") {
var i = n.getData(), o = i.mapArray(function(g) {
var y = i.getItemModel(g);
return [+y.get("x"), +y.get("y")];
}), s = [], l = [];
Ih(o, s, l), l[0] - s[0] === 0 && (l[0] += 1, s[0] -= 1), l[1] - s[1] === 0 && (l[1] += 1, s[1] -= 1);
var u = (l[0] - s[0]) / (l[1] - s[1]), f = P4(n, e, u);
isNaN(u) && (s = [f.x, f.y], l = [f.x + f.width, f.y + f.height]);
var h = l[0] - s[0], c = l[1] - s[1], v = f.width, p = f.height, d = n.coordinateSystem = new Ul();
d.zoomLimit = n.get("scaleLimit"), d.setBoundingRect(s[0], s[1], h, c), d.setViewRect(f.x, f.y, v, p), d.setCenter(n.get("center"), e), d.setZoom(n.get("zoom")), t.push(d);
}
}), t;
}
var rx = oe.prototype, $v = Rh.prototype, pL = function() {
function r() {
this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.percent = 1;
}
return r;
}();
(function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e;
})(pL);
function Wv(r) {
return isNaN(+r.cpx1) || isNaN(+r.cpy1);
}
var R4 = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "ec-line", n;
}
return e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new pL();
}, e.prototype.buildPath = function(t, n) {
Wv(n) ? rx.buildPath.call(this, t, n) : $v.buildPath.call(this, t, n);
}, e.prototype.pointAt = function(t) {
return Wv(this.shape) ? rx.pointAt.call(this, t) : $v.pointAt.call(this, t);
}, e.prototype.tangentAt = function(t) {
var n = this.shape, a = Wv(n) ? [n.x2 - n.x1, n.y2 - n.y1] : $v.tangentAt.call(this, t);
return Cl(a, a);
}, e;
}(gt);
const k4 = R4;
var Uv = ["fromSymbol", "toSymbol"];
function nx(r) {
return "_" + r + "Type";
}
function ax(r, e, t) {
var n = e.getItemVisual(t, r);
if (!(!n || n === "none")) {
var a = e.getItemVisual(t, r + "Size"), i = e.getItemVisual(t, r + "Rotate"), o = e.getItemVisual(t, r + "Offset"), s = e.getItemVisual(t, r + "KeepAspect"), l = kl(a), u = Yo(o || 0, l), f = Jt(n, -l[0] / 2 + u[0], -l[1] / 2 + u[1], l[0], l[1], null, s);
return f.__specifiedRotation = i == null || isNaN(i) ? void 0 : +i * Math.PI / 180 || 0, f.name = r, f;
}
}
function O4(r) {
var e = new k4({
name: "line",
subPixelOptimize: !0
});
return rg(e.shape, r), e;
}
function rg(r, e) {
r.x1 = e[0][0], r.y1 = e[0][1], r.x2 = e[1][0], r.y2 = e[1][1], r.percent = 1;
var t = e[2];
t ? (r.cpx1 = t[0], r.cpy1 = t[1]) : (r.cpx1 = NaN, r.cpy1 = NaN);
}
var V4 = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this) || this;
return i._createLine(t, n, a), i;
}
return e.prototype._createLine = function(t, n, a) {
var i = t.hostModel, o = t.getItemLayout(n), s = O4(o);
s.shape.percent = 0, Bt(s, {
shape: {
percent: 1
}
}, i, n), this.add(s), C(Uv, function(l) {
var u = ax(l, t, n);
this.add(u), this[nx(l)] = t.getItemVisual(n, l);
}, this), this._updateCommonStl(t, n, a);
}, e.prototype.updateData = function(t, n, a) {
var i = t.hostModel, o = this.childOfName("line"), s = t.getItemLayout(n), l = {
shape: {}
};
rg(l.shape, s), bt(o, l, i, n), C(Uv, function(u) {
var f = t.getItemVisual(n, u), h = nx(u);
if (this[h] !== f) {
this.remove(this.childOfName(u));
var c = ax(u, t, n);
this.add(c);
}
this[h] = f;
}, this), this._updateCommonStl(t, n, a);
}, e.prototype.getLinePath = function() {
return this.childAt(0);
}, e.prototype._updateCommonStl = function(t, n, a) {
var i = t.hostModel, o = this.childOfName("line"), s = a && a.emphasisLineStyle, l = a && a.blurLineStyle, u = a && a.selectLineStyle, f = a && a.labelStatesModels, h = a && a.emphasisDisabled, c = a && a.focus, v = a && a.blurScope;
if (!a || t.hasItemOption) {
var p = t.getItemModel(n), d = p.getModel("emphasis");
s = d.getModel("lineStyle").getLineStyle(), l = p.getModel(["blur", "lineStyle"]).getLineStyle(), u = p.getModel(["select", "lineStyle"]).getLineStyle(), h = d.get("disabled"), c = d.get("focus"), v = d.get("blurScope"), f = se(p);
}
var g = t.getItemVisual(n, "style"), y = g.stroke;
o.useStyle(g), o.style.fill = null, o.style.strokeNoScale = !0, o.ensureState("emphasis").style = s, o.ensureState("blur").style = l, o.ensureState("select").style = u, C(Uv, function(x) {
var b = this.childOfName(x);
if (b) {
b.setColor(y), b.style.opacity = g.opacity;
for (var T = 0; T < Le.length; T++) {
var D = Le[T], A = o.getState(D);
if (A) {
var M = A.style || {}, L = b.ensureState(D), I = L.style || (L.style = {});
M.stroke != null && (I[b.__isEmptyBrush ? "stroke" : "fill"] = M.stroke), M.opacity != null && (I.opacity = M.opacity);
}
}
b.markRedraw();
}
}, this);
var m = i.getRawValue(n);
xe(this, f, {
labelDataIndex: n,
labelFetcher: {
getFormattedLabel: function(x, b) {
return i.getFormattedLabel(x, b, t.dataType);
}
},
inheritColor: y || "#000",
defaultOpacity: g.opacity,
defaultText: (m == null ? t.getName(n) : isFinite(m) ? Wt(m) : m) + ""
});
var _ = this.getTextContent();
if (_) {
var S = f.normal;
_.__align = _.style.align, _.__verticalAlign = _.style.verticalAlign, _.__position = S.get("position") || "middle";
var w = S.get("distance");
z(w) || (w = [w, w]), _.__labelDistance = w;
}
this.setTextConfig({
position: null,
local: !0,
inside: !1
}), Ut(this, c, v, h);
}, e.prototype.highlight = function() {
Sn(this);
}, e.prototype.downplay = function() {
xn(this);
}, e.prototype.updateLayout = function(t, n) {
this.setLinePoints(t.getItemLayout(n));
}, e.prototype.setLinePoints = function(t) {
var n = this.childOfName("line");
rg(n.shape, t), n.dirty();
}, e.prototype.beforeUpdate = function() {
var t = this, n = t.childOfName("fromSymbol"), a = t.childOfName("toSymbol"), i = t.getTextContent();
if (!n && !a && (!i || i.ignore))
return;
for (var o = 1, s = this.parent; s; )
s.scaleX && (o /= s.scaleX), s = s.parent;
var l = t.childOfName("line");
if (!this.__dirty && !l.__dirty)
return;
var u = l.shape.percent, f = l.pointAt(0), h = l.pointAt(u), c = Ja([], h, f);
Cl(c, c);
function v(A, M) {
var L = A.__specifiedRotation;
if (L == null) {
var I = l.tangentAt(M);
A.attr("rotation", (M === 1 ? -1 : 1) * Math.PI / 2 - Math.atan2(I[1], I[0]));
} else
A.attr("rotation", L);
}
if (n && (n.setPosition(f), v(n, 0), n.scaleX = n.scaleY = o * u, n.markRedraw()), a && (a.setPosition(h), v(a, 1), a.scaleX = a.scaleY = o * u, a.markRedraw()), i && !i.ignore) {
i.x = i.y = 0, i.originX = i.originY = 0;
var p = void 0, d = void 0, g = i.__labelDistance, y = g[0] * o, m = g[1] * o, _ = u / 2, S = l.tangentAt(_), w = [S[1], -S[0]], x = l.pointAt(_);
w[1] > 0 && (w[0] = -w[0], w[1] = -w[1]);
var b = S[0] < 0 ? -1 : 1;
if (i.__position !== "start" && i.__position !== "end") {
var T = -Math.atan2(S[1], S[0]);
h[0] < f[0] && (T = Math.PI + T), i.rotation = T;
}
var D = void 0;
switch (i.__position) {
case "insideStartTop":
case "insideMiddleTop":
case "insideEndTop":
case "middle":
D = -m, d = "bottom";
break;
case "insideStartBottom":
case "insideMiddleBottom":
case "insideEndBottom":
D = m, d = "top";
break;
default:
D = 0, d = "middle";
}
switch (i.__position) {
case "end":
i.x = c[0] * y + h[0], i.y = c[1] * m + h[1], p = c[0] > 0.8 ? "left" : c[0] < -0.8 ? "right" : "center", d = c[1] > 0.8 ? "top" : c[1] < -0.8 ? "bottom" : "middle";
break;
case "start":
i.x = -c[0] * y + f[0], i.y = -c[1] * m + f[1], p = c[0] > 0.8 ? "right" : c[0] < -0.8 ? "left" : "center", d = c[1] > 0.8 ? "bottom" : c[1] < -0.8 ? "top" : "middle";
break;
case "insideStartTop":
case "insideStart":
case "insideStartBottom":
i.x = y * b + f[0], i.y = f[1] + D, p = S[0] < 0 ? "right" : "left", i.originX = -y * b, i.originY = -D;
break;
case "insideMiddleTop":
case "insideMiddle":
case "insideMiddleBottom":
case "middle":
i.x = x[0], i.y = x[1] + D, p = "center", i.originY = -D;
break;
case "insideEndTop":
case "insideEnd":
case "insideEndBottom":
i.x = -y * b + h[0], i.y = h[1] + D, p = S[0] >= 0 ? "right" : "left", i.originX = y * b, i.originY = -D;
break;
}
i.scaleX = i.scaleY = o, i.setStyle({
verticalAlign: i.__verticalAlign || d,
align: i.__align || p
});
}
}, e;
}(nt);
const Ky = V4;
var B4 = function() {
function r(e) {
this.group = new nt(), this._LineCtor = e || Ky;
}
return r.prototype.updateData = function(e) {
var t = this;
this._progressiveEls = null;
var n = this, a = n.group, i = n._lineData;
n._lineData = e, i || a.removeAll();
var o = ix(e);
e.diff(i).add(function(s) {
t._doAdd(e, s, o);
}).update(function(s, l) {
t._doUpdate(i, e, l, s, o);
}).remove(function(s) {
a.remove(i.getItemGraphicEl(s));
}).execute();
}, r.prototype.updateLayout = function() {
var e = this._lineData;
!e || e.eachItemGraphicEl(function(t, n) {
t.updateLayout(e, n);
}, this);
}, r.prototype.incrementalPrepareUpdate = function(e) {
this._seriesScope = ix(e), this._lineData = null, this.group.removeAll();
}, r.prototype.incrementalUpdate = function(e, t) {
this._progressiveEls = [];
function n(s) {
!s.isGroup && !z4(s) && (s.incremental = !0, s.ensureState("emphasis").hoverLayer = !0);
}
for (var a = e.start; a < e.end; a++) {
var i = t.getItemLayout(a);
if (Yv(i)) {
var o = new this._LineCtor(t, a, this._seriesScope);
o.traverse(n), this.group.add(o), t.setItemGraphicEl(a, o), this._progressiveEls.push(o);
}
}
}, r.prototype.remove = function() {
this.group.removeAll();
}, r.prototype.eachRendered = function(e) {
ca(this._progressiveEls || this.group, e);
}, r.prototype._doAdd = function(e, t, n) {
var a = e.getItemLayout(t);
if (!!Yv(a)) {
var i = new this._LineCtor(e, t, n);
e.setItemGraphicEl(t, i), this.group.add(i);
}
}, r.prototype._doUpdate = function(e, t, n, a, i) {
var o = e.getItemGraphicEl(n);
if (!Yv(t.getItemLayout(a))) {
this.group.remove(o);
return;
}
o ? o.updateData(t, a, i) : o = new this._LineCtor(t, a, i), t.setItemGraphicEl(a, o), this.group.add(o);
}, r;
}();
function z4(r) {
return r.animators && r.animators.length > 0;
}
function ix(r) {
var e = r.hostModel, t = e.getModel("emphasis");
return {
lineStyle: e.getModel("lineStyle").getLineStyle(),
emphasisLineStyle: t.getModel(["lineStyle"]).getLineStyle(),
blurLineStyle: e.getModel(["blur", "lineStyle"]).getLineStyle(),
selectLineStyle: e.getModel(["select", "lineStyle"]).getLineStyle(),
emphasisDisabled: t.get("disabled"),
blurScope: t.get("blurScope"),
focus: t.get("focus"),
labelStatesModels: se(e)
};
}
function ox(r) {
return isNaN(r[0]) || isNaN(r[1]);
}
function Yv(r) {
return r && !ox(r[0]) && !ox(r[1]);
}
const jy = B4;
var Zv = [], Xv = [], qv = [], Ui = ie, Kv = ai, sx = Math.abs;
function lx(r, e, t) {
for (var n = r[0], a = r[1], i = r[2], o = 1 / 0, s, l = t * t, u = 0.1, f = 0.1; f <= 0.9; f += 0.1) {
Zv[0] = Ui(n[0], a[0], i[0], f), Zv[1] = Ui(n[1], a[1], i[1], f);
var h = sx(Kv(Zv, e) - l);
h < o && (o = h, s = f);
}
for (var c = 0; c < 32; c++) {
var v = s + u;
Xv[0] = Ui(n[0], a[0], i[0], s), Xv[1] = Ui(n[1], a[1], i[1], s), qv[0] = Ui(n[0], a[0], i[0], v), qv[1] = Ui(n[1], a[1], i[1], v);
var h = Kv(Xv, e) - l;
if (sx(h) < 0.01)
break;
var p = Kv(qv, e) - l;
u /= 2, h < 0 ? p >= 0 ? s = s + u : s = s - u : p >= 0 ? s = s - u : s = s + u;
}
return s;
}
function jv(r, e) {
var t = [], n = el, a = [[], [], []], i = [[], []], o = [];
e /= 2, r.eachEdge(function(s, l) {
var u = s.getLayout(), f = s.getVisual("fromSymbol"), h = s.getVisual("toSymbol");
u.__original || (u.__original = [hn(u[0]), hn(u[1])], u[2] && u.__original.push(hn(u[2])));
var c = u.__original;
if (u[2] != null) {
if (be(a[0], c[0]), be(a[1], c[2]), be(a[2], c[1]), f && f !== "none") {
var v = Vs(s.node1), p = lx(a, c[0], v * e);
n(a[0][0], a[1][0], a[2][0], p, t), a[0][0] = t[3], a[1][0] = t[4], n(a[0][1], a[1][1], a[2][1], p, t), a[0][1] = t[3], a[1][1] = t[4];
}
if (h && h !== "none") {
var v = Vs(s.node2), p = lx(a, c[1], v * e);
n(a[0][0], a[1][0], a[2][0], p, t), a[1][0] = t[1], a[2][0] = t[2], n(a[0][1], a[1][1], a[2][1], p, t), a[1][1] = t[1], a[2][1] = t[2];
}
be(u[0], a[0]), be(u[1], a[2]), be(u[2], a[1]);
} else {
if (be(i[0], c[0]), be(i[1], c[1]), Ja(o, i[1], i[0]), Cl(o, o), f && f !== "none") {
var v = Vs(s.node1);
Fp(i[0], i[0], o, v * e);
}
if (h && h !== "none") {
var v = Vs(s.node2);
Fp(i[1], i[1], o, -v * e);
}
be(u[0], i[0]), be(u[1], i[1]);
}
});
}
function ux(r) {
return r.type === "view";
}
var G4 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n) {
var a = new Gl(), i = new jy(), o = this.group;
this._controller = new Wl(n.getZr()), this._controllerHost = {
target: o
}, o.add(a.group), o.add(i.group), this._symbolDraw = a, this._lineDraw = i, this._firstRender = !0;
}, e.prototype.render = function(t, n, a) {
var i = this, o = t.coordinateSystem;
this._model = t;
var s = this._symbolDraw, l = this._lineDraw, u = this.group;
if (ux(o)) {
var f = {
x: o.x,
y: o.y,
scaleX: o.scaleX,
scaleY: o.scaleY
};
this._firstRender ? u.attr(f) : bt(u, f, t);
}
jv(t.getGraph(), Os(t));
var h = t.getData();
s.updateData(h);
var c = t.getEdgeData();
l.updateData(c), this._updateNodeAndLinkScale(), this._updateController(t, n, a), clearTimeout(this._layoutTimeout);
var v = t.forceLayout, p = t.get(["force", "layoutAnimation"]);
v && this._startForceLayoutIteration(v, p), h.graph.eachNode(function(m) {
var _ = m.dataIndex, S = m.getGraphicEl(), w = m.getModel();
if (!!S) {
S.off("drag").off("dragend");
var x = w.get("draggable");
x && S.on("drag", function() {
v && (v.warmUp(), !i._layouting && i._startForceLayoutIteration(v, p), v.setFixed(_), h.setItemLayout(_, [S.x, S.y]));
}).on("dragend", function() {
v && v.setUnfixed(_);
}), S.setDraggable(x && !!v, !!w.get("cursor"));
var b = w.get(["emphasis", "focus"]);
b === "adjacency" && (at(S).focus = m.getAdjacentDataIndices());
}
}), h.graph.eachEdge(function(m) {
var _ = m.getGraphicEl(), S = m.getModel().get(["emphasis", "focus"]);
!_ || S === "adjacency" && (at(_).focus = {
edge: [m.dataIndex],
node: [m.node1.dataIndex, m.node2.dataIndex]
});
});
var d = t.get("layout") === "circular" && t.get(["circular", "rotateLabel"]), g = h.getLayout("cx"), y = h.getLayout("cy");
h.eachItemGraphicEl(function(m, _) {
var S = h.getItemModel(_), w = S.get(["label", "rotate"]) || 0, x = m.getSymbolPath();
if (d) {
var b = h.getItemLayout(_), T = Math.atan2(b[1] - y, b[0] - g);
T < 0 && (T = Math.PI * 2 + T);
var D = b[0] < g;
D && (T = T - Math.PI);
var A = D ? "left" : "right";
x.setTextConfig({
rotation: -T,
position: A,
origin: "center"
});
var M = x.ensureState("emphasis");
B(M.textConfig || (M.textConfig = {}), {
position: A
});
} else
x.setTextConfig({
rotation: w *= Math.PI / 180
});
}), this._firstRender = !1;
}, e.prototype.dispose = function() {
this._controller && this._controller.dispose(), this._controllerHost = null;
}, e.prototype._startForceLayoutIteration = function(t, n) {
var a = this;
(function i() {
t.step(function(o) {
a.updateLayout(a._model), (a._layouting = !o) && (n ? a._layoutTimeout = setTimeout(i, 16) : i());
});
})();
}, e.prototype._updateController = function(t, n, a) {
var i = this, o = this._controller, s = this._controllerHost, l = this.group;
if (o.setPointerChecker(function(u, f, h) {
var c = l.getBoundingRect();
return c.applyTransform(l.transform), c.contain(f, h) && !tc(u, a, t);
}), !ux(t.coordinateSystem)) {
o.disable();
return;
}
o.enable(t.get("roam")), s.zoomLimit = t.get("scaleLimit"), s.zoom = t.coordinateSystem.getZoom(), o.off("pan").off("zoom").on("pan", function(u) {
Gy(s, u.dx, u.dy), a.dispatchAction({
seriesId: t.id,
type: "graphRoam",
dx: u.dx,
dy: u.dy
});
}).on("zoom", function(u) {
Fy(s, u.scale, u.originX, u.originY), a.dispatchAction({
seriesId: t.id,
type: "graphRoam",
zoom: u.scale,
originX: u.originX,
originY: u.originY
}), i._updateNodeAndLinkScale(), jv(t.getGraph(), Os(t)), i._lineDraw.updateLayout(), a.updateLabelLayout();
});
}, e.prototype._updateNodeAndLinkScale = function() {
var t = this._model, n = t.getData(), a = Os(t);
n.eachItemGraphicEl(function(i, o) {
i && i.setSymbolScale(a);
});
}, e.prototype.updateLayout = function(t) {
jv(t.getGraph(), Os(t)), this._symbolDraw.updateLayout(), this._lineDraw.updateLayout();
}, e.prototype.remove = function(t, n) {
this._symbolDraw && this._symbolDraw.remove(), this._lineDraw && this._lineDraw.remove();
}, e.type = "graph", e;
}(Ot);
const F4 = G4;
function Yi(r) {
return "_EC_" + r;
}
var H4 = function() {
function r(e) {
this.type = "graph", this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this._directed = e || !1;
}
return r.prototype.isDirected = function() {
return this._directed;
}, r.prototype.addNode = function(e, t) {
e = e == null ? "" + t : "" + e;
var n = this._nodesMap;
if (n[Yi(e)]) {
process.env.NODE_ENV !== "production" && console.error("Graph nodes have duplicate name or id");
return;
}
var a = new Ya(e, t);
return a.hostGraph = this, this.nodes.push(a), n[Yi(e)] = a, a;
}, r.prototype.getNodeByIndex = function(e) {
var t = this.data.getRawIndex(e);
return this.nodes[t];
}, r.prototype.getNodeById = function(e) {
return this._nodesMap[Yi(e)];
}, r.prototype.addEdge = function(e, t, n) {
var a = this._nodesMap, i = this._edgesMap;
if (wt(e) && (e = this.nodes[e]), wt(t) && (t = this.nodes[t]), e instanceof Ya || (e = a[Yi(e)]), t instanceof Ya || (t = a[Yi(t)]), !(!e || !t)) {
var o = e.id + "-" + t.id, s = new dL(e, t, n);
return s.hostGraph = this, this._directed && (e.outEdges.push(s), t.inEdges.push(s)), e.edges.push(s), e !== t && t.edges.push(s), this.edges.push(s), i[o] = s, s;
}
}, r.prototype.getEdgeByIndex = function(e) {
var t = this.edgeData.getRawIndex(e);
return this.edges[t];
}, r.prototype.getEdge = function(e, t) {
e instanceof Ya && (e = e.id), t instanceof Ya && (t = t.id);
var n = this._edgesMap;
return this._directed ? n[e + "-" + t] : n[e + "-" + t] || n[t + "-" + e];
}, r.prototype.eachNode = function(e, t) {
for (var n = this.nodes, a = n.length, i = 0; i < a; i++)
n[i].dataIndex >= 0 && e.call(t, n[i], i);
}, r.prototype.eachEdge = function(e, t) {
for (var n = this.edges, a = n.length, i = 0; i < a; i++)
n[i].dataIndex >= 0 && n[i].node1.dataIndex >= 0 && n[i].node2.dataIndex >= 0 && e.call(t, n[i], i);
}, r.prototype.breadthFirstTraverse = function(e, t, n, a) {
if (t instanceof Ya || (t = this._nodesMap[Yi(t)]), !!t) {
for (var i = n === "out" ? "outEdges" : n === "in" ? "inEdges" : "edges", o = 0; o < this.nodes.length; o++)
this.nodes[o].__visited = !1;
if (!e.call(a, t, null))
for (var s = [t]; s.length; )
for (var l = s.shift(), u = l[i], o = 0; o < u.length; o++) {
var f = u[o], h = f.node1 === l ? f.node2 : f.node1;
if (!h.__visited) {
if (e.call(a, h, l))
return;
s.push(h), h.__visited = !0;
}
}
}
}, r.prototype.update = function() {
for (var e = this.data, t = this.edgeData, n = this.nodes, a = this.edges, i = 0, o = n.length; i < o; i++)
n[i].dataIndex = -1;
for (var i = 0, o = e.count(); i < o; i++)
n[e.getRawIndex(i)].dataIndex = i;
t.filterSelf(function(s) {
var l = a[t.getRawIndex(s)];
return l.node1.dataIndex >= 0 && l.node2.dataIndex >= 0;
});
for (var i = 0, o = a.length; i < o; i++)
a[i].dataIndex = -1;
for (var i = 0, o = t.count(); i < o; i++)
a[t.getRawIndex(i)].dataIndex = i;
}, r.prototype.clone = function() {
for (var e = new r(this._directed), t = this.nodes, n = this.edges, a = 0; a < t.length; a++)
e.addNode(t[a].id, t[a].dataIndex);
for (var a = 0; a < n.length; a++) {
var i = n[a];
e.addEdge(i.node1.id, i.node2.id, i.dataIndex);
}
return e;
}, r;
}(), Ya = function() {
function r(e, t) {
this.inEdges = [], this.outEdges = [], this.edges = [], this.dataIndex = -1, this.id = e == null ? "" : e, this.dataIndex = t == null ? -1 : t;
}
return r.prototype.degree = function() {
return this.edges.length;
}, r.prototype.inDegree = function() {
return this.inEdges.length;
}, r.prototype.outDegree = function() {
return this.outEdges.length;
}, r.prototype.getModel = function(e) {
if (!(this.dataIndex < 0)) {
var t = this.hostGraph, n = t.data.getItemModel(this.dataIndex);
return n.getModel(e);
}
}, r.prototype.getAdjacentDataIndices = function() {
for (var e = {
edge: [],
node: []
}, t = 0; t < this.edges.length; t++) {
var n = this.edges[t];
n.dataIndex < 0 || (e.edge.push(n.dataIndex), e.node.push(n.node1.dataIndex, n.node2.dataIndex));
}
return e;
}, r;
}(), dL = function() {
function r(e, t, n) {
this.dataIndex = -1, this.node1 = e, this.node2 = t, this.dataIndex = n == null ? -1 : n;
}
return r.prototype.getModel = function(e) {
if (!(this.dataIndex < 0)) {
var t = this.hostGraph, n = t.edgeData.getItemModel(this.dataIndex);
return n.getModel(e);
}
}, r.prototype.getAdjacentDataIndices = function() {
return {
edge: [this.dataIndex],
node: [this.node1.dataIndex, this.node2.dataIndex]
};
}, r;
}();
function gL(r, e) {
return {
getValue: function(t) {
var n = this[r][e];
return n.getStore().get(n.getDimensionIndex(t || "value"), this.dataIndex);
},
setVisual: function(t, n) {
this.dataIndex >= 0 && this[r][e].setItemVisual(this.dataIndex, t, n);
},
getVisual: function(t) {
return this[r][e].getItemVisual(this.dataIndex, t);
},
setLayout: function(t, n) {
this.dataIndex >= 0 && this[r][e].setItemLayout(this.dataIndex, t, n);
},
getLayout: function() {
return this[r][e].getItemLayout(this.dataIndex);
},
getGraphicEl: function() {
return this[r][e].getItemGraphicEl(this.dataIndex);
},
getRawIndex: function() {
return this[r][e].getRawIndex(this.dataIndex);
}
};
}
Qt(Ya, gL("hostGraph", "data"));
Qt(dL, gL("hostGraph", "edgeData"));
const $4 = H4;
function yL(r, e, t, n, a) {
for (var i = new $4(n), o = 0; o < r.length; o++)
i.addNode(qt(
r[o].id,
r[o].name,
o
), o);
for (var s = [], l = [], u = 0, o = 0; o < e.length; o++) {
var f = e[o], h = f.source, c = f.target;
i.addEdge(h, c, u) && (l.push(f), s.push(qt(te(f.id, null), h + " > " + c)), u++);
}
var v = t.get("coordinateSystem"), p;
if (v === "cartesian2d" || v === "polar")
p = An(r, t);
else {
var d = $o.get(v), g = d ? d.dimensions || [] : [];
ct(g, "value") < 0 && g.concat(["value"]);
var y = Ol(r, {
coordDimensions: g,
encodeDefine: t.getEncode()
}).dimensions;
p = new Ae(y, t), p.initData(r);
}
var m = new Ae(["value"], t);
return m.initData(l, s), a && a(p, m), jM({
mainData: p,
struct: i,
structAttr: "graph",
datas: {
node: p,
edge: m
},
datasAttr: {
node: "data",
edge: "edgeData"
}
}), i.update(), i;
}
var W4 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.hasSymbolVisual = !0, t;
}
return e.prototype.init = function(t) {
r.prototype.init.apply(this, arguments);
var n = this;
function a() {
return n._categoriesData;
}
this.legendVisualProvider = new $l(a, a), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData();
}, e.prototype.mergeOption = function(t) {
r.prototype.mergeOption.apply(this, arguments), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData();
}, e.prototype.mergeDefaultAndTheme = function(t) {
r.prototype.mergeDefaultAndTheme.apply(this, arguments), pi(t, "edgeLabel", ["show"]);
}, e.prototype.getInitialData = function(t, n) {
var a = t.edges || t.links || [], i = t.data || t.nodes || [], o = this;
if (i && a) {
C4(this);
var s = yL(i, a, this, !0, l);
return C(s.edges, function(u) {
D4(u.node1, u.node2, this, u.dataIndex);
}, this), s.data;
}
function l(u, f) {
u.wrapMethod("getItemModel", function(p) {
var d = o._categoriesModels, g = p.getShallow("category"), y = d[g];
return y && (y.parentModel = p.parentModel, p.parentModel = y), p;
});
var h = kt.prototype.getModel;
function c(p, d) {
var g = h.call(this, p, d);
return g.resolveParentPath = v, g;
}
f.wrapMethod("getItemModel", function(p) {
return p.resolveParentPath = v, p.getModel = c, p;
});
function v(p) {
if (p && (p[0] === "label" || p[1] === "label")) {
var d = p.slice();
return p[0] === "label" ? d[0] = "edgeLabel" : p[1] === "label" && (d[1] = "edgeLabel"), d;
}
return p;
}
}
}, e.prototype.getGraph = function() {
return this.getData().graph;
}, e.prototype.getEdgeData = function() {
return this.getGraph().edgeData;
}, e.prototype.getCategoriesData = function() {
return this._categoriesData;
}, e.prototype.formatTooltip = function(t, n, a) {
if (a === "edge") {
var i = this.getData(), o = this.getDataParams(t, a), s = i.graph.getEdgeByIndex(t), l = i.getName(s.node1.dataIndex), u = i.getName(s.node2.dataIndex), f = [];
return l != null && f.push(l), u != null && f.push(u), ae("nameValue", {
name: f.join(" > "),
value: o.value,
noValue: o.value == null
});
}
var h = BD({
series: this,
dataIndex: t,
multipleSeries: n
});
return h;
}, e.prototype._updateCategoriesData = function() {
var t = G(this.option.categories || [], function(a) {
return a.value != null ? a : B({
value: 0
}, a);
}), n = new Ae(["value"], this);
n.initData(t), this._categoriesData = n, this._categoriesModels = n.mapArray(function(a) {
return n.getItemModel(a);
});
}, e.prototype.setZoom = function(t) {
this.option.zoom = t;
}, e.prototype.setCenter = function(t) {
this.option.center = t;
}, e.prototype.isAnimationEnabled = function() {
return r.prototype.isAnimationEnabled.call(this) && !(this.get("layout") === "force" && this.get(["force", "layoutAnimation"]));
}, e.type = "series.graph", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
z: 2,
coordinateSystem: "view",
legendHoverLink: !0,
layout: null,
circular: {
rotateLabel: !1
},
force: {
initLayout: null,
repulsion: [0, 50],
gravity: 0.1,
friction: 0.6,
edgeLength: 30,
layoutAnimation: !0
},
left: "center",
top: "center",
symbol: "circle",
symbolSize: 10,
edgeSymbol: ["none", "none"],
edgeSymbolSize: 10,
edgeLabel: {
position: "middle",
distance: 5
},
draggable: !1,
roam: !1,
center: null,
zoom: 1,
nodeScaleRatio: 0.6,
label: {
show: !1,
formatter: "{b}"
},
itemStyle: {},
lineStyle: {
color: "#aaa",
width: 1,
opacity: 0.5
},
emphasis: {
scale: !0,
label: {
show: !0
}
},
select: {
itemStyle: {
borderColor: "#212121"
}
}
}, e;
}(Gt);
const U4 = W4;
var Y4 = {
type: "graphRoam",
event: "graphRoam",
update: "none"
};
function Z4(r) {
r.registerChartView(F4), r.registerSeriesModel(U4), r.registerProcessor(S4), r.registerVisual(x4), r.registerVisual(w4), r.registerLayout(A4), r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT, L4), r.registerLayout(E4), r.registerCoordinateSystem("graphView", {
dimensions: Ul.dimensions,
create: N4
}), r.registerAction({
type: "focusNodeAdjacency",
event: "focusNodeAdjacency",
update: "series:focusNodeAdjacency"
}, jt), r.registerAction({
type: "unfocusNodeAdjacency",
event: "unfocusNodeAdjacency",
update: "series:unfocusNodeAdjacency"
}, jt), r.registerAction(Y4, function(e, t, n) {
t.eachComponent({
mainType: "series",
query: e
}, function(a) {
var i = a.coordinateSystem, o = $y(i, e, void 0, n);
a.setCenter && a.setCenter(o.center), a.setZoom && a.setZoom(o.zoom);
});
});
}
var X4 = function() {
function r() {
this.angle = 0, this.width = 10, this.r = 10, this.x = 0, this.y = 0;
}
return r;
}(), q4 = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "pointer", n;
}
return e.prototype.getDefaultShape = function() {
return new X4();
}, e.prototype.buildPath = function(t, n) {
var a = Math.cos, i = Math.sin, o = n.r, s = n.width, l = n.angle, u = n.x - a(l) * s * (s >= o / 3 ? 1 : 2), f = n.y - i(l) * s * (s >= o / 3 ? 1 : 2);
l = n.angle - Math.PI / 2, t.moveTo(u, f), t.lineTo(n.x + a(l) * s, n.y + i(l) * s), t.lineTo(n.x + a(n.angle) * o, n.y + i(n.angle) * o), t.lineTo(n.x - a(l) * s, n.y - i(l) * s), t.lineTo(u, f);
}, e;
}(gt);
const K4 = q4;
function j4(r, e) {
var t = r.get("center"), n = e.getWidth(), a = e.getHeight(), i = Math.min(n, a), o = H(t[0], e.getWidth()), s = H(t[1], e.getHeight()), l = H(r.get("radius"), i / 2);
return {
cx: o,
cy: s,
r: l
};
}
function Bu(r, e) {
var t = r == null ? "" : r + "";
return e && (W(e) ? t = e.replace("{value}", t) : q(e) && (t = e(r))), t;
}
var J4 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
this.group.removeAll();
var i = t.get(["axisLine", "lineStyle", "color"]), o = j4(t, a);
this._renderMain(t, n, a, i, o), this._data = t.getData();
}, e.prototype.dispose = function() {
}, e.prototype._renderMain = function(t, n, a, i, o) {
var s = this.group, l = t.get("clockwise"), u = -t.get("startAngle") / 180 * Math.PI, f = -t.get("endAngle") / 180 * Math.PI, h = t.getModel("axisLine"), c = h.get("roundCap"), v = c ? jf : Ve, p = h.get("show"), d = h.getModel("lineStyle"), g = d.get("width"), y = [u, f];
qT(y, !l), u = y[0], f = y[1];
for (var m = f - u, _ = u, S = 0; p && S < i.length; S++) {
var w = Math.min(Math.max(i[S][0], 0), 1);
f = u + m * w;
var x = new v({
shape: {
startAngle: _,
endAngle: f,
cx: o.cx,
cy: o.cy,
clockwise: l,
r0: o.r - g,
r: o.r
},
silent: !0
});
x.setStyle({
fill: i[S][1]
}), x.setStyle(d.getLineStyle(
["color", "width"]
)), s.add(x), _ = f;
}
var b = function(T) {
if (T <= 0)
return i[0][1];
var D;
for (D = 0; D < i.length; D++)
if (i[D][0] >= T && (D === 0 ? 0 : i[D - 1][0]) < T)
return i[D][1];
return i[D - 1][1];
};
this._renderTicks(t, n, a, b, o, u, f, l, g), this._renderTitleAndDetail(t, n, a, b, o), this._renderAnchor(t, o), this._renderPointer(t, n, a, b, o, u, f, l, g);
}, e.prototype._renderTicks = function(t, n, a, i, o, s, l, u, f) {
for (var h = this.group, c = o.cx, v = o.cy, p = o.r, d = +t.get("min"), g = +t.get("max"), y = t.getModel("splitLine"), m = t.getModel("axisTick"), _ = t.getModel("axisLabel"), S = t.get("splitNumber"), w = m.get("splitNumber"), x = H(y.get("length"), p), b = H(m.get("length"), p), T = s, D = (l - s) / S, A = D / w, M = y.getModel("lineStyle").getLineStyle(), L = m.getModel("lineStyle").getLineStyle(), I = y.get("distance"), E, P, N = 0; N <= S; N++) {
if (E = Math.cos(T), P = Math.sin(T), y.get("show")) {
var O = I ? I + f : f, k = new oe({
shape: {
x1: E * (p - O) + c,
y1: P * (p - O) + v,
x2: E * (p - x - O) + c,
y2: P * (p - x - O) + v
},
style: M,
silent: !0
});
M.stroke === "auto" && k.setStyle({
stroke: i(N / S)
}), h.add(k);
}
if (_.get("show")) {
var O = _.get("distance") + I, V = Bu(Wt(N / S * (g - d) + d), _.get("formatter")), F = i(N / S);
h.add(new Ct({
style: zt(_, {
text: V,
x: E * (p - x - O) + c,
y: P * (p - x - O) + v,
verticalAlign: P < -0.8 ? "top" : P > 0.8 ? "bottom" : "middle",
align: E < -0.4 ? "left" : E > 0.4 ? "right" : "center"
}, {
inheritColor: F
}),
silent: !0
}));
}
if (m.get("show") && N !== S) {
var O = m.get("distance");
O = O ? O + f : f;
for (var $ = 0; $ <= w; $++) {
E = Math.cos(T), P = Math.sin(T);
var Z = new oe({
shape: {
x1: E * (p - O) + c,
y1: P * (p - O) + v,
x2: E * (p - b - O) + c,
y2: P * (p - b - O) + v
},
silent: !0,
style: L
});
L.stroke === "auto" && Z.setStyle({
stroke: i((N + $ / w) / S)
}), h.add(Z), T += A;
}
T -= A;
} else
T += D;
}
}, e.prototype._renderPointer = function(t, n, a, i, o, s, l, u, f) {
var h = this.group, c = this._data, v = this._progressEls, p = [], d = t.get(["pointer", "show"]), g = t.getModel("progress"), y = g.get("show"), m = t.getData(), _ = m.mapDimension("value"), S = +t.get("min"), w = +t.get("max"), x = [S, w], b = [s, l];
function T(A, M) {
var L = m.getItemModel(A), I = L.getModel("pointer"), E = H(I.get("width"), o.r), P = H(I.get("length"), o.r), N = t.get(["pointer", "icon"]), O = I.get("offsetCenter"), k = H(O[0], o.r), V = H(O[1], o.r), F = I.get("keepAspect"), $;
return N ? $ = Jt(N, k - E / 2, V - P, E, P, null, F) : $ = new K4({
shape: {
angle: -Math.PI / 2,
width: E,
r: P,
x: k,
y: V
}
}), $.rotation = -(M + Math.PI / 2), $.x = o.cx, $.y = o.cy, $;
}
function D(A, M) {
var L = g.get("roundCap"), I = L ? jf : Ve, E = g.get("overlap"), P = E ? g.get("width") : f / m.count(), N = E ? o.r - P : o.r - (A + 1) * P, O = E ? o.r : o.r - A * P, k = new I({
shape: {
startAngle: s,
endAngle: M,
cx: o.cx,
cy: o.cy,
clockwise: u,
r0: N,
r: O
}
});
return E && (k.z2 = w - m.get(_, A) % w), k;
}
(y || d) && (m.diff(c).add(function(A) {
var M = m.get(_, A);
if (d) {
var L = T(A, s);
Bt(L, {
rotation: -((isNaN(+M) ? b[0] : It(M, x, b, !0)) + Math.PI / 2)
}, t), h.add(L), m.setItemGraphicEl(A, L);
}
if (y) {
var I = D(A, s), E = g.get("clip");
Bt(I, {
shape: {
endAngle: It(M, x, b, E)
}
}, t), h.add(I), vd(t.seriesIndex, m.dataType, A, I), p[A] = I;
}
}).update(function(A, M) {
var L = m.get(_, A);
if (d) {
var I = c.getItemGraphicEl(M), E = I ? I.rotation : s, P = T(A, E);
P.rotation = E, bt(P, {
rotation: -((isNaN(+L) ? b[0] : It(L, x, b, !0)) + Math.PI / 2)
}, t), h.add(P), m.setItemGraphicEl(A, P);
}
if (y) {
var N = v[M], O = N ? N.shape.endAngle : s, k = D(A, O), V = g.get("clip");
bt(k, {
shape: {
endAngle: It(L, x, b, V)
}
}, t), h.add(k), vd(t.seriesIndex, m.dataType, A, k), p[A] = k;
}
}).execute(), m.each(function(A) {
var M = m.getItemModel(A), L = M.getModel("emphasis"), I = L.get("focus"), E = L.get("blurScope"), P = L.get("disabled");
if (d) {
var N = m.getItemGraphicEl(A), O = m.getItemVisual(A, "style"), k = O.fill;
if (N instanceof ve) {
var V = N.style;
N.useStyle(B({
image: V.image,
x: V.x,
y: V.y,
width: V.width,
height: V.height
}, O));
} else
N.useStyle(O), N.type !== "pointer" && N.setColor(k);
N.setStyle(M.getModel(["pointer", "itemStyle"]).getItemStyle()), N.style.fill === "auto" && N.setStyle("fill", i(It(m.get(_, A), x, [0, 1], !0))), N.z2EmphasisLift = 0, ce(N, M), Ut(N, I, E, P);
}
if (y) {
var F = p[A];
F.useStyle(m.getItemVisual(A, "style")), F.setStyle(M.getModel(["progress", "itemStyle"]).getItemStyle()), F.z2EmphasisLift = 0, ce(F, M), Ut(F, I, E, P);
}
}), this._progressEls = p);
}, e.prototype._renderAnchor = function(t, n) {
var a = t.getModel("anchor"), i = a.get("show");
if (i) {
var o = a.get("size"), s = a.get("icon"), l = a.get("offsetCenter"), u = a.get("keepAspect"), f = Jt(s, n.cx - o / 2 + H(l[0], n.r), n.cy - o / 2 + H(l[1], n.r), o, o, null, u);
f.z2 = a.get("showAbove") ? 1 : 0, f.setStyle(a.getModel("itemStyle").getItemStyle()), this.group.add(f);
}
}, e.prototype._renderTitleAndDetail = function(t, n, a, i, o) {
var s = this, l = t.getData(), u = l.mapDimension("value"), f = +t.get("min"), h = +t.get("max"), c = new nt(), v = [], p = [], d = t.isAnimationEnabled(), g = t.get(["pointer", "showAbove"]);
l.diff(this._data).add(function(y) {
v[y] = new Ct({
silent: !0
}), p[y] = new Ct({
silent: !0
});
}).update(function(y, m) {
v[y] = s._titleEls[m], p[y] = s._detailEls[m];
}).execute(), l.each(function(y) {
var m = l.getItemModel(y), _ = l.get(u, y), S = new nt(), w = i(It(_, [f, h], [0, 1], !0)), x = m.getModel("title");
if (x.get("show")) {
var b = x.get("offsetCenter"), T = o.cx + H(b[0], o.r), D = o.cy + H(b[1], o.r), A = v[y];
A.attr({
z2: g ? 0 : 2,
style: zt(x, {
x: T,
y: D,
text: l.getName(y),
align: "center",
verticalAlign: "middle"
}, {
inheritColor: w
})
}), S.add(A);
}
var M = m.getModel("detail");
if (M.get("show")) {
var L = M.get("offsetCenter"), I = o.cx + H(L[0], o.r), E = o.cy + H(L[1], o.r), P = H(M.get("width"), o.r), N = H(M.get("height"), o.r), O = t.get(["progress", "show"]) ? l.getItemVisual(y, "style").fill : w, A = p[y], k = M.get("formatter");
A.attr({
z2: g ? 0 : 2,
style: zt(M, {
x: I,
y: E,
text: Bu(_, k),
width: isNaN(P) ? null : P,
height: isNaN(N) ? null : N,
align: "center",
verticalAlign: "middle"
}, {
inheritColor: O
})
}), FC(A, {
normal: M
}, _, function(F) {
return Bu(F, k);
}), d && HC(A, y, l, t, {
getFormattedLabel: function(F, $, Z, et, ht, Lt) {
return Bu(Lt ? Lt.interpolatedValue : _, k);
}
}), S.add(A);
}
c.add(S);
}), this.group.add(c), this._titleEls = v, this._detailEls = p;
}, e.type = "gauge", e;
}(Ot);
const Q4 = J4;
var tH = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.visualStyleAccessPath = "itemStyle", t;
}
return e.prototype.getInitialData = function(t, n) {
return Zo(this, ["value"]);
}, e.type = "series.gauge", e.defaultOption = {
z: 2,
colorBy: "data",
center: ["50%", "50%"],
legendHoverLink: !0,
radius: "75%",
startAngle: 225,
endAngle: -45,
clockwise: !0,
min: 0,
max: 100,
splitNumber: 10,
axisLine: {
show: !0,
roundCap: !1,
lineStyle: {
color: [[1, "#E6EBF8"]],
width: 10
}
},
progress: {
show: !1,
overlap: !0,
width: 10,
roundCap: !1,
clip: !0
},
splitLine: {
show: !0,
length: 10,
distance: 10,
lineStyle: {
color: "#63677A",
width: 3,
type: "solid"
}
},
axisTick: {
show: !0,
splitNumber: 5,
length: 6,
distance: 10,
lineStyle: {
color: "#63677A",
width: 1,
type: "solid"
}
},
axisLabel: {
show: !0,
distance: 15,
color: "#464646",
fontSize: 12
},
pointer: {
icon: null,
offsetCenter: [0, 0],
show: !0,
showAbove: !0,
length: "60%",
width: 6,
keepAspect: !1
},
anchor: {
show: !1,
showAbove: !1,
size: 6,
icon: "circle",
offsetCenter: [0, 0],
keepAspect: !1,
itemStyle: {
color: "#fff",
borderWidth: 0,
borderColor: "#5470c6"
}
},
title: {
show: !0,
offsetCenter: [0, "20%"],
color: "#464646",
fontSize: 16,
valueAnimation: !1
},
detail: {
show: !0,
backgroundColor: "rgba(0,0,0,0)",
borderWidth: 0,
borderColor: "#ccc",
width: 100,
height: null,
padding: [5, 10],
offsetCenter: [0, "40%"],
color: "#464646",
fontSize: 30,
fontWeight: "bold",
lineHeight: 30,
valueAnimation: !1
}
}, e;
}(Gt);
const eH = tH;
function rH(r) {
r.registerChartView(Q4), r.registerSeriesModel(eH);
}
var nH = ["itemStyle", "opacity"], aH = function(r) {
R(e, r);
function e(t, n) {
var a = r.call(this) || this, i = a, o = new ze(), s = new Ct();
return i.setTextContent(s), a.setTextGuideLine(o), a.updateData(t, n, !0), a;
}
return e.prototype.updateData = function(t, n, a) {
var i = this, o = t.hostModel, s = t.getItemModel(n), l = t.getItemLayout(n), u = s.getModel("emphasis"), f = s.get(nH);
f = f == null ? 1 : f, a || Lr(i), i.useStyle(t.getItemVisual(n, "style")), i.style.lineJoin = "round", a ? (i.setShape({
points: l.points
}), i.style.opacity = 0, Bt(i, {
style: {
opacity: f
}
}, o, n)) : bt(i, {
style: {
opacity: f
},
shape: {
points: l.points
}
}, o, n), ce(i, s), this._updateLabel(t, n), Ut(this, u.get("focus"), u.get("blurScope"), u.get("disabled"));
}, e.prototype._updateLabel = function(t, n) {
var a = this, i = this.getTextGuideLine(), o = a.getTextContent(), s = t.hostModel, l = t.getItemModel(n), u = t.getItemLayout(n), f = u.label, h = t.getItemVisual(n, "style"), c = h.fill;
xe(
o,
se(l),
{
labelFetcher: t.hostModel,
labelDataIndex: n,
defaultOpacity: h.opacity,
defaultText: t.getName(n)
},
{
normal: {
align: f.textAlign,
verticalAlign: f.verticalAlign
}
}
), a.setTextConfig({
local: !0,
inside: !!f.inside,
insideStroke: c,
outsideFill: c
});
var v = f.linePoints;
i.setShape({
points: v
}), a.textGuideLineConfig = {
anchor: v ? new st(v[0][0], v[0][1]) : null
}, bt(o, {
style: {
x: f.x,
y: f.y
}
}, s, n), o.attr({
rotation: f.rotation,
originX: f.x,
originY: f.y,
z2: 10
}), Ey(a, Py(l), {
stroke: c
});
}, e;
}(Be), iH = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.ignoreLabelLineUpdate = !0, t;
}
return e.prototype.render = function(t, n, a) {
var i = t.getData(), o = this._data, s = this.group;
i.diff(o).add(function(l) {
var u = new aH(i, l);
i.setItemGraphicEl(l, u), s.add(u);
}).update(function(l, u) {
var f = o.getItemGraphicEl(u);
f.updateData(i, l), s.add(f), i.setItemGraphicEl(l, f);
}).remove(function(l) {
var u = o.getItemGraphicEl(l);
il(u, t, l);
}).execute(), this._data = i;
}, e.prototype.remove = function() {
this.group.removeAll(), this._data = null;
}, e.prototype.dispose = function() {
}, e.type = "funnel", e;
}(Ot);
const oH = iH;
var sH = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t) {
r.prototype.init.apply(this, arguments), this.legendVisualProvider = new $l(Y(this.getData, this), Y(this.getRawData, this)), this._defaultLabelLine(t);
}, e.prototype.getInitialData = function(t, n) {
return Zo(this, {
coordDimensions: ["value"],
encodeDefaulter: it(sy, this)
});
}, e.prototype._defaultLabelLine = function(t) {
pi(t, "labelLine", ["show"]);
var n = t.labelLine, a = t.emphasis.labelLine;
n.show = n.show && t.label.show, a.show = a.show && t.emphasis.label.show;
}, e.prototype.getDataParams = function(t) {
var n = this.getData(), a = r.prototype.getDataParams.call(this, t), i = n.mapDimension("value"), o = n.getSum(i);
return a.percent = o ? +(n.get(i, t) / o * 100).toFixed(2) : 0, a.$vars.push("percent"), a;
}, e.type = "series.funnel", e.defaultOption = {
z: 2,
legendHoverLink: !0,
colorBy: "data",
left: 80,
top: 60,
right: 80,
bottom: 60,
minSize: "0%",
maxSize: "100%",
sort: "descending",
orient: "vertical",
gap: 0,
funnelAlign: "center",
label: {
show: !0,
position: "outer"
},
labelLine: {
show: !0,
length: 20,
lineStyle: {
width: 1
}
},
itemStyle: {
borderColor: "#fff",
borderWidth: 1
},
emphasis: {
label: {
show: !0
}
},
select: {
itemStyle: {
borderColor: "#212121"
}
}
}, e;
}(Gt);
const lH = sH;
function uH(r, e) {
return ee(r.getBoxLayoutParams(), {
width: e.getWidth(),
height: e.getHeight()
});
}
function fH(r, e) {
for (var t = r.mapDimension("value"), n = r.mapArray(t, function(l) {
return l;
}), a = [], i = e === "ascending", o = 0, s = r.count(); o < s; o++)
a[o] = o;
return q(e) ? a.sort(e) : e !== "none" && a.sort(function(l, u) {
return i ? n[l] - n[u] : n[u] - n[l];
}), a;
}
function hH(r) {
var e = r.hostModel, t = e.get("orient");
r.each(function(n) {
var a = r.getItemModel(n), i = a.getModel("label"), o = i.get("position"), s = a.getModel("labelLine"), l = r.getItemLayout(n), u = l.points, f = o === "inner" || o === "inside" || o === "center" || o === "insideLeft" || o === "insideRight", h, c, v, p;
if (f)
o === "insideLeft" ? (c = (u[0][0] + u[3][0]) / 2 + 5, v = (u[0][1] + u[3][1]) / 2, h = "left") : o === "insideRight" ? (c = (u[1][0] + u[2][0]) / 2 - 5, v = (u[1][1] + u[2][1]) / 2, h = "right") : (c = (u[0][0] + u[1][0] + u[2][0] + u[3][0]) / 4, v = (u[0][1] + u[1][1] + u[2][1] + u[3][1]) / 4, h = "center"), p = [[c, v], [c, v]];
else {
var d = void 0, g = void 0, y = void 0, m = void 0, _ = s.get("length");
process.env.NODE_ENV !== "production" && (t === "vertical" && ["top", "bottom"].indexOf(o) > -1 && (o = "left", console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")), t === "horizontal" && ["left", "right"].indexOf(o) > -1 && (o = "bottom", console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))), o === "left" ? (d = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, y = d - _, c = y - 5, h = "right") : o === "right" ? (d = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, y = d + _, c = y + 5, h = "left") : o === "top" ? (d = (u[3][0] + u[0][0]) / 2, g = (u[3][1] + u[0][1]) / 2, m = g - _, v = m - 5, h = "center") : o === "bottom" ? (d = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, m = g + _, v = m + 5, h = "center") : o === "rightTop" ? (d = t === "horizontal" ? u[3][0] : u[1][0], g = t === "horizontal" ? u[3][1] : u[1][1], t === "horizontal" ? (m = g - _, v = m - 5, h = "center") : (y = d + _, c = y + 5, h = "top")) : o === "rightBottom" ? (d = u[2][0], g = u[2][1], t === "horizontal" ? (m = g + _, v = m + 5, h = "center") : (y = d + _, c = y + 5, h = "bottom")) : o === "leftTop" ? (d = u[0][0], g = t === "horizontal" ? u[0][1] : u[1][1], t === "horizontal" ? (m = g - _, v = m - 5, h = "center") : (y = d - _, c = y - 5, h = "right")) : o === "leftBottom" ? (d = t === "horizontal" ? u[1][0] : u[3][0], g = t === "horizontal" ? u[1][1] : u[2][1], t === "horizontal" ? (m = g + _, v = m + 5, h = "center") : (y = d - _, c = y - 5, h = "right")) : (d = (u[1][0] + u[2][0]) / 2, g = (u[1][1] + u[2][1]) / 2, t === "horizontal" ? (m = g + _, v = m + 5, h = "center") : (y = d + _, c = y + 5, h = "left")), t === "horizontal" ? (y = d, c = y) : (m = g, v = m), p = [[d, g], [y, m]];
}
l.label = {
linePoints: p,
x: c,
y: v,
verticalAlign: "middle",
textAlign: h,
inside: f
};
});
}
function cH(r, e) {
r.eachSeriesByType("funnel", function(t) {
var n = t.getData(), a = n.mapDimension("value"), i = t.get("sort"), o = uH(t, e), s = t.get("orient"), l = o.width, u = o.height, f = fH(n, i), h = o.x, c = o.y, v = s === "horizontal" ? [H(t.get("minSize"), u), H(t.get("maxSize"), u)] : [H(t.get("minSize"), l), H(t.get("maxSize"), l)], p = n.getDataExtent(a), d = t.get("min"), g = t.get("max");
d == null && (d = Math.min(p[0], 0)), g == null && (g = p[1]);
var y = t.get("funnelAlign"), m = t.get("gap"), _ = s === "horizontal" ? l : u, S = (_ - m * (n.count() - 1)) / n.count(), w = function(E, P) {
if (s === "horizontal") {
var N = n.get(a, E) || 0, O = It(N, [d, g], v, !0), k = void 0;
switch (y) {
case "top":
k = c;
break;
case "center":
k = c + (u - O) / 2;
break;
case "bottom":
k = c + (u - O);
break;
}
return [[P, k], [P, k + O]];
}
var V = n.get(a, E) || 0, F = It(V, [d, g], v, !0), $;
switch (y) {
case "left":
$ = h;
break;
case "center":
$ = h + (l - F) / 2;
break;
case "right":
$ = h + l - F;
break;
}
return [[$, P], [$ + F, P]];
};
i === "ascending" && (S = -S, m = -m, s === "horizontal" ? h += l : c += u, f = f.reverse());
for (var x = 0; x < f.length; x++) {
var b = f[x], T = f[x + 1], D = n.getItemModel(b);
if (s === "horizontal") {
var A = D.get(["itemStyle", "width"]);
A == null ? A = S : (A = H(A, l), i === "ascending" && (A = -A));
var M = w(b, h), L = w(T, h + A);
h += A + m, n.setItemLayout(b, {
points: M.concat(L.slice().reverse())
});
} else {
var I = D.get(["itemStyle", "height"]);
I == null ? I = S : (I = H(I, u), i === "ascending" && (I = -I));
var M = w(b, c), L = w(T, c + I);
c += I + m, n.setItemLayout(b, {
points: M.concat(L.slice().reverse())
});
}
}
hH(n);
});
}
function vH(r) {
r.registerChartView(oH), r.registerSeriesModel(lH), r.registerLayout(cH), r.registerProcessor(Hl("funnel"));
}
var pH = 0.3, dH = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._dataGroup = new nt(), t._initialized = !1, t;
}
return e.prototype.init = function() {
this.group.add(this._dataGroup);
}, e.prototype.render = function(t, n, a, i) {
this._progressiveEls = null;
var o = this._dataGroup, s = t.getData(), l = this._data, u = t.coordinateSystem, f = u.dimensions, h = hx(t);
s.diff(l).add(c).update(v).remove(p).execute();
function c(g) {
var y = fx(s, o, g, f, u);
Jv(y, s, g, h);
}
function v(g, y) {
var m = l.getItemGraphicEl(y), _ = mL(s, g, f, u);
s.setItemGraphicEl(g, m), bt(m, {
shape: {
points: _
}
}, t, g), Lr(m), Jv(m, s, g, h);
}
function p(g) {
var y = l.getItemGraphicEl(g);
o.remove(y);
}
if (!this._initialized) {
this._initialized = !0;
var d = gH(u, t, function() {
setTimeout(function() {
o.removeClipPath();
});
});
o.setClipPath(d);
}
this._data = s;
}, e.prototype.incrementalPrepareRender = function(t, n, a) {
this._initialized = !0, this._data = null, this._dataGroup.removeAll();
}, e.prototype.incrementalRender = function(t, n, a) {
for (var i = n.getData(), o = n.coordinateSystem, s = o.dimensions, l = hx(n), u = this._progressiveEls = [], f = t.start; f < t.end; f++) {
var h = fx(i, this._dataGroup, f, s, o);
h.incremental = !0, Jv(h, i, f, l), u.push(h);
}
}, e.prototype.remove = function() {
this._dataGroup && this._dataGroup.removeAll(), this._data = null;
}, e.type = "parallel", e;
}(Ot);
function gH(r, e, t) {
var n = r.model, a = r.getRect(), i = new xt({
shape: {
x: a.x,
y: a.y,
width: a.width,
height: a.height
}
}), o = n.get("layout") === "horizontal" ? "width" : "height";
return i.setShape(o, 0), Bt(i, {
shape: {
width: a.width,
height: a.height
}
}, e, t), i;
}
function mL(r, e, t, n) {
for (var a = [], i = 0; i < t.length; i++) {
var o = t[i], s = r.get(r.mapDimension(o), e);
yH(s, n.getAxis(o).type) || a.push(n.dataToPoint(s, o));
}
return a;
}
function fx(r, e, t, n, a) {
var i = mL(r, t, n, a), o = new ze({
shape: {
points: i
},
z2: 10
});
return e.add(o), r.setItemGraphicEl(t, o), o;
}
function hx(r) {
var e = r.get("smooth", !0);
return e === !0 && (e = pH), e = _n(e), vi(e) && (e = 0), {
smooth: e
};
}
function Jv(r, e, t, n) {
r.useStyle(e.getItemVisual(t, "style")), r.style.fill = null, r.setShape("smooth", n.smooth);
var a = e.getItemModel(t), i = a.getModel("emphasis");
ce(r, a, "lineStyle"), Ut(r, i.get("focus"), i.get("blurScope"), i.get("disabled"));
}
function yH(r, e) {
return e === "category" ? r == null : r == null || isNaN(r);
}
const mH = dH;
var _H = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.visualStyleAccessPath = "lineStyle", t.visualDrawType = "stroke", t;
}
return e.prototype.getInitialData = function(t, n) {
return An(null, this, {
useEncodeDefaulter: Y(SH, null, this)
});
}, e.prototype.getRawIndicesByActiveState = function(t) {
var n = this.coordinateSystem, a = this.getData(), i = [];
return n.eachActiveState(a, function(o, s) {
t === o && i.push(a.getRawIndex(s));
}), i;
}, e.type = "series.parallel", e.dependencies = ["parallel"], e.defaultOption = {
z: 2,
coordinateSystem: "parallel",
parallelIndex: 0,
label: {
show: !1
},
inactiveOpacity: 0.05,
activeOpacity: 1,
lineStyle: {
width: 1,
opacity: 0.45,
type: "solid"
},
emphasis: {
label: {
show: !1
}
},
progressive: 500,
smooth: !1,
animationEasing: "linear"
}, e;
}(Gt);
function SH(r) {
var e = r.ecModel.getComponent("parallel", r.get("parallelIndex"));
if (!!e) {
var t = {};
return C(e.dimensions, function(n) {
var a = xH(n);
t[n] = a;
}), t;
}
}
function xH(r) {
return +r.replace("dim", "");
}
const wH = _H;
var bH = ["lineStyle", "opacity"], TH = {
seriesType: "parallel",
reset: function(r, e) {
var t = r.coordinateSystem, n = {
normal: r.get(["lineStyle", "opacity"]),
active: r.get("activeOpacity"),
inactive: r.get("inactiveOpacity")
};
return {
progress: function(a, i) {
t.eachActiveState(i, function(o, s) {
var l = n[o];
if (o === "normal" && i.hasItemOption) {
var u = i.getItemModel(s).get(bH, !0);
u != null && (l = u);
}
var f = i.ensureUniqueItemVisual(s, "style");
f.opacity = l;
}, a.start, a.end);
}
};
}
};
const CH = TH;
function DH(r) {
AH(r), MH(r);
}
function AH(r) {
if (!r.parallel) {
var e = !1;
C(r.series, function(t) {
t && t.type === "parallel" && (e = !0);
}), e && (r.parallel = [{}]);
}
}
function MH(r) {
var e = Pt(r.parallelAxis);
C(e, function(t) {
if (!!j(t)) {
var n = t.parallelIndex || 0, a = Pt(r.parallel)[n];
a && a.parallelAxisDefault && lt(t, a.parallelAxisDefault, !1);
}
});
}
var LH = 5, IH = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
this._model = t, this._api = a, this._handlers || (this._handlers = {}, C(EH, function(i, o) {
a.getZr().on(o, this._handlers[o] = Y(i, this));
}, this)), Uo(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate");
}, e.prototype.dispose = function(t, n) {
fl(this, "_throttledDispatchExpand"), C(this._handlers, function(a, i) {
n.getZr().off(i, a);
}), this._handlers = null;
}, e.prototype._throttledDispatchExpand = function(t) {
this._dispatchExpand(t);
}, e.prototype._dispatchExpand = function(t) {
t && this._api.dispatchAction(B({
type: "parallelAxisExpand"
}, t));
}, e.type = "parallel", e;
}(Ht), EH = {
mousedown: function(r) {
Qv(this, "click") && (this._mouseDownPoint = [r.offsetX, r.offsetY]);
},
mouseup: function(r) {
var e = this._mouseDownPoint;
if (Qv(this, "click") && e) {
var t = [r.offsetX, r.offsetY], n = Math.pow(e[0] - t[0], 2) + Math.pow(e[1] - t[1], 2);
if (n > LH)
return;
var a = this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX, r.offsetY]);
a.behavior !== "none" && this._dispatchExpand({
axisExpandWindow: a.axisExpandWindow
});
}
this._mouseDownPoint = null;
},
mousemove: function(r) {
if (!(this._mouseDownPoint || !Qv(this, "mousemove"))) {
var e = this._model, t = e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX, r.offsetY]), n = t.behavior;
n === "jump" && this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")), this._throttledDispatchExpand(n === "none" ? null : {
axisExpandWindow: t.axisExpandWindow,
animation: n === "jump" ? null : {
duration: 0
}
});
}
}
};
function Qv(r, e) {
var t = r._model;
return t.get("axisExpandable") && t.get("axisExpandTriggerOn") === e;
}
const PH = IH;
var NH = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function() {
r.prototype.init.apply(this, arguments), this.mergeOption({});
}, e.prototype.mergeOption = function(t) {
var n = this.option;
t && lt(n, t, !0), this._initDimensions();
}, e.prototype.contains = function(t, n) {
var a = t.get("parallelIndex");
return a != null && n.getComponent("parallel", a) === this;
}, e.prototype.setAxisExpand = function(t) {
C(["axisExpandable", "axisExpandCenter", "axisExpandCount", "axisExpandWidth", "axisExpandWindow"], function(n) {
t.hasOwnProperty(n) && (this.option[n] = t[n]);
}, this);
}, e.prototype._initDimensions = function() {
var t = this.dimensions = [], n = this.parallelAxisIndex = [], a = Et(this.ecModel.queryComponents({
mainType: "parallelAxis"
}), function(i) {
return (i.get("parallelIndex") || 0) === this.componentIndex;
}, this);
C(a, function(i) {
t.push("dim" + i.get("dim")), n.push(i.componentIndex);
});
}, e.type = "parallel", e.dependencies = ["parallelAxis"], e.layoutMode = "box", e.defaultOption = {
z: 0,
left: 80,
top: 60,
right: 80,
bottom: 60,
layout: "horizontal",
axisExpandable: !1,
axisExpandCenter: null,
axisExpandCount: 0,
axisExpandWidth: 50,
axisExpandRate: 17,
axisExpandDebounce: 50,
axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],
axisExpandTriggerOn: "click",
parallelAxisDefault: null
}, e;
}(_t);
const RH = NH;
var kH = function(r) {
R(e, r);
function e(t, n, a, i, o) {
var s = r.call(this, t, n, a) || this;
return s.type = i || "value", s.axisIndex = o, s;
}
return e.prototype.isHorizontal = function() {
return this.coordinateSystem.getModel().get("layout") !== "horizontal";
}, e;
}(Er);
const OH = kH;
function Mi(r, e, t, n, a, i) {
r = r || 0;
var o = t[1] - t[0];
if (a != null && (a = Zi(a, [0, o])), i != null && (i = Math.max(i, a != null ? a : 0)), n === "all") {
var s = Math.abs(e[1] - e[0]);
s = Zi(s, [0, o]), a = i = Zi(s, [a, i]), n = 0;
}
e[0] = Zi(e[0], t), e[1] = Zi(e[1], t);
var l = tp(e, n);
e[n] += r;
var u = a || 0, f = t.slice();
l.sign < 0 ? f[0] += u : f[1] -= u, e[n] = Zi(e[n], f);
var h;
return h = tp(e, n), a != null && (h.sign !== l.sign || h.span < a) && (e[1 - n] = e[n] + l.sign * a), h = tp(e, n), i != null && h.span > i && (e[1 - n] = e[n] + h.sign * i), e;
}
function tp(r, e) {
var t = r[e] - r[1 - e];
return {
span: Math.abs(t),
sign: t > 0 ? -1 : t < 0 ? 1 : e ? -1 : 1
};
}
function Zi(r, e) {
return Math.min(e[1] != null ? e[1] : 1 / 0, Math.max(e[0] != null ? e[0] : -1 / 0, r));
}
var ep = C, _L = Math.min, SL = Math.max, cx = Math.floor, VH = Math.ceil, vx = Wt, BH = Math.PI, zH = function() {
function r(e, t, n) {
this.type = "parallel", this._axesMap = K(), this._axesLayout = {}, this.dimensions = e.dimensions, this._model = e, this._init(e, t, n);
}
return r.prototype._init = function(e, t, n) {
var a = e.dimensions, i = e.parallelAxisIndex;
ep(a, function(o, s) {
var l = i[s], u = t.getComponent("parallelAxis", l), f = this._axesMap.set(o, new OH(o, jh(u), [0, 0], u.get("type"), l)), h = f.type === "category";
f.onBand = h && u.get("boundaryGap"), f.inverse = u.get("inverse"), u.axis = f, f.model = u, f.coordinateSystem = u.coordinateSystem = this;
}, this);
}, r.prototype.update = function(e, t) {
this._updateAxesFromSeries(this._model, e);
}, r.prototype.containPoint = function(e) {
var t = this._makeLayoutInfo(), n = t.axisBase, a = t.layoutBase, i = t.pixelDimIndex, o = e[1 - i], s = e[i];
return o >= n && o <= n + t.axisLength && s >= a && s <= a + t.layoutLength;
}, r.prototype.getModel = function() {
return this._model;
}, r.prototype._updateAxesFromSeries = function(e, t) {
t.eachSeries(function(n) {
if (!!e.contains(n, t)) {
var a = n.getData();
ep(this.dimensions, function(i) {
var o = this._axesMap.get(i);
o.scale.unionExtentFromData(a, a.mapDimension(i)), To(o.scale, o.model);
}, this);
}
}, this);
}, r.prototype.resize = function(e, t) {
this._rect = ee(e.getBoxLayoutParams(), {
width: t.getWidth(),
height: t.getHeight()
}), this._layoutAxes();
}, r.prototype.getRect = function() {
return this._rect;
}, r.prototype._makeLayoutInfo = function() {
var e = this._model, t = this._rect, n = ["x", "y"], a = ["width", "height"], i = e.get("layout"), o = i === "horizontal" ? 0 : 1, s = t[a[o]], l = [0, s], u = this.dimensions.length, f = zu(e.get("axisExpandWidth"), l), h = zu(e.get("axisExpandCount") || 0, [0, u]), c = e.get("axisExpandable") && u > 3 && u > h && h > 1 && f > 0 && s > 0, v = e.get("axisExpandWindow"), p;
if (v)
p = zu(v[1] - v[0], l), v[1] = v[0] + p;
else {
p = zu(f * (h - 1), l);
var d = e.get("axisExpandCenter") || cx(u / 2);
v = [f * d - p / 2], v[1] = v[0] + p;
}
var g = (s - p) / (u - h);
g < 3 && (g = 0);
var y = [cx(vx(v[0] / f, 1)) + 1, VH(vx(v[1] / f, 1)) - 1], m = g / f * v[0];
return {
layout: i,
pixelDimIndex: o,
layoutBase: t[n[o]],
layoutLength: s,
axisBase: t[n[1 - o]],
axisLength: t[a[1 - o]],
axisExpandable: c,
axisExpandWidth: f,
axisCollapseWidth: g,
axisExpandWindow: v,
axisCount: u,
winInnerIndices: y,
axisExpandWindow0Pos: m
};
}, r.prototype._layoutAxes = function() {
var e = this._rect, t = this._axesMap, n = this.dimensions, a = this._makeLayoutInfo(), i = a.layout;
t.each(function(o) {
var s = [0, a.axisLength], l = o.inverse ? 1 : 0;
o.setExtent(s[l], s[1 - l]);
}), ep(n, function(o, s) {
var l = (a.axisExpandable ? FH : GH)(s, a), u = {
horizontal: {
x: l.position,
y: a.axisLength
},
vertical: {
x: 0,
y: l.position
}
}, f = {
horizontal: BH / 2,
vertical: 0
}, h = [u[i].x + e.x, u[i].y + e.y], c = f[i], v = hr();
bi(v, v, c), qr(v, v, h), this._axesLayout[o] = {
position: h,
rotation: c,
transform: v,
axisNameAvailableWidth: l.axisNameAvailableWidth,
axisLabelShow: l.axisLabelShow,
nameTruncateMaxWidth: l.nameTruncateMaxWidth,
tickDirection: 1,
labelDirection: 1
};
}, this);
}, r.prototype.getAxis = function(e) {
return this._axesMap.get(e);
}, r.prototype.dataToPoint = function(e, t) {
return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e), t);
}, r.prototype.eachActiveState = function(e, t, n, a) {
n == null && (n = 0), a == null && (a = e.count());
var i = this._axesMap, o = this.dimensions, s = [], l = [];
C(o, function(g) {
s.push(e.mapDimension(g)), l.push(i.get(g).model);
});
for (var u = this.hasAxisBrushed(), f = n; f < a; f++) {
var h = void 0;
if (!u)
h = "normal";
else {
h = "active";
for (var c = e.getValues(s, f), v = 0, p = o.length; v < p; v++) {
var d = l[v].getActiveState(c[v]);
if (d === "inactive") {
h = "inactive";
break;
}
}
}
t(h, f);
}
}, r.prototype.hasAxisBrushed = function() {
for (var e = this.dimensions, t = this._axesMap, n = !1, a = 0, i = e.length; a < i; a++)
t.get(e[a]).model.getActiveState() !== "normal" && (n = !0);
return n;
}, r.prototype.axisCoordToPoint = function(e, t) {
var n = this._axesLayout[t];
return Dr([e, 0], n.transform);
}, r.prototype.getAxisLayout = function(e) {
return tt(this._axesLayout[e]);
}, r.prototype.getSlidedAxisExpandWindow = function(e) {
var t = this._makeLayoutInfo(), n = t.pixelDimIndex, a = t.axisExpandWindow.slice(), i = a[1] - a[0], o = [0, t.axisExpandWidth * (t.axisCount - 1)];
if (!this.containPoint(e))
return {
behavior: "none",
axisExpandWindow: a
};
var s = e[n] - t.layoutBase - t.axisExpandWindow0Pos, l, u = "slide", f = t.axisCollapseWidth, h = this._model.get("axisExpandSlideTriggerArea"), c = h[0] != null;
if (f)
c && f && s < i * h[0] ? (u = "jump", l = s - i * h[2]) : c && f && s > i * (1 - h[0]) ? (u = "jump", l = s - i * (1 - h[2])) : (l = s - i * h[1]) >= 0 && (l = s - i * (1 - h[1])) <= 0 && (l = 0), l *= t.axisExpandWidth / f, l ? Mi(l, a, o, "all") : u = "none";
else {
var v = a[1] - a[0], p = o[1] * s / v;
a = [SL(0, p - v / 2)], a[1] = _L(o[1], a[0] + v), a[0] = a[1] - v;
}
return {
axisExpandWindow: a,
behavior: u
};
}, r;
}();
function zu(r, e) {
return _L(SL(r, e[0]), e[1]);
}
function GH(r, e) {
var t = e.layoutLength / (e.axisCount - 1);
return {
position: t * r,
axisNameAvailableWidth: t,
axisLabelShow: !0
};
}
function FH(r, e) {
var t = e.layoutLength, n = e.axisExpandWidth, a = e.axisCount, i = e.axisCollapseWidth, o = e.winInnerIndices, s, l = i, u = !1, f;
return r < o[0] ? (s = r * i, f = i) : r <= o[1] ? (s = e.axisExpandWindow0Pos + r * n - e.axisExpandWindow[0], l = n, u = !0) : (s = t - (a - 1 - r) * i, f = i), {
position: s,
axisNameAvailableWidth: l,
axisLabelShow: u,
nameTruncateMaxWidth: f
};
}
const HH = zH;
function $H(r, e) {
var t = [];
return r.eachComponent("parallel", function(n, a) {
var i = new HH(n, r, e);
i.name = "parallel_" + a, i.resize(n, e), n.coordinateSystem = i, i.model = n, t.push(i);
}), r.eachSeries(function(n) {
if (n.get("coordinateSystem") === "parallel") {
var a = n.getReferringComponents("parallel", Kt).models[0];
n.coordinateSystem = a.coordinateSystem;
}
}), t;
}
var WH = {
create: $H
};
const UH = WH;
var xL = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.activeIntervals = [], t;
}
return e.prototype.getAreaSelectStyle = function() {
return gi([
["fill", "color"],
["lineWidth", "borderWidth"],
["stroke", "borderColor"],
["width", "width"],
["opacity", "opacity"]
])(this.getModel("areaSelectStyle"));
}, e.prototype.setActiveIntervals = function(t) {
var n = this.activeIntervals = tt(t);
if (n)
for (var a = n.length - 1; a >= 0; a--)
lr(n[a]);
}, e.prototype.getActiveState = function(t) {
var n = this.activeIntervals;
if (!n.length)
return "normal";
if (t == null || isNaN(+t))
return "inactive";
if (n.length === 1) {
var a = n[0];
if (a[0] <= t && t <= a[1])
return "active";
} else
for (var i = 0, o = n.length; i < o; i++)
if (n[i][0] <= t && t <= n[i][1])
return "active";
return "inactive";
}, e;
}(_t);
Qt(xL, Bl);
const px = xL;
var _i = !0, xl = Math.min, Ao = Math.max, YH = Math.pow, ZH = 1e4, XH = 6, qH = 6, dx = "globalPan", KH = {
w: [0, 0],
e: [0, 1],
n: [1, 0],
s: [1, 1]
}, jH = {
w: "ew",
e: "ew",
n: "ns",
s: "ns",
ne: "nesw",
sw: "nesw",
nw: "nwse",
se: "nwse"
}, gx = {
brushStyle: {
lineWidth: 2,
stroke: "rgba(210,219,238,0.3)",
fill: "#D2DBEE"
},
transformable: !0,
brushMode: "single",
removeOnClick: !1
}, JH = 0, QH = function(r) {
R(e, r);
function e(t) {
var n = r.call(this) || this;
return n._track = [], n._covers = [], n._handlers = {}, process.env.NODE_ENV !== "production" && Q(t), n._zr = t, n.group = new nt(), n._uid = "brushController_" + JH++, C(o$, function(a, i) {
this._handlers[i] = Y(a, this);
}, n), n;
}
return e.prototype.enableBrush = function(t) {
return process.env.NODE_ENV !== "production" && Q(this._mounted), this._brushType && this._doDisableBrush(), t.brushType && this._doEnableBrush(t), this;
}, e.prototype._doEnableBrush = function(t) {
var n = this._zr;
this._enableGlobalPan || uF(n, dx, this._uid), C(this._handlers, function(a, i) {
n.on(i, a);
}), this._brushType = t.brushType, this._brushOption = lt(tt(gx), t, !0);
}, e.prototype._doDisableBrush = function() {
var t = this._zr;
fF(t, dx, this._uid), C(this._handlers, function(n, a) {
t.off(a, n);
}), this._brushType = this._brushOption = null;
}, e.prototype.setPanels = function(t) {
if (t && t.length) {
var n = this._panels = {};
C(t, function(a) {
n[a.panelId] = tt(a);
});
} else
this._panels = null;
return this;
}, e.prototype.mount = function(t) {
t = t || {}, process.env.NODE_ENV !== "production" && (this._mounted = !0), this._enableGlobalPan = t.enableGlobalPan;
var n = this.group;
return this._zr.add(n), n.attr({
x: t.x || 0,
y: t.y || 0,
rotation: t.rotation || 0,
scaleX: t.scaleX || 1,
scaleY: t.scaleY || 1
}), this._transform = n.getLocalTransform(), this;
}, e.prototype.updateCovers = function(t) {
process.env.NODE_ENV !== "production" && Q(this._mounted), t = G(t, function(c) {
return lt(tt(gx), c, !0);
});
var n = "\0-brush-index-", a = this._covers, i = this._covers = [], o = this, s = this._creatingCover;
return new wn(a, t, u, l).add(f).update(f).remove(h).execute(), this;
function l(c, v) {
return (c.id != null ? c.id : n + v) + "-" + c.brushType;
}
function u(c, v) {
return l(c.__brushOption, v);
}
function f(c, v) {
var p = t[c];
if (v != null && a[v] === s)
i[c] = a[v];
else {
var d = i[c] = v != null ? (a[v].__brushOption = p, a[v]) : bL(o, wL(o, p));
Jy(o, d);
}
}
function h(c) {
a[c] !== s && o.group.remove(a[c]);
}
}, e.prototype.unmount = function() {
if (!(process.env.NODE_ENV !== "production" && !this._mounted))
return this.enableBrush(!1), ng(this), this._zr.remove(this.group), process.env.NODE_ENV !== "production" && (this._mounted = !1), this;
}, e.prototype.dispose = function() {
this.unmount(), this.off();
}, e;
}(vr);
function wL(r, e) {
var t = ac[e.brushType].createCover(r, e);
return t.__brushOption = e, CL(t, e), r.group.add(t), t;
}
function bL(r, e) {
var t = Qy(e);
return t.endCreating && (t.endCreating(r, e), CL(e, e.__brushOption)), e;
}
function TL(r, e) {
var t = e.__brushOption;
Qy(e).updateCoverShape(r, e, t.range, t);
}
function CL(r, e) {
var t = e.z;
t == null && (t = ZH), r.traverse(function(n) {
n.z = t, n.z2 = t;
});
}
function Jy(r, e) {
Qy(e).updateCommon(r, e), TL(r, e);
}
function Qy(r) {
return ac[r.__brushOption.brushType];
}
function tm(r, e, t) {
var n = r._panels;
if (!n)
return _i;
var a, i = r._transform;
return C(n, function(o) {
o.isTargetByCursor(e, t, i) && (a = o);
}), a;
}
function DL(r, e) {
var t = r._panels;
if (!t)
return _i;
var n = e.__brushOption.panelId;
return n != null ? t[n] : _i;
}
function ng(r) {
var e = r._covers, t = e.length;
return C(e, function(n) {
r.group.remove(n);
}, r), e.length = 0, !!t;
}
function Si(r, e) {
var t = G(r._covers, function(n) {
var a = n.__brushOption, i = tt(a.range);
return {
brushType: a.brushType,
panelId: a.panelId,
range: i
};
});
r.trigger("brush", {
areas: t,
isEnd: !!e.isEnd,
removeOnClick: !!e.removeOnClick
});
}
function t$(r) {
var e = r._track;
if (!e.length)
return !1;
var t = e[e.length - 1], n = e[0], a = t[0] - n[0], i = t[1] - n[1], o = YH(a * a + i * i, 0.5);
return o > XH;
}
function AL(r) {
var e = r.length - 1;
return e < 0 && (e = 0), [r[0], r[e]];
}
function ML(r, e, t, n) {
var a = new nt();
return a.add(new xt({
name: "main",
style: em(t),
silent: !0,
draggable: !0,
cursor: "move",
drift: it(yx, r, e, a, ["n", "s", "w", "e"]),
ondragend: it(Si, e, {
isEnd: !0
})
})), C(n, function(i) {
a.add(new xt({
name: i.join(""),
style: {
opacity: 0
},
draggable: !0,
silent: !0,
invisible: !0,
drift: it(yx, r, e, a, i),
ondragend: it(Si, e, {
isEnd: !0
})
}));
}), a;
}
function LL(r, e, t, n) {
var a = n.brushStyle.lineWidth || 0, i = Ao(a, qH), o = t[0][0], s = t[1][0], l = o - a / 2, u = s - a / 2, f = t[0][1], h = t[1][1], c = f - i + a / 2, v = h - i + a / 2, p = f - o, d = h - s, g = p + a, y = d + a;
on(r, e, "main", o, s, p, d), n.transformable && (on(r, e, "w", l, u, i, y), on(r, e, "e", c, u, i, y), on(r, e, "n", l, u, g, i), on(r, e, "s", l, v, g, i), on(r, e, "nw", l, u, i, i), on(r, e, "ne", c, u, i, i), on(r, e, "sw", l, v, i, i), on(r, e, "se", c, v, i, i));
}
function ag(r, e) {
var t = e.__brushOption, n = t.transformable, a = e.childAt(0);
a.useStyle(em(t)), a.attr({
silent: !n,
cursor: n ? "move" : "default"
}), C([["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]], function(i) {
var o = e.childOfName(i.join("")), s = i.length === 1 ? ig(r, i[0]) : r$(r, i);
o && o.attr({
silent: !n,
invisible: !n,
cursor: n ? jH[s] + "-resize" : null
});
});
}
function on(r, e, t, n, a, i, o) {
var s = e.childOfName(t);
s && s.setShape(a$(rm(r, e, [[n, a], [n + i, a + o]])));
}
function em(r) {
return J({
strokeNoScale: !0
}, r.brushStyle);
}
function IL(r, e, t, n) {
var a = [xl(r, t), xl(e, n)], i = [Ao(r, t), Ao(e, n)];
return [
[a[0], i[0]],
[a[1], i[1]]
];
}
function e$(r) {
return li(r.group);
}
function ig(r, e) {
var t = {
w: "left",
e: "right",
n: "top",
s: "bottom"
}, n = {
left: "w",
right: "e",
top: "n",
bottom: "s"
}, a = Oh(t[e], e$(r));
return n[a];
}
function r$(r, e) {
var t = [ig(r, e[0]), ig(r, e[1])];
return (t[0] === "e" || t[0] === "w") && t.reverse(), t.join("");
}
function yx(r, e, t, n, a, i) {
var o = t.__brushOption, s = r.toRectRange(o.range), l = EL(e, a, i);
C(n, function(u) {
var f = KH[u];
s[f[0]][f[1]] += l[f[0]];
}), o.range = r.fromRectRange(IL(s[0][0], s[1][0], s[0][1], s[1][1])), Jy(e, t), Si(e, {
isEnd: !1
});
}
function n$(r, e, t, n) {
var a = e.__brushOption.range, i = EL(r, t, n);
C(a, function(o) {
o[0] += i[0], o[1] += i[1];
}), Jy(r, e), Si(r, {
isEnd: !1
});
}
function EL(r, e, t) {
var n = r.group, a = n.transformCoordToLocal(e, t), i = n.transformCoordToLocal(0, 0);
return [a[0] - i[0], a[1] - i[1]];
}
function rm(r, e, t) {
var n = DL(r, e);
return n && n !== _i ? n.clipPath(t, r._transform) : tt(t);
}
function a$(r) {
var e = xl(r[0][0], r[1][0]), t = xl(r[0][1], r[1][1]), n = Ao(r[0][0], r[1][0]), a = Ao(r[0][1], r[1][1]);
return {
x: e,
y: t,
width: n - e,
height: a - t
};
}
function i$(r, e, t) {
if (!(!r._brushType || s$(r, e.offsetX, e.offsetY))) {
var n = r._zr, a = r._covers, i = tm(r, e, t);
if (!r._dragging)
for (var o = 0; o < a.length; o++) {
var s = a[o].__brushOption;
if (i && (i === _i || s.panelId === i.panelId) && ac[s.brushType].contain(a[o], t[0], t[1]))
return;
}
i && n.setCursorStyle("crosshair");
}
}
function og(r) {
var e = r.event;
e.preventDefault && e.preventDefault();
}
function sg(r, e, t) {
return r.childOfName("main").contain(e, t);
}
function PL(r, e, t, n) {
var a = r._creatingCover, i = r._creatingPanel, o = r._brushOption, s;
if (r._track.push(t.slice()), t$(r) || a) {
if (i && !a) {
o.brushMode === "single" && ng(r);
var l = tt(o);
l.brushType = mx(l.brushType, i), l.panelId = i === _i ? null : i.panelId, a = r._creatingCover = wL(r, l), r._covers.push(a);
}
if (a) {
var u = ac[mx(r._brushType, i)], f = a.__brushOption;
f.range = u.getCreatingRange(rm(r, a, r._track)), n && (bL(r, a), u.updateCommon(r, a)), TL(r, a), s = {
isEnd: n
};
}
} else
n && o.brushMode === "single" && o.removeOnClick && tm(r, e, t) && ng(r) && (s = {
isEnd: n,
removeOnClick: !0
});
return s;
}
function mx(r, e) {
return r === "auto" ? (process.env.NODE_ENV !== "production" && Q(e && e.defaultBrushType, 'MUST have defaultBrushType when brushType is "atuo"'), e.defaultBrushType) : r;
}
var o$ = {
mousedown: function(r) {
if (this._dragging)
_x(this, r);
else if (!r.target || !r.target.draggable) {
og(r);
var e = this.group.transformCoordToLocal(r.offsetX, r.offsetY);
this._creatingCover = null;
var t = this._creatingPanel = tm(this, r, e);
t && (this._dragging = !0, this._track = [e.slice()]);
}
},
mousemove: function(r) {
var e = r.offsetX, t = r.offsetY, n = this.group.transformCoordToLocal(e, t);
if (i$(this, r, n), this._dragging) {
og(r);
var a = PL(this, r, n, !1);
a && Si(this, a);
}
},
mouseup: function(r) {
_x(this, r);
}
};
function _x(r, e) {
if (r._dragging) {
og(e);
var t = e.offsetX, n = e.offsetY, a = r.group.transformCoordToLocal(t, n), i = PL(r, e, a, !0);
r._dragging = !1, r._track = [], r._creatingCover = null, i && Si(r, i);
}
}
function s$(r, e, t) {
var n = r._zr;
return e < 0 || e > n.getWidth() || t < 0 || t > n.getHeight();
}
var ac = {
lineX: Sx(0),
lineY: Sx(1),
rect: {
createCover: function(r, e) {
function t(n) {
return n;
}
return ML({
toRectRange: t,
fromRectRange: t
}, r, e, [["w"], ["e"], ["n"], ["s"], ["s", "e"], ["s", "w"], ["n", "e"], ["n", "w"]]);
},
getCreatingRange: function(r) {
var e = AL(r);
return IL(e[1][0], e[1][1], e[0][0], e[0][1]);
},
updateCoverShape: function(r, e, t, n) {
LL(r, e, t, n);
},
updateCommon: ag,
contain: sg
},
polygon: {
createCover: function(r, e) {
var t = new nt();
return t.add(new ze({
name: "main",
style: em(e),
silent: !0
})), t;
},
getCreatingRange: function(r) {
return r;
},
endCreating: function(r, e) {
e.remove(e.childAt(0)), e.add(new Be({
name: "main",
draggable: !0,
drift: it(n$, r, e),
ondragend: it(Si, r, {
isEnd: !0
})
}));
},
updateCoverShape: function(r, e, t, n) {
e.childAt(0).setShape({
points: rm(r, e, t)
});
},
updateCommon: ag,
contain: sg
}
};
function Sx(r) {
return {
createCover: function(e, t) {
return ML({
toRectRange: function(n) {
var a = [n, [0, 100]];
return r && a.reverse(), a;
},
fromRectRange: function(n) {
return n[r];
}
}, e, t, [[["w"], ["e"]], [["n"], ["s"]]][r]);
},
getCreatingRange: function(e) {
var t = AL(e), n = xl(t[0][r], t[1][r]), a = Ao(t[0][r], t[1][r]);
return [n, a];
},
updateCoverShape: function(e, t, n, a) {
var i, o = DL(e, t);
if (o !== _i && o.getLinearBrushOtherExtent)
i = o.getLinearBrushOtherExtent(r);
else {
var s = e._zr;
i = [0, [s.getWidth(), s.getHeight()][1 - r]];
}
var l = [n, i];
r && l.reverse(), LL(e, t, l, a);
},
updateCommon: ag,
contain: sg
};
}
const nm = QH;
function NL(r) {
return r = am(r), function(e) {
return VC(e, r);
};
}
function RL(r, e) {
return r = am(r), function(t) {
var n = e != null ? e : t, a = n ? r.width : r.height, i = n ? r.x : r.y;
return [i, i + (a || 0)];
};
}
function kL(r, e, t) {
var n = am(r);
return function(a, i) {
return n.contain(i[0], i[1]) && !tc(a, e, t);
};
}
function am(r) {
return ft.create(r);
}
var l$ = ["axisLine", "axisTickLabel", "axisName"], u$ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n) {
r.prototype.init.apply(this, arguments), (this._brushController = new nm(n.getZr())).on("brush", Y(this._onBrush, this));
}, e.prototype.render = function(t, n, a, i) {
if (!f$(t, n, i)) {
this.axisModel = t, this.api = a, this.group.removeAll();
var o = this._axisGroup;
if (this._axisGroup = new nt(), this.group.add(this._axisGroup), !!t.get("show")) {
var s = c$(t, n), l = s.coordinateSystem, u = t.getAreaSelectStyle(), f = u.width, h = t.axis.dim, c = l.getAxisLayout(h), v = B({
strokeContainThreshold: f
}, c), p = new bn(t, v);
C(l$, p.add, p), this._axisGroup.add(p.getGroup()), this._refreshBrushController(v, u, t, s, f, a), El(o, this._axisGroup, t);
}
}
}, e.prototype._refreshBrushController = function(t, n, a, i, o, s) {
var l = a.axis.getExtent(), u = l[1] - l[0], f = Math.min(30, Math.abs(u) * 0.1), h = ft.create({
x: l[0],
y: -o / 2,
width: u,
height: o
});
h.x -= f, h.width += 2 * f, this._brushController.mount({
enableGlobalPan: !0,
rotation: t.rotation,
x: t.position[0],
y: t.position[1]
}).setPanels([{
panelId: "pl",
clipPath: NL(h),
isTargetByCursor: kL(h, s, i),
getLinearBrushOtherExtent: RL(h, 0)
}]).enableBrush({
brushType: "lineX",
brushStyle: n,
removeOnClick: !0
}).updateCovers(h$(a));
}, e.prototype._onBrush = function(t) {
var n = t.areas, a = this.axisModel, i = a.axis, o = G(n, function(s) {
return [i.coordToData(s.range[0], !0), i.coordToData(s.range[1], !0)];
});
(!a.option.realtime === t.isEnd || t.removeOnClick) && this.api.dispatchAction({
type: "axisAreaSelect",
parallelAxisId: a.id,
intervals: o
});
}, e.prototype.dispose = function() {
this._brushController.dispose();
}, e.type = "parallelAxis", e;
}(Ht);
function f$(r, e, t) {
return t && t.type === "axisAreaSelect" && e.findComponents({
mainType: "parallelAxis",
query: t
})[0] === r;
}
function h$(r) {
var e = r.axis;
return G(r.activeIntervals, function(t) {
return {
brushType: "lineX",
panelId: "pl",
range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]
};
});
}
function c$(r, e) {
return e.getComponent("parallel", r.get("parallelIndex"));
}
const v$ = u$;
var p$ = {
type: "axisAreaSelect",
event: "axisAreaSelected"
};
function d$(r) {
r.registerAction(p$, function(e, t) {
t.eachComponent({
mainType: "parallelAxis",
query: e
}, function(n) {
n.axis.model.setActiveIntervals(e.intervals);
});
}), r.registerAction("parallelAxisExpand", function(e, t) {
t.eachComponent({
mainType: "parallel",
query: e
}, function(n) {
n.setAxisExpand(e);
});
});
}
var g$ = {
type: "value",
areaSelectStyle: {
width: 20,
borderWidth: 1,
borderColor: "rgba(160,197,232)",
color: "rgba(160,197,232)",
opacity: 0.3
},
realtime: !0,
z: 10
};
function OL(r) {
r.registerComponentView(PH), r.registerComponentModel(RH), r.registerCoordinateSystem("parallel", UH), r.registerPreprocessor(DH), r.registerComponentModel(px), r.registerComponentView(v$), Do(r, "parallel", px, g$), d$(r);
}
function y$(r) {
pt(OL), r.registerChartView(mH), r.registerSeriesModel(wH), r.registerVisual(r.PRIORITY.VISUAL.BRUSH, CH);
}
var m$ = function() {
function r() {
this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0, this.cpx1 = 0, this.cpy1 = 0, this.cpx2 = 0, this.cpy2 = 0, this.extent = 0;
}
return r;
}(), _$ = function(r) {
R(e, r);
function e(t) {
return r.call(this, t) || this;
}
return e.prototype.getDefaultShape = function() {
return new m$();
}, e.prototype.buildPath = function(t, n) {
var a = n.extent;
t.moveTo(n.x1, n.y1), t.bezierCurveTo(n.cpx1, n.cpy1, n.cpx2, n.cpy2, n.x2, n.y2), n.orient === "vertical" ? (t.lineTo(n.x2 + a, n.y2), t.bezierCurveTo(n.cpx2 + a, n.cpy2, n.cpx1 + a, n.cpy1, n.x1 + a, n.y1)) : (t.lineTo(n.x2, n.y2 + a), t.bezierCurveTo(n.cpx2, n.cpy2 + a, n.cpx1, n.cpy1 + a, n.x1, n.y1 + a)), t.closePath();
}, e.prototype.highlight = function() {
Sn(this);
}, e.prototype.downplay = function() {
xn(this);
}, e;
}(gt), S$ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._focusAdjacencyDisabled = !1, t;
}
return e.prototype.render = function(t, n, a) {
var i = this, o = t.getGraph(), s = this.group, l = t.layoutInfo, u = l.width, f = l.height, h = t.getData(), c = t.getData("edge"), v = t.get("orient");
this._model = t, s.removeAll(), s.x = l.x, s.y = l.y, o.eachEdge(function(p) {
var d = new _$(), g = at(d);
g.dataIndex = p.dataIndex, g.seriesIndex = t.seriesIndex, g.dataType = "edge";
var y = p.getModel(), m = y.getModel("lineStyle"), _ = m.get("curveness"), S = p.node1.getLayout(), w = p.node1.getModel(), x = w.get("localX"), b = w.get("localY"), T = p.node2.getLayout(), D = p.node2.getModel(), A = D.get("localX"), M = D.get("localY"), L = p.getLayout(), I, E, P, N, O, k, V, F;
switch (d.shape.extent = Math.max(1, L.dy), d.shape.orient = v, v === "vertical" ? (I = (x != null ? x * u : S.x) + L.sy, E = (b != null ? b * f : S.y) + S.dy, P = (A != null ? A * u : T.x) + L.ty, N = M != null ? M * f : T.y, O = I, k = E * (1 - _) + N * _, V = P, F = E * _ + N * (1 - _)) : (I = (x != null ? x * u : S.x) + S.dx, E = (b != null ? b * f : S.y) + L.sy, P = A != null ? A * u : T.x, N = (M != null ? M * f : T.y) + L.ty, O = I * (1 - _) + P * _, k = E, V = I * _ + P * (1 - _), F = N), d.setShape({
x1: I,
y1: E,
x2: P,
y2: N,
cpx1: O,
cpy1: k,
cpx2: V,
cpy2: F
}), d.useStyle(m.getItemStyle()), d.style.fill) {
case "source":
d.style.fill = p.node1.getVisual("color"), d.style.decal = p.node1.getVisual("style").decal;
break;
case "target":
d.style.fill = p.node2.getVisual("color"), d.style.decal = p.node2.getVisual("style").decal;
break;
case "gradient":
var $ = p.node1.getVisual("color"), Z = p.node2.getVisual("color");
W($) && W(Z) && (d.style.fill = new Il(0, 0, +(v === "horizontal"), +(v === "vertical"), [{
color: $,
offset: 0
}, {
color: Z,
offset: 1
}]));
}
var et = y.getModel("emphasis");
ce(d, y, "lineStyle", function(Lt) {
return Lt.getItemStyle();
}), s.add(d), c.setItemGraphicEl(p.dataIndex, d);
var ht = et.get("focus");
Ut(d, ht === "adjacency" ? p.getAdjacentDataIndices() : ht, et.get("blurScope"), et.get("disabled")), at(d).dataType = "edge";
}), o.eachNode(function(p) {
var d = p.getLayout(), g = p.getModel(), y = g.get("localX"), m = g.get("localY"), _ = g.getModel("emphasis"), S = new xt({
shape: {
x: y != null ? y * u : d.x,
y: m != null ? m * f : d.y,
width: d.dx,
height: d.dy
},
style: g.getModel("itemStyle").getItemStyle(),
z2: 10
});
xe(S, se(g), {
labelFetcher: t,
labelDataIndex: p.dataIndex,
defaultText: p.id
}), S.disableLabelAnimation = !0, S.setStyle("fill", p.getVisual("color")), S.setStyle("decal", p.getVisual("style").decal), ce(S, g), s.add(S), h.setItemGraphicEl(p.dataIndex, S), at(S).dataType = "node";
var w = _.get("focus");
Ut(S, w === "adjacency" ? p.getAdjacentDataIndices() : w, _.get("blurScope"), _.get("disabled"));
}), h.eachItemGraphicEl(function(p, d) {
var g = h.getItemModel(d);
g.get("draggable") && (p.drift = function(y, m) {
i._focusAdjacencyDisabled = !0, this.shape.x += y, this.shape.y += m, this.dirty(), a.dispatchAction({
type: "dragNode",
seriesId: t.id,
dataIndex: h.getRawIndex(d),
localX: this.shape.x / u,
localY: this.shape.y / f
});
}, p.ondragend = function() {
i._focusAdjacencyDisabled = !1;
}, p.draggable = !0, p.cursor = "move");
}), !this._data && t.isAnimationEnabled() && s.setClipPath(x$(s.getBoundingRect(), t, function() {
s.removeClipPath();
})), this._data = t.getData();
}, e.prototype.dispose = function() {
}, e.type = "sankey", e;
}(Ot);
function x$(r, e, t) {
var n = new xt({
shape: {
x: r.x - 10,
y: r.y - 10,
width: 0,
height: r.height + 20
}
});
return Bt(n, {
shape: {
width: r.width + 20
}
}, e, t), n;
}
const w$ = S$;
var b$ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.getInitialData = function(t, n) {
var a = t.edges || t.links, i = t.data || t.nodes, o = t.levels;
this.levelModels = [];
for (var s = this.levelModels, l = 0; l < o.length; l++)
if (o[l].depth != null && o[l].depth >= 0)
s[o[l].depth] = new kt(o[l], this, n);
else if (process.env.NODE_ENV !== "production")
throw new Error("levels[i].depth is mandatory and should be natural number");
if (i && a) {
var u = yL(i, a, this, !0, f);
return u.data;
}
function f(h, c) {
h.wrapMethod("getItemModel", function(v, p) {
var d = v.parentModel, g = d.getData().getItemLayout(p);
if (g) {
var y = g.depth, m = d.levelModels[y];
m && (v.parentModel = m);
}
return v;
}), c.wrapMethod("getItemModel", function(v, p) {
var d = v.parentModel, g = d.getGraph().getEdgeByIndex(p), y = g.node1.getLayout();
if (y) {
var m = y.depth, _ = d.levelModels[m];
_ && (v.parentModel = _);
}
return v;
});
}
}, e.prototype.setNodePosition = function(t, n) {
var a = this.option.data || this.option.nodes, i = a[t];
i.localX = n[0], i.localY = n[1];
}, e.prototype.getGraph = function() {
return this.getData().graph;
}, e.prototype.getEdgeData = function() {
return this.getGraph().edgeData;
}, e.prototype.formatTooltip = function(t, n, a) {
function i(v) {
return isNaN(v) || v == null;
}
if (a === "edge") {
var o = this.getDataParams(t, a), s = o.data, l = o.value, u = s.source + " -- " + s.target;
return ae("nameValue", {
name: u,
value: l,
noValue: i(l)
});
} else {
var f = this.getGraph().getNodeByIndex(t), h = f.getLayout().value, c = this.getDataParams(t, a).data.name;
return ae("nameValue", {
name: c != null ? c + "" : null,
value: h,
noValue: i(h)
});
}
}, e.prototype.optionUpdated = function() {
}, e.prototype.getDataParams = function(t, n) {
var a = r.prototype.getDataParams.call(this, t, n);
if (a.value == null && n === "node") {
var i = this.getGraph().getNodeByIndex(t), o = i.getLayout().value;
a.value = o;
}
return a;
}, e.type = "series.sankey", e.defaultOption = {
z: 2,
coordinateSystem: "view",
left: "5%",
top: "5%",
right: "20%",
bottom: "5%",
orient: "horizontal",
nodeWidth: 20,
nodeGap: 8,
draggable: !0,
layoutIterations: 32,
label: {
show: !0,
position: "right",
fontSize: 12
},
levels: [],
nodeAlign: "justify",
lineStyle: {
color: "#314656",
opacity: 0.2,
curveness: 0.5
},
emphasis: {
label: {
show: !0
},
lineStyle: {
opacity: 0.5
}
},
select: {
itemStyle: {
borderColor: "#212121"
}
},
animationEasing: "linear",
animationDuration: 1e3
}, e;
}(Gt);
const T$ = b$;
function C$(r, e) {
r.eachSeriesByType("sankey", function(t) {
var n = t.get("nodeWidth"), a = t.get("nodeGap"), i = D$(t, e);
t.layoutInfo = i;
var o = i.width, s = i.height, l = t.getGraph(), u = l.nodes, f = l.edges;
M$(u);
var h = Et(u, function(d) {
return d.getLayout().value === 0;
}), c = h.length !== 0 ? 0 : t.get("layoutIterations"), v = t.get("orient"), p = t.get("nodeAlign");
A$(u, f, n, a, o, s, c, v, p);
});
}
function D$(r, e) {
return ee(r.getBoxLayoutParams(), {
width: e.getWidth(),
height: e.getHeight()
});
}
function A$(r, e, t, n, a, i, o, s, l) {
L$(r, e, t, a, i, s, l), N$(r, e, i, a, n, o, s), H$(r, s);
}
function M$(r) {
C(r, function(e) {
var t = ea(e.outEdges, nh), n = ea(e.inEdges, nh), a = e.getValue() || 0, i = Math.max(t, n, a);
e.setLayout({
value: i
}, !0);
});
}
function L$(r, e, t, n, a, i, o) {
for (var s = [], l = [], u = [], f = [], h = 0, c = 0; c < e.length; c++)
s[c] = 1;
for (var c = 0; c < r.length; c++)
l[c] = r[c].inEdges.length, l[c] === 0 && u.push(r[c]);
for (var v = -1; u.length; ) {
for (var p = 0; p < u.length; p++) {
var d = u[p], g = d.hostGraph.data.getRawDataItem(d.dataIndex), y = g.depth != null && g.depth >= 0;
y && g.depth > v && (v = g.depth), d.setLayout({
depth: y ? g.depth : h
}, !0), i === "vertical" ? d.setLayout({
dy: t
}, !0) : d.setLayout({
dx: t
}, !0);
for (var m = 0; m < d.outEdges.length; m++) {
var _ = d.outEdges[m], S = e.indexOf(_);
s[S] = 0;
var w = _.node2, x = r.indexOf(w);
--l[x] === 0 && f.indexOf(w) < 0 && f.push(w);
}
}
++h, u = f, f = [];
}
for (var c = 0; c < s.length; c++)
if (s[c] === 1)
throw new Error("Sankey is a DAG, the original data has cycle!");
var b = v > h - 1 ? v : h - 1;
o && o !== "left" && I$(r, o, i, b);
var T = i === "vertical" ? (a - t) / b : (n - t) / b;
P$(r, T, i);
}
function VL(r) {
var e = r.hostGraph.data.getRawDataItem(r.dataIndex);
return e.depth != null && e.depth >= 0;
}
function I$(r, e, t, n) {
if (e === "right") {
for (var a = [], i = r, o = 0; i.length; ) {
for (var s = 0; s < i.length; s++) {
var l = i[s];
l.setLayout({
skNodeHeight: o
}, !0);
for (var u = 0; u < l.inEdges.length; u++) {
var f = l.inEdges[u];
a.indexOf(f.node1) < 0 && a.push(f.node1);
}
}
i = a, a = [], ++o;
}
C(r, function(h) {
VL(h) || h.setLayout({
depth: Math.max(0, n - h.getLayout().skNodeHeight)
}, !0);
});
} else
e === "justify" && E$(r, n);
}
function E$(r, e) {
C(r, function(t) {
!VL(t) && !t.outEdges.length && t.setLayout({
depth: e
}, !0);
});
}
function P$(r, e, t) {
C(r, function(n) {
var a = n.getLayout().depth * e;
t === "vertical" ? n.setLayout({
y: a
}, !0) : n.setLayout({
x: a
}, !0);
});
}
function N$(r, e, t, n, a, i, o) {
var s = R$(r, o);
k$(s, e, t, n, a, o), rp(s, a, t, n, o);
for (var l = 1; i > 0; i--)
l *= 0.99, O$(s, l, o), rp(s, a, t, n, o), F$(s, l, o), rp(s, a, t, n, o);
}
function R$(r, e) {
var t = [], n = e === "vertical" ? "y" : "x", a = ud(r, function(i) {
return i.getLayout()[n];
});
return a.keys.sort(function(i, o) {
return i - o;
}), C(a.keys, function(i) {
t.push(a.buckets.get(i));
}), t;
}
function k$(r, e, t, n, a, i) {
var o = 1 / 0;
C(r, function(s) {
var l = s.length, u = 0;
C(s, function(h) {
u += h.getLayout().value;
});
var f = i === "vertical" ? (n - (l - 1) * a) / u : (t - (l - 1) * a) / u;
f < o && (o = f);
}), C(r, function(s) {
C(s, function(l, u) {
var f = l.getLayout().value * o;
i === "vertical" ? (l.setLayout({
x: u
}, !0), l.setLayout({
dx: f
}, !0)) : (l.setLayout({
y: u
}, !0), l.setLayout({
dy: f
}, !0));
});
}), C(e, function(s) {
var l = +s.getValue() * o;
s.setLayout({
dy: l
}, !0);
});
}
function rp(r, e, t, n, a) {
var i = a === "vertical" ? "x" : "y";
C(r, function(o) {
o.sort(function(d, g) {
return d.getLayout()[i] - g.getLayout()[i];
});
for (var s, l, u, f = 0, h = o.length, c = a === "vertical" ? "dx" : "dy", v = 0; v < h; v++)
l = o[v], u = f - l.getLayout()[i], u > 0 && (s = l.getLayout()[i] + u, a === "vertical" ? l.setLayout({
x: s
}, !0) : l.setLayout({
y: s
}, !0)), f = l.getLayout()[i] + l.getLayout()[c] + e;
var p = a === "vertical" ? n : t;
if (u = f - e - p, u > 0) {
s = l.getLayout()[i] - u, a === "vertical" ? l.setLayout({
x: s
}, !0) : l.setLayout({
y: s
}, !0), f = s;
for (var v = h - 2; v >= 0; --v)
l = o[v], u = l.getLayout()[i] + l.getLayout()[c] + e - f, u > 0 && (s = l.getLayout()[i] - u, a === "vertical" ? l.setLayout({
x: s
}, !0) : l.setLayout({
y: s
}, !0)), f = l.getLayout()[i];
}
});
}
function O$(r, e, t) {
C(r.slice().reverse(), function(n) {
C(n, function(a) {
if (a.outEdges.length) {
var i = ea(a.outEdges, V$, t) / ea(a.outEdges, nh);
if (isNaN(i)) {
var o = a.outEdges.length;
i = o ? ea(a.outEdges, B$, t) / o : 0;
}
if (t === "vertical") {
var s = a.getLayout().x + (i - ua(a, t)) * e;
a.setLayout({
x: s
}, !0);
} else {
var l = a.getLayout().y + (i - ua(a, t)) * e;
a.setLayout({
y: l
}, !0);
}
}
});
});
}
function V$(r, e) {
return ua(r.node2, e) * r.getValue();
}
function B$(r, e) {
return ua(r.node2, e);
}
function z$(r, e) {
return ua(r.node1, e) * r.getValue();
}
function G$(r, e) {
return ua(r.node1, e);
}
function ua(r, e) {
return e === "vertical" ? r.getLayout().x + r.getLayout().dx / 2 : r.getLayout().y + r.getLayout().dy / 2;
}
function nh(r) {
return r.getValue();
}
function ea(r, e, t) {
for (var n = 0, a = r.length, i = -1; ++i < a; ) {
var o = +e(r[i], t);
isNaN(o) || (n += o);
}
return n;
}
function F$(r, e, t) {
C(r, function(n) {
C(n, function(a) {
if (a.inEdges.length) {
var i = ea(a.inEdges, z$, t) / ea(a.inEdges, nh);
if (isNaN(i)) {
var o = a.inEdges.length;
i = o ? ea(a.inEdges, G$, t) / o : 0;
}
if (t === "vertical") {
var s = a.getLayout().x + (i - ua(a, t)) * e;
a.setLayout({
x: s
}, !0);
} else {
var l = a.getLayout().y + (i - ua(a, t)) * e;
a.setLayout({
y: l
}, !0);
}
}
});
});
}
function H$(r, e) {
var t = e === "vertical" ? "x" : "y";
C(r, function(n) {
n.outEdges.sort(function(a, i) {
return a.node2.getLayout()[t] - i.node2.getLayout()[t];
}), n.inEdges.sort(function(a, i) {
return a.node1.getLayout()[t] - i.node1.getLayout()[t];
});
}), C(r, function(n) {
var a = 0, i = 0;
C(n.outEdges, function(o) {
o.setLayout({
sy: a
}, !0), a += o.getLayout().dy;
}), C(n.inEdges, function(o) {
o.setLayout({
ty: i
}, !0), i += o.getLayout().dy;
});
});
}
function $$(r) {
r.eachSeriesByType("sankey", function(e) {
var t = e.getGraph(), n = t.nodes;
if (n.length) {
var a = 1 / 0, i = -1 / 0;
C(n, function(o) {
var s = o.getLayout().value;
s < a && (a = s), s > i && (i = s);
}), C(n, function(o) {
var s = new fe({
type: "color",
mappingMethod: "linear",
dataExtent: [a, i],
visual: e.get("color")
}), l = s.mapValueToVisual(o.getLayout().value), u = o.getModel().get(["itemStyle", "color"]);
u != null ? (o.setVisual("color", u), o.setVisual("style", {
fill: u
})) : (o.setVisual("color", l), o.setVisual("style", {
fill: l
}));
});
}
});
}
function W$(r) {
r.registerChartView(w$), r.registerSeriesModel(T$), r.registerLayout(C$), r.registerVisual($$), r.registerAction({
type: "dragNode",
event: "dragnode",
update: "update"
}, function(e, t) {
t.eachComponent({
mainType: "series",
subType: "sankey",
query: e
}, function(n) {
n.setNodePosition(e.dataIndex, [e.localX, e.localY]);
});
});
}
var BL = function() {
function r() {
}
return r.prototype.getInitialData = function(e, t) {
var n, a = t.getComponent("xAxis", this.get("xAxisIndex")), i = t.getComponent("yAxis", this.get("yAxisIndex")), o = a.get("type"), s = i.get("type"), l;
o === "category" ? (e.layout = "horizontal", n = a.getOrdinalMeta(), l = !0) : s === "category" ? (e.layout = "vertical", n = i.getOrdinalMeta(), l = !0) : e.layout = e.layout || "horizontal";
var u = ["x", "y"], f = e.layout === "horizontal" ? 0 : 1, h = this._baseAxisDim = u[f], c = u[1 - f], v = [a, i], p = v[f].get("type"), d = v[1 - f].get("type"), g = e.data;
if (g && l) {
var y = [];
C(g, function(S, w) {
var x;
z(S) ? (x = S.slice(), S.unshift(w)) : z(S.value) ? (x = B({}, S), x.value = x.value.slice(), S.value.unshift(w)) : x = S, y.push(x);
}), e.data = y;
}
var m = this.defaultValueDimensions, _ = [{
name: h,
type: Uf(p),
ordinalMeta: n,
otherDims: {
tooltip: !1,
itemName: 0
},
dimsDef: ["base"]
}, {
name: c,
type: Uf(d),
dimsDef: m.slice()
}];
return Zo(this, {
coordDimensions: _,
dimensionsCount: m.length + 1,
encodeDefaulter: it(uD, _, this)
});
}, r.prototype.getBaseAxis = function() {
var e = this._baseAxisDim;
return this.ecModel.getComponent(e + "Axis", this.get(e + "AxisIndex")).axis;
}, r;
}(), zL = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.defaultValueDimensions = [{
name: "min",
defaultTooltip: !0
}, {
name: "Q1",
defaultTooltip: !0
}, {
name: "median",
defaultTooltip: !0
}, {
name: "Q3",
defaultTooltip: !0
}, {
name: "max",
defaultTooltip: !0
}], t.visualDrawType = "stroke", t;
}
return e.type = "series.boxplot", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
z: 2,
coordinateSystem: "cartesian2d",
legendHoverLink: !0,
layout: null,
boxWidth: [7, 50],
itemStyle: {
color: "#fff",
borderWidth: 1
},
emphasis: {
scale: !0,
itemStyle: {
borderWidth: 2,
shadowBlur: 5,
shadowOffsetX: 1,
shadowOffsetY: 1,
shadowColor: "rgba(0,0,0,0.2)"
}
},
animationDuration: 800
}, e;
}(Gt);
Qt(zL, BL, !0);
const U$ = zL;
var Y$ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = t.getData(), o = this.group, s = this._data;
this._data || o.removeAll();
var l = t.get("layout") === "horizontal" ? 1 : 0;
i.diff(s).add(function(u) {
if (i.hasValue(u)) {
var f = i.getItemLayout(u), h = xx(f, i, u, l, !0);
i.setItemGraphicEl(u, h), o.add(h);
}
}).update(function(u, f) {
var h = s.getItemGraphicEl(f);
if (!i.hasValue(u)) {
o.remove(h);
return;
}
var c = i.getItemLayout(u);
h ? (Lr(h), GL(c, h, i, u)) : h = xx(c, i, u, l), o.add(h), i.setItemGraphicEl(u, h);
}).remove(function(u) {
var f = s.getItemGraphicEl(u);
f && o.remove(f);
}).execute(), this._data = i;
}, e.prototype.remove = function(t) {
var n = this.group, a = this._data;
this._data = null, a && a.eachItemGraphicEl(function(i) {
i && n.remove(i);
});
}, e.type = "boxplot", e;
}(Ot), Z$ = function() {
function r() {
}
return r;
}(), X$ = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "boxplotBoxPath", n;
}
return e.prototype.getDefaultShape = function() {
return new Z$();
}, e.prototype.buildPath = function(t, n) {
var a = n.points, i = 0;
for (t.moveTo(a[i][0], a[i][1]), i++; i < 4; i++)
t.lineTo(a[i][0], a[i][1]);
for (t.closePath(); i < a.length; i++)
t.moveTo(a[i][0], a[i][1]), i++, t.lineTo(a[i][0], a[i][1]);
}, e;
}(gt);
function xx(r, e, t, n, a) {
var i = r.ends, o = new X$({
shape: {
points: a ? q$(i, n, r) : i
}
});
return GL(r, o, e, t, a), o;
}
function GL(r, e, t, n, a) {
var i = t.hostModel, o = Nl[a ? "initProps" : "updateProps"];
o(e, {
shape: {
points: r.ends
}
}, i, n), e.useStyle(t.getItemVisual(n, "style")), e.style.strokeNoScale = !0, e.z2 = 100;
var s = t.getItemModel(n), l = s.getModel("emphasis");
ce(e, s), Ut(e, l.get("focus"), l.get("blurScope"), l.get("disabled"));
}
function q$(r, e, t) {
return G(r, function(n) {
return n = n.slice(), n[e] = t.initBaseline, n;
});
}
const K$ = Y$;
function j$(r, e) {
}
var Js = C;
function J$(r) {
var e = Q$(r);
Js(e, function(t) {
var n = t.seriesModels;
!n.length || (tW(t), Js(n, function(a, i) {
eW(a, t.boxOffsetList[i], t.boxWidthList[i]);
}));
});
}
function Q$(r) {
var e = [], t = [];
return r.eachSeriesByType("boxplot", function(n) {
var a = n.getBaseAxis(), i = ct(t, a);
i < 0 && (i = t.length, t[i] = a, e[i] = {
axis: a,
seriesModels: []
}), e[i].seriesModels.push(n);
}), e;
}
function tW(r) {
var e = r.axis, t = r.seriesModels, n = t.length, a = r.boxWidthList = [], i = r.boxOffsetList = [], o = [], s;
if (e.type === "category")
s = e.getBandWidth();
else {
var l = 0;
Js(t, function(p) {
l = Math.max(l, p.getData().count());
});
var u = e.getExtent();
s = Math.abs(u[1] - u[0]) / l;
}
Js(t, function(p) {
var d = p.get("boxWidth");
z(d) || (d = [d, d]), o.push([H(d[0], s) || 0, H(d[1], s) || 0]);
});
var f = s * 0.8 - 2, h = f / n * 0.3, c = (f - h * (n - 1)) / n, v = c / 2 - f / 2;
Js(t, function(p, d) {
i.push(v), v += h + c, a.push(Math.min(Math.max(c, o[d][0]), o[d][1]));
});
}
function eW(r, e, t) {
var n = r.coordinateSystem, a = r.getData(), i = t / 2, o = r.get("layout") === "horizontal" ? 0 : 1, s = 1 - o, l = ["x", "y"], u = a.mapDimension(l[o]), f = a.mapDimensionsAll(l[s]);
if (u == null || f.length < 5)
return;
for (var h = 0; h < a.count(); h++) {
var c = a.get(u, h), v = _(c, f[2], h), p = _(c, f[0], h), d = _(c, f[1], h), g = _(c, f[3], h), y = _(c, f[4], h), m = [];
S(m, d, !1), S(m, g, !0), m.push(p, d, y, g), w(m, p), w(m, y), w(m, v), a.setItemLayout(h, {
initBaseline: v[s],
ends: m
});
}
function _(x, b, T) {
var D = a.get(b, T), A = [];
A[o] = x, A[s] = D;
var M;
return isNaN(x) || isNaN(D) ? M = [NaN, NaN] : (M = n.dataToPoint(A), M[o] += e), M;
}
function S(x, b, T) {
var D = b.slice(), A = b.slice();
D[o] += i, A[o] -= i, T ? x.push(D, A) : x.push(A, D);
}
function w(x, b) {
var T = b.slice(), D = b.slice();
T[o] -= i, D[o] += i, x.push(T, D);
}
}
function rW(r, e) {
e = e || {};
for (var t = [], n = [], a = e.boundIQR, i = a === "none" || a === 0, o = 0; o < r.length; o++) {
var s = lr(r[o].slice()), l = Ic(s, 0.25), u = Ic(s, 0.5), f = Ic(s, 0.75), h = s[0], c = s[s.length - 1], v = (a == null ? 1.5 : a) * (f - l), p = i ? h : Math.max(h, l - v), d = i ? c : Math.min(c, f + v), g = e.itemNameFormatter, y = q(g) ? g({
value: o
}) : W(g) ? g.replace("{value}", o + "") : o + "";
t.push([y, p, l, u, f, d]);
for (var m = 0; m < s.length; m++) {
var _ = s[m];
if (_ < p || _ > d) {
var S = [y, _];
n.push(S);
}
}
}
return {
boxData: t,
outliers: n
};
}
var nW = {
type: "echarts:boxplot",
transform: function(e) {
var t = e.upstream;
if (t.sourceFormat !== Se) {
var n = "";
process.env.NODE_ENV !== "production" && (n = Me("source data is not applicable for this boxplot transform. Expect number[][].")), Mt(n);
}
var a = rW(t.getRawData(), e.config);
return [{
dimensions: ["ItemName", "Low", "Q1", "Q2", "Q3", "High"],
data: a.boxData
}, {
data: a.outliers
}];
}
};
function aW(r) {
r.registerSeriesModel(U$), r.registerChartView(K$), r.registerVisual(j$), r.registerLayout(J$), r.registerTransform(nW);
}
var iW = ["color", "borderColor"], oW = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
this.group.removeClipPath(), this._progressiveEls = null, this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t);
}, e.prototype.incrementalPrepareRender = function(t, n, a) {
this._clear(), this._updateDrawMode(t);
}, e.prototype.incrementalRender = function(t, n, a, i) {
this._progressiveEls = [], this._isLargeDraw ? this._incrementalRenderLarge(t, n) : this._incrementalRenderNormal(t, n);
}, e.prototype.eachRendered = function(t) {
ca(this._progressiveEls || this.group, t);
}, e.prototype._updateDrawMode = function(t) {
var n = t.pipelineContext.large;
(this._isLargeDraw == null || n !== this._isLargeDraw) && (this._isLargeDraw = n, this._clear());
}, e.prototype._renderNormal = function(t) {
var n = t.getData(), a = this._data, i = this.group, o = n.getLayout("isSimpleBox"), s = t.get("clip", !0), l = t.coordinateSystem, u = l.getArea && l.getArea();
this._data || i.removeAll(), n.diff(a).add(function(f) {
if (n.hasValue(f)) {
var h = n.getItemLayout(f);
if (s && bx(u, h))
return;
var c = np(h, f, !0);
Bt(c, {
shape: {
points: h.ends
}
}, t, f), ap(c, n, f, o), i.add(c), n.setItemGraphicEl(f, c);
}
}).update(function(f, h) {
var c = a.getItemGraphicEl(h);
if (!n.hasValue(f)) {
i.remove(c);
return;
}
var v = n.getItemLayout(f);
if (s && bx(u, v)) {
i.remove(c);
return;
}
c ? (bt(c, {
shape: {
points: v.ends
}
}, t, f), Lr(c)) : c = np(v), ap(c, n, f, o), i.add(c), n.setItemGraphicEl(f, c);
}).remove(function(f) {
var h = a.getItemGraphicEl(f);
h && i.remove(h);
}).execute(), this._data = n;
}, e.prototype._renderLarge = function(t) {
this._clear(), Cx(t, this.group);
var n = t.get("clip", !0) ? Qh(t.coordinateSystem, !1, t) : null;
n ? this.group.setClipPath(n) : this.group.removeClipPath();
}, e.prototype._incrementalRenderNormal = function(t, n) {
for (var a = n.getData(), i = a.getLayout("isSimpleBox"), o; (o = t.next()) != null; ) {
var s = a.getItemLayout(o), l = np(s);
ap(l, a, o, i), l.incremental = !0, this.group.add(l), this._progressiveEls.push(l);
}
}, e.prototype._incrementalRenderLarge = function(t, n) {
Cx(n, this.group, this._progressiveEls, !0);
}, e.prototype.remove = function(t) {
this._clear();
}, e.prototype._clear = function() {
this.group.removeAll(), this._data = null;
}, e.type = "candlestick", e;
}(Ot), sW = function() {
function r() {
}
return r;
}(), lW = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "normalCandlestickBox", n;
}
return e.prototype.getDefaultShape = function() {
return new sW();
}, e.prototype.buildPath = function(t, n) {
var a = n.points;
this.__simpleBox ? (t.moveTo(a[4][0], a[4][1]), t.lineTo(a[6][0], a[6][1])) : (t.moveTo(a[0][0], a[0][1]), t.lineTo(a[1][0], a[1][1]), t.lineTo(a[2][0], a[2][1]), t.lineTo(a[3][0], a[3][1]), t.closePath(), t.moveTo(a[4][0], a[4][1]), t.lineTo(a[5][0], a[5][1]), t.moveTo(a[6][0], a[6][1]), t.lineTo(a[7][0], a[7][1]));
}, e;
}(gt);
function np(r, e, t) {
var n = r.ends;
return new lW({
shape: {
points: t ? uW(n, r) : n
},
z2: 100
});
}
function bx(r, e) {
for (var t = !0, n = 0; n < e.ends.length; n++)
if (r.contain(e.ends[n][0], e.ends[n][1])) {
t = !1;
break;
}
return t;
}
function ap(r, e, t, n) {
var a = e.getItemModel(t);
r.useStyle(e.getItemVisual(t, "style")), r.style.strokeNoScale = !0, r.__simpleBox = n, ce(r, a);
}
function uW(r, e) {
return G(r, function(t) {
return t = t.slice(), t[1] = e.initBaseline, t;
});
}
var fW = function() {
function r() {
}
return r;
}(), Tx = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n.type = "largeCandlestickBox", n;
}
return e.prototype.getDefaultShape = function() {
return new fW();
}, e.prototype.buildPath = function(t, n) {
for (var a = n.points, i = 0; i < a.length; )
if (this.__sign === a[i++]) {
var o = a[i++];
t.moveTo(o, a[i++]), t.lineTo(o, a[i++]);
} else
i += 3;
}, e;
}(gt);
function Cx(r, e, t, n) {
var a = r.getData(), i = a.getLayout("largePoints"), o = new Tx({
shape: {
points: i
},
__sign: 1
});
e.add(o);
var s = new Tx({
shape: {
points: i
},
__sign: -1
});
e.add(s), Dx(1, o, r), Dx(-1, s, r), n && (o.incremental = !0, s.incremental = !0), t && t.push(o, s);
}
function Dx(r, e, t, n) {
var a = t.get(["itemStyle", r > 0 ? "borderColor" : "borderColor0"]) || t.get(["itemStyle", r > 0 ? "color" : "color0"]), i = t.getModel("itemStyle").getItemStyle(iW);
e.useStyle(i), e.style.fill = null, e.style.stroke = a;
}
const hW = oW;
var FL = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.defaultValueDimensions = [{
name: "open",
defaultTooltip: !0
}, {
name: "close",
defaultTooltip: !0
}, {
name: "lowest",
defaultTooltip: !0
}, {
name: "highest",
defaultTooltip: !0
}], t;
}
return e.prototype.getShadowDim = function() {
return "open";
}, e.prototype.brushSelector = function(t, n, a) {
var i = n.getItemLayout(t);
return i && a.rect(i.brushRect);
}, e.type = "series.candlestick", e.dependencies = ["xAxis", "yAxis", "grid"], e.defaultOption = {
z: 2,
coordinateSystem: "cartesian2d",
legendHoverLink: !0,
layout: null,
clip: !0,
itemStyle: {
color: "#eb5454",
color0: "#47b262",
borderColor: "#eb5454",
borderColor0: "#47b262",
borderWidth: 1
},
emphasis: {
scale: !0,
itemStyle: {
borderWidth: 2
}
},
barMaxWidth: null,
barMinWidth: null,
barWidth: null,
large: !0,
largeThreshold: 600,
progressive: 3e3,
progressiveThreshold: 1e4,
progressiveChunkMode: "mod",
animationEasing: "linear",
animationDuration: 300
}, e;
}(Gt);
Qt(FL, BL, !0);
const cW = FL;
function vW(r) {
!r || !z(r.series) || C(r.series, function(e) {
j(e) && e.type === "k" && (e.type = "candlestick");
});
}
var pW = ["itemStyle", "borderColor"], dW = ["itemStyle", "borderColor0"], gW = ["itemStyle", "color"], yW = ["itemStyle", "color0"], mW = {
seriesType: "candlestick",
plan: Wo(),
performRawSeries: !0,
reset: function(r, e) {
function t(i, o) {
return o.get(i > 0 ? gW : yW);
}
function n(i, o) {
return o.get(i > 0 ? pW : dW);
}
if (!e.isSeriesFiltered(r)) {
var a = r.pipelineContext.large;
return !a && {
progress: function(i, o) {
for (var s; (s = i.next()) != null; ) {
var l = o.getItemModel(s), u = o.getItemLayout(s).sign, f = l.getItemStyle();
f.fill = t(u, l), f.stroke = n(u, l) || f.fill;
var h = o.ensureUniqueItemVisual(s, "style");
B(h, f);
}
}
};
}
}
};
const _W = mW;
var SW = {
seriesType: "candlestick",
plan: Wo(),
reset: function(r) {
var e = r.coordinateSystem, t = r.getData(), n = xW(r, t), a = 0, i = 1, o = ["x", "y"], s = t.getDimensionIndex(t.mapDimension(o[a])), l = G(t.mapDimensionsAll(o[i]), t.getDimensionIndex, t), u = l[0], f = l[1], h = l[2], c = l[3];
if (t.setLayout({
candleWidth: n,
isSimpleBox: n <= 1.3
}), s < 0 || l.length < 4)
return;
return {
progress: r.pipelineContext.large ? p : v
};
function v(d, g) {
for (var y, m = g.getStore(); (y = d.next()) != null; ) {
var _ = m.get(s, y), S = m.get(u, y), w = m.get(f, y), x = m.get(h, y), b = m.get(c, y), T = Math.min(S, w), D = Math.max(S, w), A = P(T, _), M = P(D, _), L = P(x, _), I = P(b, _), E = [];
N(E, M, 0), N(E, A, 1), E.push(k(I), k(M), k(L), k(A)), g.setItemLayout(y, {
sign: Ax(m, y, S, w, f),
initBaseline: S > w ? M[i] : A[i],
ends: E,
brushRect: O(x, b, _)
});
}
function P(V, F) {
var $ = [];
return $[a] = F, $[i] = V, isNaN(F) || isNaN(V) ? [NaN, NaN] : e.dataToPoint($);
}
function N(V, F, $) {
var Z = F.slice(), et = F.slice();
Z[a] = of(Z[a] + n / 2, 1, !1), et[a] = of(et[a] - n / 2, 1, !0), $ ? V.push(Z, et) : V.push(et, Z);
}
function O(V, F, $) {
var Z = P(V, $), et = P(F, $);
return Z[a] -= n / 2, et[a] -= n / 2, {
x: Z[0],
y: Z[1],
width: n,
height: et[1] - Z[1]
};
}
function k(V) {
return V[a] = of(V[a], 1), V;
}
}
function p(d, g) {
for (var y = Wr(d.count * 4), m = 0, _, S = [], w = [], x, b = g.getStore(); (x = d.next()) != null; ) {
var T = b.get(s, x), D = b.get(u, x), A = b.get(f, x), M = b.get(h, x), L = b.get(c, x);
if (isNaN(T) || isNaN(M) || isNaN(L)) {
y[m++] = NaN, m += 3;
continue;
}
y[m++] = Ax(b, x, D, A, f), S[a] = T, S[i] = M, _ = e.dataToPoint(S, null, w), y[m++] = _ ? _[0] : NaN, y[m++] = _ ? _[1] : NaN, S[i] = L, _ = e.dataToPoint(S, null, w), y[m++] = _ ? _[1] : NaN;
}
g.setLayout("largePoints", y);
}
}
};
function Ax(r, e, t, n, a) {
var i;
return t > n ? i = -1 : t < n ? i = 1 : i = e > 0 ? r.get(a, e - 1) <= n ? 1 : -1 : 1, i;
}
function xW(r, e) {
var t = r.getBaseAxis(), n, a = t.type === "category" ? t.getBandWidth() : (n = t.getExtent(), Math.abs(n[1] - n[0]) / e.count()), i = H(vt(r.get("barMaxWidth"), a), a), o = H(vt(r.get("barMinWidth"), 1), a), s = r.get("barWidth");
return s != null ? H(s, a) : Math.max(Math.min(a / 2, i), o);
}
const wW = SW;
function bW(r) {
r.registerChartView(hW), r.registerSeriesModel(cW), r.registerPreprocessor(vW), r.registerVisual(_W), r.registerLayout(wW);
}
function Mx(r, e) {
var t = e.rippleEffectColor || e.color;
r.eachChild(function(n) {
n.attr({
z: e.z,
zlevel: e.zlevel,
style: {
stroke: e.brushType === "stroke" ? t : null,
fill: e.brushType === "fill" ? t : null
}
});
});
}
var TW = function(r) {
R(e, r);
function e(t, n) {
var a = r.call(this) || this, i = new zl(t, n), o = new nt();
return a.add(i), a.add(o), a.updateData(t, n), a;
}
return e.prototype.stopEffectAnimation = function() {
this.childAt(1).removeAll();
}, e.prototype.startEffectAnimation = function(t) {
for (var n = t.symbolType, a = t.color, i = t.rippleNumber, o = this.childAt(1), s = 0; s < i; s++) {
var l = Jt(n, -1, -1, 2, 2, a);
l.attr({
style: {
strokeNoScale: !0
},
z2: 99,
silent: !0,
scaleX: 0.5,
scaleY: 0.5
});
var u = -s / i * t.period + t.effectOffset;
l.animate("", !0).when(t.period, {
scaleX: t.rippleScale / 2,
scaleY: t.rippleScale / 2
}).delay(u).start(), l.animateStyle(!0).when(t.period, {
opacity: 0
}).delay(u).start(), o.add(l);
}
Mx(o, t);
}, e.prototype.updateEffectAnimation = function(t) {
for (var n = this._effectCfg, a = this.childAt(1), i = ["symbolType", "period", "rippleScale", "rippleNumber"], o = 0; o < i.length; o++) {
var s = i[o];
if (n[s] !== t[s]) {
this.stopEffectAnimation(), this.startEffectAnimation(t);
return;
}
}
Mx(a, t);
}, e.prototype.highlight = function() {
Sn(this);
}, e.prototype.downplay = function() {
xn(this);
}, e.prototype.getSymbolType = function() {
var t = this.childAt(0);
return t && t.getSymbolType();
}, e.prototype.updateData = function(t, n) {
var a = this, i = t.hostModel;
this.childAt(0).updateData(t, n);
var o = this.childAt(1), s = t.getItemModel(n), l = t.getItemVisual(n, "symbol"), u = kl(t.getItemVisual(n, "symbolSize")), f = t.getItemVisual(n, "style"), h = f && f.fill, c = s.getModel("emphasis");
o.setScale(u), o.traverse(function(g) {
g.setStyle("fill", h);
});
var v = Yo(t.getItemVisual(n, "symbolOffset"), u);
v && (o.x = v[0], o.y = v[1]);
var p = t.getItemVisual(n, "symbolRotate");
o.rotation = (p || 0) * Math.PI / 180 || 0;
var d = {};
d.showEffectOn = i.get("showEffectOn"), d.rippleScale = s.get(["rippleEffect", "scale"]), d.brushType = s.get(["rippleEffect", "brushType"]), d.period = s.get(["rippleEffect", "period"]) * 1e3, d.effectOffset = n / t.count(), d.z = i.getShallow("z") || 0, d.zlevel = i.getShallow("zlevel") || 0, d.symbolType = l, d.color = h, d.rippleEffectColor = s.get(["rippleEffect", "color"]), d.rippleNumber = s.get(["rippleEffect", "number"]), d.showEffectOn === "render" ? (this._effectCfg ? this.updateEffectAnimation(d) : this.startEffectAnimation(d), this._effectCfg = d) : (this._effectCfg = null, this.stopEffectAnimation(), this.onHoverStateChange = function(g) {
g === "emphasis" ? d.showEffectOn !== "render" && a.startEffectAnimation(d) : g === "normal" && d.showEffectOn !== "render" && a.stopEffectAnimation();
}), this._effectCfg = d, Ut(this, c.get("focus"), c.get("blurScope"), c.get("disabled"));
}, e.prototype.fadeOut = function(t) {
t && t();
}, e;
}(nt);
const CW = TW;
var DW = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function() {
this._symbolDraw = new Gl(CW);
}, e.prototype.render = function(t, n, a) {
var i = t.getData(), o = this._symbolDraw;
o.updateData(i, {
clipShape: this._getClipShape(t)
}), this.group.add(o.group);
}, e.prototype._getClipShape = function(t) {
var n = t.coordinateSystem, a = n && n.getArea && n.getArea();
return t.get("clip", !0) ? a : null;
}, e.prototype.updateTransform = function(t, n, a) {
var i = t.getData();
this.group.dirty();
var o = Fl("").reset(t, n, a);
o.progress && o.progress({
start: 0,
end: i.count(),
count: i.count()
}, i), this._symbolDraw.updateLayout();
}, e.prototype._updateGroupTransform = function(t) {
var n = t.coordinateSystem;
n && n.getRoamTransform && (this.group.transform = WE(n.getRoamTransform()), this.group.decomposeTransform());
}, e.prototype.remove = function(t, n) {
this._symbolDraw && this._symbolDraw.remove(!0);
}, e.type = "effectScatter", e;
}(Ot);
const AW = DW;
var MW = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.hasSymbolVisual = !0, t;
}
return e.prototype.getInitialData = function(t, n) {
return An(null, this, {
useEncodeDefaulter: !0
});
}, e.prototype.brushSelector = function(t, n, a) {
return a.point(n.getItemLayout(t));
}, e.type = "series.effectScatter", e.dependencies = ["grid", "polar"], e.defaultOption = {
coordinateSystem: "cartesian2d",
z: 2,
legendHoverLink: !0,
effectType: "ripple",
progressive: 0,
showEffectOn: "render",
clip: !0,
rippleEffect: {
period: 4,
scale: 2.5,
brushType: "fill",
number: 3
},
universalTransition: {
divideShape: "clone"
},
symbolSize: 10
}, e;
}(Gt);
const LW = MW;
function IW(r) {
r.registerChartView(AW), r.registerSeriesModel(LW), r.registerLayout(Fl("effectScatter"));
}
var EW = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this) || this;
return i.add(i.createLine(t, n, a)), i._updateEffectSymbol(t, n), i;
}
return e.prototype.createLine = function(t, n, a) {
return new Ky(t, n, a);
}, e.prototype._updateEffectSymbol = function(t, n) {
var a = t.getItemModel(n), i = a.getModel("effect"), o = i.get("symbolSize"), s = i.get("symbol");
z(o) || (o = [o, o]);
var l = t.getItemVisual(n, "style"), u = i.get("color") || l && l.stroke, f = this.childAt(1);
this._symbolType !== s && (this.remove(f), f = Jt(s, -0.5, -0.5, 1, 1, u), f.z2 = 100, f.culling = !0, this.add(f)), f && (f.setStyle("shadowColor", u), f.setStyle(i.getItemStyle(["color"])), f.scaleX = o[0], f.scaleY = o[1], f.setColor(u), this._symbolType = s, this._symbolScale = o, this._updateEffectAnimation(t, i, n));
}, e.prototype._updateEffectAnimation = function(t, n, a) {
var i = this.childAt(1);
if (!!i) {
var o = t.getItemLayout(a), s = n.get("period") * 1e3, l = n.get("loop"), u = n.get("constantSpeed"), f = qt(n.get("delay"), function(c) {
return c / t.count() * s / 3;
});
if (i.ignore = !0, this._updateAnimationPoints(i, o), u > 0 && (s = this._getLineLength(i) / u * 1e3), s !== this._period || l !== this._loop) {
i.stopAnimation();
var h = void 0;
q(f) ? h = f(a) : h = f, i.__t > 0 && (h = -s * i.__t), this._animateSymbol(i, s, h, l);
}
this._period = s, this._loop = l;
}
}, e.prototype._animateSymbol = function(t, n, a, i) {
if (n > 0) {
t.__t = 0;
var o = this, s = t.animate("", i).when(n, {
__t: 1
}).delay(a).during(function() {
o._updateSymbolPosition(t);
});
i || s.done(function() {
o.remove(t);
}), s.start();
}
}, e.prototype._getLineLength = function(t) {
return $n(t.__p1, t.__cp1) + $n(t.__cp1, t.__p2);
}, e.prototype._updateAnimationPoints = function(t, n) {
t.__p1 = n[0], t.__p2 = n[1], t.__cp1 = n[2] || [(n[0][0] + n[1][0]) / 2, (n[0][1] + n[1][1]) / 2];
}, e.prototype.updateData = function(t, n, a) {
this.childAt(0).updateData(t, n, a), this._updateEffectSymbol(t, n);
}, e.prototype._updateSymbolPosition = function(t) {
var n = t.__p1, a = t.__p2, i = t.__cp1, o = t.__t, s = [t.x, t.y], l = s.slice(), u = ie, f = qp;
s[0] = u(n[0], i[0], a[0], o), s[1] = u(n[1], i[1], a[1], o);
var h = f(n[0], i[0], a[0], o), c = f(n[1], i[1], a[1], o);
t.rotation = -Math.atan2(c, h) - Math.PI / 2, (this._symbolType === "line" || this._symbolType === "rect" || this._symbolType === "roundRect") && (t.__lastT !== void 0 && t.__lastT < t.__t ? (t.scaleY = $n(l, s) * 1.05, o === 1 && (s[0] = l[0] + (s[0] - l[0]) / 2, s[1] = l[1] + (s[1] - l[1]) / 2)) : t.__lastT === 1 ? t.scaleY = 2 * $n(n, s) : t.scaleY = this._symbolScale[1]), t.__lastT = t.__t, t.ignore = !1, t.x = s[0], t.y = s[1];
}, e.prototype.updateLayout = function(t, n) {
this.childAt(0).updateLayout(t, n);
var a = t.getItemModel(n).getModel("effect");
this._updateEffectAnimation(t, a, n);
}, e;
}(nt);
const HL = EW;
var PW = function(r) {
R(e, r);
function e(t, n, a) {
var i = r.call(this) || this;
return i._createPolyline(t, n, a), i;
}
return e.prototype._createPolyline = function(t, n, a) {
var i = t.getItemLayout(n), o = new ze({
shape: {
points: i
}
});
this.add(o), this._updateCommonStl(t, n, a);
}, e.prototype.updateData = function(t, n, a) {
var i = t.hostModel, o = this.childAt(0), s = {
shape: {
points: t.getItemLayout(n)
}
};
bt(o, s, i, n), this._updateCommonStl(t, n, a);
}, e.prototype._updateCommonStl = function(t, n, a) {
var i = this.childAt(0), o = t.getItemModel(n), s = a && a.emphasisLineStyle, l = a && a.focus, u = a && a.blurScope, f = a && a.emphasisDisabled;
if (!a || t.hasItemOption) {
var h = o.getModel("emphasis");
s = h.getModel("lineStyle").getLineStyle(), f = h.get("disabled"), l = h.get("focus"), u = h.get("blurScope");
}
i.useStyle(t.getItemVisual(n, "style")), i.style.fill = null, i.style.strokeNoScale = !0;
var c = i.ensureState("emphasis");
c.style = s, Ut(this, l, u, f);
}, e.prototype.updateLayout = function(t, n) {
var a = this.childAt(0);
a.setShape("points", t.getItemLayout(n));
}, e;
}(nt);
const $L = PW;
var NW = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t._lastFrame = 0, t._lastFramePercent = 0, t;
}
return e.prototype.createLine = function(t, n, a) {
return new $L(t, n, a);
}, e.prototype._updateAnimationPoints = function(t, n) {
this._points = n;
for (var a = [0], i = 0, o = 1; o < n.length; o++) {
var s = n[o - 1], l = n[o];
i += $n(s, l), a.push(i);
}
if (i === 0) {
this._length = 0;
return;
}
for (var o = 0; o < a.length; o++)
a[o] /= i;
this._offsets = a, this._length = i;
}, e.prototype._getLineLength = function() {
return this._length;
}, e.prototype._updateSymbolPosition = function(t) {
var n = t.__t, a = this._points, i = this._offsets, o = a.length;
if (!!i) {
var s = this._lastFrame, l;
if (n < this._lastFramePercent) {
var u = Math.min(s + 1, o - 1);
for (l = u; l >= 0 && !(i[l] <= n); l--)
;
l = Math.min(l, o - 2);
} else {
for (l = s; l < o && !(i[l] > n); l++)
;
l = Math.min(l - 1, o - 2);
}
var f = (n - i[l]) / (i[l + 1] - i[l]), h = a[l], c = a[l + 1];
t.x = h[0] * (1 - f) + f * c[0], t.y = h[1] * (1 - f) + f * c[1];
var v = c[0] - h[0], p = c[1] - h[1];
t.rotation = -Math.atan2(p, v) - Math.PI / 2, this._lastFrame = l, this._lastFramePercent = n, t.ignore = !1;
}
}, e;
}(HL);
const RW = NW;
var kW = function() {
function r() {
this.polyline = !1, this.curveness = 0, this.segs = [];
}
return r;
}(), OW = function(r) {
R(e, r);
function e(t) {
var n = r.call(this, t) || this;
return n._off = 0, n.hoverDataIdx = -1, n;
}
return e.prototype.reset = function() {
this.notClear = !1, this._off = 0;
}, e.prototype.getDefaultStyle = function() {
return {
stroke: "#000",
fill: null
};
}, e.prototype.getDefaultShape = function() {
return new kW();
}, e.prototype.buildPath = function(t, n) {
var a = n.segs, i = n.curveness, o;
if (n.polyline)
for (o = this._off; o < a.length; ) {
var s = a[o++];
if (s > 0) {
t.moveTo(a[o++], a[o++]);
for (var l = 1; l < s; l++)
t.lineTo(a[o++], a[o++]);
}
}
else
for (o = this._off; o < a.length; ) {
var u = a[o++], f = a[o++], h = a[o++], c = a[o++];
if (t.moveTo(u, f), i > 0) {
var v = (u + h) / 2 - (f - c) * i, p = (f + c) / 2 - (h - u) * i;
t.quadraticCurveTo(v, p, h, c);
} else
t.lineTo(h, c);
}
this.incremental && (this._off = o, this.notClear = !0);
}, e.prototype.findDataIndex = function(t, n) {
var a = this.shape, i = a.segs, o = a.curveness, s = this.style.lineWidth;
if (a.polyline)
for (var l = 0, u = 0; u < i.length; ) {
var f = i[u++];
if (f > 0)
for (var h = i[u++], c = i[u++], v = 1; v < f; v++) {
var p = i[u++], d = i[u++];
if (Fn(h, c, p, d, s, t, n))
return l;
}
l++;
}
else
for (var l = 0, u = 0; u < i.length; ) {
var h = i[u++], c = i[u++], p = i[u++], d = i[u++];
if (o > 0) {
var g = (h + p) / 2 - (c - d) * o, y = (c + d) / 2 - (p - h) * o;
if (KT(h, c, g, y, p, d, s, t, n))
return l;
} else if (Fn(h, c, p, d, s, t, n))
return l;
l++;
}
return -1;
}, e.prototype.contain = function(t, n) {
var a = this.transformCoordToLocal(t, n), i = this.getBoundingRect();
if (t = a[0], n = a[1], i.contain(t, n)) {
var o = this.hoverDataIdx = this.findDataIndex(t, n);
return o >= 0;
}
return this.hoverDataIdx = -1, !1;
}, e.prototype.getBoundingRect = function() {
var t = this._rect;
if (!t) {
for (var n = this.shape, a = n.segs, i = 1 / 0, o = 1 / 0, s = -1 / 0, l = -1 / 0, u = 0; u < a.length; ) {
var f = a[u++], h = a[u++];
i = Math.min(f, i), s = Math.max(f, s), o = Math.min(h, o), l = Math.max(h, l);
}
t = this._rect = new ft(i, o, s, l);
}
return t;
}, e;
}(gt), VW = function() {
function r() {
this.group = new nt();
}
return r.prototype.updateData = function(e) {
this._clear();
var t = this._create();
t.setShape({
segs: e.getLayout("linesPoints")
}), this._setCommon(t, e);
}, r.prototype.incrementalPrepareUpdate = function(e) {
this.group.removeAll(), this._clear();
}, r.prototype.incrementalUpdate = function(e, t) {
var n = this._newAdded[0], a = t.getLayout("linesPoints"), i = n && n.shape.segs;
if (i && i.length < 2e4) {
var o = i.length, s = new Float32Array(o + a.length);
s.set(i), s.set(a, o), n.setShape({
segs: s
});
} else {
this._newAdded = [];
var l = this._create();
l.incremental = !0, l.setShape({
segs: a
}), this._setCommon(l, t), l.__startIndex = e.start;
}
}, r.prototype.remove = function() {
this._clear();
}, r.prototype.eachRendered = function(e) {
this._newAdded[0] && e(this._newAdded[0]);
}, r.prototype._create = function() {
var e = new OW({
cursor: "default"
});
return this._newAdded.push(e), this.group.add(e), e;
}, r.prototype._setCommon = function(e, t, n) {
var a = t.hostModel;
e.setShape({
polyline: a.get("polyline"),
curveness: a.get(["lineStyle", "curveness"])
}), e.useStyle(a.getModel("lineStyle").getLineStyle()), e.style.strokeNoScale = !0;
var i = t.getVisual("style");
i && i.stroke && e.setStyle("stroke", i.stroke), e.setStyle("fill", null);
var o = at(e);
o.seriesIndex = a.seriesIndex, e.on("mousemove", function(s) {
o.dataIndex = null;
var l = e.hoverDataIdx;
l > 0 && (o.dataIndex = l + e.__startIndex);
});
}, r.prototype._clear = function() {
this._newAdded = [], this.group.removeAll();
}, r;
}();
const BW = VW;
var zW = {
seriesType: "lines",
plan: Wo(),
reset: function(r) {
var e = r.coordinateSystem;
if (!e) {
process.env.NODE_ENV !== "production" && he("The lines series must have a coordinate system.");
return;
}
var t = r.get("polyline"), n = r.pipelineContext.large;
return {
progress: function(a, i) {
var o = [];
if (n) {
var s = void 0, l = a.end - a.start;
if (t) {
for (var u = 0, f = a.start; f < a.end; f++)
u += r.getLineCoordsCount(f);
s = new Float32Array(l + u * 2);
} else
s = new Float32Array(l * 4);
for (var h = 0, c = [], f = a.start; f < a.end; f++) {
var v = r.getLineCoords(f, o);
t && (s[h++] = v);
for (var p = 0; p < v; p++)
c = e.dataToPoint(o[p], !1, c), s[h++] = c[0], s[h++] = c[1];
}
i.setLayout("linesPoints", s);
} else
for (var f = a.start; f < a.end; f++) {
var d = i.getItemModel(f), v = r.getLineCoords(f, o), g = [];
if (t)
for (var y = 0; y < v; y++)
g.push(e.dataToPoint(o[y]));
else {
g[0] = e.dataToPoint(o[0]), g[1] = e.dataToPoint(o[1]);
var m = d.get(["lineStyle", "curveness"]);
+m && (g[2] = [(g[0][0] + g[1][0]) / 2 - (g[0][1] - g[1][1]) * m, (g[0][1] + g[1][1]) / 2 - (g[1][0] - g[0][0]) * m]);
}
i.setItemLayout(f, g);
}
}
};
}
};
const WL = zW;
var GW = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = t.getData(), o = this._updateLineDraw(i, t), s = t.get("zlevel"), l = t.get(["effect", "trailLength"]), u = a.getZr(), f = u.painter.getType() === "svg";
f || u.painter.getLayer(s).clear(!0), this._lastZlevel != null && !f && u.configLayer(this._lastZlevel, {
motionBlur: !1
}), this._showEffect(t) && l > 0 && (f ? process.env.NODE_ENV !== "production" && console.warn("SVG render mode doesn't support lines with trail effect") : u.configLayer(s, {
motionBlur: !0,
lastFrameAlpha: Math.max(Math.min(l / 10 + 0.9, 1), 0)
})), o.updateData(i);
var h = t.get("clip", !0) && Qh(t.coordinateSystem, !1, t);
h ? this.group.setClipPath(h) : this.group.removeClipPath(), this._lastZlevel = s, this._finished = !0;
}, e.prototype.incrementalPrepareRender = function(t, n, a) {
var i = t.getData(), o = this._updateLineDraw(i, t);
o.incrementalPrepareUpdate(i), this._clearLayer(a), this._finished = !1;
}, e.prototype.incrementalRender = function(t, n, a) {
this._lineDraw.incrementalUpdate(t, n.getData()), this._finished = t.end === n.getData().count();
}, e.prototype.eachRendered = function(t) {
this._lineDraw && this._lineDraw.eachRendered(t);
}, e.prototype.updateTransform = function(t, n, a) {
var i = t.getData(), o = t.pipelineContext;
if (!this._finished || o.large || o.progressiveRender)
return {
update: !0
};
var s = WL.reset(t, n, a);
s.progress && s.progress({
start: 0,
end: i.count(),
count: i.count()
}, i), this._lineDraw.updateLayout(), this._clearLayer(a);
}, e.prototype._updateLineDraw = function(t, n) {
var a = this._lineDraw, i = this._showEffect(n), o = !!n.get("polyline"), s = n.pipelineContext, l = s.large;
return process.env.NODE_ENV !== "production" && i && l && console.warn("Large lines not support effect"), (!a || i !== this._hasEffet || o !== this._isPolyline || l !== this._isLargeDraw) && (a && a.remove(), a = this._lineDraw = l ? new BW() : new jy(o ? i ? RW : $L : i ? HL : Ky), this._hasEffet = i, this._isPolyline = o, this._isLargeDraw = l), this.group.add(a.group), a;
}, e.prototype._showEffect = function(t) {
return !!t.get(["effect", "show"]);
}, e.prototype._clearLayer = function(t) {
var n = t.getZr(), a = n.painter.getType() === "svg";
!a && this._lastZlevel != null && n.painter.getLayer(this._lastZlevel).clear(!0);
}, e.prototype.remove = function(t, n) {
this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(n);
}, e.prototype.dispose = function(t, n) {
this.remove(t, n);
}, e.type = "lines", e;
}(Ot);
const FW = GW;
var HW = typeof Uint32Array > "u" ? Array : Uint32Array, $W = typeof Float64Array > "u" ? Array : Float64Array;
function Lx(r) {
var e = r.data;
e && e[0] && e[0][0] && e[0][0].coord && (process.env.NODE_ENV !== "production" && console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"), r.data = G(e, function(t) {
var n = [t[0].coord, t[1].coord], a = {
coords: n
};
return t[0].name && (a.fromName = t[0].name), t[1].name && (a.toName = t[1].name), Ig([a, t[0], t[1]]);
}));
}
var WW = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.visualStyleAccessPath = "lineStyle", t.visualDrawType = "stroke", t;
}
return e.prototype.init = function(t) {
t.data = t.data || [], Lx(t);
var n = this._processFlatCoordsArray(t.data);
this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (t.data = new Float32Array(n.count)), r.prototype.init.apply(this, arguments);
}, e.prototype.mergeOption = function(t) {
if (Lx(t), t.data) {
var n = this._processFlatCoordsArray(t.data);
this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset, n.flatCoords && (t.data = new Float32Array(n.count));
}
r.prototype.mergeOption.apply(this, arguments);
}, e.prototype.appendData = function(t) {
var n = this._processFlatCoordsArray(t.data);
n.flatCoords && (this._flatCoords ? (this._flatCoords = _f(this._flatCoords, n.flatCoords), this._flatCoordsOffset = _f(this._flatCoordsOffset, n.flatCoordsOffset)) : (this._flatCoords = n.flatCoords, this._flatCoordsOffset = n.flatCoordsOffset), t.data = new Float32Array(n.count)), this.getRawData().appendData(t.data);
}, e.prototype._getCoordsFromItemModel = function(t) {
var n = this.getData().getItemModel(t), a = n.option instanceof Array ? n.option : n.getShallow("coords");
if (process.env.NODE_ENV !== "production" && !(a instanceof Array && a.length > 0 && a[0] instanceof Array))
throw new Error("Invalid coords " + JSON.stringify(a) + ". Lines must have 2d coords array in data item.");
return a;
}, e.prototype.getLineCoordsCount = function(t) {
return this._flatCoordsOffset ? this._flatCoordsOffset[t * 2 + 1] : this._getCoordsFromItemModel(t).length;
}, e.prototype.getLineCoords = function(t, n) {
if (this._flatCoordsOffset) {
for (var a = this._flatCoordsOffset[t * 2], i = this._flatCoordsOffset[t * 2 + 1], o = 0; o < i; o++)
n[o] = n[o] || [], n[o][0] = this._flatCoords[a + o * 2], n[o][1] = this._flatCoords[a + o * 2 + 1];
return i;
} else {
for (var s = this._getCoordsFromItemModel(t), o = 0; o < s.length; o++)
n[o] = n[o] || [], n[o][0] = s[o][0], n[o][1] = s[o][1];
return s.length;
}
}, e.prototype._processFlatCoordsArray = function(t) {
var n = 0;
if (this._flatCoords && (n = this._flatCoords.length), wt(t[0])) {
for (var a = t.length, i = new HW(a), o = new $W(a), s = 0, l = 0, u = 0, f = 0; f < a; ) {
u++;
var h = t[f++];
i[l++] = s + n, i[l++] = h;
for (var c = 0; c < h; c++) {
var v = t[f++], p = t[f++];
if (o[s++] = v, o[s++] = p, f > a && process.env.NODE_ENV !== "production")
throw new Error("Invalid data format.");
}
}
return {
flatCoordsOffset: new Uint32Array(i.buffer, 0, l),
flatCoords: o,
count: u
};
}
return {
flatCoordsOffset: null,
flatCoords: null,
count: t.length
};
}, e.prototype.getInitialData = function(t, n) {
if (process.env.NODE_ENV !== "production") {
var a = $o.get(t.coordinateSystem);
if (!a)
throw new Error("Unkown coordinate system " + t.coordinateSystem);
}
var i = new Ae(["value"], this);
return i.hasItemOption = !1, i.initData(t.data, [], function(o, s, l, u) {
if (o instanceof Array)
return NaN;
i.hasItemOption = !0;
var f = o.value;
if (f != null)
return f instanceof Array ? f[u] : f;
}), i;
}, e.prototype.formatTooltip = function(t, n, a) {
var i = this.getData(), o = i.getItemModel(t), s = o.get("name");
if (s)
return s;
var l = o.get("fromName"), u = o.get("toName"), f = [];
return l != null && f.push(l), u != null && f.push(u), ae("nameValue", {
name: f.join(" > ")
});
}, e.prototype.preventIncremental = function() {
return !!this.get(["effect", "show"]);
}, e.prototype.getProgressive = function() {
var t = this.option.progressive;
return t == null ? this.option.large ? 1e4 : this.get("progressive") : t;
}, e.prototype.getProgressiveThreshold = function() {
var t = this.option.progressiveThreshold;
return t == null ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t;
}, e.prototype.getZLevelKey = function() {
var t = this.getModel("effect"), n = t.get("trailLength");
return this.getData().count() > this.getProgressiveThreshold() ? this.id : t.get("show") && n > 0 ? n + "" : "";
}, e.type = "series.lines", e.dependencies = ["grid", "polar", "geo", "calendar"], e.defaultOption = {
coordinateSystem: "geo",
z: 2,
legendHoverLink: !0,
xAxisIndex: 0,
yAxisIndex: 0,
symbol: ["none", "none"],
symbolSize: [10, 10],
geoIndex: 0,
effect: {
show: !1,
period: 4,
constantSpeed: 0,
symbol: "circle",
symbolSize: 3,
loop: !0,
trailLength: 0.2
},
large: !1,
largeThreshold: 2e3,
polyline: !1,
clip: !0,
label: {
show: !1,
position: "end"
},
lineStyle: {
opacity: 0.5
}
}, e;
}(Gt);
const UW = WW;
function Gu(r) {
return r instanceof Array || (r = [r, r]), r;
}
var YW = {
seriesType: "lines",
reset: function(r) {
var e = Gu(r.get("symbol")), t = Gu(r.get("symbolSize")), n = r.getData();
n.setVisual("fromSymbol", e && e[0]), n.setVisual("toSymbol", e && e[1]), n.setVisual("fromSymbolSize", t && t[0]), n.setVisual("toSymbolSize", t && t[1]);
function a(i, o) {
var s = i.getItemModel(o), l = Gu(s.getShallow("symbol", !0)), u = Gu(s.getShallow("symbolSize", !0));
l[0] && i.setItemVisual(o, "fromSymbol", l[0]), l[1] && i.setItemVisual(o, "toSymbol", l[1]), u[0] && i.setItemVisual(o, "fromSymbolSize", u[0]), u[1] && i.setItemVisual(o, "toSymbolSize", u[1]);
}
return {
dataEach: n.hasItemOption ? a : null
};
}
};
const ZW = YW;
function XW(r) {
r.registerChartView(FW), r.registerSeriesModel(UW), r.registerLayout(WL), r.registerVisual(ZW);
}
var qW = 256, KW = function() {
function r() {
this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {
inRange: null,
outOfRange: null
};
var e = yn.createCanvas();
this.canvas = e;
}
return r.prototype.update = function(e, t, n, a, i, o) {
var s = this._getBrush(), l = this._getGradient(i, "inRange"), u = this._getGradient(i, "outOfRange"), f = this.pointSize + this.blurSize, h = this.canvas, c = h.getContext("2d"), v = e.length;
h.width = t, h.height = n;
for (var p = 0; p < v; ++p) {
var d = e[p], g = d[0], y = d[1], m = d[2], _ = a(m);
c.globalAlpha = _, c.drawImage(s, g - f, y - f);
}
if (!h.width || !h.height)
return h;
for (var S = c.getImageData(0, 0, h.width, h.height), w = S.data, x = 0, b = w.length, T = this.minOpacity, D = this.maxOpacity, A = D - T; x < b; ) {
var _ = w[x + 3] / 256, M = Math.floor(_ * (qW - 1)) * 4;
if (_ > 0) {
var L = o(_) ? l : u;
_ > 0 && (_ = _ * A + T), w[x++] = L[M], w[x++] = L[M + 1], w[x++] = L[M + 2], w[x++] = L[M + 3] * _ * 256;
} else
x += 4;
}
return c.putImageData(S, 0, 0), h;
}, r.prototype._getBrush = function() {
var e = this._brushCanvas || (this._brushCanvas = yn.createCanvas()), t = this.pointSize + this.blurSize, n = t * 2;
e.width = n, e.height = n;
var a = e.getContext("2d");
return a.clearRect(0, 0, n, n), a.shadowOffsetX = n, a.shadowBlur = this.blurSize, a.shadowColor = "#000", a.beginPath(), a.arc(-t, t, this.pointSize, 0, Math.PI * 2, !0), a.closePath(), a.fill(), e;
}, r.prototype._getGradient = function(e, t) {
for (var n = this._gradientPixels, a = n[t] || (n[t] = new Uint8ClampedArray(256 * 4)), i = [0, 0, 0, 0], o = 0, s = 0; s < 256; s++)
e[t](s / 255, !0, i), a[o++] = i[0], a[o++] = i[1], a[o++] = i[2], a[o++] = i[3];
return a;
}, r;
}();
const jW = KW;
function JW(r, e, t) {
var n = r[1] - r[0];
e = G(e, function(o) {
return {
interval: [(o.interval[0] - r[0]) / n, (o.interval[1] - r[0]) / n]
};
});
var a = e.length, i = 0;
return function(o) {
var s;
for (s = i; s < a; s++) {
var l = e[s].interval;
if (l[0] <= o && o <= l[1]) {
i = s;
break;
}
}
if (s === a)
for (s = i - 1; s >= 0; s--) {
var l = e[s].interval;
if (l[0] <= o && o <= l[1]) {
i = s;
break;
}
}
return s >= 0 && s < a && t[s];
};
}
function QW(r, e) {
var t = r[1] - r[0];
return e = [(e[0] - r[0]) / t, (e[1] - r[0]) / t], function(n) {
return n >= e[0] && n <= e[1];
};
}
function Ix(r) {
var e = r.dimensions;
return e[0] === "lng" && e[1] === "lat";
}
var t6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i;
if (n.eachComponent("visualMap", function(s) {
s.eachTargetSeries(function(l) {
l === t && (i = s);
});
}), process.env.NODE_ENV !== "production" && !i)
throw new Error("Heatmap must use with visualMap");
this._progressiveEls = null, this.group.removeAll();
var o = t.coordinateSystem;
o.type === "cartesian2d" || o.type === "calendar" ? this._renderOnCartesianAndCalendar(t, a, 0, t.getData().count()) : Ix(o) && this._renderOnGeo(o, t, i, a);
}, e.prototype.incrementalPrepareRender = function(t, n, a) {
this.group.removeAll();
}, e.prototype.incrementalRender = function(t, n, a, i) {
var o = n.coordinateSystem;
o && (Ix(o) ? this.render(n, a, i) : (this._progressiveEls = [], this._renderOnCartesianAndCalendar(n, i, t.start, t.end, !0)));
}, e.prototype.eachRendered = function(t) {
ca(this._progressiveEls || this.group, t);
}, e.prototype._renderOnCartesianAndCalendar = function(t, n, a, i, o) {
var s = t.coordinateSystem, l = Di(s, "cartesian2d"), u, f, h, c;
if (l) {
var v = s.getAxis("x"), p = s.getAxis("y");
if (process.env.NODE_ENV !== "production") {
if (!(v.type === "category" && p.type === "category"))
throw new Error("Heatmap on cartesian must have two category axes");
if (!(v.onBand && p.onBand))
throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");
}
u = v.getBandWidth() + 0.5, f = p.getBandWidth() + 0.5, h = v.scale.getExtent(), c = p.scale.getExtent();
}
for (var d = this.group, g = t.getData(), y = t.getModel(["emphasis", "itemStyle"]).getItemStyle(), m = t.getModel(["blur", "itemStyle"]).getItemStyle(), _ = t.getModel(["select", "itemStyle"]).getItemStyle(), S = t.get(["itemStyle", "borderRadius"]), w = se(t), x = t.getModel("emphasis"), b = x.get("focus"), T = x.get("blurScope"), D = x.get("disabled"), A = l ? [g.mapDimension("x"), g.mapDimension("y"), g.mapDimension("value")] : [g.mapDimension("time"), g.mapDimension("value")], M = a; M < i; M++) {
var L = void 0, I = g.getItemVisual(M, "style");
if (l) {
var E = g.get(A[0], M), P = g.get(A[1], M);
if (isNaN(g.get(A[2], M)) || E < h[0] || E > h[1] || P < c[0] || P > c[1])
continue;
var N = s.dataToPoint([E, P]);
L = new xt({
shape: {
x: N[0] - u / 2,
y: N[1] - f / 2,
width: u,
height: f
},
style: I
});
} else {
if (isNaN(g.get(A[1], M)))
continue;
L = new xt({
z2: 1,
shape: s.dataToRect([g.get(A[0], M)]).contentShape,
style: I
});
}
if (g.hasItemOption) {
var O = g.getItemModel(M), k = O.getModel("emphasis");
y = k.getModel("itemStyle").getItemStyle(), m = O.getModel(["blur", "itemStyle"]).getItemStyle(), _ = O.getModel(["select", "itemStyle"]).getItemStyle(), S = O.get(["itemStyle", "borderRadius"]), b = k.get("focus"), T = k.get("blurScope"), D = k.get("disabled"), w = se(O);
}
L.shape.r = S;
var V = t.getRawValue(M), F = "-";
V && V[2] != null && (F = V[2] + ""), xe(L, w, {
labelFetcher: t,
labelDataIndex: M,
defaultOpacity: I.opacity,
defaultText: F
}), L.ensureState("emphasis").style = y, L.ensureState("blur").style = m, L.ensureState("select").style = _, Ut(L, b, T, D), L.incremental = o, o && (L.states.emphasis.hoverLayer = !0), d.add(L), g.setItemGraphicEl(M, L), this._progressiveEls && this._progressiveEls.push(L);
}
}, e.prototype._renderOnGeo = function(t, n, a, i) {
var o = a.targetVisuals.inRange, s = a.targetVisuals.outOfRange, l = n.getData(), u = this._hmLayer || this._hmLayer || new jW();
u.blurSize = n.get("blurSize"), u.pointSize = n.get("pointSize"), u.minOpacity = n.get("minOpacity"), u.maxOpacity = n.get("maxOpacity");
var f = t.getViewRect().clone(), h = t.getRoamTransform();
f.applyTransform(h);
var c = Math.max(f.x, 0), v = Math.max(f.y, 0), p = Math.min(f.width + f.x, i.getWidth()), d = Math.min(f.height + f.y, i.getHeight()), g = p - c, y = d - v, m = [l.mapDimension("lng"), l.mapDimension("lat"), l.mapDimension("value")], _ = l.mapArray(m, function(b, T, D) {
var A = t.dataToPoint([b, T]);
return A[0] -= c, A[1] -= v, A.push(D), A;
}), S = a.getExtent(), w = a.type === "visualMap.continuous" ? QW(S, a.option.range) : JW(S, a.getPieceList(), a.option.selected);
u.update(_, g, y, o.color.getNormalizer(), {
inRange: o.color.getColorMapper(),
outOfRange: s.color.getColorMapper()
}, w);
var x = new ve({
style: {
width: g,
height: y,
x: c,
y: v,
image: u.canvas
},
silent: !0
});
this.group.add(x);
}, e.type = "heatmap", e;
}(Ot);
const e6 = t6;
var r6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.getInitialData = function(t, n) {
return An(null, this, {
generateCoord: "value"
});
}, e.prototype.preventIncremental = function() {
var t = $o.get(this.get("coordinateSystem"));
if (t && t.dimensions)
return t.dimensions[0] === "lng" && t.dimensions[1] === "lat";
}, e.type = "series.heatmap", e.dependencies = ["grid", "geo", "calendar"], e.defaultOption = {
coordinateSystem: "cartesian2d",
z: 2,
geoIndex: 0,
blurSize: 30,
pointSize: 20,
maxOpacity: 1,
minOpacity: 0,
select: {
itemStyle: {
borderColor: "#212121"
}
}
}, e;
}(Gt);
const n6 = r6;
function a6(r) {
r.registerChartView(e6), r.registerSeriesModel(n6);
}
var i6 = ["itemStyle", "borderWidth"], Ex = [{
xy: "x",
wh: "width",
index: 0,
posDesc: ["left", "right"]
}, {
xy: "y",
wh: "height",
index: 1,
posDesc: ["top", "bottom"]
}], ip = new Qr(), o6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = this.group, o = t.getData(), s = this._data, l = t.coordinateSystem, u = l.getBaseAxis(), f = u.isHorizontal(), h = l.master.getRect(), c = {
ecSize: {
width: a.getWidth(),
height: a.getHeight()
},
seriesModel: t,
coordSys: l,
coordSysExtent: [[h.x, h.x + h.width], [h.y, h.y + h.height]],
isHorizontal: f,
valueDim: Ex[+f],
categoryDim: Ex[1 - +f]
};
return o.diff(s).add(function(v) {
if (!!o.hasValue(v)) {
var p = Nx(o, v), d = Px(o, v, p, c), g = Rx(o, c, d);
o.setItemGraphicEl(v, g), i.add(g), Ox(g, c, d);
}
}).update(function(v, p) {
var d = s.getItemGraphicEl(p);
if (!o.hasValue(v)) {
i.remove(d);
return;
}
var g = Nx(o, v), y = Px(o, v, g, c), m = KL(o, y);
d && m !== d.__pictorialShapeStr && (i.remove(d), o.setItemGraphicEl(v, null), d = null), d ? v6(d, c, y) : d = Rx(o, c, y, !0), o.setItemGraphicEl(v, d), d.__pictorialSymbolMeta = y, i.add(d), Ox(d, c, y);
}).remove(function(v) {
var p = s.getItemGraphicEl(v);
p && kx(s, v, p.__pictorialSymbolMeta.animationModel, p);
}).execute(), this._data = o, this.group;
}, e.prototype.remove = function(t, n) {
var a = this.group, i = this._data;
t.get("animation") ? i && i.eachItemGraphicEl(function(o) {
kx(i, at(o).dataIndex, t, o);
}) : a.removeAll();
}, e.type = "pictorialBar", e;
}(Ot);
function Px(r, e, t, n) {
var a = r.getItemLayout(e), i = t.get("symbolRepeat"), o = t.get("symbolClip"), s = t.get("symbolPosition") || "start", l = t.get("symbolRotate"), u = (l || 0) * Math.PI / 180 || 0, f = t.get("symbolPatternSize") || 2, h = t.isAnimationEnabled(), c = {
dataIndex: e,
layout: a,
itemModel: t,
symbolType: r.getItemVisual(e, "symbol") || "circle",
style: r.getItemVisual(e, "style"),
symbolClip: o,
symbolRepeat: i,
symbolRepeatDirection: t.get("symbolRepeatDirection"),
symbolPatternSize: f,
rotation: u,
animationModel: h ? t : null,
hoverScale: h && t.get(["emphasis", "scale"]),
z2: t.getShallow("z", !0) || 0
};
s6(t, i, a, n, c), l6(r, e, a, i, o, c.boundingLength, c.pxSign, f, n, c), u6(t, c.symbolScale, u, n, c);
var v = c.symbolSize, p = Yo(t.get("symbolOffset"), v);
return f6(t, v, a, i, o, p, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c), c;
}
function s6(r, e, t, n, a) {
var i = n.valueDim, o = r.get("symbolBoundingData"), s = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), l = s.toGlobalCoord(s.dataToCoord(0)), u = 1 - +(t[i.wh] <= 0), f;
if (z(o)) {
var h = [op(s, o[0]) - l, op(s, o[1]) - l];
h[1] < h[0] && h.reverse(), f = h[u];
} else
o != null ? f = op(s, o) - l : e ? f = n.coordSysExtent[i.index][u] - l : f = t[i.wh];
a.boundingLength = f, e && (a.repeatCutLength = t[i.wh]), a.pxSign = f > 0 ? 1 : -1;
}
function op(r, e) {
return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)));
}
function l6(r, e, t, n, a, i, o, s, l, u) {
var f = l.valueDim, h = l.categoryDim, c = Math.abs(t[h.wh]), v = r.getItemVisual(e, "symbolSize"), p;
z(v) ? p = v.slice() : v == null ? p = ["100%", "100%"] : p = [v, v], p[h.index] = H(p[h.index], c), p[f.index] = H(p[f.index], n ? c : Math.abs(i)), u.symbolSize = p;
var d = u.symbolScale = [p[0] / s, p[1] / s];
d[f.index] *= (l.isHorizontal ? -1 : 1) * o;
}
function u6(r, e, t, n, a) {
var i = r.get(i6) || 0;
i && (ip.attr({
scaleX: e[0],
scaleY: e[1],
rotation: t
}), ip.updateTransform(), i /= ip.getLineScale(), i *= e[n.valueDim.index]), a.valueLineWidth = i || 0;
}
function f6(r, e, t, n, a, i, o, s, l, u, f, h) {
var c = f.categoryDim, v = f.valueDim, p = h.pxSign, d = Math.max(e[v.index] + s, 0), g = d;
if (n) {
var y = Math.abs(l), m = qt(r.get("symbolMargin"), "15%") + "", _ = !1;
m.lastIndexOf("!") === m.length - 1 && (_ = !0, m = m.slice(0, m.length - 1));
var S = H(m, e[v.index]), w = Math.max(d + S * 2, 0), x = _ ? 0 : S * 2, b = zg(n), T = b ? n : Vx((y + x) / w), D = y - T * d;
S = D / 2 / (_ ? T : Math.max(T - 1, 1)), w = d + S * 2, x = _ ? 0 : S * 2, !b && n !== "fixed" && (T = u ? Vx((Math.abs(u) + x) / w) : 0), g = T * w - x, h.repeatTimes = T, h.symbolMargin = S;
}
var A = p * (g / 2), M = h.pathPosition = [];
M[c.index] = t[c.wh] / 2, M[v.index] = o === "start" ? A : o === "end" ? l - A : l / 2, i && (M[0] += i[0], M[1] += i[1]);
var L = h.bundlePosition = [];
L[c.index] = t[c.xy], L[v.index] = t[v.xy];
var I = h.barRectShape = B({}, t);
I[v.wh] = p * Math.max(Math.abs(t[v.wh]), Math.abs(M[v.index] + A)), I[c.wh] = t[c.wh];
var E = h.clipShape = {};
E[c.xy] = -t[c.xy], E[c.wh] = f.ecSize[c.wh], E[v.xy] = 0, E[v.wh] = t[v.wh];
}
function UL(r) {
var e = r.symbolPatternSize, t = Jt(
r.symbolType,
-e / 2,
-e / 2,
e,
e
);
return t.attr({
culling: !0
}), t.type !== "image" && t.setStyle({
strokeNoScale: !0
}), t;
}
function YL(r, e, t, n) {
var a = r.__pictorialBundle, i = t.symbolSize, o = t.valueLineWidth, s = t.pathPosition, l = e.valueDim, u = t.repeatTimes || 0, f = 0, h = i[e.valueDim.index] + o + t.symbolMargin * 2;
for (im(r, function(d) {
d.__pictorialAnimationIndex = f, d.__pictorialRepeatTimes = u, f < u ? go(d, null, p(f), t, n) : go(d, null, {
scaleX: 0,
scaleY: 0
}, t, n, function() {
a.remove(d);
}), f++;
}); f < u; f++) {
var c = UL(t);
c.__pictorialAnimationIndex = f, c.__pictorialRepeatTimes = u, a.add(c);
var v = p(f);
go(c, {
x: v.x,
y: v.y,
scaleX: 0,
scaleY: 0
}, {
scaleX: v.scaleX,
scaleY: v.scaleY,
rotation: v.rotation
}, t, n);
}
function p(d) {
var g = s.slice(), y = t.pxSign, m = d;
return (t.symbolRepeatDirection === "start" ? y > 0 : y < 0) && (m = u - 1 - d), g[l.index] = h * (m - u / 2 + 0.5) + s[l.index], {
x: g[0],
y: g[1],
scaleX: t.symbolScale[0],
scaleY: t.symbolScale[1],
rotation: t.rotation
};
}
}
function ZL(r, e, t, n) {
var a = r.__pictorialBundle, i = r.__pictorialMainPath;
i ? go(i, null, {
x: t.pathPosition[0],
y: t.pathPosition[1],
scaleX: t.symbolScale[0],
scaleY: t.symbolScale[1],
rotation: t.rotation
}, t, n) : (i = r.__pictorialMainPath = UL(t), a.add(i), go(i, {
x: t.pathPosition[0],
y: t.pathPosition[1],
scaleX: 0,
scaleY: 0,
rotation: t.rotation
}, {
scaleX: t.symbolScale[0],
scaleY: t.symbolScale[1]
}, t, n));
}
function XL(r, e, t) {
var n = B({}, e.barRectShape), a = r.__pictorialBarRect;
a ? go(a, null, {
shape: n
}, e, t) : (a = r.__pictorialBarRect = new xt({
z2: 2,
shape: n,
silent: !0,
style: {
stroke: "transparent",
fill: "transparent",
lineWidth: 0
}
}), a.disableMorphing = !0, r.add(a));
}
function qL(r, e, t, n) {
if (t.symbolClip) {
var a = r.__pictorialClipPath, i = B({}, t.clipShape), o = e.valueDim, s = t.animationModel, l = t.dataIndex;
if (a)
bt(a, {
shape: i
}, s, l);
else {
i[o.wh] = 0, a = new xt({
shape: i
}), r.__pictorialBundle.setClipPath(a), r.__pictorialClipPath = a;
var u = {};
u[o.wh] = t.clipShape[o.wh], Nl[n ? "updateProps" : "initProps"](a, {
shape: u
}, s, l);
}
}
}
function Nx(r, e) {
var t = r.getItemModel(e);
return t.getAnimationDelayParams = h6, t.isAnimationEnabled = c6, t;
}
function h6(r) {
return {
index: r.__pictorialAnimationIndex,
count: r.__pictorialRepeatTimes
};
}
function c6() {
return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation");
}
function Rx(r, e, t, n) {
var a = new nt(), i = new nt();
return a.add(i), a.__pictorialBundle = i, i.x = t.bundlePosition[0], i.y = t.bundlePosition[1], t.symbolRepeat ? YL(a, e, t) : ZL(a, e, t), XL(a, t, n), qL(a, e, t, n), a.__pictorialShapeStr = KL(r, t), a.__pictorialSymbolMeta = t, a;
}
function v6(r, e, t) {
var n = t.animationModel, a = t.dataIndex, i = r.__pictorialBundle;
bt(i, {
x: t.bundlePosition[0],
y: t.bundlePosition[1]
}, n, a), t.symbolRepeat ? YL(r, e, t, !0) : ZL(r, e, t, !0), XL(r, t, !0), qL(r, e, t, !0);
}
function kx(r, e, t, n) {
var a = n.__pictorialBarRect;
a && a.removeTextContent();
var i = [];
im(n, function(o) {
i.push(o);
}), n.__pictorialMainPath && i.push(n.__pictorialMainPath), n.__pictorialClipPath && (t = null), C(i, function(o) {
ia(o, {
scaleX: 0,
scaleY: 0
}, t, e, function() {
n.parent && n.parent.remove(n);
});
}), r.setItemGraphicEl(e, null);
}
function KL(r, e) {
return [r.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":");
}
function im(r, e, t) {
C(r.__pictorialBundle.children(), function(n) {
n !== r.__pictorialBarRect && e.call(t, n);
});
}
function go(r, e, t, n, a, i) {
e && r.attr(e), n.symbolClip && !a ? t && r.attr(t) : t && Nl[a ? "updateProps" : "initProps"](r, t, n.animationModel, n.dataIndex, i);
}
function Ox(r, e, t) {
var n = t.dataIndex, a = t.itemModel, i = a.getModel("emphasis"), o = i.getModel("itemStyle").getItemStyle(), s = a.getModel(["blur", "itemStyle"]).getItemStyle(), l = a.getModel(["select", "itemStyle"]).getItemStyle(), u = a.getShallow("cursor"), f = i.get("focus"), h = i.get("blurScope"), c = i.get("scale");
im(r, function(d) {
if (d instanceof ve) {
var g = d.style;
d.useStyle(B({
image: g.image,
x: g.x,
y: g.y,
width: g.width,
height: g.height
}, t.style));
} else
d.useStyle(t.style);
var y = d.ensureState("emphasis");
y.style = o, c && (y.scaleX = d.scaleX * 1.1, y.scaleY = d.scaleY * 1.1), d.ensureState("blur").style = s, d.ensureState("select").style = l, u && (d.cursor = u), d.z2 = t.z2;
});
var v = e.valueDim.posDesc[+(t.boundingLength > 0)], p = r.__pictorialBarRect;
xe(p, se(a), {
labelFetcher: e.seriesModel,
labelDataIndex: n,
defaultText: Co(e.seriesModel.getData(), n),
inheritColor: t.style.fill,
defaultOpacity: t.style.opacity,
defaultOutsidePosition: v
}), Ut(r, f, h, i.get("disabled"));
}
function Vx(r) {
var e = Math.round(r);
return Math.abs(r - e) < 1e-4 ? e : Math.ceil(r);
}
const p6 = o6;
var d6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.hasSymbolVisual = !0, t.defaultSymbol = "roundRect", t;
}
return e.prototype.getInitialData = function(t) {
return t.stack = null, r.prototype.getInitialData.apply(this, arguments);
}, e.type = "series.pictorialBar", e.dependencies = ["grid"], e.defaultOption = va(Kf.defaultOption, {
symbol: "circle",
symbolSize: null,
symbolRotate: null,
symbolPosition: null,
symbolOffset: null,
symbolMargin: null,
symbolRepeat: !1,
symbolRepeatDirection: "end",
symbolClip: !1,
symbolBoundingData: null,
symbolPatternSize: 400,
barGap: "-100%",
progressive: 0,
emphasis: {
scale: !1
},
select: {
itemStyle: {
borderColor: "#212121"
}
}
}), e;
}(Kf);
const g6 = d6;
function y6(r) {
r.registerChartView(p6), r.registerSeriesModel(g6), r.registerLayout(r.PRIORITY.VISUAL.LAYOUT, it(PA, "pictorialBar")), r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, NA("pictorialBar"));
}
var m6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._layers = [], t;
}
return e.prototype.render = function(t, n, a) {
var i = t.getData(), o = this, s = this.group, l = t.getLayerSeries(), u = i.getLayout("layoutInfo"), f = u.rect, h = u.boundaryGap;
s.x = 0, s.y = f.y + h[0];
function c(g) {
return g.name;
}
var v = new wn(this._layersSeries || [], l, c, c), p = [];
v.add(Y(d, this, "add")).update(Y(d, this, "update")).remove(Y(d, this, "remove")).execute();
function d(g, y, m) {
var _ = o._layers;
if (g === "remove") {
s.remove(_[y]);
return;
}
for (var S = [], w = [], x, b = l[y].indices, T = 0; T < b.length; T++) {
var D = i.getItemLayout(b[T]), A = D.x, M = D.y0, L = D.y;
S.push(A, M), w.push(A, M + L), x = i.getItemVisual(b[T], "style");
}
var I, E = i.getItemLayout(b[0]), P = t.getModel("label"), N = P.get("margin"), O = t.getModel("emphasis");
if (g === "add") {
var k = p[y] = new nt();
I = new _M({
shape: {
points: S,
stackedOnPoints: w,
smooth: 0.4,
stackedOnSmooth: 0.4,
smoothConstraint: !1
},
z2: 0
}), k.add(I), s.add(k), t.isAnimationEnabled() && I.setClipPath(_6(I.getBoundingRect(), t, function() {
I.removeClipPath();
}));
} else {
var k = _[m];
I = k.childAt(0), s.add(k), p[y] = k, bt(I, {
shape: {
points: S,
stackedOnPoints: w
}
}, t), Lr(I);
}
xe(I, se(t), {
labelDataIndex: b[T - 1],
defaultText: i.getName(b[T - 1]),
inheritColor: x.fill
}, {
normal: {
verticalAlign: "middle"
}
}), I.setTextConfig({
position: null,
local: !0
});
var V = I.getTextContent();
V && (V.x = E.x - N, V.y = E.y0 + E.y / 2), I.useStyle(x), i.setItemGraphicEl(y, I), ce(I, t), Ut(I, O.get("focus"), O.get("blurScope"), O.get("disabled"));
}
this._layersSeries = l, this._layers = p;
}, e.type = "themeRiver", e;
}(Ot);
function _6(r, e, t) {
var n = new xt({
shape: {
x: r.x - 10,
y: r.y - 10,
width: 0,
height: r.height + 20
}
});
return Bt(n, {
shape: {
x: r.x - 50,
width: r.width + 100,
height: r.height + 20
}
}, e, t), n;
}
const S6 = m6;
var sp = 2, x6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t) {
r.prototype.init.apply(this, arguments), this.legendVisualProvider = new $l(Y(this.getData, this), Y(this.getRawData, this));
}, e.prototype.fixData = function(t) {
var n = t.length, a = {}, i = ud(t, function(c) {
return a.hasOwnProperty(c[0] + "") || (a[c[0] + ""] = -1), c[2];
}), o = [];
i.buckets.each(function(c, v) {
o.push({
name: v,
dataList: c
});
});
for (var s = o.length, l = 0; l < s; ++l) {
for (var u = o[l].name, f = 0; f < o[l].dataList.length; ++f) {
var h = o[l].dataList[f][0] + "";
a[h] = l;
}
for (var h in a)
a.hasOwnProperty(h) && a[h] !== l && (a[h] = l, t[n] = [h, 0, u], n++);
}
return t;
}, e.prototype.getInitialData = function(t, n) {
for (var a = this.getReferringComponents("singleAxis", Kt).models[0], i = a.get("type"), o = Et(t.data, function(p) {
return p[2] !== void 0;
}), s = this.fixData(o || []), l = [], u = this.nameMap = K(), f = 0, h = 0; h < s.length; ++h)
l.push(s[h][sp]), u.get(s[h][sp]) || (u.set(s[h][sp], f), f++);
var c = Ol(s, {
coordDimensions: ["single"],
dimensionsDefine: [{
name: "time",
type: Uf(i)
}, {
name: "value",
type: "float"
}, {
name: "name",
type: "ordinal"
}],
encodeDefine: {
single: 0,
value: 1,
itemName: 2
}
}).dimensions, v = new Ae(c, this);
return v.initData(s), v;
}, e.prototype.getLayerSeries = function() {
for (var t = this.getData(), n = t.count(), a = [], i = 0; i < n; ++i)
a[i] = i;
var o = t.mapDimension("single"), s = ud(a, function(u) {
return t.get("name", u);
}), l = [];
return s.buckets.each(function(u, f) {
u.sort(function(h, c) {
return t.get(o, h) - t.get(o, c);
}), l.push({
name: f,
indices: u
});
}), l;
}, e.prototype.getAxisTooltipData = function(t, n, a) {
z(t) || (t = t ? [t] : []);
for (var i = this.getData(), o = this.getLayerSeries(), s = [], l = o.length, u, f = 0; f < l; ++f) {
for (var h = Number.MAX_VALUE, c = -1, v = o[f].indices.length, p = 0; p < v; ++p) {
var d = i.get(t[0], o[f].indices[p]), g = Math.abs(d - n);
g <= h && (u = d, h = g, c = o[f].indices[p]);
}
s.push(c);
}
return {
dataIndices: s,
nestestValue: u
};
}, e.prototype.formatTooltip = function(t, n, a) {
var i = this.getData(), o = i.getName(t), s = i.get(i.mapDimension("value"), t);
return ae("nameValue", {
name: o,
value: s
});
}, e.type = "series.themeRiver", e.dependencies = ["singleAxis"], e.defaultOption = {
z: 2,
colorBy: "data",
coordinateSystem: "singleAxis",
boundaryGap: ["10%", "10%"],
singleAxisIndex: 0,
animationEasing: "linear",
label: {
margin: 4,
show: !0,
position: "left",
fontSize: 11
},
emphasis: {
label: {
show: !0
}
}
}, e;
}(Gt);
const w6 = x6;
function b6(r, e) {
r.eachSeriesByType("themeRiver", function(t) {
var n = t.getData(), a = t.coordinateSystem, i = {}, o = a.getRect();
i.rect = o;
var s = t.get("boundaryGap"), l = a.getAxis();
if (i.boundaryGap = s, l.orient === "horizontal") {
s[0] = H(s[0], o.height), s[1] = H(s[1], o.height);
var u = o.height - s[0] - s[1];
Bx(n, t, u);
} else {
s[0] = H(s[0], o.width), s[1] = H(s[1], o.width);
var f = o.width - s[0] - s[1];
Bx(n, t, f);
}
n.setLayout("layoutInfo", i);
});
}
function Bx(r, e, t) {
if (!!r.count())
for (var n = e.coordinateSystem, a = e.getLayerSeries(), i = r.mapDimension("single"), o = r.mapDimension("value"), s = G(a, function(g) {
return G(g.indices, function(y) {
var m = n.dataToPoint(r.get(i, y));
return m[1] = r.get(o, y), m;
});
}), l = T6(s), u = l.y0, f = t / l.max, h = a.length, c = a[0].indices.length, v, p = 0; p < c; ++p) {
v = u[p] * f, r.setItemLayout(a[0].indices[p], {
layerIndex: 0,
x: s[0][p][0],
y0: v,
y: s[0][p][1] * f
});
for (var d = 1; d < h; ++d)
v += s[d - 1][p][1] * f, r.setItemLayout(a[d].indices[p], {
layerIndex: d,
x: s[d][p][0],
y0: v,
y: s[d][p][1] * f
});
}
}
function T6(r) {
for (var e = r.length, t = r[0].length, n = [], a = [], i = 0, o = 0; o < t; ++o) {
for (var s = 0, l = 0; l < e; ++l)
s += r[l][o][1];
s > i && (i = s), n.push(s);
}
for (var u = 0; u < t; ++u)
a[u] = (i - n[u]) / 2;
i = 0;
for (var f = 0; f < t; ++f) {
var h = n[f] + a[f];
h > i && (i = h);
}
return {
y0: a,
max: i
};
}
function C6(r) {
r.registerChartView(S6), r.registerSeriesModel(w6), r.registerLayout(b6), r.registerProcessor(Hl("themeRiver"));
}
var D6 = 2, A6 = 4, M6 = function(r) {
R(e, r);
function e(t, n, a, i) {
var o = r.call(this) || this;
o.z2 = D6, o.textConfig = {
inside: !0
}, at(o).seriesIndex = n.seriesIndex;
var s = new Ct({
z2: A6,
silent: t.getModel().get(["label", "silent"])
});
return o.setTextContent(s), o.updateData(!0, t, n, a, i), o;
}
return e.prototype.updateData = function(t, n, a, i, o) {
this.node = n, n.piece = this, a = a || this._seriesModel, i = i || this._ecModel;
var s = this;
at(s).dataIndex = n.dataIndex;
var l = n.getModel(), u = l.getModel("emphasis"), f = n.getLayout(), h = B({}, f);
h.label = null;
var c = n.getVisual("style");
c.lineJoin = "bevel";
var v = n.getVisual("decal");
v && (c.decal = bo(v, o));
var p = lo(l.getModel("itemStyle"), h, !0);
B(h, p), C(Le, function(m) {
var _ = s.ensureState(m), S = l.getModel([m, "itemStyle"]);
_.style = S.getItemStyle();
var w = lo(S, h);
w && (_.shape = w);
}), t ? (s.setShape(h), s.shape.r = f.r0, bt(s, {
shape: {
r: f.r
}
}, a, n.dataIndex)) : (bt(s, {
shape: h
}, a), Lr(s)), s.useStyle(c), this._updateLabel(a);
var d = l.getShallow("cursor");
d && s.attr("cursor", d), this._seriesModel = a || this._seriesModel, this._ecModel = i || this._ecModel;
var g = u.get("focus"), y = g === "ancestor" ? n.getAncestorsIndices() : g === "descendant" ? n.getDescendantIndices() : g;
Ut(this, y, u.get("blurScope"), u.get("disabled"));
}, e.prototype._updateLabel = function(t) {
var n = this, a = this.node.getModel(), i = a.getModel("label"), o = this.node.getLayout(), s = o.endAngle - o.startAngle, l = (o.startAngle + o.endAngle) / 2, u = Math.cos(l), f = Math.sin(l), h = this, c = h.getTextContent(), v = this.node.dataIndex, p = i.get("minAngle") / 180 * Math.PI, d = i.get("show") && !(p != null && Math.abs(s) < p);
c.ignore = !d, C(al, function(y) {
var m = y === "normal" ? a.getModel("label") : a.getModel([y, "label"]), _ = y === "normal", S = _ ? c : c.ensureState(y), w = t.getFormattedLabel(v, y);
_ && (w = w || n.node.name), S.style = zt(m, {}, null, y !== "normal", !0), w && (S.style.text = w);
var x = m.get("show");
x != null && !_ && (S.ignore = !x);
var b = g(m, "position"), T = _ ? h : h.states[y], D = T.style.fill;
T.textConfig = {
outsideFill: m.get("color") === "inherit" ? D : null,
inside: b !== "outside"
};
var A, M = g(m, "distance") || 0, L = g(m, "align");
b === "outside" ? (A = o.r + M, L = l > Math.PI / 2 ? "right" : "left") : !L || L === "center" ? (s === 2 * Math.PI && o.r0 === 0 ? A = 0 : A = (o.r + o.r0) / 2, L = "center") : L === "left" ? (A = o.r0 + M, l > Math.PI / 2 && (L = "right")) : L === "right" && (A = o.r - M, l > Math.PI / 2 && (L = "left")), S.style.align = L, S.style.verticalAlign = g(m, "verticalAlign") || "middle", S.x = A * u + o.cx, S.y = A * f + o.cy;
var I = g(m, "rotate"), E = 0;
I === "radial" ? (E = -l, E < -Math.PI / 2 && (E += Math.PI)) : I === "tangential" ? (E = Math.PI / 2 - l, E > Math.PI / 2 ? E -= Math.PI : E < -Math.PI / 2 && (E += Math.PI)) : wt(I) && (E = I * Math.PI / 180), S.rotation = E;
});
function g(y, m) {
var _ = y.get(m);
return _ == null ? i.get(m) : _;
}
c.dirtyStyle();
}, e;
}(Ve);
const zx = M6;
var lg = "sunburstRootToNode", Gx = "sunburstHighlight", L6 = "sunburstUnhighlight";
function I6(r) {
r.registerAction({
type: lg,
update: "updateView"
}, function(e, t) {
t.eachComponent({
mainType: "series",
subType: "sunburst",
query: e
}, n);
function n(a, i) {
var o = yl(e, [lg], a);
if (o) {
var s = a.getViewRoot();
s && (e.direction = Yy(s, o.node) ? "rollUp" : "drillDown"), a.resetViewRoot(o.node);
}
}
}), r.registerAction({
type: Gx,
update: "none"
}, function(e, t, n) {
e = B({}, e), t.eachComponent({
mainType: "series",
subType: "sunburst",
query: e
}, a);
function a(i) {
var o = yl(e, [Gx], i);
o && (e.dataIndex = o.node.dataIndex);
}
process.env.NODE_ENV !== "production" && Xt("highlight", "sunburstHighlight"), n.dispatchAction(B(e, {
type: "highlight"
}));
}), r.registerAction({
type: L6,
update: "updateView"
}, function(e, t, n) {
e = B({}, e), process.env.NODE_ENV !== "production" && Xt("downplay", "sunburstUnhighlight"), n.dispatchAction(B(e, {
type: "downplay"
}));
});
}
var E6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a, i) {
var o = this;
this.seriesModel = t, this.api = a, this.ecModel = n;
var s = t.getData(), l = s.tree.root, u = t.getViewRoot(), f = this.group, h = t.get("renderLabelForZeroData"), c = [];
u.eachNode(function(m) {
c.push(m);
});
var v = this._oldChildren || [];
p(c, v), y(l, u), this._initEvents(), this._oldChildren = c;
function p(m, _) {
if (m.length === 0 && _.length === 0)
return;
new wn(_, m, S, S).add(w).update(w).remove(it(w, null)).execute();
function S(x) {
return x.getId();
}
function w(x, b) {
var T = x == null ? null : m[x], D = b == null ? null : _[b];
d(T, D);
}
}
function d(m, _) {
if (!h && m && !m.getValue() && (m = null), m !== l && _ !== l) {
if (_ && _.piece)
m ? (_.piece.updateData(!1, m, t, n, a), s.setItemGraphicEl(m.dataIndex, _.piece)) : g(_);
else if (m) {
var S = new zx(m, t, n, a);
f.add(S), s.setItemGraphicEl(m.dataIndex, S);
}
}
}
function g(m) {
!m || m.piece && (f.remove(m.piece), m.piece = null);
}
function y(m, _) {
_.depth > 0 ? (o.virtualPiece ? o.virtualPiece.updateData(!1, m, t, n, a) : (o.virtualPiece = new zx(m, t, n, a), f.add(o.virtualPiece)), _.piece.off("click"), o.virtualPiece.on("click", function(S) {
o._rootToNode(_.parentNode);
})) : o.virtualPiece && (f.remove(o.virtualPiece), o.virtualPiece = null);
}
}, e.prototype._initEvents = function() {
var t = this;
this.group.off("click"), this.group.on("click", function(n) {
var a = !1, i = t.seriesModel.getViewRoot();
i.eachNode(function(o) {
if (!a && o.piece && o.piece === n.target) {
var s = o.getModel().get("nodeClick");
if (s === "rootToNode")
t._rootToNode(o);
else if (s === "link") {
var l = o.getModel(), u = l.get("link");
if (u) {
var f = l.get("target", !0) || "_blank";
kf(u, f);
}
}
a = !0;
}
});
});
}, e.prototype._rootToNode = function(t) {
t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({
type: lg,
from: this.uid,
seriesId: this.seriesModel.id,
targetNode: t
});
}, e.prototype.containPoint = function(t, n) {
var a = n.getData(), i = a.getItemLayout(0);
if (i) {
var o = t[0] - i.cx, s = t[1] - i.cy, l = Math.sqrt(o * o + s * s);
return l <= i.r && l >= i.r0;
}
}, e.type = "sunburst", e;
}(Ot);
const P6 = E6;
var N6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.ignoreStyleOnData = !0, t;
}
return e.prototype.getInitialData = function(t, n) {
var a = {
name: t.name,
children: t.data
};
jL(a);
var i = this._levelModels = G(t.levels || [], function(l) {
return new kt(l, this, n);
}, this), o = Uy.createTree(a, this, s);
function s(l) {
l.wrapMethod("getItemModel", function(u, f) {
var h = o.getNodeByDataIndex(f), c = i[h.depth];
return c && (u.parentModel = c), u;
});
}
return o.data;
}, e.prototype.optionUpdated = function() {
this.resetViewRoot();
}, e.prototype.getDataParams = function(t) {
var n = r.prototype.getDataParams.apply(this, arguments), a = this.getData().tree.getNodeByDataIndex(t);
return n.treePathInfo = rc(a, this), n;
}, e.prototype.getLevelModel = function(t) {
return this._levelModels && this._levelModels[t.depth];
}, e.prototype.getViewRoot = function() {
return this._viewRoot;
}, e.prototype.resetViewRoot = function(t) {
t ? this._viewRoot = t : t = this._viewRoot;
var n = this.getRawData().tree.root;
(!t || t !== n && !n.contains(t)) && (this._viewRoot = n);
}, e.prototype.enableAriaDecal = function() {
tL(this);
}, e.type = "series.sunburst", e.defaultOption = {
z: 2,
center: ["50%", "50%"],
radius: [0, "75%"],
clockwise: !0,
startAngle: 90,
minAngle: 0,
stillShowZeroSum: !0,
nodeClick: "rootToNode",
renderLabelForZeroData: !1,
label: {
rotate: "radial",
show: !0,
opacity: 1,
align: "center",
position: "inside",
distance: 5,
silent: !0
},
itemStyle: {
borderWidth: 1,
borderColor: "white",
borderType: "solid",
shadowBlur: 0,
shadowColor: "rgba(0, 0, 0, 0.2)",
shadowOffsetX: 0,
shadowOffsetY: 0,
opacity: 1
},
emphasis: {
focus: "descendant"
},
blur: {
itemStyle: {
opacity: 0.2
},
label: {
opacity: 0.1
}
},
animationType: "expansion",
animationDuration: 1e3,
animationDurationUpdate: 500,
data: [],
sort: "desc"
}, e;
}(Gt);
function jL(r) {
var e = 0;
C(r.children, function(n) {
jL(n);
var a = n.value;
z(a) && (a = a[0]), e += a;
});
var t = r.value;
z(t) && (t = t[0]), (t == null || isNaN(t)) && (t = e), t < 0 && (t = 0), z(r.value) ? r.value[0] = t : r.value = t;
}
const R6 = N6;
var Fx = Math.PI / 180;
function k6(r, e, t) {
e.eachSeriesByType(r, function(n) {
var a = n.get("center"), i = n.get("radius");
z(i) || (i = [0, i]), z(a) || (a = [a, a]);
var o = t.getWidth(), s = t.getHeight(), l = Math.min(o, s), u = H(a[0], o), f = H(a[1], s), h = H(i[0], l / 2), c = H(i[1], l / 2), v = -n.get("startAngle") * Fx, p = n.get("minAngle") * Fx, d = n.getData().tree.root, g = n.getViewRoot(), y = g.depth, m = n.get("sort");
m != null && JL(g, m);
var _ = 0;
C(g.children, function(N) {
!isNaN(N.getValue()) && _++;
});
var S = g.getValue(), w = Math.PI / (S || _) * 2, x = g.depth > 0, b = g.height - (x ? -1 : 1), T = (c - h) / (b || 1), D = n.get("clockwise"), A = n.get("stillShowZeroSum"), M = D ? 1 : -1, L = function(N, O) {
if (!!N) {
var k = O;
if (N !== d) {
var V = N.getValue(), F = S === 0 && A ? w : V * w;
F < p && (F = p), k = O + M * F;
var $ = N.depth - y - (x ? -1 : 1), Z = h + T * $, et = h + T * ($ + 1), ht = n.getLevelModel(N);
if (ht) {
var Lt = ht.get("r0", !0), At = ht.get("r", !0), dt = ht.get("radius", !0);
dt != null && (Lt = dt[0], At = dt[1]), Lt != null && (Z = H(Lt, l / 2)), At != null && (et = H(At, l / 2));
}
N.setLayout({
angle: F,
startAngle: O,
endAngle: k,
clockwise: D,
cx: u,
cy: f,
r0: Z,
r: et
});
}
if (N.children && N.children.length) {
var rt = 0;
C(N.children, function(yt) {
rt += L(yt, O + rt);
});
}
return k - O;
}
};
if (x) {
var I = h, E = h + T, P = Math.PI * 2;
d.setLayout({
angle: P,
startAngle: v,
endAngle: v + P,
clockwise: D,
cx: u,
cy: f,
r0: I,
r: E
});
}
L(g, v);
});
}
function JL(r, e) {
var t = r.children || [];
r.children = O6(t, e), t.length && C(r.children, function(n) {
JL(n, e);
});
}
function O6(r, e) {
if (q(e)) {
var t = G(r, function(a, i) {
var o = a.getValue();
return {
params: {
depth: a.depth,
height: a.height,
dataIndex: a.dataIndex,
getValue: function() {
return o;
}
},
index: i
};
});
return t.sort(function(a, i) {
return e(a.params, i.params);
}), G(t, function(a) {
return r[a.index];
});
} else {
var n = e === "asc";
return r.sort(function(a, i) {
var o = (a.getValue() - i.getValue()) * (n ? 1 : -1);
return o === 0 ? (a.dataIndex - i.dataIndex) * (n ? -1 : 1) : o;
});
}
}
function V6(r) {
var e = {};
function t(n, a, i) {
for (var o = n; o && o.depth > 1; )
o = o.parentNode;
var s = a.getColorFromPalette(o.name || o.dataIndex + "", e);
return n.depth > 1 && W(s) && (s = Jp(s, (n.depth - 1) / (i - 1) * 0.5)), s;
}
r.eachSeriesByType("sunburst", function(n) {
var a = n.getData(), i = a.tree;
i.eachNode(function(o) {
var s = o.getModel(), l = s.getModel("itemStyle").getItemStyle();
l.fill || (l.fill = t(o, n, i.root.height));
var u = a.ensureUniqueItemVisual(o.dataIndex, "style");
B(u, l);
});
});
}
function B6(r) {
r.registerChartView(P6), r.registerSeriesModel(R6), r.registerLayout(it(k6, "sunburst")), r.registerProcessor(it(Hl, "sunburst")), r.registerVisual(V6), I6(r);
}
var Hx = {
color: "fill",
borderColor: "stroke"
}, z6 = {
symbol: 1,
symbolSize: 1,
symbolKeepAspect: 1,
legendIcon: 1,
visualMeta: 1,
liftZ: 1,
decal: 1
}, dn = Tt(), G6 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.optionUpdated = function() {
this.currentZLevel = this.get("zlevel", !0), this.currentZ = this.get("z", !0);
}, e.prototype.getInitialData = function(t, n) {
return An(null, this);
}, e.prototype.getDataParams = function(t, n, a) {
var i = r.prototype.getDataParams.call(this, t, n);
return a && (i.info = dn(a).info), i;
}, e.type = "series.custom", e.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"], e.defaultOption = {
coordinateSystem: "cartesian2d",
z: 2,
legendHoverLink: !0,
clip: !1
}, e;
}(Gt);
const F6 = G6;
function H6(r, e) {
return e = e || [0, 0], G(["x", "y"], function(t, n) {
var a = this.getAxis(t), i = e[n], o = r[n] / 2;
return a.type === "category" ? a.getBandWidth() : Math.abs(a.dataToCoord(i - o) - a.dataToCoord(i + o));
}, this);
}
function $6(r) {
var e = r.master.getRect();
return {
coordSys: {
type: "cartesian2d",
x: e.x,
y: e.y,
width: e.width,
height: e.height
},
api: {
coord: function(t) {
return r.dataToPoint(t);
},
size: Y(H6, r)
}
};
}
function W6(r, e) {
return e = e || [0, 0], G([0, 1], function(t) {
var n = e[t], a = r[t] / 2, i = [], o = [];
return i[t] = n - a, o[t] = n + a, i[1 - t] = o[1 - t] = e[1 - t], Math.abs(this.dataToPoint(i)[t] - this.dataToPoint(o)[t]);
}, this);
}
function U6(r) {
var e = r.getBoundingRect();
return {
coordSys: {
type: "geo",
x: e.x,
y: e.y,
width: e.width,
height: e.height,
zoom: r.getZoom()
},
api: {
coord: function(t) {
return r.dataToPoint(t);
},
size: Y(W6, r)
}
};
}
function Y6(r, e) {
var t = this.getAxis(), n = e instanceof Array ? e[0] : e, a = (r instanceof Array ? r[0] : r) / 2;
return t.type === "category" ? t.getBandWidth() : Math.abs(t.dataToCoord(n - a) - t.dataToCoord(n + a));
}
function Z6(r) {
var e = r.getRect();
return {
coordSys: {
type: "singleAxis",
x: e.x,
y: e.y,
width: e.width,
height: e.height
},
api: {
coord: function(t) {
return r.dataToPoint(t);
},
size: Y(Y6, r)
}
};
}
function X6(r, e) {
return e = e || [0, 0], G(["Radius", "Angle"], function(t, n) {
var a = "get" + t + "Axis", i = this[a](), o = e[n], s = r[n] / 2, l = i.type === "category" ? i.getBandWidth() : Math.abs(i.dataToCoord(o - s) - i.dataToCoord(o + s));
return t === "Angle" && (l = l * Math.PI / 180), l;
}, this);
}
function q6(r) {
var e = r.getRadiusAxis(), t = r.getAngleAxis(), n = e.getExtent();
return n[0] > n[1] && n.reverse(), {
coordSys: {
type: "polar",
cx: r.cx,
cy: r.cy,
r: n[1],
r0: n[0]
},
api: {
coord: function(a) {
var i = e.dataToRadius(a[0]), o = t.dataToAngle(a[1]), s = r.coordToPoint([i, o]);
return s.push(i, o * Math.PI / 180), s;
},
size: Y(X6, r)
}
};
}
function K6(r) {
var e = r.getRect(), t = r.getRangeInfo();
return {
coordSys: {
type: "calendar",
x: e.x,
y: e.y,
width: e.width,
height: e.height,
cellWidth: r.getCellWidth(),
cellHeight: r.getCellHeight(),
rangeInfo: {
start: t.start,
end: t.end,
weeks: t.weeks,
dayCount: t.allDay
}
},
api: {
coord: function(n, a) {
return r.dataToPoint(n, a);
}
}
};
}
var $x = {};
function QL(r, e, t, n) {
return r && (r.legacy || r.legacy !== !1 && !t && !n && e !== "tspan" && (e === "text" || U(r, "text")));
}
function tI(r, e, t) {
var n = r, a, i, o;
if (e === "text")
o = n;
else {
o = {}, U(n, "text") && (o.text = n.text), U(n, "rich") && (o.rich = n.rich), U(n, "textFill") && (o.fill = n.textFill), U(n, "textStroke") && (o.stroke = n.textStroke), U(n, "fontFamily") && (o.fontFamily = n.fontFamily), U(n, "fontSize") && (o.fontSize = n.fontSize), U(n, "fontStyle") && (o.fontStyle = n.fontStyle), U(n, "fontWeight") && (o.fontWeight = n.fontWeight), i = {
type: "text",
style: o,
silent: !0
}, a = {};
var s = U(n, "textPosition");
t ? a.position = s ? n.textPosition : "inside" : s && (a.position = n.textPosition), U(n, "textPosition") && (a.position = n.textPosition), U(n, "textOffset") && (a.offset = n.textOffset), U(n, "textRotation") && (a.rotation = n.textRotation), U(n, "textDistance") && (a.distance = n.textDistance);
}
return Wx(o, r), C(o.rich, function(l) {
Wx(l, l);
}), {
textConfig: a,
textContent: i
};
}
function Wx(r, e) {
!e || (e.font = e.textFont || e.font, U(e, "textStrokeWidth") && (r.lineWidth = e.textStrokeWidth), U(e, "textAlign") && (r.align = e.textAlign), U(e, "textVerticalAlign") && (r.verticalAlign = e.textVerticalAlign), U(e, "textLineHeight") && (r.lineHeight = e.textLineHeight), U(e, "textWidth") && (r.width = e.textWidth), U(e, "textHeight") && (r.height = e.textHeight), U(e, "textBackgroundColor") && (r.backgroundColor = e.textBackgroundColor), U(e, "textPadding") && (r.padding = e.textPadding), U(e, "textBorderColor") && (r.borderColor = e.textBorderColor), U(e, "textBorderWidth") && (r.borderWidth = e.textBorderWidth), U(e, "textBorderRadius") && (r.borderRadius = e.textBorderRadius), U(e, "textBoxShadowColor") && (r.shadowColor = e.textBoxShadowColor), U(e, "textBoxShadowBlur") && (r.shadowBlur = e.textBoxShadowBlur), U(e, "textBoxShadowOffsetX") && (r.shadowOffsetX = e.textBoxShadowOffsetX), U(e, "textBoxShadowOffsetY") && (r.shadowOffsetY = e.textBoxShadowOffsetY));
}
function Ux(r, e, t) {
var n = r;
n.textPosition = n.textPosition || t.position || "inside", t.offset != null && (n.textOffset = t.offset), t.rotation != null && (n.textRotation = t.rotation), t.distance != null && (n.textDistance = t.distance);
var a = n.textPosition.indexOf("inside") >= 0, i = r.fill || "#000";
Yx(n, e);
var o = n.textFill == null;
return a ? o && (n.textFill = t.insideFill || "#fff", !n.textStroke && t.insideStroke && (n.textStroke = t.insideStroke), !n.textStroke && (n.textStroke = i), n.textStrokeWidth == null && (n.textStrokeWidth = 2)) : (o && (n.textFill = r.fill || t.outsideFill || "#000"), !n.textStroke && t.outsideStroke && (n.textStroke = t.outsideStroke)), n.text = e.text, n.rich = e.rich, C(e.rich, function(s) {
Yx(s, s);
}), n;
}
function Yx(r, e) {
!e || (U(e, "fill") && (r.textFill = e.fill), U(e, "stroke") && (r.textStroke = e.fill), U(e, "lineWidth") && (r.textStrokeWidth = e.lineWidth), U(e, "font") && (r.font = e.font), U(e, "fontStyle") && (r.fontStyle = e.fontStyle), U(e, "fontWeight") && (r.fontWeight = e.fontWeight), U(e, "fontSize") && (r.fontSize = e.fontSize), U(e, "fontFamily") && (r.fontFamily = e.fontFamily), U(e, "align") && (r.textAlign = e.align), U(e, "verticalAlign") && (r.textVerticalAlign = e.verticalAlign), U(e, "lineHeight") && (r.textLineHeight = e.lineHeight), U(e, "width") && (r.textWidth = e.width), U(e, "height") && (r.textHeight = e.height), U(e, "backgroundColor") && (r.textBackgroundColor = e.backgroundColor), U(e, "padding") && (r.textPadding = e.padding), U(e, "borderColor") && (r.textBorderColor = e.borderColor), U(e, "borderWidth") && (r.textBorderWidth = e.borderWidth), U(e, "borderRadius") && (r.textBorderRadius = e.borderRadius), U(e, "shadowColor") && (r.textBoxShadowColor = e.shadowColor), U(e, "shadowBlur") && (r.textBoxShadowBlur = e.shadowBlur), U(e, "shadowOffsetX") && (r.textBoxShadowOffsetX = e.shadowOffsetX), U(e, "shadowOffsetY") && (r.textBoxShadowOffsetY = e.shadowOffsetY), U(e, "textShadowColor") && (r.textShadowColor = e.textShadowColor), U(e, "textShadowBlur") && (r.textShadowBlur = e.textShadowBlur), U(e, "textShadowOffsetX") && (r.textShadowOffsetX = e.textShadowOffsetX), U(e, "textShadowOffsetY") && (r.textShadowOffsetY = e.textShadowOffsetY));
}
function Zx(r, e) {
if (process.env.NODE_ENV !== "production") {
var t = r + "^_^" + e;
$x[t] || (console.warn('[ECharts] DEPRECATED: "' + r + '" has been deprecated. ' + e), $x[t] = !0);
}
}
var eI = {
position: ["x", "y"],
scale: ["scaleX", "scaleY"],
origin: ["originX", "originY"]
}, Xx = mt(eI), ah = Xr(Kr, function(r, e) {
return r[e] = 1, r;
}, {}), qx = Kr.join(", "), ih = ["", "style", "shape", "extra"], Mo = Tt();
function om(r, e, t, n, a) {
var i = r + "Animation", o = ko(r, n, a) || {}, s = Mo(e).userDuring;
return o.duration > 0 && (o.during = s ? Y(eU, {
el: e,
userDuring: s
}) : null, o.setToFinal = !0, o.scope = r), B(o, t[i]), o;
}
function cf(r, e, t, n) {
n = n || {};
var a = n.dataIndex, i = n.isInit, o = n.clearStyle, s = t.isAnimationEnabled(), l = Mo(r), u = e.style;
l.userDuring = e.during;
var f = {}, h = {};
if (nU(r, e, h), jx("shape", e, h), jx("extra", e, h), !i && s && (rU(r, e, f), Kx("shape", r, e, f), Kx("extra", r, e, f), aU(r, e, u, f)), h.style = u, j6(r, h, o), Q6(r, e), s)
if (i) {
var c = {};
C(ih, function(p) {
var d = p ? e[p] : e;
d && d.enterFrom && (p && (c[p] = c[p] || {}), B(p ? c[p] : c, d.enterFrom));
});
var v = om("enter", r, e, t, a);
v.duration > 0 && r.animateFrom(c, v);
} else
J6(r, e, a || 0, t, f);
rI(r, e), u ? r.dirty() : r.markRedraw();
}
function rI(r, e) {
for (var t = Mo(r).leaveToProps, n = 0; n < ih.length; n++) {
var a = ih[n], i = a ? e[a] : e;
i && i.leaveTo && (t || (t = Mo(r).leaveToProps = {}), a && (t[a] = t[a] || {}), B(a ? t[a] : t, i.leaveTo));
}
}
function ic(r, e, t, n) {
if (r) {
var a = r.parent, i = Mo(r).leaveToProps;
if (i) {
var o = om("update", r, e, t, 0);
o.done = function() {
a.remove(r), n && n();
}, r.animateTo(i, o);
} else
a.remove(r), n && n();
}
}
function ci(r) {
return r === "all";
}
function j6(r, e, t) {
var n = e.style;
if (!r.isGroup && n) {
if (t) {
r.useStyle({});
for (var a = r.animators, i = 0; i < a.length; i++) {
var o = a[i];
o.targetName === "style" && o.changeTarget(r.style);
}
}
r.setStyle(n);
}
e && (e.style = null, e && r.attr(e), e.style = n);
}
function J6(r, e, t, n, a) {
if (a) {
var i = om("update", r, e, n, t);
i.duration > 0 && r.animateFrom(a, i);
}
}
function Q6(r, e) {
U(e, "silent") && (r.silent = e.silent), U(e, "ignore") && (r.ignore = e.ignore), r instanceof cr && U(e, "invisible") && (r.invisible = e.invisible), r instanceof gt && U(e, "autoBatch") && (r.autoBatch = e.autoBatch);
}
var Vr = {}, tU = {
setTransform: function(r, e) {
return process.env.NODE_ENV !== "production" && Q(U(ah, r), "Only " + qx + " available in `setTransform`."), Vr.el[r] = e, this;
},
getTransform: function(r) {
return process.env.NODE_ENV !== "production" && Q(U(ah, r), "Only " + qx + " available in `getTransform`."), Vr.el[r];
},
setShape: function(r, e) {
process.env.NODE_ENV !== "production" && Xi(r);
var t = Vr.el, n = t.shape || (t.shape = {});
return n[r] = e, t.dirtyShape && t.dirtyShape(), this;
},
getShape: function(r) {
process.env.NODE_ENV !== "production" && Xi(r);
var e = Vr.el.shape;
if (e)
return e[r];
},
setStyle: function(r, e) {
process.env.NODE_ENV !== "production" && Xi(r);
var t = Vr.el, n = t.style;
return n && (process.env.NODE_ENV !== "production" && vi(e) && _e("style." + r + " must not be assigned with NaN."), n[r] = e, t.dirtyStyle && t.dirtyStyle()), this;
},
getStyle: function(r) {
process.env.NODE_ENV !== "production" && Xi(r);
var e = Vr.el.style;
if (e)
return e[r];
},
setExtra: function(r, e) {
process.env.NODE_ENV !== "production" && Xi(r);
var t = Vr.el.extra || (Vr.el.extra = {});
return t[r] = e, this;
},
getExtra: function(r) {
process.env.NODE_ENV !== "production" && Xi(r);
var e = Vr.el.extra;
if (e)
return e[r];
}
};
function Xi(r) {
if (process.env.NODE_ENV !== "production" && (r === "transition" || r === "enterFrom" || r === "leaveTo"))
throw new Error('key must not be "' + r + '"');
}
function eU() {
var r = this, e = r.el;
if (!!e) {
var t = Mo(e).userDuring, n = r.userDuring;
if (t !== n) {
r.el = r.userDuring = null;
return;
}
Vr.el = e, n(tU);
}
}
function Kx(r, e, t, n) {
var a = t[r];
if (!!a) {
var i = e[r], o;
if (i) {
var s = t.transition, l = a.transition;
if (l)
if (!o && (o = n[r] = {}), ci(l))
B(o, i);
else
for (var u = Pt(l), f = 0; f < u.length; f++) {
var h = u[f], c = i[h];
o[h] = c;
}
else if (ci(s) || ct(s, r) >= 0) {
!o && (o = n[r] = {});
for (var v = mt(i), f = 0; f < v.length; f++) {
var h = v[f], c = i[h];
iU(a[h], c) && (o[h] = c);
}
}
}
}
}
function jx(r, e, t) {
var n = e[r];
if (!!n)
for (var a = t[r] = {}, i = mt(n), o = 0; o < i.length; o++) {
var s = i[o];
a[s] = Gs(n[s]);
}
}
function rU(r, e, t) {
for (var n = e.transition, a = ci(n) ? Kr : Pt(n || []), i = 0; i < a.length; i++) {
var o = a[i];
if (!(o === "style" || o === "shape" || o === "extra")) {
var s = r[o];
process.env.NODE_ENV !== "production" && nI(o, "el.transition"), t[o] = s;
}
}
}
function nU(r, e, t) {
for (var n = 0; n < Xx.length; n++) {
var a = Xx[n], i = eI[a], o = e[a];
o && (t[i[0]] = o[0], t[i[1]] = o[1]);
}
for (var n = 0; n < Kr.length; n++) {
var s = Kr[n];
e[s] != null && (t[s] = e[s]);
}
}
function aU(r, e, t, n) {
if (!!t) {
var a = r.style, i;
if (a) {
var o = t.transition, s = e.transition;
if (o && !ci(o)) {
var l = Pt(o);
!i && (i = n.style = {});
for (var u = 0; u < l.length; u++) {
var f = l[u], h = a[f];
i[f] = h;
}
} else if (r.getAnimationStyleProps && (ci(s) || ci(o) || ct(s, "style") >= 0)) {
var c = r.getAnimationStyleProps(), v = c ? c.style : null;
if (v) {
!i && (i = n.style = {});
for (var p = mt(t), u = 0; u < p.length; u++) {
var f = p[u];
if (v[f]) {
var h = a[f];
i[f] = h;
}
}
}
}
}
}
}
function iU(r, e) {
return me(r) ? r !== e : r != null && isFinite(r);
}
var nI;
process.env.NODE_ENV !== "production" && (nI = function(r, e) {
U(ah, r) || _e("Prop `" + r + "` is not a permitted in `" + e + "`. Only `" + mt(ah).join("`, `") + "` are permitted.");
});
var aI = Tt(), oU = ["percent", "easing", "shape", "style", "extra"];
function iI(r) {
r.stopAnimation("keyframe"), r.attr(aI(r));
}
function oh(r, e, t) {
if (!(!t.isAnimationEnabled() || !e)) {
if (z(e)) {
C(e, function(s) {
oh(r, s, t);
});
return;
}
var n = e.keyframes, a = e.duration;
if (t && a == null) {
var i = ko("enter", t, 0);
a = i && i.duration;
}
if (!(!n || !a)) {
var o = aI(r);
C(ih, function(s) {
if (!(s && !r[s])) {
var l, u = !1;
n.sort(function(f, h) {
return f.percent - h.percent;
}), C(n, function(f) {
var h = r.animators, c = s ? f[s] : f;
if (process.env.NODE_ENV !== "production" && f.percent >= 1 && (u = !0), !!c) {
var v = mt(c);
if (s || (v = Et(v, function(g) {
return ct(oU, g) < 0;
})), !!v.length) {
l || (l = r.animate(s, e.loop, !0), l.scope = "keyframe");
for (var p = 0; p < h.length; p++)
h[p] !== l && h[p].targetName === l.targetName && h[p].stopTracks(v);
s && (o[s] = o[s] || {});
var d = s ? o[s] : o;
C(v, function(g) {
d[g] = ((s ? r[s] : r) || {})[g];
}), l.whenWithKeys(a * f.percent, c, v, f.easing);
}
}
}), l && (process.env.NODE_ENV !== "production" && (u || _e("End frame with percent: 1 is missing in the keyframeAnimation.", !0)), l.delay(e.delay || 0).duration(a).start(e.easing));
}
});
}
}
}
var gn = "emphasis", jn = "normal", sm = "blur", lm = "select", fa = [jn, gn, sm, lm], lp = {
normal: ["itemStyle"],
emphasis: [gn, "itemStyle"],
blur: [sm, "itemStyle"],
select: [lm, "itemStyle"]
}, up = {
normal: ["label"],
emphasis: [gn, "label"],
blur: [sm, "label"],
select: [lm, "label"]
}, sU = ["x", "y"], lU = "e\0\0", Je = {
normal: {},
emphasis: {},
blur: {},
select: {}
}, Jx = {
cartesian2d: $6,
geo: U6,
single: Z6,
polar: q6,
calendar: K6
};
function sh(r) {
return r instanceof gt;
}
function ug(r) {
return r instanceof cr;
}
function uU(r, e) {
e.copyTransform(r), ug(e) && ug(r) && (e.setStyle(r.style), e.z = r.z, e.z2 = r.z2, e.zlevel = r.zlevel, e.invisible = r.invisible, e.ignore = r.ignore, sh(e) && sh(r) && e.setShape(r.shape));
}
var fU = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a, i) {
this._progressiveEls = null;
var o = this._data, s = t.getData(), l = this.group, u = Qx(t, s, n, a);
o || l.removeAll(), s.diff(o).add(function(h) {
fp(a, null, h, u(h, i), t, l, s);
}).remove(function(h) {
var c = o.getItemGraphicEl(h);
ic(c, dn(c).option, t);
}).update(function(h, c) {
var v = o.getItemGraphicEl(c);
fp(a, v, h, u(h, i), t, l, s);
}).execute();
var f = t.get("clip", !0) ? Qh(t.coordinateSystem, !1, t) : null;
f ? l.setClipPath(f) : l.removeClipPath(), this._data = s;
}, e.prototype.incrementalPrepareRender = function(t, n, a) {
this.group.removeAll(), this._data = null;
}, e.prototype.incrementalRender = function(t, n, a, i, o) {
var s = n.getData(), l = Qx(n, s, a, i), u = this._progressiveEls = [];
function f(v) {
v.isGroup || (v.incremental = !0, v.ensureState("emphasis").hoverLayer = !0);
}
for (var h = t.start; h < t.end; h++) {
var c = fp(null, null, h, l(h, o), n, this.group, s);
c && (c.traverse(f), u.push(c));
}
}, e.prototype.eachRendered = function(t) {
ca(this._progressiveEls || this.group, t);
}, e.prototype.filterForExposedEvent = function(t, n, a, i) {
var o = n.element;
if (o == null || a.name === o)
return !0;
for (; (a = a.__hostTarget || a.parent) && a !== this.group; )
if (a.name === o)
return !0;
return !1;
}, e.type = "custom", e;
}(Ot);
const hU = fU;
function um(r) {
var e = r.type, t;
if (e === "path") {
var n = r.shape, a = n.width != null && n.height != null ? {
x: n.x || 0,
y: n.y || 0,
width: n.width,
height: n.height
} : null, i = lI(n);
t = kh(i, null, a, n.layout || "center"), dn(t).customPathData = i;
} else if (e === "image")
t = new ve({}), dn(t).customImagePath = r.style.image;
else if (e === "text")
t = new Ct({});
else if (e === "group")
t = new nt();
else {
if (e === "compoundPath")
throw new Error('"compoundPath" is not supported yet.');
var o = ty(e);
if (!o) {
var s = "";
process.env.NODE_ENV !== "production" && (s = 'graphic type "' + e + '" can not be found.'), Mt(s);
}
t = new o();
}
return dn(t).customGraphicType = e, t.name = r.name, t.z2EmphasisLift = 1, t.z2SelectLift = 1, t;
}
function fm(r, e, t, n, a, i, o) {
iI(e);
var s = a && a.normal.cfg;
s && e.setTextConfig(s), n && n.transition == null && (n.transition = sU);
var l = n && n.style;
if (l) {
if (e.type === "text") {
var u = l;
U(u, "textFill") && (u.fill = u.textFill), U(u, "textStroke") && (u.stroke = u.textStroke);
}
var f = void 0, h = sh(e) ? l.decal : null;
r && h && (h.dirty = !0, f = bo(h, r)), l.__decalPattern = f;
}
if (ug(e) && l) {
var f = l.__decalPattern;
f && (l.decal = f);
}
cf(e, n, i, {
dataIndex: t,
isInit: o,
clearStyle: !0
}), oh(e, n.keyframeAnimation, i);
}
function oI(r, e, t, n, a) {
var i = e.isGroup ? null : e, o = a && a[r].cfg;
if (i) {
var s = i.ensureState(r);
if (n === !1) {
var l = i.getState(r);
l && (l.style = null);
} else
s.style = n || null;
o && (s.textConfig = o), yi(i);
}
}
function cU(r, e, t) {
if (!r.isGroup) {
var n = r, a = t.currentZ, i = t.currentZLevel;
n.z = a, n.zlevel = i;
var o = e.z2;
o != null && (n.z2 = o || 0);
for (var s = 0; s < fa.length; s++)
vU(n, e, fa[s]);
}
}
function vU(r, e, t) {
var n = t === jn, a = n ? e : lh(e, t), i = a ? a.z2 : null, o;
i != null && (o = n ? r : r.ensureState(t), o.z2 = i || 0);
}
function Qx(r, e, t, n) {
var a = r.get("renderItem"), i = r.coordinateSystem, o = {};
i && (process.env.NODE_ENV !== "production" && (Q(a, "series.render is required."), Q(i.prepareCustoms || Jx[i.type], "This coordSys does not support custom series.")), o = i.prepareCustoms ? i.prepareCustoms(i) : Jx[i.type](i));
for (var s = J({
getWidth: n.getWidth,
getHeight: n.getHeight,
getZr: n.getZr,
getDevicePixelRatio: n.getDevicePixelRatio,
value: S,
style: x,
ordinalRawValue: w,
styleEmphasis: b,
visual: A,
barLayout: M,
currentSeriesIndices: L,
font: I
}, o.api || {}), l = {
context: {},
seriesId: r.id,
seriesName: r.name,
seriesIndex: r.seriesIndex,
coordSys: o.coordSys,
dataInsideLength: e.count(),
encode: pU(r.getData())
}, u, f, h = {}, c = {}, v = {}, p = {}, d = 0; d < fa.length; d++) {
var g = fa[d];
v[g] = r.getModel(lp[g]), p[g] = r.getModel(up[g]);
}
function y(E) {
return E === u ? f || (f = e.getItemModel(E)) : e.getItemModel(E);
}
function m(E, P) {
return e.hasItemOption ? E === u ? h[P] || (h[P] = y(E).getModel(lp[P])) : y(E).getModel(lp[P]) : v[P];
}
function _(E, P) {
return e.hasItemOption ? E === u ? c[P] || (c[P] = y(E).getModel(up[P])) : y(E).getModel(up[P]) : p[P];
}
return function(E, P) {
return u = E, f = null, h = {}, c = {}, a && a(J({
dataIndexInside: E,
dataIndex: e.getRawIndex(E),
actionType: P ? P.type : null
}, l), s);
};
function S(E, P) {
return P == null && (P = u), e.getStore().get(e.getDimensionIndex(E || 0), P);
}
function w(E, P) {
P == null && (P = u), E = E || 0;
var N = e.getDimensionInfo(E);
if (!N) {
var O = e.getDimensionIndex(E);
return O >= 0 ? e.getStore().get(O, P) : void 0;
}
var k = e.get(N.name, P), V = N && N.ordinalMeta;
return V ? V.categories[k] : k;
}
function x(E, P) {
process.env.NODE_ENV !== "production" && Zx("api.style", "Please write literal style directly instead."), P == null && (P = u);
var N = e.getItemVisual(P, "style"), O = N && N.fill, k = N && N.opacity, V = m(P, jn).getItemStyle();
O != null && (V.fill = O), k != null && (V.opacity = k);
var F = {
inheritColor: W(O) ? O : "#000"
}, $ = _(P, jn), Z = zt($, null, F, !1, !0);
Z.text = $.getShallow("show") ? vt(r.getFormattedLabel(P, jn), Co(e, P)) : null;
var et = Nf($, F, !1);
return D(E, V), V = Ux(V, Z, et), E && T(V, E), V.legacy = !0, V;
}
function b(E, P) {
process.env.NODE_ENV !== "production" && Zx("api.styleEmphasis", "Please write literal style directly instead."), P == null && (P = u);
var N = m(P, gn).getItemStyle(), O = _(P, gn), k = zt(O, null, null, !0, !0);
k.text = O.getShallow("show") ? Tr(r.getFormattedLabel(P, gn), r.getFormattedLabel(P, jn), Co(e, P)) : null;
var V = Nf(O, null, !0);
return D(E, N), N = Ux(N, k, V), E && T(N, E), N.legacy = !0, N;
}
function T(E, P) {
for (var N in P)
U(P, N) && (E[N] = P[N]);
}
function D(E, P) {
E && (E.textFill && (P.textFill = E.textFill), E.textPosition && (P.textPosition = E.textPosition));
}
function A(E, P) {
if (P == null && (P = u), U(Hx, E)) {
var N = e.getItemVisual(P, "style");
return N ? N[Hx[E]] : null;
}
if (U(z6, E))
return e.getItemVisual(P, E);
}
function M(E) {
if (i.type === "cartesian2d") {
var P = i.getBaseAxis();
return yB(J({
axis: P
}, E));
}
}
function L() {
return t.getCurrentSeriesIndices();
}
function I(E) {
return GC(E, t);
}
}
function pU(r) {
var e = {};
return C(r.dimensions, function(t) {
var n = r.getDimensionInfo(t);
if (!n.isExtraCoord) {
var a = n.coordDim, i = e[a] = e[a] || [];
i[n.coordDimIndex] = r.getDimensionIndex(t);
}
}), e;
}
function fp(r, e, t, n, a, i, o) {
if (!n) {
i.remove(e);
return;
}
var s = hm(r, e, t, n, a, i);
return s && o.setItemGraphicEl(t, s), s && Ut(s, n.focus, n.blurScope, n.emphasisDisabled), s;
}
function hm(r, e, t, n, a, i) {
process.env.NODE_ENV !== "production" && Q(n, "should not have an null/undefined element setting");
var o = -1, s = e;
e && sI(e, n, a) && (o = ct(i.childrenRef(), e), e = null);
var l = !e, u = e;
u ? u.clearStates() : (u = um(n), s && uU(s, u)), n.morph === !1 ? u.disableMorphing = !0 : u.disableMorphing && (u.disableMorphing = !1), Je.normal.cfg = Je.normal.conOpt = Je.emphasis.cfg = Je.emphasis.conOpt = Je.blur.cfg = Je.blur.conOpt = Je.select.cfg = Je.select.conOpt = null, Je.isLegacy = !1, gU(u, t, n, a, l, Je), dU(u, t, n, a, l), fm(r, u, t, n, Je, a, l), U(n, "info") && (dn(u).info = n.info);
for (var f = 0; f < fa.length; f++) {
var h = fa[f];
if (h !== jn) {
var c = lh(n, h), v = cm(n, c, h);
oI(h, u, c, v, Je);
}
}
return cU(u, n, a), n.type === "group" && yU(r, u, t, n, a), o >= 0 ? i.replaceAt(u, o) : i.add(u), u;
}
function sI(r, e, t) {
var n = dn(r), a = e.type, i = e.shape, o = e.style;
return t.isUniversalTransitionEnabled() || a != null && a !== n.customGraphicType || a === "path" && SU(i) && lI(i) !== n.customPathData || a === "image" && U(o, "image") && o.image !== n.customImagePath;
}
function dU(r, e, t, n, a) {
var i = t.clipPath;
if (i === !1)
r && r.getClipPath() && r.removeClipPath();
else if (i) {
var o = r.getClipPath();
o && sI(o, i, n) && (o = null), o || (o = um(i), process.env.NODE_ENV !== "production" && Q(sh(o), "Only any type of `path` can be used in `clipPath`, rather than " + o.type + "."), r.setClipPath(o)), fm(null, o, e, i, null, n, a);
}
}
function gU(r, e, t, n, a, i) {
if (!r.isGroup) {
tw(t, null, i), tw(t, gn, i);
var o = i.normal.conOpt, s = i.emphasis.conOpt, l = i.blur.conOpt, u = i.select.conOpt;
if (o != null || s != null || u != null || l != null) {
var f = r.getTextContent();
if (o === !1)
f && r.removeTextContent();
else {
o = i.normal.conOpt = o || {
type: "text"
}, f ? f.clearStates() : (f = um(o), r.setTextContent(f)), fm(null, f, e, o, null, n, a);
for (var h = o && o.style, c = 0; c < fa.length; c++) {
var v = fa[c];
if (v !== jn) {
var p = i[v].conOpt;
oI(v, f, p, cm(o, p, v), null);
}
}
h ? f.dirty() : f.markRedraw();
}
}
}
}
function tw(r, e, t) {
var n = e ? lh(r, e) : r, a = e ? cm(r, n, gn) : r.style, i = r.type, o = n ? n.textConfig : null, s = r.textContent, l = s ? e ? lh(s, e) : s : null;
if (a && (t.isLegacy || QL(a, i, !!o, !!l))) {
t.isLegacy = !0;
var u = tI(a, i, !e);
!o && u.textConfig && (o = u.textConfig), !l && u.textContent && (l = u.textContent);
}
if (!e && l) {
var f = l;
!f.type && (f.type = "text"), process.env.NODE_ENV !== "production" && Q(f.type === "text", 'textContent.type must be "text"');
}
var h = e ? t[e] : t.normal;
h.cfg = o, h.conOpt = l;
}
function lh(r, e) {
return e ? r ? r[e] : null : r;
}
function cm(r, e, t) {
var n = e && e.style;
return n == null && t === gn && r && (n = r.styleEmphasis), n;
}
function yU(r, e, t, n, a) {
var i = n.children, o = i ? i.length : 0, s = n.$mergeChildren, l = s === "byName" || n.diffChildrenByName, u = s === !1;
if (!(!o && !l && !u)) {
if (l) {
mU({
api: r,
oldChildren: e.children() || [],
newChildren: i || [],
dataIndex: t,
seriesModel: a,
group: e
});
return;
}
u && e.removeAll();
for (var f = 0; f < o; f++)
i[f] && hm(r, e.childAt(f), t, i[f], a, e);
for (var h = e.childCount() - 1; h >= f; h--) {
var c = e.childAt(h);
ic(c, dn(e).option, a);
}
}
}
function mU(r) {
new wn(r.oldChildren, r.newChildren, ew, ew, r).add(rw).update(rw).remove(_U).execute();
}
function ew(r, e) {
var t = r && r.name;
return t != null ? t : lU + e;
}
function rw(r, e) {
var t = this.context, n = r != null ? t.newChildren[r] : null, a = e != null ? t.oldChildren[e] : null;
hm(t.api, a, t.dataIndex, n, t.seriesModel, t.group);
}
function _U(r) {
var e = this.context, t = e.oldChildren[r];
ic(t, dn(t).option, e.seriesModel);
}
function lI(r) {
return r && (r.pathData || r.d);
}
function SU(r) {
return r && (U(r, "pathData") || U(r, "d"));
}
function xU(r) {
r.registerChartView(hU), r.registerSeriesModel(F6);
}
var Ka = Tt(), nw = tt, hp = Y, wU = function() {
function r() {
this._dragging = !1, this.animationThreshold = 15;
}
return r.prototype.render = function(e, t, n, a) {
var i = t.get("value"), o = t.get("status");
if (this._axisModel = e, this._axisPointerModel = t, this._api = n, !(!a && this._lastValue === i && this._lastStatus === o)) {
this._lastValue = i, this._lastStatus = o;
var s = this._group, l = this._handle;
if (!o || o === "hide") {
s && s.hide(), l && l.hide();
return;
}
s && s.show(), l && l.show();
var u = {};
this.makeElOption(u, i, e, t, n);
var f = u.graphicKey;
f !== this._lastGraphicKey && this.clear(n), this._lastGraphicKey = f;
var h = this._moveAnimation = this.determineAnimation(e, t);
if (!s)
s = this._group = new nt(), this.createPointerEl(s, u, e, t), this.createLabelEl(s, u, e, t), n.getZr().add(s);
else {
var c = it(aw, t, h);
this.updatePointerEl(s, u, c), this.updateLabelEl(s, u, c, t);
}
ow(s, t, !0), this._renderHandle(i);
}
}, r.prototype.remove = function(e) {
this.clear(e);
}, r.prototype.dispose = function(e) {
this.clear(e);
}, r.prototype.determineAnimation = function(e, t) {
var n = t.get("animation"), a = e.axis, i = a.type === "category", o = t.get("snap");
if (!o && !i)
return !1;
if (n === "auto" || n == null) {
var s = this.animationThreshold;
if (i && a.getBandWidth() > s)
return !0;
if (o) {
var l = By(e).seriesDataCount, u = a.getExtent();
return Math.abs(u[0] - u[1]) / l > s;
}
return !1;
}
return n === !0;
}, r.prototype.makeElOption = function(e, t, n, a, i) {
}, r.prototype.createPointerEl = function(e, t, n, a) {
var i = t.pointer;
if (i) {
var o = Ka(e).pointerEl = new Nl[i.type](nw(t.pointer));
e.add(o);
}
}, r.prototype.createLabelEl = function(e, t, n, a) {
if (t.label) {
var i = Ka(e).labelEl = new Ct(nw(t.label));
e.add(i), iw(i, a);
}
}, r.prototype.updatePointerEl = function(e, t, n) {
var a = Ka(e).pointerEl;
a && t.pointer && (a.setStyle(t.pointer.style), n(a, {
shape: t.pointer.shape
}));
}, r.prototype.updateLabelEl = function(e, t, n, a) {
var i = Ka(e).labelEl;
i && (i.setStyle(t.label.style), n(i, {
x: t.label.x,
y: t.label.y
}), iw(i, a));
}, r.prototype._renderHandle = function(e) {
if (!(this._dragging || !this.updateHandleTransform)) {
var t = this._axisPointerModel, n = this._api.getZr(), a = this._handle, i = t.getModel("handle"), o = t.get("status");
if (!i.get("show") || !o || o === "hide") {
a && n.remove(a), this._handle = null;
return;
}
var s;
this._handle || (s = !0, a = this._handle = Pl(i.get("icon"), {
cursor: "move",
draggable: !0,
onmousemove: function(u) {
mn(u.event);
},
onmousedown: hp(this._onHandleDragMove, this, 0, 0),
drift: hp(this._onHandleDragMove, this),
ondragend: hp(this._onHandleDragEnd, this)
}), n.add(a)), ow(a, t, !1), a.setStyle(i.getItemStyle(null, ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]));
var l = i.get("size");
z(l) || (l = [l, l]), a.scaleX = l[0] / 2, a.scaleY = l[1] / 2, Uo(this, "_doDispatchAxisPointer", i.get("throttle") || 0, "fixRate"), this._moveHandleToValue(e, s);
}
}, r.prototype._moveHandleToValue = function(e, t) {
aw(this._axisPointerModel, !t && this._moveAnimation, this._handle, cp(this.getHandleTransform(e, this._axisModel, this._axisPointerModel)));
}, r.prototype._onHandleDragMove = function(e, t) {
var n = this._handle;
if (!!n) {
this._dragging = !0;
var a = this.updateHandleTransform(cp(n), [e, t], this._axisModel, this._axisPointerModel);
this._payloadInfo = a, n.stopAnimation(), n.attr(cp(a)), Ka(n).lastProp = null, this._doDispatchAxisPointer();
}
}, r.prototype._doDispatchAxisPointer = function() {
var e = this._handle;
if (!!e) {
var t = this._payloadInfo, n = this._axisModel;
this._api.dispatchAction({
type: "updateAxisPointer",
x: t.cursorPoint[0],
y: t.cursorPoint[1],
tooltipOption: t.tooltipOption,
axesInfo: [{
axisDim: n.axis.dim,
axisIndex: n.componentIndex
}]
});
}
}, r.prototype._onHandleDragEnd = function() {
this._dragging = !1;
var e = this._handle;
if (!!e) {
var t = this._axisPointerModel.get("value");
this._moveHandleToValue(t), this._api.dispatchAction({
type: "hideTip"
});
}
}, r.prototype.clear = function(e) {
this._lastValue = null, this._lastStatus = null;
var t = e.getZr(), n = this._group, a = this._handle;
t && n && (this._lastGraphicKey = null, n && t.remove(n), a && t.remove(a), this._group = null, this._handle = null, this._payloadInfo = null), fl(this, "_doDispatchAxisPointer");
}, r.prototype.doClear = function() {
}, r.prototype.buildLabel = function(e, t, n) {
return n = n || 0, {
x: e[n],
y: e[1 - n],
width: t[n],
height: t[1 - n]
};
}, r;
}();
function aw(r, e, t, n) {
uI(Ka(t).lastProp, n) || (Ka(t).lastProp = n, e ? bt(t, n, r) : (t.stopAnimation(), t.attr(n)));
}
function uI(r, e) {
if (j(r) && j(e)) {
var t = !0;
return C(e, function(n, a) {
t = t && uI(r[a], n);
}), !!t;
} else
return r === e;
}
function iw(r, e) {
r[e.get(["label", "show"]) ? "show" : "hide"]();
}
function cp(r) {
return {
x: r.x || 0,
y: r.y || 0,
rotation: r.rotation || 0
};
}
function ow(r, e, t) {
var n = e.get("z"), a = e.get("zlevel");
r && r.traverse(function(i) {
i.type !== "group" && (n != null && (i.z = n), a != null && (i.zlevel = a), i.silent = t);
});
}
const vm = wU;
function pm(r) {
var e = r.get("type"), t = r.getModel(e + "Style"), n;
return e === "line" ? (n = t.getLineStyle(), n.fill = null) : e === "shadow" && (n = t.getAreaStyle(), n.stroke = null), n;
}
function fI(r, e, t, n, a) {
var i = t.get("value"), o = hI(i, e.axis, e.ecModel, t.get("seriesDataIndices"), {
precision: t.get(["label", "precision"]),
formatter: t.get(["label", "formatter"])
}), s = t.getModel("label"), l = zo(s.get("padding") || 0), u = s.getFont(), f = Al(o, u), h = a.position, c = f.width + l[1] + l[3], v = f.height + l[0] + l[2], p = a.align;
p === "right" && (h[0] -= c), p === "center" && (h[0] -= c / 2);
var d = a.verticalAlign;
d === "bottom" && (h[1] -= v), d === "middle" && (h[1] -= v / 2), bU(h, c, v, n);
var g = s.get("backgroundColor");
(!g || g === "auto") && (g = e.get(["axisLine", "lineStyle", "color"])), r.label = {
x: h[0],
y: h[1],
style: zt(s, {
text: o,
font: u,
fill: s.getTextColor(),
padding: l,
backgroundColor: g
}),
z2: 10
};
}
function bU(r, e, t, n) {
var a = n.getWidth(), i = n.getHeight();
r[0] = Math.min(r[0] + e, a) - e, r[1] = Math.min(r[1] + t, i) - t, r[0] = Math.max(r[0], 0), r[1] = Math.max(r[1], 0);
}
function hI(r, e, t, n, a) {
r = e.scale.parse(r);
var i = e.scale.getLabel({
value: r
}, {
precision: a.precision
}), o = a.formatter;
if (o) {
var s = {
value: Ly(e, {
value: r
}),
axisDimension: e.dim,
axisIndex: e.index,
seriesData: []
};
C(n, function(l) {
var u = t.getSeriesByIndex(l.seriesIndex), f = l.dataIndexInside, h = u && u.getDataParams(f);
h && s.seriesData.push(h);
}), W(o) ? i = o.replace("{value}", i) : q(o) && (i = o(s));
}
return i;
}
function dm(r, e, t) {
var n = hr();
return bi(n, n, t.rotation), qr(n, n, t.position), Dr([r.dataToCoord(e), (t.labelOffset || 0) + (t.labelDirection || 1) * (t.labelMargin || 0)], n);
}
function cI(r, e, t, n, a, i) {
var o = bn.innerTextLayout(t.rotation, 0, t.labelDirection);
t.labelMargin = a.get(["label", "margin"]), fI(e, n, a, i, {
position: dm(n.axis, r, t),
align: o.textAlign,
verticalAlign: o.textVerticalAlign
});
}
function gm(r, e, t) {
return t = t || 0, {
x1: r[t],
y1: r[1 - t],
x2: e[t],
y2: e[1 - t]
};
}
function vI(r, e, t) {
return t = t || 0, {
x: r[t],
y: r[1 - t],
width: e[t],
height: e[1 - t]
};
}
function sw(r, e, t, n, a, i) {
return {
cx: r,
cy: e,
r0: t,
r: n,
startAngle: a,
endAngle: i,
clockwise: !0
};
}
var TU = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.makeElOption = function(t, n, a, i, o) {
var s = a.axis, l = s.grid, u = i.get("type"), f = lw(l, s).getOtherAxis(s).getGlobalExtent(), h = s.toGlobalCoord(s.dataToCoord(n, !0));
if (u && u !== "none") {
var c = pm(i), v = CU[u](s, h, f);
v.style = c, t.graphicKey = v.type, t.pointer = v;
}
var p = Yd(l.model, a);
cI(
n,
t,
p,
a,
i,
o
);
}, e.prototype.getHandleTransform = function(t, n, a) {
var i = Yd(n.axis.grid.model, n, {
labelInside: !1
});
i.labelMargin = a.get(["handle", "margin"]);
var o = dm(n.axis, t, i);
return {
x: o[0],
y: o[1],
rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
};
}, e.prototype.updateHandleTransform = function(t, n, a, i) {
var o = a.axis, s = o.grid, l = o.getGlobalExtent(!0), u = lw(s, o).getOtherAxis(o).getGlobalExtent(), f = o.dim === "x" ? 0 : 1, h = [t.x, t.y];
h[f] += n[f], h[f] = Math.min(l[1], h[f]), h[f] = Math.max(l[0], h[f]);
var c = (u[1] + u[0]) / 2, v = [c, c];
v[f] = h[f];
var p = [{
verticalAlign: "middle"
}, {
align: "center"
}];
return {
x: h[0],
y: h[1],
rotation: t.rotation,
cursorPoint: v,
tooltipOption: p[f]
};
}, e;
}(vm);
function lw(r, e) {
var t = {};
return t[e.dim + "AxisIndex"] = e.index, r.getCartesian(t);
}
var CU = {
line: function(r, e, t) {
var n = gm([e, t[0]], [e, t[1]], uw(r));
return {
type: "Line",
subPixelOptimize: !0,
shape: n
};
},
shadow: function(r, e, t) {
var n = Math.max(1, r.getBandWidth()), a = t[1] - t[0];
return {
type: "Rect",
shape: vI([e - n / 2, t[0]], [n, a], uw(r))
};
}
};
function uw(r) {
return r.dim === "x" ? 0 : 1;
}
const DU = TU;
var AU = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "axisPointer", e.defaultOption = {
show: "auto",
z: 50,
type: "line",
snap: !1,
triggerTooltip: !0,
value: null,
status: null,
link: [],
animation: null,
animationDurationUpdate: 200,
lineStyle: {
color: "#B9BEC9",
width: 1,
type: "dashed"
},
shadowStyle: {
color: "rgba(210,219,238,0.2)"
},
label: {
show: !0,
formatter: null,
precision: "auto",
margin: 3,
color: "#fff",
padding: [5, 7, 5, 7],
backgroundColor: "auto",
borderColor: null,
borderWidth: 0,
borderRadius: 3
},
handle: {
show: !1,
icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
size: 45,
margin: 50,
color: "#333",
shadowBlur: 3,
shadowColor: "#aaa",
shadowOffsetX: 0,
shadowOffsetY: 2,
throttle: 40
}
}, e;
}(_t);
const MU = AU;
var fn = Tt(), LU = C;
function pI(r, e, t) {
if (!Dt.node) {
var n = e.getZr();
fn(n).records || (fn(n).records = {}), IU(n, e);
var a = fn(n).records[r] || (fn(n).records[r] = {});
a.handler = t;
}
}
function IU(r, e) {
if (fn(r).initialized)
return;
fn(r).initialized = !0, t("click", it(fw, "click")), t("mousemove", it(fw, "mousemove")), t("globalout", PU);
function t(n, a) {
r.on(n, function(i) {
var o = NU(e);
LU(fn(r).records, function(s) {
s && a(s, i, o.dispatchAction);
}), EU(o.pendings, e);
});
}
}
function EU(r, e) {
var t = r.showTip.length, n = r.hideTip.length, a;
t ? a = r.showTip[t - 1] : n && (a = r.hideTip[n - 1]), a && (a.dispatchAction = null, e.dispatchAction(a));
}
function PU(r, e, t) {
r.handler("leave", null, t);
}
function fw(r, e, t, n) {
e.handler(r, t, n);
}
function NU(r) {
var e = {
showTip: [],
hideTip: []
}, t = function(n) {
var a = e[n.type];
a ? a.push(n) : (n.dispatchAction = t, r.dispatchAction(n));
};
return {
dispatchAction: t,
pendings: e
};
}
function fg(r, e) {
if (!Dt.node) {
var t = e.getZr(), n = (fn(t).records || {})[r];
n && (fn(t).records[r] = null);
}
}
var RU = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = n.getComponent("tooltip"), o = t.get("triggerOn") || i && i.get("triggerOn") || "mousemove|click";
pI("axisPointer", a, function(s, l, u) {
o !== "none" && (s === "leave" || o.indexOf(s) >= 0) && u({
type: "updateAxisPointer",
currTrigger: s,
x: l && l.offsetX,
y: l && l.offsetY
});
});
}, e.prototype.remove = function(t, n) {
fg("axisPointer", n);
}, e.prototype.dispose = function(t, n) {
fg("axisPointer", n);
}, e.type = "axisPointer", e;
}(Ht);
const kU = RU;
function dI(r, e) {
var t = [], n = r.seriesIndex, a;
if (n == null || !(a = e.getSeriesByIndex(n)))
return {
point: []
};
var i = a.getData(), o = di(i, r);
if (o == null || o < 0 || z(o))
return {
point: []
};
var s = i.getItemGraphicEl(o), l = a.coordinateSystem;
if (a.getTooltipPosition)
t = a.getTooltipPosition(o) || [];
else if (l && l.dataToPoint)
if (r.isStacked) {
var u = l.getBaseAxis(), f = l.getOtherAxis(u), h = f.dim, c = u.dim, v = h === "x" || h === "radius" ? 1 : 0, p = i.mapDimension(c), d = [];
d[v] = i.get(p, o), d[1 - v] = i.get(i.getCalculationInfo("stackResultDimension"), o), t = l.dataToPoint(d) || [];
} else
t = l.dataToPoint(i.getValues(G(l.dimensions, function(y) {
return i.mapDimension(y);
}), o)) || [];
else if (s) {
var g = s.getBoundingRect().clone();
g.applyTransform(s.transform), t = [g.x + g.width / 2, g.y + g.height / 2];
}
return {
point: t,
el: s
};
}
var hw = Tt();
function OU(r, e, t) {
var n = r.currTrigger, a = [r.x, r.y], i = r, o = r.dispatchAction || Y(t.dispatchAction, t), s = e.getComponent("axisPointer").coordSysAxesInfo;
if (!!s) {
vf(a) && (a = dI({
seriesIndex: i.seriesIndex,
dataIndex: i.dataIndex
}, e).point);
var l = vf(a), u = i.axesInfo, f = s.axesInfo, h = n === "leave" || vf(a), c = {}, v = {}, p = {
list: [],
map: {}
}, d = {
showPointer: it(BU, v),
showTooltip: it(zU, p)
};
C(s.coordSysMap, function(y, m) {
var _ = l || y.containPoint(a);
C(s.coordSysAxesInfo[m], function(S, w) {
var x = S.axis, b = $U(u, S);
if (!h && _ && (!u || b)) {
var T = b && b.value;
T == null && !l && (T = x.pointToData(a)), T != null && cw(S, T, d, !1, c);
}
});
});
var g = {};
return C(f, function(y, m) {
var _ = y.linkGroup;
_ && !v[m] && C(_.axesInfo, function(S, w) {
var x = v[w];
if (S !== y && x) {
var b = x.value;
_.mapper && (b = y.axis.scale.parse(_.mapper(b, vw(S), vw(y)))), g[y.key] = b;
}
});
}), C(g, function(y, m) {
cw(f[m], y, d, !0, c);
}), GU(v, f, c), FU(p, a, r, o), HU(f, o, t), c;
}
}
function cw(r, e, t, n, a) {
var i = r.axis;
if (!(i.scale.isBlank() || !i.containData(e))) {
if (!r.involveSeries) {
t.showPointer(r, e);
return;
}
var o = VU(e, r), s = o.payloadBatch, l = o.snapToValue;
s[0] && a.seriesIndex == null && B(a, s[0]), !n && r.snap && i.containData(l) && l != null && (e = l), t.showPointer(r, e, s), t.showTooltip(r, o, l);
}
}
function VU(r, e) {
var t = e.axis, n = t.dim, a = r, i = [], o = Number.MAX_VALUE, s = -1;
return C(e.seriesModels, function(l, u) {
var f = l.getData().mapDimensionsAll(n), h, c;
if (l.getAxisTooltipData) {
var v = l.getAxisTooltipData(f, r, t);
c = v.dataIndices, h = v.nestestValue;
} else {
if (c = l.getData().indicesOfNearest(
f[0],
r,
t.type === "category" ? 0.5 : null
), !c.length)
return;
h = l.getData().get(f[0], c[0]);
}
if (!(h == null || !isFinite(h))) {
var p = r - h, d = Math.abs(p);
d <= o && ((d < o || p >= 0 && s < 0) && (o = d, s = p, a = h, i.length = 0), C(c, function(g) {
i.push({
seriesIndex: l.seriesIndex,
dataIndexInside: g,
dataIndex: l.getData().getRawIndex(g)
});
}));
}
}), {
payloadBatch: i,
snapToValue: a
};
}
function BU(r, e, t, n) {
r[e.key] = {
value: t,
payloadBatch: n
};
}
function zU(r, e, t, n) {
var a = t.payloadBatch, i = e.axis, o = i.model, s = e.axisPointerModel;
if (!(!e.triggerTooltip || !a.length)) {
var l = e.coordSys.model, u = gl(l), f = r.map[u];
f || (f = r.map[u] = {
coordSysId: l.id,
coordSysIndex: l.componentIndex,
coordSysType: l.type,
coordSysMainType: l.mainType,
dataByAxis: []
}, r.list.push(f)), f.dataByAxis.push({
axisDim: i.dim,
axisIndex: o.componentIndex,
axisType: o.type,
axisId: o.id,
value: n,
valueLabelOpt: {
precision: s.get(["label", "precision"]),
formatter: s.get(["label", "formatter"])
},
seriesDataIndices: a.slice()
});
}
}
function GU(r, e, t) {
var n = t.axesInfo = [];
C(e, function(a, i) {
var o = a.axisPointerModel.option, s = r[i];
s ? (!a.useHandle && (o.status = "show"), o.value = s.value, o.seriesDataIndices = (s.payloadBatch || []).slice()) : !a.useHandle && (o.status = "hide"), o.status === "show" && n.push({
axisDim: a.axis.dim,
axisIndex: a.axis.model.componentIndex,
value: o.value
});
});
}
function FU(r, e, t, n) {
if (vf(e) || !r.list.length) {
n({
type: "hideTip"
});
return;
}
var a = ((r.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
n({
type: "showTip",
escapeConnect: !0,
x: e[0],
y: e[1],
tooltipOption: t.tooltipOption,
position: t.position,
dataIndexInside: a.dataIndexInside,
dataIndex: a.dataIndex,
seriesIndex: a.seriesIndex,
dataByCoordSys: r.list
});
}
function HU(r, e, t) {
var n = t.getZr(), a = "axisPointerLastHighlights", i = hw(n)[a] || {}, o = hw(n)[a] = {};
C(r, function(u, f) {
var h = u.axisPointerModel.option;
h.status === "show" && C(h.seriesDataIndices, function(c) {
var v = c.seriesIndex + " | " + c.dataIndex;
o[v] = c;
});
});
var s = [], l = [];
C(i, function(u, f) {
!o[f] && l.push(u);
}), C(o, function(u, f) {
!i[f] && s.push(u);
}), l.length && t.dispatchAction({
type: "downplay",
escapeConnect: !0,
notBlur: !0,
batch: l
}), s.length && t.dispatchAction({
type: "highlight",
escapeConnect: !0,
notBlur: !0,
batch: s
});
}
function $U(r, e) {
for (var t = 0; t < (r || []).length; t++) {
var n = r[t];
if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex)
return n;
}
}
function vw(r) {
var e = r.axis.model, t = {}, n = t.axisDim = r.axis.dim;
return t.axisIndex = t[n + "AxisIndex"] = e.componentIndex, t.axisName = t[n + "AxisName"] = e.name, t.axisId = t[n + "AxisId"] = e.id, t;
}
function vf(r) {
return !r || r[0] == null || isNaN(r[0]) || r[1] == null || isNaN(r[1]);
}
function Yl(r) {
Ai.registerAxisPointerClass("CartesianAxisPointer", DU), r.registerComponentModel(MU), r.registerComponentView(kU), r.registerPreprocessor(function(e) {
if (e) {
(!e.axisPointer || e.axisPointer.length === 0) && (e.axisPointer = {});
var t = e.axisPointer.link;
t && !z(t) && (e.axisPointer.link = [t]);
}
}), r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC, function(e, t) {
e.getComponent("axisPointer").coordSysAxesInfo = PG(e, t);
}), r.registerAction({
type: "updateAxisPointer",
event: "updateAxisPointer",
update: ":updateAxisPointer"
}, OU);
}
function WU(r) {
pt(zM), pt(Yl);
}
var UU = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.makeElOption = function(t, n, a, i, o) {
var s = a.axis;
s.dim === "angle" && (this.animationThreshold = Math.PI / 18);
var l = s.polar, u = l.getOtherAxis(s), f = u.getExtent(), h = s.dataToCoord(n), c = i.get("type");
if (c && c !== "none") {
var v = pm(i), p = ZU[c](s, l, h, f);
p.style = v, t.graphicKey = p.type, t.pointer = p;
}
var d = i.get(["label", "margin"]), g = YU(n, a, i, l, d);
fI(t, a, i, o, g);
}, e;
}(vm);
function YU(r, e, t, n, a) {
var i = e.axis, o = i.dataToCoord(r), s = n.getAngleAxis().getExtent()[0];
s = s / 180 * Math.PI;
var l = n.getRadiusAxis().getExtent(), u, f, h;
if (i.dim === "radius") {
var c = hr();
bi(c, c, s), qr(c, c, [n.cx, n.cy]), u = Dr([o, -a], c);
var v = e.getModel("axisLabel").get("rotate") || 0, p = bn.innerTextLayout(s, v * Math.PI / 180, -1);
f = p.textAlign, h = p.textVerticalAlign;
} else {
var d = l[1];
u = n.coordToPoint([d + a, o]);
var g = n.cx, y = n.cy;
f = Math.abs(u[0] - g) / d < 0.3 ? "center" : u[0] > g ? "left" : "right", h = Math.abs(u[1] - y) / d < 0.3 ? "middle" : u[1] > y ? "top" : "bottom";
}
return {
position: u,
align: f,
verticalAlign: h
};
}
var ZU = {
line: function(r, e, t, n) {
return r.dim === "angle" ? {
type: "Line",
shape: gm(e.coordToPoint([n[0], t]), e.coordToPoint([n[1], t]))
} : {
type: "Circle",
shape: {
cx: e.cx,
cy: e.cy,
r: t
}
};
},
shadow: function(r, e, t, n) {
var a = Math.max(1, r.getBandWidth()), i = Math.PI / 180;
return r.dim === "angle" ? {
type: "Sector",
shape: sw(
e.cx,
e.cy,
n[0],
n[1],
(-t - a / 2) * i,
(-t + a / 2) * i
)
} : {
type: "Sector",
shape: sw(e.cx, e.cy, t - a / 2, t + a / 2, 0, Math.PI * 2)
};
}
};
const XU = UU;
var qU = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.findAxisModel = function(t) {
var n, a = this.ecModel;
return a.eachComponent(t, function(i) {
i.getCoordSysModel() === this && (n = i);
}, this), n;
}, e.type = "polar", e.dependencies = ["radiusAxis", "angleAxis"], e.defaultOption = {
z: 0,
center: ["50%", "50%"],
radius: "80%"
}, e;
}(_t);
const KU = qU;
var ym = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.getCoordSysModel = function() {
return this.getReferringComponents("polar", Kt).models[0];
}, e.type = "polarAxis", e;
}(_t);
Qt(ym, Bl);
var jU = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "angleAxis", e;
}(ym), JU = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "radiusAxis", e;
}(ym), mm = function(r) {
R(e, r);
function e(t, n) {
return r.call(this, "radius", t, n) || this;
}
return e.prototype.pointToData = function(t, n) {
return this.polar.pointToData(t, n)[this.dim === "radius" ? 0 : 1];
}, e;
}(Er);
mm.prototype.dataToRadius = Er.prototype.dataToCoord;
mm.prototype.radiusToData = Er.prototype.coordToData;
const QU = mm;
var t8 = Tt(), _m = function(r) {
R(e, r);
function e(t, n) {
return r.call(this, "angle", t, n || [0, 360]) || this;
}
return e.prototype.pointToData = function(t, n) {
return this.polar.pointToData(t, n)[this.dim === "radius" ? 0 : 1];
}, e.prototype.calculateCategoryInterval = function() {
var t = this, n = t.getLabelModel(), a = t.scale, i = a.getExtent(), o = a.count();
if (i[1] - i[0] < 1)
return 0;
var s = i[0], l = t.dataToCoord(s + 1) - t.dataToCoord(s), u = Math.abs(l), f = Al(s == null ? "" : s + "", n.getFont(), "center", "top"), h = Math.max(f.height, 7), c = h / u;
isNaN(c) && (c = 1 / 0);
var v = Math.max(0, Math.floor(c)), p = t8(t.model), d = p.lastAutoInterval, g = p.lastTickCount;
return d != null && g != null && Math.abs(d - v) <= 1 && Math.abs(g - o) <= 1 && d > v ? v = d : (p.lastTickCount = o, p.lastAutoInterval = v), v;
}, e;
}(Er);
_m.prototype.dataToAngle = Er.prototype.dataToCoord;
_m.prototype.angleToData = Er.prototype.coordToData;
const e8 = _m;
var gI = ["radius", "angle"], r8 = function() {
function r(e) {
this.dimensions = gI, this.type = "polar", this.cx = 0, this.cy = 0, this._radiusAxis = new QU(), this._angleAxis = new e8(), this.axisPointerEnabled = !0, this.name = e || "", this._radiusAxis.polar = this._angleAxis.polar = this;
}
return r.prototype.containPoint = function(e) {
var t = this.pointToCoord(e);
return this._radiusAxis.contain(t[0]) && this._angleAxis.contain(t[1]);
}, r.prototype.containData = function(e) {
return this._radiusAxis.containData(e[0]) && this._angleAxis.containData(e[1]);
}, r.prototype.getAxis = function(e) {
var t = "_" + e + "Axis";
return this[t];
}, r.prototype.getAxes = function() {
return [this._radiusAxis, this._angleAxis];
}, r.prototype.getAxesByScale = function(e) {
var t = [], n = this._angleAxis, a = this._radiusAxis;
return n.scale.type === e && t.push(n), a.scale.type === e && t.push(a), t;
}, r.prototype.getAngleAxis = function() {
return this._angleAxis;
}, r.prototype.getRadiusAxis = function() {
return this._radiusAxis;
}, r.prototype.getOtherAxis = function(e) {
var t = this._angleAxis;
return e === t ? this._radiusAxis : t;
}, r.prototype.getBaseAxis = function() {
return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAngleAxis();
}, r.prototype.getTooltipAxes = function(e) {
var t = e != null && e !== "auto" ? this.getAxis(e) : this.getBaseAxis();
return {
baseAxes: [t],
otherAxes: [this.getOtherAxis(t)]
};
}, r.prototype.dataToPoint = function(e, t) {
return this.coordToPoint([this._radiusAxis.dataToRadius(e[0], t), this._angleAxis.dataToAngle(e[1], t)]);
}, r.prototype.pointToData = function(e, t) {
var n = this.pointToCoord(e);
return [this._radiusAxis.radiusToData(n[0], t), this._angleAxis.angleToData(n[1], t)];
}, r.prototype.pointToCoord = function(e) {
var t = e[0] - this.cx, n = e[1] - this.cy, a = this.getAngleAxis(), i = a.getExtent(), o = Math.min(i[0], i[1]), s = Math.max(i[0], i[1]);
a.inverse ? o = s - 360 : s = o + 360;
var l = Math.sqrt(t * t + n * n);
t /= l, n /= l;
for (var u = Math.atan2(-n, t) / Math.PI * 180, f = u < o ? 1 : -1; u < o || u > s; )
u += f * 360;
return [l, u];
}, r.prototype.coordToPoint = function(e) {
var t = e[0], n = e[1] / 180 * Math.PI, a = Math.cos(n) * t + this.cx, i = -Math.sin(n) * t + this.cy;
return [a, i];
}, r.prototype.getArea = function() {
var e = this.getAngleAxis(), t = this.getRadiusAxis(), n = t.getExtent().slice();
n[0] > n[1] && n.reverse();
var a = e.getExtent(), i = Math.PI / 180;
return {
cx: this.cx,
cy: this.cy,
r0: n[0],
r: n[1],
startAngle: -a[0] * i,
endAngle: -a[1] * i,
clockwise: e.inverse,
contain: function(o, s) {
var l = o - this.cx, u = s - this.cy, f = l * l + u * u - 1e-4, h = this.r, c = this.r0;
return f <= h * h && f >= c * c;
}
};
}, r.prototype.convertToPixel = function(e, t, n) {
var a = pw(t);
return a === this ? this.dataToPoint(n) : null;
}, r.prototype.convertFromPixel = function(e, t, n) {
var a = pw(t);
return a === this ? this.pointToData(n) : null;
}, r;
}();
function pw(r) {
var e = r.seriesModel, t = r.polarModel;
return t && t.coordinateSystem || e && e.coordinateSystem;
}
const n8 = r8;
function a8(r, e, t) {
var n = e.get("center"), a = t.getWidth(), i = t.getHeight();
r.cx = H(n[0], a), r.cy = H(n[1], i);
var o = r.getRadiusAxis(), s = Math.min(a, i) / 2, l = e.get("radius");
l == null ? l = [0, "100%"] : z(l) || (l = [0, l]);
var u = [H(l[0], s), H(l[1], s)];
o.inverse ? o.setExtent(u[1], u[0]) : o.setExtent(u[0], u[1]);
}
function i8(r, e) {
var t = this, n = t.getAngleAxis(), a = t.getRadiusAxis();
if (n.scale.setExtent(1 / 0, -1 / 0), a.scale.setExtent(1 / 0, -1 / 0), r.eachSeries(function(s) {
if (s.coordinateSystem === t) {
var l = s.getData();
C(Yf(l, "radius"), function(u) {
a.scale.unionExtentFromData(l, u);
}), C(Yf(l, "angle"), function(u) {
n.scale.unionExtentFromData(l, u);
});
}
}), To(n.scale, n.model), To(a.scale, a.model), n.type === "category" && !n.onBand) {
var i = n.getExtent(), o = 360 / n.scale.count();
n.inverse ? i[1] += o : i[1] -= o, n.setExtent(i[0], i[1]);
}
}
function o8(r) {
return r.mainType === "angleAxis";
}
function dw(r, e) {
if (r.type = e.get("type"), r.scale = jh(e), r.onBand = e.get("boundaryGap") && r.type === "category", r.inverse = e.get("inverse"), o8(e)) {
r.inverse = r.inverse !== e.get("clockwise");
var t = e.get("startAngle");
r.setExtent(t, t + (r.inverse ? -360 : 360));
}
e.axis = r, r.model = e;
}
var s8 = {
dimensions: gI,
create: function(r, e) {
var t = [];
return r.eachComponent("polar", function(n, a) {
var i = new n8(a + "");
i.update = i8;
var o = i.getRadiusAxis(), s = i.getAngleAxis(), l = n.findAxisModel("radiusAxis"), u = n.findAxisModel("angleAxis");
dw(o, l), dw(s, u), a8(i, n, e), t.push(i), n.coordinateSystem = i, i.model = n;
}), r.eachSeries(function(n) {
if (n.get("coordinateSystem") === "polar") {
var a = n.getReferringComponents("polar", Kt).models[0];
if (process.env.NODE_ENV !== "production" && !a)
throw new Error('Polar "' + qt(n.get("polarIndex"), n.get("polarId"), 0) + '" not found');
n.coordinateSystem = a.coordinateSystem;
}
}), t;
}
};
const l8 = s8;
var u8 = ["axisLine", "axisLabel", "axisTick", "minorTick", "splitLine", "minorSplitLine", "splitArea"];
function Fu(r, e, t) {
e[1] > e[0] && (e = e.slice().reverse());
var n = r.coordToPoint([e[0], t]), a = r.coordToPoint([e[1], t]);
return {
x1: n[0],
y1: n[1],
x2: a[0],
y2: a[1]
};
}
function Hu(r) {
var e = r.getRadiusAxis();
return e.inverse ? 0 : 1;
}
function gw(r) {
var e = r[0], t = r[r.length - 1];
e && t && Math.abs(Math.abs(e.coord - t.coord) - 360) < 1e-4 && r.pop();
}
var f8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.axisPointerClass = "PolarAxisPointer", t;
}
return e.prototype.render = function(t, n) {
if (this.group.removeAll(), !!t.get("show")) {
var a = t.axis, i = a.polar, o = i.getRadiusAxis().getExtent(), s = a.getTicksCoords(), l = a.getMinorTicksCoords(), u = G(a.getViewLabels(), function(f) {
f = tt(f);
var h = a.scale, c = h.type === "ordinal" ? h.getRawOrdinalNumber(f.tickValue) : f.tickValue;
return f.coord = a.dataToCoord(c), f;
});
gw(u), gw(s), C(u8, function(f) {
t.get([f, "show"]) && (!a.scale.isBlank() || f === "axisLine") && h8[f](this.group, t, i, s, l, o, u);
}, this);
}
}, e.type = "angleAxis", e;
}(Ai), h8 = {
axisLine: function(r, e, t, n, a, i) {
var o = e.getModel(["axisLine", "lineStyle"]), s = Hu(t), l = s ? 0 : 1, u;
i[l] === 0 ? u = new Qr({
shape: {
cx: t.cx,
cy: t.cy,
r: i[s]
},
style: o.getLineStyle(),
z2: 1,
silent: !0
}) : u = new Nh({
shape: {
cx: t.cx,
cy: t.cy,
r: i[s],
r0: i[l]
},
style: o.getLineStyle(),
z2: 1,
silent: !0
}), u.style.fill = null, r.add(u);
},
axisTick: function(r, e, t, n, a, i) {
var o = e.getModel("axisTick"), s = (o.get("inside") ? -1 : 1) * o.get("length"), l = i[Hu(t)], u = G(n, function(f) {
return new oe({
shape: Fu(t, [l, l + s], f.coord)
});
});
r.add(or(u, {
style: J(o.getModel("lineStyle").getLineStyle(), {
stroke: e.get(["axisLine", "lineStyle", "color"])
})
}));
},
minorTick: function(r, e, t, n, a, i) {
if (!!a.length) {
for (var o = e.getModel("axisTick"), s = e.getModel("minorTick"), l = (o.get("inside") ? -1 : 1) * s.get("length"), u = i[Hu(t)], f = [], h = 0; h < a.length; h++)
for (var c = 0; c < a[h].length; c++)
f.push(new oe({
shape: Fu(t, [u, u + l], a[h][c].coord)
}));
r.add(or(f, {
style: J(s.getModel("lineStyle").getLineStyle(), J(o.getLineStyle(), {
stroke: e.get(["axisLine", "lineStyle", "color"])
}))
}));
}
},
axisLabel: function(r, e, t, n, a, i, o) {
var s = e.getCategories(!0), l = e.getModel("axisLabel"), u = l.get("margin"), f = e.get("triggerEvent");
C(o, function(h, c) {
var v = l, p = h.tickValue, d = i[Hu(t)], g = t.coordToPoint([d + u, h.coord]), y = t.cx, m = t.cy, _ = Math.abs(g[0] - y) / d < 0.3 ? "center" : g[0] > y ? "left" : "right", S = Math.abs(g[1] - m) / d < 0.3 ? "middle" : g[1] > m ? "top" : "bottom";
if (s && s[p]) {
var w = s[p];
j(w) && w.textStyle && (v = new kt(w.textStyle, l, l.ecModel));
}
var x = new Ct({
silent: bn.isLabelSilent(e),
style: zt(v, {
x: g[0],
y: g[1],
fill: v.getTextColor() || e.get(["axisLine", "lineStyle", "color"]),
text: h.formattedLabel,
align: _,
verticalAlign: S
})
});
if (r.add(x), f) {
var b = bn.makeAxisEventDataBase(e);
b.targetType = "axisLabel", b.value = h.rawLabel, at(x).eventData = b;
}
}, this);
},
splitLine: function(r, e, t, n, a, i) {
var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
l = l instanceof Array ? l : [l];
for (var f = [], h = 0; h < n.length; h++) {
var c = u++ % l.length;
f[c] = f[c] || [], f[c].push(new oe({
shape: Fu(t, i, n[h].coord)
}));
}
for (var h = 0; h < f.length; h++)
r.add(or(f[h], {
style: J({
stroke: l[h % l.length]
}, s.getLineStyle()),
silent: !0,
z: e.get("z")
}));
},
minorSplitLine: function(r, e, t, n, a, i) {
if (!!a.length) {
for (var o = e.getModel("minorSplitLine"), s = o.getModel("lineStyle"), l = [], u = 0; u < a.length; u++)
for (var f = 0; f < a[u].length; f++)
l.push(new oe({
shape: Fu(t, i, a[u][f].coord)
}));
r.add(or(l, {
style: s.getLineStyle(),
silent: !0,
z: e.get("z")
}));
}
},
splitArea: function(r, e, t, n, a, i) {
if (!!n.length) {
var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
l = l instanceof Array ? l : [l];
for (var f = [], h = Math.PI / 180, c = -n[0].coord * h, v = Math.min(i[0], i[1]), p = Math.max(i[0], i[1]), d = e.get("clockwise"), g = 1, y = n.length; g <= y; g++) {
var m = g === y ? n[0].coord : n[g].coord, _ = u++ % l.length;
f[_] = f[_] || [], f[_].push(new Ve({
shape: {
cx: t.cx,
cy: t.cy,
r0: v,
r: p,
startAngle: c,
endAngle: -m * h,
clockwise: d
},
silent: !0
})), c = -m * h;
}
for (var g = 0; g < f.length; g++)
r.add(or(f[g], {
style: J({
fill: l[g % l.length]
}, s.getAreaStyle()),
silent: !0
}));
}
}
};
const c8 = f8;
var v8 = ["axisLine", "axisTickLabel", "axisName"], p8 = ["splitLine", "splitArea", "minorSplitLine"], d8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.axisPointerClass = "PolarAxisPointer", t;
}
return e.prototype.render = function(t, n) {
if (this.group.removeAll(), !!t.get("show")) {
var a = this._axisGroup, i = this._axisGroup = new nt();
this.group.add(i);
var o = t.axis, s = o.polar, l = s.getAngleAxis(), u = o.getTicksCoords(), f = o.getMinorTicksCoords(), h = l.getExtent()[0], c = o.getExtent(), v = y8(s, t, h), p = new bn(t, v);
C(v8, p.add, p), i.add(p.getGroup()), El(a, i, t), C(p8, function(d) {
t.get([d, "show"]) && !o.scale.isBlank() && g8[d](this.group, t, s, h, c, u, f);
}, this);
}
}, e.type = "radiusAxis", e;
}(Ai), g8 = {
splitLine: function(r, e, t, n, a, i) {
var o = e.getModel("splitLine"), s = o.getModel("lineStyle"), l = s.get("color"), u = 0;
l = l instanceof Array ? l : [l];
for (var f = [], h = 0; h < i.length; h++) {
var c = u++ % l.length;
f[c] = f[c] || [], f[c].push(new Qr({
shape: {
cx: t.cx,
cy: t.cy,
r: Math.max(i[h].coord, 0)
}
}));
}
for (var h = 0; h < f.length; h++)
r.add(or(f[h], {
style: J({
stroke: l[h % l.length],
fill: null
}, s.getLineStyle()),
silent: !0
}));
},
minorSplitLine: function(r, e, t, n, a, i, o) {
if (!!o.length) {
for (var s = e.getModel("minorSplitLine"), l = s.getModel("lineStyle"), u = [], f = 0; f < o.length; f++)
for (var h = 0; h < o[f].length; h++)
u.push(new Qr({
shape: {
cx: t.cx,
cy: t.cy,
r: o[f][h].coord
}
}));
r.add(or(u, {
style: J({
fill: null
}, l.getLineStyle()),
silent: !0
}));
}
},
splitArea: function(r, e, t, n, a, i) {
if (!!i.length) {
var o = e.getModel("splitArea"), s = o.getModel("areaStyle"), l = s.get("color"), u = 0;
l = l instanceof Array ? l : [l];
for (var f = [], h = i[0].coord, c = 1; c < i.length; c++) {
var v = u++ % l.length;
f[v] = f[v] || [], f[v].push(new Ve({
shape: {
cx: t.cx,
cy: t.cy,
r0: h,
r: i[c].coord,
startAngle: 0,
endAngle: Math.PI * 2
},
silent: !0
})), h = i[c].coord;
}
for (var c = 0; c < f.length; c++)
r.add(or(f[c], {
style: J({
fill: l[c % l.length]
}, s.getAreaStyle()),
silent: !0
}));
}
}
};
function y8(r, e, t) {
return {
position: [r.cx, r.cy],
rotation: t / 180 * Math.PI,
labelDirection: -1,
tickDirection: -1,
nameDirection: 1,
labelRotate: e.getModel("axisLabel").get("rotate"),
z2: 1
};
}
const m8 = d8;
function yI(r) {
return r.get("stack") || "__ec_stack_" + r.seriesIndex;
}
function mI(r, e) {
return e.dim + r.model.componentIndex;
}
function _8(r, e, t) {
var n = {}, a = S8(Et(e.getSeriesByType(r), function(i) {
return !e.isSeriesFiltered(i) && i.coordinateSystem && i.coordinateSystem.type === "polar";
}));
e.eachSeriesByType(r, function(i) {
if (i.coordinateSystem.type === "polar") {
var o = i.getData(), s = i.coordinateSystem, l = s.getBaseAxis(), u = mI(s, l), f = yI(i), h = a[u][f], c = h.offset, v = h.width, p = s.getOtherAxis(l), d = i.coordinateSystem.cx, g = i.coordinateSystem.cy, y = i.get("barMinHeight") || 0, m = i.get("barMinAngle") || 0;
n[f] = n[f] || [];
for (var _ = o.mapDimension(p.dim), S = o.mapDimension(l.dim), w = sa(
o,
_
), x = l.dim !== "radius" || !i.get("roundCap", !0), b = p.dataToCoord(0), T = 0, D = o.count(); T < D; T++) {
var A = o.get(_, T), M = o.get(S, T), L = A >= 0 ? "p" : "n", I = b;
w && (n[f][M] || (n[f][M] = {
p: b,
n: b
}), I = n[f][M][L]);
var E = void 0, P = void 0, N = void 0, O = void 0;
if (p.dim === "radius") {
var k = p.dataToCoord(A) - b, V = l.dataToCoord(M);
Math.abs(k) < y && (k = (k < 0 ? -1 : 1) * y), E = I, P = I + k, N = V - c, O = N - v, w && (n[f][M][L] = P);
} else {
var F = p.dataToCoord(A, x) - b, $ = l.dataToCoord(M);
Math.abs(F) < m && (F = (F < 0 ? -1 : 1) * m), E = $ + c, P = E + v, N = I, O = I + F, w && (n[f][M][L] = O);
}
o.setItemLayout(T, {
cx: d,
cy: g,
r0: E,
r: P,
startAngle: -N * Math.PI / 180,
endAngle: -O * Math.PI / 180,
clockwise: N >= O
});
}
}
});
}
function S8(r) {
var e = {};
C(r, function(n, a) {
var i = n.getData(), o = n.coordinateSystem, s = o.getBaseAxis(), l = mI(o, s), u = s.getExtent(), f = s.type === "category" ? s.getBandWidth() : Math.abs(u[1] - u[0]) / i.count(), h = e[l] || {
bandWidth: f,
remainedWidth: f,
autoWidthCount: 0,
categoryGap: "20%",
gap: "30%",
stacks: {}
}, c = h.stacks;
e[l] = h;
var v = yI(n);
c[v] || h.autoWidthCount++, c[v] = c[v] || {
width: 0,
maxWidth: 0
};
var p = H(n.get("barWidth"), f), d = H(n.get("barMaxWidth"), f), g = n.get("barGap"), y = n.get("barCategoryGap");
p && !c[v].width && (p = Math.min(h.remainedWidth, p), c[v].width = p, h.remainedWidth -= p), d && (c[v].maxWidth = d), g != null && (h.gap = g), y != null && (h.categoryGap = y);
});
var t = {};
return C(e, function(n, a) {
t[a] = {};
var i = n.stacks, o = n.bandWidth, s = H(n.categoryGap, o), l = H(n.gap, 1), u = n.remainedWidth, f = n.autoWidthCount, h = (u - s) / (f + (f - 1) * l);
h = Math.max(h, 0), C(i, function(d, g) {
var y = d.maxWidth;
y && y < h && (y = Math.min(y, u), d.width && (y = Math.min(y, d.width)), u -= y, d.width = y, f--);
}), h = (u - s) / (f + (f - 1) * l), h = Math.max(h, 0);
var c = 0, v;
C(i, function(d, g) {
d.width || (d.width = h), v = d, c += d.width * (1 + l);
}), v && (c -= v.width * l);
var p = -c / 2;
C(i, function(d, g) {
t[a][g] = t[a][g] || {
offset: p,
width: d.width
}, p += d.width * (1 + l);
});
}), t;
}
var x8 = {
startAngle: 90,
clockwise: !0,
splitNumber: 12,
axisLabel: {
rotate: 0
}
}, w8 = {
splitNumber: 5
}, b8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "polar", e;
}(Ht);
function T8(r) {
pt(Yl), Ai.registerAxisPointerClass("PolarAxisPointer", XU), r.registerCoordinateSystem("polar", l8), r.registerComponentModel(KU), r.registerComponentView(b8), Do(r, "angle", jU, x8), Do(r, "radius", JU, w8), r.registerComponentView(c8), r.registerComponentView(m8), r.registerLayout(it(_8, "bar"));
}
function hg(r, e) {
e = e || {};
var t = r.coordinateSystem, n = r.axis, a = {}, i = n.position, o = n.orient, s = t.getRect(), l = [s.x, s.x + s.width, s.y, s.y + s.height], u = {
horizontal: {
top: l[2],
bottom: l[3]
},
vertical: {
left: l[0],
right: l[1]
}
};
a.position = [o === "vertical" ? u.vertical[i] : l[0], o === "horizontal" ? u.horizontal[i] : l[3]];
var f = {
horizontal: 0,
vertical: 1
};
a.rotation = Math.PI / 2 * f[o];
var h = {
top: -1,
bottom: 1,
right: 1,
left: -1
};
a.labelDirection = a.tickDirection = a.nameDirection = h[i], r.get(["axisTick", "inside"]) && (a.tickDirection = -a.tickDirection), qt(e.labelInside, r.get(["axisLabel", "inside"])) && (a.labelDirection = -a.labelDirection);
var c = e.rotate;
return c == null && (c = r.get(["axisLabel", "rotate"])), a.labelRotation = i === "top" ? -c : c, a.z2 = 1, a;
}
var C8 = ["axisLine", "axisTickLabel", "axisName"], D8 = ["splitArea", "splitLine"], A8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.axisPointerClass = "SingleAxisPointer", t;
}
return e.prototype.render = function(t, n, a, i) {
var o = this.group;
o.removeAll();
var s = this._axisGroup;
this._axisGroup = new nt();
var l = hg(t), u = new bn(t, l);
C(C8, u.add, u), o.add(this._axisGroup), o.add(u.getGroup()), C(D8, function(f) {
t.get([f, "show"]) && M8[f](this, this.group, this._axisGroup, t);
}, this), El(s, this._axisGroup, t), r.prototype.render.call(this, t, n, a, i);
}, e.prototype.remove = function() {
OM(this);
}, e.type = "singleAxis", e;
}(Ai), M8 = {
splitLine: function(r, e, t, n) {
var a = n.axis;
if (!a.scale.isBlank()) {
var i = n.getModel("splitLine"), o = i.getModel("lineStyle"), s = o.get("color");
s = s instanceof Array ? s : [s];
for (var l = n.coordinateSystem.getRect(), u = a.isHorizontal(), f = [], h = 0, c = a.getTicksCoords({
tickModel: i
}), v = [], p = [], d = 0; d < c.length; ++d) {
var g = a.toGlobalCoord(c[d].coord);
u ? (v[0] = g, v[1] = l.y, p[0] = g, p[1] = l.y + l.height) : (v[0] = l.x, v[1] = g, p[0] = l.x + l.width, p[1] = g);
var y = h++ % s.length;
f[y] = f[y] || [], f[y].push(new oe({
subPixelOptimize: !0,
shape: {
x1: v[0],
y1: v[1],
x2: p[0],
y2: p[1]
},
silent: !0
}));
}
for (var m = o.getLineStyle(["color"]), d = 0; d < f.length; ++d)
e.add(or(f[d], {
style: J({
stroke: s[d % s.length]
}, m),
silent: !0
}));
}
},
splitArea: function(r, e, t, n) {
kM(r, t, n, n);
}
};
const L8 = A8;
var _I = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.getCoordSysModel = function() {
return this;
}, e.type = "singleAxis", e.layoutMode = "box", e.defaultOption = {
left: "5%",
top: "5%",
right: "5%",
bottom: "5%",
type: "value",
position: "bottom",
orient: "horizontal",
axisLine: {
show: !0,
lineStyle: {
width: 1,
type: "solid"
}
},
tooltip: {
show: !0
},
axisTick: {
show: !0,
length: 6,
lineStyle: {
width: 1
}
},
axisLabel: {
show: !0,
interval: "auto"
},
splitLine: {
show: !0,
lineStyle: {
type: "dashed",
opacity: 0.2
}
}
}, e;
}(_t);
Qt(_I, Bl.prototype);
const vp = _I;
var I8 = function(r) {
R(e, r);
function e(t, n, a, i, o) {
var s = r.call(this, t, n, a) || this;
return s.type = i || "value", s.position = o || "bottom", s;
}
return e.prototype.isHorizontal = function() {
var t = this.position;
return t === "top" || t === "bottom";
}, e.prototype.pointToData = function(t, n) {
return this.coordinateSystem.pointToData(t)[0];
}, e;
}(Er);
const E8 = I8;
var SI = ["single"], P8 = function() {
function r(e, t, n) {
this.type = "single", this.dimension = "single", this.dimensions = SI, this.axisPointerEnabled = !0, this.model = e, this._init(e, t, n);
}
return r.prototype._init = function(e, t, n) {
var a = this.dimension, i = new E8(a, jh(e), [0, 0], e.get("type"), e.get("position")), o = i.type === "category";
i.onBand = o && e.get("boundaryGap"), i.inverse = e.get("inverse"), i.orient = e.get("orient"), e.axis = i, i.model = e, i.coordinateSystem = this, this._axis = i;
}, r.prototype.update = function(e, t) {
e.eachSeries(function(n) {
if (n.coordinateSystem === this) {
var a = n.getData();
C(a.mapDimensionsAll(this.dimension), function(i) {
this._axis.scale.unionExtentFromData(a, i);
}, this), To(this._axis.scale, this._axis.model);
}
}, this);
}, r.prototype.resize = function(e, t) {
this._rect = ee({
left: e.get("left"),
top: e.get("top"),
right: e.get("right"),
bottom: e.get("bottom"),
width: e.get("width"),
height: e.get("height")
}, {
width: t.getWidth(),
height: t.getHeight()
}), this._adjustAxis();
}, r.prototype.getRect = function() {
return this._rect;
}, r.prototype._adjustAxis = function() {
var e = this._rect, t = this._axis, n = t.isHorizontal(), a = n ? [0, e.width] : [0, e.height], i = t.reverse ? 1 : 0;
t.setExtent(a[i], a[1 - i]), this._updateAxisTransform(t, n ? e.x : e.y);
}, r.prototype._updateAxisTransform = function(e, t) {
var n = e.getExtent(), a = n[0] + n[1], i = e.isHorizontal();
e.toGlobalCoord = i ? function(o) {
return o + t;
} : function(o) {
return a - o + t;
}, e.toLocalCoord = i ? function(o) {
return o - t;
} : function(o) {
return a - o + t;
};
}, r.prototype.getAxis = function() {
return this._axis;
}, r.prototype.getBaseAxis = function() {
return this._axis;
}, r.prototype.getAxes = function() {
return [this._axis];
}, r.prototype.getTooltipAxes = function() {
return {
baseAxes: [this.getAxis()],
otherAxes: []
};
}, r.prototype.containPoint = function(e) {
var t = this.getRect(), n = this.getAxis(), a = n.orient;
return a === "horizontal" ? n.contain(n.toLocalCoord(e[0])) && e[1] >= t.y && e[1] <= t.y + t.height : n.contain(n.toLocalCoord(e[1])) && e[0] >= t.y && e[0] <= t.y + t.height;
}, r.prototype.pointToData = function(e) {
var t = this.getAxis();
return [t.coordToData(t.toLocalCoord(e[t.orient === "horizontal" ? 0 : 1]))];
}, r.prototype.dataToPoint = function(e) {
var t = this.getAxis(), n = this.getRect(), a = [], i = t.orient === "horizontal" ? 0 : 1;
return e instanceof Array && (e = e[0]), a[i] = t.toGlobalCoord(t.dataToCoord(+e)), a[1 - i] = i === 0 ? n.y + n.height / 2 : n.x + n.width / 2, a;
}, r.prototype.convertToPixel = function(e, t, n) {
var a = yw(t);
return a === this ? this.dataToPoint(n) : null;
}, r.prototype.convertFromPixel = function(e, t, n) {
var a = yw(t);
return a === this ? this.pointToData(n) : null;
}, r;
}();
function yw(r) {
var e = r.seriesModel, t = r.singleAxisModel;
return t && t.coordinateSystem || e && e.coordinateSystem;
}
function N8(r, e) {
var t = [];
return r.eachComponent("singleAxis", function(n, a) {
var i = new P8(n, r, e);
i.name = "single_" + a, i.resize(n, e), n.coordinateSystem = i, t.push(i);
}), r.eachSeries(function(n) {
if (n.get("coordinateSystem") === "singleAxis") {
var a = n.getReferringComponents("singleAxis", Kt).models[0];
n.coordinateSystem = a && a.coordinateSystem;
}
}), t;
}
var R8 = {
create: N8,
dimensions: SI
};
const k8 = R8;
var mw = ["x", "y"], O8 = ["width", "height"], V8 = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.makeElOption = function(t, n, a, i, o) {
var s = a.axis, l = s.coordinateSystem, u = pp(l, 1 - uh(s)), f = l.dataToPoint(n)[0], h = i.get("type");
if (h && h !== "none") {
var c = pm(i), v = B8[h](s, f, u);
v.style = c, t.graphicKey = v.type, t.pointer = v;
}
var p = hg(a);
cI(
n,
t,
p,
a,
i,
o
);
}, e.prototype.getHandleTransform = function(t, n, a) {
var i = hg(n, {
labelInside: !1
});
i.labelMargin = a.get(["handle", "margin"]);
var o = dm(n.axis, t, i);
return {
x: o[0],
y: o[1],
rotation: i.rotation + (i.labelDirection < 0 ? Math.PI : 0)
};
}, e.prototype.updateHandleTransform = function(t, n, a, i) {
var o = a.axis, s = o.coordinateSystem, l = uh(o), u = pp(s, l), f = [t.x, t.y];
f[l] += n[l], f[l] = Math.min(u[1], f[l]), f[l] = Math.max(u[0], f[l]);
var h = pp(s, 1 - l), c = (h[1] + h[0]) / 2, v = [c, c];
return v[l] = f[l], {
x: f[0],
y: f[1],
rotation: t.rotation,
cursorPoint: v,
tooltipOption: {
verticalAlign: "middle"
}
};
}, e;
}(vm), B8 = {
line: function(r, e, t) {
var n = gm([e, t[0]], [e, t[1]], uh(r));
return {
type: "Line",
subPixelOptimize: !0,
shape: n
};
},
shadow: function(r, e, t) {
var n = r.getBandWidth(), a = t[1] - t[0];
return {
type: "Rect",
shape: vI([e - n / 2, t[0]], [n, a], uh(r))
};
}
};
function uh(r) {
return r.isHorizontal() ? 0 : 1;
}
function pp(r, e) {
var t = r.getRect();
return [t[mw[e]], t[mw[e]] + t[O8[e]]];
}
const z8 = V8;
var G8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "single", e;
}(Ht);
function F8(r) {
pt(Yl), Ai.registerAxisPointerClass("SingleAxisPointer", z8), r.registerComponentView(G8), r.registerComponentView(L8), r.registerComponentModel(vp), Do(r, "single", vp, vp.defaultOption), r.registerCoordinateSystem("single", k8);
}
var H8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n, a) {
var i = Go(t);
r.prototype.init.apply(this, arguments), _w(t, i);
}, e.prototype.mergeOption = function(t) {
r.prototype.mergeOption.apply(this, arguments), _w(this.option, t);
}, e.prototype.getCellSize = function() {
return this.option.cellSize;
}, e.type = "calendar", e.defaultOption = {
z: 2,
left: 80,
top: 60,
cellSize: 20,
orient: "horizontal",
splitLine: {
show: !0,
lineStyle: {
color: "#000",
width: 1,
type: "solid"
}
},
itemStyle: {
color: "#fff",
borderWidth: 1,
borderColor: "#ccc"
},
dayLabel: {
show: !0,
firstDay: 0,
position: "start",
margin: "50%",
color: "#000"
},
monthLabel: {
show: !0,
position: "start",
margin: 5,
align: "center",
formatter: null,
color: "#000"
},
yearLabel: {
show: !0,
position: null,
margin: 30,
formatter: null,
color: "#ccc",
fontFamily: "sans-serif",
fontWeight: "bolder",
fontSize: 20
}
}, e;
}(_t);
function _w(r, e) {
var t = r.cellSize, n;
z(t) ? n = t : n = r.cellSize = [t, t], n.length === 1 && (n[1] = n[0]);
var a = G([0, 1], function(i) {
return KR(e, i) && (n[i] = "auto"), n[i] != null && n[i] !== "auto";
});
oa(r, e, {
type: "box",
ignoreSize: a
});
}
const $8 = H8;
var W8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
var i = this.group;
i.removeAll();
var o = t.coordinateSystem, s = o.getRangeInfo(), l = o.getOrient(), u = n.getLocaleModel();
this._renderDayRect(t, s, i), this._renderLines(t, s, l, i), this._renderYearText(t, s, l, i), this._renderMonthText(t, u, l, i), this._renderWeekText(t, u, s, l, i);
}, e.prototype._renderDayRect = function(t, n, a) {
for (var i = t.coordinateSystem, o = t.getModel("itemStyle").getItemStyle(), s = i.getCellWidth(), l = i.getCellHeight(), u = n.start.time; u <= n.end.time; u = i.getNextNDay(u, 1).time) {
var f = i.dataToRect([u], !1).tl, h = new xt({
shape: {
x: f[0],
y: f[1],
width: s,
height: l
},
cursor: "default",
style: o
});
a.add(h);
}
}, e.prototype._renderLines = function(t, n, a, i) {
var o = this, s = t.coordinateSystem, l = t.getModel(["splitLine", "lineStyle"]).getLineStyle(), u = t.get(["splitLine", "show"]), f = l.lineWidth;
this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = [];
for (var h = n.start, c = 0; h.time <= n.end.time; c++) {
p(h.formatedDate), c === 0 && (h = s.getDateInfo(n.start.y + "-" + n.start.m));
var v = h.date;
v.setMonth(v.getMonth() + 1), h = s.getDateInfo(v);
}
p(s.getNextNDay(n.end.time, 1).formatedDate);
function p(d) {
o._firstDayOfMonth.push(s.getDateInfo(d)), o._firstDayPoints.push(s.dataToRect([d], !1).tl);
var g = o._getLinePointsOfOneWeek(t, d, a);
o._tlpoints.push(g[0]), o._blpoints.push(g[g.length - 1]), u && o._drawSplitline(g, l, i);
}
u && this._drawSplitline(o._getEdgesPoints(o._tlpoints, f, a), l, i), u && this._drawSplitline(o._getEdgesPoints(o._blpoints, f, a), l, i);
}, e.prototype._getEdgesPoints = function(t, n, a) {
var i = [t[0].slice(), t[t.length - 1].slice()], o = a === "horizontal" ? 0 : 1;
return i[0][o] = i[0][o] - n / 2, i[1][o] = i[1][o] + n / 2, i;
}, e.prototype._drawSplitline = function(t, n, a) {
var i = new ze({
z2: 20,
shape: {
points: t
},
style: n
});
a.add(i);
}, e.prototype._getLinePointsOfOneWeek = function(t, n, a) {
for (var i = t.coordinateSystem, o = i.getDateInfo(n), s = [], l = 0; l < 7; l++) {
var u = i.getNextNDay(o.time, l), f = i.dataToRect([u.time], !1);
s[2 * u.day] = f.tl, s[2 * u.day + 1] = f[a === "horizontal" ? "bl" : "tr"];
}
return s;
}, e.prototype._formatterLabel = function(t, n) {
return W(t) && t ? ZR(t, n) : q(t) ? t(n) : n.nameMap;
}, e.prototype._yearTextPositionControl = function(t, n, a, i, o) {
var s = n[0], l = n[1], u = ["center", "bottom"];
i === "bottom" ? (l += o, u = ["center", "top"]) : i === "left" ? s -= o : i === "right" ? (s += o, u = ["center", "top"]) : l -= o;
var f = 0;
return (i === "left" || i === "right") && (f = Math.PI / 2), {
rotation: f,
x: s,
y: l,
style: {
align: u[0],
verticalAlign: u[1]
}
};
}, e.prototype._renderYearText = function(t, n, a, i) {
var o = t.getModel("yearLabel");
if (!!o.get("show")) {
var s = o.get("margin"), l = o.get("position");
l || (l = a !== "horizontal" ? "top" : "left");
var u = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], f = (u[0][0] + u[1][0]) / 2, h = (u[0][1] + u[1][1]) / 2, c = a === "horizontal" ? 0 : 1, v = {
top: [f, u[c][1]],
bottom: [f, u[1 - c][1]],
left: [u[1 - c][0], h],
right: [u[c][0], h]
}, p = n.start.y;
+n.end.y > +n.start.y && (p = p + "-" + n.end.y);
var d = o.get("formatter"), g = {
start: n.start.y,
end: n.end.y,
nameMap: p
}, y = this._formatterLabel(d, g), m = new Ct({
z2: 30,
style: zt(o, {
text: y
})
});
m.attr(this._yearTextPositionControl(m, v[l], a, l, s)), i.add(m);
}
}, e.prototype._monthTextPositionControl = function(t, n, a, i, o) {
var s = "left", l = "top", u = t[0], f = t[1];
return a === "horizontal" ? (f = f + o, n && (s = "center"), i === "start" && (l = "bottom")) : (u = u + o, n && (l = "middle"), i === "start" && (s = "right")), {
x: u,
y: f,
align: s,
verticalAlign: l
};
}, e.prototype._renderMonthText = function(t, n, a, i) {
var o = t.getModel("monthLabel");
if (!!o.get("show")) {
var s = o.get("nameMap"), l = o.get("margin"), u = o.get("position"), f = o.get("align"), h = [this._tlpoints, this._blpoints];
(!s || W(s)) && (s && (n = xd(s) || n), s = n.get(["time", "monthAbbr"]) || []);
var c = u === "start" ? 0 : 1, v = a === "horizontal" ? 0 : 1;
l = u === "start" ? -l : l;
for (var p = f === "center", d = 0; d < h[c].length - 1; d++) {
var g = h[c][d].slice(), y = this._firstDayOfMonth[d];
if (p) {
var m = this._firstDayPoints[d];
g[v] = (m[v] + h[0][d + 1][v]) / 2;
}
var _ = o.get("formatter"), S = s[+y.m - 1], w = {
yyyy: y.y,
yy: (y.y + "").slice(2),
MM: y.m,
M: +y.m,
nameMap: S
}, x = this._formatterLabel(_, w), b = new Ct({
z2: 30,
style: B(zt(o, {
text: x
}), this._monthTextPositionControl(g, p, a, u, l))
});
i.add(b);
}
}
}, e.prototype._weekTextPositionControl = function(t, n, a, i, o) {
var s = "center", l = "middle", u = t[0], f = t[1], h = a === "start";
return n === "horizontal" ? (u = u + i + (h ? 1 : -1) * o[0] / 2, s = h ? "right" : "left") : (f = f + i + (h ? 1 : -1) * o[1] / 2, l = h ? "bottom" : "top"), {
x: u,
y: f,
align: s,
verticalAlign: l
};
}, e.prototype._renderWeekText = function(t, n, a, i, o) {
var s = t.getModel("dayLabel");
if (!!s.get("show")) {
var l = t.coordinateSystem, u = s.get("position"), f = s.get("nameMap"), h = s.get("margin"), c = l.getFirstDayOfWeek();
if (!f || W(f)) {
f && (n = xd(f) || n);
var v = n.get(["time", "dayOfWeekShort"]);
f = v || G(n.get(["time", "dayOfWeekAbbr"]), function(w) {
return w[0];
});
}
var p = l.getNextNDay(a.end.time, 7 - a.lweek).time, d = [l.getCellWidth(), l.getCellHeight()];
h = H(h, Math.min(d[1], d[0])), u === "start" && (p = l.getNextNDay(a.start.time, -(7 + a.fweek)).time, h = -h);
for (var g = 0; g < 7; g++) {
var y = l.getNextNDay(p, g), m = l.dataToRect([y.time], !1).center, _ = g;
_ = Math.abs((g + c) % 7);
var S = new Ct({
z2: 30,
style: B(zt(s, {
text: f[_]
}), this._weekTextPositionControl(m, i, u, h, d))
});
o.add(S);
}
}
}, e.type = "calendar", e;
}(Ht);
const U8 = W8;
var dp = 864e5, Y8 = function() {
function r(e, t, n) {
this.type = "calendar", this.dimensions = r.dimensions, this.getDimensionsInfo = r.getDimensionsInfo, this._model = e;
}
return r.getDimensionsInfo = function() {
return [{
name: "time",
type: "time"
}, "value"];
}, r.prototype.getRangeInfo = function() {
return this._rangeInfo;
}, r.prototype.getModel = function() {
return this._model;
}, r.prototype.getRect = function() {
return this._rect;
}, r.prototype.getCellWidth = function() {
return this._sw;
}, r.prototype.getCellHeight = function() {
return this._sh;
}, r.prototype.getOrient = function() {
return this._orient;
}, r.prototype.getFirstDayOfWeek = function() {
return this._firstDayOfWeek;
}, r.prototype.getDateInfo = function(e) {
e = jr(e);
var t = e.getFullYear(), n = e.getMonth() + 1, a = n < 10 ? "0" + n : "" + n, i = e.getDate(), o = i < 10 ? "0" + i : "" + i, s = e.getDay();
return s = Math.abs((s + 7 - this.getFirstDayOfWeek()) % 7), {
y: t + "",
m: a,
d: o,
day: s,
time: e.getTime(),
formatedDate: t + "-" + a + "-" + o,
date: e
};
}, r.prototype.getNextNDay = function(e, t) {
return t = t || 0, t === 0 ? this.getDateInfo(e) : (e = new Date(this.getDateInfo(e).time), e.setDate(e.getDate() + t), this.getDateInfo(e));
}, r.prototype.update = function(e, t) {
this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption());
var n = this._rangeInfo.weeks || 1, a = ["width", "height"], i = this._model.getCellSize().slice(), o = this._model.getBoxLayoutParams(), s = this._orient === "horizontal" ? [n, 7] : [7, n];
C([0, 1], function(h) {
f(i, h) && (o[a[h]] = i[h] * s[h]);
});
var l = {
width: t.getWidth(),
height: t.getHeight()
}, u = this._rect = ee(o, l);
C([0, 1], function(h) {
f(i, h) || (i[h] = u[a[h]] / s[h]);
});
function f(h, c) {
return h[c] != null && h[c] !== "auto";
}
this._sw = i[0], this._sh = i[1];
}, r.prototype.dataToPoint = function(e, t) {
z(e) && (e = e[0]), t == null && (t = !0);
var n = this.getDateInfo(e), a = this._rangeInfo, i = n.formatedDate;
if (t && !(n.time >= a.start.time && n.time < a.end.time + dp))
return [NaN, NaN];
var o = n.day, s = this._getRangeInfo([a.start.time, i]).nthWeek;
return this._orient === "vertical" ? [this._rect.x + o * this._sw + this._sw / 2, this._rect.y + s * this._sh + this._sh / 2] : [this._rect.x + s * this._sw + this._sw / 2, this._rect.y + o * this._sh + this._sh / 2];
}, r.prototype.pointToData = function(e) {
var t = this.pointToDate(e);
return t && t.time;
}, r.prototype.dataToRect = function(e, t) {
var n = this.dataToPoint(e, t);
return {
contentShape: {
x: n[0] - (this._sw - this._lineWidth) / 2,
y: n[1] - (this._sh - this._lineWidth) / 2,
width: this._sw - this._lineWidth,
height: this._sh - this._lineWidth
},
center: n,
tl: [n[0] - this._sw / 2, n[1] - this._sh / 2],
tr: [n[0] + this._sw / 2, n[1] - this._sh / 2],
br: [n[0] + this._sw / 2, n[1] + this._sh / 2],
bl: [n[0] - this._sw / 2, n[1] + this._sh / 2]
};
}, r.prototype.pointToDate = function(e) {
var t = Math.floor((e[0] - this._rect.x) / this._sw) + 1, n = Math.floor((e[1] - this._rect.y) / this._sh) + 1, a = this._rangeInfo.range;
return this._orient === "vertical" ? this._getDateByWeeksAndDay(n, t - 1, a) : this._getDateByWeeksAndDay(t, n - 1, a);
}, r.prototype.convertToPixel = function(e, t, n) {
var a = Sw(t);
return a === this ? a.dataToPoint(n) : null;
}, r.prototype.convertFromPixel = function(e, t, n) {
var a = Sw(t);
return a === this ? a.pointToData(n) : null;
}, r.prototype.containPoint = function(e) {
return console.warn("Not implemented."), !1;
}, r.prototype._initRangeOption = function() {
var e = this._model.get("range"), t;
if (z(e) && e.length === 1 && (e = e[0]), z(e))
t = e;
else {
var n = e.toString();
if (/^\d{4}$/.test(n) && (t = [n + "-01-01", n + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(n)) {
var a = this.getDateInfo(n), i = a.date;
i.setMonth(i.getMonth() + 1);
var o = this.getNextNDay(i, -1);
t = [a.formatedDate, o.formatedDate];
}
/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n) && (t = [n, n]);
}
if (!t)
return process.env.NODE_ENV !== "production" && br("Invalid date range."), e;
var s = this._getRangeInfo(t);
return s.start.time > s.end.time && t.reverse(), t;
}, r.prototype._getRangeInfo = function(e) {
var t = [this.getDateInfo(e[0]), this.getDateInfo(e[1])], n;
t[0].time > t[1].time && (n = !0, t.reverse());
var a = Math.floor(t[1].time / dp) - Math.floor(t[0].time / dp) + 1, i = new Date(t[0].time), o = i.getDate(), s = t[1].date.getDate();
i.setDate(o + a - 1);
var l = i.getDate();
if (l !== s)
for (var u = i.getTime() - t[1].time > 0 ? 1 : -1; (l = i.getDate()) !== s && (i.getTime() - t[1].time) * u > 0; )
a -= u, i.setDate(l - u);
var f = Math.floor((a + t[0].day + 6) / 7), h = n ? -f + 1 : f - 1;
return n && t.reverse(), {
range: [t[0].formatedDate, t[1].formatedDate],
start: t[0],
end: t[1],
allDay: a,
weeks: f,
nthWeek: h,
fweek: t[0].day,
lweek: t[1].day
};
}, r.prototype._getDateByWeeksAndDay = function(e, t, n) {
var a = this._getRangeInfo(n);
if (e > a.weeks || e === 0 && t < a.fweek || e === a.weeks && t > a.lweek)
return null;
var i = (e - 1) * 7 - a.fweek + t, o = new Date(a.start.time);
return o.setDate(+a.start.d + i), this.getDateInfo(o);
}, r.create = function(e, t) {
var n = [];
return e.eachComponent("calendar", function(a) {
var i = new r(a);
n.push(i), a.coordinateSystem = i;
}), e.eachSeries(function(a) {
a.get("coordinateSystem") === "calendar" && (a.coordinateSystem = n[a.get("calendarIndex") || 0]);
}), n;
}, r.dimensions = ["time", "value"], r;
}();
function Sw(r) {
var e = r.calendarModel, t = r.seriesModel, n = e ? e.coordinateSystem : t ? t.coordinateSystem : null;
return n;
}
const Z8 = Y8;
function X8(r) {
r.registerComponentModel($8), r.registerComponentView(U8), r.registerCoordinateSystem("calendar", Z8);
}
function q8(r, e) {
var t = r.existing;
if (e.id = r.keyInfo.id, !e.type && t && (e.type = t.type), e.parentId == null) {
var n = e.parentOption;
n ? e.parentId = n.id : t && (e.parentId = t.parentId);
}
e.parentOption = null;
}
function xw(r, e) {
var t;
return C(e, function(n) {
r[n] != null && r[n] !== "auto" && (t = !0);
}), t;
}
function K8(r, e, t) {
var n = B({}, t), a = r[e], i = t.$action || "merge";
if (i === "merge")
if (a) {
if (process.env.NODE_ENV !== "production") {
var o = t.type;
Q(!o || a.type === o, 'Please set $action: "replace" to change `type`');
}
lt(a, n, !0), oa(a, n, {
ignoreSize: !0
}), iD(t, a), $u(t, a), $u(t, a, "shape"), $u(t, a, "style"), $u(t, a, "extra"), t.clipPath = a.clipPath;
} else
r[e] = n;
else
i === "replace" ? r[e] = n : i === "remove" && a && (r[e] = null);
}
var xI = ["transition", "enterFrom", "leaveTo"], j8 = xI.concat(["enterAnimation", "updateAnimation", "leaveAnimation"]);
function $u(r, e, t) {
if (t && (!r[t] && e[t] && (r[t] = {}), r = r[t], e = e[t]), !(!r || !e))
for (var n = t ? xI : j8, a = 0; a < n.length; a++) {
var i = n[a];
r[i] == null && e[i] != null && (r[i] = e[i]);
}
}
function J8(r, e) {
if (!!r && (r.hv = e.hv = [
xw(e, ["left", "right"]),
xw(e, ["top", "bottom"])
], r.type === "group")) {
var t = r, n = e;
t.width == null && (t.width = n.width = 0), t.height == null && (t.height = n.height = 0);
}
}
var Q8 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.preventAutoZ = !0, t;
}
return e.prototype.mergeOption = function(t, n) {
var a = this.option.elements;
this.option.elements = null, r.prototype.mergeOption.call(this, t, n), this.option.elements = a;
}, e.prototype.optionUpdated = function(t, n) {
var a = this.option, i = (n ? a : t).elements, o = a.elements = n ? [] : a.elements, s = [];
this._flatten(i, s, null);
var l = GT(o, s, "normalMerge"), u = this._elOptionsToUpdate = [];
C(l, function(f, h) {
var c = f.newOption;
process.env.NODE_ENV !== "production" && Q(j(c) || f.existing, "Empty graphic option definition"), c && (u.push(c), q8(f, c), K8(o, h, c), J8(o[h], c));
}, this), a.elements = Et(o, function(f) {
return f && delete f.$action, f != null;
});
}, e.prototype._flatten = function(t, n, a) {
C(t, function(i) {
if (!!i) {
a && (i.parentOption = a), n.push(i);
var o = i.children;
o && o.length && this._flatten(o, n, i), delete i.children;
}
}, this);
}, e.prototype.useElOptionsToUpdate = function() {
var t = this._elOptionsToUpdate;
return this._elOptionsToUpdate = null, t;
}, e.type = "graphic", e.defaultOption = {
elements: []
}, e;
}(_t), ww = {
path: null,
compoundPath: null,
group: nt,
image: ve,
text: Ct
}, nr = Tt(), tY = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function() {
this._elMap = K();
}, e.prototype.render = function(t, n, a) {
t !== this._lastGraphicModel && this._clear(), this._lastGraphicModel = t, this._updateElements(t), this._relocate(t, a);
}, e.prototype._updateElements = function(t) {
var n = t.useElOptionsToUpdate();
if (!!n) {
var a = this._elMap, i = this.group, o = t.get("z"), s = t.get("zlevel");
C(n, function(l) {
var u = te(l.id, null), f = u != null ? a.get(u) : null, h = te(l.parentId, null), c = h != null ? a.get(h) : i, v = l.type, p = l.style;
v === "text" && p && l.hv && l.hv[1] && (p.textVerticalAlign = p.textBaseline = p.verticalAlign = p.align = null);
var d = l.textContent, g = l.textConfig;
if (p && QL(p, v, !!g, !!d)) {
var y = tI(p, v, !0);
!g && y.textConfig && (g = l.textConfig = y.textConfig), !d && y.textContent && (d = y.textContent);
}
var m = eY(l);
process.env.NODE_ENV !== "production" && f && Q(c === f.parent, "Changing parent is not supported.");
var _ = l.$action || "merge", S = _ === "merge", w = _ === "replace";
if (S) {
var x = !f, b = f;
x ? b = bw(u, c, l.type, a) : (b && (nr(b).isNew = !1), iI(b)), b && (cf(b, m, t, {
isInit: x
}), Tw(b, l, o, s));
} else if (w) {
pf(f, l, a, t);
var T = bw(u, c, l.type, a);
T && (cf(T, m, t, {
isInit: !0
}), Tw(T, l, o, s));
} else
_ === "remove" && (rI(f, l), pf(f, l, a, t));
var D = a.get(u);
if (D && d)
if (S) {
var A = D.getTextContent();
A ? A.attr(d) : D.setTextContent(new Ct(d));
} else
w && D.setTextContent(new Ct(d));
if (D) {
var M = l.clipPath;
if (M) {
var L = M.type, I = void 0, x = !1;
if (S) {
var E = D.getClipPath();
x = !E || nr(E).type !== L, I = x ? cg(L) : E;
} else
w && (x = !0, I = cg(L));
D.setClipPath(I), cf(I, M, t, {
isInit: x
}), oh(I, M.keyframeAnimation, t);
}
var P = nr(D);
D.setTextConfig(g), P.option = l, rY(D, t, l), Oo({
el: D,
componentModel: t,
itemName: D.name,
itemTooltipOption: l.tooltip
}), oh(D, l.keyframeAnimation, t);
}
});
}
}, e.prototype._relocate = function(t, n) {
for (var a = t.option.elements, i = this.group, o = this._elMap, s = n.getWidth(), l = n.getHeight(), u = ["x", "y"], f = 0; f < a.length; f++) {
var h = a[f], c = te(h.id, null), v = c != null ? o.get(c) : null;
if (!(!v || !v.isGroup)) {
var p = v.parent, d = p === i, g = nr(v), y = nr(p);
g.width = H(g.option.width, d ? s : y.width) || 0, g.height = H(g.option.height, d ? l : y.height) || 0;
}
}
for (var f = a.length - 1; f >= 0; f--) {
var h = a[f], c = te(h.id, null), v = c != null ? o.get(c) : null;
if (!!v) {
var p = v.parent, y = nr(p), m = p === i ? {
width: s,
height: l
} : {
width: y.width,
height: y.height
}, _ = {}, S = $h(v, h, m, null, {
hv: h.hv,
boundingMode: h.bounding
}, _);
if (!nr(v).isNew && S) {
for (var w = h.transition, x = {}, b = 0; b < u.length; b++) {
var T = u[b], D = _[T];
w && (ci(w) || ct(w, T) >= 0) ? x[T] = D : v[T] = D;
}
bt(v, x, t, 0);
} else
v.attr(_);
}
}
}, e.prototype._clear = function() {
var t = this, n = this._elMap;
n.each(function(a) {
pf(a, nr(a).option, n, t._lastGraphicModel);
}), this._elMap = K();
}, e.prototype.dispose = function() {
this._clear();
}, e.type = "graphic", e;
}(Ht);
function cg(r) {
process.env.NODE_ENV !== "production" && Q(r, "graphic type MUST be set");
var e = U(ww, r) ? ww[r] : ty(r);
process.env.NODE_ENV !== "production" && Q(e, "graphic type " + r + " can not be found");
var t = new e({});
return nr(t).type = r, t;
}
function bw(r, e, t, n) {
var a = cg(t);
return e.add(a), n.set(r, a), nr(a).id = r, nr(a).isNew = !0, a;
}
function pf(r, e, t, n) {
var a = r && r.parent;
a && (r.type === "group" && r.traverse(function(i) {
pf(i, e, t, n);
}), ic(r, e, n), t.removeKey(nr(r).id));
}
function Tw(r, e, t, n) {
r.isGroup || C([
["cursor", cr.prototype.cursor],
["zlevel", n || 0],
["z", t || 0],
["z2", 0]
], function(a) {
var i = a[0];
U(e, i) ? r[i] = vt(e[i], a[1]) : r[i] == null && (r[i] = a[1]);
}), C(mt(e), function(a) {
if (a.indexOf("on") === 0) {
var i = e[a];
r[a] = q(i) ? i : null;
}
}), U(e, "draggable") && (r.draggable = e.draggable), e.name != null && (r.name = e.name), e.id != null && (r.id = e.id);
}
function eY(r) {
return r = B({}, r), C(["id", "parentId", "$action", "hv", "bounding", "textContent", "clipPath"].concat(aD), function(e) {
delete r[e];
}), r;
}
function rY(r, e, t) {
var n = at(r).eventData;
!r.silent && !r.ignore && !n && (n = at(r).eventData = {
componentType: "graphic",
componentIndex: e.componentIndex,
name: r.name
}), n && (n.info = t.info);
}
function nY(r) {
r.registerComponentModel(Q8), r.registerComponentView(tY), r.registerPreprocessor(function(e) {
var t = e.graphic;
z(t) ? !t[0] || !t[0].elements ? e.graphic = [{
elements: t
}] : e.graphic = [e.graphic[0]] : t && !t.elements && (e.graphic = [{
elements: [t]
}]);
});
}
var Cw = ["x", "y", "radius", "angle", "single"], aY = ["cartesian2d", "polar", "singleAxis"];
function iY(r) {
var e = r.get("coordinateSystem");
return ct(aY, e) >= 0;
}
function Jn(r) {
return process.env.NODE_ENV !== "production" && Q(r), r + "Axis";
}
function oY(r, e) {
var t = K(), n = [], a = K();
r.eachComponent({
mainType: "dataZoom",
query: e
}, function(f) {
a.get(f.uid) || s(f);
});
var i;
do
i = !1, r.eachComponent("dataZoom", o);
while (i);
function o(f) {
!a.get(f.uid) && l(f) && (s(f), i = !0);
}
function s(f) {
a.set(f.uid, !0), n.push(f), u(f);
}
function l(f) {
var h = !1;
return f.eachTargetAxis(function(c, v) {
var p = t.get(c);
p && p[v] && (h = !0);
}), h;
}
function u(f) {
f.eachTargetAxis(function(h, c) {
(t.get(h) || t.set(h, []))[c] = !0;
});
}
return n;
}
function wI(r) {
var e = r.ecModel, t = {
infoList: [],
infoMap: K()
};
return r.eachTargetAxis(function(n, a) {
var i = e.getComponent(Jn(n), a);
if (!!i) {
var o = i.getCoordSysModel();
if (!!o) {
var s = o.uid, l = t.infoMap.get(s);
l || (l = {
model: o,
axisModels: []
}, t.infoList.push(l), t.infoMap.set(s, l)), l.axisModels.push(i);
}
}
}), t;
}
var gp = function() {
function r() {
this.indexList = [], this.indexMap = [];
}
return r.prototype.add = function(e) {
this.indexMap[e] || (this.indexList.push(e), this.indexMap[e] = !0);
}, r;
}(), sY = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._autoThrottle = !0, t._noTarget = !0, t._rangePropMode = ["percent", "percent"], t;
}
return e.prototype.init = function(t, n, a) {
var i = Dw(t);
this.settledOption = i, this.mergeDefaultAndTheme(t, a), this._doInit(i);
}, e.prototype.mergeOption = function(t) {
var n = Dw(t);
lt(this.option, t, !0), lt(this.settledOption, n, !0), this._doInit(n);
}, e.prototype._doInit = function(t) {
var n = this.option;
this._setDefaultThrottle(t), this._updateRangeUse(t);
var a = this.settledOption;
C([["start", "startValue"], ["end", "endValue"]], function(i, o) {
this._rangePropMode[o] === "value" && (n[i[0]] = a[i[0]] = null);
}, this), this._resetTarget();
}, e.prototype._resetTarget = function() {
var t = this.get("orient", !0), n = this._targetAxisInfoMap = K(), a = this._fillSpecifiedTargetAxis(n);
a ? this._orient = t || this._makeAutoOrientByTargetAxis() : (this._orient = t || "horizontal", this._fillAutoTargetAxisByOrient(n, this._orient)), this._noTarget = !0, n.each(function(i) {
i.indexList.length && (this._noTarget = !1);
}, this);
}, e.prototype._fillSpecifiedTargetAxis = function(t) {
var n = !1;
return C(Cw, function(a) {
var i = this.getReferringComponents(Jn(a), TP);
if (!!i.specified) {
n = !0;
var o = new gp();
C(i.models, function(s) {
o.add(s.componentIndex);
}), t.set(a, o);
}
}, this), n;
}, e.prototype._fillAutoTargetAxisByOrient = function(t, n) {
var a = this.ecModel, i = !0;
if (i) {
var o = n === "vertical" ? "y" : "x", s = a.findComponents({
mainType: o + "Axis"
});
l(s, o);
}
if (i) {
var s = a.findComponents({
mainType: "singleAxis",
filter: function(f) {
return f.get("orient", !0) === n;
}
});
l(s, "single");
}
function l(u, f) {
var h = u[0];
if (!!h) {
var c = new gp();
if (c.add(h.componentIndex), t.set(f, c), i = !1, f === "x" || f === "y") {
var v = h.getReferringComponents("grid", Kt).models[0];
v && C(u, function(p) {
h.componentIndex !== p.componentIndex && v === p.getReferringComponents("grid", Kt).models[0] && c.add(p.componentIndex);
});
}
}
}
i && C(Cw, function(u) {
if (!!i) {
var f = a.findComponents({
mainType: Jn(u),
filter: function(c) {
return c.get("type", !0) === "category";
}
});
if (f[0]) {
var h = new gp();
h.add(f[0].componentIndex), t.set(u, h), i = !1;
}
}
}, this);
}, e.prototype._makeAutoOrientByTargetAxis = function() {
var t;
return this.eachTargetAxis(function(n) {
!t && (t = n);
}, this), t === "y" ? "vertical" : "horizontal";
}, e.prototype._setDefaultThrottle = function(t) {
if (t.hasOwnProperty("throttle") && (this._autoThrottle = !1), this._autoThrottle) {
var n = this.ecModel.option;
this.option.throttle = n.animation && n.animationDurationUpdate > 0 ? 100 : 20;
}
}, e.prototype._updateRangeUse = function(t) {
var n = this._rangePropMode, a = this.get("rangeMode");
C([["start", "startValue"], ["end", "endValue"]], function(i, o) {
var s = t[i[0]] != null, l = t[i[1]] != null;
s && !l ? n[o] = "percent" : !s && l ? n[o] = "value" : a ? n[o] = a[o] : s && (n[o] = "percent");
});
}, e.prototype.noTarget = function() {
return this._noTarget;
}, e.prototype.getFirstTargetAxisModel = function() {
var t;
return this.eachTargetAxis(function(n, a) {
t == null && (t = this.ecModel.getComponent(Jn(n), a));
}, this), t;
}, e.prototype.eachTargetAxis = function(t, n) {
this._targetAxisInfoMap.each(function(a, i) {
C(a.indexList, function(o) {
t.call(n, i, o);
});
});
}, e.prototype.getAxisProxy = function(t, n) {
var a = this.getAxisModel(t, n);
if (a)
return a.__dzAxisProxy;
}, e.prototype.getAxisModel = function(t, n) {
process.env.NODE_ENV !== "production" && Q(t && n != null);
var a = this._targetAxisInfoMap.get(t);
if (a && a.indexMap[n])
return this.ecModel.getComponent(Jn(t), n);
}, e.prototype.setRawRange = function(t) {
var n = this.option, a = this.settledOption;
C([["start", "startValue"], ["end", "endValue"]], function(i) {
(t[i[0]] != null || t[i[1]] != null) && (n[i[0]] = a[i[0]] = t[i[0]], n[i[1]] = a[i[1]] = t[i[1]]);
}, this), this._updateRangeUse(t);
}, e.prototype.setCalculatedRange = function(t) {
var n = this.option;
C(["start", "startValue", "end", "endValue"], function(a) {
n[a] = t[a];
});
}, e.prototype.getPercentRange = function() {
var t = this.findRepresentativeAxisProxy();
if (t)
return t.getDataPercentWindow();
}, e.prototype.getValueRange = function(t, n) {
if (t == null && n == null) {
var a = this.findRepresentativeAxisProxy();
if (a)
return a.getDataValueWindow();
} else
return this.getAxisProxy(t, n).getDataValueWindow();
}, e.prototype.findRepresentativeAxisProxy = function(t) {
if (t)
return t.__dzAxisProxy;
for (var n, a = this._targetAxisInfoMap.keys(), i = 0; i < a.length; i++)
for (var o = a[i], s = this._targetAxisInfoMap.get(o), l = 0; l < s.indexList.length; l++) {
var u = this.getAxisProxy(o, s.indexList[l]);
if (u.hostedBy(this))
return u;
n || (n = u);
}
return n;
}, e.prototype.getRangePropMode = function() {
return this._rangePropMode.slice();
}, e.prototype.getOrient = function() {
return process.env.NODE_ENV !== "production" && Q(this._orient), this._orient;
}, e.type = "dataZoom", e.dependencies = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "series", "toolbox"], e.defaultOption = {
z: 4,
filterMode: "filter",
start: 0,
end: 100
}, e;
}(_t);
function Dw(r) {
var e = {};
return C(["start", "end", "startValue", "endValue", "throttle"], function(t) {
r.hasOwnProperty(t) && (e[t] = r[t]);
}), e;
}
const wl = sY;
var lY = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "dataZoom.select", e;
}(wl);
const uY = lY;
var fY = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a, i) {
this.dataZoomModel = t, this.ecModel = n, this.api = a;
}, e.type = "dataZoom", e;
}(Ht);
const Sm = fY;
var hY = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "dataZoom.select", e;
}(Sm);
const cY = hY;
var ro = C, Aw = lr, vY = function() {
function r(e, t, n, a) {
this._dimName = e, this._axisIndex = t, this.ecModel = a, this._dataZoomModel = n;
}
return r.prototype.hostedBy = function(e) {
return this._dataZoomModel === e;
}, r.prototype.getDataValueWindow = function() {
return this._valueWindow.slice();
}, r.prototype.getDataPercentWindow = function() {
return this._percentWindow.slice();
}, r.prototype.getTargetSeriesModels = function() {
var e = [];
return this.ecModel.eachSeries(function(t) {
if (iY(t)) {
var n = Jn(this._dimName), a = t.getReferringComponents(n, Kt).models[0];
a && this._axisIndex === a.componentIndex && e.push(t);
}
}, this), e;
}, r.prototype.getAxisModel = function() {
return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex);
}, r.prototype.getMinMaxSpan = function() {
return tt(this._minMaxSpan);
}, r.prototype.calculateDataWindow = function(e) {
var t = this._dataExtent, n = this.getAxisModel(), a = n.axis.scale, i = this._dataZoomModel.getRangePropMode(), o = [0, 100], s = [], l = [], u;
ro(["start", "end"], function(c, v) {
var p = e[c], d = e[c + "Value"];
i[v] === "percent" ? (p == null && (p = o[v]), d = a.parse(It(p, o, t))) : (u = !0, d = d == null ? t[v] : a.parse(d), p = It(d, t, o)), l[v] = d, s[v] = p;
}), Aw(l), Aw(s);
var f = this._minMaxSpan;
u ? h(l, s, t, o, !1) : h(s, l, o, t, !0);
function h(c, v, p, d, g) {
var y = g ? "Span" : "ValueSpan";
Mi(0, c, p, "all", f["min" + y], f["max" + y]);
for (var m = 0; m < 2; m++)
v[m] = It(c[m], p, d, !0), g && (v[m] = a.parse(v[m]));
}
return {
valueWindow: l,
percentWindow: s
};
}, r.prototype.reset = function(e) {
if (e === this._dataZoomModel) {
var t = this.getTargetSeriesModels();
this._dataExtent = pY(this, this._dimName, t), this._updateMinMaxSpan();
var n = this.calculateDataWindow(e.settledOption);
this._valueWindow = n.valueWindow, this._percentWindow = n.percentWindow, this._setAxisModel();
}
}, r.prototype.filterData = function(e, t) {
if (e !== this._dataZoomModel)
return;
var n = this._dimName, a = this.getTargetSeriesModels(), i = e.get("filterMode"), o = this._valueWindow;
if (i === "none")
return;
ro(a, function(l) {
var u = l.getData(), f = u.mapDimensionsAll(n);
if (!!f.length) {
if (i === "weakFilter") {
var h = u.getStore(), c = G(f, function(v) {
return u.getDimensionIndex(v);
}, u);
u.filterSelf(function(v) {
for (var p, d, g, y = 0; y < f.length; y++) {
var m = h.get(c[y], v), _ = !isNaN(m), S = m < o[0], w = m > o[1];
if (_ && !S && !w)
return !0;
_ && (g = !0), S && (p = !0), w && (d = !0);
}
return g && p && d;
});
} else
ro(f, function(v) {
if (i === "empty")
l.setData(u = u.map(v, function(d) {
return s(d) ? d : NaN;
}));
else {
var p = {};
p[v] = o, u.selectRange(p);
}
});
ro(f, function(v) {
u.setApproximateExtent(o, v);
});
}
});
function s(l) {
return l >= o[0] && l <= o[1];
}
}, r.prototype._updateMinMaxSpan = function() {
var e = this._minMaxSpan = {}, t = this._dataZoomModel, n = this._dataExtent;
ro(["min", "max"], function(a) {
var i = t.get(a + "Span"), o = t.get(a + "ValueSpan");
o != null && (o = this.getAxisModel().axis.scale.parse(o)), o != null ? i = It(n[0] + o, n, [0, 100], !0) : i != null && (o = It(i, [0, 100], n, !0) - n[0]), e[a + "Span"] = i, e[a + "ValueSpan"] = o;
}, this);
}, r.prototype._setAxisModel = function() {
var e = this.getAxisModel(), t = this._percentWindow, n = this._valueWindow;
if (!!t) {
var a = NT(n, [0, 500]);
a = Math.min(a, 20);
var i = e.axis.scale.rawExtentInfo;
t[0] !== 0 && i.setDeterminedMinMax("min", +n[0].toFixed(a)), t[1] !== 100 && i.setDeterminedMinMax("max", +n[1].toFixed(a)), i.freeze();
}
}, r;
}();
function pY(r, e, t) {
var n = [1 / 0, -1 / 0];
ro(t, function(o) {
GB(n, o.getData(), e);
});
var a = r.getAxisModel(), i = zA(a.axis.scale, a, n).calculate();
return [i.min, i.max];
}
const dY = vY;
var gY = {
getTargetSeries: function(r) {
function e(a) {
r.eachComponent("dataZoom", function(i) {
i.eachTargetAxis(function(o, s) {
var l = r.getComponent(Jn(o), s);
a(o, s, l, i);
});
});
}
e(function(a, i, o, s) {
o.__dzAxisProxy = null;
});
var t = [];
e(function(a, i, o, s) {
o.__dzAxisProxy || (o.__dzAxisProxy = new dY(a, i, s, r), t.push(o.__dzAxisProxy));
});
var n = K();
return C(t, function(a) {
C(a.getTargetSeriesModels(), function(i) {
n.set(i.uid, i);
});
}), n;
},
overallReset: function(r, e) {
r.eachComponent("dataZoom", function(t) {
t.eachTargetAxis(function(n, a) {
t.getAxisProxy(n, a).reset(t);
}), t.eachTargetAxis(function(n, a) {
t.getAxisProxy(n, a).filterData(t, e);
});
}), r.eachComponent("dataZoom", function(t) {
var n = t.findRepresentativeAxisProxy();
if (n) {
var a = n.getDataPercentWindow(), i = n.getDataValueWindow();
t.setCalculatedRange({
start: a[0],
end: a[1],
startValue: i[0],
endValue: i[1]
});
}
});
}
};
const yY = gY;
function mY(r) {
r.registerAction("dataZoom", function(e, t) {
var n = oY(t, e);
C(n, function(a) {
a.setRawRange({
start: e.start,
end: e.end,
startValue: e.startValue,
endValue: e.endValue
});
});
});
}
var Mw = !1;
function xm(r) {
Mw || (Mw = !0, r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER, yY), mY(r), r.registerSubTypeDefaulter("dataZoom", function() {
return "slider";
}));
}
function _Y(r) {
r.registerComponentModel(uY), r.registerComponentView(cY), xm(r);
}
var ir = function() {
function r() {
}
return r;
}(), bI = {};
function no(r, e) {
bI[r] = e;
}
function TI(r) {
return bI[r];
}
var SY = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.optionUpdated = function() {
r.prototype.optionUpdated.apply(this, arguments);
var t = this.ecModel;
C(this.option.feature, function(n, a) {
var i = TI(a);
i && (i.getDefaultOption && (i.defaultOption = i.getDefaultOption(t)), lt(n, i.defaultOption));
});
}, e.type = "toolbox", e.layoutMode = {
type: "box",
ignoreSize: !0
}, e.defaultOption = {
show: !0,
z: 6,
orient: "horizontal",
left: "right",
top: "top",
backgroundColor: "transparent",
borderColor: "#ccc",
borderRadius: 0,
borderWidth: 0,
padding: 5,
itemSize: 15,
itemGap: 8,
showTitle: !0,
iconStyle: {
borderColor: "#666",
color: "none"
},
emphasis: {
iconStyle: {
borderColor: "#3E98C5"
}
},
tooltip: {
show: !1,
position: "bottom"
}
}, e;
}(_t);
const xY = SY;
function wY(r, e, t) {
var n = e.getBoxLayoutParams(), a = e.get("padding"), i = {
width: t.getWidth(),
height: t.getHeight()
}, o = ee(n, i, a);
ui(e.get("orient"), r, e.get("itemGap"), o.width, o.height), $h(r, n, i, a);
}
function CI(r, e) {
var t = zo(e.get("padding")), n = e.getItemStyle(["color", "opacity"]);
return n.fill = e.get("backgroundColor"), r = new xt({
shape: {
x: r.x - t[3],
y: r.y - t[0],
width: r.width + t[1] + t[3],
height: r.height + t[0] + t[2],
r: e.get("borderRadius")
},
style: n,
silent: !0,
z2: -1
}), r;
}
var bY = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.render = function(t, n, a, i) {
var o = this.group;
if (o.removeAll(), !t.get("show"))
return;
var s = +t.get("itemSize"), l = t.get("orient") === "vertical", u = t.get("feature") || {}, f = this._features || (this._features = {}), h = [];
C(u, function(p, d) {
h.push(d);
}), new wn(this._featureNames || [], h).add(c).update(c).remove(it(c, null)).execute(), this._featureNames = h;
function c(p, d) {
var g = h[p], y = h[d], m = u[g], _ = new kt(m, t, t.ecModel), S;
if (i && i.newTitle != null && i.featureName === g && (m.title = i.newTitle), g && !y) {
if (TY(g))
S = {
onclick: _.option.onclick,
featureName: g
};
else {
var w = TI(g);
if (!w)
return;
S = new w();
}
f[g] = S;
} else if (S = f[y], !S)
return;
S.uid = Bo("toolbox-feature"), S.model = _, S.ecModel = n, S.api = a;
var x = S instanceof ir;
if (!g && y) {
x && S.dispose && S.dispose(n, a);
return;
}
if (!_.get("show") || x && S.unusable) {
x && S.remove && S.remove(n, a);
return;
}
v(_, S, g), _.setIconStatus = function(b, T) {
var D = this.option, A = this.iconPaths;
D.iconStatus = D.iconStatus || {}, D.iconStatus[b] = T, A[b] && (T === "emphasis" ? Sn : xn)(A[b]);
}, S instanceof ir && S.render && S.render(_, n, a, i);
}
function v(p, d, g) {
var y = p.getModel("iconStyle"), m = p.getModel(["emphasis", "iconStyle"]), _ = d instanceof ir && d.getIcons ? d.getIcons() : p.get("icon"), S = p.get("title") || {}, w, x;
W(_) ? (w = {}, w[g] = _) : w = _, W(S) ? (x = {}, x[g] = S) : x = S;
var b = p.iconPaths = {};
C(w, function(T, D) {
var A = Pl(T, {}, {
x: -s / 2,
y: -s / 2,
width: s,
height: s
});
A.setStyle(y.getItemStyle());
var M = A.ensureState("emphasis");
M.style = m.getItemStyle();
var L = new Ct({
style: {
text: x[D],
align: m.get("textAlign"),
borderRadius: m.get("textBorderRadius"),
padding: m.get("textPadding"),
fill: null
},
ignore: !0
});
A.setTextContent(L), Oo({
el: A,
componentModel: t,
itemName: D,
formatterParamsExtra: {
title: x[D]
}
}), A.__title = x[D], A.on("mouseover", function() {
var I = m.getItemStyle(), E = l ? t.get("right") == null && t.get("left") !== "right" ? "right" : "left" : t.get("bottom") == null && t.get("top") !== "bottom" ? "bottom" : "top";
L.setStyle({
fill: m.get("textFill") || I.fill || I.stroke || "#000",
backgroundColor: m.get("textBackgroundColor")
}), A.setTextConfig({
position: m.get("textPosition") || E
}), L.ignore = !t.get("showTitle"), a.enterEmphasis(this);
}).on("mouseout", function() {
p.get(["iconStatus", D]) !== "emphasis" && a.leaveEmphasis(this), L.hide();
}), (p.get(["iconStatus", D]) === "emphasis" ? Sn : xn)(A), o.add(A), A.on("click", Y(d.onclick, d, n, a, D)), b[D] = A;
});
}
wY(o, t, a), o.add(CI(o.getBoundingRect(), t)), l || o.eachChild(function(p) {
var d = p.__title, g = p.ensureState("emphasis"), y = g.textConfig || (g.textConfig = {}), m = p.getTextContent(), _ = m && m.ensureState("emphasis");
if (_ && !q(_) && d) {
var S = _.style || (_.style = {}), w = Al(d, Ct.makeFont(S)), x = p.x + o.x, b = p.y + o.y + s, T = !1;
b + w.height > a.getHeight() && (y.position = "top", T = !0);
var D = T ? -5 - w.height : s + 10;
x + w.width / 2 > a.getWidth() ? (y.position = ["100%", D], S.align = "right") : x - w.width / 2 < 0 && (y.position = [0, D], S.align = "left");
}
});
}, e.prototype.updateView = function(t, n, a, i) {
C(this._features, function(o) {
o instanceof ir && o.updateView && o.updateView(o.model, n, a, i);
});
}, e.prototype.remove = function(t, n) {
C(this._features, function(a) {
a instanceof ir && a.remove && a.remove(t, n);
}), this.group.removeAll();
}, e.prototype.dispose = function(t, n) {
C(this._features, function(a) {
a instanceof ir && a.dispose && a.dispose(t, n);
});
}, e.type = "toolbox", e;
}(Ht);
function TY(r) {
return r.indexOf("my") === 0;
}
const CY = bY;
var DY = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.onclick = function(t, n) {
var a = this.model, i = a.get("name") || t.get("title.0.text") || "echarts", o = n.getZr().painter.getType() === "svg", s = o ? "svg" : a.get("type", !0) || "png", l = n.getConnectedDataURL({
type: s,
backgroundColor: a.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff",
connectedBackgroundColor: a.get("connectedBackgroundColor"),
excludeComponents: a.get("excludeComponents"),
pixelRatio: a.get("pixelRatio")
}), u = Dt.browser;
if (q(MouseEvent) && (u.newEdge || !u.ie && !u.edge)) {
var f = document.createElement("a");
f.download = i + "." + s, f.target = "_blank", f.href = l;
var h = new MouseEvent("click", {
view: document.defaultView,
bubbles: !0,
cancelable: !1
});
f.dispatchEvent(h);
} else if (window.navigator.msSaveOrOpenBlob || o) {
var c = l.split(","), v = c[0].indexOf("base64") > -1, p = o ? decodeURIComponent(c[1]) : c[1];
v && (p = window.atob(p));
var d = i + "." + s;
if (window.navigator.msSaveOrOpenBlob) {
for (var g = p.length, y = new Uint8Array(g); g--; )
y[g] = p.charCodeAt(g);
var m = new Blob([y]);
window.navigator.msSaveOrOpenBlob(m, d);
} else {
var _ = document.createElement("iframe");
document.body.appendChild(_);
var S = _.contentWindow, w = S.document;
w.open("image/svg+xml", "replace"), w.write(p), w.close(), S.focus(), w.execCommand("SaveAs", !0, d), document.body.removeChild(_);
}
} else {
var x = a.get("lang"), b = '
', T = window.open();
T.document.write(b), T.document.title = i;
}
}, e.getDefaultOption = function(t) {
var n = {
show: !0,
icon: "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
title: t.getLocaleModel().get(["toolbox", "saveAsImage", "title"]),
type: "png",
connectedBackgroundColor: "#fff",
name: "",
excludeComponents: ["toolbox"],
lang: t.getLocaleModel().get(["toolbox", "saveAsImage", "lang"])
};
return n;
}, e;
}(ir);
const AY = DY;
var Lw = "__ec_magicType_stack__", MY = [["line", "bar"], ["stack"]], LY = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.getIcons = function() {
var t = this.model, n = t.get("icon"), a = {};
return C(t.get("type"), function(i) {
n[i] && (a[i] = n[i]);
}), a;
}, e.getDefaultOption = function(t) {
var n = {
show: !0,
type: [],
icon: {
line: "M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",
bar: "M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",
stack: "M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"
},
title: t.getLocaleModel().get(["toolbox", "magicType", "title"]),
option: {},
seriesIndex: {}
};
return n;
}, e.prototype.onclick = function(t, n, a) {
var i = this.model, o = i.get(["seriesIndex", a]);
if (!!Iw[a]) {
var s = {
series: []
}, l = function(h) {
var c = h.subType, v = h.id, p = Iw[a](c, v, h, i);
p && (J(p, h.option), s.series.push(p));
var d = h.coordinateSystem;
if (d && d.type === "cartesian2d" && (a === "line" || a === "bar")) {
var g = d.getAxesByScale("ordinal")[0];
if (g) {
var y = g.dim, m = y + "Axis", _ = h.getReferringComponents(m, Kt).models[0], S = _.componentIndex;
s[m] = s[m] || [];
for (var w = 0; w <= S; w++)
s[m][S] = s[m][S] || {};
s[m][S].boundaryGap = a === "bar";
}
}
};
C(MY, function(h) {
ct(h, a) >= 0 && C(h, function(c) {
i.setIconStatus(c, "normal");
});
}), i.setIconStatus(a, "emphasis"), t.eachComponent({
mainType: "series",
query: o == null ? null : {
seriesIndex: o
}
}, l);
var u, f = a;
a === "stack" && (u = lt({
stack: i.option.title.tiled,
tiled: i.option.title.stack
}, i.option.title), i.get(["iconStatus", a]) !== "emphasis" && (f = "tiled")), n.dispatchAction({
type: "changeMagicType",
currentType: f,
newOption: s,
newTitle: u,
featureName: "magicType"
});
}
}, e;
}(ir), Iw = {
line: function(r, e, t, n) {
if (r === "bar")
return lt({
id: e,
type: "line",
data: t.get("data"),
stack: t.get("stack"),
markPoint: t.get("markPoint"),
markLine: t.get("markLine")
}, n.get(["option", "line"]) || {}, !0);
},
bar: function(r, e, t, n) {
if (r === "line")
return lt({
id: e,
type: "bar",
data: t.get("data"),
stack: t.get("stack"),
markPoint: t.get("markPoint"),
markLine: t.get("markLine")
}, n.get(["option", "bar"]) || {}, !0);
},
stack: function(r, e, t, n) {
var a = t.get("stack") === Lw;
if (r === "line" || r === "bar")
return n.setIconStatus("stack", a ? "normal" : "emphasis"), lt({
id: e,
stack: a ? "" : Lw
}, n.get(["option", "stack"]) || {}, !0);
}
};
en({
type: "changeMagicType",
event: "magicTypeChanged",
update: "prepareAndUpdate"
}, function(r, e) {
e.mergeOption(r.newOption);
});
const IY = LY;
var oc = new Array(60).join("-"), Lo = " ";
function EY(r) {
var e = {}, t = [], n = [];
return r.eachRawSeries(function(a) {
var i = a.coordinateSystem;
if (i && (i.type === "cartesian2d" || i.type === "polar")) {
var o = i.getBaseAxis();
if (o.type === "category") {
var s = o.dim + "_" + o.index;
e[s] || (e[s] = {
categoryAxis: o,
valueAxis: i.getOtherAxis(o),
series: []
}, n.push({
axisDim: o.dim,
axisIndex: o.index
})), e[s].series.push(a);
} else
t.push(a);
} else
t.push(a);
}), {
seriesGroupByCategoryAxis: e,
other: t,
meta: n
};
}
function PY(r) {
var e = [];
return C(r, function(t, n) {
var a = t.categoryAxis, i = t.valueAxis, o = i.dim, s = [" "].concat(G(t.series, function(v) {
return v.name;
})), l = [a.model.getCategories()];
C(t.series, function(v) {
var p = v.getRawData();
l.push(v.getRawData().mapArray(p.mapDimension(o), function(d) {
return d;
}));
});
for (var u = [s.join(Lo)], f = 0; f < l[0].length; f++) {
for (var h = [], c = 0; c < l.length; c++)
h.push(l[c][f]);
u.push(h.join(Lo));
}
e.push(u.join(`
`));
}), e.join(`
` + oc + `
`);
}
function NY(r) {
return G(r, function(e) {
var t = e.getRawData(), n = [e.name], a = [];
return t.each(t.dimensions, function() {
for (var i = arguments.length, o = arguments[i - 1], s = t.getName(o), l = 0; l < i - 1; l++)
a[l] = arguments[l];
n.push((s ? s + Lo : "") + a.join(Lo));
}), n.join(`
`);
}).join(`
` + oc + `
`);
}
function RY(r) {
var e = EY(r);
return {
value: Et([PY(e.seriesGroupByCategoryAxis), NY(e.other)], function(t) {
return !!t.replace(/[\n\t\s]/g, "");
}).join(`
` + oc + `
`),
meta: e.meta
};
}
function fh(r) {
return r.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function kY(r) {
var e = r.slice(0, r.indexOf(`
`));
if (e.indexOf(Lo) >= 0)
return !0;
}
var vg = new RegExp("[" + Lo + "]+", "g");
function OY(r) {
for (var e = r.split(/\n+/g), t = fh(e.shift()).split(vg), n = [], a = G(t, function(l) {
return {
name: l,
data: []
};
}), i = 0; i < e.length; i++) {
var o = fh(e[i]).split(vg);
n.push(o.shift());
for (var s = 0; s < o.length; s++)
a[s] && (a[s].data[i] = o[s]);
}
return {
series: a,
categories: n
};
}
function VY(r) {
for (var e = r.split(/\n+/g), t = fh(e.shift()), n = [], a = 0; a < e.length; a++) {
var i = fh(e[a]);
if (!!i) {
var o = i.split(vg), s = "", l = void 0, u = !1;
isNaN(o[0]) ? (u = !0, s = o[0], o = o.slice(1), n[a] = {
name: s,
value: []
}, l = n[a].value) : l = n[a] = [];
for (var f = 0; f < o.length; f++)
l.push(+o[f]);
l.length === 1 && (u ? n[a].value = l[0] : n[a] = l[0]);
}
}
return {
name: t,
data: n
};
}
function BY(r, e) {
var t = r.split(new RegExp(`
*` + oc + `
*`, "g")), n = {
series: []
};
return C(t, function(a, i) {
if (kY(a)) {
var o = OY(a), s = e[i], l = s.axisDim + "Axis";
s && (n[l] = n[l] || [], n[l][s.axisIndex] = {
data: o.categories
}, n.series = n.series.concat(o.series));
} else {
var o = VY(a);
n.series.push(o);
}
}), n;
}
var zY = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.onclick = function(t, n) {
setTimeout(function() {
n.dispatchAction({
type: "hideTip"
});
});
var a = n.getDom(), i = this.model;
this._dom && a.removeChild(this._dom);
var o = document.createElement("div");
o.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;padding:5px", o.style.backgroundColor = i.get("backgroundColor") || "#fff";
var s = document.createElement("h4"), l = i.get("lang") || [];
s.innerHTML = l[0] || i.get("title"), s.style.cssText = "margin:10px 20px", s.style.color = i.get("textColor");
var u = document.createElement("div"), f = document.createElement("textarea");
u.style.cssText = "overflow:auto";
var h = i.get("optionToContent"), c = i.get("contentToOption"), v = RY(t);
if (q(h)) {
var p = h(n.getOption());
W(p) ? u.innerHTML = p : mo(p) && u.appendChild(p);
} else {
f.readOnly = i.get("readOnly");
var d = f.style;
d.cssText = "display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none", d.color = i.get("textColor"), d.borderColor = i.get("textareaBorderColor"), d.backgroundColor = i.get("textareaColor"), f.value = v.value, u.appendChild(f);
}
var g = v.meta, y = document.createElement("div");
y.style.cssText = "position:absolute;bottom:5px;left:0;right:0";
var m = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", _ = document.createElement("div"), S = document.createElement("div");
m += ";background-color:" + i.get("buttonColor"), m += ";color:" + i.get("buttonTextColor");
var w = this;
function x() {
a.removeChild(o), w._dom = null;
}
Zp(_, "click", x), Zp(S, "click", function() {
if (c == null && h != null || c != null && h == null) {
process.env.NODE_ENV !== "production" && _e("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."), x();
return;
}
var b;
try {
q(c) ? b = c(u, n.getOption()) : b = BY(f.value, g);
} catch (T) {
throw x(), new Error("Data view format error " + T);
}
b && n.dispatchAction({
type: "changeDataView",
newOption: b
}), x();
}), _.innerHTML = l[1], S.innerHTML = l[2], S.style.cssText = _.style.cssText = m, !i.get("readOnly") && y.appendChild(S), y.appendChild(_), o.appendChild(s), o.appendChild(u), o.appendChild(y), u.style.height = a.clientHeight - 80 + "px", a.appendChild(o), this._dom = o;
}, e.prototype.remove = function(t, n) {
this._dom && n.getDom().removeChild(this._dom);
}, e.prototype.dispose = function(t, n) {
this.remove(t, n);
}, e.getDefaultOption = function(t) {
var n = {
show: !0,
readOnly: !1,
optionToContent: null,
contentToOption: null,
icon: "M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",
title: t.getLocaleModel().get(["toolbox", "dataView", "title"]),
lang: t.getLocaleModel().get(["toolbox", "dataView", "lang"]),
backgroundColor: "#fff",
textColor: "#000",
textareaColor: "#fff",
textareaBorderColor: "#333",
buttonColor: "#c23531",
buttonTextColor: "#fff"
};
return n;
}, e;
}(ir);
function GY(r, e) {
return G(r, function(t, n) {
var a = e && e[n];
if (j(a) && !z(a)) {
var i = j(t) && !z(t);
i || (t = {
value: t
});
var o = a.name != null && t.name == null;
return t = J(t, a), o && delete t.name, t;
} else
return t;
});
}
en({
type: "changeDataView",
event: "dataViewChanged",
update: "prepareAndUpdate"
}, function(r, e) {
var t = [];
C(r.newOption.series, function(n) {
var a = e.getSeriesByName(n.name)[0];
if (!a)
t.push(B({
type: "scatter"
}, n));
else {
var i = a.get("data");
t.push({
name: n.name,
data: GY(n.data, i)
});
}
}), e.mergeOption(J({
series: t
}, r.newOption));
});
const FY = zY;
var DI = C, AI = Tt();
function HY(r, e) {
var t = wm(r);
DI(e, function(n, a) {
for (var i = t.length - 1; i >= 0; i--) {
var o = t[i];
if (o[a])
break;
}
if (i < 0) {
var s = r.queryComponents({
mainType: "dataZoom",
subType: "select",
id: a
})[0];
if (s) {
var l = s.getPercentRange();
t[0][a] = {
dataZoomId: a,
start: l[0],
end: l[1]
};
}
}
}), t.push(e);
}
function $Y(r) {
var e = wm(r), t = e[e.length - 1];
e.length > 1 && e.pop();
var n = {};
return DI(t, function(a, i) {
for (var o = e.length - 1; o >= 0; o--)
if (a = e[o][i], a) {
n[i] = a;
break;
}
}), n;
}
function WY(r) {
AI(r).snapshots = null;
}
function UY(r) {
return wm(r).length;
}
function wm(r) {
var e = AI(r);
return e.snapshots || (e.snapshots = [{}]), e.snapshots;
}
var YY = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.onclick = function(t, n) {
WY(t), n.dispatchAction({
type: "restore",
from: this.uid
});
}, e.getDefaultOption = function(t) {
var n = {
show: !0,
icon: "M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",
title: t.getLocaleModel().get(["toolbox", "restore", "title"])
};
return n;
}, e;
}(ir);
en({
type: "restore",
event: "restore",
update: "prepareAndUpdate"
}, function(r, e) {
e.resetOption("recreate");
});
const ZY = YY;
var XY = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], qY = function() {
function r(e, t, n) {
var a = this;
this._targetInfoList = [];
var i = Ew(t, e);
C(KY, function(o, s) {
(!n || !n.include || ct(n.include, s) >= 0) && o(i, a._targetInfoList);
});
}
return r.prototype.setOutputRanges = function(e, t) {
return this.matchOutputRanges(e, t, function(n, a, i) {
if ((n.coordRanges || (n.coordRanges = [])).push(a), !n.coordRange) {
n.coordRange = a;
var o = yp[n.brushType](0, i, a);
n.__rangeOffset = {
offset: kw[n.brushType](o.values, n.range, [1, 1]),
xyMinMax: o.xyMinMax
};
}
}), e;
}, r.prototype.matchOutputRanges = function(e, t, n) {
C(e, function(a) {
var i = this.findTargetInfo(a, t);
i && i !== !0 && C(i.coordSyses, function(o) {
var s = yp[a.brushType](1, o, a.range, !0);
n(a, s.values, o, t);
});
}, this);
}, r.prototype.setInputRanges = function(e, t) {
C(e, function(n) {
var a = this.findTargetInfo(n, t);
if (process.env.NODE_ENV !== "production" && (Q(!a || a === !0 || n.coordRange, "coordRange must be specified when coord index specified."), Q(!a || a !== !0 || n.range, "range must be specified in global brush.")), n.range = n.range || [], a && a !== !0) {
n.panelId = a.panelId;
var i = yp[n.brushType](0, a.coordSys, n.coordRange), o = n.__rangeOffset;
n.range = o ? kw[n.brushType](i.values, o.offset, jY(i.xyMinMax, o.xyMinMax)) : i.values;
}
}, this);
}, r.prototype.makePanelOpts = function(e, t) {
return G(this._targetInfoList, function(n) {
var a = n.getPanelRect();
return {
panelId: n.panelId,
defaultBrushType: t ? t(n) : null,
clipPath: NL(a),
isTargetByCursor: kL(a, e, n.coordSysModel),
getLinearBrushOtherExtent: RL(a)
};
});
}, r.prototype.controlSeries = function(e, t, n) {
var a = this.findTargetInfo(e, n);
return a === !0 || a && ct(a.coordSyses, t.coordinateSystem) >= 0;
}, r.prototype.findTargetInfo = function(e, t) {
for (var n = this._targetInfoList, a = Ew(t, e), i = 0; i < n.length; i++) {
var o = n[i], s = e.panelId;
if (s) {
if (o.panelId === s)
return o;
} else
for (var l = 0; l < Pw.length; l++)
if (Pw[l](a, o))
return o;
}
return !0;
}, r;
}();
function pg(r) {
return r[0] > r[1] && r.reverse(), r;
}
function Ew(r, e) {
return Hs(r, e, {
includeMainTypes: XY
});
}
var KY = {
grid: function(r, e) {
var t = r.xAxisModels, n = r.yAxisModels, a = r.gridModels, i = K(), o = {}, s = {};
!t && !n && !a || (C(t, function(l) {
var u = l.axis.grid.model;
i.set(u.id, u), o[u.id] = !0;
}), C(n, function(l) {
var u = l.axis.grid.model;
i.set(u.id, u), s[u.id] = !0;
}), C(a, function(l) {
i.set(l.id, l), o[l.id] = !0, s[l.id] = !0;
}), i.each(function(l) {
var u = l.coordinateSystem, f = [];
C(u.getCartesians(), function(h, c) {
(ct(t, h.getAxis("x").model) >= 0 || ct(n, h.getAxis("y").model) >= 0) && f.push(h);
}), e.push({
panelId: "grid--" + l.id,
gridModel: l,
coordSysModel: l,
coordSys: f[0],
coordSyses: f,
getPanelRect: Nw.grid,
xAxisDeclared: o[l.id],
yAxisDeclared: s[l.id]
});
}));
},
geo: function(r, e) {
C(r.geoModels, function(t) {
var n = t.coordinateSystem;
e.push({
panelId: "geo--" + t.id,
geoModel: t,
coordSysModel: t,
coordSys: n,
coordSyses: [n],
getPanelRect: Nw.geo
});
});
}
}, Pw = [
function(r, e) {
var t = r.xAxisModel, n = r.yAxisModel, a = r.gridModel;
return !a && t && (a = t.axis.grid.model), !a && n && (a = n.axis.grid.model), a && a === e.gridModel;
},
function(r, e) {
var t = r.geoModel;
return t && t === e.geoModel;
}
], Nw = {
grid: function() {
return this.coordSys.master.getRect().clone();
},
geo: function() {
var r = this.coordSys, e = r.getBoundingRect().clone();
return e.applyTransform(li(r)), e;
}
}, yp = {
lineX: it(Rw, 0),
lineY: it(Rw, 1),
rect: function(r, e, t, n) {
var a = r ? e.pointToData([t[0][0], t[1][0]], n) : e.dataToPoint([t[0][0], t[1][0]], n), i = r ? e.pointToData([t[0][1], t[1][1]], n) : e.dataToPoint([t[0][1], t[1][1]], n), o = [pg([a[0], i[0]]), pg([a[1], i[1]])];
return {
values: o,
xyMinMax: o
};
},
polygon: function(r, e, t, n) {
var a = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]], i = G(t, function(o) {
var s = r ? e.pointToData(o, n) : e.dataToPoint(o, n);
return a[0][0] = Math.min(a[0][0], s[0]), a[1][0] = Math.min(a[1][0], s[1]), a[0][1] = Math.max(a[0][1], s[0]), a[1][1] = Math.max(a[1][1], s[1]), s;
});
return {
values: i,
xyMinMax: a
};
}
};
function Rw(r, e, t, n) {
process.env.NODE_ENV !== "production" && Q(t.type === "cartesian2d", "lineX/lineY brush is available only in cartesian2d.");
var a = t.getAxis(["x", "y"][r]), i = pg(G([0, 1], function(s) {
return e ? a.coordToData(a.toLocalCoord(n[s]), !0) : a.toGlobalCoord(a.dataToCoord(n[s]));
})), o = [];
return o[r] = i, o[1 - r] = [NaN, NaN], {
values: i,
xyMinMax: o
};
}
var kw = {
lineX: it(Ow, 0),
lineY: it(Ow, 1),
rect: function(r, e, t) {
return [[r[0][0] - t[0] * e[0][0], r[0][1] - t[0] * e[0][1]], [r[1][0] - t[1] * e[1][0], r[1][1] - t[1] * e[1][1]]];
},
polygon: function(r, e, t) {
return G(r, function(n, a) {
return [n[0] - t[0] * e[a][0], n[1] - t[1] * e[a][1]];
});
}
};
function Ow(r, e, t, n) {
return [e[0] - n[r] * t[0], e[1] - n[r] * t[1]];
}
function jY(r, e) {
var t = Vw(r), n = Vw(e), a = [t[0] / n[0], t[1] / n[1]];
return isNaN(a[0]) && (a[0] = 1), isNaN(a[1]) && (a[1] = 1), a;
}
function Vw(r) {
return r ? [r[0][1] - r[0][0], r[1][1] - r[1][0]] : [NaN, NaN];
}
const bm = qY;
var dg = C, JY = _P("toolbox-dataZoom_"), QY = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.render = function(t, n, a, i) {
this._brushController || (this._brushController = new nm(a.getZr()), this._brushController.on("brush", Y(this._onBrush, this)).mount()), r7(t, n, this, i, a), e7(t, n);
}, e.prototype.onclick = function(t, n, a) {
t7[a].call(this);
}, e.prototype.remove = function(t, n) {
this._brushController && this._brushController.unmount();
}, e.prototype.dispose = function(t, n) {
this._brushController && this._brushController.dispose();
}, e.prototype._onBrush = function(t) {
var n = t.areas;
if (!t.isEnd || !n.length)
return;
var a = {}, i = this.ecModel;
this._brushController.updateCovers([]);
var o = new bm(Tm(this.model), i, {
include: ["grid"]
});
o.matchOutputRanges(n, i, function(u, f, h) {
if (h.type === "cartesian2d") {
var c = u.brushType;
c === "rect" ? (s("x", h, f[0]), s("y", h, f[1])) : s({
lineX: "x",
lineY: "y"
}[c], h, f);
}
}), HY(i, a), this._dispatchZoomAction(a);
function s(u, f, h) {
var c = f.getAxis(u), v = c.model, p = l(u, v, i), d = p.findRepresentativeAxisProxy(v).getMinMaxSpan();
(d.minValueSpan != null || d.maxValueSpan != null) && (h = Mi(0, h.slice(), c.scale.getExtent(), 0, d.minValueSpan, d.maxValueSpan)), p && (a[p.id] = {
dataZoomId: p.id,
startValue: h[0],
endValue: h[1]
});
}
function l(u, f, h) {
var c;
return h.eachComponent({
mainType: "dataZoom",
subType: "select"
}, function(v) {
var p = v.getAxisModel(u, f.componentIndex);
p && (c = v);
}), c;
}
}, e.prototype._dispatchZoomAction = function(t) {
var n = [];
dg(t, function(a, i) {
n.push(tt(a));
}), n.length && this.api.dispatchAction({
type: "dataZoom",
from: this.uid,
batch: n
});
}, e.getDefaultOption = function(t) {
var n = {
show: !0,
filterMode: "filter",
icon: {
zoom: "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
back: "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
},
title: t.getLocaleModel().get(["toolbox", "dataZoom", "title"]),
brushStyle: {
borderWidth: 0,
color: "rgba(210,219,238,0.2)"
}
};
return n;
}, e;
}(ir), t7 = {
zoom: function() {
var r = !this._isZoomActive;
this.api.dispatchAction({
type: "takeGlobalCursor",
key: "dataZoomSelect",
dataZoomSelectActive: r
});
},
back: function() {
this._dispatchZoomAction($Y(this.ecModel));
}
};
function Tm(r) {
var e = {
xAxisIndex: r.get("xAxisIndex", !0),
yAxisIndex: r.get("yAxisIndex", !0),
xAxisId: r.get("xAxisId", !0),
yAxisId: r.get("yAxisId", !0)
};
return e.xAxisIndex == null && e.xAxisId == null && (e.xAxisIndex = "all"), e.yAxisIndex == null && e.yAxisId == null && (e.yAxisIndex = "all"), e;
}
function e7(r, e) {
r.setIconStatus("back", UY(e) > 1 ? "emphasis" : "normal");
}
function r7(r, e, t, n, a) {
var i = t._isZoomActive;
n && n.type === "takeGlobalCursor" && (i = n.key === "dataZoomSelect" ? n.dataZoomSelectActive : !1), t._isZoomActive = i, r.setIconStatus("zoom", i ? "emphasis" : "normal");
var o = new bm(Tm(r), e, {
include: ["grid"]
}), s = o.makePanelOpts(a, function(l) {
return l.xAxisDeclared && !l.yAxisDeclared ? "lineX" : !l.xAxisDeclared && l.yAxisDeclared ? "lineY" : "rect";
});
t._brushController.setPanels(s).enableBrush(i && s.length ? {
brushType: "auto",
brushStyle: r.getModel("brushStyle").getItemStyle()
} : !1);
}
rk("dataZoom", function(r) {
var e = r.getComponent("toolbox", 0), t = ["feature", "dataZoom"];
if (!e || e.get(t) == null)
return;
var n = e.getModel(t), a = [], i = Tm(n), o = Hs(r, i);
dg(o.xAxisModels, function(l) {
return s(l, "xAxis", "xAxisIndex");
}), dg(o.yAxisModels, function(l) {
return s(l, "yAxis", "yAxisIndex");
});
function s(l, u, f) {
var h = l.componentIndex, c = {
type: "select",
$fromToolbox: !0,
filterMode: n.get("filterMode", !0) || "filter",
id: JY + u + h
};
c[f] = h, a.push(c);
}
return a;
});
const n7 = QY;
function a7(r) {
r.registerComponentModel(xY), r.registerComponentView(CY), no("saveAsImage", AY), no("magicType", IY), no("dataView", FY), no("dataZoom", n7), no("restore", ZY), pt(_Y);
}
var i7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "tooltip", e.dependencies = ["axisPointer"], e.defaultOption = {
z: 60,
show: !0,
showContent: !0,
trigger: "item",
triggerOn: "mousemove|click",
alwaysShowContent: !1,
displayMode: "single",
renderMode: "auto",
confine: null,
showDelay: 0,
hideDelay: 100,
transitionDuration: 0.4,
enterable: !1,
backgroundColor: "#fff",
shadowBlur: 10,
shadowColor: "rgba(0, 0, 0, .2)",
shadowOffsetX: 1,
shadowOffsetY: 2,
borderRadius: 4,
borderWidth: 1,
padding: null,
extraCssText: "",
axisPointer: {
type: "line",
axis: "auto",
animation: "auto",
animationDurationUpdate: 200,
animationEasingUpdate: "exponentialOut",
crossStyle: {
color: "#999",
width: 1,
type: "dashed",
textStyle: {}
}
},
textStyle: {
color: "#666",
fontSize: 14
}
}, e;
}(_t);
const o7 = i7;
function MI(r) {
var e = r.get("confine");
return e != null ? !!e : r.get("renderMode") === "richText";
}
function LI(r) {
if (!!Dt.domSupported) {
for (var e = document.documentElement.style, t = 0, n = r.length; t < n; t++)
if (r[t] in e)
return r[t];
}
}
var II = LI(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), s7 = LI(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]);
function EI(r, e) {
if (!r)
return e;
e = rD(e, !0);
var t = r.indexOf(e);
return r = t === -1 ? e : "-" + r.slice(0, t) + "-" + e, r.toLowerCase();
}
function l7(r, e) {
var t = r.currentStyle || document.defaultView && document.defaultView.getComputedStyle(r);
return t ? e ? t[e] : t : null;
}
var u7 = EI(s7, "transition"), Cm = EI(II, "transform"), f7 = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + (Dt.transform3dSupported ? "will-change:transform;" : "");
function h7(r) {
return r = r === "left" ? "right" : r === "right" ? "left" : r === "top" ? "bottom" : "top", r;
}
function c7(r, e, t) {
if (!W(t) || t === "inside")
return "";
var n = r.get("backgroundColor"), a = r.get("borderWidth");
e = mi(e);
var i = h7(t), o = Math.max(Math.round(a) * 1.5, 6), s = "", l = Cm + ":", u;
ct(["left", "right"], i) > -1 ? (s += "top:50%", l += "translateY(-50%) rotate(" + (u = i === "left" ? -225 : -45) + "deg)") : (s += "left:50%", l += "translateX(-50%) rotate(" + (u = i === "top" ? 225 : 45) + "deg)");
var f = u * Math.PI / 180, h = o + a, c = h * Math.abs(Math.cos(f)) + h * Math.abs(Math.sin(f)), v = Math.round(((c - Math.SQRT2 * a) / 2 + Math.SQRT2 * a - (c - h) / 2) * 100) / 100;
s += ";" + i + ":-" + v + "px";
var p = e + " solid " + a + "px;", d = ["position:absolute;width:" + o + "px;height:" + o + "px;", s + ";" + l + ";", "border-bottom:" + p, "border-right:" + p, "background-color:" + n + ";"];
return '';
}
function v7(r, e) {
var t = "cubic-bezier(0.23,1,0.32,1)", n = " " + r / 2 + "s " + t, a = "opacity" + n + ",visibility" + n;
return e || (n = " " + r + "s " + t, a += Dt.transformSupported ? "," + Cm + n : ",left" + n + ",top" + n), u7 + ":" + a;
}
function Bw(r, e, t) {
var n = r.toFixed(0) + "px", a = e.toFixed(0) + "px";
if (!Dt.transformSupported)
return t ? "top:" + a + ";left:" + n + ";" : [["top", a], ["left", n]];
var i = Dt.transform3dSupported, o = "translate" + (i ? "3d" : "") + "(" + n + "," + a + (i ? ",0" : "") + ")";
return t ? "top:0;left:0;" + Cm + ":" + o + ";" : [["top", 0], ["left", 0], [II, o]];
}
function p7(r) {
var e = [], t = r.get("fontSize"), n = r.getTextColor();
n && e.push("color:" + n), e.push("font:" + r.getFont()), t && e.push("line-height:" + Math.round(t * 3 / 2) + "px");
var a = r.get("textShadowColor"), i = r.get("textShadowBlur") || 0, o = r.get("textShadowOffsetX") || 0, s = r.get("textShadowOffsetY") || 0;
return a && i && e.push("text-shadow:" + o + "px " + s + "px " + i + "px " + a), C(["decoration", "align"], function(l) {
var u = r.get(l);
u && e.push("text-" + l + ":" + u);
}), e.join(";");
}
function d7(r, e, t) {
var n = [], a = r.get("transitionDuration"), i = r.get("backgroundColor"), o = r.get("shadowBlur"), s = r.get("shadowColor"), l = r.get("shadowOffsetX"), u = r.get("shadowOffsetY"), f = r.getModel("textStyle"), h = VD(r, "html"), c = l + "px " + u + "px " + o + "px " + s;
return n.push("box-shadow:" + c), e && a && n.push(v7(a, t)), i && n.push("background-color:" + i), C(["width", "color", "radius"], function(v) {
var p = "border-" + v, d = rD(p), g = r.get(d);
g != null && n.push(p + ":" + g + (v === "color" ? "" : "px"));
}), n.push(p7(f)), h != null && n.push("padding:" + zo(h).join("px ") + "px"), n.join(";") + ";";
}
function zw(r, e, t, n, a) {
var i = e && e.painter;
if (t) {
var o = i && i.getViewportRoot();
o && H2(r, o, document.body, n, a);
} else {
r[0] = n, r[1] = a;
var s = i && i.getViewportRootOffset();
s && (r[0] += s.offsetLeft, r[1] += s.offsetTop);
}
r[2] = r[0] / e.getWidth(), r[3] = r[1] / e.getHeight();
}
var g7 = function() {
function r(e, t, n) {
if (this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._firstShow = !0, this._longHide = !0, Dt.wxa)
return null;
var a = document.createElement("div");
a.domBelongToZr = !0, this.el = a;
var i = this._zr = t.getZr(), o = this._appendToBody = n && n.appendToBody;
zw(this._styleCoord, i, o, t.getWidth() / 2, t.getHeight() / 2), o ? document.body.appendChild(a) : e.appendChild(a), this._container = e;
var s = this;
a.onmouseenter = function() {
s._enterable && (clearTimeout(s._hideTimeout), s._show = !0), s._inContent = !0;
}, a.onmousemove = function(l) {
if (l = l || window.event, !s._enterable) {
var u = i.handler, f = i.painter.getViewportRoot();
tr(f, l, !0), u.dispatch("mousemove", l);
}
}, a.onmouseleave = function() {
s._inContent = !1, s._enterable && s._show && s.hideLater(s._hideDelay);
};
}
return r.prototype.update = function(e) {
var t = this._container, n = l7(t, "position"), a = t.style;
a.position !== "absolute" && n !== "absolute" && (a.position = "relative");
var i = e.get("alwaysShowContent");
i && this._moveIfResized(), this.el.className = e.get("className") || "";
}, r.prototype.show = function(e, t) {
clearTimeout(this._hideTimeout), clearTimeout(this._longHideTimeout);
var n = this.el, a = n.style, i = this._styleCoord;
n.innerHTML ? a.cssText = f7 + d7(e, !this._firstShow, this._longHide) + Bw(i[0], i[1], !0) + ("border-color:" + mi(t) + ";") + (e.get("extraCssText") || "") + (";pointer-events:" + (this._enterable ? "auto" : "none")) : a.display = "none", this._show = !0, this._firstShow = !1, this._longHide = !1;
}, r.prototype.setContent = function(e, t, n, a, i) {
var o = this.el;
if (e == null) {
o.innerHTML = "";
return;
}
var s = "";
if (W(i) && n.get("trigger") === "item" && !MI(n) && (s = c7(n, a, i)), W(e))
o.innerHTML = e + s;
else if (e) {
o.innerHTML = "", z(e) || (e = [e]);
for (var l = 0; l < e.length; l++)
mo(e[l]) && e[l].parentNode !== o && o.appendChild(e[l]);
if (s && o.childNodes.length) {
var u = document.createElement("div");
u.innerHTML = s, o.appendChild(u);
}
}
}, r.prototype.setEnterable = function(e) {
this._enterable = e;
}, r.prototype.getSize = function() {
var e = this.el;
return [e.offsetWidth, e.offsetHeight];
}, r.prototype.moveTo = function(e, t) {
var n = this._styleCoord;
if (zw(n, this._zr, this._appendToBody, e, t), n[0] != null && n[1] != null) {
var a = this.el.style, i = Bw(n[0], n[1]);
C(i, function(o) {
a[o[0]] = o[1];
});
}
}, r.prototype._moveIfResized = function() {
var e = this._styleCoord[2], t = this._styleCoord[3];
this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight());
}, r.prototype.hide = function() {
var e = this, t = this.el.style;
t.visibility = "hidden", t.opacity = "0", Dt.transform3dSupported && (t.willChange = ""), this._show = !1, this._longHideTimeout = setTimeout(function() {
return e._longHide = !0;
}, 500);
}, r.prototype.hideLater = function(e) {
this._show && !(this._inContent && this._enterable) && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(Y(this.hide, this), e)) : this.hide());
}, r.prototype.isShow = function() {
return this._show;
}, r.prototype.dispose = function() {
this.el.parentNode.removeChild(this.el);
}, r;
}();
const y7 = g7;
var m7 = function() {
function r(e) {
this._show = !1, this._styleCoord = [0, 0, 0, 0], this._enterable = !0, this._zr = e.getZr(), Fw(this._styleCoord, this._zr, e.getWidth() / 2, e.getHeight() / 2);
}
return r.prototype.update = function(e) {
var t = e.get("alwaysShowContent");
t && this._moveIfResized();
}, r.prototype.show = function() {
this._hideTimeout && clearTimeout(this._hideTimeout), this.el.show(), this._show = !0;
}, r.prototype.setContent = function(e, t, n, a, i) {
var o = this;
j(e) && Mt(process.env.NODE_ENV !== "production" ? "Passing DOM nodes as content is not supported in richText tooltip!" : ""), this.el && this._zr.remove(this.el);
var s = n.getModel("textStyle");
this.el = new Ct({
style: {
rich: t.richTextStyles,
text: e,
lineHeight: 22,
borderWidth: 1,
borderColor: a,
textShadowColor: s.get("textShadowColor"),
fill: n.get(["textStyle", "color"]),
padding: VD(n, "richText"),
verticalAlign: "top",
align: "left"
},
z: n.get("z")
}), C(["backgroundColor", "borderRadius", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"], function(u) {
o.el.style[u] = n.get(u);
}), C(["textShadowBlur", "textShadowOffsetX", "textShadowOffsetY"], function(u) {
o.el.style[u] = s.get(u) || 0;
}), this._zr.add(this.el);
var l = this;
this.el.on("mouseover", function() {
l._enterable && (clearTimeout(l._hideTimeout), l._show = !0), l._inContent = !0;
}), this.el.on("mouseout", function() {
l._enterable && l._show && l.hideLater(l._hideDelay), l._inContent = !1;
});
}, r.prototype.setEnterable = function(e) {
this._enterable = e;
}, r.prototype.getSize = function() {
var e = this.el, t = this.el.getBoundingRect(), n = Gw(e.style);
return [t.width + n.left + n.right, t.height + n.top + n.bottom];
}, r.prototype.moveTo = function(e, t) {
var n = this.el;
if (n) {
var a = this._styleCoord;
Fw(a, this._zr, e, t), e = a[0], t = a[1];
var i = n.style, o = Gn(i.borderWidth || 0), s = Gw(i);
n.x = e + o + s.left, n.y = t + o + s.top, n.markRedraw();
}
}, r.prototype._moveIfResized = function() {
var e = this._styleCoord[2], t = this._styleCoord[3];
this.moveTo(e * this._zr.getWidth(), t * this._zr.getHeight());
}, r.prototype.hide = function() {
this.el && this.el.hide(), this._show = !1;
}, r.prototype.hideLater = function(e) {
this._show && !(this._inContent && this._enterable) && (e ? (this._hideDelay = e, this._show = !1, this._hideTimeout = setTimeout(Y(this.hide, this), e)) : this.hide());
}, r.prototype.isShow = function() {
return this._show;
}, r.prototype.dispose = function() {
this._zr.remove(this.el);
}, r;
}();
function Gn(r) {
return Math.max(0, r);
}
function Gw(r) {
var e = Gn(r.shadowBlur || 0), t = Gn(r.shadowOffsetX || 0), n = Gn(r.shadowOffsetY || 0);
return {
left: Gn(e - t),
right: Gn(e + t),
top: Gn(e - n),
bottom: Gn(e + n)
};
}
function Fw(r, e, t, n) {
r[0] = t, r[1] = n, r[2] = r[0] / e.getWidth(), r[3] = r[1] / e.getHeight();
}
const _7 = m7;
var S7 = new xt({
shape: {
x: -1,
y: -1,
width: 2,
height: 2
}
}), x7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n) {
if (!(Dt.node || !n.getDom())) {
var a = t.getComponent("tooltip"), i = this._renderMode = DP(a.get("renderMode"));
this._tooltipContent = i === "richText" ? new _7(n) : new y7(n.getDom(), n, {
appendToBody: a.get("appendToBody", !0)
});
}
}, e.prototype.render = function(t, n, a) {
if (!(Dt.node || !a.getDom())) {
this.group.removeAll(), this._tooltipModel = t, this._ecModel = n, this._api = a, this._alwaysShowContent = t.get("alwaysShowContent");
var i = this._tooltipContent;
i.update(t), i.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow(), this._renderMode !== "richText" && t.get("transitionDuration") ? Uo(this, "_updatePosition", 50, "fixRate") : fl(this, "_updatePosition");
}
}, e.prototype._initGlobalListener = function() {
var t = this._tooltipModel, n = t.get("triggerOn");
pI("itemTooltip", this._api, Y(function(a, i, o) {
n !== "none" && (n.indexOf(a) >= 0 ? this._tryShow(i, o) : a === "leave" && this._hide(o));
}, this));
}, e.prototype._keepShow = function() {
var t = this._tooltipModel, n = this._ecModel, a = this._api, i = t.get("triggerOn");
if (this._lastX != null && this._lastY != null && i !== "none" && i !== "click") {
var o = this;
clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function() {
!a.isDisposed() && o.manuallyShowTip(t, n, a, {
x: o._lastX,
y: o._lastY,
dataByCoordSys: o._lastDataByCoordSys
});
});
}
}, e.prototype.manuallyShowTip = function(t, n, a, i) {
if (!(i.from === this.uid || Dt.node || !a.getDom())) {
var o = Hw(i, a);
this._ticket = "";
var s = i.dataByCoordSys, l = C7(i, n, a);
if (l) {
var u = l.el.getBoundingRect().clone();
u.applyTransform(l.el.transform), this._tryShow({
offsetX: u.x + u.width / 2,
offsetY: u.y + u.height / 2,
target: l.el,
position: i.position,
positionDefault: "bottom"
}, o);
} else if (i.tooltip && i.x != null && i.y != null) {
var f = S7;
f.x = i.x, f.y = i.y, f.update(), at(f).tooltipConfig = {
name: null,
option: i.tooltip
}, this._tryShow({
offsetX: i.x,
offsetY: i.y,
target: f
}, o);
} else if (s)
this._tryShow({
offsetX: i.x,
offsetY: i.y,
position: i.position,
dataByCoordSys: s,
tooltipOption: i.tooltipOption
}, o);
else if (i.seriesIndex != null) {
if (this._manuallyAxisShowTip(t, n, a, i))
return;
var h = dI(i, n), c = h.point[0], v = h.point[1];
c != null && v != null && this._tryShow({
offsetX: c,
offsetY: v,
target: h.el,
position: i.position,
positionDefault: "bottom"
}, o);
} else
i.x != null && i.y != null && (a.dispatchAction({
type: "updateAxisPointer",
x: i.x,
y: i.y
}), this._tryShow({
offsetX: i.x,
offsetY: i.y,
position: i.position,
target: a.getZr().findHover(i.x, i.y).target
}, o));
}
}, e.prototype.manuallyHideTip = function(t, n, a, i) {
var o = this._tooltipContent;
!this._alwaysShowContent && this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = this._lastDataByCoordSys = null, i.from !== this.uid && this._hide(Hw(i, a));
}, e.prototype._manuallyAxisShowTip = function(t, n, a, i) {
var o = i.seriesIndex, s = i.dataIndex, l = n.getComponent("axisPointer").coordSysAxesInfo;
if (!(o == null || s == null || l == null)) {
var u = n.getSeriesByIndex(o);
if (!!u) {
var f = u.getData(), h = Ss([f.getItemModel(s), u, (u.coordinateSystem || {}).model], this._tooltipModel);
if (h.get("trigger") === "axis")
return a.dispatchAction({
type: "updateAxisPointer",
seriesIndex: o,
dataIndex: s,
position: i.position
}), !0;
}
}
}, e.prototype._tryShow = function(t, n) {
var a = t.target, i = this._tooltipModel;
if (!!i) {
this._lastX = t.offsetX, this._lastY = t.offsetY;
var o = t.dataByCoordSys;
if (o && o.length)
this._showAxisTooltip(o, t);
else if (a) {
this._lastDataByCoordSys = null;
var s, l;
oo(a, function(u) {
if (at(u).dataIndex != null)
return s = u, !0;
if (at(u).tooltipConfig != null)
return l = u, !0;
}, !0), s ? this._showSeriesItemTooltip(t, s, n) : l ? this._showComponentItemTooltip(t, l, n) : this._hide(n);
} else
this._lastDataByCoordSys = null, this._hide(n);
}
}, e.prototype._showOrMove = function(t, n) {
var a = t.get("showDelay");
n = Y(n, this), clearTimeout(this._showTimout), a > 0 ? this._showTimout = setTimeout(n, a) : n();
}, e.prototype._showAxisTooltip = function(t, n) {
var a = this._ecModel, i = this._tooltipModel, o = [n.offsetX, n.offsetY], s = Ss([n.tooltipOption], i), l = this._renderMode, u = [], f = ae("section", {
blocks: [],
noHeader: !0
}), h = [], c = new nv();
C(t, function(m) {
C(m.dataByAxis, function(_) {
var S = a.getComponent(_.axisDim + "Axis", _.axisIndex), w = _.value;
if (!(!S || w == null)) {
var x = hI(w, S.axis, a, _.seriesDataIndices, _.valueLabelOpt), b = ae("section", {
header: x,
noHeader: !xr(x),
sortBlocks: !0,
blocks: []
});
f.blocks.push(b), C(_.seriesDataIndices, function(T) {
var D = a.getSeriesByIndex(T.seriesIndex), A = T.dataIndexInside, M = D.getDataParams(A);
if (!(M.dataIndex < 0)) {
M.axisDim = _.axisDim, M.axisIndex = _.axisIndex, M.axisType = _.axisType, M.axisId = _.axisId, M.axisValue = Ly(S.axis, {
value: w
}), M.axisValueLabel = x, M.marker = c.makeTooltipMarker("item", mi(M.color), l);
var L = w_(D.formatTooltip(A, !0, null)), I = L.frag;
if (I) {
var E = Ss([D], i).get("valueFormatter");
b.blocks.push(E ? B({
valueFormatter: E
}, I) : I);
}
L.text && h.push(L.text), u.push(M);
}
});
}
});
}), f.blocks.reverse(), h.reverse();
var v = n.position, p = s.get("order"), d = M_(f, c, l, p, a.get("useUTC"), s.get("textStyle"));
d && h.unshift(d);
var g = l === "richText" ? `
` : "
", y = h.join(g);
this._showOrMove(s, function() {
this._updateContentNotChangedOnAxis(t, u) ? this._updatePosition(s, v, o[0], o[1], this._tooltipContent, u) : this._showTooltipContent(s, y, u, Math.random() + "", o[0], o[1], v, null, c);
});
}, e.prototype._showSeriesItemTooltip = function(t, n, a) {
var i = this._ecModel, o = at(n), s = o.seriesIndex, l = i.getSeriesByIndex(s), u = o.dataModel || l, f = o.dataIndex, h = o.dataType, c = u.getData(h), v = this._renderMode, p = t.positionDefault, d = Ss([c.getItemModel(f), u, l && (l.coordinateSystem || {}).model], this._tooltipModel, p ? {
position: p
} : null), g = d.get("trigger");
if (!(g != null && g !== "item")) {
var y = u.getDataParams(f, h), m = new nv();
y.marker = m.makeTooltipMarker("item", mi(y.color), v);
var _ = w_(u.formatTooltip(f, !1, h)), S = d.get("order"), w = d.get("valueFormatter"), x = _.frag, b = x ? M_(w ? B({
valueFormatter: w
}, x) : x, m, v, S, i.get("useUTC"), d.get("textStyle")) : _.text, T = "item_" + u.name + "_" + f;
this._showOrMove(d, function() {
this._showTooltipContent(d, b, y, T, t.offsetX, t.offsetY, t.position, t.target, m);
}), a({
type: "showTip",
dataIndexInside: f,
dataIndex: c.getRawIndex(f),
seriesIndex: s,
from: this.uid
});
}
}, e.prototype._showComponentItemTooltip = function(t, n, a) {
var i = at(n), o = i.tooltipConfig, s = o.option || {};
if (W(s)) {
var l = s;
s = {
content: l,
formatter: l
};
}
var u = [s], f = this._ecModel.getComponent(i.componentMainType, i.componentIndex);
f && u.push(f), u.push({
formatter: s.content
});
var h = t.positionDefault, c = Ss(u, this._tooltipModel, h ? {
position: h
} : null), v = c.get("content"), p = Math.random() + "", d = new nv();
this._showOrMove(c, function() {
var g = tt(c.get("formatterParams") || {});
this._showTooltipContent(c, v, g, p, t.offsetX, t.offsetY, t.position, n, d);
}), a({
type: "showTip",
from: this.uid
});
}, e.prototype._showTooltipContent = function(t, n, a, i, o, s, l, u, f) {
if (this._ticket = "", !(!t.get("showContent") || !t.get("show"))) {
var h = this._tooltipContent;
h.setEnterable(t.get("enterable"));
var c = t.get("formatter");
l = l || t.get("position");
var v = n, p = this._getNearestPoint([o, s], a, t.get("trigger"), t.get("borderColor")), d = p.color;
if (c)
if (W(c)) {
var g = t.ecModel.get("useUTC"), y = z(a) ? a[0] : a, m = y && y.axisType && y.axisType.indexOf("time") >= 0;
v = c, m && (v = Bh(y.axisValue, v, g)), v = nD(v, a, !0);
} else if (q(c)) {
var _ = Y(function(S, w) {
S === this._ticket && (h.setContent(w, f, t, d, l), this._updatePosition(t, l, o, s, h, a, u));
}, this);
this._ticket = i, v = c(a, i, _);
} else
v = c;
h.setContent(v, f, t, d, l), h.show(t, d), this._updatePosition(t, l, o, s, h, a, u);
}
}, e.prototype._getNearestPoint = function(t, n, a, i) {
if (a === "axis" || z(n))
return {
color: i || (this._renderMode === "html" ? "#fff" : "none")
};
if (!z(n))
return {
color: i || n.color || n.borderColor
};
}, e.prototype._updatePosition = function(t, n, a, i, o, s, l) {
var u = this._api.getWidth(), f = this._api.getHeight();
n = n || t.get("position");
var h = o.getSize(), c = t.get("align"), v = t.get("verticalAlign"), p = l && l.getBoundingRect().clone();
if (l && p.applyTransform(l.transform), q(n) && (n = n([a, i], s, o.el, p, {
viewSize: [u, f],
contentSize: h.slice()
})), z(n))
a = H(n[0], u), i = H(n[1], f);
else if (j(n)) {
var d = n;
d.width = h[0], d.height = h[1];
var g = ee(d, {
width: u,
height: f
});
a = g.x, i = g.y, c = null, v = null;
} else if (W(n) && l) {
var y = T7(n, p, h, t.get("borderWidth"));
a = y[0], i = y[1];
} else {
var y = w7(a, i, o, u, f, c ? null : 20, v ? null : 20);
a = y[0], i = y[1];
}
if (c && (a -= $w(c) ? h[0] / 2 : c === "right" ? h[0] : 0), v && (i -= $w(v) ? h[1] / 2 : v === "bottom" ? h[1] : 0), MI(t)) {
var y = b7(a, i, o, u, f);
a = y[0], i = y[1];
}
o.moveTo(a, i);
}, e.prototype._updateContentNotChangedOnAxis = function(t, n) {
var a = this._lastDataByCoordSys, i = this._cbParamsList, o = !!a && a.length === t.length;
return o && C(a, function(s, l) {
var u = s.dataByAxis || [], f = t[l] || {}, h = f.dataByAxis || [];
o = o && u.length === h.length, o && C(u, function(c, v) {
var p = h[v] || {}, d = c.seriesDataIndices || [], g = p.seriesDataIndices || [];
o = o && c.value === p.value && c.axisType === p.axisType && c.axisId === p.axisId && d.length === g.length, o && C(d, function(y, m) {
var _ = g[m];
o = o && y.seriesIndex === _.seriesIndex && y.dataIndex === _.dataIndex;
}), i && C(c.seriesDataIndices, function(y) {
var m = y.seriesIndex, _ = n[m], S = i[m];
_ && S && S.data !== _.data && (o = !1);
});
});
}), this._lastDataByCoordSys = t, this._cbParamsList = n, !!o;
}, e.prototype._hide = function(t) {
this._lastDataByCoordSys = null, t({
type: "hideTip",
from: this.uid
});
}, e.prototype.dispose = function(t, n) {
Dt.node || !n.getDom() || (fl(this, "_updatePosition"), this._tooltipContent.dispose(), fg("itemTooltip", n));
}, e.type = "tooltip", e;
}(Ht);
function Ss(r, e, t) {
var n = e.ecModel, a;
t ? (a = new kt(t, n, n), a = new kt(e.option, a, n)) : a = e;
for (var i = r.length - 1; i >= 0; i--) {
var o = r[i];
o && (o instanceof kt && (o = o.get("tooltip", !0)), W(o) && (o = {
formatter: o
}), o && (a = new kt(o, a, n)));
}
return a;
}
function Hw(r, e) {
return r.dispatchAction || Y(e.dispatchAction, e);
}
function w7(r, e, t, n, a, i, o) {
var s = t.getSize(), l = s[0], u = s[1];
return i != null && (r + l + i + 2 > n ? r -= l + i : r += i), o != null && (e + u + o > a ? e -= u + o : e += o), [r, e];
}
function b7(r, e, t, n, a) {
var i = t.getSize(), o = i[0], s = i[1];
return r = Math.min(r + o, n) - o, e = Math.min(e + s, a) - s, r = Math.max(r, 0), e = Math.max(e, 0), [r, e];
}
function T7(r, e, t, n) {
var a = t[0], i = t[1], o = Math.ceil(Math.SQRT2 * n) + 8, s = 0, l = 0, u = e.width, f = e.height;
switch (r) {
case "inside":
s = e.x + u / 2 - a / 2, l = e.y + f / 2 - i / 2;
break;
case "top":
s = e.x + u / 2 - a / 2, l = e.y - i - o;
break;
case "bottom":
s = e.x + u / 2 - a / 2, l = e.y + f + o;
break;
case "left":
s = e.x - a - o, l = e.y + f / 2 - i / 2;
break;
case "right":
s = e.x + u + o, l = e.y + f / 2 - i / 2;
}
return [s, l];
}
function $w(r) {
return r === "center" || r === "middle";
}
function C7(r, e, t) {
var n = Fg(r).queryOptionMap, a = n.keys()[0];
if (!(!a || a === "series")) {
var i = Ml(e, a, n.get(a), {
useDefault: !1,
enableAll: !1,
enableNone: !1
}), o = i.models[0];
if (!!o) {
var s = t.getViewOfComponentModel(o), l;
if (s.group.traverse(function(u) {
var f = at(u).tooltipConfig;
if (f && f.name === r.name)
return l = u, !0;
}), l)
return {
componentMainType: a,
componentIndex: o.componentIndex,
el: l
};
}
}
}
const D7 = x7;
function A7(r) {
pt(Yl), r.registerComponentModel(o7), r.registerComponentView(D7), r.registerAction({
type: "showTip",
event: "showTip",
update: "tooltip:manuallyShowTip"
}, jt), r.registerAction({
type: "hideTip",
event: "hideTip",
update: "tooltip:manuallyHideTip"
}, jt);
}
var M7 = ["rect", "polygon", "keep", "clear"];
function L7(r, e) {
var t = Pt(r ? r.brush : []);
if (!!t.length) {
var n = [];
C(t, function(l) {
var u = l.hasOwnProperty("toolbox") ? l.toolbox : [];
u instanceof Array && (n = n.concat(u));
});
var a = r && r.toolbox;
z(a) && (a = a[0]), a || (a = {
feature: {}
}, r.toolbox = [a]);
var i = a.feature || (a.feature = {}), o = i.brush || (i.brush = {}), s = o.type || (o.type = []);
s.push.apply(s, n), I7(s), e && !s.length && s.push.apply(s, M7);
}
}
function I7(r) {
var e = {};
C(r, function(t) {
e[t] = 1;
}), r.length = 0, C(e, function(t, n) {
r.push(n);
});
}
var Ww = C;
function Uw(r) {
if (r) {
for (var e in r)
if (r.hasOwnProperty(e))
return !0;
}
}
function gg(r, e, t) {
var n = {};
return Ww(e, function(i) {
var o = n[i] = a();
Ww(r[i], function(s, l) {
if (!!fe.isValidType(l)) {
var u = {
type: l,
visual: s
};
t && t(u, i), o[l] = new fe(u), l === "opacity" && (u = tt(u), u.type = "colorAlpha", o.__hidden.__alphaForOpacity = new fe(u));
}
});
}), n;
function a() {
var i = function() {
};
i.prototype.__hidden = i.prototype;
var o = new i();
return o;
}
}
function PI(r, e, t) {
var n;
C(t, function(a) {
e.hasOwnProperty(a) && Uw(e[a]) && (n = !0);
}), n && C(t, function(a) {
e.hasOwnProperty(a) && Uw(e[a]) ? r[a] = tt(e[a]) : delete r[a];
});
}
function E7(r, e, t, n, a, i) {
var o = {};
C(r, function(h) {
var c = fe.prepareVisualTypes(e[h]);
o[h] = c;
});
var s;
function l(h) {
return my(t, s, h);
}
function u(h, c) {
ZD(t, s, h, c);
}
i == null ? t.each(f) : t.each([i], f);
function f(h, c) {
s = i == null ? h : c;
var v = t.getRawDataItem(s);
if (!(v && v.visualMap === !1))
for (var p = n.call(a, h), d = e[p], g = o[p], y = 0, m = g.length; y < m; y++) {
var _ = g[y];
d[_] && d[_].applyVisual(h, l, u);
}
}
}
function P7(r, e, t, n) {
var a = {};
return C(r, function(i) {
var o = fe.prepareVisualTypes(e[i]);
a[i] = o;
}), {
progress: function(o, s) {
var l;
n != null && (l = s.getDimensionIndex(n));
function u(w) {
return my(s, h, w);
}
function f(w, x) {
ZD(s, h, w, x);
}
for (var h, c = s.getStore(); (h = o.next()) != null; ) {
var v = s.getRawDataItem(h);
if (!(v && v.visualMap === !1))
for (var p = n != null ? c.get(l, h) : h, d = t(p), g = e[d], y = a[d], m = 0, _ = y.length; m < _; m++) {
var S = y[m];
g[S] && g[S].applyVisual(p, u, f);
}
}
}
};
}
function N7(r) {
var e = r.brushType, t = {
point: function(n) {
return Yw[e].point(n, t, r);
},
rect: function(n) {
return Yw[e].rect(n, t, r);
}
};
return t;
}
var Yw = {
lineX: Zw(0),
lineY: Zw(1),
rect: {
point: function(r, e, t) {
return r && t.boundingRect.contain(r[0], r[1]);
},
rect: function(r, e, t) {
return r && t.boundingRect.intersect(r);
}
},
polygon: {
point: function(r, e, t) {
return r && t.boundingRect.contain(r[0], r[1]) && Xa(t.range, r[0], r[1]);
},
rect: function(r, e, t) {
var n = t.range;
if (!r || n.length <= 1)
return !1;
var a = r.x, i = r.y, o = r.width, s = r.height, l = n[0];
if (Xa(n, a, i) || Xa(n, a + o, i) || Xa(n, a, i + s) || Xa(n, a + o, i + s) || ft.create(r).contain(l[0], l[1]) || Is(a, i, a + o, i, n) || Is(a, i, a, i + s, n) || Is(a + o, i, a + o, i + s, n) || Is(a, i + s, a + o, i + s, n))
return !0;
}
}
};
function Zw(r) {
var e = ["x", "y"], t = ["width", "height"];
return {
point: function(n, a, i) {
if (n) {
var o = i.range, s = n[r];
return xs(s, o);
}
},
rect: function(n, a, i) {
if (n) {
var o = i.range, s = [n[e[r]], n[e[r]] + n[t[r]]];
return s[1] < s[0] && s.reverse(), xs(s[0], o) || xs(s[1], o) || xs(o[0], s) || xs(o[1], s);
}
}
};
}
function xs(r, e) {
return e[0] <= r && r <= e[1];
}
var Xw = ["inBrush", "outOfBrush"], mp = "__ecBrushSelect", yg = "__ecInBrushSelectEvent";
function NI(r) {
r.eachComponent({
mainType: "brush"
}, function(e) {
var t = e.brushTargetManager = new bm(e.option, r);
t.setInputRanges(e.areas, r);
});
}
function R7(r, e, t) {
var n = [], a, i;
r.eachComponent({
mainType: "brush"
}, function(o) {
t && t.type === "takeGlobalCursor" && o.setBrushOption(t.key === "brush" ? t.brushOption : {
brushType: !1
});
}), NI(r), r.eachComponent({
mainType: "brush"
}, function(o, s) {
var l = {
brushId: o.id,
brushIndex: s,
brushName: o.name,
areas: tt(o.areas),
selected: []
};
n.push(l);
var u = o.option, f = u.brushLink, h = [], c = [], v = [], p = !1;
s || (a = u.throttleType, i = u.throttleDelay);
var d = G(o.areas, function(w) {
var x = B7[w.brushType], b = J({
boundingRect: x ? x(w) : void 0
}, w);
return b.selectors = N7(b), b;
}), g = gg(o.option, Xw, function(w) {
w.mappingMethod = "fixed";
});
z(f) && C(f, function(w) {
h[w] = 1;
});
function y(w) {
return f === "all" || !!h[w];
}
function m(w) {
return !!w.length;
}
r.eachSeries(function(w, x) {
var b = v[x] = [];
w.subType === "parallel" ? _(w, x) : S(w, x, b);
});
function _(w, x) {
var b = w.coordinateSystem;
p = p || b.hasAxisBrushed(), y(x) && b.eachActiveState(w.getData(), function(T, D) {
T === "active" && (c[D] = 1);
});
}
function S(w, x, b) {
if (!(!w.brushSelector || V7(o, x)) && (C(d, function(D) {
o.brushTargetManager.controlSeries(D, w, r) && b.push(D), p = p || m(b);
}), y(x) && m(b))) {
var T = w.getData();
T.each(function(D) {
qw(w, b, T, D) && (c[D] = 1);
});
}
}
r.eachSeries(function(w, x) {
var b = {
seriesId: w.id,
seriesIndex: x,
seriesName: w.name,
dataIndex: []
};
l.selected.push(b);
var T = v[x], D = w.getData(), A = y(x) ? function(M) {
return c[M] ? (b.dataIndex.push(D.getRawIndex(M)), "inBrush") : "outOfBrush";
} : function(M) {
return qw(w, T, D, M) ? (b.dataIndex.push(D.getRawIndex(M)), "inBrush") : "outOfBrush";
};
(y(x) ? p : m(T)) && E7(Xw, g, D, A);
});
}), k7(e, a, i, n, t);
}
function k7(r, e, t, n, a) {
if (!!a) {
var i = r.getZr();
if (!i[yg]) {
i[mp] || (i[mp] = O7);
var o = Uo(i, mp, t, e);
o(r, n);
}
}
}
function O7(r, e) {
if (!r.isDisposed()) {
var t = r.getZr();
t[yg] = !0, r.dispatchAction({
type: "brushSelect",
batch: e
}), t[yg] = !1;
}
}
function qw(r, e, t, n) {
for (var a = 0, i = e.length; a < i; a++) {
var o = e[a];
if (r.brushSelector(n, t, o.selectors, o))
return !0;
}
}
function V7(r, e) {
var t = r.option.seriesIndex;
return t != null && t !== "all" && (z(t) ? ct(t, e) < 0 : e !== t);
}
var B7 = {
rect: function(r) {
return Kw(r.range);
},
polygon: function(r) {
for (var e, t = r.range, n = 0, a = t.length; n < a; n++) {
e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
var i = t[n];
i[0] < e[0][0] && (e[0][0] = i[0]), i[0] > e[0][1] && (e[0][1] = i[0]), i[1] < e[1][0] && (e[1][0] = i[1]), i[1] > e[1][1] && (e[1][1] = i[1]);
}
return e && Kw(e);
}
};
function Kw(r) {
return new ft(r[0][0], r[1][0], r[0][1] - r[0][0], r[1][1] - r[1][0]);
}
var z7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n) {
this.ecModel = t, this.api = n, this.model, (this._brushController = new nm(n.getZr())).on("brush", Y(this._onBrush, this)).mount();
}, e.prototype.render = function(t, n, a, i) {
this.model = t, this._updateController(t, n, a, i);
}, e.prototype.updateTransform = function(t, n, a, i) {
NI(n), this._updateController(t, n, a, i);
}, e.prototype.updateVisual = function(t, n, a, i) {
this.updateTransform(t, n, a, i);
}, e.prototype.updateView = function(t, n, a, i) {
this._updateController(t, n, a, i);
}, e.prototype._updateController = function(t, n, a, i) {
(!i || i.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice());
}, e.prototype.dispose = function() {
this._brushController.dispose();
}, e.prototype._onBrush = function(t) {
var n = this.model.id, a = this.model.brushTargetManager.setOutputRanges(t.areas, this.ecModel);
(!t.isEnd || t.removeOnClick) && this.api.dispatchAction({
type: "brush",
brushId: n,
areas: tt(a),
$from: n
}), t.isEnd && this.api.dispatchAction({
type: "brushEnd",
brushId: n,
areas: tt(a),
$from: n
});
}, e.type = "brush", e;
}(Ht);
const G7 = z7;
var F7 = "#ddd", H7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.areas = [], t.brushOption = {}, t;
}
return e.prototype.optionUpdated = function(t, n) {
var a = this.option;
!n && PI(a, t, ["inBrush", "outOfBrush"]);
var i = a.inBrush = a.inBrush || {};
a.outOfBrush = a.outOfBrush || {
color: F7
}, i.hasOwnProperty("liftZ") || (i.liftZ = 5);
}, e.prototype.setAreas = function(t) {
process.env.NODE_ENV !== "production" && (Q(z(t)), C(t, function(n) {
Q(n.brushType, "Illegal areas");
})), t && (this.areas = G(t, function(n) {
return jw(this.option, n);
}, this));
}, e.prototype.setBrushOption = function(t) {
this.brushOption = jw(this.option, t), this.brushType = this.brushOption.brushType;
}, e.type = "brush", e.dependencies = ["geo", "grid", "xAxis", "yAxis", "parallel", "series"], e.defaultOption = {
seriesIndex: "all",
brushType: "rect",
brushMode: "single",
transformable: !0,
brushStyle: {
borderWidth: 1,
color: "rgba(210,219,238,0.3)",
borderColor: "#D2DBEE"
},
throttleType: "fixRate",
throttleDelay: 0,
removeOnClick: !0,
z: 1e4
}, e;
}(_t);
function jw(r, e) {
return lt({
brushType: r.brushType,
brushMode: r.brushMode,
transformable: r.transformable,
brushStyle: new kt(r.brushStyle).getItemStyle(),
removeOnClick: r.removeOnClick,
z: r.z
}, e, !0);
}
const $7 = H7;
var W7 = ["rect", "polygon", "lineX", "lineY", "keep", "clear"], U7 = function(r) {
R(e, r);
function e() {
return r !== null && r.apply(this, arguments) || this;
}
return e.prototype.render = function(t, n, a) {
var i, o, s;
n.eachComponent({
mainType: "brush"
}, function(l) {
i = l.brushType, o = l.brushOption.brushMode || "single", s = s || !!l.areas.length;
}), this._brushType = i, this._brushMode = o, C(t.get("type", !0), function(l) {
t.setIconStatus(l, (l === "keep" ? o === "multiple" : l === "clear" ? s : l === i) ? "emphasis" : "normal");
});
}, e.prototype.updateView = function(t, n, a) {
this.render(t, n, a);
}, e.prototype.getIcons = function() {
var t = this.model, n = t.get("icon", !0), a = {};
return C(t.get("type", !0), function(i) {
n[i] && (a[i] = n[i]);
}), a;
}, e.prototype.onclick = function(t, n, a) {
var i = this._brushType, o = this._brushMode;
a === "clear" ? (n.dispatchAction({
type: "axisAreaSelect",
intervals: []
}), n.dispatchAction({
type: "brush",
command: "clear",
areas: []
})) : n.dispatchAction({
type: "takeGlobalCursor",
key: "brush",
brushOption: {
brushType: a === "keep" ? i : i === a ? !1 : a,
brushMode: a === "keep" ? o === "multiple" ? "single" : "multiple" : o
}
});
}, e.getDefaultOption = function(t) {
var n = {
show: !0,
type: W7.slice(),
icon: {
rect: "M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",
polygon: "M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",
lineX: "M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",
lineY: "M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",
keep: "M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",
clear: "M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"
},
title: t.getLocaleModel().get(["toolbox", "brush", "title"])
};
return n;
}, e;
}(ir);
const Y7 = U7;
function Z7(r) {
r.registerComponentView(G7), r.registerComponentModel($7), r.registerPreprocessor(L7), r.registerVisual(r.PRIORITY.VISUAL.BRUSH, R7), r.registerAction({
type: "brush",
event: "brush",
update: "updateVisual"
}, function(e, t) {
t.eachComponent({
mainType: "brush",
query: e
}, function(n) {
n.setAreas(e.areas);
});
}), r.registerAction({
type: "brushSelect",
event: "brushSelected",
update: "none"
}, jt), r.registerAction({
type: "brushEnd",
event: "brushEnd",
update: "none"
}, jt), no("brush", Y7);
}
var X7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.layoutMode = {
type: "box",
ignoreSize: !0
}, t;
}
return e.type = "title", e.defaultOption = {
z: 6,
show: !0,
text: "",
target: "blank",
subtext: "",
subtarget: "blank",
left: 0,
top: 0,
backgroundColor: "rgba(0,0,0,0)",
borderColor: "#ccc",
borderWidth: 0,
padding: 5,
itemGap: 10,
textStyle: {
fontSize: 18,
fontWeight: "bold",
color: "#464646"
},
subtextStyle: {
fontSize: 12,
color: "#6E7079"
}
}, e;
}(_t), q7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.render = function(t, n, a) {
if (this.group.removeAll(), !!t.get("show")) {
var i = this.group, o = t.getModel("textStyle"), s = t.getModel("subtextStyle"), l = t.get("textAlign"), u = vt(t.get("textBaseline"), t.get("textVerticalAlign")), f = new Ct({
style: zt(o, {
text: t.get("text"),
fill: o.getTextColor()
}, {
disableBox: !0
}),
z2: 10
}), h = f.getBoundingRect(), c = t.get("subtext"), v = new Ct({
style: zt(s, {
text: c,
fill: s.getTextColor(),
y: h.height + t.get("itemGap"),
verticalAlign: "top"
}, {
disableBox: !0
}),
z2: 10
}), p = t.get("link"), d = t.get("sublink"), g = t.get("triggerEvent", !0);
f.silent = !p && !g, v.silent = !d && !g, p && f.on("click", function() {
kf(p, "_" + t.get("target"));
}), d && v.on("click", function() {
kf(d, "_" + t.get("subtarget"));
}), at(f).eventData = at(v).eventData = g ? {
componentType: "title",
componentIndex: t.componentIndex
} : null, i.add(f), c && i.add(v);
var y = i.getBoundingRect(), m = t.getBoxLayoutParams();
m.width = y.width, m.height = y.height;
var _ = ee(m, {
width: a.getWidth(),
height: a.getHeight()
}, t.get("padding"));
l || (l = t.get("left") || t.get("right"), l === "middle" && (l = "center"), l === "right" ? _.x += _.width : l === "center" && (_.x += _.width / 2)), u || (u = t.get("top") || t.get("bottom"), u === "center" && (u = "middle"), u === "bottom" ? _.y += _.height : u === "middle" && (_.y += _.height / 2), u = u || "top"), i.x = _.x, i.y = _.y, i.markRedraw();
var S = {
align: l,
verticalAlign: u
};
f.setStyle(S), v.setStyle(S), y = i.getBoundingRect();
var w = _.margin, x = t.getItemStyle(["color", "opacity"]);
x.fill = t.get("backgroundColor");
var b = new xt({
shape: {
x: y.x - w[3],
y: y.y - w[0],
width: y.width + w[1] + w[3],
height: y.height + w[0] + w[2],
r: t.get("borderRadius")
},
style: x,
subPixelOptimize: !0,
silent: !0
});
i.add(b);
}
}, e.type = "title", e;
}(Ht);
function K7(r) {
r.registerComponentModel(X7), r.registerComponentView(q7);
}
var j7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.layoutMode = "box", t;
}
return e.prototype.init = function(t, n, a) {
this.mergeDefaultAndTheme(t, a), this._initData();
}, e.prototype.mergeOption = function(t) {
r.prototype.mergeOption.apply(this, arguments), this._initData();
}, e.prototype.setCurrentIndex = function(t) {
t == null && (t = this.option.currentIndex);
var n = this._data.count();
this.option.loop ? t = (t % n + n) % n : (t >= n && (t = n - 1), t < 0 && (t = 0)), this.option.currentIndex = t;
}, e.prototype.getCurrentIndex = function() {
return this.option.currentIndex;
}, e.prototype.isIndexMax = function() {
return this.getCurrentIndex() >= this._data.count() - 1;
}, e.prototype.setPlayState = function(t) {
this.option.autoPlay = !!t;
}, e.prototype.getPlayState = function() {
return !!this.option.autoPlay;
}, e.prototype._initData = function() {
var t = this.option, n = t.data || [], a = t.axisType, i = this._names = [], o;
a === "category" ? (o = [], C(n, function(u, f) {
var h = te(No(u), ""), c;
j(u) ? (c = tt(u), c.value = f) : c = f, o.push(c), i.push(h);
})) : o = n;
var s = {
category: "ordinal",
time: "time",
value: "number"
}[a] || "number", l = this._data = new Ae([{
name: "value",
type: s
}], this);
l.initData(o, i);
}, e.prototype.getData = function() {
return this._data;
}, e.prototype.getCategories = function() {
if (this.get("axisType") === "category")
return this._names.slice();
}, e.type = "timeline", e.defaultOption = {
z: 4,
show: !0,
axisType: "time",
realtime: !0,
left: "20%",
top: null,
right: "20%",
bottom: 0,
width: null,
height: 40,
padding: 5,
controlPosition: "left",
autoPlay: !1,
rewind: !1,
loop: !0,
playInterval: 2e3,
currentIndex: 0,
itemStyle: {},
label: {
color: "#000"
},
data: []
}, e;
}(_t);
const Jw = j7;
var RI = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "timeline.slider", e.defaultOption = va(Jw.defaultOption, {
backgroundColor: "rgba(0,0,0,0)",
borderColor: "#ccc",
borderWidth: 0,
orient: "horizontal",
inverse: !1,
tooltip: {
trigger: "item"
},
symbol: "circle",
symbolSize: 12,
lineStyle: {
show: !0,
width: 2,
color: "#DAE1F5"
},
label: {
position: "auto",
show: !0,
interval: "auto",
rotate: 0,
color: "#A4B1D7"
},
itemStyle: {
color: "#A4B1D7",
borderWidth: 1
},
checkpointStyle: {
symbol: "circle",
symbolSize: 15,
color: "#316bf3",
borderColor: "#fff",
borderWidth: 2,
shadowBlur: 2,
shadowOffsetX: 1,
shadowOffsetY: 1,
shadowColor: "rgba(0, 0, 0, 0.3)",
animation: !0,
animationDuration: 300,
animationEasing: "quinticInOut"
},
controlStyle: {
show: !0,
showPlayBtn: !0,
showPrevBtn: !0,
showNextBtn: !0,
itemSize: 24,
itemGap: 12,
position: "left",
playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
nextIcon: "M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",
prevIcon: "M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",
prevBtnSize: 18,
nextBtnSize: 18,
color: "#A4B1D7",
borderColor: "#A4B1D7",
borderWidth: 1
},
emphasis: {
label: {
show: !0,
color: "#6f778d"
},
itemStyle: {
color: "#316BF3"
},
controlStyle: {
color: "#316BF3",
borderColor: "#316BF3",
borderWidth: 2
}
},
progress: {
lineStyle: {
color: "#316BF3"
},
itemStyle: {
color: "#316BF3"
},
label: {
color: "#6f778d"
}
},
data: []
}), e;
}(Jw);
Qt(RI, vy.prototype);
const J7 = RI;
var Q7 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "timeline", e;
}(Ht);
const t9 = Q7;
var e9 = function(r) {
R(e, r);
function e(t, n, a, i) {
var o = r.call(this, t, n, a) || this;
return o.type = i || "value", o;
}
return e.prototype.getLabelModel = function() {
return this.model.getModel("label");
}, e.prototype.isHorizontal = function() {
return this.model.get("orient") === "horizontal";
}, e;
}(Er);
const r9 = e9;
var _p = Math.PI, Qw = Tt(), n9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function(t, n) {
this.api = n;
}, e.prototype.render = function(t, n, a) {
if (this.model = t, this.api = a, this.ecModel = n, this.group.removeAll(), t.get("show", !0)) {
var i = this._layout(t, a), o = this._createGroup("_mainGroup"), s = this._createGroup("_labelGroup"), l = this._axis = this._createAxis(i, t);
t.formatTooltip = function(u) {
var f = l.scale.getLabel({
value: u
});
return ae("nameValue", {
noName: !0,
value: f
});
}, C(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function(u) {
this["_render" + u](i, o, l, t);
}, this), this._renderAxisLabel(i, s, l, t), this._position(i, t);
}
this._doPlayStop(), this._updateTicksStatus();
}, e.prototype.remove = function() {
this._clearTimer(), this.group.removeAll();
}, e.prototype.dispose = function() {
this._clearTimer();
}, e.prototype._layout = function(t, n) {
var a = t.get(["label", "position"]), i = t.get("orient"), o = i9(t, n), s;
a == null || a === "auto" ? s = i === "horizontal" ? o.y + o.height / 2 < n.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < n.getWidth() / 2 ? "+" : "-" : W(a) ? s = {
horizontal: {
top: "-",
bottom: "+"
},
vertical: {
left: "-",
right: "+"
}
}[i][a] : s = a;
var l = {
horizontal: "center",
vertical: s >= 0 || s === "+" ? "left" : "right"
}, u = {
horizontal: s >= 0 || s === "+" ? "top" : "bottom",
vertical: "middle"
}, f = {
horizontal: 0,
vertical: _p / 2
}, h = i === "vertical" ? o.height : o.width, c = t.getModel("controlStyle"), v = c.get("show", !0), p = v ? c.get("itemSize") : 0, d = v ? c.get("itemGap") : 0, g = p + d, y = t.get(["label", "rotate"]) || 0;
y = y * _p / 180;
var m, _, S, w = c.get("position", !0), x = v && c.get("showPlayBtn", !0), b = v && c.get("showPrevBtn", !0), T = v && c.get("showNextBtn", !0), D = 0, A = h;
w === "left" || w === "bottom" ? (x && (m = [0, 0], D += g), b && (_ = [D, 0], D += g), T && (S = [A - p, 0], A -= g)) : (x && (m = [A - p, 0], A -= g), b && (_ = [0, 0], D += g), T && (S = [A - p, 0], A -= g));
var M = [D, A];
return t.get("inverse") && M.reverse(), {
viewRect: o,
mainLength: h,
orient: i,
rotation: f[i],
labelRotation: y,
labelPosOpt: s,
labelAlign: t.get(["label", "align"]) || l[i],
labelBaseline: t.get(["label", "verticalAlign"]) || t.get(["label", "baseline"]) || u[i],
playPosition: m,
prevBtnPosition: _,
nextBtnPosition: S,
axisExtent: M,
controlSize: p,
controlGap: d
};
}, e.prototype._position = function(t, n) {
var a = this._mainGroup, i = this._labelGroup, o = t.viewRect;
if (t.orient === "vertical") {
var s = hr(), l = o.x, u = o.y + o.height;
qr(s, s, [-l, -u]), bi(s, s, -_p / 2), qr(s, s, [l, u]), o = o.clone(), o.applyTransform(s);
}
var f = m(o), h = m(a.getBoundingRect()), c = m(i.getBoundingRect()), v = [a.x, a.y], p = [i.x, i.y];
p[0] = v[0] = f[0][0];
var d = t.labelPosOpt;
if (d == null || W(d)) {
var g = d === "+" ? 0 : 1;
_(v, h, f, 1, g), _(p, c, f, 1, 1 - g);
} else {
var g = d >= 0 ? 0 : 1;
_(v, h, f, 1, g), p[1] = v[1] + d;
}
a.setPosition(v), i.setPosition(p), a.rotation = i.rotation = t.rotation, y(a), y(i);
function y(S) {
S.originX = f[0][0] - S.x, S.originY = f[1][0] - S.y;
}
function m(S) {
return [[S.x, S.x + S.width], [S.y, S.y + S.height]];
}
function _(S, w, x, b, T) {
S[b] += x[b][T] - w[b][T];
}
}, e.prototype._createAxis = function(t, n) {
var a = n.getData(), i = n.get("axisType"), o = a9(n, i);
o.getTicks = function() {
return a.mapArray(["value"], function(u) {
return {
value: u
};
});
};
var s = a.getDataExtent("value");
o.setExtent(s[0], s[1]), o.calcNiceTicks();
var l = new r9("value", o, t.axisExtent, i);
return l.model = n, l;
}, e.prototype._createGroup = function(t) {
var n = this[t] = new nt();
return this.group.add(n), n;
}, e.prototype._renderAxisLine = function(t, n, a, i) {
var o = a.getExtent();
if (!!i.get(["lineStyle", "show"])) {
var s = new oe({
shape: {
x1: o[0],
y1: 0,
x2: o[1],
y2: 0
},
style: B({
lineCap: "round"
}, i.getModel("lineStyle").getLineStyle()),
silent: !0,
z2: 1
});
n.add(s);
var l = this._progressLine = new oe({
shape: {
x1: o[0],
x2: this._currentPointer ? this._currentPointer.x : o[0],
y1: 0,
y2: 0
},
style: J({
lineCap: "round",
lineWidth: s.style.lineWidth
}, i.getModel(["progress", "lineStyle"]).getLineStyle()),
silent: !0,
z2: 1
});
n.add(l);
}
}, e.prototype._renderAxisTick = function(t, n, a, i) {
var o = this, s = i.getData(), l = a.scale.getTicks();
this._tickSymbols = [], C(l, function(u) {
var f = a.dataToCoord(u.value), h = s.getItemModel(u.value), c = h.getModel("itemStyle"), v = h.getModel(["emphasis", "itemStyle"]), p = h.getModel(["progress", "itemStyle"]), d = {
x: f,
y: 0,
onclick: Y(o._changeTimeline, o, u.value)
}, g = tb(h, c, n, d);
g.ensureState("emphasis").style = v.getItemStyle(), g.ensureState("progress").style = p.getItemStyle(), si(g);
var y = at(g);
h.get("tooltip") ? (y.dataIndex = u.value, y.dataModel = i) : y.dataIndex = y.dataModel = null, o._tickSymbols.push(g);
});
}, e.prototype._renderAxisLabel = function(t, n, a, i) {
var o = this, s = a.getLabelModel();
if (!!s.get("show")) {
var l = i.getData(), u = a.getViewLabels();
this._tickLabels = [], C(u, function(f) {
var h = f.tickValue, c = l.getItemModel(h), v = c.getModel("label"), p = c.getModel(["emphasis", "label"]), d = c.getModel(["progress", "label"]), g = a.dataToCoord(f.tickValue), y = new Ct({
x: g,
y: 0,
rotation: t.labelRotation - t.rotation,
onclick: Y(o._changeTimeline, o, h),
silent: !1,
style: zt(v, {
text: f.formattedLabel,
align: t.labelAlign,
verticalAlign: t.labelBaseline
})
});
y.ensureState("emphasis").style = zt(p), y.ensureState("progress").style = zt(d), n.add(y), si(y), Qw(y).dataIndex = h, o._tickLabels.push(y);
});
}
}, e.prototype._renderControl = function(t, n, a, i) {
var o = t.controlSize, s = t.rotation, l = i.getModel("controlStyle").getItemStyle(), u = i.getModel(["emphasis", "controlStyle"]).getItemStyle(), f = i.getPlayState(), h = i.get("inverse", !0);
c(t.nextBtnPosition, "next", Y(this._changeTimeline, this, h ? "-" : "+")), c(t.prevBtnPosition, "prev", Y(this._changeTimeline, this, h ? "+" : "-")), c(t.playPosition, f ? "stop" : "play", Y(this._handlePlayClick, this, !f), !0);
function c(v, p, d, g) {
if (!!v) {
var y = Ar(vt(i.get(["controlStyle", p + "BtnSize"]), o), o), m = [0, -y / 2, y, y], _ = o9(i, p + "Icon", m, {
x: v[0],
y: v[1],
originX: o / 2,
originY: 0,
rotation: g ? -s : 0,
rectHover: !0,
style: l,
onclick: d
});
_.ensureState("emphasis").style = u, n.add(_), si(_);
}
}
}, e.prototype._renderCurrentPointer = function(t, n, a, i) {
var o = i.getData(), s = i.getCurrentIndex(), l = o.getItemModel(s).getModel("checkpointStyle"), u = this, f = {
onCreate: function(h) {
h.draggable = !0, h.drift = Y(u._handlePointerDrag, u), h.ondragend = Y(u._handlePointerDragend, u), eb(h, u._progressLine, s, a, i, !0);
},
onUpdate: function(h) {
eb(h, u._progressLine, s, a, i);
}
};
this._currentPointer = tb(l, l, this._mainGroup, {}, this._currentPointer, f);
}, e.prototype._handlePlayClick = function(t) {
this._clearTimer(), this.api.dispatchAction({
type: "timelinePlayChange",
playState: t,
from: this.uid
});
}, e.prototype._handlePointerDrag = function(t, n, a) {
this._clearTimer(), this._pointerChangeTimeline([a.offsetX, a.offsetY]);
}, e.prototype._handlePointerDragend = function(t) {
this._pointerChangeTimeline([t.offsetX, t.offsetY], !0);
}, e.prototype._pointerChangeTimeline = function(t, n) {
var a = this._toAxisCoord(t)[0], i = this._axis, o = lr(i.getExtent().slice());
a > o[1] && (a = o[1]), a < o[0] && (a = o[0]), this._currentPointer.x = a, this._currentPointer.markRedraw(), this._progressLine.shape.x2 = a, this._progressLine.dirty();
var s = this._findNearestTick(a), l = this.model;
(n || s !== l.getCurrentIndex() && l.get("realtime")) && this._changeTimeline(s);
}, e.prototype._doPlayStop = function() {
var t = this;
this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(function() {
var n = t.model;
t._changeTimeline(n.getCurrentIndex() + (n.get("rewind", !0) ? -1 : 1));
}, this.model.get("playInterval")));
}, e.prototype._toAxisCoord = function(t) {
var n = this._mainGroup.getLocalTransform();
return Dr(t, n, !0);
}, e.prototype._findNearestTick = function(t) {
var n = this.model.getData(), a = 1 / 0, i, o = this._axis;
return n.each(["value"], function(s, l) {
var u = o.dataToCoord(s), f = Math.abs(u - t);
f < a && (a = f, i = l);
}), i;
}, e.prototype._clearTimer = function() {
this._timer && (clearTimeout(this._timer), this._timer = null);
}, e.prototype._changeTimeline = function(t) {
var n = this.model.getCurrentIndex();
t === "+" ? t = n + 1 : t === "-" && (t = n - 1), this.api.dispatchAction({
type: "timelineChange",
currentIndex: t,
from: this.uid
});
}, e.prototype._updateTicksStatus = function() {
var t = this.model.getCurrentIndex(), n = this._tickSymbols, a = this._tickLabels;
if (n)
for (var i = 0; i < n.length; i++)
n && n[i] && n[i].toggleState("progress", i < t);
if (a)
for (var i = 0; i < a.length; i++)
a && a[i] && a[i].toggleState("progress", Qw(a[i]).dataIndex <= t);
}, e.type = "timeline.slider", e;
}(t9);
function a9(r, e) {
if (e = e || r.get("type"), e)
switch (e) {
case "category":
return new Cy({
ordinalMeta: r.getCategories(),
extent: [1 / 0, -1 / 0]
});
case "time":
return new VA({
locale: r.ecModel.getLocaleModel(),
useUTC: r.ecModel.get("useUTC")
});
default:
return new la();
}
}
function i9(r, e) {
return ee(r.getBoxLayoutParams(), {
width: e.getWidth(),
height: e.getHeight()
}, r.get("padding"));
}
function o9(r, e, t, n) {
var a = n.style, i = Pl(r.get(["controlStyle", e]), n || {}, new ft(t[0], t[1], t[2], t[3]));
return a && i.setStyle(a), i;
}
function tb(r, e, t, n, a, i) {
var o = e.get("color");
if (a)
a.setColor(o), t.add(a), i && i.onUpdate(a);
else {
var s = r.get("symbol");
a = Jt(s, -1, -1, 2, 2, o), a.setStyle("strokeNoScale", !0), t.add(a), i && i.onCreate(a);
}
var l = e.getItemStyle(["color"]);
a.setStyle(l), n = lt({
rectHover: !0,
z2: 100
}, n, !0);
var u = kl(r.get("symbolSize"));
n.scaleX = u[0] / 2, n.scaleY = u[1] / 2;
var f = Yo(r.get("symbolOffset"), u);
f && (n.x = (n.x || 0) + f[0], n.y = (n.y || 0) + f[1]);
var h = r.get("symbolRotate");
return n.rotation = (h || 0) * Math.PI / 180 || 0, a.attr(n), a.updateTransform(), a;
}
function eb(r, e, t, n, a, i) {
if (!r.dragging) {
var o = a.getModel("checkpointStyle"), s = n.dataToCoord(a.getData().get("value", t));
if (i || !o.get("animation", !0))
r.attr({
x: s,
y: 0
}), e && e.attr({
shape: {
x2: s
}
});
else {
var l = {
duration: o.get("animationDuration", !0),
easing: o.get("animationEasing", !0)
};
r.stopAnimation(null, !0), r.animateTo({
x: s,
y: 0
}, l), e && e.animateTo({
shape: {
x2: s
}
}, l);
}
}
}
const s9 = n9;
function l9(r) {
r.registerAction({
type: "timelineChange",
event: "timelineChanged",
update: "prepareAndUpdate"
}, function(e, t, n) {
var a = t.getComponent("timeline");
return a && e.currentIndex != null && (a.setCurrentIndex(e.currentIndex), !a.get("loop", !0) && a.isIndexMax() && a.getPlayState() && (a.setPlayState(!1), n.dispatchAction({
type: "timelinePlayChange",
playState: !1,
from: e.from
}))), t.resetOption("timeline", {
replaceMerge: a.get("replaceMerge", !0)
}), J({
currentIndex: a.option.currentIndex
}, e);
}), r.registerAction({
type: "timelinePlayChange",
event: "timelinePlayChanged",
update: "update"
}, function(e, t) {
var n = t.getComponent("timeline");
n && e.playState != null && n.setPlayState(e.playState);
});
}
function u9(r) {
var e = r && r.timeline;
z(e) || (e = e ? [e] : []), C(e, function(t) {
!t || f9(t);
});
}
function f9(r) {
var e = r.type, t = {
number: "value",
time: "time"
};
if (t[e] && (r.axisType = t[e], delete r.type), rb(r), ja(r, "controlPosition")) {
var n = r.controlStyle || (r.controlStyle = {});
ja(n, "position") || (n.position = r.controlPosition), n.position === "none" && !ja(n, "show") && (n.show = !1, delete n.position), delete r.controlPosition;
}
C(r.data || [], function(a) {
j(a) && !z(a) && (!ja(a, "value") && ja(a, "name") && (a.value = a.name), rb(a));
});
}
function rb(r) {
var e = r.itemStyle || (r.itemStyle = {}), t = e.emphasis || (e.emphasis = {}), n = r.label || r.label || {}, a = n.normal || (n.normal = {}), i = {
normal: 1,
emphasis: 1
};
C(n, function(o, s) {
!i[s] && !ja(a, s) && (a[s] = o);
}), t.label && !ja(n, "emphasis") && (n.emphasis = t.label, delete t.label);
}
function ja(r, e) {
return r.hasOwnProperty(e);
}
function h9(r) {
r.registerComponentModel(J7), r.registerComponentView(s9), r.registerSubTypeDefaulter("timeline", function() {
return "slider";
}), l9(r), r.registerPreprocessor(u9);
}
function Dm(r, e) {
if (!r)
return !1;
for (var t = z(r) ? r : [r], n = 0; n < t.length; n++)
if (t[n] && t[n][e])
return !0;
return !1;
}
function Wu(r) {
pi(r, "label", ["show"]);
}
var Uu = Tt(), kI = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.createdBySelf = !1, t;
}
return e.prototype.init = function(t, n, a) {
if (process.env.NODE_ENV !== "production" && this.type === "marker")
throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");
this.mergeDefaultAndTheme(t, a), this._mergeOption(t, a, !1, !0);
}, e.prototype.isAnimationEnabled = function() {
if (Dt.node)
return !1;
var t = this.__hostSeries;
return this.getShallow("animation") && t && t.isAnimationEnabled();
}, e.prototype.mergeOption = function(t, n) {
this._mergeOption(t, n, !1, !1);
}, e.prototype._mergeOption = function(t, n, a, i) {
var o = this.mainType;
a || n.eachSeries(function(s) {
var l = s.get(this.mainType, !0), u = Uu(s)[o];
if (!l || !l.data) {
Uu(s)[o] = null;
return;
}
u ? u._mergeOption(l, n, !0) : (i && Wu(l), C(l.data, function(f) {
f instanceof Array ? (Wu(f[0]), Wu(f[1])) : Wu(f);
}), u = this.createMarkerModelFromSeries(l, this, n), B(u, {
mainType: this.mainType,
seriesIndex: s.seriesIndex,
name: s.name,
createdBySelf: !0
}), u.__hostSeries = s), Uu(s)[o] = u;
}, this);
}, e.prototype.formatTooltip = function(t, n, a) {
var i = this.getData(), o = this.getRawValue(t), s = i.getName(t);
return ae("section", {
header: this.name,
blocks: [ae("nameValue", {
name: s,
value: o,
noName: !s,
noValue: o == null
})]
});
}, e.prototype.getData = function() {
return this._data;
}, e.prototype.setData = function(t) {
this._data = t;
}, e.getMarkerModelFromSeries = function(t, n) {
return Uu(t)[n];
}, e.type = "marker", e.dependencies = ["series", "grid", "polar", "geo"], e;
}(_t);
Qt(kI, vy.prototype);
const ha = kI;
var c9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.createMarkerModelFromSeries = function(t, n, a) {
return new e(t, n, a);
}, e.type = "markPoint", e.defaultOption = {
z: 5,
symbol: "pin",
symbolSize: 50,
tooltip: {
trigger: "item"
},
label: {
show: !0,
position: "inside"
},
itemStyle: {
borderWidth: 2
},
emphasis: {
label: {
show: !0
}
}
}, e;
}(ha);
const v9 = c9;
function mg(r) {
return !(isNaN(parseFloat(r.x)) && isNaN(parseFloat(r.y)));
}
function p9(r) {
return !isNaN(parseFloat(r.x)) && !isNaN(parseFloat(r.y));
}
function Yu(r, e, t, n, a, i) {
var o = [], s = sa(
e,
n
), l = s ? e.getCalculationInfo("stackResultDimension") : n, u = Am(e, l, r), f = e.indicesOfNearest(l, u)[0];
o[a] = e.get(t, f), o[i] = e.get(l, f);
var h = e.get(n, f), c = Hr(e.get(n, f));
return c = Math.min(c, 20), c >= 0 && (o[i] = +o[i].toFixed(c)), [o, h];
}
var Sp = {
min: it(Yu, "min"),
max: it(Yu, "max"),
average: it(Yu, "average"),
median: it(Yu, "median")
};
function bl(r, e) {
var t = r.getData(), n = r.coordinateSystem;
if (e && !p9(e) && !z(e.coord) && n) {
var a = n.dimensions, i = OI(e, t, n, r);
if (e = tt(e), e.type && Sp[e.type] && i.baseAxis && i.valueAxis) {
var o = ct(a, i.baseAxis.dim), s = ct(a, i.valueAxis.dim), l = Sp[e.type](t, i.baseDataDim, i.valueDataDim, o, s);
e.coord = l[0], e.value = l[1];
} else {
for (var u = [e.xAxis != null ? e.xAxis : e.radiusAxis, e.yAxis != null ? e.yAxis : e.angleAxis], f = 0; f < 2; f++)
Sp[u[f]] && (u[f] = Am(t, t.mapDimension(a[f]), u[f]));
e.coord = u;
}
}
return e;
}
function OI(r, e, t, n) {
var a = {};
return r.valueIndex != null || r.valueDim != null ? (a.valueDataDim = r.valueIndex != null ? e.getDimension(r.valueIndex) : r.valueDim, a.valueAxis = t.getAxis(d9(n, a.valueDataDim)), a.baseAxis = t.getOtherAxis(a.valueAxis), a.baseDataDim = e.mapDimension(a.baseAxis.dim)) : (a.baseAxis = n.getBaseAxis(), a.valueAxis = t.getOtherAxis(a.baseAxis), a.baseDataDim = e.mapDimension(a.baseAxis.dim), a.valueDataDim = e.mapDimension(a.valueAxis.dim)), a;
}
function d9(r, e) {
var t = r.getData().getDimensionInfo(e);
return t && t.coordDim;
}
function Tl(r, e) {
return r && r.containData && e.coord && !mg(e) ? r.containData(e.coord) : !0;
}
function g9(r, e, t) {
return r && r.containZone && e.coord && t.coord && !mg(e) && !mg(t) ? r.containZone(e.coord, t.coord) : !0;
}
function VI(r, e) {
return r ? function(t, n, a, i) {
var o = i < 2 ? t.coord && t.coord[i] : t.value;
return ta(o, e[i]);
} : function(t, n, a, i) {
return ta(t.value, e[i]);
};
}
function Am(r, e, t) {
if (t === "average") {
var n = 0, a = 0;
return r.each(e, function(i, o) {
isNaN(i) || (n += i, a++);
}), n / a;
} else
return t === "median" ? r.getMedian(e) : r.getDataExtent(e)[t === "max" ? 1 : 0];
}
var xp = Tt(), y9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.init = function() {
this.markerGroupMap = K();
}, e.prototype.render = function(t, n, a) {
var i = this, o = this.markerGroupMap;
o.each(function(s) {
xp(s).keep = !1;
}), n.eachSeries(function(s) {
var l = ha.getMarkerModelFromSeries(s, i.type);
l && i.renderSeries(s, l, n, a);
}), o.each(function(s) {
!xp(s).keep && i.group.remove(s.group);
});
}, e.prototype.markKeep = function(t) {
xp(t).keep = !0;
}, e.prototype.toggleBlurSeries = function(t, n) {
var a = this;
C(t, function(i) {
var o = ha.getMarkerModelFromSeries(i, a.type);
if (o) {
var s = o.getData();
s.eachItemGraphicEl(function(l) {
l && (n ? fC(l) : Zg(l));
});
}
});
}, e.type = "marker", e;
}(Ht);
const Mm = y9;
function nb(r, e, t) {
var n = e.coordinateSystem;
r.each(function(a) {
var i = r.getItemModel(a), o, s = H(i.get("x"), t.getWidth()), l = H(i.get("y"), t.getHeight());
if (!isNaN(s) && !isNaN(l))
o = [s, l];
else if (e.getMarkerPosition)
o = e.getMarkerPosition(r.getValues(r.dimensions, a));
else if (n) {
var u = r.get(n.dimensions[0], a), f = r.get(n.dimensions[1], a);
o = n.dataToPoint([u, f]);
}
isNaN(s) || (o[0] = s), isNaN(l) || (o[1] = l), r.setItemLayout(a, o);
});
}
var m9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.updateTransform = function(t, n, a) {
n.eachSeries(function(i) {
var o = ha.getMarkerModelFromSeries(i, "markPoint");
o && (nb(o.getData(), i, a), this.markerGroupMap.get(i.id).updateLayout());
}, this);
}, e.prototype.renderSeries = function(t, n, a, i) {
var o = t.coordinateSystem, s = t.id, l = t.getData(), u = this.markerGroupMap, f = u.get(s) || u.set(s, new Gl()), h = _9(o, t, n);
n.setData(h), nb(n.getData(), t, i), h.each(function(c) {
var v = h.getItemModel(c), p = v.getShallow("symbol"), d = v.getShallow("symbolSize"), g = v.getShallow("symbolRotate"), y = v.getShallow("symbolOffset"), m = v.getShallow("symbolKeepAspect");
if (q(p) || q(d) || q(g) || q(y)) {
var _ = n.getRawValue(c), S = n.getDataParams(c);
q(p) && (p = p(_, S)), q(d) && (d = d(_, S)), q(g) && (g = g(_, S)), q(y) && (y = y(_, S));
}
var w = v.getModel("itemStyle").getItemStyle(), x = Rl(l, "color");
w.fill || (w.fill = x), h.setItemVisual(c, {
symbol: p,
symbolSize: d,
symbolRotate: g,
symbolOffset: y,
symbolKeepAspect: m,
style: w
});
}), f.updateData(h), this.group.add(f.group), h.eachItemGraphicEl(function(c) {
c.traverse(function(v) {
at(v).dataModel = n;
});
}), this.markKeep(f), f.group.silent = n.get("silent") || t.get("silent");
}, e.type = "markPoint", e;
}(Mm);
function _9(r, e, t) {
var n;
r ? n = G(r && r.dimensions, function(s) {
var l = e.getData().getDimensionInfo(e.getData().mapDimension(s)) || {};
return B(B({}, l), {
name: s,
ordinalMeta: null
});
}) : n = [{
name: "value",
type: "float"
}];
var a = new Ae(n, t), i = G(t.get("data"), it(bl, e));
r && (i = Et(i, it(Tl, r)));
var o = VI(!!r, n);
return a.initData(i, null, o), a;
}
const S9 = m9;
function x9(r) {
r.registerComponentModel(v9), r.registerComponentView(S9), r.registerPreprocessor(function(e) {
Dm(e.series, "markPoint") && (e.markPoint = e.markPoint || {});
});
}
var w9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.createMarkerModelFromSeries = function(t, n, a) {
return new e(t, n, a);
}, e.type = "markLine", e.defaultOption = {
z: 5,
symbol: ["circle", "arrow"],
symbolSize: [8, 16],
symbolOffset: 0,
precision: 2,
tooltip: {
trigger: "item"
},
label: {
show: !0,
position: "end",
distance: 5
},
lineStyle: {
type: "dashed"
},
emphasis: {
label: {
show: !0
},
lineStyle: {
width: 3
}
},
animationEasing: "linear"
}, e;
}(ha);
const b9 = w9;
var Zu = Tt(), T9 = function(r, e, t, n) {
var a = r.getData(), i;
if (z(n))
i = n;
else {
var o = n.type;
if (o === "min" || o === "max" || o === "average" || o === "median" || n.xAxis != null || n.yAxis != null) {
var s = void 0, l = void 0;
if (n.yAxis != null || n.xAxis != null)
s = e.getAxis(n.yAxis != null ? "y" : "x"), l = qt(n.yAxis, n.xAxis);
else {
var u = OI(n, a, e, r);
s = u.valueAxis;
var f = bA(a, u.valueDataDim);
l = Am(a, f, o);
}
var h = s.dim === "x" ? 0 : 1, c = 1 - h, v = tt(n), p = {
coord: []
};
v.type = null, v.coord = [], v.coord[c] = -1 / 0, p.coord[c] = 1 / 0;
var d = t.get("precision");
d >= 0 && wt(l) && (l = +l.toFixed(Math.min(d, 20))), v.coord[h] = p.coord[h] = l, i = [v, p, {
type: o,
valueIndex: n.valueIndex,
value: l
}];
} else
process.env.NODE_ENV !== "production" && br("Invalid markLine data."), i = [];
}
var g = [bl(r, i[0]), bl(r, i[1]), B({}, i[2])];
return g[2].type = g[2].type || null, lt(g[2], g[0]), lt(g[2], g[1]), g;
};
function hh(r) {
return !isNaN(r) && !isFinite(r);
}
function ab(r, e, t, n) {
var a = 1 - r, i = n.dimensions[r];
return hh(e[a]) && hh(t[a]) && e[r] === t[r] && n.getAxis(i).containData(e[r]);
}
function C9(r, e) {
if (r.type === "cartesian2d") {
var t = e[0].coord, n = e[1].coord;
if (t && n && (ab(1, t, n, r) || ab(0, t, n, r)))
return !0;
}
return Tl(r, e[0]) && Tl(r, e[1]);
}
function wp(r, e, t, n, a) {
var i = n.coordinateSystem, o = r.getItemModel(e), s, l = H(o.get("x"), a.getWidth()), u = H(o.get("y"), a.getHeight());
if (!isNaN(l) && !isNaN(u))
s = [l, u];
else {
if (n.getMarkerPosition)
s = n.getMarkerPosition(r.getValues(r.dimensions, e));
else {
var f = i.dimensions, h = r.get(f[0], e), c = r.get(f[1], e);
s = i.dataToPoint([h, c]);
}
if (Di(i, "cartesian2d")) {
var v = i.getAxis("x"), p = i.getAxis("y"), f = i.dimensions;
hh(r.get(f[0], e)) ? s[0] = v.toGlobalCoord(v.getExtent()[t ? 0 : 1]) : hh(r.get(f[1], e)) && (s[1] = p.toGlobalCoord(p.getExtent()[t ? 0 : 1]));
}
isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
}
r.setItemLayout(e, s);
}
var D9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.updateTransform = function(t, n, a) {
n.eachSeries(function(i) {
var o = ha.getMarkerModelFromSeries(i, "markLine");
if (o) {
var s = o.getData(), l = Zu(o).from, u = Zu(o).to;
l.each(function(f) {
wp(l, f, !0, i, a), wp(u, f, !1, i, a);
}), s.each(function(f) {
s.setItemLayout(f, [l.getItemLayout(f), u.getItemLayout(f)]);
}), this.markerGroupMap.get(i.id).updateLayout();
}
}, this);
}, e.prototype.renderSeries = function(t, n, a, i) {
var o = t.coordinateSystem, s = t.id, l = t.getData(), u = this.markerGroupMap, f = u.get(s) || u.set(s, new jy());
this.group.add(f.group);
var h = A9(o, t, n), c = h.from, v = h.to, p = h.line;
Zu(n).from = c, Zu(n).to = v, n.setData(p);
var d = n.get("symbol"), g = n.get("symbolSize"), y = n.get("symbolRotate"), m = n.get("symbolOffset");
z(d) || (d = [d, d]), z(g) || (g = [g, g]), z(y) || (y = [y, y]), z(m) || (m = [m, m]), h.from.each(function(S) {
_(c, S, !0), _(v, S, !1);
}), p.each(function(S) {
var w = p.getItemModel(S).getModel("lineStyle").getLineStyle();
p.setItemLayout(S, [c.getItemLayout(S), v.getItemLayout(S)]), w.stroke == null && (w.stroke = c.getItemVisual(S, "style").fill), p.setItemVisual(S, {
fromSymbolKeepAspect: c.getItemVisual(S, "symbolKeepAspect"),
fromSymbolOffset: c.getItemVisual(S, "symbolOffset"),
fromSymbolRotate: c.getItemVisual(S, "symbolRotate"),
fromSymbolSize: c.getItemVisual(S, "symbolSize"),
fromSymbol: c.getItemVisual(S, "symbol"),
toSymbolKeepAspect: v.getItemVisual(S, "symbolKeepAspect"),
toSymbolOffset: v.getItemVisual(S, "symbolOffset"),
toSymbolRotate: v.getItemVisual(S, "symbolRotate"),
toSymbolSize: v.getItemVisual(S, "symbolSize"),
toSymbol: v.getItemVisual(S, "symbol"),
style: w
});
}), f.updateData(p), h.line.eachItemGraphicEl(function(S) {
at(S).dataModel = n, S.traverse(function(w) {
at(w).dataModel = n;
});
});
function _(S, w, x) {
var b = S.getItemModel(w);
wp(S, w, x, t, i);
var T = b.getModel("itemStyle").getItemStyle();
T.fill == null && (T.fill = Rl(l, "color")), S.setItemVisual(w, {
symbolKeepAspect: b.get("symbolKeepAspect"),
symbolOffset: vt(b.get("symbolOffset", !0), m[x ? 0 : 1]),
symbolRotate: vt(b.get("symbolRotate", !0), y[x ? 0 : 1]),
symbolSize: vt(b.get("symbolSize"), g[x ? 0 : 1]),
symbol: vt(b.get("symbol", !0), d[x ? 0 : 1]),
style: T
});
}
this.markKeep(f), f.group.silent = n.get("silent") || t.get("silent");
}, e.type = "markLine", e;
}(Mm);
function A9(r, e, t) {
var n;
r ? n = G(r && r.dimensions, function(u) {
var f = e.getData().getDimensionInfo(e.getData().mapDimension(u)) || {};
return B(B({}, f), {
name: u,
ordinalMeta: null
});
}) : n = [{
name: "value",
type: "float"
}];
var a = new Ae(n, t), i = new Ae(n, t), o = new Ae([], t), s = G(t.get("data"), it(T9, e, r, t));
r && (s = Et(s, it(C9, r)));
var l = VI(!!r, n);
return a.initData(G(s, function(u) {
return u[0];
}), null, l), i.initData(G(s, function(u) {
return u[1];
}), null, l), o.initData(G(s, function(u) {
return u[2];
})), o.hasItemOption = !0, {
from: a,
to: i,
line: o
};
}
const M9 = D9;
function L9(r) {
r.registerComponentModel(b9), r.registerComponentView(M9), r.registerPreprocessor(function(e) {
Dm(e.series, "markLine") && (e.markLine = e.markLine || {});
});
}
var I9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.createMarkerModelFromSeries = function(t, n, a) {
return new e(t, n, a);
}, e.type = "markArea", e.defaultOption = {
z: 1,
tooltip: {
trigger: "item"
},
animation: !1,
label: {
show: !0,
position: "top"
},
itemStyle: {
borderWidth: 0
},
emphasis: {
label: {
show: !0,
position: "top"
}
}
}, e;
}(ha);
const E9 = I9;
var Xu = Tt(), P9 = function(r, e, t, n) {
var a = bl(r, n[0]), i = bl(r, n[1]), o = a.coord, s = i.coord;
o[0] = qt(o[0], -1 / 0), o[1] = qt(o[1], -1 / 0), s[0] = qt(s[0], 1 / 0), s[1] = qt(s[1], 1 / 0);
var l = Ig([{}, a, i]);
return l.coord = [a.coord, i.coord], l.x0 = a.x, l.y0 = a.y, l.x1 = i.x, l.y1 = i.y, l;
};
function ch(r) {
return !isNaN(r) && !isFinite(r);
}
function ib(r, e, t, n) {
var a = 1 - r;
return ch(e[a]) && ch(t[a]);
}
function N9(r, e) {
var t = e.coord[0], n = e.coord[1], a = {
coord: t,
x: e.x0,
y: e.y0
}, i = {
coord: n,
x: e.x1,
y: e.y1
};
return Di(r, "cartesian2d") ? t && n && (ib(1, t, n) || ib(0, t, n)) ? !0 : g9(r, a, i) : Tl(r, a) || Tl(r, i);
}
function ob(r, e, t, n, a) {
var i = n.coordinateSystem, o = r.getItemModel(e), s, l = H(o.get(t[0]), a.getWidth()), u = H(o.get(t[1]), a.getHeight());
if (!isNaN(l) && !isNaN(u))
s = [l, u];
else {
if (n.getMarkerPosition)
s = n.getMarkerPosition(r.getValues(t, e));
else {
var f = r.get(t[0], e), h = r.get(t[1], e), c = [f, h];
i.clampData && i.clampData(c, c), s = i.dataToPoint(c, !0);
}
if (Di(i, "cartesian2d")) {
var v = i.getAxis("x"), p = i.getAxis("y"), f = r.get(t[0], e), h = r.get(t[1], e);
ch(f) ? s[0] = v.toGlobalCoord(v.getExtent()[t[0] === "x0" ? 0 : 1]) : ch(h) && (s[1] = p.toGlobalCoord(p.getExtent()[t[1] === "y0" ? 0 : 1]));
}
isNaN(l) || (s[0] = l), isNaN(u) || (s[1] = u);
}
return s;
}
var sb = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]], R9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.updateTransform = function(t, n, a) {
n.eachSeries(function(i) {
var o = ha.getMarkerModelFromSeries(i, "markArea");
if (o) {
var s = o.getData();
s.each(function(l) {
var u = G(sb, function(h) {
return ob(s, l, h, i, a);
});
s.setItemLayout(l, u);
var f = s.getItemGraphicEl(l);
f.setShape("points", u);
});
}
}, this);
}, e.prototype.renderSeries = function(t, n, a, i) {
var o = t.coordinateSystem, s = t.id, l = t.getData(), u = this.markerGroupMap, f = u.get(s) || u.set(s, {
group: new nt()
});
this.group.add(f.group), this.markKeep(f);
var h = k9(o, t, n);
n.setData(h), h.each(function(c) {
var v = G(sb, function(T) {
return ob(h, c, T, t, i);
}), p = o.getAxis("x").scale, d = o.getAxis("y").scale, g = p.getExtent(), y = d.getExtent(), m = [p.parse(h.get("x0", c)), p.parse(h.get("x1", c))], _ = [d.parse(h.get("y0", c)), d.parse(h.get("y1", c))];
lr(m), lr(_);
var S = !(g[0] > m[1] || g[1] < m[0] || y[0] > _[1] || y[1] < _[0]), w = !S;
h.setItemLayout(c, {
points: v,
allClipped: w
});
var x = h.getItemModel(c).getModel("itemStyle").getItemStyle(), b = Rl(l, "color");
x.fill || (x.fill = b, W(x.fill) && (x.fill = wf(x.fill, 0.4))), x.stroke || (x.stroke = b), h.setItemVisual(c, "style", x);
}), h.diff(Xu(f).data).add(function(c) {
var v = h.getItemLayout(c);
if (!v.allClipped) {
var p = new Be({
shape: {
points: v.points
}
});
h.setItemGraphicEl(c, p), f.group.add(p);
}
}).update(function(c, v) {
var p = Xu(f).data.getItemGraphicEl(v), d = h.getItemLayout(c);
d.allClipped ? p && f.group.remove(p) : (p ? bt(p, {
shape: {
points: d.points
}
}, n, c) : p = new Be({
shape: {
points: d.points
}
}), h.setItemGraphicEl(c, p), f.group.add(p));
}).remove(function(c) {
var v = Xu(f).data.getItemGraphicEl(c);
f.group.remove(v);
}).execute(), h.eachItemGraphicEl(function(c, v) {
var p = h.getItemModel(v), d = h.getItemVisual(v, "style");
c.useStyle(h.getItemVisual(v, "style")), xe(c, se(p), {
labelFetcher: n,
labelDataIndex: v,
defaultText: h.getName(v) || "",
inheritColor: W(d.fill) ? wf(d.fill, 1) : "#000"
}), ce(c, p), Ut(c, null, null, p.get(["emphasis", "disabled"])), at(c).dataModel = n;
}), Xu(f).data = h, f.group.silent = n.get("silent") || t.get("silent");
}, e.type = "markArea", e;
}(Mm);
function k9(r, e, t) {
var n, a, i = ["x0", "y0", "x1", "y1"];
if (r) {
var o = G(r && r.dimensions, function(u) {
var f = e.getData(), h = f.getDimensionInfo(f.mapDimension(u)) || {};
return B(B({}, h), {
name: u,
ordinalMeta: null
});
});
a = G(i, function(u, f) {
return {
name: u,
type: o[f % 2].type
};
}), n = new Ae(a, t);
} else
a = [{
name: "value",
type: "float"
}], n = new Ae(a, t);
var s = G(t.get("data"), it(P9, e, r, t));
r && (s = Et(s, it(N9, r)));
var l = r ? function(u, f, h, c) {
var v = u.coord[Math.floor(c / 2)][c % 2];
return ta(v, a[c]);
} : function(u, f, h, c) {
return ta(u.value, a[c]);
};
return n.initData(s, null, l), n.hasItemOption = !0, n;
}
const O9 = R9;
function V9(r) {
r.registerComponentModel(E9), r.registerComponentView(O9), r.registerPreprocessor(function(e) {
Dm(e.series, "markArea") && (e.markArea = e.markArea || {});
});
}
var B9 = function(r, e) {
if (e === "all")
return {
type: "all",
title: r.getLocaleModel().get(["legend", "selector", "all"])
};
if (e === "inverse")
return {
type: "inverse",
title: r.getLocaleModel().get(["legend", "selector", "inverse"])
};
}, z9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.layoutMode = {
type: "box",
ignoreSize: !0
}, t;
}
return e.prototype.init = function(t, n, a) {
this.mergeDefaultAndTheme(t, a), t.selected = t.selected || {}, this._updateSelector(t);
}, e.prototype.mergeOption = function(t, n) {
r.prototype.mergeOption.call(this, t, n), this._updateSelector(t);
}, e.prototype._updateSelector = function(t) {
var n = t.selector, a = this.ecModel;
n === !0 && (n = t.selector = ["all", "inverse"]), z(n) && C(n, function(i, o) {
W(i) && (i = {
type: i
}), n[o] = lt(i, B9(a, i.type));
});
}, e.prototype.optionUpdated = function() {
this._updateData(this.ecModel);
var t = this._data;
if (t[0] && this.get("selectedMode") === "single") {
for (var n = !1, a = 0; a < t.length; a++) {
var i = t[a].get("name");
if (this.isSelected(i)) {
this.select(i), n = !0;
break;
}
}
!n && this.select(t[0].get("name"));
}
}, e.prototype._updateData = function(t) {
var n = [], a = [];
t.eachRawSeries(function(s) {
var l = s.name;
a.push(l);
var u;
if (s.legendVisualProvider) {
var f = s.legendVisualProvider, h = f.getAllNames();
t.isSeriesFiltered(s) || (a = a.concat(h)), h.length ? n = n.concat(h) : u = !0;
} else
u = !0;
u && Gg(s) && n.push(s.name);
}), this._availableNames = a;
var i = this.get("data") || n, o = G(i, function(s) {
return (W(s) || wt(s)) && (s = {
name: s
}), new kt(s, this, this.ecModel);
}, this);
this._data = o;
}, e.prototype.getData = function() {
return this._data;
}, e.prototype.select = function(t) {
var n = this.option.selected, a = this.get("selectedMode");
if (a === "single") {
var i = this._data;
C(i, function(o) {
n[o.get("name")] = !1;
});
}
n[t] = !0;
}, e.prototype.unSelect = function(t) {
this.get("selectedMode") !== "single" && (this.option.selected[t] = !1);
}, e.prototype.toggleSelected = function(t) {
var n = this.option.selected;
n.hasOwnProperty(t) || (n[t] = !0), this[n[t] ? "unSelect" : "select"](t);
}, e.prototype.allSelect = function() {
var t = this._data, n = this.option.selected;
C(t, function(a) {
n[a.get("name", !0)] = !0;
});
}, e.prototype.inverseSelect = function() {
var t = this._data, n = this.option.selected;
C(t, function(a) {
var i = a.get("name", !0);
n.hasOwnProperty(i) || (n[i] = !0), n[i] = !n[i];
});
}, e.prototype.isSelected = function(t) {
var n = this.option.selected;
return !(n.hasOwnProperty(t) && !n[t]) && ct(this._availableNames, t) >= 0;
}, e.prototype.getOrient = function() {
return this.get("orient") === "vertical" ? {
index: 1,
name: "vertical"
} : {
index: 0,
name: "horizontal"
};
}, e.type = "legend.plain", e.dependencies = ["series"], e.defaultOption = {
z: 4,
show: !0,
orient: "horizontal",
left: "center",
top: 0,
align: "auto",
backgroundColor: "rgba(0,0,0,0)",
borderColor: "#ccc",
borderRadius: 0,
borderWidth: 0,
padding: 5,
itemGap: 10,
itemWidth: 25,
itemHeight: 14,
symbolRotate: "inherit",
symbolKeepAspect: !0,
inactiveColor: "#ccc",
inactiveBorderColor: "#ccc",
inactiveBorderWidth: "auto",
itemStyle: {
color: "inherit",
opacity: "inherit",
borderColor: "inherit",
borderWidth: "auto",
borderCap: "inherit",
borderJoin: "inherit",
borderDashOffset: "inherit",
borderMiterLimit: "inherit"
},
lineStyle: {
width: "auto",
color: "inherit",
inactiveColor: "#ccc",
inactiveWidth: 2,
opacity: "inherit",
type: "inherit",
cap: "inherit",
join: "inherit",
dashOffset: "inherit",
miterLimit: "inherit"
},
textStyle: {
color: "#333"
},
selectedMode: !0,
selector: !1,
selectorLabel: {
show: !0,
borderRadius: 10,
padding: [3, 5, 3, 5],
fontSize: 12,
fontFamily: "sans-serif",
color: "#666",
borderWidth: 1,
borderColor: "#666"
},
emphasis: {
selectorLabel: {
show: !0,
color: "#eee",
backgroundColor: "#666"
}
},
selectorPosition: "auto",
selectorItemGap: 7,
selectorButtonGap: 10,
tooltip: {
show: !1
}
}, e;
}(_t);
const _g = z9;
var qi = it, Sg = C, qu = nt, G9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.newlineDisabled = !1, t;
}
return e.prototype.init = function() {
this.group.add(this._contentGroup = new qu()), this.group.add(this._selectorGroup = new qu()), this._isFirstRender = !0;
}, e.prototype.getContentGroup = function() {
return this._contentGroup;
}, e.prototype.getSelectorGroup = function() {
return this._selectorGroup;
}, e.prototype.render = function(t, n, a) {
var i = this._isFirstRender;
if (this._isFirstRender = !1, this.resetInner(), !!t.get("show", !0)) {
var o = t.get("align"), s = t.get("orient");
(!o || o === "auto") && (o = t.get("left") === "right" && s === "vertical" ? "right" : "left");
var l = t.get("selector", !0), u = t.get("selectorPosition", !0);
l && (!u || u === "auto") && (u = s === "horizontal" ? "end" : "start"), this.renderInner(o, t, n, a, l, s, u);
var f = t.getBoxLayoutParams(), h = {
width: a.getWidth(),
height: a.getHeight()
}, c = t.get("padding"), v = ee(f, h, c), p = this.layoutInner(t, o, v, i, l, u), d = ee(J({
width: p.width,
height: p.height
}, f), h, c);
this.group.x = d.x - p.x, this.group.y = d.y - p.y, this.group.markRedraw(), this.group.add(this._backgroundEl = CI(p, t));
}
}, e.prototype.resetInner = function() {
this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
}, e.prototype.renderInner = function(t, n, a, i, o, s, l) {
var u = this.getContentGroup(), f = K(), h = n.get("selectedMode"), c = [];
a.eachRawSeries(function(v) {
!v.get("legendHoverLink") && c.push(v.id);
}), Sg(n.getData(), function(v, p) {
var d = v.get("name");
if (!this.newlineDisabled && (d === "" || d === `
`)) {
var g = new qu();
g.newline = !0, u.add(g);
return;
}
var y = a.getSeriesByName(d)[0];
if (!f.get(d)) {
if (y) {
var m = y.getData(), _ = m.getVisual("legendLineStyle") || {}, S = m.getVisual("legendIcon"), w = m.getVisual("style"), x = this._createItem(y, d, p, v, n, t, _, w, S, h, i);
x.on("click", qi(lb, d, null, i, c)).on("mouseover", qi(xg, y.name, null, i, c)).on("mouseout", qi(wg, y.name, null, i, c)), f.set(d, !0);
} else
a.eachRawSeries(function(b) {
if (!f.get(d) && b.legendVisualProvider) {
var T = b.legendVisualProvider;
if (!T.containName(d))
return;
var D = T.indexOfName(d), A = T.getItemVisual(D, "style"), M = T.getItemVisual(D, "legendIcon"), L = Ue(A.fill);
L && L[3] === 0 && (L[3] = 0.2, A = B(B({}, A), {
fill: cn(L, "rgba")
}));
var I = this._createItem(b, d, p, v, n, t, {}, A, M, h, i);
I.on("click", qi(lb, null, d, i, c)).on("mouseover", qi(xg, null, d, i, c)).on("mouseout", qi(wg, null, d, i, c)), f.set(d, !0);
}
}, this);
process.env.NODE_ENV !== "production" && (f.get(d) || console.warn(d + " series not exists. Legend data should be same with series name or data name."));
}
}, this), o && this._createSelector(o, n, i, s, l);
}, e.prototype._createSelector = function(t, n, a, i, o) {
var s = this.getSelectorGroup();
Sg(t, function(u) {
var f = u.type, h = new Ct({
style: {
x: 0,
y: 0,
align: "center",
verticalAlign: "middle"
},
onclick: function() {
a.dispatchAction({
type: f === "all" ? "legendAllSelect" : "legendInverseSelect"
});
}
});
s.add(h);
var c = n.getModel("selectorLabel"), v = n.getModel(["emphasis", "selectorLabel"]);
xe(h, {
normal: c,
emphasis: v
}, {
defaultText: u.title
}), si(h);
});
}, e.prototype._createItem = function(t, n, a, i, o, s, l, u, f, h, c) {
var v = t.visualDrawType, p = o.get("itemWidth"), d = o.get("itemHeight"), g = o.isSelected(n), y = i.get("symbolRotate"), m = i.get("symbolKeepAspect"), _ = i.get("icon");
f = _ || f || "roundRect";
var S = F9(f, i, l, u, v, g, c), w = new qu(), x = i.getModel("textStyle");
if (q(t.getLegendIcon) && (!_ || _ === "inherit"))
w.add(t.getLegendIcon({
itemWidth: p,
itemHeight: d,
icon: f,
iconRotate: y,
itemStyle: S.itemStyle,
lineStyle: S.lineStyle,
symbolKeepAspect: m
}));
else {
var b = _ === "inherit" && t.getData().getVisual("symbol") ? y === "inherit" ? t.getData().getVisual("symbolRotate") : y : 0;
w.add(H9({
itemWidth: p,
itemHeight: d,
icon: f,
iconRotate: b,
itemStyle: S.itemStyle,
lineStyle: S.lineStyle,
symbolKeepAspect: m
}));
}
var T = s === "left" ? p + 5 : -5, D = s, A = o.get("formatter"), M = n;
W(A) && A ? M = A.replace("{name}", n != null ? n : "") : q(A) && (M = A(n));
var L = i.get("inactiveColor");
w.add(new Ct({
style: zt(x, {
text: M,
x: T,
y: d / 2,
fill: g ? x.getTextColor() : L,
align: D,
verticalAlign: "middle"
})
}));
var I = new xt({
shape: w.getBoundingRect(),
invisible: !0
}), E = i.getModel("tooltip");
return E.get("show") && Oo({
el: I,
componentModel: o,
itemName: n,
itemTooltipOption: E.option
}), w.add(I), w.eachChild(function(P) {
P.silent = !0;
}), I.silent = !h, this.getContentGroup().add(w), si(w), w.__legendDataIndex = a, w;
}, e.prototype.layoutInner = function(t, n, a, i, o, s) {
var l = this.getContentGroup(), u = this.getSelectorGroup();
ui(t.get("orient"), l, t.get("itemGap"), a.width, a.height);
var f = l.getBoundingRect(), h = [-f.x, -f.y];
if (u.markRedraw(), l.markRedraw(), o) {
ui(
"horizontal",
u,
t.get("selectorItemGap", !0)
);
var c = u.getBoundingRect(), v = [-c.x, -c.y], p = t.get("selectorButtonGap", !0), d = t.getOrient().index, g = d === 0 ? "width" : "height", y = d === 0 ? "height" : "width", m = d === 0 ? "y" : "x";
s === "end" ? v[d] += f[g] + p : h[d] += c[g] + p, v[1 - d] += f[y] / 2 - c[y] / 2, u.x = v[0], u.y = v[1], l.x = h[0], l.y = h[1];
var _ = {
x: 0,
y: 0
};
return _[g] = f[g] + p + c[g], _[y] = Math.max(f[y], c[y]), _[m] = Math.min(0, c[m] + v[1 - d]), _;
} else
return l.x = h[0], l.y = h[1], this.group.getBoundingRect();
}, e.prototype.remove = function() {
this.getContentGroup().removeAll(), this._isFirstRender = !0;
}, e.type = "legend.plain", e;
}(Ht);
function F9(r, e, t, n, a, i, o) {
function s(g, y) {
g.lineWidth === "auto" && (g.lineWidth = y.lineWidth > 0 ? 2 : 0), Sg(g, function(m, _) {
g[_] === "inherit" && (g[_] = y[_]);
});
}
var l = e.getModel("itemStyle"), u = l.getItemStyle(), f = r.lastIndexOf("empty", 0) === 0 ? "fill" : "stroke", h = l.getShallow("decal");
u.decal = !h || h === "inherit" ? n.decal : bo(h, o), u.fill === "inherit" && (u.fill = n[a]), u.stroke === "inherit" && (u.stroke = n[f]), u.opacity === "inherit" && (u.opacity = (a === "fill" ? n : t).opacity), s(u, n);
var c = e.getModel("lineStyle"), v = c.getLineStyle();
if (s(v, t), u.fill === "auto" && (u.fill = n.fill), u.stroke === "auto" && (u.stroke = n.fill), v.stroke === "auto" && (v.stroke = n.fill), !i) {
var p = e.get("inactiveBorderWidth"), d = u[f];
u.lineWidth = p === "auto" ? n.lineWidth > 0 && d ? 2 : 0 : u.lineWidth, u.fill = e.get("inactiveColor"), u.stroke = e.get("inactiveBorderColor"), v.stroke = c.get("inactiveColor"), v.lineWidth = c.get("inactiveWidth");
}
return {
itemStyle: u,
lineStyle: v
};
}
function H9(r) {
var e = r.icon || "roundRect", t = Jt(e, 0, 0, r.itemWidth, r.itemHeight, r.itemStyle.fill, r.symbolKeepAspect);
return t.setStyle(r.itemStyle), t.rotation = (r.iconRotate || 0) * Math.PI / 180, t.setOrigin([r.itemWidth / 2, r.itemHeight / 2]), e.indexOf("empty") > -1 && (t.style.stroke = t.style.fill, t.style.fill = "#fff", t.style.lineWidth = 2), t;
}
function lb(r, e, t, n) {
wg(r, e, t, n), t.dispatchAction({
type: "legendToggleSelect",
name: r != null ? r : e
}), xg(r, e, t, n);
}
function BI(r) {
for (var e = r.getZr().storage.getDisplayList(), t, n = 0, a = e.length; n < a && !(t = e[n].states.emphasis); )
n++;
return t && t.hoverLayer;
}
function xg(r, e, t, n) {
BI(t) || t.dispatchAction({
type: "highlight",
seriesName: r,
name: e,
excludeSeriesId: n
});
}
function wg(r, e, t, n) {
BI(t) || t.dispatchAction({
type: "downplay",
seriesName: r,
name: e,
excludeSeriesId: n
});
}
const zI = G9;
function $9(r) {
var e = r.findComponents({
mainType: "legend"
});
e && e.length && r.filterSeries(function(t) {
for (var n = 0; n < e.length; n++)
if (!e[n].isSelected(t.name))
return !1;
return !0;
});
}
function ws(r, e, t) {
var n = {}, a = r === "toggleSelected", i;
return t.eachComponent("legend", function(o) {
a && i != null ? o[i ? "select" : "unSelect"](e.name) : r === "allSelect" || r === "inverseSelect" ? o[r]() : (o[r](e.name), i = o.isSelected(e.name));
var s = o.getData();
C(s, function(l) {
var u = l.get("name");
if (!(u === `
` || u === "")) {
var f = o.isSelected(u);
n.hasOwnProperty(u) ? n[u] = n[u] && f : n[u] = f;
}
});
}), r === "allSelect" || r === "inverseSelect" ? {
selected: n
} : {
name: e.name,
selected: n
};
}
function W9(r) {
r.registerAction("legendToggleSelect", "legendselectchanged", it(ws, "toggleSelected")), r.registerAction("legendAllSelect", "legendselectall", it(ws, "allSelect")), r.registerAction("legendInverseSelect", "legendinverseselect", it(ws, "inverseSelect")), r.registerAction("legendSelect", "legendselected", it(ws, "select")), r.registerAction("legendUnSelect", "legendunselected", it(ws, "unSelect"));
}
function GI(r) {
r.registerComponentModel(_g), r.registerComponentView(zI), r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER, $9), r.registerSubTypeDefaulter("legend", function() {
return "plain";
}), W9(r);
}
var U9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.setScrollDataIndex = function(t) {
this.option.scrollDataIndex = t;
}, e.prototype.init = function(t, n, a) {
var i = Go(t);
r.prototype.init.call(this, t, n, a), ub(this, t, i);
}, e.prototype.mergeOption = function(t, n) {
r.prototype.mergeOption.call(this, t, n), ub(this, this.option, t);
}, e.type = "legend.scroll", e.defaultOption = va(_g.defaultOption, {
scrollDataIndex: 0,
pageButtonItemGap: 5,
pageButtonGap: null,
pageButtonPosition: "end",
pageFormatter: "{current}/{total}",
pageIcons: {
horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
},
pageIconColor: "#2f4554",
pageIconInactiveColor: "#aaa",
pageIconSize: 15,
pageTextStyle: {
color: "#333"
},
animationDurationUpdate: 800
}), e;
}(_g);
function ub(r, e, t) {
var n = r.getOrient(), a = [1, 1];
a[n.index] = 0, oa(e, t, {
type: "box",
ignoreSize: !!a
});
}
const Y9 = U9;
var fb = nt, bp = ["width", "height"], Tp = ["x", "y"], Z9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.newlineDisabled = !0, t._currentIndex = 0, t;
}
return e.prototype.init = function() {
r.prototype.init.call(this), this.group.add(this._containerGroup = new fb()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new fb());
}, e.prototype.resetInner = function() {
r.prototype.resetInner.call(this), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
}, e.prototype.renderInner = function(t, n, a, i, o, s, l) {
var u = this;
r.prototype.renderInner.call(this, t, n, a, i, o, s, l);
var f = this._controllerGroup, h = n.get("pageIconSize", !0), c = z(h) ? h : [h, h];
p("pagePrev", 0);
var v = n.getModel("pageTextStyle");
f.add(new Ct({
name: "pageText",
style: {
text: "xx/xx",
fill: v.getTextColor(),
font: v.getFont(),
verticalAlign: "middle",
align: "center"
},
silent: !0
})), p("pageNext", 1);
function p(d, g) {
var y = d + "DataIndex", m = Pl(n.get("pageIcons", !0)[n.getOrient().name][g], {
onclick: Y(u._pageGo, u, y, n, i)
}, {
x: -c[0] / 2,
y: -c[1] / 2,
width: c[0],
height: c[1]
});
m.name = d, f.add(m);
}
}, e.prototype.layoutInner = function(t, n, a, i, o, s) {
var l = this.getSelectorGroup(), u = t.getOrient().index, f = bp[u], h = Tp[u], c = bp[1 - u], v = Tp[1 - u];
o && ui(
"horizontal",
l,
t.get("selectorItemGap", !0)
);
var p = t.get("selectorButtonGap", !0), d = l.getBoundingRect(), g = [-d.x, -d.y], y = tt(a);
o && (y[f] = a[f] - d[f] - p);
var m = this._layoutContentAndController(t, i, y, u, f, c, v, h);
if (o) {
if (s === "end")
g[u] += m[f] + p;
else {
var _ = d[f] + p;
g[u] -= _, m[h] -= _;
}
m[f] += d[f] + p, g[1 - u] += m[v] + m[c] / 2 - d[c] / 2, m[c] = Math.max(m[c], d[c]), m[v] = Math.min(m[v], d[v] + g[1 - u]), l.x = g[0], l.y = g[1], l.markRedraw();
}
return m;
}, e.prototype._layoutContentAndController = function(t, n, a, i, o, s, l, u) {
var f = this.getContentGroup(), h = this._containerGroup, c = this._controllerGroup;
ui(t.get("orient"), f, t.get("itemGap"), i ? a.width : null, i ? null : a.height), ui(
"horizontal",
c,
t.get("pageButtonItemGap", !0)
);
var v = f.getBoundingRect(), p = c.getBoundingRect(), d = this._showController = v[o] > a[o], g = [-v.x, -v.y];
n || (g[i] = f[u]);
var y = [0, 0], m = [-p.x, -p.y], _ = vt(t.get("pageButtonGap", !0), t.get("itemGap", !0));
if (d) {
var S = t.get("pageButtonPosition", !0);
S === "end" ? m[i] += a[o] - p[o] : y[i] += p[o] + _;
}
m[1 - i] += v[s] / 2 - p[s] / 2, f.setPosition(g), h.setPosition(y), c.setPosition(m);
var w = {
x: 0,
y: 0
};
if (w[o] = d ? a[o] : v[o], w[s] = Math.max(v[s], p[s]), w[l] = Math.min(0, p[l] + m[1 - i]), h.__rectSize = a[o], d) {
var x = {
x: 0,
y: 0
};
x[o] = Math.max(a[o] - p[o] - _, 0), x[s] = w[s], h.setClipPath(new xt({
shape: x
})), h.__rectSize = x[o];
} else
c.eachChild(function(T) {
T.attr({
invisible: !0,
silent: !0
});
});
var b = this._getPageInfo(t);
return b.pageIndex != null && bt(
f,
{
x: b.contentPosition[0],
y: b.contentPosition[1]
},
d ? t : null
), this._updatePageInfoView(t, b), w;
}, e.prototype._pageGo = function(t, n, a) {
var i = this._getPageInfo(n)[t];
i != null && a.dispatchAction({
type: "legendScroll",
scrollDataIndex: i,
legendId: n.id
});
}, e.prototype._updatePageInfoView = function(t, n) {
var a = this._controllerGroup;
C(["pagePrev", "pageNext"], function(f) {
var h = f + "DataIndex", c = n[h] != null, v = a.childOfName(f);
v && (v.setStyle("fill", c ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), v.cursor = c ? "pointer" : "default");
});
var i = a.childOfName("pageText"), o = t.get("pageFormatter"), s = n.pageIndex, l = s != null ? s + 1 : 0, u = n.pageCount;
i && o && i.setStyle("text", W(o) ? o.replace("{current}", l == null ? "" : l + "").replace("{total}", u == null ? "" : u + "") : o({
current: l,
total: u
}));
}, e.prototype._getPageInfo = function(t) {
var n = t.get("scrollDataIndex", !0), a = this.getContentGroup(), i = this._containerGroup.__rectSize, o = t.getOrient().index, s = bp[o], l = Tp[o], u = this._findTargetItemIndex(n), f = a.children(), h = f[u], c = f.length, v = c ? 1 : 0, p = {
contentPosition: [a.x, a.y],
pageCount: v,
pageIndex: v - 1,
pagePrevDataIndex: null,
pageNextDataIndex: null
};
if (!h)
return p;
var d = S(h);
p.contentPosition[o] = -d.s;
for (var g = u + 1, y = d, m = d, _ = null; g <= c; ++g)
_ = S(f[g]), (!_ && m.e > y.s + i || _ && !w(_, y.s)) && (m.i > y.i ? y = m : y = _, y && (p.pageNextDataIndex == null && (p.pageNextDataIndex = y.i), ++p.pageCount)), m = _;
for (var g = u - 1, y = d, m = d, _ = null; g >= -1; --g)
_ = S(f[g]), (!_ || !w(m, _.s)) && y.i < m.i && (m = y, p.pagePrevDataIndex == null && (p.pagePrevDataIndex = y.i), ++p.pageCount, ++p.pageIndex), y = _;
return p;
function S(x) {
if (x) {
var b = x.getBoundingRect(), T = b[l] + x[l];
return {
s: T,
e: T + b[s],
i: x.__legendDataIndex
};
}
}
function w(x, b) {
return x.e >= b && x.s <= b + i;
}
}, e.prototype._findTargetItemIndex = function(t) {
if (!this._showController)
return 0;
var n, a = this.getContentGroup(), i;
return a.eachChild(function(o, s) {
var l = o.__legendDataIndex;
i == null && l != null && (i = s), l === t && (n = s);
}), n != null ? n : i;
}, e.type = "legend.scroll", e;
}(zI);
const X9 = Z9;
function q9(r) {
r.registerAction("legendScroll", "legendscroll", function(e, t) {
var n = e.scrollDataIndex;
n != null && t.eachComponent({
mainType: "legend",
subType: "scroll",
query: e
}, function(a) {
a.setScrollDataIndex(n);
});
});
}
function K9(r) {
pt(GI), r.registerComponentModel(Y9), r.registerComponentView(X9), q9(r);
}
function j9(r) {
pt(GI), pt(K9);
}
var J9 = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "dataZoom.inside", e.defaultOption = va(wl.defaultOption, {
disabled: !1,
zoomLock: !1,
zoomOnMouseWheel: !0,
moveOnMouseMove: !0,
moveOnMouseWheel: !1,
preventDefaultMouseMove: !0
}), e;
}(wl);
const Q9 = J9;
var Lm = Tt();
function tZ(r, e, t) {
Lm(r).coordSysRecordMap.each(function(n) {
var a = n.dataZoomInfoMap.get(e.uid);
a && (a.getRange = t);
});
}
function eZ(r, e) {
for (var t = Lm(r).coordSysRecordMap, n = t.keys(), a = 0; a < n.length; a++) {
var i = n[a], o = t.get(i), s = o.dataZoomInfoMap;
if (s) {
var l = e.uid, u = s.get(l);
u && (s.removeKey(l), s.keys().length || FI(t, o));
}
}
}
function FI(r, e) {
if (e) {
r.removeKey(e.model.uid);
var t = e.controller;
t && t.dispose();
}
}
function rZ(r, e) {
var t = {
model: e,
containsPoint: it(aZ, e),
dispatchAction: it(nZ, r),
dataZoomInfoMap: null,
controller: null
}, n = t.controller = new Wl(r.getZr());
return C(["pan", "zoom", "scrollMove"], function(a) {
n.on(a, function(i) {
var o = [];
t.dataZoomInfoMap.each(function(s) {
if (!!i.isAvailableBehavior(s.model.option)) {
var l = (s.getRange || {})[a], u = l && l(s.dzReferCoordSysInfo, t.model.mainType, t.controller, i);
!s.model.get("disabled", !0) && u && o.push({
dataZoomId: s.model.id,
start: u[0],
end: u[1]
});
}
}), o.length && t.dispatchAction(o);
});
}), t;
}
function nZ(r, e) {
r.isDisposed() || r.dispatchAction({
type: "dataZoom",
animation: {
easing: "cubicOut",
duration: 100
},
batch: e
});
}
function aZ(r, e, t, n) {
return r.coordinateSystem.containPoint([t, n]);
}
function iZ(r) {
var e, t = "type_", n = {
type_true: 2,
type_move: 1,
type_false: 0,
type_undefined: -1
}, a = !0;
return r.each(function(i) {
var o = i.model, s = o.get("disabled", !0) ? !1 : o.get("zoomLock", !0) ? "move" : !0;
n[t + s] > n[t + e] && (e = s), a = a && o.get("preventDefaultMouseMove", !0);
}), {
controlType: e,
opt: {
zoomOnMouseWheel: !0,
moveOnMouseMove: !0,
moveOnMouseWheel: !0,
preventDefaultMouseMove: !!a
}
};
}
function oZ(r) {
r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER, function(e, t) {
var n = Lm(t), a = n.coordSysRecordMap || (n.coordSysRecordMap = K());
a.each(function(i) {
i.dataZoomInfoMap = null;
}), e.eachComponent({
mainType: "dataZoom",
subType: "inside"
}, function(i) {
var o = wI(i);
C(o.infoList, function(s) {
var l = s.model.uid, u = a.get(l) || a.set(l, rZ(t, s.model)), f = u.dataZoomInfoMap || (u.dataZoomInfoMap = K());
f.set(i.uid, {
dzReferCoordSysInfo: s,
model: i,
getRange: null
});
});
}), a.each(function(i) {
var o = i.controller, s, l = i.dataZoomInfoMap;
if (l) {
var u = l.keys()[0];
u != null && (s = l.get(u));
}
if (!s) {
FI(a, i);
return;
}
var f = iZ(l);
o.enable(f.controlType, f.opt), o.setPointerChecker(i.containsPoint), Uo(i, "dispatchAction", s.model.get("throttle", !0), "fixRate");
});
});
}
var sZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "dataZoom.inside", t;
}
return e.prototype.render = function(t, n, a) {
if (r.prototype.render.apply(this, arguments), t.noTarget()) {
this._clear();
return;
}
this.range = t.getPercentRange(), tZ(a, t, {
pan: Y(Cp.pan, this),
zoom: Y(Cp.zoom, this),
scrollMove: Y(Cp.scrollMove, this)
});
}, e.prototype.dispose = function() {
this._clear(), r.prototype.dispose.apply(this, arguments);
}, e.prototype._clear = function() {
eZ(this.api, this.dataZoomModel), this.range = null;
}, e.type = "dataZoom.inside", e;
}(Sm), Cp = {
zoom: function(r, e, t, n) {
var a = this.range, i = a.slice(), o = r.axisModels[0];
if (!!o) {
var s = Dp[e](null, [n.originX, n.originY], o, t, r), l = (s.signal > 0 ? s.pixelStart + s.pixelLength - s.pixel : s.pixel - s.pixelStart) / s.pixelLength * (i[1] - i[0]) + i[0], u = Math.max(1 / n.scale, 0);
i[0] = (i[0] - l) * u + l, i[1] = (i[1] - l) * u + l;
var f = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();
if (Mi(0, i, [0, 100], 0, f.minSpan, f.maxSpan), this.range = i, a[0] !== i[0] || a[1] !== i[1])
return i;
}
},
pan: hb(function(r, e, t, n, a, i) {
var o = Dp[n]([i.oldX, i.oldY], [i.newX, i.newY], e, a, t);
return o.signal * (r[1] - r[0]) * o.pixel / o.pixelLength;
}),
scrollMove: hb(function(r, e, t, n, a, i) {
var o = Dp[n]([0, 0], [i.scrollDelta, i.scrollDelta], e, a, t);
return o.signal * (r[1] - r[0]) * i.scrollDelta;
})
};
function hb(r) {
return function(e, t, n, a) {
var i = this.range, o = i.slice(), s = e.axisModels[0];
if (!!s) {
var l = r(o, s, e, t, n, a);
if (Mi(l, o, [0, 100], "all"), this.range = o, i[0] !== o[0] || i[1] !== o[1])
return o;
}
};
}
var Dp = {
grid: function(r, e, t, n, a) {
var i = t.axis, o = {}, s = a.model.coordinateSystem.getRect();
return r = r || [0, 0], i.dim === "x" ? (o.pixel = e[0] - r[0], o.pixelLength = s.width, o.pixelStart = s.x, o.signal = i.inverse ? 1 : -1) : (o.pixel = e[1] - r[1], o.pixelLength = s.height, o.pixelStart = s.y, o.signal = i.inverse ? -1 : 1), o;
},
polar: function(r, e, t, n, a) {
var i = t.axis, o = {}, s = a.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), u = s.getAngleAxis().getExtent();
return r = r ? s.pointToCoord(r) : [0, 0], e = s.pointToCoord(e), t.mainType === "radiusAxis" ? (o.pixel = e[0] - r[0], o.pixelLength = l[1] - l[0], o.pixelStart = l[0], o.signal = i.inverse ? 1 : -1) : (o.pixel = e[1] - r[1], o.pixelLength = u[1] - u[0], o.pixelStart = u[0], o.signal = i.inverse ? -1 : 1), o;
},
singleAxis: function(r, e, t, n, a) {
var i = t.axis, o = a.model.coordinateSystem.getRect(), s = {};
return r = r || [0, 0], i.orient === "horizontal" ? (s.pixel = e[0] - r[0], s.pixelLength = o.width, s.pixelStart = o.x, s.signal = i.inverse ? 1 : -1) : (s.pixel = e[1] - r[1], s.pixelLength = o.height, s.pixelStart = o.y, s.signal = i.inverse ? -1 : 1), s;
}
};
const lZ = sZ;
function HI(r) {
xm(r), r.registerComponentModel(Q9), r.registerComponentView(lZ), oZ(r);
}
var uZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.type = "dataZoom.slider", e.layoutMode = "box", e.defaultOption = va(wl.defaultOption, {
show: !0,
right: "ph",
top: "ph",
width: "ph",
height: "ph",
left: null,
bottom: null,
borderColor: "#d2dbee",
borderRadius: 3,
backgroundColor: "rgba(47,69,84,0)",
dataBackground: {
lineStyle: {
color: "#d2dbee",
width: 0.5
},
areaStyle: {
color: "#d2dbee",
opacity: 0.2
}
},
selectedDataBackground: {
lineStyle: {
color: "#8fb0f7",
width: 0.5
},
areaStyle: {
color: "#8fb0f7",
opacity: 0.2
}
},
fillerColor: "rgba(135,175,274,0.2)",
handleIcon: "path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",
handleSize: "100%",
handleStyle: {
color: "#fff",
borderColor: "#ACB8D1"
},
moveHandleSize: 7,
moveHandleIcon: "path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",
moveHandleStyle: {
color: "#D2DBEE",
opacity: 0.7
},
showDetail: !0,
showDataShadow: "auto",
realtime: !0,
zoomLock: !1,
textStyle: {
color: "#6E7079"
},
brushSelect: !0,
brushStyle: {
color: "rgba(135,175,274,0.15)"
},
emphasis: {
handleStyle: {
borderColor: "#8FB0F7"
},
moveHandleStyle: {
color: "#8FB0F7"
}
}
}), e;
}(wl);
const fZ = uZ;
var bs = xt, cb = 7, hZ = 1, Ap = 30, cZ = 7, Ts = "horizontal", vb = "vertical", vZ = 5, pZ = ["line", "bar", "candlestick", "scatter"], dZ = {
easing: "cubicOut",
duration: 100,
delay: 0
}, gZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._displayables = {}, t;
}
return e.prototype.init = function(t, n) {
this.api = n, this._onBrush = Y(this._onBrush, this), this._onBrushEnd = Y(this._onBrushEnd, this);
}, e.prototype.render = function(t, n, a, i) {
if (r.prototype.render.apply(this, arguments), Uo(this, "_dispatchZoomAction", t.get("throttle"), "fixRate"), this._orient = t.getOrient(), t.get("show") === !1) {
this.group.removeAll();
return;
}
if (t.noTarget()) {
this._clear(), this.group.removeAll();
return;
}
(!i || i.type !== "dataZoom" || i.from !== this.uid) && this._buildView(), this._updateView();
}, e.prototype.dispose = function() {
this._clear(), r.prototype.dispose.apply(this, arguments);
}, e.prototype._clear = function() {
fl(this, "_dispatchZoomAction");
var t = this.api.getZr();
t.off("mousemove", this._onBrush), t.off("mouseup", this._onBrushEnd);
}, e.prototype._buildView = function() {
var t = this.group;
t.removeAll(), this._brushing = !1, this._displayables.brushRect = null, this._resetLocation(), this._resetInterval();
var n = this._displayables.sliderGroup = new nt();
this._renderBackground(), this._renderHandle(), this._renderDataShadow(), t.add(n), this._positionGroup();
}, e.prototype._resetLocation = function() {
var t = this.dataZoomModel, n = this.api, a = t.get("brushSelect"), i = a ? cZ : 0, o = this._findCoordRect(), s = {
width: n.getWidth(),
height: n.getHeight()
}, l = this._orient === Ts ? {
right: s.width - o.x - o.width,
top: s.height - Ap - cb - i,
width: o.width,
height: Ap
} : {
right: cb,
top: o.y,
width: Ap,
height: o.height
}, u = Go(t.option);
C(["right", "top", "width", "height"], function(h) {
u[h] === "ph" && (u[h] = l[h]);
});
var f = ee(u, s);
this._location = {
x: f.x,
y: f.y
}, this._size = [f.width, f.height], this._orient === vb && this._size.reverse();
}, e.prototype._positionGroup = function() {
var t = this.group, n = this._location, a = this._orient, i = this.dataZoomModel.getFirstTargetAxisModel(), o = i && i.get("inverse"), s = this._displayables.sliderGroup, l = (this._dataShadowInfo || {}).otherAxisInverse;
s.attr(a === Ts && !o ? {
scaleY: l ? 1 : -1,
scaleX: 1
} : a === Ts && o ? {
scaleY: l ? 1 : -1,
scaleX: -1
} : a === vb && !o ? {
scaleY: l ? -1 : 1,
scaleX: 1,
rotation: Math.PI / 2
} : {
scaleY: l ? -1 : 1,
scaleX: -1,
rotation: Math.PI / 2
});
var u = t.getBoundingRect([s]);
t.x = n.x - u.x, t.y = n.y - u.y, t.markRedraw();
}, e.prototype._getViewExtent = function() {
return [0, this._size[0]];
}, e.prototype._renderBackground = function() {
var t = this.dataZoomModel, n = this._size, a = this._displayables.sliderGroup, i = t.get("brushSelect");
a.add(new bs({
silent: !0,
shape: {
x: 0,
y: 0,
width: n[0],
height: n[1]
},
style: {
fill: t.get("backgroundColor")
},
z2: -40
}));
var o = new bs({
shape: {
x: 0,
y: 0,
width: n[0],
height: n[1]
},
style: {
fill: "transparent"
},
z2: 0,
onclick: Y(this._onClickPanel, this)
}), s = this.api.getZr();
i ? (o.on("mousedown", this._onBrushStart, this), o.cursor = "crosshair", s.on("mousemove", this._onBrush), s.on("mouseup", this._onBrushEnd)) : (s.off("mousemove", this._onBrush), s.off("mouseup", this._onBrushEnd)), a.add(o);
}, e.prototype._renderDataShadow = function() {
var t = this._dataShadowInfo = this._prepareDataShadowInfo();
if (this._displayables.dataShadowSegs = [], !t)
return;
var n = this._size, a = this._shadowSize || [], i = t.series, o = i.getRawData(), s = i.getShadowDim ? i.getShadowDim() : t.otherDim;
if (s == null)
return;
var l = this._shadowPolygonPts, u = this._shadowPolylinePts;
if (o !== this._shadowData || s !== this._shadowDim || n[0] !== a[0] || n[1] !== a[1]) {
var f = o.getDataExtent(s), h = (f[1] - f[0]) * 0.3;
f = [f[0] - h, f[1] + h];
var c = [0, n[1]], v = [0, n[0]], p = [[n[0], 0], [0, 0]], d = [], g = v[1] / (o.count() - 1), y = 0, m = Math.round(o.count() / n[0]), _;
o.each([s], function(T, D) {
if (m > 0 && D % m) {
y += g;
return;
}
var A = T == null || isNaN(T) || T === "", M = A ? 0 : It(T, f, c, !0);
A && !_ && D ? (p.push([p[p.length - 1][0], 0]), d.push([d[d.length - 1][0], 0])) : !A && _ && (p.push([y, 0]), d.push([y, 0])), p.push([y, M]), d.push([y, M]), y += g, _ = A;
}), l = this._shadowPolygonPts = p, u = this._shadowPolylinePts = d;
}
this._shadowData = o, this._shadowDim = s, this._shadowSize = [n[0], n[1]];
var S = this.dataZoomModel;
function w(T) {
var D = S.getModel(T ? "selectedDataBackground" : "dataBackground"), A = new nt(), M = new Be({
shape: {
points: l
},
segmentIgnoreThreshold: 1,
style: D.getModel("areaStyle").getAreaStyle(),
silent: !0,
z2: -20
}), L = new ze({
shape: {
points: u
},
segmentIgnoreThreshold: 1,
style: D.getModel("lineStyle").getLineStyle(),
silent: !0,
z2: -19
});
return A.add(M), A.add(L), A;
}
for (var x = 0; x < 3; x++) {
var b = w(x === 1);
this._displayables.sliderGroup.add(b), this._displayables.dataShadowSegs.push(b);
}
}, e.prototype._prepareDataShadowInfo = function() {
var t = this.dataZoomModel, n = t.get("showDataShadow");
if (n !== !1) {
var a, i = this.ecModel;
return t.eachTargetAxis(function(o, s) {
var l = t.getAxisProxy(o, s).getTargetSeriesModels();
C(l, function(u) {
if (!a && !(n !== !0 && ct(pZ, u.get("type")) < 0)) {
var f = i.getComponent(Jn(o), s).axis, h = yZ(o), c, v = u.coordinateSystem;
h != null && v.getOtherAxis && (c = v.getOtherAxis(f).inverse), h = u.getData().mapDimension(h), a = {
thisAxis: f,
series: u,
thisDim: o,
otherDim: h,
otherAxisInverse: c
};
}
}, this);
}, this), a;
}
}, e.prototype._renderHandle = function() {
var t = this.group, n = this._displayables, a = n.handles = [null, null], i = n.handleLabels = [null, null], o = this._displayables.sliderGroup, s = this._size, l = this.dataZoomModel, u = this.api, f = l.get("borderRadius") || 0, h = l.get("brushSelect"), c = n.filler = new bs({
silent: h,
style: {
fill: l.get("fillerColor")
},
textConfig: {
position: "inside"
}
});
o.add(c), o.add(new bs({
silent: !0,
subPixelOptimize: !0,
shape: {
x: 0,
y: 0,
width: s[0],
height: s[1],
r: f
},
style: {
stroke: l.get("dataBackgroundColor") || l.get("borderColor"),
lineWidth: hZ,
fill: "rgba(0,0,0,0)"
}
})), C([0, 1], function(_) {
var S = l.get("handleIcon");
!zf[S] && S.indexOf("path://") < 0 && S.indexOf("image://") < 0 && (S = "path://" + S, process.env.NODE_ENV !== "production" && Mr("handleIcon now needs 'path://' prefix when using a path string"));
var w = Jt(S, -1, 0, 2, 2, null, !0);
w.attr({
cursor: pb(this._orient),
draggable: !0,
drift: Y(this._onDragMove, this, _),
ondragend: Y(this._onDragEnd, this),
onmouseover: Y(this._showDataInfo, this, !0),
onmouseout: Y(this._showDataInfo, this, !1),
z2: 5
});
var x = w.getBoundingRect(), b = l.get("handleSize");
this._handleHeight = H(b, this._size[1]), this._handleWidth = x.width / x.height * this._handleHeight, w.setStyle(l.getModel("handleStyle").getItemStyle()), w.style.strokeNoScale = !0, w.rectHover = !0, w.ensureState("emphasis").style = l.getModel(["emphasis", "handleStyle"]).getItemStyle(), si(w);
var T = l.get("handleColor");
T != null && (w.style.fill = T), o.add(a[_] = w);
var D = l.getModel("textStyle");
t.add(i[_] = new Ct({
silent: !0,
invisible: !0,
style: zt(D, {
x: 0,
y: 0,
text: "",
verticalAlign: "middle",
align: "center",
fill: D.getTextColor(),
font: D.getFont()
}),
z2: 10
}));
}, this);
var v = c;
if (h) {
var p = H(l.get("moveHandleSize"), s[1]), d = n.moveHandle = new xt({
style: l.getModel("moveHandleStyle").getItemStyle(),
silent: !0,
shape: {
r: [0, 0, 2, 2],
y: s[1] - 0.5,
height: p
}
}), g = p * 0.8, y = n.moveHandleIcon = Jt(l.get("moveHandleIcon"), -g / 2, -g / 2, g, g, "#fff", !0);
y.silent = !0, y.y = s[1] + p / 2 - 0.5, d.ensureState("emphasis").style = l.getModel(["emphasis", "moveHandleStyle"]).getItemStyle();
var m = Math.min(s[1] / 2, Math.max(p, 10));
v = n.moveZone = new xt({
invisible: !0,
shape: {
y: s[1] - m,
height: p + m
}
}), v.on("mouseover", function() {
u.enterEmphasis(d);
}).on("mouseout", function() {
u.leaveEmphasis(d);
}), o.add(d), o.add(y), o.add(v);
}
v.attr({
draggable: !0,
cursor: pb(this._orient),
drift: Y(this._onDragMove, this, "all"),
ondragstart: Y(this._showDataInfo, this, !0),
ondragend: Y(this._onDragEnd, this),
onmouseover: Y(this._showDataInfo, this, !0),
onmouseout: Y(this._showDataInfo, this, !1)
});
}, e.prototype._resetInterval = function() {
var t = this._range = this.dataZoomModel.getPercentRange(), n = this._getViewExtent();
this._handleEnds = [It(t[0], [0, 100], n, !0), It(t[1], [0, 100], n, !0)];
}, e.prototype._updateInterval = function(t, n) {
var a = this.dataZoomModel, i = this._handleEnds, o = this._getViewExtent(), s = a.findRepresentativeAxisProxy().getMinMaxSpan(), l = [0, 100];
Mi(n, i, o, a.get("zoomLock") ? "all" : t, s.minSpan != null ? It(s.minSpan, l, o, !0) : null, s.maxSpan != null ? It(s.maxSpan, l, o, !0) : null);
var u = this._range, f = this._range = lr([It(i[0], o, l, !0), It(i[1], o, l, !0)]);
return !u || u[0] !== f[0] || u[1] !== f[1];
}, e.prototype._updateView = function(t) {
var n = this._displayables, a = this._handleEnds, i = lr(a.slice()), o = this._size;
C([0, 1], function(v) {
var p = n.handles[v], d = this._handleHeight;
p.attr({
scaleX: d / 2,
scaleY: d / 2,
x: a[v] + (v ? -1 : 1),
y: o[1] / 2 - d / 2
});
}, this), n.filler.setShape({
x: i[0],
y: 0,
width: i[1] - i[0],
height: o[1]
});
var s = {
x: i[0],
width: i[1] - i[0]
};
n.moveHandle && (n.moveHandle.setShape(s), n.moveZone.setShape(s), n.moveZone.getBoundingRect(), n.moveHandleIcon && n.moveHandleIcon.attr("x", s.x + s.width / 2));
for (var l = n.dataShadowSegs, u = [0, i[0], i[1], o[0]], f = 0; f < l.length; f++) {
var h = l[f], c = h.getClipPath();
c || (c = new xt(), h.setClipPath(c)), c.setShape({
x: u[f],
y: 0,
width: u[f + 1] - u[f],
height: o[1]
});
}
this._updateDataInfo(t);
}, e.prototype._updateDataInfo = function(t) {
var n = this.dataZoomModel, a = this._displayables, i = a.handleLabels, o = this._orient, s = ["", ""];
if (n.get("showDetail")) {
var l = n.findRepresentativeAxisProxy();
if (l) {
var u = l.getAxisModel().axis, f = this._range, h = t ? l.calculateDataWindow({
start: f[0],
end: f[1]
}).valueWindow : l.getDataValueWindow();
s = [this._formatLabel(h[0], u), this._formatLabel(h[1], u)];
}
}
var c = lr(this._handleEnds.slice());
v.call(this, 0), v.call(this, 1);
function v(p) {
var d = li(a.handles[p].parent, this.group), g = Oh(p === 0 ? "right" : "left", d), y = this._handleWidth / 2 + vZ, m = Dr([c[p] + (p === 0 ? -y : y), this._size[1] / 2], d);
i[p].setStyle({
x: m[0],
y: m[1],
verticalAlign: o === Ts ? "middle" : g,
align: o === Ts ? g : "center",
text: s[p]
});
}
}, e.prototype._formatLabel = function(t, n) {
var a = this.dataZoomModel, i = a.get("labelFormatter"), o = a.get("labelPrecision");
(o == null || o === "auto") && (o = n.getPixelPrecision());
var s = t == null || isNaN(t) ? "" : n.type === "category" || n.type === "time" ? n.scale.getLabel({
value: Math.round(t)
}) : t.toFixed(Math.min(o, 20));
return q(i) ? i(t, s) : W(i) ? i.replace("{value}", s) : s;
}, e.prototype._showDataInfo = function(t) {
t = this._dragging || t;
var n = this._displayables, a = n.handleLabels;
a[0].attr("invisible", !t), a[1].attr("invisible", !t), n.moveHandle && this.api[t ? "enterEmphasis" : "leaveEmphasis"](n.moveHandle, 1);
}, e.prototype._onDragMove = function(t, n, a, i) {
this._dragging = !0, mn(i.event);
var o = this._displayables.sliderGroup.getLocalTransform(), s = Dr([n, a], o, !0), l = this._updateInterval(t, s[0]), u = this.dataZoomModel.get("realtime");
this._updateView(!u), l && u && this._dispatchZoomAction(!0);
}, e.prototype._onDragEnd = function() {
this._dragging = !1, this._showDataInfo(!1);
var t = this.dataZoomModel.get("realtime");
!t && this._dispatchZoomAction(!1);
}, e.prototype._onClickPanel = function(t) {
var n = this._size, a = this._displayables.sliderGroup.transformCoordToLocal(t.offsetX, t.offsetY);
if (!(a[0] < 0 || a[0] > n[0] || a[1] < 0 || a[1] > n[1])) {
var i = this._handleEnds, o = (i[0] + i[1]) / 2, s = this._updateInterval("all", a[0] - o);
this._updateView(), s && this._dispatchZoomAction(!1);
}
}, e.prototype._onBrushStart = function(t) {
var n = t.offsetX, a = t.offsetY;
this._brushStart = new st(n, a), this._brushing = !0, this._brushStartTime = +new Date();
}, e.prototype._onBrushEnd = function(t) {
if (!!this._brushing) {
var n = this._displayables.brushRect;
if (this._brushing = !1, !!n) {
n.attr("ignore", !0);
var a = n.shape, i = +new Date();
if (!(i - this._brushStartTime < 200 && Math.abs(a.width) < 5)) {
var o = this._getViewExtent(), s = [0, 100];
this._range = lr([It(a.x, o, s, !0), It(a.x + a.width, o, s, !0)]), this._handleEnds = [a.x, a.x + a.width], this._updateView(), this._dispatchZoomAction(!1);
}
}
}
}, e.prototype._onBrush = function(t) {
this._brushing && (mn(t.event), this._updateBrushRect(t.offsetX, t.offsetY));
}, e.prototype._updateBrushRect = function(t, n) {
var a = this._displayables, i = this.dataZoomModel, o = a.brushRect;
o || (o = a.brushRect = new bs({
silent: !0,
style: i.getModel("brushStyle").getItemStyle()
}), a.sliderGroup.add(o)), o.attr("ignore", !1);
var s = this._brushStart, l = this._displayables.sliderGroup, u = l.transformCoordToLocal(t, n), f = l.transformCoordToLocal(s.x, s.y), h = this._size;
u[0] = Math.max(Math.min(h[0], u[0]), 0), o.setShape({
x: f[0],
y: 0,
width: u[0] - f[0],
height: h[1]
});
}, e.prototype._dispatchZoomAction = function(t) {
var n = this._range;
this.api.dispatchAction({
type: "dataZoom",
from: this.uid,
dataZoomId: this.dataZoomModel.id,
animation: t ? dZ : null,
start: n[0],
end: n[1]
});
}, e.prototype._findCoordRect = function() {
var t, n = wI(this.dataZoomModel).infoList;
if (!t && n.length) {
var a = n[0].model.coordinateSystem;
t = a.getRect && a.getRect();
}
if (!t) {
var i = this.api.getWidth(), o = this.api.getHeight();
t = {
x: i * 0.2,
y: o * 0.2,
width: i * 0.6,
height: o * 0.6
};
}
return t;
}, e.type = "dataZoom.slider", e;
}(Sm);
function yZ(r) {
var e = {
x: "y",
y: "x",
radius: "angle",
angle: "radius"
};
return e[r];
}
function pb(r) {
return r === "vertical" ? "ns-resize" : "ew-resize";
}
const mZ = gZ;
function $I(r) {
r.registerComponentModel(fZ), r.registerComponentView(mZ), xm(r);
}
function _Z(r) {
pt(HI), pt($I);
}
var SZ = {
get: function(r, e, t) {
var n = tt((xZ[r] || {})[e]);
return t && z(n) ? n[n.length - 1] : n;
}
}, xZ = {
color: {
active: ["#006edd", "#e0ffff"],
inactive: ["rgba(0,0,0,0)"]
},
colorHue: {
active: [0, 360],
inactive: [0, 0]
},
colorSaturation: {
active: [0.3, 1],
inactive: [0, 0]
},
colorLightness: {
active: [0.9, 0.5],
inactive: [0, 0]
},
colorAlpha: {
active: [0.3, 1],
inactive: [0, 0]
},
opacity: {
active: [0.3, 1],
inactive: [0, 0]
},
symbol: {
active: ["circle", "roundRect", "diamond"],
inactive: ["none"]
},
symbolSize: {
active: [10, 50],
inactive: [0, 0]
}
};
const WI = SZ;
var db = fe.mapVisual, wZ = fe.eachVisual, bZ = z, gb = C, TZ = lr, CZ = It, DZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.stateList = ["inRange", "outOfRange"], t.replacableOptionKeys = ["inRange", "outOfRange", "target", "controller", "color"], t.layoutMode = {
type: "box",
ignoreSize: !0
}, t.dataBound = [-1 / 0, 1 / 0], t.targetVisuals = {}, t.controllerVisuals = {}, t;
}
return e.prototype.init = function(t, n, a) {
this.mergeDefaultAndTheme(t, a);
}, e.prototype.optionUpdated = function(t, n) {
var a = this.option;
!n && PI(a, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption();
}, e.prototype.resetVisual = function(t) {
var n = this.stateList;
t = Y(t, this), this.controllerVisuals = gg(this.option.controller, n, t), this.targetVisuals = gg(this.option.target, n, t);
}, e.prototype.getItemSymbol = function() {
return null;
}, e.prototype.getTargetSeriesIndices = function() {
var t = this.option.seriesIndex, n = [];
return t == null || t === "all" ? this.ecModel.eachSeries(function(a, i) {
n.push(i);
}) : n = Pt(t), n;
}, e.prototype.eachTargetSeries = function(t, n) {
C(this.getTargetSeriesIndices(), function(a) {
var i = this.ecModel.getSeriesByIndex(a);
i && t.call(n, i);
}, this);
}, e.prototype.isTargetSeries = function(t) {
var n = !1;
return this.eachTargetSeries(function(a) {
a === t && (n = !0);
}), n;
}, e.prototype.formatValueText = function(t, n, a) {
var i = this.option, o = i.precision, s = this.dataBound, l = i.formatter, u;
a = a || ["<", ">"], z(t) && (t = t.slice(), u = !0);
var f = n ? t : u ? [h(t[0]), h(t[1])] : h(t);
if (W(l))
return l.replace("{value}", u ? f[0] : f).replace("{value2}", u ? f[1] : f);
if (q(l))
return u ? l(t[0], t[1]) : l(t);
if (u)
return t[0] === s[0] ? a[0] + " " + f[1] : t[1] === s[1] ? a[1] + " " + f[0] : f[0] + " - " + f[1];
return f;
function h(c) {
return c === s[0] ? "min" : c === s[1] ? "max" : (+c).toFixed(Math.min(o, 20));
}
}, e.prototype.resetExtent = function() {
var t = this.option, n = TZ([t.min, t.max]);
this._dataExtent = n;
}, e.prototype.getDataDimensionIndex = function(t) {
var n = this.option.dimension;
if (n != null)
return t.getDimensionIndex(n);
for (var a = t.dimensions, i = a.length - 1; i >= 0; i--) {
var o = a[i], s = t.getDimensionInfo(o);
if (!s.isCalculationCoord)
return s.storeDimIndex;
}
}, e.prototype.getExtent = function() {
return this._dataExtent.slice();
}, e.prototype.completeVisualOption = function() {
var t = this.ecModel, n = this.option, a = {
inRange: n.inRange,
outOfRange: n.outOfRange
}, i = n.target || (n.target = {}), o = n.controller || (n.controller = {});
lt(i, a), lt(o, a);
var s = this.isCategory();
l.call(this, i), l.call(this, o), u.call(this, i, "inRange", "outOfRange"), f.call(this, o);
function l(h) {
bZ(n.color) && !h.inRange && (h.inRange = {
color: n.color.slice().reverse()
}), h.inRange = h.inRange || {
color: t.get("gradientColor")
};
}
function u(h, c, v) {
var p = h[c], d = h[v];
p && !d && (d = h[v] = {}, gb(p, function(g, y) {
if (!!fe.isValidType(y)) {
var m = WI.get(y, "inactive", s);
m != null && (d[y] = m, y === "color" && !d.hasOwnProperty("opacity") && !d.hasOwnProperty("colorAlpha") && (d.opacity = [0, 0]));
}
}));
}
function f(h) {
var c = (h.inRange || {}).symbol || (h.outOfRange || {}).symbol, v = (h.inRange || {}).symbolSize || (h.outOfRange || {}).symbolSize, p = this.get("inactiveColor"), d = this.getItemSymbol(), g = d || "roundRect";
gb(this.stateList, function(y) {
var m = this.itemSize, _ = h[y];
_ || (_ = h[y] = {
color: s ? p : [p]
}), _.symbol == null && (_.symbol = c && tt(c) || (s ? g : [g])), _.symbolSize == null && (_.symbolSize = v && tt(v) || (s ? m[0] : [m[0], m[0]])), _.symbol = db(_.symbol, function(x) {
return x === "none" ? g : x;
});
var S = _.symbolSize;
if (S != null) {
var w = -1 / 0;
wZ(S, function(x) {
x > w && (w = x);
}), _.symbolSize = db(S, function(x) {
return CZ(x, [0, w], [0, m[0]], !0);
});
}
}, this);
}
}, e.prototype.resetItemSize = function() {
this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))];
}, e.prototype.isCategory = function() {
return !!this.option.categories;
}, e.prototype.setSelected = function(t) {
}, e.prototype.getSelected = function() {
return null;
}, e.prototype.getValueState = function(t) {
return null;
}, e.prototype.getVisualMeta = function(t) {
return null;
}, e.type = "visualMap", e.dependencies = ["series"], e.defaultOption = {
show: !0,
z: 4,
seriesIndex: "all",
min: 0,
max: 200,
left: 0,
right: null,
top: null,
bottom: 0,
itemWidth: null,
itemHeight: null,
inverse: !1,
orient: "vertical",
backgroundColor: "rgba(0,0,0,0)",
borderColor: "#ccc",
contentColor: "#5793f3",
inactiveColor: "#aaa",
borderWidth: 0,
padding: 5,
textGap: 10,
precision: 0,
textStyle: {
color: "#333"
}
}, e;
}(_t);
const vh = DZ;
var yb = [20, 140], AZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.optionUpdated = function(t, n) {
r.prototype.optionUpdated.apply(this, arguments), this.resetExtent(), this.resetVisual(function(a) {
a.mappingMethod = "linear", a.dataExtent = this.getExtent();
}), this._resetRange();
}, e.prototype.resetItemSize = function() {
r.prototype.resetItemSize.apply(this, arguments);
var t = this.itemSize;
(t[0] == null || isNaN(t[0])) && (t[0] = yb[0]), (t[1] == null || isNaN(t[1])) && (t[1] = yb[1]);
}, e.prototype._resetRange = function() {
var t = this.getExtent(), n = this.option.range;
!n || n.auto ? (t.auto = 1, this.option.range = t) : z(n) && (n[0] > n[1] && n.reverse(), n[0] = Math.max(n[0], t[0]), n[1] = Math.min(n[1], t[1]));
}, e.prototype.completeVisualOption = function() {
r.prototype.completeVisualOption.apply(this, arguments), C(this.stateList, function(t) {
var n = this.option.controller[t].symbolSize;
n && n[0] !== n[1] && (n[0] = n[1] / 3);
}, this);
}, e.prototype.setSelected = function(t) {
this.option.range = t.slice(), this._resetRange();
}, e.prototype.getSelected = function() {
var t = this.getExtent(), n = lr((this.get("range") || []).slice());
return n[0] > t[1] && (n[0] = t[1]), n[1] > t[1] && (n[1] = t[1]), n[0] < t[0] && (n[0] = t[0]), n[1] < t[0] && (n[1] = t[0]), n;
}, e.prototype.getValueState = function(t) {
var n = this.option.range, a = this.getExtent();
return (n[0] <= a[0] || n[0] <= t) && (n[1] >= a[1] || t <= n[1]) ? "inRange" : "outOfRange";
}, e.prototype.findTargetDataIndices = function(t) {
var n = [];
return this.eachTargetSeries(function(a) {
var i = [], o = a.getData();
o.each(this.getDataDimensionIndex(o), function(s, l) {
t[0] <= s && s <= t[1] && i.push(l);
}, this), n.push({
seriesId: a.id,
dataIndex: i
});
}, this), n;
}, e.prototype.getVisualMeta = function(t) {
var n = mb(this, "outOfRange", this.getExtent()), a = mb(this, "inRange", this.option.range.slice()), i = [];
function o(v, p) {
i.push({
value: v,
color: t(v, p)
});
}
for (var s = 0, l = 0, u = a.length, f = n.length; l < f && (!a.length || n[l] <= a[0]); l++)
n[l] < a[s] && o(n[l], "outOfRange");
for (var h = 1; s < u; s++, h = 0)
h && i.length && o(a[s], "outOfRange"), o(a[s], "inRange");
for (var h = 1; l < f; l++)
(!a.length || a[a.length - 1] < n[l]) && (h && (i.length && o(i[i.length - 1].value, "outOfRange"), h = 0), o(n[l], "outOfRange"));
var c = i.length;
return {
stops: i,
outerColors: [c ? i[0].color : "transparent", c ? i[c - 1].color : "transparent"]
};
}, e.type = "visualMap.continuous", e.defaultOption = va(vh.defaultOption, {
align: "auto",
calculable: !1,
hoverLink: !0,
realtime: !0,
handleIcon: "path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",
handleSize: "120%",
handleStyle: {
borderColor: "#fff",
borderWidth: 1
},
indicatorIcon: "circle",
indicatorSize: "50%",
indicatorStyle: {
borderColor: "#fff",
borderWidth: 2,
shadowBlur: 2,
shadowOffsetX: 1,
shadowOffsetY: 1,
shadowColor: "rgba(0,0,0,0.2)"
}
}), e;
}(vh);
function mb(r, e, t) {
if (t[0] === t[1])
return t.slice();
for (var n = 200, a = (t[1] - t[0]) / n, i = t[0], o = [], s = 0; s <= n && i < t[1]; s++)
o.push(i), i += a;
return o.push(t[1]), o;
}
const MZ = AZ;
var LZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t.autoPositionValues = {
left: 1,
right: 1,
top: 1,
bottom: 1
}, t;
}
return e.prototype.init = function(t, n) {
this.ecModel = t, this.api = n;
}, e.prototype.render = function(t, n, a, i) {
if (this.visualMapModel = t, t.get("show") === !1) {
this.group.removeAll();
return;
}
this.doRender(t, n, a, i);
}, e.prototype.renderBackground = function(t) {
var n = this.visualMapModel, a = zo(n.get("padding") || 0), i = t.getBoundingRect();
t.add(new xt({
z2: -1,
silent: !0,
shape: {
x: i.x - a[3],
y: i.y - a[0],
width: i.width + a[3] + a[1],
height: i.height + a[0] + a[2]
},
style: {
fill: n.get("backgroundColor"),
stroke: n.get("borderColor"),
lineWidth: n.get("borderWidth")
}
}));
}, e.prototype.getControllerVisual = function(t, n, a) {
a = a || {};
var i = a.forceState, o = this.visualMapModel, s = {};
if (n === "color") {
var l = o.get("contentColor");
s.color = l;
}
function u(v) {
return s[v];
}
function f(v, p) {
s[v] = p;
}
var h = o.controllerVisuals[i || o.getValueState(t)], c = fe.prepareVisualTypes(h);
return C(c, function(v) {
var p = h[v];
a.convertOpacityToAlpha && v === "opacity" && (v = "colorAlpha", p = h.__alphaForOpacity), fe.dependsOn(v, n) && p && p.applyVisual(t, u, f);
}), s[n];
}, e.prototype.positionGroup = function(t) {
var n = this.visualMapModel, a = this.api;
$h(t, n.getBoxLayoutParams(), {
width: a.getWidth(),
height: a.getHeight()
});
}, e.prototype.doRender = function(t, n, a, i) {
}, e.type = "visualMap", e;
}(Ht);
const UI = LZ;
var _b = [["left", "right", "width"], ["top", "bottom", "height"]];
function YI(r, e, t) {
var n = r.option, a = n.align;
if (a != null && a !== "auto")
return a;
for (var i = {
width: e.getWidth(),
height: e.getHeight()
}, o = n.orient === "horizontal" ? 1 : 0, s = _b[o], l = [0, null, 10], u = {}, f = 0; f < 3; f++)
u[_b[1 - o][f]] = l[f], u[s[f]] = f === 2 ? t[0] : n[s[f]];
var h = [["x", "width", 3], ["y", "height", 0]][o], c = ee(u, i, n.padding);
return s[(c.margin[h[2]] || 0) + c[h[0]] + c[h[1]] * 0.5 < i[h[1]] * 0.5 ? 0 : 1];
}
function df(r, e) {
return C(r || [], function(t) {
t.dataIndex != null && (t.dataIndexInside = t.dataIndex, t.dataIndex = null), t.highlightKey = "visualMap" + (e ? e.componentIndex : "");
}), r;
}
var Br = It, IZ = C, Sb = Math.min, Mp = Math.max, EZ = 12, PZ = 6, NZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._shapes = {}, t._dataInterval = [], t._handleEnds = [], t._hoverLinkDataIndices = [], t;
}
return e.prototype.doRender = function(t, n, a, i) {
this._api = a, (!i || i.type !== "selectDataRange" || i.from !== this.uid) && this._buildView();
}, e.prototype._buildView = function() {
this.group.removeAll();
var t = this.visualMapModel, n = this.group;
this._orient = t.get("orient"), this._useHandle = t.get("calculable"), this._resetInterval(), this._renderBar(n);
var a = t.get("text");
this._renderEndsText(n, a, 0), this._renderEndsText(n, a, 1), this._updateView(!0), this.renderBackground(n), this._updateView(), this._enableHoverLinkToSeries(), this._enableHoverLinkFromSeries(), this.positionGroup(n);
}, e.prototype._renderEndsText = function(t, n, a) {
if (!!n) {
var i = n[1 - a];
i = i != null ? i + "" : "";
var o = this.visualMapModel, s = o.get("textGap"), l = o.itemSize, u = this._shapes.mainGroup, f = this._applyTransform([l[0] / 2, a === 0 ? -s : l[1] + s], u), h = this._applyTransform(a === 0 ? "bottom" : "top", u), c = this._orient, v = this.visualMapModel.textStyleModel;
this.group.add(new Ct({
style: zt(v, {
x: f[0],
y: f[1],
verticalAlign: c === "horizontal" ? "middle" : h,
align: c === "horizontal" ? h : "center",
text: i
})
}));
}
}, e.prototype._renderBar = function(t) {
var n = this.visualMapModel, a = this._shapes, i = n.itemSize, o = this._orient, s = this._useHandle, l = YI(n, this.api, i), u = a.mainGroup = this._createBarGroup(l), f = new nt();
u.add(f), f.add(a.outOfRange = xb()), f.add(a.inRange = xb(null, s ? bb(this._orient) : null, Y(this._dragHandle, this, "all", !1), Y(this._dragHandle, this, "all", !0))), f.setClipPath(new xt({
shape: {
x: 0,
y: 0,
width: i[0],
height: i[1],
r: 3
}
}));
var h = n.textStyleModel.getTextRect("\u56FD"), c = Mp(h.width, h.height);
s && (a.handleThumbs = [], a.handleLabels = [], a.handleLabelPoints = [], this._createHandle(n, u, 0, i, c, o), this._createHandle(n, u, 1, i, c, o)), this._createIndicator(n, u, i, c, o), t.add(u);
}, e.prototype._createHandle = function(t, n, a, i, o, s) {
var l = Y(this._dragHandle, this, a, !1), u = Y(this._dragHandle, this, a, !0), f = Ar(t.get("handleSize"), i[0]), h = Jt(t.get("handleIcon"), -f / 2, -f / 2, f, f, null, !0), c = bb(this._orient);
h.attr({
cursor: c,
draggable: !0,
drift: l,
ondragend: u,
onmousemove: function(y) {
mn(y.event);
}
}), h.x = i[0] / 2, h.useStyle(t.getModel("handleStyle").getItemStyle()), h.setStyle({
strokeNoScale: !0,
strokeFirst: !0
}), h.style.lineWidth *= 2, h.ensureState("emphasis").style = t.getModel(["emphasis", "handleStyle"]).getItemStyle(), ti(h, !0), n.add(h);
var v = this.visualMapModel.textStyleModel, p = new Ct({
cursor: c,
draggable: !0,
drift: l,
onmousemove: function(y) {
mn(y.event);
},
ondragend: u,
style: zt(v, {
x: 0,
y: 0,
text: ""
})
});
p.ensureState("blur").style = {
opacity: 0.1
}, p.stateTransition = {
duration: 200
}, this.group.add(p);
var d = [f, 0], g = this._shapes;
g.handleThumbs[a] = h, g.handleLabelPoints[a] = d, g.handleLabels[a] = p;
}, e.prototype._createIndicator = function(t, n, a, i, o) {
var s = Ar(t.get("indicatorSize"), a[0]), l = Jt(t.get("indicatorIcon"), -s / 2, -s / 2, s, s, null, !0);
l.attr({
cursor: "move",
invisible: !0,
silent: !0,
x: a[0] / 2
});
var u = t.getModel("indicatorStyle").getItemStyle();
if (l instanceof ve) {
var f = l.style;
l.useStyle(B({
image: f.image,
x: f.x,
y: f.y,
width: f.width,
height: f.height
}, u));
} else
l.useStyle(u);
n.add(l);
var h = this.visualMapModel.textStyleModel, c = new Ct({
silent: !0,
invisible: !0,
style: zt(h, {
x: 0,
y: 0,
text: ""
})
});
this.group.add(c);
var v = [(o === "horizontal" ? i / 2 : PZ) + a[0] / 2, 0], p = this._shapes;
p.indicator = l, p.indicatorLabel = c, p.indicatorLabelPoint = v, this._firstShowIndicator = !0;
}, e.prototype._dragHandle = function(t, n, a, i) {
if (!!this._useHandle) {
if (this._dragging = !n, !n) {
var o = this._applyTransform([a, i], this._shapes.mainGroup, !0);
this._updateInterval(t, o[1]), this._hideIndicator(), this._updateView();
}
n === !this.visualMapModel.get("realtime") && this.api.dispatchAction({
type: "selectDataRange",
from: this.uid,
visualMapId: this.visualMapModel.id,
selected: this._dataInterval.slice()
}), n ? !this._hovering && this._clearHoverLinkToSeries() : wb(this.visualMapModel) && this._doHoverLinkToSeries(this._handleEnds[t], !1);
}
}, e.prototype._resetInterval = function() {
var t = this.visualMapModel, n = this._dataInterval = t.getSelected(), a = t.getExtent(), i = [0, t.itemSize[1]];
this._handleEnds = [Br(n[0], a, i, !0), Br(n[1], a, i, !0)];
}, e.prototype._updateInterval = function(t, n) {
n = n || 0;
var a = this.visualMapModel, i = this._handleEnds, o = [0, a.itemSize[1]];
Mi(
n,
i,
o,
t,
0
);
var s = a.getExtent();
this._dataInterval = [Br(i[0], o, s, !0), Br(i[1], o, s, !0)];
}, e.prototype._updateView = function(t) {
var n = this.visualMapModel, a = n.getExtent(), i = this._shapes, o = [0, n.itemSize[1]], s = t ? o : this._handleEnds, l = this._createBarVisual(this._dataInterval, a, s, "inRange"), u = this._createBarVisual(a, a, o, "outOfRange");
i.inRange.setStyle({
fill: l.barColor
}).setShape("points", l.barPoints), i.outOfRange.setStyle({
fill: u.barColor
}).setShape("points", u.barPoints), this._updateHandle(s, l);
}, e.prototype._createBarVisual = function(t, n, a, i) {
var o = {
forceState: i,
convertOpacityToAlpha: !0
}, s = this._makeColorGradient(t, o), l = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)], u = this._createBarPoints(a, l);
return {
barColor: new Il(0, 0, 0, 1, s),
barPoints: u,
handlesColor: [s[0].color, s[s.length - 1].color]
};
}, e.prototype._makeColorGradient = function(t, n) {
var a = 100, i = [], o = (t[1] - t[0]) / a;
i.push({
color: this.getControllerVisual(t[0], "color", n),
offset: 0
});
for (var s = 1; s < a; s++) {
var l = t[0] + o * s;
if (l > t[1])
break;
i.push({
color: this.getControllerVisual(l, "color", n),
offset: s / a
});
}
return i.push({
color: this.getControllerVisual(t[1], "color", n),
offset: 1
}), i;
}, e.prototype._createBarPoints = function(t, n) {
var a = this.visualMapModel.itemSize;
return [[a[0] - n[0], t[0]], [a[0], t[0]], [a[0], t[1]], [a[0] - n[1], t[1]]];
}, e.prototype._createBarGroup = function(t) {
var n = this._orient, a = this.visualMapModel.get("inverse");
return new nt(n === "horizontal" && !a ? {
scaleX: t === "bottom" ? 1 : -1,
rotation: Math.PI / 2
} : n === "horizontal" && a ? {
scaleX: t === "bottom" ? -1 : 1,
rotation: -Math.PI / 2
} : n === "vertical" && !a ? {
scaleX: t === "left" ? 1 : -1,
scaleY: -1
} : {
scaleX: t === "left" ? 1 : -1
});
}, e.prototype._updateHandle = function(t, n) {
if (!!this._useHandle) {
var a = this._shapes, i = this.visualMapModel, o = a.handleThumbs, s = a.handleLabels, l = i.itemSize, u = i.getExtent();
IZ([0, 1], function(f) {
var h = o[f];
h.setStyle("fill", n.handlesColor[f]), h.y = t[f];
var c = Br(t[f], [0, l[1]], u, !0), v = this.getControllerVisual(c, "symbolSize");
h.scaleX = h.scaleY = v / l[0], h.x = l[0] - v / 2;
var p = Dr(a.handleLabelPoints[f], li(h, this.group));
s[f].setStyle({
x: p[0],
y: p[1],
text: i.formatValueText(this._dataInterval[f]),
verticalAlign: "middle",
align: this._orient === "vertical" ? this._applyTransform("left", a.mainGroup) : "center"
});
}, this);
}
}, e.prototype._showIndicator = function(t, n, a, i) {
var o = this.visualMapModel, s = o.getExtent(), l = o.itemSize, u = [0, l[1]], f = this._shapes, h = f.indicator;
if (!!h) {
h.attr("invisible", !1);
var c = {
convertOpacityToAlpha: !0
}, v = this.getControllerVisual(t, "color", c), p = this.getControllerVisual(t, "symbolSize"), d = Br(t, s, u, !0), g = l[0] - p / 2, y = {
x: h.x,
y: h.y
};
h.y = d, h.x = g;
var m = Dr(f.indicatorLabelPoint, li(h, this.group)), _ = f.indicatorLabel;
_.attr("invisible", !1);
var S = this._applyTransform("left", f.mainGroup), w = this._orient, x = w === "horizontal";
_.setStyle({
text: (a || "") + o.formatValueText(n),
verticalAlign: x ? S : "middle",
align: x ? "center" : S
});
var b = {
x: g,
y: d,
style: {
fill: v
}
}, T = {
style: {
x: m[0],
y: m[1]
}
};
if (o.ecModel.isAnimationEnabled() && !this._firstShowIndicator) {
var D = {
duration: 100,
easing: "cubicInOut",
additive: !0
};
h.x = y.x, h.y = y.y, h.animateTo(b, D), _.animateTo(T, D);
} else
h.attr(b), _.attr(T);
this._firstShowIndicator = !1;
var A = this._shapes.handleLabels;
if (A)
for (var M = 0; M < A.length; M++)
this._api.enterBlur(A[M]);
}
}, e.prototype._enableHoverLinkToSeries = function() {
var t = this;
this._shapes.mainGroup.on("mousemove", function(n) {
if (t._hovering = !0, !t._dragging) {
var a = t.visualMapModel.itemSize, i = t._applyTransform([n.offsetX, n.offsetY], t._shapes.mainGroup, !0, !0);
i[1] = Sb(Mp(0, i[1]), a[1]), t._doHoverLinkToSeries(i[1], 0 <= i[0] && i[0] <= a[0]);
}
}).on("mouseout", function() {
t._hovering = !1, !t._dragging && t._clearHoverLinkToSeries();
});
}, e.prototype._enableHoverLinkFromSeries = function() {
var t = this.api.getZr();
this.visualMapModel.option.hoverLink ? (t.on("mouseover", this._hoverLinkFromSeriesMouseOver, this), t.on("mouseout", this._hideIndicator, this)) : this._clearHoverLinkFromSeries();
}, e.prototype._doHoverLinkToSeries = function(t, n) {
var a = this.visualMapModel, i = a.itemSize;
if (!!a.option.hoverLink) {
var o = [0, i[1]], s = a.getExtent();
t = Sb(Mp(o[0], t), o[1]);
var l = RZ(a, s, o), u = [t - l, t + l], f = Br(t, o, s, !0), h = [Br(u[0], o, s, !0), Br(u[1], o, s, !0)];
u[0] < o[0] && (h[0] = -1 / 0), u[1] > o[1] && (h[1] = 1 / 0), n && (h[0] === -1 / 0 ? this._showIndicator(f, h[1], "< ", l) : h[1] === 1 / 0 ? this._showIndicator(f, h[0], "> ", l) : this._showIndicator(f, f, "\u2248 ", l));
var c = this._hoverLinkDataIndices, v = [];
(n || wb(a)) && (v = this._hoverLinkDataIndices = a.findTargetDataIndices(h));
var p = wP(c, v);
this._dispatchHighDown("downplay", df(p[0], a)), this._dispatchHighDown("highlight", df(p[1], a));
}
}, e.prototype._hoverLinkFromSeriesMouseOver = function(t) {
var n = t.target, a = this.visualMapModel;
if (!(!n || at(n).dataIndex == null)) {
var i = at(n), o = this.ecModel.getSeriesByIndex(i.seriesIndex);
if (!!a.isTargetSeries(o)) {
var s = o.getData(i.dataType), l = s.getStore().get(a.getDataDimensionIndex(s), i.dataIndex);
isNaN(l) || this._showIndicator(l, l);
}
}
}, e.prototype._hideIndicator = function() {
var t = this._shapes;
t.indicator && t.indicator.attr("invisible", !0), t.indicatorLabel && t.indicatorLabel.attr("invisible", !0);
var n = this._shapes.handleLabels;
if (n)
for (var a = 0; a < n.length; a++)
this._api.leaveBlur(n[a]);
}, e.prototype._clearHoverLinkToSeries = function() {
this._hideIndicator();
var t = this._hoverLinkDataIndices;
this._dispatchHighDown("downplay", df(t, this.visualMapModel)), t.length = 0;
}, e.prototype._clearHoverLinkFromSeries = function() {
this._hideIndicator();
var t = this.api.getZr();
t.off("mouseover", this._hoverLinkFromSeriesMouseOver), t.off("mouseout", this._hideIndicator);
}, e.prototype._applyTransform = function(t, n, a, i) {
var o = li(n, i ? null : this.group);
return z(t) ? Dr(t, o, a) : Oh(t, o, a);
}, e.prototype._dispatchHighDown = function(t, n) {
n && n.length && this.api.dispatchAction({
type: t,
batch: n
});
}, e.prototype.dispose = function() {
this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
}, e.prototype.remove = function() {
this._clearHoverLinkFromSeries(), this._clearHoverLinkToSeries();
}, e.type = "visualMap.continuous", e;
}(UI);
function xb(r, e, t, n) {
return new Be({
shape: {
points: r
},
draggable: !!t,
cursor: e,
drift: t,
onmousemove: function(a) {
mn(a.event);
},
ondragend: n
});
}
function RZ(r, e, t) {
var n = EZ / 2, a = r.get("hoverLinkDataSize");
return a && (n = Br(a, e, t, !0) / 2), n;
}
function wb(r) {
var e = r.get("hoverLinkOnHandle");
return !!(e == null ? r.get("realtime") : e);
}
function bb(r) {
return r === "vertical" ? "ns-resize" : "ew-resize";
}
const kZ = NZ;
var OZ = {
type: "selectDataRange",
event: "dataRangeSelected",
update: "update"
}, VZ = function(r, e) {
e.eachComponent({
mainType: "visualMap",
query: r
}, function(t) {
t.setSelected(r.selected);
});
}, BZ = [
{
createOnAllSeries: !0,
reset: function(r, e) {
var t = [];
return e.eachComponent("visualMap", function(n) {
var a = r.pipelineContext;
!n.isTargetSeries(r) || a && a.large || t.push(P7(n.stateList, n.targetVisuals, Y(n.getValueState, n), n.getDataDimensionIndex(r.getData())));
}), t;
}
},
{
createOnAllSeries: !0,
reset: function(r, e) {
var t = r.getData(), n = [];
e.eachComponent("visualMap", function(a) {
if (a.isTargetSeries(r)) {
var i = a.getVisualMeta(Y(zZ, null, r, a)) || {
stops: [],
outerColors: []
}, o = a.getDataDimensionIndex(t);
o >= 0 && (i.dimension = o, n.push(i));
}
}), r.getData().setVisual("visualMeta", n);
}
}
];
function zZ(r, e, t, n) {
for (var a = e.targetVisuals[n], i = fe.prepareVisualTypes(a), o = {
color: Rl(r.getData(), "color")
}, s = 0, l = i.length; s < l; s++) {
var u = i[s], f = a[u === "opacity" ? "__alphaForOpacity" : u];
f && f.applyVisual(t, h, c);
}
return o.color;
function h(v) {
return o[v];
}
function c(v, p) {
o[v] = p;
}
}
var Tb = C;
function GZ(r) {
var e = r && r.visualMap;
z(e) || (e = e ? [e] : []), Tb(e, function(t) {
if (!!t) {
Ki(t, "splitList") && !Ki(t, "pieces") && (t.pieces = t.splitList, delete t.splitList);
var n = t.pieces;
n && z(n) && Tb(n, function(a) {
j(a) && (Ki(a, "start") && !Ki(a, "min") && (a.min = a.start), Ki(a, "end") && !Ki(a, "max") && (a.max = a.end));
});
}
});
}
function Ki(r, e) {
return r && r.hasOwnProperty && r.hasOwnProperty(e);
}
var Cb = !1;
function ZI(r) {
Cb || (Cb = !0, r.registerSubTypeDefaulter("visualMap", function(e) {
return !e.categories && (!(e.pieces ? e.pieces.length > 0 : e.splitNumber > 0) || e.calculable) ? "continuous" : "piecewise";
}), r.registerAction(OZ, VZ), C(BZ, function(e) {
r.registerVisual(r.PRIORITY.VISUAL.COMPONENT, e);
}), r.registerPreprocessor(GZ));
}
function XI(r) {
r.registerComponentModel(MZ), r.registerComponentView(kZ), ZI(r);
}
var FZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t._pieceList = [], t;
}
return e.prototype.optionUpdated = function(t, n) {
r.prototype.optionUpdated.apply(this, arguments), this.resetExtent();
var a = this._mode = this._determineMode();
this._pieceList = [], HZ[this._mode].call(this, this._pieceList), this._resetSelected(t, n);
var i = this.option.categories;
this.resetVisual(function(o, s) {
a === "categories" ? (o.mappingMethod = "category", o.categories = tt(i)) : (o.dataExtent = this.getExtent(), o.mappingMethod = "piecewise", o.pieceList = G(this._pieceList, function(l) {
return l = tt(l), s !== "inRange" && (l.visual = null), l;
}));
});
}, e.prototype.completeVisualOption = function() {
var t = this.option, n = {}, a = fe.listVisualTypes(), i = this.isCategory();
C(t.pieces, function(s) {
C(a, function(l) {
s.hasOwnProperty(l) && (n[l] = 1);
});
}), C(n, function(s, l) {
var u = !1;
C(this.stateList, function(f) {
u = u || o(t, f, l) || o(t.target, f, l);
}, this), !u && C(this.stateList, function(f) {
(t[f] || (t[f] = {}))[l] = WI.get(l, f === "inRange" ? "active" : "inactive", i);
});
}, this);
function o(s, l, u) {
return s && s[l] && s[l].hasOwnProperty(u);
}
r.prototype.completeVisualOption.apply(this, arguments);
}, e.prototype._resetSelected = function(t, n) {
var a = this.option, i = this._pieceList, o = (n ? a : t).selected || {};
if (a.selected = o, C(i, function(l, u) {
var f = this.getSelectedMapKey(l);
o.hasOwnProperty(f) || (o[f] = !0);
}, this), a.selectedMode === "single") {
var s = !1;
C(i, function(l, u) {
var f = this.getSelectedMapKey(l);
o[f] && (s ? o[f] = !1 : s = !0);
}, this);
}
}, e.prototype.getItemSymbol = function() {
return this.get("itemSymbol");
}, e.prototype.getSelectedMapKey = function(t) {
return this._mode === "categories" ? t.value + "" : t.index + "";
}, e.prototype.getPieceList = function() {
return this._pieceList;
}, e.prototype._determineMode = function() {
var t = this.option;
return t.pieces && t.pieces.length > 0 ? "pieces" : this.option.categories ? "categories" : "splitNumber";
}, e.prototype.setSelected = function(t) {
this.option.selected = tt(t);
}, e.prototype.getValueState = function(t) {
var n = fe.findPieceIndex(t, this._pieceList);
return n != null && this.option.selected[this.getSelectedMapKey(this._pieceList[n])] ? "inRange" : "outOfRange";
}, e.prototype.findTargetDataIndices = function(t) {
var n = [], a = this._pieceList;
return this.eachTargetSeries(function(i) {
var o = [], s = i.getData();
s.each(this.getDataDimensionIndex(s), function(l, u) {
var f = fe.findPieceIndex(l, a);
f === t && o.push(u);
}, this), n.push({
seriesId: i.id,
dataIndex: o
});
}, this), n;
}, e.prototype.getRepresentValue = function(t) {
var n;
if (this.isCategory())
n = t.value;
else if (t.value != null)
n = t.value;
else {
var a = t.interval || [];
n = a[0] === -1 / 0 && a[1] === 1 / 0 ? 0 : (a[0] + a[1]) / 2;
}
return n;
}, e.prototype.getVisualMeta = function(t) {
if (this.isCategory())
return;
var n = [], a = ["", ""], i = this;
function o(f, h) {
var c = i.getRepresentValue({
interval: f
});
h || (h = i.getValueState(c));
var v = t(c, h);
f[0] === -1 / 0 ? a[0] = v : f[1] === 1 / 0 ? a[1] = v : n.push({
value: f[0],
color: v
}, {
value: f[1],
color: v
});
}
var s = this._pieceList.slice();
if (!s.length)
s.push({
interval: [-1 / 0, 1 / 0]
});
else {
var l = s[0].interval[0];
l !== -1 / 0 && s.unshift({
interval: [-1 / 0, l]
}), l = s[s.length - 1].interval[1], l !== 1 / 0 && s.push({
interval: [l, 1 / 0]
});
}
var u = -1 / 0;
return C(s, function(f) {
var h = f.interval;
h && (h[0] > u && o([u, h[0]], "outOfRange"), o(h.slice()), u = h[1]);
}, this), {
stops: n,
outerColors: a
};
}, e.type = "visualMap.piecewise", e.defaultOption = va(vh.defaultOption, {
selected: null,
minOpen: !1,
maxOpen: !1,
align: "auto",
itemWidth: 20,
itemHeight: 14,
itemSymbol: "roundRect",
pieces: null,
categories: null,
splitNumber: 5,
selectedMode: "multiple",
itemGap: 10,
hoverLink: !0
}), e;
}(vh), HZ = {
splitNumber: function(r) {
var e = this.option, t = Math.min(e.precision, 20), n = this.getExtent(), a = e.splitNumber;
a = Math.max(parseInt(a, 10), 1), e.splitNumber = a;
for (var i = (n[1] - n[0]) / a; +i.toFixed(t) !== i && t < 5; )
t++;
e.precision = t, i = +i.toFixed(t), e.minOpen && r.push({
interval: [-1 / 0, n[0]],
close: [0, 0]
});
for (var o = 0, s = n[0]; o < a; s += i, o++) {
var l = o === a - 1 ? n[1] : s + i;
r.push({
interval: [s, l],
close: [1, 1]
});
}
e.maxOpen && r.push({
interval: [n[1], 1 / 0],
close: [0, 0]
}), u0(r), C(r, function(u, f) {
u.index = f, u.text = this.formatValueText(u.interval);
}, this);
},
categories: function(r) {
var e = this.option;
C(e.categories, function(t) {
r.push({
text: this.formatValueText(t, !0),
value: t
});
}, this), Db(e, r);
},
pieces: function(r) {
var e = this.option;
C(e.pieces, function(t, n) {
j(t) || (t = {
value: t
});
var a = {
text: "",
index: n
};
if (t.label != null && (a.text = t.label), t.hasOwnProperty("value")) {
var i = a.value = t.value;
a.interval = [i, i], a.close = [1, 1];
} else {
for (var o = a.interval = [], s = a.close = [0, 0], l = [1, 0, 1], u = [-1 / 0, 1 / 0], f = [], h = 0; h < 2; h++) {
for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][h], v = 0; v < 3 && o[h] == null; v++)
o[h] = t[c[v]], s[h] = l[v], f[h] = v === 2;
o[h] == null && (o[h] = u[h]);
}
f[0] && o[1] === 1 / 0 && (s[0] = 0), f[1] && o[0] === -1 / 0 && (s[1] = 0), process.env.NODE_ENV !== "production" && o[0] > o[1] && console.warn("Piece " + n + "is illegal: " + o + " lower bound should not greater then uppper bound."), o[0] === o[1] && s[0] && s[1] && (a.value = o[0]);
}
a.visual = fe.retrieveVisuals(t), r.push(a);
}, this), Db(e, r), u0(r), C(r, function(t) {
var n = t.close, a = [["<", "\u2264"][n[1]], [">", "\u2265"][n[0]]];
t.text = t.text || this.formatValueText(t.value != null ? t.value : t.interval, !1, a);
}, this);
}
};
function Db(r, e) {
var t = r.inverse;
(r.orient === "vertical" ? !t : t) && e.reverse();
}
const $Z = FZ;
var WZ = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = e.type, t;
}
return e.prototype.doRender = function() {
var t = this.group;
t.removeAll();
var n = this.visualMapModel, a = n.get("textGap"), i = n.textStyleModel, o = i.getFont(), s = i.getTextColor(), l = this._getItemAlign(), u = n.itemSize, f = this._getViewData(), h = f.endsText, c = qt(n.get("showLabel", !0), !h);
h && this._renderEndsText(t, h[0], u, c, l), C(f.viewPieceList, function(v) {
var p = v.piece, d = new nt();
d.onclick = Y(this._onItemClick, this, p), this._enableHoverLink(d, v.indexInModelPieceList);
var g = n.getRepresentValue(p);
if (this._createItemSymbol(d, g, [0, 0, u[0], u[1]]), c) {
var y = this.visualMapModel.getValueState(g);
d.add(new Ct({
style: {
x: l === "right" ? -a : u[0] + a,
y: u[1] / 2,
text: p.text,
verticalAlign: "middle",
align: l,
font: o,
fill: s,
opacity: y === "outOfRange" ? 0.5 : 1
}
}));
}
t.add(d);
}, this), h && this._renderEndsText(t, h[1], u, c, l), ui(n.get("orient"), t, n.get("itemGap")), this.renderBackground(t), this.positionGroup(t);
}, e.prototype._enableHoverLink = function(t, n) {
var a = this;
t.on("mouseover", function() {
return i("highlight");
}).on("mouseout", function() {
return i("downplay");
});
var i = function(o) {
var s = a.visualMapModel;
s.option.hoverLink && a.api.dispatchAction({
type: o,
batch: df(s.findTargetDataIndices(n), s)
});
};
}, e.prototype._getItemAlign = function() {
var t = this.visualMapModel, n = t.option;
if (n.orient === "vertical")
return YI(t, this.api, t.itemSize);
var a = n.align;
return (!a || a === "auto") && (a = "left"), a;
}, e.prototype._renderEndsText = function(t, n, a, i, o) {
if (!!n) {
var s = new nt(), l = this.visualMapModel.textStyleModel;
s.add(new Ct({
style: zt(l, {
x: i ? o === "right" ? a[0] : 0 : a[0] / 2,
y: a[1] / 2,
verticalAlign: "middle",
align: i ? o : "center",
text: n
})
})), t.add(s);
}
}, e.prototype._getViewData = function() {
var t = this.visualMapModel, n = G(t.getPieceList(), function(s, l) {
return {
piece: s,
indexInModelPieceList: l
};
}), a = t.get("text"), i = t.get("orient"), o = t.get("inverse");
return (i === "horizontal" ? o : !o) ? n.reverse() : a && (a = a.slice().reverse()), {
viewPieceList: n,
endsText: a
};
}, e.prototype._createItemSymbol = function(t, n, a) {
t.add(Jt(
this.getControllerVisual(n, "symbol"),
a[0],
a[1],
a[2],
a[3],
this.getControllerVisual(n, "color")
));
}, e.prototype._onItemClick = function(t) {
var n = this.visualMapModel, a = n.option, i = a.selectedMode;
if (!!i) {
var o = tt(a.selected), s = n.getSelectedMapKey(t);
i === "single" || i === !0 ? (o[s] = !0, C(o, function(l, u) {
o[u] = u === s;
})) : o[s] = !o[s], this.api.dispatchAction({
type: "selectDataRange",
from: this.uid,
visualMapId: this.visualMapModel.id,
selected: o
});
}
}, e.type = "visualMap.piecewise", e;
}(UI);
const UZ = WZ;
function qI(r) {
r.registerComponentModel($Z), r.registerComponentView(UZ), ZI(r);
}
function YZ(r) {
pt(XI), pt(qI);
}
var ZZ = {
label: {
enabled: !0
},
decal: {
show: !1
}
}, Ab = Tt(), XZ = {};
function qZ(r, e) {
var t = r.getModel("aria");
if (!t.get("enabled"))
return;
var n = tt(ZZ);
lt(n.label, r.getLocaleModel().get("aria"), !1), lt(t.option, n, !1), a(), i();
function a() {
var u = t.getModel("decal"), f = u.get("show");
if (f) {
var h = K();
r.eachSeries(function(c) {
if (!c.isColorBySeries()) {
var v = h.get(c.type);
v || (v = {}, h.set(c.type, v)), Ab(c).scope = v;
}
}), r.eachRawSeries(function(c) {
if (r.isSeriesFiltered(c))
return;
if (q(c.enableAriaDecal)) {
c.enableAriaDecal();
return;
}
var v = c.getData();
if (c.isColorBySeries()) {
var m = Cd(c.ecModel, c.name, XZ, r.getSeriesCount()), _ = v.getVisual("decal");
v.setVisual("decal", S(_, m));
} else {
var p = c.getRawData(), d = {}, g = Ab(c).scope;
v.each(function(w) {
var x = v.getRawIndex(w);
d[x] = w;
});
var y = p.count();
p.each(function(w) {
var x = d[w], b = p.getName(w) || w + "", T = Cd(c.ecModel, b, g, y), D = v.getItemVisual(x, "decal");
v.setItemVisual(x, "decal", S(D, T));
});
}
function S(w, x) {
var b = w ? B(B({}, x), w) : x;
return b.dirty = !0, b;
}
});
}
}
function i() {
var u = r.getLocaleModel().get("aria"), f = t.getModel("label");
if (f.option = J(f.option, u), !!f.get("enabled")) {
var h = e.getZr().dom;
if (f.get("description")) {
h.setAttribute("aria-label", f.get("description"));
return;
}
var c = r.getSeriesCount(), v = f.get(["data", "maxCount"]) || 10, p = f.get(["series", "maxCount"]) || 10, d = Math.min(c, p), g;
if (!(c < 1)) {
var y = s();
if (y) {
var m = f.get(["general", "withTitle"]);
g = o(m, {
title: y
});
} else
g = f.get(["general", "withoutTitle"]);
var _ = [], S = c > 1 ? f.get(["series", "multiple", "prefix"]) : f.get(["series", "single", "prefix"]);
g += o(S, {
seriesCount: c
}), r.eachSeries(function(T, D) {
if (D < d) {
var A = void 0, M = T.get("name"), L = M ? "withName" : "withoutName";
A = c > 1 ? f.get(["series", "multiple", L]) : f.get(["series", "single", L]), A = o(A, {
seriesId: T.seriesIndex,
seriesName: T.get("name"),
seriesType: l(T.subType)
});
var I = T.getData();
if (I.count() > v) {
var E = f.get(["data", "partialData"]);
A += o(E, {
displayCnt: v
});
} else
A += f.get(["data", "allData"]);
for (var P = f.get(["data", "separator", "middle"]), N = f.get(["data", "separator", "end"]), O = [], k = 0; k < I.count(); k++)
if (k < v) {
var V = I.getName(k), F = I.getValues(k), $ = f.get(["data", V ? "withName" : "withoutName"]);
O.push(o($, {
name: V,
value: F.join(P)
}));
}
A += O.join(P) + N, _.push(A);
}
});
var w = f.getModel(["series", "multiple", "separator"]), x = w.get("middle"), b = w.get("end");
g += _.join(x) + b, h.setAttribute("aria-label", g);
}
}
}
function o(u, f) {
if (!W(u))
return u;
var h = u;
return C(f, function(c, v) {
h = h.replace(new RegExp("\\{\\s*" + v + "\\s*\\}", "g"), c);
}), h;
}
function s() {
var u = r.get("title");
return u && u.length && (u = u[0]), u && u.text;
}
function l(u) {
return r.getLocaleModel().get(["series", "typeNames"])[u] || "\u81EA\u5B9A\u4E49\u56FE";
}
}
function KZ(r) {
if (!(!r || !r.aria)) {
var e = r.aria;
e.show != null && (e.enabled = e.show), e.label = e.label || {}, C(["description", "general", "series", "data"], function(t) {
e[t] != null && (e.label[t] = e[t]);
});
}
}
function jZ(r) {
r.registerPreprocessor(KZ), r.registerVisual(r.PRIORITY.VISUAL.ARIA, qZ);
}
var Mb = {
value: "eq",
"<": "lt",
"<=": "lte",
">": "gt",
">=": "gte",
"=": "eq",
"!=": "ne",
"<>": "ne"
}, JZ = function() {
function r(e) {
var t = this._condVal = W(e) ? new RegExp(e) : eT(e) ? e : null;
if (t == null) {
var n = "";
process.env.NODE_ENV !== "production" && (n = Me("Illegal regexp", e, "in")), Mt(n);
}
}
return r.prototype.evaluate = function(e) {
var t = typeof e;
return W(t) ? this._condVal.test(e) : wt(t) ? this._condVal.test(e + "") : !1;
}, r;
}(), QZ = function() {
function r() {
}
return r.prototype.evaluate = function() {
return this.value;
}, r;
}(), tX = function() {
function r() {
}
return r.prototype.evaluate = function() {
for (var e = this.children, t = 0; t < e.length; t++)
if (!e[t].evaluate())
return !1;
return !0;
}, r;
}(), eX = function() {
function r() {
}
return r.prototype.evaluate = function() {
for (var e = this.children, t = 0; t < e.length; t++)
if (e[t].evaluate())
return !0;
return !1;
}, r;
}(), rX = function() {
function r() {
}
return r.prototype.evaluate = function() {
return !this.child.evaluate();
}, r;
}(), nX = function() {
function r() {
}
return r.prototype.evaluate = function() {
for (var e = !!this.valueParser, t = this.getValue, n = t(this.valueGetterParam), a = e ? this.valueParser(n) : null, i = 0; i < this.subCondList.length; i++)
if (!this.subCondList[i].evaluate(e ? a : n))
return !1;
return !0;
}, r;
}();
function Im(r, e) {
if (r === !0 || r === !1) {
var t = new QZ();
return t.value = r, t;
}
var n = "";
return KI(r) || (process.env.NODE_ENV !== "production" && (n = Me("Illegal config. Expect a plain object but actually", r)), Mt(n)), r.and ? Lb("and", r, e) : r.or ? Lb("or", r, e) : r.not ? aX(r, e) : iX(r, e);
}
function Lb(r, e, t) {
var n = e[r], a = "";
process.env.NODE_ENV !== "production" && (a = Me('"and"/"or" condition should only be `' + r + ": [...]` and must not be empty array.", "Illegal condition:", e)), z(n) || Mt(a), n.length || Mt(a);
var i = r === "and" ? new tX() : new eX();
return i.children = G(n, function(o) {
return Im(o, t);
}), i.children.length || Mt(a), i;
}
function aX(r, e) {
var t = r.not, n = "";
process.env.NODE_ENV !== "production" && (n = Me('"not" condition should only be `not: {}`.', "Illegal condition:", r)), KI(t) || Mt(n);
var a = new rX();
return a.child = Im(t, e), a.child || Mt(n), a;
}
function iX(r, e) {
for (var t = "", n = e.prepareGetValue(r), a = [], i = mt(r), o = r.parser, s = o ? TD(o) : null, l = 0; l < i.length; l++) {
var u = i[l];
if (!(u === "parser" || e.valueGetterAttrMap.get(u))) {
var f = U(Mb, u) ? Mb[u] : u, h = r[u], c = s ? s(h) : h, v = Hk(f, c) || f === "reg" && new JZ(c);
v || (process.env.NODE_ENV !== "production" && (t = Me('Illegal relational operation: "' + u + '" in condition:', r)), Mt(t)), a.push(v);
}
}
a.length || (process.env.NODE_ENV !== "production" && (t = Me("Relational condition must have at least one operator.", "Illegal condition:", r)), Mt(t));
var p = new nX();
return p.valueGetterParam = n, p.valueParser = s, p.getValue = e.getValue, p.subCondList = a, p;
}
function KI(r) {
return j(r) && !me(r);
}
var oX = function() {
function r(e, t) {
this._cond = Im(e, t);
}
return r.prototype.evaluate = function() {
return this._cond.evaluate();
}, r;
}();
function sX(r, e) {
return new oX(r, e);
}
var lX = {
type: "echarts:filter",
transform: function(r) {
for (var e = r.upstream, t, n = sX(r.config, {
valueGetterAttrMap: K({
dimension: !0
}),
prepareGetValue: function(s) {
var l = "", u = s.dimension;
U(s, "dimension") || (process.env.NODE_ENV !== "production" && (l = Me('Relation condition must has prop "dimension" specified.', "Illegal condition:", s)), Mt(l));
var f = e.getDimensionInfo(u);
return f || (process.env.NODE_ENV !== "production" && (l = Me("Can not find dimension info via: " + u + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal condition:", s, `.
`)), Mt(l)), {
dimIdx: f.index
};
},
getValue: function(s) {
return e.retrieveValueFromItem(t, s.dimIdx);
}
}), a = [], i = 0, o = e.count(); i < o; i++)
t = e.getRawDataItem(i), n.evaluate() && a.push(t);
return {
data: a
};
}
}, bg = "";
process.env.NODE_ENV !== "production" && (bg = ["Valid config is like:", '{ dimension: "age", order: "asc" }', 'or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));
var uX = {
type: "echarts:sort",
transform: function(r) {
var e = r.upstream, t = r.config, n = "", a = Pt(t);
a.length || (process.env.NODE_ENV !== "production" && (n = "Empty `config` in sort transform."), Mt(n));
var i = [];
C(a, function(f) {
var h = f.dimension, c = f.order, v = f.parser, p = f.incomparable;
if (h == null && (process.env.NODE_ENV !== "production" && (n = 'Sort transform config must has "dimension" specified.' + bg), Mt(n)), c !== "asc" && c !== "desc" && (process.env.NODE_ENV !== "production" && (n = 'Sort transform config must has "order" specified.' + bg), Mt(n)), p && p !== "min" && p !== "max") {
var d = "";
process.env.NODE_ENV !== "production" && (d = 'incomparable must be "min" or "max" rather than "' + p + '".'), Mt(d);
}
if (c !== "asc" && c !== "desc") {
var g = "";
process.env.NODE_ENV !== "production" && (g = 'order must be "asc" or "desc" rather than "' + c + '".'), Mt(g);
}
var y = e.getDimensionInfo(h);
y || (process.env.NODE_ENV !== "production" && (n = Me("Can not find dimension info via: " + h + `.
`, "Existing dimensions: ", e.cloneAllDimensionInfo(), `.
`, "Illegal config:", f, `.
`)), Mt(n));
var m = v ? TD(v) : null;
v && !m && (process.env.NODE_ENV !== "production" && (n = Me("Invalid parser name " + v + `.
`, "Illegal config:", f, `.
`)), Mt(n)), i.push({
dimIdx: y.index,
parser: m,
comparator: new DD(c, p)
});
});
var o = e.sourceFormat;
o !== Se && o !== dr && (process.env.NODE_ENV !== "production" && (n = 'sourceFormat "' + o + '" is not supported yet'), Mt(n));
for (var s = [], l = 0, u = e.count(); l < u; l++)
s.push(e.getRawDataItem(l));
return s.sort(function(f, h) {
for (var c = 0; c < i.length; c++) {
var v = i[c], p = e.retrieveValueFromItem(f, v.dimIdx), d = e.retrieveValueFromItem(h, v.dimIdx);
v.parser && (p = v.parser(p), d = v.parser(d));
var g = v.comparator.evaluate(p, d);
if (g !== 0)
return g;
}
return 0;
}), {
data: s
};
}
};
function fX(r) {
r.registerTransform(lX), r.registerTransform(uX);
}
var hX = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "dataset", t;
}
return e.prototype.init = function(t, n, a) {
r.prototype.init.call(this, t, n, a), this._sourceManager = new ID(this), D_(this);
}, e.prototype.mergeOption = function(t, n) {
r.prototype.mergeOption.call(this, t, n), D_(this);
}, e.prototype.optionUpdated = function() {
this._sourceManager.dirty();
}, e.prototype.getSourceManager = function() {
return this._sourceManager;
}, e.type = "dataset", e.defaultOption = {
seriesLayoutBy: Zr
}, e;
}(_t), cX = function(r) {
R(e, r);
function e() {
var t = r !== null && r.apply(this, arguments) || this;
return t.type = "dataset", t;
}
return e.type = "dataset", e;
}(Ht);
function vX(r) {
r.registerComponentModel(hX), r.registerComponentView(cX);
}
var Or = Jr.CMD;
function uo(r, e) {
return Math.abs(r - e) < 1e-5;
}
function Tg(r) {
var e = r.data, t = r.len(), n = [], a, i = 0, o = 0, s = 0, l = 0;
function u(I, E) {
a && a.length > 2 && n.push(a), a = [I, E];
}
function f(I, E, P, N) {
uo(I, P) && uo(E, N) || a.push(I, E, P, N, P, N);
}
function h(I, E, P, N, O, k) {
var V = Math.abs(E - I), F = Math.tan(V / 4) * 4 / 3, $ = E < I ? -1 : 1, Z = Math.cos(I), et = Math.sin(I), ht = Math.cos(E), Lt = Math.sin(E), At = Z * O + P, dt = et * k + N, rt = ht * O + P, yt = Lt * k + N, ut = O * F * $, X = k * F * $;
a.push(At - ut * et, dt + X * Z, rt + ut * Lt, yt - X * ht, rt, yt);
}
for (var c, v, p, d, g = 0; g < t; ) {
var y = e[g++], m = g === 1;
switch (m && (i = e[g], o = e[g + 1], s = i, l = o, (y === Or.L || y === Or.C || y === Or.Q) && (a = [s, l])), y) {
case Or.M:
i = s = e[g++], o = l = e[g++], u(s, l);
break;
case Or.L:
c = e[g++], v = e[g++], f(i, o, c, v), i = c, o = v;
break;
case Or.C:
a.push(e[g++], e[g++], e[g++], e[g++], i = e[g++], o = e[g++]);
break;
case Or.Q:
c = e[g++], v = e[g++], p = e[g++], d = e[g++], a.push(i + 2 / 3 * (c - i), o + 2 / 3 * (v - o), p + 2 / 3 * (c - p), d + 2 / 3 * (v - d), p, d), i = p, o = d;
break;
case Or.A:
var _ = e[g++], S = e[g++], w = e[g++], x = e[g++], b = e[g++], T = e[g++] + b;
g += 1;
var D = !e[g++];
c = Math.cos(b) * w + _, v = Math.sin(b) * x + S, m ? (s = c, l = v, u(s, l)) : f(i, o, c, v), i = Math.cos(T) * w + _, o = Math.sin(T) * x + S;
for (var A = (D ? -1 : 1) * Math.PI / 2, M = b; D ? M > T : M < T; M += A) {
var L = D ? Math.max(M + A, T) : Math.min(M + A, T);
h(M, L, _, S, w, x);
}
break;
case Or.R:
s = i = e[g++], l = o = e[g++], c = s + e[g++], v = l + e[g++], u(c, l), f(c, l, c, v), f(c, v, s, v), f(s, v, s, l), f(s, l, c, l);
break;
case Or.Z:
a && f(i, o, s, l), i = s, o = l;
break;
}
}
return a && a.length > 2 && n.push(a), n;
}
function Cg(r, e, t, n, a, i, o, s, l, u) {
if (uo(r, t) && uo(e, n) && uo(a, o) && uo(i, s)) {
l.push(o, s);
return;
}
var f = 2 / u, h = f * f, c = o - r, v = s - e, p = Math.sqrt(c * c + v * v);
c /= p, v /= p;
var d = t - r, g = n - e, y = a - o, m = i - s, _ = d * d + g * g, S = y * y + m * m;
if (_ < h && S < h) {
l.push(o, s);
return;
}
var w = c * d + v * g, x = -c * y - v * m, b = _ - w * w, T = S - x * x;
if (b < h && w >= 0 && T < h && x >= 0) {
l.push(o, s);
return;
}
var D = [], A = [];
na(r, t, a, o, 0.5, D), na(e, n, i, s, 0.5, A), Cg(D[0], A[0], D[1], A[1], D[2], A[2], D[3], A[3], l, u), Cg(D[4], A[4], D[5], A[5], D[6], A[6], D[7], A[7], l, u);
}
function pX(r, e) {
var t = Tg(r), n = [];
e = e || 1;
for (var a = 0; a < t.length; a++) {
var i = t[a], o = [], s = i[0], l = i[1];
o.push(s, l);
for (var u = 2; u < i.length; ) {
var f = i[u++], h = i[u++], c = i[u++], v = i[u++], p = i[u++], d = i[u++];
Cg(s, l, f, h, c, v, p, d, o, e), s = p, l = d;
}
n.push(o);
}
return n;
}
function jI(r, e, t) {
var n = r[e], a = r[1 - e], i = Math.abs(n / a), o = Math.ceil(Math.sqrt(i * t)), s = Math.floor(t / o);
s === 0 && (s = 1, o = t);
for (var l = [], u = 0; u < o; u++)
l.push(s);
var f = o * s, h = t - f;
if (h > 0)
for (var u = 0; u < h; u++)
l[u % o] += 1;
return l;
}
function Ib(r, e, t) {
for (var n = r.r0, a = r.r, i = r.startAngle, o = r.endAngle, s = Math.abs(o - i), l = s * a, u = a - n, f = l > Math.abs(u), h = jI([l, u], f ? 0 : 1, e), c = (f ? s : u) / h.length, v = 0; v < h.length; v++)
for (var p = (f ? u : s) / h[v], d = 0; d < h[v]; d++) {
var g = {};
f ? (g.startAngle = i + c * v, g.endAngle = i + c * (v + 1), g.r0 = n + p * d, g.r = n + p * (d + 1)) : (g.startAngle = i + p * d, g.endAngle = i + p * (d + 1), g.r0 = n + c * v, g.r = n + c * (v + 1)), g.clockwise = r.clockwise, g.cx = r.cx, g.cy = r.cy, t.push(g);
}
}
function dX(r, e, t) {
for (var n = r.width, a = r.height, i = n > a, o = jI([n, a], i ? 0 : 1, e), s = i ? "width" : "height", l = i ? "height" : "width", u = i ? "x" : "y", f = i ? "y" : "x", h = r[s] / o.length, c = 0; c < o.length; c++)
for (var v = r[l] / o[c], p = 0; p < o[c]; p++) {
var d = {};
d[u] = c * h, d[f] = p * v, d[s] = h, d[l] = v, d.x += r.x, d.y += r.y, t.push(d);
}
}
function Eb(r, e, t, n) {
return r * n - t * e;
}
function gX(r, e, t, n, a, i, o, s) {
var l = t - r, u = n - e, f = o - a, h = s - i, c = Eb(f, h, l, u);
if (Math.abs(c) < 1e-6)
return null;
var v = r - a, p = e - i, d = Eb(v, p, f, h) / c;
return d < 0 || d > 1 ? null : new st(d * l + r, d * u + e);
}
function yX(r, e, t) {
var n = new st();
st.sub(n, t, e), n.normalize();
var a = new st();
st.sub(a, r, e);
var i = a.dot(n);
return i;
}
function ji(r, e) {
var t = r[r.length - 1];
t && t[0] === e[0] && t[1] === e[1] || r.push(e);
}
function mX(r, e, t) {
for (var n = r.length, a = [], i = 0; i < n; i++) {
var o = r[i], s = r[(i + 1) % n], l = gX(o[0], o[1], s[0], s[1], e.x, e.y, t.x, t.y);
l && a.push({
projPt: yX(l, e, t),
pt: l,
idx: i
});
}
if (a.length < 2)
return [{ points: r }, { points: r }];
a.sort(function(g, y) {
return g.projPt - y.projPt;
});
var u = a[0], f = a[a.length - 1];
if (f.idx < u.idx) {
var h = u;
u = f, f = h;
}
for (var c = [u.pt.x, u.pt.y], v = [f.pt.x, f.pt.y], p = [c], d = [v], i = u.idx + 1; i <= f.idx; i++)
ji(p, r[i].slice());
ji(p, v), ji(p, c);
for (var i = f.idx + 1; i <= u.idx + n; i++)
ji(d, r[i % n].slice());
return ji(d, c), ji(d, v), [{
points: p
}, {
points: d
}];
}
function Pb(r) {
var e = r.points, t = [], n = [];
Ih(e, t, n);
var a = new ft(t[0], t[1], n[0] - t[0], n[1] - t[1]), i = a.width, o = a.height, s = a.x, l = a.y, u = new st(), f = new st();
return i > o ? (u.x = f.x = s + i / 2, u.y = l, f.y = l + o) : (u.y = f.y = l + o / 2, u.x = s, f.x = s + i), mX(e, u, f);
}
function ph(r, e, t, n) {
if (t === 1)
n.push(e);
else {
var a = Math.floor(t / 2), i = r(e);
ph(r, i[0], a, n), ph(r, i[1], t - a, n);
}
return n;
}
function _X(r, e) {
for (var t = [], n = 0; n < e; n++)
t.push(qg(r));
return t;
}
function SX(r, e) {
e.setStyle(r.style), e.z = r.z, e.z2 = r.z2, e.zlevel = r.zlevel;
}
function xX(r) {
for (var e = [], t = 0; t < r.length; )
e.push([r[t++], r[t++]]);
return e;
}
function wX(r, e) {
var t = [], n = r.shape, a;
switch (r.type) {
case "rect":
dX(n, e, t), a = xt;
break;
case "sector":
Ib(n, e, t), a = Ve;
break;
case "circle":
Ib({
r0: 0,
r: n.r,
startAngle: 0,
endAngle: Math.PI * 2,
cx: n.cx,
cy: n.cy
}, e, t), a = Ve;
break;
default:
var i = r.getComputedTransform(), o = i ? Math.sqrt(Math.max(i[0] * i[0] + i[1] * i[1], i[2] * i[2] + i[3] * i[3])) : 1, s = G(pX(r.getUpdatedPathProxy(), o), function(y) {
return xX(y);
}), l = s.length;
if (l === 0)
ph(Pb, {
points: s[0]
}, e, t);
else if (l === e)
for (var u = 0; u < l; u++)
t.push({
points: s[u]
});
else {
var f = 0, h = G(s, function(y) {
var m = [], _ = [];
Ih(y, m, _);
var S = (_[1] - m[1]) * (_[0] - m[0]);
return f += S, { poly: y, area: S };
});
h.sort(function(y, m) {
return m.area - y.area;
});
for (var c = e, u = 0; u < l; u++) {
var v = h[u];
if (c <= 0)
break;
var p = u === l - 1 ? c : Math.ceil(v.area / f * e);
p < 0 || (ph(Pb, {
points: v.poly
}, p, t), c -= p);
}
}
a = Be;
break;
}
if (!a)
return _X(r, e);
for (var d = [], u = 0; u < t.length; u++) {
var g = new a();
g.setShape(t[u]), SX(r, g), d.push(g);
}
return d;
}
function bX(r, e) {
var t = r.length, n = e.length;
if (t === n)
return [r, e];
for (var a = [], i = [], o = t < n ? r : e, s = Math.min(t, n), l = Math.abs(n - t) / 6, u = (s - 2) / 6, f = Math.ceil(l / u) + 1, h = [o[0], o[1]], c = l, v = 2; v < s; ) {
var p = o[v - 2], d = o[v - 1], g = o[v++], y = o[v++], m = o[v++], _ = o[v++], S = o[v++], w = o[v++];
if (c <= 0) {
h.push(g, y, m, _, S, w);
continue;
}
for (var x = Math.min(c, f - 1) + 1, b = 1; b <= x; b++) {
var T = b / x;
na(p, g, m, S, T, a), na(d, y, _, w, T, i), p = a[3], d = i[3], h.push(a[1], i[1], a[2], i[2], p, d), g = a[5], y = i[5], m = a[6], _ = i[6];
}
c -= x - 1;
}
return o === r ? [h, e] : [r, h];
}
function Nb(r, e) {
for (var t = r.length, n = r[t - 2], a = r[t - 1], i = [], o = 0; o < e.length; )
i[o++] = n, i[o++] = a;
return i;
}
function TX(r, e) {
for (var t, n, a, i = [], o = [], s = 0; s < Math.max(r.length, e.length); s++) {
var l = r[s], u = e[s], f = void 0, h = void 0;
l ? u ? (t = bX(l, u), f = t[0], h = t[1], n = f, a = h) : (h = Nb(a || l, l), f = l) : (f = Nb(n || u, u), h = u), i.push(f), o.push(h);
}
return [i, o];
}
function Rb(r) {
for (var e = 0, t = 0, n = 0, a = r.length, i = 0, o = a - 2; i < a; o = i, i += 2) {
var s = r[o], l = r[o + 1], u = r[i], f = r[i + 1], h = s * f - u * l;
e += h, t += (s + u) * h, n += (l + f) * h;
}
return e === 0 ? [r[0] || 0, r[1] || 0] : [t / e / 3, n / e / 3, e];
}
function CX(r, e, t, n) {
for (var a = (r.length - 2) / 6, i = 1 / 0, o = 0, s = r.length, l = s - 2, u = 0; u < a; u++) {
for (var f = u * 6, h = 0, c = 0; c < s; c += 2) {
var v = c === 0 ? f : (f + c - 2) % l + 2, p = r[v] - t[0], d = r[v + 1] - t[1], g = e[c] - n[0], y = e[c + 1] - n[1], m = g - p, _ = y - d;
h += m * m + _ * _;
}
h < i && (i = h, o = u);
}
return o;
}
function DX(r) {
for (var e = [], t = r.length, n = 0; n < t; n += 2)
e[n] = r[t - n - 2], e[n + 1] = r[t - n - 1];
return e;
}
function AX(r, e, t, n) {
for (var a = [], i, o = 0; o < r.length; o++) {
var s = r[o], l = e[o], u = Rb(s), f = Rb(l);
i == null && (i = u[2] < 0 != f[2] < 0);
var h = [], c = [], v = 0, p = 1 / 0, d = [], g = s.length;
i && (s = DX(s));
for (var y = CX(s, l, u, f) * 6, m = g - 2, _ = 0; _ < m; _ += 2) {
var S = (y + _) % m + 2;
h[_ + 2] = s[S] - u[0], h[_ + 3] = s[S + 1] - u[1];
}
if (h[0] = s[y] - u[0], h[1] = s[y + 1] - u[1], t > 0)
for (var w = n / t, x = -n / 2; x <= n / 2; x += w) {
for (var b = Math.sin(x), T = Math.cos(x), D = 0, _ = 0; _ < s.length; _ += 2) {
var A = h[_], M = h[_ + 1], L = l[_] - f[0], I = l[_ + 1] - f[1], E = L * T - I * b, P = L * b + I * T;
d[_] = E, d[_ + 1] = P;
var N = E - A, O = P - M;
D += N * N + O * O;
}
if (D < p) {
p = D, v = x;
for (var k = 0; k < d.length; k++)
c[k] = d[k];
}
}
else
for (var V = 0; V < g; V += 2)
c[V] = l[V] - f[0], c[V + 1] = l[V + 1] - f[1];
a.push({
from: h,
to: c,
fromCp: u,
toCp: f,
rotation: -v
});
}
return a;
}
function dh(r) {
return r.__isCombineMorphing;
}
var JI = "__mOriginal_";
function gh(r, e, t) {
var n = JI + e, a = r[n] || r[e];
r[n] || (r[n] = r[e]);
var i = t.replace, o = t.after, s = t.before;
r[e] = function() {
var l = arguments, u;
return s && s.apply(this, l), i ? u = i.apply(this, l) : u = a.apply(this, l), o && o.apply(this, l), u;
};
}
function Qs(r, e) {
var t = JI + e;
r[t] && (r[e] = r[t], r[t] = null);
}
function kb(r, e) {
for (var t = 0; t < r.length; t++)
for (var n = r[t], a = 0; a < n.length; ) {
var i = n[a], o = n[a + 1];
n[a++] = e[0] * i + e[2] * o + e[4], n[a++] = e[1] * i + e[3] * o + e[5];
}
}
function QI(r, e) {
var t = r.getUpdatedPathProxy(), n = e.getUpdatedPathProxy(), a = TX(Tg(t), Tg(n)), i = a[0], o = a[1], s = r.getComputedTransform(), l = e.getComputedTransform();
function u() {
this.transform = null;
}
s && kb(i, s), l && kb(o, l), gh(e, "updateTransform", { replace: u }), e.transform = null;
var f = AX(i, o, 10, Math.PI), h = [];
gh(e, "buildPath", { replace: function(c) {
for (var v = e.__morphT, p = 1 - v, d = [], g = 0; g < f.length; g++) {
var y = f[g], m = y.from, _ = y.to, S = y.rotation * v, w = y.fromCp, x = y.toCp, b = Math.sin(S), T = Math.cos(S);
ju(d, w, x, v);
for (var D = 0; D < m.length; D += 2) {
var A = m[D], M = m[D + 1], L = _[D], I = _[D + 1], E = A * p + L * v, P = M * p + I * v;
h[D] = E * T - P * b + d[0], h[D + 1] = E * b + P * T + d[1];
}
var N = h[0], O = h[1];
c.moveTo(N, O);
for (var D = 2; D < m.length; ) {
var L = h[D++], I = h[D++], k = h[D++], V = h[D++], F = h[D++], $ = h[D++];
N === L && O === I && k === F && V === $ ? c.lineTo(F, $) : c.bezierCurveTo(L, I, k, V, F, $), N = F, O = $;
}
}
} });
}
function Em(r, e, t) {
if (!r || !e)
return e;
var n = t.done, a = t.during;
QI(r, e), e.__morphT = 0;
function i() {
Qs(e, "buildPath"), Qs(e, "updateTransform"), e.__morphT = -1, e.createPathProxy(), e.dirtyShape();
}
return e.animateTo({
__morphT: 1
}, J({
during: function(o) {
e.dirtyShape(), a && a(o);
},
done: function() {
i(), n && n();
}
}, t)), e;
}
function MX(r, e, t, n, a, i) {
var o = 16;
r = a === t ? 0 : Math.round(32767 * (r - t) / (a - t)), e = i === n ? 0 : Math.round(32767 * (e - n) / (i - n));
for (var s = 0, l, u = (1 << o) / 2; u > 0; u /= 2) {
var f = 0, h = 0;
(r & u) > 0 && (f = 1), (e & u) > 0 && (h = 1), s += u * u * (3 * f ^ h), h === 0 && (f === 1 && (r = u - 1 - r, e = u - 1 - e), l = r, r = e, e = l);
}
return s;
}
function yh(r) {
var e = 1 / 0, t = 1 / 0, n = -1 / 0, a = -1 / 0, i = G(r, function(s) {
var l = s.getBoundingRect(), u = s.getComputedTransform(), f = l.x + l.width / 2 + (u ? u[4] : 0), h = l.y + l.height / 2 + (u ? u[5] : 0);
return e = Math.min(f, e), t = Math.min(h, t), n = Math.max(f, n), a = Math.max(h, a), [f, h];
}), o = G(i, function(s, l) {
return {
cp: s,
z: MX(s[0], s[1], e, t, n, a),
path: r[l]
};
});
return o.sort(function(s, l) {
return s.z - l.z;
}).map(function(s) {
return s.path;
});
}
function t2(r) {
return wX(r.path, r.count);
}
function Dg() {
return {
fromIndividuals: [],
toIndividuals: [],
count: 0
};
}
function LX(r, e, t) {
var n = [];
function a(w) {
for (var x = 0; x < w.length; x++) {
var b = w[x];
dh(b) ? a(b.childrenRef()) : b instanceof gt && n.push(b);
}
}
a(r);
var i = n.length;
if (!i)
return Dg();
var o = t.dividePath || t2, s = o({
path: e,
count: i
});
if (s.length !== i)
return console.error("Invalid morphing: unmatched splitted path"), Dg();
n = yh(n), s = yh(s);
for (var l = t.done, u = t.during, f = t.individualDelay, h = new un(), c = 0; c < i; c++) {
var v = n[c], p = s[c];
p.parent = e, p.copyTransform(h), f || QI(v, p);
}
e.__isCombineMorphing = !0, e.childrenRef = function() {
return s;
};
function d(w) {
for (var x = 0; x < s.length; x++)
s[x].addSelfToZr(w);
}
gh(e, "addSelfToZr", {
after: function(w) {
d(w);
}
}), gh(e, "removeSelfFromZr", {
after: function(w) {
for (var x = 0; x < s.length; x++)
s[x].removeSelfFromZr(w);
}
});
function g() {
e.__isCombineMorphing = !1, e.__morphT = -1, e.childrenRef = null, Qs(e, "addSelfToZr"), Qs(e, "removeSelfFromZr");
}
var y = s.length;
if (f)
for (var m = y, _ = function() {
m--, m === 0 && (g(), l && l());
}, c = 0; c < y; c++) {
var S = f ? J({
delay: (t.delay || 0) + f(c, y, n[c], s[c]),
done: _
}, t) : t;
Em(n[c], s[c], S);
}
else
e.__morphT = 0, e.animateTo({
__morphT: 1
}, J({
during: function(w) {
for (var x = 0; x < y; x++) {
var b = s[x];
b.__morphT = e.__morphT, b.dirtyShape();
}
u && u(w);
},
done: function() {
g();
for (var w = 0; w < r.length; w++)
Qs(r[w], "updateTransform");
l && l();
}
}, t));
return e.__zr && d(e.__zr), {
fromIndividuals: n,
toIndividuals: s,
count: y
};
}
function IX(r, e, t) {
var n = e.length, a = [], i = t.dividePath || t2;
function o(v) {
for (var p = 0; p < v.length; p++) {
var d = v[p];
dh(d) ? o(d.childrenRef()) : d instanceof gt && a.push(d);
}
}
if (dh(r)) {
o(r.childrenRef());
var s = a.length;
if (s < n)
for (var l = 0, u = s; u < n; u++)
a.push(qg(a[l++ % s]));
a.length = n;
} else {
a = i({ path: r, count: n });
for (var f = r.getComputedTransform(), u = 0; u < a.length; u++)
a[u].setLocalTransform(f);
if (a.length !== n)
return console.error("Invalid morphing: unmatched splitted path"), Dg();
}
a = yh(a), e = yh(e);
for (var h = t.individualDelay, u = 0; u < n; u++) {
var c = h ? J({
delay: (t.delay || 0) + h(u, n, a[u], e[u])
}, t) : t;
Em(a[u], e[u], c);
}
return {
fromIndividuals: a,
toIndividuals: e,
count: e.length
};
}
function Ob(r) {
return z(r[0]);
}
function Vb(r, e) {
for (var t = [], n = r.length, a = 0; a < n; a++)
t.push({
one: r[a],
many: []
});
for (var a = 0; a < e.length; a++) {
var i = e[a].length, o = void 0;
for (o = 0; o < i; o++)
t[o % n].many.push(e[a][o]);
}
for (var s = 0, a = n - 1; a >= 0; a--)
if (!t[a].many.length) {
var l = t[s].many;
if (l.length <= 1)
if (s)
s = 0;
else
return t;
var i = l.length, u = Math.ceil(i / 2);
t[a].many = l.slice(u, i), t[s].many = l.slice(0, u), s++;
}
return t;
}
var EX = {
clone: function(r) {
for (var e = [], t = 1 - Math.pow(1 - r.path.style.opacity, 1 / r.count), n = 0; n < r.count; n++) {
var a = qg(r.path);
a.setStyle("opacity", t), e.push(a);
}
return e;
},
split: null
};
function Lp(r, e, t, n, a, i) {
if (!r.length || !e.length)
return;
var o = ko("update", n, a);
if (!(o && o.duration > 0))
return;
var s = n.getModel("universalTransition").get("delay"), l = Object.assign({
setToFinal: !0
}, o), u, f;
Ob(r) && (u = r, f = e), Ob(e) && (u = e, f = r);
function h(y, m, _, S, w) {
var x = y.many, b = y.one;
if (x.length === 1 && !w) {
var T = m ? x[0] : b, D = m ? b : x[0];
if (dh(T))
h({
many: [T],
one: D
}, !0, _, S, !0);
else {
var A = s ? J({
delay: s(_, S)
}, l) : l;
Em(T, D, A), i(T, D, T, D, A);
}
} else
for (var M = J({
dividePath: EX[t],
individualDelay: s && function(O, k, V, F) {
return s(O + _, S);
}
}, l), L = m ? LX(x, b, M) : IX(b, x, M), I = L.fromIndividuals, E = L.toIndividuals, P = I.length, N = 0; N < P; N++) {
var A = s ? J({
delay: s(N, P)
}, l) : l;
i(I[N], E[N], m ? x[N] : y.one, m ? y.one : x[N], A);
}
}
for (var c = u ? u === r : r.length > e.length, v = u ? Vb(f, u) : Vb(c ? e : r, [c ? r : e]), p = 0, d = 0; d < v.length; d++)
p += v[d].many.length;
for (var g = 0, d = 0; d < v.length; d++)
h(v[d], c, g, p), g += v[d].many.length;
}
function Za(r) {
if (!r)
return [];
if (z(r)) {
for (var e = [], t = 0; t < r.length; t++)
e.push(Za(r[t]));
return e;
}
var n = [];
return r.traverse(function(a) {
a instanceof gt && !a.disableMorphing && !a.invisible && !a.ignore && n.push(a);
}), n;
}
var e2 = 1e4, PX = Tt();
function NX(r) {
for (var e = r.dimensions, t = 0; t < e.length; t++) {
var n = r.getDimensionInfo(e[t]);
if (n && n.otherDims.itemGroupId === 0)
return e[t];
}
}
function Bb(r) {
var e = [];
return C(r, function(t) {
var n = t.data;
if (n.count() > e2) {
process.env.NODE_ENV !== "production" && _e("Universal transition is disabled on large data > 10k.");
return;
}
for (var a = n.getIndices(), i = NX(n), o = 0; o < a.length; o++)
e.push({
data: n,
dim: t.dim || i,
divide: t.divide,
dataIndex: o
});
}), e;
}
function Ip(r, e, t) {
r.traverse(function(n) {
n instanceof gt && Bt(n, {
style: {
opacity: 0
}
}, e, {
dataIndex: t,
isFrom: !0
});
});
}
function Ep(r) {
if (r.parent) {
var e = r.getComputedTransform();
r.setLocalTransform(e), r.parent.remove(r);
}
}
function Ji(r) {
r.stopAnimation(), r.isGroup && r.traverse(function(e) {
e.stopAnimation();
});
}
function RX(r, e, t) {
var n = ko("update", t, e);
n && r.traverse(function(a) {
if (a instanceof cr) {
var i = gR(a);
i && a.animateFrom({
style: i
}, n);
}
});
}
function kX(r, e) {
var t = r.length;
if (t !== e.length)
return !1;
for (var n = 0; n < t; n++) {
var a = r[n], i = e[n];
if (a.data.getId(a.dataIndex) !== i.data.getId(i.dataIndex))
return !1;
}
return !0;
}
function r2(r, e, t) {
var n = Bb(r), a = Bb(e);
function i(y, m, _, S, w) {
(_ || y) && m.animateFrom({
style: _ && _ !== y ? B(B({}, _.style), y.style) : y.style
}, w);
}
function o(y) {
for (var m = 0; m < y.length; m++)
if (y[m].dim)
return y[m].dim;
}
var s = o(n), l = o(a), u = !1;
function f(y, m) {
return function(_) {
var S = _.data, w = _.dataIndex;
if (m)
return S.getId(w);
var x = S.hostModel && S.hostModel.get("dataGroupId"), b = y ? s || l : l || s, T = b && S.getDimensionInfo(b), D = T && T.ordinalMeta;
if (T) {
var A = S.get(T.name, w);
return D && D.categories[A] || A + "";
}
var M = S.getRawDataItem(w);
return M && M.groupId ? M.groupId + "" : x || S.getId(w);
};
}
var h = kX(n, a), c = {};
if (!h)
for (var v = 0; v < a.length; v++) {
var p = a[v], d = p.data.getItemGraphicEl(p.dataIndex);
d && (c[d.id] = !0);
}
function g(y, m) {
var _ = n[m], S = a[y], w = S.data.hostModel, x = _.data.getItemGraphicEl(_.dataIndex), b = S.data.getItemGraphicEl(S.dataIndex);
if (x === b) {
b && RX(b, S.dataIndex, w);
return;
}
x && c[x.id] || b && (Ji(b), x ? (Ji(x), Ep(x), u = !0, Lp(Za(x), Za(b), S.divide, w, y, i)) : Ip(b, w, y));
}
new wn(n, a, f(!0, h), f(!1, h), null, "multiple").update(g).updateManyToOne(function(y, m) {
var _ = a[y], S = _.data, w = S.hostModel, x = S.getItemGraphicEl(_.dataIndex), b = Et(G(m, function(T) {
return n[T].data.getItemGraphicEl(n[T].dataIndex);
}), function(T) {
return T && T !== x && !c[T.id];
});
x && (Ji(x), b.length ? (C(b, function(T) {
Ji(T), Ep(T);
}), u = !0, Lp(Za(b), Za(x), _.divide, w, y, i)) : Ip(x, w, _.dataIndex));
}).updateOneToMany(function(y, m) {
var _ = n[m], S = _.data.getItemGraphicEl(_.dataIndex);
if (!(S && c[S.id])) {
var w = Et(G(y, function(b) {
return a[b].data.getItemGraphicEl(a[b].dataIndex);
}), function(b) {
return b && b !== S;
}), x = a[y[0]].data.hostModel;
w.length && (C(w, function(b) {
return Ji(b);
}), S ? (Ji(S), Ep(S), u = !0, Lp(
Za(S),
Za(w),
_.divide,
x,
y[0],
i
)) : C(w, function(b) {
return Ip(b, x, y[0]);
}));
}
}).updateManyToMany(function(y, m) {
new wn(m, y, function(_) {
return n[_].data.getId(n[_].dataIndex);
}, function(_) {
return a[_].data.getId(a[_].dataIndex);
}).update(function(_, S) {
g(y[_], m[S]);
}).execute();
}).execute(), u && C(e, function(y) {
var m = y.data, _ = m.hostModel, S = _ && t.getViewOfSeriesModel(_), w = ko("update", _, 0);
S && _.isAnimationEnabled() && w && w.duration > 0 && S.group.traverse(function(x) {
x instanceof gt && !x.animators.length && x.animateFrom({
style: {
opacity: 0
}
}, w);
});
});
}
function zb(r) {
var e = r.getModel("universalTransition").get("seriesKey");
return e || r.id;
}
function Gb(r) {
return z(r) ? r.sort().join(",") : r;
}
function Hn(r) {
if (r.hostModel)
return r.hostModel.getModel("universalTransition").get("divideShape");
}
function OX(r, e) {
var t = K(), n = K(), a = K();
C(r.oldSeries, function(o, s) {
var l = r.oldData[s], u = zb(o), f = Gb(u);
n.set(f, l), z(u) && C(u, function(h) {
a.set(h, {
data: l,
key: f
});
});
});
function i(o) {
t.get(o) && _e("Duplicated seriesKey in universalTransition " + o);
}
return C(e.updatedSeries, function(o) {
if (o.isUniversalTransitionEnabled() && o.isAnimationEnabled()) {
var s = o.getData(), l = zb(o), u = Gb(l), f = n.get(u);
if (f)
process.env.NODE_ENV !== "production" && i(u), t.set(u, {
oldSeries: [{
divide: Hn(f),
data: f
}],
newSeries: [{
divide: Hn(s),
data: s
}]
});
else if (z(l)) {
process.env.NODE_ENV !== "production" && i(u);
var h = [];
C(l, function(p) {
var d = n.get(p);
d && h.push({
divide: Hn(d),
data: d
});
}), h.length && t.set(u, {
oldSeries: h,
newSeries: [{
data: s,
divide: Hn(s)
}]
});
} else {
var c = a.get(l);
if (c) {
var v = t.get(c.key);
v || (v = {
oldSeries: [{
data: c.data,
divide: Hn(c.data)
}],
newSeries: []
}, t.set(c.key, v)), v.newSeries.push({
data: s,
divide: Hn(s)
});
}
}
}
}), t;
}
function Fb(r, e) {
for (var t = 0; t < r.length; t++) {
var n = e.seriesIndex != null && e.seriesIndex === r[t].seriesIndex || e.seriesId != null && e.seriesId === r[t].id;
if (n)
return t;
}
}
function VX(r, e, t, n) {
var a = [], i = [];
C(Pt(r.from), function(o) {
var s = Fb(e.oldSeries, o);
s >= 0 && a.push({
data: e.oldData[s],
divide: Hn(e.oldData[s]),
dim: o.dimension
});
}), C(Pt(r.to), function(o) {
var s = Fb(t.updatedSeries, o);
if (s >= 0) {
var l = t.updatedSeries[s].getData();
i.push({
data: l,
divide: Hn(l),
dim: o.dimension
});
}
}), a.length > 0 && i.length > 0 && r2(a, i, n);
}
function BX(r) {
r.registerUpdateLifecycle("series:beforeupdate", function(e, t, n) {
C(Pt(n.seriesTransition), function(a) {
C(Pt(a.to), function(i) {
for (var o = n.updatedSeries, s = 0; s < o.length; s++)
(i.seriesIndex != null && i.seriesIndex === o[s].seriesIndex || i.seriesId != null && i.seriesId === o[s].id) && (o[s][uf] = !0);
});
});
}), r.registerUpdateLifecycle("series:transition", function(e, t, n) {
var a = PX(t);
if (a.oldSeries && n.updatedSeries && n.optionChanged) {
var i = n.seriesTransition;
if (i)
C(Pt(i), function(c) {
VX(c, a, n, t);
});
else {
var o = OX(a, n);
C(o.keys(), function(c) {
var v = o.get(c);
r2(v.oldSeries, v.newSeries, t);
});
}
C(n.updatedSeries, function(c) {
c[uf] && (c[uf] = !1);
});
}
for (var s = e.getSeries(), l = a.oldSeries = [], u = a.oldData = [], f = 0; f < s.length; f++) {
var h = s[f].getData();
h.count() < e2 && (l.push(s[f]), u.push(h));
}
});
}
pt([a5]);
pt([jz]);
pt([M5, Y5, aG, UG, lF, r3, N3, _4, Z4, rH, vH, y$, W$, aW, bW, IW, XW, a6, y6, C6, B6, xU]);
pt(WU);
pt(T8);
pt(qM);
pt(F8);
pt(OL);
pt(X8);
pt(nY);
pt(a7);
pt(A7);
pt(Yl);
pt(Z7);
pt(K7);
pt(h9);
pt(x9);
pt(L9);
pt(V9);
pt(j9);
pt(_Z);
pt(HI);
pt($I);
pt(YZ);
pt(XI);
pt(qI);
pt(jZ);
pt(fX);
pt(vX);
pt(BX);
pt(gz);
const n2 = Object.prototype.toString;
function zX(r) {
return n2.call(r) === "[object String]";
}
function Xo(r) {
return n2.call(r) === "[object Number]" && r === r;
}
function GX(r) {
return r === void 0;
}
function a2(r) {
return typeof r == "function";
}
const FX = Symbol("ArcoConfigProvider"), HX = "arco", $X = "$arco", Ln = (r) => {
var e, t, n;
const a = Xb(), i = l2(FX, void 0), o = (n = (t = i == null ? void 0 : i.prefixCls) != null ? t : (e = a == null ? void 0 : a.appContext.config.globalProperties[$X]) == null ? void 0 : e.classPrefix) != null ? n : HX;
return r ? `${o}-${r}` : o;
};
var Hb;
(function(r) {
r[r.ELEMENT = 1] = "ELEMENT", r[r.FUNCTIONAL_COMPONENT = 2] = "FUNCTIONAL_COMPONENT", r[r.STATEFUL_COMPONENT = 4] = "STATEFUL_COMPONENT", r[r.COMPONENT = 6] = "COMPONENT", r[r.TEXT_CHILDREN = 8] = "TEXT_CHILDREN", r[r.ARRAY_CHILDREN = 16] = "ARRAY_CHILDREN", r[r.SLOTS_CHILDREN = 32] = "SLOTS_CHILDREN", r[r.TELEPORT = 64] = "TELEPORT", r[r.SUSPENSE = 128] = "SUSPENSE", r[r.COMPONENT_SHOULD_KEEP_ALIVE = 256] = "COMPONENT_SHOULD_KEEP_ALIVE", r[r.COMPONENT_KEPT_ALIVE = 512] = "COMPONENT_KEPT_ALIVE";
})(Hb || (Hb = {}));
var $b;
(function(r) {
r[r.TEXT = 1] = "TEXT", r[r.CLASS = 2] = "CLASS", r[r.STYLE = 4] = "STYLE", r[r.PROPS = 8] = "PROPS", r[r.FULL_PROPS = 16] = "FULL_PROPS", r[r.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", r[r.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", r[r.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", r[r.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", r[r.NEED_PATCH = 512] = "NEED_PATCH", r[r.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", r[r.DEV_ROOT_FRAGMENT = 2048] = "DEV_ROOT_FRAGMENT", r[r.HOISTED = -1] = "HOISTED", r[r.BAIL = -2] = "BAIL";
})($b || ($b = {}));
const Wb = (r) => {
if (r)
return a2(r) ? r : () => r;
};
(() => {
try {
return !(typeof window < "u" && document !== void 0);
} catch {
return !0;
}
})();
const WX = (r) => {
const e = document.createElement("div");
return e.setAttribute("class", `arco-overlay arco-overlay-${r}`), e;
};
var pa = (r, e) => {
for (const [t, n] of e)
r[t] = n;
return r;
};
const UX = Cn({
name: "IconHover",
props: {
prefix: {
type: String
},
size: {
type: String,
default: "medium"
},
disabled: {
type: Boolean,
default: !1
}
},
setup() {
return {
prefixCls: Ln("icon-hover")
};
}
});
function YX(r, e, t, n, a, i) {
return Te(), Yr("span", {
class: Sr([
r.prefixCls,
{
[`${r.prefix}-icon-hover`]: r.prefix,
[`${r.prefixCls}-size-${r.size}`]: r.size !== "medium",
[`${r.prefixCls}-disabled`]: r.disabled
}
])
}, [
zp(r.$slots, "default")
], 2);
}
var ZX = /* @__PURE__ */ pa(UX, [["render", YX]]);
const XX = Cn({
name: "IconClose",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (r) => ["butt", "round", "square"].includes(r)
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
},
rotate: Number,
spin: Boolean
},
setup(r) {
const e = Ln("icon"), t = fr(() => [e, `${e}-close`, { [`${e}-spin`]: r.spin }]), n = fr(() => {
const a = {};
return r.size && (a.fontSize = Xo(r.size) ? `${r.size}px` : r.size), r.rotate && (a.transform = `rotate(${r.rotate}deg)`), a;
});
return {
cls: t,
innerStyle: n
};
}
}), qX = ["stroke-width", "stroke-linecap", "stroke-linejoin"], KX = /* @__PURE__ */ xi("path", { d: "M9.857 9.858 24 24m0 0 14.142 14.142M24 24 38.142 9.858M24 24 9.857 38.142" }, null, -1), jX = [
KX
];
function JX(r, e, t, n, a, i) {
return Te(), Yr("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: Sr(r.cls),
style: Io(r.innerStyle),
"stroke-width": r.strokeWidth,
"stroke-linecap": r.strokeLinecap,
"stroke-linejoin": r.strokeLinejoin
}, jX, 14, qX);
}
var Pp = /* @__PURE__ */ pa(XX, [["render", JX]]);
const QX = Object.assign(Pp, {
install: (r, e) => {
var t;
const n = (t = e == null ? void 0 : e.iconPrefix) != null ? t : "";
r.component(n + Pp.name, Pp);
}
}), tq = Cn({
name: "IconInfoCircleFill",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (r) => ["butt", "round", "square"].includes(r)
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
},
rotate: Number,
spin: Boolean
},
setup(r) {
const e = Ln("icon"), t = fr(() => [e, `${e}-info-circle-fill`, { [`${e}-spin`]: r.spin }]), n = fr(() => {
const a = {};
return r.size && (a.fontSize = Xo(r.size) ? `${r.size}px` : r.size), r.rotate && (a.transform = `rotate(${r.rotate}deg)`), a;
});
return {
cls: t,
innerStyle: n
};
}
}), eq = ["stroke-width", "stroke-linecap", "stroke-linejoin"], rq = /* @__PURE__ */ xi("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
fill: "currentColor",
stroke: "none"
}, null, -1), nq = [
rq
];
function aq(r, e, t, n, a, i) {
return Te(), Yr("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: Sr(r.cls),
style: Io(r.innerStyle),
"stroke-width": r.strokeWidth,
"stroke-linecap": r.strokeLinecap,
"stroke-linejoin": r.strokeLinejoin
}, nq, 14, eq);
}
var Np = /* @__PURE__ */ pa(tq, [["render", aq]]);
const iq = Object.assign(Np, {
install: (r, e) => {
var t;
const n = (t = e == null ? void 0 : e.iconPrefix) != null ? t : "";
r.component(n + Np.name, Np);
}
}), oq = Cn({
name: "IconCheckCircleFill",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (r) => ["butt", "round", "square"].includes(r)
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
},
rotate: Number,
spin: Boolean
},
setup(r) {
const e = Ln("icon"), t = fr(() => [e, `${e}-check-circle-fill`, { [`${e}-spin`]: r.spin }]), n = fr(() => {
const a = {};
return r.size && (a.fontSize = Xo(r.size) ? `${r.size}px` : r.size), r.rotate && (a.transform = `rotate(${r.rotate}deg)`), a;
});
return {
cls: t,
innerStyle: n
};
}
}), sq = ["stroke-width", "stroke-linecap", "stroke-linejoin"], lq = /* @__PURE__ */ xi("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm10.207-24.379a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0L22 26.172l-4.878-4.88a1 1 0 0 0-1.415 0l-1.414 1.415a1 1 0 0 0 0 1.414l7 7a1 1 0 0 0 1.414 0l11.5-11.5Z",
fill: "currentColor",
stroke: "none"
}, null, -1), uq = [
lq
];
function fq(r, e, t, n, a, i) {
return Te(), Yr("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: Sr(r.cls),
style: Io(r.innerStyle),
"stroke-width": r.strokeWidth,
"stroke-linecap": r.strokeLinecap,
"stroke-linejoin": r.strokeLinejoin
}, uq, 14, sq);
}
var Rp = /* @__PURE__ */ pa(oq, [["render", fq]]);
const hq = Object.assign(Rp, {
install: (r, e) => {
var t;
const n = (t = e == null ? void 0 : e.iconPrefix) != null ? t : "";
r.component(n + Rp.name, Rp);
}
}), cq = Cn({
name: "IconExclamationCircleFill",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (r) => ["butt", "round", "square"].includes(r)
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
},
rotate: Number,
spin: Boolean
},
setup(r) {
const e = Ln("icon"), t = fr(() => [e, `${e}-exclamation-circle-fill`, { [`${e}-spin`]: r.spin }]), n = fr(() => {
const a = {};
return r.size && (a.fontSize = Xo(r.size) ? `${r.size}px` : r.size), r.rotate && (a.transform = `rotate(${r.rotate}deg)`), a;
});
return {
cls: t,
innerStyle: n
};
}
}), vq = ["stroke-width", "stroke-linecap", "stroke-linejoin"], pq = /* @__PURE__ */ xi("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm-2-11a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2Zm4-18a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V15Z",
fill: "currentColor",
stroke: "none"
}, null, -1), dq = [
pq
];
function gq(r, e, t, n, a, i) {
return Te(), Yr("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: Sr(r.cls),
style: Io(r.innerStyle),
"stroke-width": r.strokeWidth,
"stroke-linecap": r.strokeLinecap,
"stroke-linejoin": r.strokeLinejoin
}, dq, 14, vq);
}
var kp = /* @__PURE__ */ pa(cq, [["render", gq]]);
const yq = Object.assign(kp, {
install: (r, e) => {
var t;
const n = (t = e == null ? void 0 : e.iconPrefix) != null ? t : "";
r.component(n + kp.name, kp);
}
}), mq = Cn({
name: "IconCloseCircleFill",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (r) => ["butt", "round", "square"].includes(r)
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
},
rotate: Number,
spin: Boolean
},
setup(r) {
const e = Ln("icon"), t = fr(() => [e, `${e}-close-circle-fill`, { [`${e}-spin`]: r.spin }]), n = fr(() => {
const a = {};
return r.size && (a.fontSize = Xo(r.size) ? `${r.size}px` : r.size), r.rotate && (a.transform = `rotate(${r.rotate}deg)`), a;
});
return {
cls: t,
innerStyle: n
};
}
}), _q = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Sq = /* @__PURE__ */ xi("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm4.955-27.771-4.95 4.95-4.95-4.95a1 1 0 0 0-1.414 0l-1.414 1.414a1 1 0 0 0 0 1.414l4.95 4.95-4.95 4.95a1 1 0 0 0 0 1.414l1.414 1.414a1 1 0 0 0 1.414 0l4.95-4.95 4.95 4.95a1 1 0 0 0 1.414 0l1.414-1.414a1 1 0 0 0 0-1.414l-4.95-4.95 4.95-4.95a1 1 0 0 0 0-1.414l-1.414-1.414a1 1 0 0 0-1.414 0Z",
fill: "currentColor",
stroke: "none"
}, null, -1), xq = [
Sq
];
function wq(r, e, t, n, a, i) {
return Te(), Yr("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: Sr(r.cls),
style: Io(r.innerStyle),
"stroke-width": r.strokeWidth,
"stroke-linecap": r.strokeLinecap,
"stroke-linejoin": r.strokeLinejoin
}, xq, 14, _q);
}
var Op = /* @__PURE__ */ pa(mq, [["render", wq]]);
const bq = Object.assign(Op, {
install: (r, e) => {
var t;
const n = (t = e == null ? void 0 : e.iconPrefix) != null ? t : "";
r.component(n + Op.name, Op);
}
}), Tq = ["info", "success", "warning", "error"], Cq = Cn({
name: "IconLoading",
props: {
size: {
type: [Number, String]
},
strokeWidth: {
type: Number,
default: 4
},
strokeLinecap: {
type: String,
default: "butt",
validator: (r) => ["butt", "round", "square"].includes(r)
},
strokeLinejoin: {
type: String,
default: "miter",
validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
},
rotate: Number,
spin: Boolean
},
setup(r) {
const e = Ln("icon"), t = fr(() => [e, `${e}-loading`, { [`${e}-spin`]: r.spin }]), n = fr(() => {
const a = {};
return r.size && (a.fontSize = Xo(r.size) ? `${r.size}px` : r.size), r.rotate && (a.transform = `rotate(${r.rotate}deg)`), a;
});
return {
cls: t,
innerStyle: n
};
}
}), Dq = ["stroke-width", "stroke-linecap", "stroke-linejoin"], Aq = /* @__PURE__ */ xi("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6" }, null, -1), Mq = [
Aq
];
function Lq(r, e, t, n, a, i) {
return Te(), Yr("svg", {
viewBox: "0 0 48 48",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
stroke: "currentColor",
class: Sr(r.cls),
style: Io(r.innerStyle),
"stroke-width": r.strokeWidth,
"stroke-linecap": r.strokeLinecap,
"stroke-linejoin": r.strokeLinejoin
}, Mq, 14, Dq);
}
var Vp = /* @__PURE__ */ pa(Cq, [["render", Lq]]);
const Iq = Object.assign(Vp, {
install: (r, e) => {
var t;
const n = (t = e == null ? void 0 : e.iconPrefix) != null ? t : "";
r.component(n + Vp.name, Vp);
}
}), Eq = 1e3, Pq = 5e3, Ub = 1;
class Nq {
constructor() {
this.popupStack = {
popup: /* @__PURE__ */ new Set(),
dialog: /* @__PURE__ */ new Set(),
message: /* @__PURE__ */ new Set()
}, this.getNextZIndex = (e) => e === "message" ? Pq + this.popupStack.message.size * Ub : Eq + this.popupStack.popup.size * Ub, this.add = (e, t) => (this.popupStack[t].add(e), t === "dialog" && this.popupStack.popup.add(e), this.getNextZIndex(t)), this.delete = (e, t) => {
this.popupStack[t].delete(e), t === "dialog" && this.popupStack.popup.delete(e);
}, this.isLastDialog = (e) => {
if (this.popupStack.dialog.size > 1) {
const t = Array.from(this.popupStack.dialog);
return e === t[t.length - 1];
}
return !0;
};
}
}
const Bp = new Nq();
function Rq(r, {
visible: e,
runOnMounted: t
} = {}) {
var n, a;
const i = (a = (n = Xb()) == null ? void 0 : n.uid) != null ? a : Date.now(), o = qb(0), s = () => {
o.value = Bp.add(i, r);
}, l = () => {
Bp.delete(i, r);
}, u = () => r === "dialog" ? Bp.isLastDialog(i) : !1;
return u2(() => e == null ? void 0 : e.value, (f) => {
f ? s() : l();
}, {
immediate: !0
}), t && (Kb(() => {
s();
}), f2(() => {
l();
})), {
id: i,
zIndex: o,
open: s,
close: l,
isLastDialog: u
};
}
const kq = Cn({
name: "Message",
components: {
AIconHover: ZX,
IconInfoCircleFill: iq,
IconCheckCircleFill: hq,
IconExclamationCircleFill: yq,
IconCloseCircleFill: bq,
IconClose: QX,
IconLoading: Iq
},
props: {
type: {
type: String,
default: "info"
},
closable: {
type: Boolean,
default: !1
},
showIcon: {
type: Boolean,
default: !0
},
duration: {
type: Number,
default: 3e3
},
resetOnUpdate: {
type: Boolean,
default: !1
}
},
emits: ["close"],
setup(r, { emit: e }) {
const t = Ln("message");
let n = 0;
const a = () => {
e("close");
};
return Kb(() => {
r.duration > 0 && (n = window.setTimeout(a, r.duration));
}), h2(() => {
r.resetOnUpdate && (n && (window.clearTimeout(n), n = 0), r.duration > 0 && (n = window.setTimeout(a, r.duration)));
}), c2(() => {
n && window.clearTimeout(n);
}), {
prefixCls: t,
handleClose: a
};
}
});
function Oq(r, e, t, n, a, i) {
const o = da("icon-info-circle-fill"), s = da("icon-check-circle-fill"), l = da("icon-exclamation-circle-fill"), u = da("icon-close-circle-fill"), f = da("icon-loading"), h = da("icon-close"), c = da("a-icon-hover");
return Te(), Yr("li", {
role: "alert",
class: Sr([
r.prefixCls,
`${r.prefixCls}-${r.type}`,
{ [`${r.prefixCls}-closable`]: r.closable }
])
}, [
r.showIcon ? (Te(), Yr("span", {
key: 0,
class: Sr(`${r.prefixCls}-icon`)
}, [
zp(r.$slots, "icon", {}, () => [
r.type === "info" ? (Te(), qo(o, { key: 0 })) : r.type === "success" ? (Te(), qo(s, { key: 1 })) : r.type === "warning" ? (Te(), qo(l, { key: 2 })) : r.type === "error" ? (Te(), qo(u, { key: 3 })) : r.type === "loading" ? (Te(), qo(f, { key: 4 })) : lc("v-if", !0)
])
], 2)) : lc("v-if", !0),
xi("span", {
class: Sr(`${r.prefixCls}-content`)
}, [
zp(r.$slots, "default")
], 2),
r.closable ? (Te(), Yr("span", {
key: 1,
class: Sr(`${r.prefixCls}-close-btn`),
onClick: e[0] || (e[0] = (...v) => r.handleClose && r.handleClose(...v))
}, [
tl(c, null, {
default: v2(() => [
tl(h)
]),
_: 1
})
], 2)) : lc("v-if", !0)
], 2);
}
var Vq = /* @__PURE__ */ pa(kq, [["render", Oq]]);
function Bq(r) {
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !d2(r);
}
var zq = Cn({
name: "MessageList",
props: {
messages: {
type: Array,
default: () => []
},
position: {
type: String,
default: "top"
}
},
emits: ["close", "afterClose"],
setup(r, e) {
const t = Ln("message-list"), {
zIndex: n
} = Rq("message", {
runOnMounted: !0
});
return () => {
let a;
return tl(p2, {
class: [t, `${t}-${r.position}`],
name: "fade-message",
tag: "ul",
style: {
zIndex: n.value
},
onAfterLeave: () => e.emit("afterClose")
}, Bq(a = r.messages.map((i) => {
const o = {
default: Wb(i.content),
icon: Wb(i.icon)
};
return tl(Vq, {
key: i.id,
type: i.type,
duration: i.duration,
closable: i.closable,
resetOnUpdate: i.resetOnUpdate,
onClose: () => e.emit("close", i.id)
}, o);
})) ? a : {
default: () => [a]
});
};
}
}), Gq = Object.defineProperty, Fq = Object.defineProperties, Hq = Object.getOwnPropertyDescriptors, Yb = Object.getOwnPropertySymbols, $q = Object.prototype.hasOwnProperty, Wq = Object.prototype.propertyIsEnumerable, Zb = (r, e, t) => e in r ? Gq(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, mh = (r, e) => {
for (var t in e || (e = {}))
$q.call(e, t) && Zb(r, t, e[t]);
if (Yb)
for (var t of Yb(e))
Wq.call(e, t) && Zb(r, t, e[t]);
return r;
}, i2 = (r, e) => Fq(r, Hq(e));
class Uq {
constructor(e, t) {
this.messageCount = 0, this.add = (i) => {
var o;
this.messageCount++;
const s = (o = i.id) != null ? o : `__arco_message_${this.messageCount}`;
if (this.messageIds.has(s))
return this.update(s, i);
const l = g2(mh({ id: s }, i));
return this.messages.value.push(l), this.messageIds.add(s), {
close: () => this.remove(s)
};
}, this.update = (i, o) => {
for (let s = 0; s < this.messages.value.length; s++)
if (this.messages.value[s].id === i) {
const l = !GX(o.duration);
Object.assign(this.messages.value[s], i2(mh({}, o), { id: i, resetOnUpdate: l }));
break;
}
return {
close: () => this.remove(i)
};
}, this.remove = (i) => {
for (let o = 0; o < this.messages.value.length; o++) {
const s = this.messages.value[o];
if (s.id === i) {
a2(s.onClose) && s.onClose(i), this.messages.value.splice(o, 1), this.messageIds.delete(i);
break;
}
}
}, this.clear = () => {
this.messages.value.splice(0);
}, this.destroy = () => {
this.messages.value.length === 0 && this.container && (Nm(null, this.container), document.body.removeChild(this.container), this.container = null, yo[this.position] = void 0);
};
const { position: n = "top" } = e;
this.container = WX("message"), this.messageIds = /* @__PURE__ */ new Set(), this.messages = qb([]), this.position = n;
const a = tl(zq, {
messages: this.messages.value,
position: n,
onClose: this.remove,
onAfterClose: this.destroy
});
(t != null ? t : fo._context) && (a.appContext = t != null ? t : fo._context), Nm(a, this.container), document.body.appendChild(this.container);
}
}
const yo = {}, o2 = [...Tq, "loading"], gf = o2.reduce((r, e) => (r[e] = (t, n) => {
zX(t) && (t = { content: t });
const a = mh({ type: e }, t), { position: i = "top" } = a;
return yo[i] || (yo[i] = new Uq(a, n)), yo[i].add(a);
}, r), {});
gf.clear = (r) => {
var e;
r ? (e = yo[r]) == null || e.clear() : Object.values(yo).forEach((t) => t == null ? void 0 : t.clear());
};
const fo = i2(mh({}, gf), {
install: (r) => {
const e = {
clear: gf.clear
};
for (const t of o2)
e[t] = (n, a = r._context) => gf[t](n, a);
r.config.globalProperties.$message = e;
},
_context: null
}), s2 = class {
static getFlyLine(r) {
this.setFlyLine(r).then((e) => {
this.flySeries.data = e, this.flyLineList.push({
map: this.mapName,
data: this.flySeries.data
});
}).catch((e) => {
fo.error({
content: "\u98DE\u7EBF\u6DFB\u52A0\u5931\u8D25"
});
}), this.option.series.push(this.flySeries);
}
static async setFlyLine(r) {
const e = await this.getGeoJson(), t = [];
return this.isCustomFlyLine(r) ? r.forEach((n) => {
t.push(n);
}) : r.forEach((n) => {
const a = {
fromName: "",
toName: "",
coords: [[], []]
};
let i = [], o = [];
n[0] !== "" && n[1] !== "" && (e.features.forEach((s) => {
n[0] === s.properties.name && (a.fromName = n[0], i = s.properties.center), n[1] === s.properties.name && (a.toName = n[1], o = s.properties.center);
}), i.length > 1 && o.length > 1 && (a.coords = [i, o], t.push(a)));
}), t;
}
static isCustomFlyLine(r) {
return r[0].fromName !== void 0;
}
static getPoint(r) {
this.setPoint(r).then((e) => {
this.pointSeries.data = e, this.pointList.push({
map: this.mapName,
data: this.pointSeries.data
});
}).catch((e) => {
fo.error({
content: "\u70B9\u4F4D\u6DFB\u52A0\u5931\u8D25"
});
}), this.option.series.push(this.pointSeries);
}
static async setPoint(r) {
const e = await this.getGeoJson(), t = [];
return typeof r[0] == "string" ? r.forEach((n) => {
n !== "" && e.features.forEach((a) => {
a.properties.name === n && t.push({
name: n,
value: a.properties.center
});
});
}) : r.forEach((n) => {
t.push(n);
}), t;
}
static handleMapList(r) {
if (r === "push")
if (!this.mapList.includes(this.mapName))
this.mapList.push(this.mapName);
else
return "error";
if (r === "pop")
if (this.mapList.length > 1)
this.mapList.pop();
else
return "error";
}
static async getGeoJson() {
return (await y2(/* @__PURE__ */ Object.assign({}), `../json/${this.mapName}.json`)).default;
}
static async initMap(r) {
const e = await this.getGeoJson(), t = document.getElementById(r);
this.handleMapList("push");
const n = cA(t);
n && n.dispose(), setTimeout(async () => {
const a = NV(t);
yA(this.mapName, e), a.setOption(this.option), this.handleMap(r, a);
}, 10);
}
static handleMap(r, e) {
e.on("click", (n) => {
this.option.geo.map = n.name, this.mapName = n.name, this.initOption(), this.initMap(r).then((a) => {
this.handleMapList("push");
}).catch((a) => {
fo.error({
content: `\u6682\u65E0\u3010${n.name}\u3011\u5730\u56FE\u6570\u636E`
});
});
});
const t = document.getElementById(r);
t.oncontextmenu = () => !1, e.on("contextmenu", () => {
const n = this.mapList[this.mapList.length - 2];
this.option.geo.map = n, this.mapName = n, this.initOption(), this.initMap(r).then((a) => {
this.handleMapList("pop");
}).catch((a) => {
this.option.geo.map = "\u5168\u56FD", this.mapName = "\u5168\u56FD", fo.error({
content: "\u5F53\u524D\u5730\u56FE\u4E3A\u6700\u4E0A\u5C42"
});
});
}), window.addEventListener("resize", (n) => {
e.resize();
});
}
static initOption() {
this.option.series = [], this.flySeries.data = [], this.pointSeries.data = [], this.flyLineList.forEach((r) => {
r.map === this.mapName && (this.flySeries.data = [...r.data], this.option.series.push(this.flySeries));
}), this.pointList.forEach((r) => {
r.map === this.mapName && (this.pointSeries.data = [...r.data], this.option.series.push(this.pointSeries));
});
}
};
let Li = s2;
Li.mapList = [];
Li.mapName = "\u5168\u56FD";
Li.option = {
backgroundColor: "black",
tooltip: {
show: !0,
trigger: "item",
alwaysShowContent: !1,
backgroundColor: "black",
borderColor: "transparent",
showDelay: 0,
hideDelay: 100,
triggerOn: "mousemove",
enterable: !0,
textStyle: {
color: "#DADADA",
fontSize: "12",
width: 20,
height: 30,
overflow: "break"
}
},
geo: {
map: s2.mapName,
roam: !1,
zoom: 1.2,
label: {
show: !0,
color: "black"
},
itemStyle: {
areaColor: "#ffa100",
borderColor: "white",
borderWidth: 1,
color: "#5377b2",
shadowColor: "#9dd8cf",
shadowOffsetX: -2,
shadowOffsetY: 2,
shadowBlur: 10
},
emphasis: {
itemStyle: {
areaColor: "#b03a5b",
borderWidth: 0
},
label: {
color: "white"
}
},
regions: []
},
series: []
};
Li.flySeries = {
type: "lines",
zlevel: 10,
effect: {
show: !0,
period: 6,
trailLength: 0.7,
color: "orange",
symbol: "",
symbolSize: 5
},
lineStyle: {
show: !0,
color: "#F56C6C",
width: 2,
opacity: 0.4,
curveness: 0.2
},
data: []
};
Li.flyLineList = [];
Li.pointSeries = {
type: "effectScatter",
coordinateSystem: "geo",
geoIndex: 0,
symbol: "",
symbolSize: 8,
rippleEffect: {
scale: 3.5
},
itemStyle: {
color: "#F56C6C"
},
encode: {
tooltip: 2
},
emphasis: {
scale: !0
},
data: []
};
Li.pointList = [];
export {
Li as Map
};