import{bQ as fS,at as hS,bR as Il,aK as Xo,bS as vS,c as en,as as cS,y as $o,bT as Vy,o as pS,M as dS,aV as gS,I as yS,g as Fy,d as mS,a as nc,s as _S,j as ac,e as oc,H as SS,f as bS,az as sc,h as Pl,t as wS,R as xS,aX as TS}from"./index-OSKNspXo.js";/*! *****************************************************************************
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 yf=function(r,t){return yf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},yf(r,t)};function O(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yf(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var MS=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),CS=function(){function r(){this.browser=new MS,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}(),Q=new CS;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Q.wxa=!0,Q.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Q.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(Q.node=!0,Q.svgSupported=!0):AS(navigator.userAgent,Q);function AS(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var Oh=12,DS="sans-serif",xi=Oh+"px "+DS,LS=20,IS=100,PS="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function RS(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-LS)/IS;t[i]=n}return t}var ES=RS(PS),xn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,t;return function(e,i){if(!r){var n=xn.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||xi),r.measureText(e);e=e||"",i=i||xi;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||Oh,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=ES[e[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i}},Hy=Fr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),Gy=Fr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Ha=Object.prototype.toString,$s=Array.prototype,kS=$s.forEach,OS=$s.filter,Nh=$s.slice,NS=$s.map,lc=(function(){}).constructor,Qa=lc?lc.prototype:null,Bh="__proto__",BS=2311;function Wy(){return BS++}function zh(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function X(r){if(r==null||typeof r!="object")return r;var t=r,e=Ha.call(r);if(e==="[object Array]"){if(!ca(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=X(r[i])}}else if(Gy[e]){if(!ca(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!Hy[e]&&!ca(r)&&!yn(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Bh&&(t[o]=X(r[o]))}return t}function tt(r,t,e){if(!Y(t)||!Y(r))return e?X(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==Bh){var n=r[i],a=t[i];Y(a)&&Y(n)&&!V(a)&&!V(n)&&!yn(a)&&!yn(n)&&!uc(a)&&!uc(n)&&!ca(a)&&!ca(n)?tt(n,a,e):(e||!(i in r))&&(r[i]=X(t[i]))}return r}function zS(r,t){for(var e=r[0],i=1,n=r.length;i<n;i++)e=tt(e,r[i],t);return e}function B(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==Bh&&(r[e]=t[e]);return r}function lt(r,t,e){for(var i=bt(t),n=0;n<i.length;n++){var a=i[n];r[a]==null&&(r[a]=t[a])}return r}function ot(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,i=r.length;e<i;e++)if(r[e]===t)return e}return-1}function VS(r,t){var e=r.prototype;function i(){}i.prototype=t.prototype,r.prototype=new i;for(var n in e)e.hasOwnProperty(n)&&(r.prototype[n]=e[n]);r.prototype.constructor=r,r.superClass=t}function Oe(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++){var a=i[n];a!=="constructor"&&r[a]==null&&(r[a]=t[a])}else lt(r,t)}function te(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function A(r,t,e){if(r&&t)if(r.forEach&&r.forEach===kS)r.forEach(t,e);else if(r.length===+r.length)for(var i=0,n=r.length;i<n;i++)t.call(e,r[i],i,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function H(r,t,e){if(!r)return[];if(!t)return Vh(r);if(r.map&&r.map===NS)return r.map(t,e);for(var i=[],n=0,a=r.length;n<a;n++)i.push(t.call(e,r[n],n,r));return i}function Fr(r,t,e,i){if(r&&t){for(var n=0,a=r.length;n<a;n++)e=t.call(i,e,r[n],n,r);return e}}function Lt(r,t,e){if(!r)return[];if(!t)return Vh(r);if(r.filter&&r.filter===OS)return r.filter(t,e);for(var i=[],n=0,a=r.length;n<a;n++)t.call(e,r[n],n,r)&&i.push(r[n]);return i}function bt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function FS(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return r.apply(t,e.concat(Nh.call(arguments)))}}var U=Qa&&$(Qa.bind)?Qa.call.bind(Qa.bind):FS;function it(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Nh.call(arguments)))}}function V(r){return Array.isArray?Array.isArray(r):Ha.call(r)==="[object Array]"}function $(r){return typeof r=="function"}function W(r){return typeof r=="string"}function mf(r){return Ha.call(r)==="[object String]"}function yt(r){return typeof r=="number"}function Y(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function uc(r){return!!Hy[Ha.call(r)]}function ee(r){return!!Gy[Ha.call(r)]}function yn(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function qs(r){return r.colorStops!=null}function HS(r){return r.image!=null}function hs(r){return r!==r}function Ie(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,i=r.length;e<i;e++)if(r[e]!=null)return r[e]}function et(r,t){return r??t}function va(r,t,e){return r??t??e}function Vh(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Nh.apply(r,t)}function Uy(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function Ee(r,t){if(!r)throw new Error(t)}function Ze(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Yy="__ec_primitive__";function _f(r){r[Yy]=!0}function ca(r){return r[Yy]}var GS=function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return bt(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},r}(),Zy=typeof Map=="function";function WS(){return Zy?new Map:new GS}var US=function(){function r(t){var e=V(t);this.data=WS();var i=this;t instanceof r?t.each(n):t&&A(t,n);function n(a,o){e?i.set(a,o):i.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(i,n){t.call(e,i,n)})},r.prototype.keys=function(){var t=this.data.keys();return Zy?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r}();function K(r){return new US(r)}function YS(r,t){for(var e=new r.constructor(r.length+t.length),i=0;i<r.length;i++)e[i]=r[i];for(var n=r.length,i=0;i<t.length;i++)e[i+n]=t[i];return e}function Ks(r,t){var e;if(Object.create)e=Object.create(r);else{var i=function(){};i.prototype=r,e=new i}return t&&B(e,t),e}function Xy(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function mn(r,t){return r.hasOwnProperty(t)}function Vt(){}var ZS=180/Math.PI;function Tn(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function XS(r){return[r[0],r[1]]}function fc(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function $y(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function $S(r){return Math.sqrt(qS(r))}function qS(r){return r[0]*r[0]+r[1]*r[1]}function Rl(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function Fh(r,t){var e=$S(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Sf(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var bf=Sf;function KS(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var fn=KS;function El(r,t,e,i){return r[0]=t[0]+i*(e[0]-t[0]),r[1]=t[1]+i*(e[1]-t[1]),r}function _e(r,t,e){var i=t[0],n=t[1];return r[0]=e[0]*i+e[2]*n+e[4],r[1]=e[1]*i+e[3]*n+e[5],r}function an(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function on(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Vi=function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r}(),QS=function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Vi(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.handler.dispatchToElement(new Vi(e,t),"drag",t.event);var s=this.handler.findHover(i,n,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Vi(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Vi(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Vi(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Vi(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r}(),we=function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,i,n){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(n=i,i=e,e=null),!i||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===i)return this;var l={h:i,query:e,ctx:n||this,callAtLast:i.zrEventfulCallAtLast},u=a[t].length-1,f=a[t][u];return f&&f.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},r.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=n.length,l=0;l<s;l++){var u=n[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var n=this._$handlers[t],a=this._$eventProcessor;if(n)for(var o=e.length,s=e[o-1],l=n.length,u=0;u<l;u++){var f=n[u];if(!(a&&a.filter&&f.query!=null&&!a.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,e[0]);break;case 2:f.h.call(s,e[0],e[1]);break;default:f.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r}(),JS=Math.log(2);function wf(r,t,e,i,n,a){var o=i+"-"+n,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~n)/JS);return r[e][l]}for(var u=i|1<<e,f=e+1;i&1<<f;)f++;for(var h=0,c=0,v=0;c<s;c++){var p=1<<c;p&n||(h+=(v%2?-1:1)*r[e][c]*wf(r,t-1,f,u,n|p,a),v++)}return a[o]=h,h}function hc(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],i={},n=wf(e,8,0,0,0,i);if(n!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*wf(e,7,o===0?1:0,1<<o,1<<s,i)/n*t[o];return function(l,u,f){var h=u*a[6]+f*a[7]+1;l[0]=(u*a[0]+f*a[1]+a[2])/h,l[1]=(u*a[3]+f*a[4]+a[5])/h}}}var vc="___zrEVENTSAVED",kl=[];function jS(r,t,e,i,n){return xf(kl,t,i,n,!0)&&xf(r,e,kl[0],kl[1])}function xf(r,t,e,i,n){if(t.getBoundingClientRect&&Q.domSupported&&!qy(t)){var a=t[vc]||(t[vc]={}),o=tb(t,a),s=eb(o,a,n);if(s)return s(r,e,i),!0}return!1}function tb(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var i=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function eb(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.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&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?hc(s,o):hc(o,s))}function qy(r){return r.nodeName.toUpperCase()==="CANVAS"}var rb=/([&<>"'])/g,ib={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function oe(r){return r==null?"":(r+"").replace(rb,function(t,e){return ib[e]})}var nb=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ol=[],ab=Q.browser.firefox&&+Q.browser.version.split(".")[0]<39;function Tf(r,t,e,i){return e=e||{},i?cc(r,t,e):ab&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):cc(r,t,e),e}function cc(r,t,e){if(Q.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(qy(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(xf(Ol,r,i,n)){e.zrX=Ol[0],e.zrY=Ol[1];return}}e.zrX=e.zrY=0}function Hh(r){return r||window.event}function ve(r,t,e){if(t=Hh(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Tf(r,o,t,e)}else{Tf(r,t,t,e);var a=ob(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&nb.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function ob(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function Mf(r,t,e,i){r.addEventListener(t,e,i)}function sb(r,t,e,i){r.removeEventListener(t,e,i)}var cr=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function pc(r){return r.which===2||r.which===3}var lb=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o<s;o++){var l=n[o],u=Tf(i,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in Nl)if(Nl.hasOwnProperty(e)){var i=Nl[e](this._track,t);if(i)return i}},r}();function dc(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function ub(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Nl={pinch:function(r,t){var e=r.length;if(e){var i=(r[e-1]||{}).points,n=(r[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=dc(i)/dc(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=ub(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function hn(){return[1,0,0,1,0,0]}function Gh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function fb(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function vn(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Cf(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Wh(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-i[0])+f*(u-i[1])+i[0],r[5]=h*(u-i[1])-f*(o-i[0])+i[1],r}function hb(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function Uh(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}var j=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.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 t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r}(),Ja=Math.min,ja=Math.max,Wr=new j,Ur=new j,Yr=new j,Zr=new j,En=new j,kn=new j,ft=function(){function r(t,e,i,n){i<0&&(t=t+i,i=-i),n<0&&(e=e+n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}return r.prototype.union=function(t){var e=Ja(t.x,this.x),i=Ja(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=ja(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=ja(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=hn();return Cf(a,a,[-e.x,-e.y]),hb(a,a,[i,n]),Cf(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var i=this,n=i.x,a=i.x+i.width,o=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,f=t.y,h=t.y+t.height,c=!(a<l||u<n||s<f||h<o);if(e){var v=1/0,p=0,g=Math.abs(a-l),d=Math.abs(u-n),y=Math.abs(s-f),m=Math.abs(h-o),_=Math.min(g,d),S=Math.min(y,m);a<l||u<n?_>p&&(p=_,g<d?j.set(kn,-g,0):j.set(kn,d,0)):_<v&&(v=_,g<d?j.set(En,g,0):j.set(En,-d,0)),s<f||h<o?S>p&&(p=S,y<m?j.set(kn,0,-y):j.set(kn,0,m)):_<v&&(v=_,y<m?j.set(En,0,y):j.set(En,0,-m))}return e&&j.copy(e,c?En:kn),c},r.prototype.contain=function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},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(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Wr.x=Yr.x=e.x,Wr.y=Zr.y=e.y,Ur.x=Zr.x=e.x+e.width,Ur.y=Yr.y=e.y+e.height,Wr.transform(i),Zr.transform(i),Ur.transform(i),Yr.transform(i),t.x=Ja(Wr.x,Ur.x,Yr.x,Zr.x),t.y=Ja(Wr.y,Ur.y,Yr.y,Zr.y);var l=ja(Wr.x,Ur.x,Yr.x,Zr.x),u=ja(Wr.y,Ur.y,Yr.y,Zr.y);t.width=l-t.x,t.height=u-t.y},r}(),Ky="silent";function vb(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:cb}}function cb(){cr(this.event)}var pb=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(we),On=function(){function r(t,e){this.x=t,this.y=e}return r}(),db=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Bl=new ft(0,0,0,0),Qy=function(r){O(t,r);function t(e,i,n,a,o){var s=r.call(this)||this;return s._hovered=new On(0,0),s.storage=e,s.painter=i,s.painterRoot=a,s._pointerSize=o,n=n||new pb,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new QS(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(A(db,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,n=e.zrY,a=Jy(this,i,n),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new On(i,n):this.findHover(i,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new On(0,0)},t.prototype.dispatch=function(e,i){var n=this[e];n&&n.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,n){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+i,s=vb(i,e,n);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(i,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,n){var a=this.storage.getDisplayList(),o=new On(e,i);if(gc(a,o,e,i,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new ft(e-u,i-u,l,l),h=a.length-1;h>=0;h--){var c=a[h];c!==n&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Bl.copy(c.getBoundingRect()),c.transform&&Bl.applyTransform(c.transform),Bl.intersect(f)&&s.push(c))}if(s.length)for(var v=4,p=Math.PI/12,g=Math.PI*2,d=0;d<u;d+=v)for(var y=0;y<g;y+=p){var m=e+d*Math.cos(y),_=i+d*Math.sin(y);if(gc(s,o,m,_,n),o.target)return o}}return o},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new lb);var n=this._gestureMgr;i==="start"&&n.clear();var a=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&n.clear(),a){var o=a.type;e.gestureEvent=o;var s=new On;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t}(we);A(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){Qy.prototype[r]=function(t){var e=t.zrX,i=t.zrY,n=Jy(this,e,i),a,o;if((r!=="mouseup"||!n)&&(a=this.findHover(e,i),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||bf(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function gb(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s||i.parent}return n?Ky:!0}return!1}function gc(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=gb(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==Ky)){t.target=o;break}}}function Jy(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var jy=32,Nn=7;function yb(r){for(var t=0;r>=jy;)t|=r&1,r>>=1;return r+t}function yc(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n<e&&i(r[n],r[n-1])<0;)n++;mb(r,t,n)}else for(;n<e&&i(r[n],r[n-1])>=0;)n++;return n-t}function mb(r,t,e){for(e--;t<e;){var i=r[t];r[t++]=r[e],r[e--]=i}}function mc(r,t,e,i,n){for(i===t&&i++;i<e;i++){for(var a=r[i],o=t,s=i,l;o<s;)l=o+s>>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-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]=a}}function zl(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l<s&&a(r,t[e+n+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;l<s&&a(r,t[e+n-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o<l;){var f=o+(l-o>>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function Vl(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;l<s&&a(r,t[e+n-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l<s&&a(r,t[e+n+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o<l;){var f=o+(l-o>>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function _b(r,t){var e=Nn,i,n,a=0,o=[];i=[],n=[];function s(v,p){i[a]=v,n[a]=p,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]<n[v+1]&&v--;else if(n[v]>n[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]<n[v+1]&&v--,f(v)}}function f(v){var p=i[v],g=n[v],d=i[v+1],y=n[v+1];n[v]=g+y,v===a-3&&(i[v+1]=i[v+2],n[v+1]=n[v+2]),a--;var m=Vl(r[d],r,p,g,0,t);p+=m,g-=m,g!==0&&(y=zl(r[p+g-1],r,d,y,y-1,t),y!==0&&(g<=y?h(p,g,d,y):c(p,g,d,y)))}function h(v,p,g,d){var y=0;for(y=0;y<p;y++)o[y]=r[v+y];var m=0,_=g,S=v;if(r[S++]=r[_++],--d===0){for(y=0;y<p;y++)r[S+y]=o[m+y];return}if(p===1){for(y=0;y<d;y++)r[S+y]=r[_+y];r[S+d]=o[m];return}for(var w=e,b,x,M;;){b=0,x=0,M=!1;do if(t(r[_],o[m])<0){if(r[S++]=r[_++],x++,b=0,--d===0){M=!0;break}}else if(r[S++]=o[m++],b++,x=0,--p===1){M=!0;break}while((b|x)<w);if(M)break;do{if(b=Vl(r[_],o,m,p,0,t),b!==0){for(y=0;y<b;y++)r[S+y]=o[m+y];if(S+=b,m+=b,p-=b,p<=1){M=!0;break}}if(r[S++]=r[_++],--d===0){M=!0;break}if(x=zl(o[m],r,_,d,0,t),x!==0){for(y=0;y<x;y++)r[S+y]=r[_+y];if(S+=x,_+=x,d-=x,d===0){M=!0;break}}if(r[S++]=o[m++],--p===1){M=!0;break}w--}while(b>=Nn||x>=Nn);if(M)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),p===1){for(y=0;y<d;y++)r[S+y]=r[_+y];r[S+d]=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,g,d){var y=0;for(y=0;y<d;y++)o[y]=r[g+y];var m=v+p-1,_=d-1,S=g+d-1,w=0,b=0;if(r[S--]=r[m--],--p===0){for(w=S-(d-1),y=0;y<d;y++)r[w+y]=o[y];return}if(d===1){for(S-=p,m-=p,b=S+1,w=m+1,y=p-1;y>=0;y--)r[b+y]=r[w+y];r[S]=o[_];return}for(var x=e;;){var M=0,C=0,T=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],M++,C=0,--p===0){T=!0;break}}else if(r[S--]=o[_--],C++,M=0,--d===1){T=!0;break}while((M|C)<x);if(T)break;do{if(M=p-Vl(o[_],r,v,p,p-1,t),M!==0){for(S-=M,m-=M,p-=M,b=S+1,w=m+1,y=M-1;y>=0;y--)r[b+y]=r[w+y];if(p===0){T=!0;break}}if(r[S--]=o[_--],--d===1){T=!0;break}if(C=d-zl(r[m],o,0,d,d-1,t),C!==0){for(S-=C,_-=C,d-=C,b=S+1,w=_+1,y=0;y<C;y++)r[b+y]=o[w+y];if(d<=1){T=!0;break}}if(r[S--]=r[m--],--p===0){T=!0;break}x--}while(M>=Nn||C>=Nn);if(T)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),d===1){for(S-=p,m-=p,b=S+1,w=m+1,y=p-1;y>=0;y--)r[b+y]=r[w+y];r[S]=o[_]}else{if(d===0)throw new Error;for(w=S-(d-1),y=0;y<d;y++)r[w+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function qo(r,t,e,i){e||(e=0),i||(i=r.length);var n=i-e;if(!(n<2)){var a=0;if(n<jy){a=yc(r,e,i,t),mc(r,e,i,e+a,t);return}var o=_b(r,t),s=yb(n);do{if(a=yc(r,e,i,t),a<s){var l=n;l>s&&(l=s),mc(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var qe=1,Ko=2,na=4,_c=!1;function Fl(){_c||(_c=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Sc(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var Sb=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Sc}return r.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return(t||!i.length)&&this.updateDisplayList(e),i},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,qo(i,Sc)},r.prototype._updateAndAddDisplayable=function(t,e,i){if(!(t.ignore&&!i)){t.beforeUpdate(),t.update(),t.afterUpdate();var n=t.getClipPath();if(t.ignoreClip)e=null;else if(n){e?e=e.slice():e=[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=qe),this._updateAndAddDisplayable(u,e,i)}t.__dirty=0}else{var f=t;e&&e.length?f.__clipPaths=e:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(Fl(),f.z=0),isNaN(f.z2)&&(Fl(),f.z2=0),isNaN(f.zlevel)&&(Fl(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,i);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,i);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,i)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);return}var n=ot(this._roots,t);n>=0&&this._roots.splice(n,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}(),vs;vs=Q.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var pa={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?.5*r*r:-.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?.5*r*r*r:.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?.5*r*r*r*r:-.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?.5*r*r*r*r*r:.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 .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?.5*Math.pow(1024,r-1):.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?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-pa.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+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?pa.bounceIn(r*2)*.5:pa.bounceOut(r*2-1)*.5+.5}},to=Math.pow,Or=Math.sqrt,tm=1e-8,em=1e-4,bc=Or(3),eo=1/3,Ue=Tn(),de=Tn(),cn=Tn();function Lr(r){return r>-1e-8&&r<tm}function rm(r){return r>tm||r<-1e-8}function Et(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function wc(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function cs(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Lr(f)&&Lr(h))if(Lr(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[v++]=p)}else{var g=h*h-4*f*c;if(Lr(g)){var d=h/f,p=-s/o+d,y=-d/2;p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y)}else if(g>0){var m=Or(g),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-to(-_,eo):_=to(_,eo),S<0?S=-to(-S,eo):S=to(S,eo);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(a[v++]=p)}else{var w=(2*f*s-3*o*h)/(2*Or(f*f*f)),b=Math.acos(w)/3,x=Or(f),M=Math.cos(b),p=(-s-2*x*M)/(3*o),y=(-s+x*(M+bc*Math.sin(b)))/(3*o),C=(-s+x*(M-bc*Math.sin(b)))/(3*o);p>=0&&p<=1&&(a[v++]=p),y>=0&&y<=1&&(a[v++]=y),C>=0&&C<=1&&(a[v++]=C)}}return v}function im(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(Lr(o)){if(rm(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var f=a*a-4*o*s;if(Lr(f))n[0]=-a/(2*o);else if(f>0){var h=Or(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function ps(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=i}function bb(r,t,e,i,n,a,o,s,l,u,f){var h,c=.005,v=1/0,p,g,d,y;Ue[0]=l,Ue[1]=u;for(var m=0;m<1;m+=.05)de[0]=Et(r,e,n,o,m),de[1]=Et(t,i,a,s,m),d=fn(Ue,de),d<v&&(h=m,v=d);v=1/0;for(var _=0;_<32&&!(c<em);_++)p=h-c,g=h+c,de[0]=Et(r,e,n,o,p),de[1]=Et(t,i,a,s,p),d=fn(de,Ue),p>=0&&d<v?(h=p,v=d):(cn[0]=Et(r,e,n,o,g),cn[1]=Et(t,i,a,s,g),y=fn(cn,Ue),g<=1&&y<v?(h=g,v=y):c*=.5);return Or(v)}function wb(r,t,e,i,n,a,o,s,l){for(var u=r,f=t,h=0,c=1/l,v=1;v<=l;v++){var p=v*c,g=Et(r,e,n,o,p),d=Et(t,i,a,s,p),y=g-u,m=d-f;h+=Math.sqrt(y*y+m*m),u=g,f=d}return h}function Qt(r,t,e,i){var n=1-i;return n*(n*r+2*i*t)+i*i*e}function xc(r,t,e,i){return 2*((1-i)*(t-r)+i*(e-t))}function xb(r,t,e,i,n){var a=r-2*t+e,o=2*(t-r),s=r-i,l=0;if(Lr(a)){if(rm(o)){var u=-s/o;u>=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*a*s;if(Lr(f)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=Or(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function nm(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function ds(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function Tb(r,t,e,i,n,a,o,s,l){var u,f=.005,h=1/0;Ue[0]=o,Ue[1]=s;for(var c=0;c<1;c+=.05){de[0]=Qt(r,e,n,c),de[1]=Qt(t,i,a,c);var v=fn(Ue,de);v<h&&(u=c,h=v)}h=1/0;for(var p=0;p<32&&!(f<em);p++){var g=u-f,d=u+f;de[0]=Qt(r,e,n,g),de[1]=Qt(t,i,a,g);var v=fn(de,Ue);if(g>=0&&v<h)u=g,h=v;else{cn[0]=Qt(r,e,n,d),cn[1]=Qt(t,i,a,d);var y=fn(cn,Ue);d<=1&&y<h?(u=d,h=y):f*=.5}}return Or(h)}function Mb(r,t,e,i,n,a,o){for(var s=r,l=t,u=0,f=1/o,h=1;h<=o;h++){var c=h*f,v=Qt(r,e,n,c),p=Qt(t,i,a,c),g=v-s,d=p-l;u+=Math.sqrt(g*g+d*d),s=v,l=p}return u}var Cb=/cubic-bezier\(([0-9,\.e ]+)\)/;function am(r){var t=r&&Cb.exec(r);if(t){var e=t[1].split(","),i=+Ze(e[0]),n=+Ze(e[1]),a=+Ze(e[2]),o=+Ze(e[3]);if(isNaN(i+n+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:cs(0,i,a,1,l,s)&&Et(0,n,o,1,s[0])}}}var Ab=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Vt,this.ondestroy=t.ondestroy||Vt,this.onrestart=t.onrestart||Vt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-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(t){this.easing=t,this.easingFunc=$(t)?t:pa[t]||am(t)},r}(),om=function(){function r(t){this.value=t}return r}(),Db=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new om(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),Ga=function(){function r(t){this._list=new Db,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new om(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),Tc={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 Pe(r){return r=Math.round(r),r<0?0:r>255?255:r}function Lb(r){return r=Math.round(r),r<0?0:r>360?360:r}function Ca(r){return r<0?0:r>1?1:r}function Hl(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Pe(parseFloat(t)/100*255):Pe(parseInt(t,10))}function gi(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ca(parseFloat(t)/100):Ca(parseFloat(t))}function Gl(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function Ir(r,t,e){return r+(t-r)*e}function he(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function Af(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var sm=new Ga(20),ro=null;function Fi(r,t){ro&&Af(ro,t),ro=sm.put(r,ro||t.slice())}function Se(r,t){if(r){t=t||[];var e=sm.get(r);if(e)return Af(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in Tc)return Af(t,Tc[i]),Fi(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){he(t,0,0,0,1);return}return he(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Fi(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){he(t,0,0,0,1);return}return he(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Fi(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?he(t,+u[0],+u[1],+u[2],1):he(t,0,0,0,1);f=gi(u.pop());case"rgb":if(u.length>=3)return he(t,Hl(u[0]),Hl(u[1]),Hl(u[2]),u.length===3?f:gi(u[3])),Fi(r,t),t;he(t,0,0,0,1);return;case"hsla":if(u.length!==4){he(t,0,0,0,1);return}return u[3]=gi(u[3]),Df(u,t),Fi(r,t),t;case"hsl":if(u.length!==3){he(t,0,0,0,1);return}return Df(u,t),Fi(r,t),t;default:return}}he(t,0,0,0,1)}}function Df(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=gi(r[1]),n=gi(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],he(t,Pe(Gl(o,a,e+1/3)*255),Pe(Gl(o,a,e)*255),Pe(Gl(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function Ib(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var f=((a-t)/6+o/2)/o,h=((a-e)/6+o/2)/o,c=((a-i)/6+o/2)/o;t===a?l=c-h:e===a?l=1/3+f-c:i===a&&(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 Mc(r,t){var e=Se(r);if(e){for(var i=0;i<3;i++)e[i]=e[i]*(1-t)|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return hr(e,e.length===4?"rgba":"rgb")}}function Wl(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=t[n],s=t[a],l=i-n;return e[0]=Pe(Ir(o[0],s[0],l)),e[1]=Pe(Ir(o[1],s[1],l)),e[2]=Pe(Ir(o[2],s[2],l)),e[3]=Ca(Ir(o[3],s[3],l)),e}}function Pb(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Se(t[n]),s=Se(t[a]),l=i-n,u=hr([Pe(Ir(o[0],s[0],l)),Pe(Ir(o[1],s[1],l)),Pe(Ir(o[2],s[2],l)),Ca(Ir(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function Ul(r,t,e,i){var n=Se(r);if(r)return n=Ib(n),t!=null&&(n[0]=Lb(t)),e!=null&&(n[1]=gi(e)),i!=null&&(n[2]=gi(i)),hr(Df(n),"rgba")}function Lf(r,t){var e=Se(r);if(e&&t!=null)return e[3]=Ca(t),hr(e,"rgba")}function hr(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function gs(r,t){var e=Se(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var Cc=new Ga(100);function Ac(r){if(W(r)){var t=Cc.get(r);return t||(t=Mc(r,-.1),Cc.put(r,t)),t}else if(qs(r)){var e=B({},r);return e.colorStops=H(r.colorStops,function(i){return{offset:i.offset,color:Mc(i.color,-.1)}}),e}return r}function Rb(r){return r.type==="linear"}function Eb(r){return r.type==="radial"}(function(){return Q.hasGlobalWindow&&$(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var If=Array.prototype.slice;function sr(r,t,e){return(t-r)*e+r}function Yl(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=sr(t[a],e[a],i);return r}function kb(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=sr(t[o][s],e[o][s],i)}return r}function io(r,t,e,i){for(var n=t.length,a=0;a<n;a++)r[a]=t[a]+e[a]*i;return r}function Dc(r,t,e,i){for(var n=t.length,a=n&&t[0].length,o=0;o<n;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*i}return r}function Ob(r,t){for(var e=r.length,i=t.length,n=e>i?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,i);s++)n.push({offset:o.offset,color:o.color.slice()})}function Nb(r,t,e){var i=r,n=t;if(!(!i.push||!n.push)){var a=i.length,o=n.length;if(a!==o){var s=a>o;if(s)i.length=o;else for(var l=a;l<o;l++)i.push(e===1?n[l]:If.call(n[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(e===1)isNaN(i[l])&&(i[l]=n[l]);else for(var f=0;f<u;f++)isNaN(i[l][f])&&(i[l][f]=n[l][f])}}function Qo(r){if(te(r)){var t=r.length;if(te(r[0])){for(var e=[],i=0;i<t;i++)e.push(If.call(r[i]));return e}return If.call(r)}return r}function Jo(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 Bb(r){return te(r&&r[0])?2:1}var no=0,jo=1,lm=2,aa=3,Pf=4,Rf=5,Lc=6;function Ic(r){return r===Pf||r===Rf}function ao(r){return r===jo||r===lm}var Bn=[0,0,0,0],zb=function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}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(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=Lc,l=e;if(te(e)){var u=Bb(e);s=u,(u===1&&!yt(e[0])||u===2&&!yt(e[0][0]))&&(o=!0)}else if(yt(e)&&!hs(e))s=no;else if(W(e))if(!isNaN(+e))s=no;else{var f=Se(e);f&&(l=f,s=aa)}else if(qs(e)){var h=B({},l);h.colorStops=H(e.colorStops,function(v){return{offset:v.offset,color:Se(v.color)}}),Rb(e)?s=Pf:Eb(e)&&(s=Rf),l=h}a===0?this.valType=s:(s!==this.valType||s===Lc)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return i&&(c.easing=i,c.easingFunc=$(i)?i:pa[i]||am(i)),n.push(c),c},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(g,d){return g.time-d.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=ao(n),u=Ic(n),f=0;f<a;f++){var h=i[f],c=h.value,v=o.value;h.percent=h.time/t,s||(l&&f!==a-1?Nb(c,v,n):u&&Ob(c.colorStops,v.colorStops))}if(!s&&n!==Rf&&e&&this.needsAnimate()&&e.needsAnimate()&&n===e.valType&&!e._finished){this._additiveTrack=e;for(var p=i[0].value,f=0;f<a;f++)n===no?i[f].additiveValue=i[f].value-p:n===aa?i[f].additiveValue=io([],i[f].value,p,-1):ao(n)&&(i[f].additiveValue=n===jo?io([],i[f].value,p,-1):Dc([],i[f].value,p,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,n=i?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===aa,f,h=this._lastFr,c=Math.min,v,p;if(s===1)v=p=o[0];else{if(e<0)f=0;else if(e<this._lastFrP){var g=c(h+1,s-1);for(f=g;f>=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;f<s&&!(o[f].percent>e);f++);f=c(f-1,s-2)}p=o[f+1],v=o[f]}if(v&&p){this._lastFr=f,this._lastFrP=e;var d=p.percent-v.percent,y=d===0?1:c((e-v.percent)/d,1);p.easingFunc&&(y=p.easingFunc(y));var m=i?this._additiveValue:u?Bn:t[l];if((ao(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?v.rawValue:p.rawValue;else if(ao(a))a===jo?Yl(m,v[n],p[n],y):kb(m,v[n],p[n],y);else if(Ic(a)){var _=v[n],S=p[n],w=a===Pf;t[l]={type:w?"linear":"radial",x:sr(_.x,S.x,y),y:sr(_.y,S.y,y),colorStops:H(_.colorStops,function(x,M){var C=S.colorStops[M];return{offset:sr(x.offset,C.offset,y),color:Jo(Yl([],x.color,C.color,y))}}),global:S.global},w?(t[l].x2=sr(_.x2,S.x2,y),t[l].y2=sr(_.y2,S.y2,y)):t[l].r=sr(_.r,S.r,y)}else if(u)Yl(m,v[n],p[n],y),i||(t[l]=Jo(m));else{var b=sr(v[n],p[n],y);i?this._additiveValue=b:t[l]=b}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===no?t[i]=t[i]+n:e===aa?(Se(t[i],Bn),io(Bn,Bn,n,1),t[i]=Jo(Bn)):e===jo?io(t[i],t[i],n,1):e===lm&&Dc(t[i],t[i],n,1)},r}(),Yh=function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){zh("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}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(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,bt(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o<i.length;o++){var s=i[o],l=a[s];if(!l){l=a[s]=new zb(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===aa&&u&&(u=Jo(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Qo(u),n),this._trackKeys.push(s)}l.addKeyframe(t,Qo(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),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(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i<e;i++)t[i].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var i=0;i<e.length;i++)e[i].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var n=0;n<i.length;n++){var a=i[n].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,f=u.length;if(s.prepare(n,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[f-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var c=new Ab({life:n,loop:this._loop,delay:this._delay||0,onframe:function(v){e._started=2;var p=e._additiveAnimators;if(p){for(var g=!1,d=0;d<p.length;d++)if(p[d]._clip){g=!0;break}g||(e._additiveAnimators=null)}for(var d=0;d<i.length;d++)i[d].step(e._target,v);var y=e._onframeCbs;if(y)for(var d=0;d<y.length;d++)y[d](e._target,v)},ondestroy:function(){e._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),t&&c.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return H(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,n=this._trackKeys,a=0;a<t.length;a++){var o=i[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<n.length;a++)if(!i[n[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var a=e[n],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[i?0:s.length-1];l&&(t[a]=Qo(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||bt(t);for(var i=0;i<e.length;i++){var n=e[i],a=this._tracks[n];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function sn(){return new Date().getTime()}var Vb=function(r){O(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=sn()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(vs(i),!e._paused&&e.update())}vs(i)},t.prototype.start=function(){this._running||(this._time=sn(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=sn(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=sn()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new Yh(e,i.loop);return this.addAnimator(n),n},t}(we),Fb=300,Zl=Q.domSupported,Xl=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=H(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}}(),Pc={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Rc=!1;function Ef(r){var t=r.pointerType;return t==="pen"||t==="touch"}function Hb(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 $l(r){r&&(r.zrByTouch=!0)}function Gb(r,t){return ve(r.dom,new Wb(r,t),!0)}function um(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var Wb=function(){function r(t,e){this.stopPropagation=Vt,this.stopImmediatePropagation=Vt,this.preventDefault=Vt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),Ae={mousedown:function(r){r=ve(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ve(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=ve(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ve(this.dom,r);var t=r.toElement||r.relatedTarget;um(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Rc=!0,r=ve(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Rc||(r=ve(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ve(this.dom,r),$l(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ae.mousemove.call(this,r),Ae.mousedown.call(this,r)},touchmove:function(r){r=ve(this.dom,r),$l(r),this.handler.processGesture(r,"change"),Ae.mousemove.call(this,r)},touchend:function(r){r=ve(this.dom,r),$l(r),this.handler.processGesture(r,"end"),Ae.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<Fb&&Ae.click.call(this,r)},pointerdown:function(r){Ae.mousedown.call(this,r)},pointermove:function(r){Ef(r)||Ae.mousemove.call(this,r)},pointerup:function(r){Ae.mouseup.call(this,r)},pointerout:function(r){Ef(r)||Ae.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Ae[r]=function(t){t=ve(this.dom,t),this.trigger(r,t)}});var kf={pointermove:function(r){Ef(r)||kf.mousemove.call(this,r)},pointerup:function(r){kf.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function Ub(r,t){var e=t.domHandlers;Q.pointerEventsSupported?A(Xl.pointer,function(i){ts(t,i,function(n){e[i].call(r,n)})}):(Q.touchEventsSupported&&A(Xl.touch,function(i){ts(t,i,function(n){e[i].call(r,n),Hb(t)})}),A(Xl.mouse,function(i){ts(t,i,function(n){n=Hh(n),t.touching||e[i].call(r,n)})}))}function Yb(r,t){Q.pointerEventsSupported?A(Pc.pointer,e):Q.touchEventsSupported||A(Pc.mouse,e);function e(i){function n(a){a=Hh(a),um(r,a.target)||(a=Gb(r,a),t.domHandlers[i].call(r,a))}ts(t,i,n,{capture:!0})}}function ts(r,t,e,i){r.mounted[t]=e,r.listenerOpts[t]=i,Mf(r.domTarget,t,e,i)}function ql(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&sb(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var Ec=function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r}(),Zb=function(r){O(t,r);function t(e,i){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=i,n._localHandlerScope=new Ec(e,Ae),Zl&&(n._globalHandlerScope=new Ec(document,kf)),Ub(n,n._localHandlerScope),n}return t.prototype.dispose=function(){ql(this._localHandlerScope),Zl&&ql(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Zl&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?Yb(this,i):ql(i)}},t}(we),fm=1;Q.hasGlobalWindow&&(fm=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ys=fm,Of=.4,Nf="#333",Bf="#ccc",Xb="#eee",kc=Gh,$b=5e-5;function Xr(r){return r>$b||r<-5e-5}var $r=[],Hi=[],Kl=hn(),Ql=Math.abs,Zh=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Xr(this.rotation)||Xr(this.x)||Xr(this.y)||Xr(this.scaleX-1)||Xr(this.scaleY-1)||Xr(this.skewX)||Xr(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(kc(i),this.invTransform=null);return}i=i||hn(),e?this.getLocalTransform(i):kc(i),t&&(e?vn(i,t,i):fb(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale($r);var i=$r[0]<0?-1:1,n=$r[1]<0?-1:1,a=(($r[0]-i)*e+i)/$r[0]||0,o=(($r[1]-n)*e+n)/$r[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||hn(),Uh(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||hn(),vn(Hi,t.invTransform,e),e=Hi);var i=this.originX,n=this.originY;(i||n)&&(Kl[4]=i,Kl[5]=n,vn(Hi,e,Kl),Hi[4]-=i,Hi[5]-=n,e=Hi),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_e(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_e(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&Ql(t[0]-1)>1e-10&&Ql(t[3]-1)>1e-10?Math.sqrt(Ql(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){qb(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var p=i+s,g=n+l;e[4]=-p*a-c*g*o,e[5]=-g*o-v*p*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,u&&Wh(e,e,u),e[4]+=i+f,e[5]+=n+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),Aa=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function qb(r,t){for(var e=0;e<Aa.length;e++){var i=Aa[e];r[i]=t[i]}}var Oc={};function se(r,t){t=t||xi;var e=Oc[t];e||(e=Oc[t]=new Ga(500));var i=e.get(r);return i==null&&(i=xn.measureText(r,t).width,e.put(r,i)),i}function Nc(r,t,e,i){var n=se(r,t),a=Xh(t),o=oa(0,n,e),s=rn(0,a,i),l=new ft(o,s,n,a);return l}function Qs(r,t,e,i){var n=((r||"")+"").split(`
`),a=n.length;if(a===1)return Nc(n[0],t,e,i);for(var o=new ft(0,0,0,0),s=0;s<n.length;s++){var l=Nc(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function oa(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function rn(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Xh(r){return se("国",r)}function Ke(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function ms(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(i instanceof Array)l+=Ke(i[0],e.width),u+=Ke(i[1],e.height),f=null,h=null;else switch(i){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=a-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Jl="__zr_normal__",jl=Aa.concat(["ignore"]),Kb=Fr(Aa,function(r,t){return r[t]=!0,r},{ignore:!1}),Gi={},Qb=new ft(0,0,0,0),Js=function(){function r(t){this.id=Wy(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,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(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(e),i.position!=null){var f=Qb;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Gi,i,f):ms(Gi,i,f),a.x=Gi.x,a.y=Gi.y,o=Gi.align,s=Gi.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=Ke(h[0],f.width),v=Ke(h[1],f.height)),u=!0,a.originX=-a.x+c+(n?0:f.x),a.originY=-a.y+v+(n?0:f.y)}}i.rotation!=null&&(a.rotation=i.rotation);var p=i.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,d=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;g&&this.canBeInsideText()?(y=i.insideFill,m=i.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=i.outsideFill,m=i.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==d.fill||m!==d.stroke||_!==d.autoStroke||o!==d.align||s!==d.verticalAlign)&&(l=!0,d.fill=y,d.stroke=m,d.autoStroke=_,d.align=o,d.verticalAlign=s,e.setDefaultTextStyle(d)),e.__dirty|=qe,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Bf:Nf},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Se(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,hr(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(Y(t))for(var i=t,n=bt(i),a=0;a<n.length;a++){var o=n[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var n=this.animators[i],a=n.__fromStateTransition;if(!(n.getLoop()||a&&a!==Jl)){var o=n.targetName,s=o?e[o]:e;n.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,jl)},r.prototype._savePrimaryToNormal=function(t,e,i){for(var n=0;n<i.length;n++){var a=i[n];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Jl,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===Jl,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ot(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){zh("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,f),c&&c.useState(t,e,i,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],f=void 0;this.stateProxy&&(f=this.stateProxy(u,t)),f||(f=this.states[u]),f&&n.push(f)}var h=n[o-1],c=!!(h&&h.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(n),p=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(t.join(","),v,this._normalState,!1,!e&&!this.__inHover&&p&&p.duration>0,p);var g=this._textContent,d=this._textGuide;g&&g.useStates(t,e,c),d&&d.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=ot(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=ot(n,t),o=ot(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n<t.length;n++){var a=t[n];B(e,a),a.textConfig&&(i=i||{},B(i,a.textConfig))}return i&&(e.textConfig=i),e},r.prototype._applyStateObj=function(t,e,i,n,a,o){var s=!(e&&n);e&&e.textConfig?(this.textConfig=B({},n?this.textConfig:i.textConfig),B(this.textConfig,e.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,f=0;f<jl.length;f++){var h=jl[f],c=a&&Kb[h];e&&e[h]!=null?c?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&i[h]!=null&&(c?(u=!0,l[h]=i[h]):this[h]=i[h])}if(!a)for(var f=0;f<this.animators.length;f++){var v=this.animators[f],p=v.targetName;v.getLoop()||v.__changeFinalValue(p?(e||i)[p]:e||i)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(!(t.__zr&&!t.__hostTarget)&&t!==this){var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this}},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new Zh,this._attachComponent(t),this._textContent=t,this.markRedraw())},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),B(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=qe;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,i){var n=t?this[t]:this,a=new Yh(n,e,i);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var i=this.__zr,n=this;t.during(function(){n.updateDuringAnimation(e)}).done(function(){var a=n.animators,o=ot(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o<n;o++){var s=i[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,i){tu(this,t,e,i)},r.prototype.animateFrom=function(t,e,i){tu(this,t,e,i,!0)},r.prototype._transitionState=function(t,e,i,n){for(var a=tu(this,e,i,n),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=qe;function e(i,n,a,o){Object.defineProperty(t,i,{get:function(){if(!this[n]){var l=this[n]=[];s(this,l)}return this[n]},set:function(l){this[a]=l[0],this[o]=l[1],this[n]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(f){l[a]=f}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(f){l[o]=f}})}}Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),r}();Oe(Js,we);Oe(Js,Zh);function tu(r,t,e,i,n){e=e||{};var a=[];hm(r,"",r,t,e,i,a,n);var o=a.length,s=!1,l=e.done,u=e.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(),a.length>0&&e.during&&a[0].during(function(p,g){e.during(g)});for(var c=0;c<a.length;c++){var v=a[c];f&&v.done(f),h&&v.aborted(h),e.force&&v.duration(e.duration),v.start(e.easing)}return a}function eu(r,t,e){for(var i=0;i<e;i++)r[i]=t[i]}function Jb(r){return te(r[0])}function jb(r,t,e){if(te(t[e]))if(te(r[e])||(r[e]=[]),ee(t[e])){var i=t[e].length;r[e].length!==i&&(r[e]=new t[e].constructor(i),eu(r[e],t[e],i))}else{var n=t[e],a=r[e],o=n.length;if(Jb(n))for(var s=n[0].length,l=0;l<o;l++)a[l]?eu(a[l],n[l],s):a[l]=Array.prototype.slice.call(n[l]);else eu(a,n,o);a.length=n.length}else r[e]=t[e]}function tw(r,t){return r===t||te(r)&&te(t)&&ew(r,t)}function ew(r,t){var e=r.length;if(e!==t.length)return!1;for(var i=0;i<e;i++)if(r[i]!==t[i])return!1;return!0}function hm(r,t,e,i,n,a,o,s){for(var l=bt(i),u=n.duration,f=n.delay,h=n.additive,c=n.setToFinal,v=!Y(a),p=r.animators,g=[],d=0;d<l.length;d++){var y=l[d],m=i[y];if(m!=null&&e[y]!=null&&(v||a[y]))if(Y(m)&&!te(m)&&!qs(m)){if(t){s||(e[y]=m,r.updateDuringAnimation(t));continue}hm(r,y,e[y],m,n,a&&a[y],o,s)}else g.push(y);else s||(e[y]=m,r.updateDuringAnimation(t),g.push(y))}var _=g.length;if(!h&&_)for(var S=0;S<p.length;S++){var w=p[S];if(w.targetName===t){var b=w.stopTracks(g);if(b){var x=ot(p,w);p.splice(x,1)}}}if(n.force||(g=Lt(g,function(D){return!tw(i[D],e[D])}),_=g.length),_>0||n.force&&!o.length){var M=void 0,C=void 0,T=void 0;if(s){C={},c&&(M={});for(var S=0;S<_;S++){var y=g[S];C[y]=e[y],c?M[y]=i[y]:e[y]=i[y]}}else if(c){T={};for(var S=0;S<_;S++){var y=g[S];T[y]=Qo(e[y]),jb(e,i,y)}}var w=new Yh(e,!1,!1,h?Lt(p,function(L){return L.targetName===t}):null);w.targetName=t,n.scope&&(w.scope=n.scope),c&&M&&w.whenWithKeys(0,M,g),T&&w.whenWithKeys(0,T,g),w.whenWithKeys(u??500,s?C:i,g).delay(f||0),r.addAnimator(w,t),o.push(w)}}var ht=function(r){O(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,n=0;n<i.length;n++)if(i[n].name===e)return i[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,i){if(e&&e!==this&&e.parent!==this&&i&&i.parent===this){var n=this._children,a=n.indexOf(i);a>=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=ot(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=ot(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n<e.length;n++){var a=e[n];i&&a.removeSelfFromZr(i),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,i){for(var n=this._children,a=0;a<n.length;a++){var o=n[a];e.call(i,o,a)}return this},t.prototype.traverse=function(e,i){for(var n=0;n<this._children.length;n++){var a=this._children[n],o=e.call(i,a);a.isGroup&&!o&&a.traverse(e,i)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++){var n=this._children[i];n.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var i=new ft(0,0,0,0),n=e||this._children,a=[],o=null,s=0;s<n.length;s++){var l=n[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(a);f?(ft.applyTransform(i,u,f),o=o||i.clone(),o.union(i)):(o=o||u.clone(),o.union(u))}}return o||i},t}(Js);ht.prototype.type="group";/*!
* 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 es={},vm={};function rw(r){delete vm[r]}function iw(r){if(!r)return!1;if(typeof r=="string")return gs(r,1)<Of;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=gs(t[n].color,1);return e/=i,e<Of}return!1}var nw=function(){function r(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var a=new Sb,o=i.renderer||"canvas";es[o]||(o=bt(es)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new es[o](e,a,i,t),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Q.node&&!Q.worker&&!l?new Zb(s.getViewportRoot(),s.root):null,f=i.useCoarsePointer,h=f==null||f==="auto"?Q.touchEventsSupported:!!f,c=44,v;h&&(v=et(i.pointerSize,c)),this.handler=new Qy(a,s,u,s.root,v),this.animation=new Vb({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=iw(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,i=sn();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=sn();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof ht&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,rw(this.id))},r}();function Bc(r,t){var e=new nw(Wy(),r,t);return vm[e.id]=e,e}function aw(r,t){es[r]=t}var ow=1e-4,cm=20;function sw(r){return r.replace(/^\s+|\s+$/g,"")}function pt(r,t,e,i){var n=t[0],a=t[1],o=e[0],s=e[1],l=a-n,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(i)if(l>0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}function q(r,t){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)?sw(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Tt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),cm),r=(+r).toFixed(t),e?r:+r}function lr(r){return r.sort(function(t,e){return t-e}),r}function Xe(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return lw(r)}function lw(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function pm(r,t){var e=Math.log,i=Math.LN10,n=Math.floor(e(r[1]-r[0])/i),a=Math.round(e(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function uw(r,t){var e=Fr(r,function(v,p){return v+(isNaN(p)?0:p)},0);if(e===0)return[];for(var i=Math.pow(10,t),n=H(r,function(v){return(isNaN(v)?0:v)/e*i*100}),a=i*100,o=H(n,function(v){return Math.floor(v)}),s=Fr(o,function(v,p){return v+p},0),l=H(n,function(v,p){return v-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,f=null,h=0,c=l.length;h<c;++h)l[h]>u&&(u=l[h],f=h);++o[f],l[f]=0,++s}return H(o,function(v){return v/i})}function fw(r,t){var e=Math.max(Xe(r),Xe(t)),i=r+t;return e>cm?i:Tt(i,e)}function dm(r){var t=Math.PI*2;return(r%t+t)%t}function _s(r){return r>-1e-4&&r<ow}var hw=/^(?:(\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 pr(r){if(r instanceof Date)return r;if(W(r)){var t=hw.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function vw(r){return Math.pow(10,$h(r))}function $h(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function gm(r,t){var e=$h(r),i=Math.pow(10,e),n=r/i,a;return n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10,r=a*i,e>=-20?+r.toFixed(e<0?-e:0):r}function zc(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i<r.length;){for(var n=r[i].interval,a=r[i].close,o=0;o<2;o++)n[o]<=t&&(n[o]=t,a[o]=o?1:1-e),t=n[o],e=a[o];n[0]===n[1]&&a[0]*a[1]!==1?r.splice(i,1):i++}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 Ss(r){var t=parseFloat(r);return t==r&&(t!==0||!W(r)||r.indexOf("x")<=0)?t:NaN}function cw(r){return!isNaN(Ss(r))}function ym(){return Math.round(Math.random()*9)}function mm(r,t){return t===0?r:mm(t,r%t)}function Vc(r,t){return r==null?t:t==null?r:r*t/mm(r,t)}function Jt(r){throw new Error(r)}function Fc(r,t,e){return(t-r)*e+r}var _m="series\0",Sm="\0_ec_\0";function Ot(r){return r instanceof Array?r:r==null?[]:[r]}function bs(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i<n;i++){var a=e[i];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var Hc=["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 Wa(r){return Y(r)&&!V(r)&&!(r instanceof Date)?r.value:r}function pw(r){return Y(r)&&!(r instanceof Array)}function dw(r,t,e){var i=e==="normalMerge",n=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=K();A(t,function(l,u){if(!Y(l)){t[u]=null;return}});var s=gw(r,o,e);return(i||n)&&yw(s,r,o,t),i&&mw(s,t),i||n?_w(s,t,n):a&&Sw(s,t),bw(s),s}function gw(r,t,e){var i=[];if(e==="replaceAll")return i;for(var n=0;n<r.length;n++){var a=r[n];a&&a.id!=null&&t.set(a.id,n),i.push({existing:e==="replaceMerge"||Da(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return i}function yw(r,t,e,i){A(i,function(n,a){if(!(!n||n.id==null)){var o=da(n.id),s=e.get(o);if(s!=null){var l=r[s];Ee(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=n,l.existing=t[s],i[a]=null}}})}function mw(r,t){A(t,function(e,i){if(!(!e||e.name==null))for(var n=0;n<r.length;n++){var a=r[n].existing;if(!r[n].newOption&&a&&(a.id==null||e.id==null)&&!Da(e)&&!Da(a)&&bm("name",a,e)){r[n].newOption=e,t[i]=null;return}}})}function _w(r,t,e){A(t,function(i){if(i){for(var n,a=0;(n=r[a])&&(n.newOption||Da(n.existing)||n.existing&&i.id!=null&&!bm("id",i,n.existing));)a++;n?(n.newOption=i,n.brandNew=e):r.push({newOption:i,brandNew:e,existing:null,keyInfo:null}),a++}})}function Sw(r,t){A(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function bw(r){var t=K();A(r,function(e){var i=e.existing;i&&t.set(i.id,e)}),A(r,function(e){var i=e.newOption;Ee(!i||i.id==null||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})}),A(r,function(e,i){var n=e.existing,a=e.newOption,o=e.keyInfo;if(Y(a)){if(o.name=a.name!=null?da(a.name):n?n.name:_m+i,n)o.id=da(n.id);else if(a.id!=null)o.id=da(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function bm(r,t,e){var i=Re(t[r],null),n=Re(e[r],null);return i!=null&&n!=null&&i===n}function da(r){return Re(r,"")}function Re(r,t){return r==null?t:W(r)?r:yt(r)||mf(r)?r+"":t}function qh(r){var t=r.name;return!!(t&&t.indexOf(_m))}function Da(r){return r&&r.id!=null&&da(r.id).indexOf(Sm)===0}function ww(r){return Sm+r}function xw(r,t,e){A(r,function(i){var n=i.newOption;Y(n)&&(i.keyInfo.mainType=t,i.keyInfo.subType=Tw(t,n,i.existing,e))})}function Tw(r,t,e,i){var n=t.type?t.type:e?e.subType:i.determineSubType(r,t);return n}function Mw(r,t){var e={},i={};return n(r||[],e),n(t||[],i,e),[a(e),a(i)];function n(o,s,l){for(var u=0,f=o.length;u<f;u++){var h=Re(o[u].seriesId,null);if(h==null)return;for(var c=Ot(o[u].dataIndex),v=l&&l[h],p=0,g=c.length;p<g;p++){var d=c[p];v&&v[d]?v[d]=null:(s[h]||(s[h]={}))[d]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var f=a(o[u],!0);f.length&&l.push({seriesId:u,dataIndex:f})}return l}}function Ti(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return V(t.dataIndex)?H(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return V(t.name)?H(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function _t(){var r="__ec_inner_"+Cw++;return function(t){return t[r]||(t[r]={})}}var Cw=ym();function ga(r,t,e){var i=Kh(t,e),n=i.mainTypeSpecified,a=i.queryOptionMap,o=i.others,s=o,l=e?e.defaultMainType:null;return!n&&l&&a.set(l,{}),a.each(function(u,f){var h=Ua(r,f,u,{useDefault:l===f,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[f+"Models"]=h.models,s[f+"Model"]=h.models[0]}),s}function Kh(r,t){var e;if(W(r)){var i={};i[r+"Index"]=0,e=i}else e=r;var n=K(),a={},o=!1;return A(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],h=(u[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&ot(t.includeMainTypes,f)<0)){o=o||!!f;var c=n.get(f)||n.set(f,{});c[h]=s}}),{mainTypeSpecified:o,queryOptionMap:n,others:a}}var Yt={useDefault:!0,enableAll:!1,enableNone:!1},Aw={useDefault:!1,enableAll:!0,enableNone:!0};function Ua(r,t,e,i){i=i||Yt;var n=e.index,a=e.id,o=e.name,s={models:null,specified:n!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=r.getComponent(t))?[l]:[],s}return n==="none"||n===!1?(Ee(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(n==="all"&&(Ee(i.enableAll,'`"all"` is not a valid value on index option.'),n=a=o=null),s.models=r.queryComponents({mainType:t,index:n,id:a,name:o}),s)}function wm(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function Dw(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function Lw(r){return r==="auto"?Q.domSupported?"html":"richText":r||"html"}function xm(r,t,e,i,n){var a=t==null||t==="auto";if(i==null)return i;if(yt(i)){var o=Fc(e||0,i,n);return Tt(o,a?Math.max(Xe(e||0),Xe(i)):t)}else{if(W(i))return n<1?e:i;for(var s=[],l=e,u=i,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]=(n<1&&l?l:u)[h];else{var v=l&&l[h]?l[h]:0,p=u[h],o=Fc(v,p,n);s[h]=Tt(o,a?Math.max(Xe(v),Xe(p)):t)}}return s}}var Iw=".",qr="___EC__COMPONENT__CONTAINER___",Tm="___EC__EXTENDED_CLASS___";function $e(r){var t={main:"",sub:""};if(r){var e=r.split(Iw);t.main=e[0]||"",t.sub=e[1]||""}return t}function Pw(r){Ee(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function Rw(r){return!!(r&&r[Tm])}function Qh(r,t){r.$constructor=r,r.extend=function(e){var i=this,n;return Ew(i)?n=function(a){O(o,a);function o(){return a.apply(this,arguments)||this}return o}(i):(n=function(){(e.$constructor||i).apply(this,arguments)},VS(n,this)),B(n.prototype,e),n[Tm]=!0,n.extend=this.extend,n.superCall=Nw,n.superApply=Bw,n.superClass=i,n}}function Ew(r){return $(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function Mm(r,t){r.extend=t.extend}var kw=Math.round(Math.random()*10);function Ow(r){var t=["__\0is_clz",kw++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function Nw(r,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return this.superClass.prototype[t].apply(r,e)}function Bw(r,t,e){return this.superClass.prototype[t].apply(r,e)}function js(r){var t={};r.registerClass=function(i){var n=i.type||i.prototype.type;if(n){Pw(n),i.prototype.type=n;var a=$e(n);if(!a.sub)t[a.main]=i;else if(a.sub!==qr){var o=e(a);o[a.sub]=i}}return i},r.getClass=function(i,n,a){var o=t[i];if(o&&o[qr]&&(o=n?o[n]:null),a&&!o)throw new Error(n?"Component "+i+"."+(n||"")+" is used but not imported.":i+".type should be specified.");return o},r.getClassesByMainType=function(i){var n=$e(i),a=[],o=t[n.main];return o&&o[qr]?A(o,function(s,l){l!==qr&&a.push(s)}):a.push(o),a},r.hasClass=function(i){var n=$e(i);return!!t[n.main]},r.getAllClassMainTypes=function(){var i=[];return A(t,function(n,a){i.push(a)}),i},r.hasSubTypes=function(i){var n=$e(i),a=t[n.main];return a&&a[qr]};function e(i){var n=t[i.main];return(!n||!n[qr])&&(n=t[i.main]={},n[qr]=!0),n}}function La(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(i,n,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(n&&ot(n,l)>=0||a&&ot(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var zw=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Vw=La(zw),Fw=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Vw(this,t,e)},r}(),zf=new Ga(50);function Hw(r){if(typeof r=="string"){var t=zf.get(r);return t&&t.image}else return r}function Cm(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=zf.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!tl(t)&&a.pending.push(o)):(t=xn.loadImage(r,Gc,Gc),t.__zrImageSrc=r,zf.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Gc(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],i=e.cb;i&&i(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function tl(r){return r&&r.width&&r.height}var ru=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Gw(r,t,e,i,n){if(!t)return"";var a=(r+"").split(`
`);n=Am(t,e,i,n);for(var o=0,s=a.length;o<s;o++)a[o]=Dm(a[o],n);return a.join(`
`)}function Am(r,t,e,i){i=i||{};var n=B({},i);n.font=t,e=et(e,"..."),n.maxIterations=et(i.maxIterations,2);var a=n.minChar=et(i.minChar,0);n.cnCharWidth=se("国",t);var o=n.ascCharWidth=se("a",t);n.placeholder=et(i.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=se(e,t);return u>s&&(e="",u=0),s=r-u,n.ellipsis=e,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function Dm(r,t){var e=t.containerWidth,i=t.font,n=t.contentWidth;if(!e)return"";var a=se(r,i);if(a<=e)return r;for(var o=0;;o++){if(a<=n||o>=t.maxIterations){r+=t.ellipsis;break}var s=o===0?Ww(r,n,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(r.length*n/a):0;r=r.substr(0,s),a=se(r,i)}return r===""&&(r=t.placeholder),r}function Ww(r,t,e,i){for(var n=0,a=0,o=r.length;a<o&&n<t;a++){var s=r.charCodeAt(a);n+=0<=s&&s<=127?e:i}return a}function Uw(r,t){r!=null&&(r+="");var e=t.overflow,i=t.padding,n=t.font,a=e==="truncate",o=Xh(n),s=et(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",f=t.width,h;f!=null&&(e==="break"||e==="breakAll")?h=r?Lm(r,t.font,f,e==="breakAll",0).lines:[]:h=r?r.split(`
`):[];var c=h.length*s,v=et(t.height,c);if(c>v&&u){var p=Math.floor(v/s);h=h.slice(0,p)}if(r&&a&&f!=null)for(var g=Am(f,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),d=0;d<h.length;d++)h[d]=Dm(h[d],g);for(var y=v,m=0,d=0;d<h.length;d++)m=Math.max(se(h[d],n),m);f==null&&(f=m);var _=m;return i&&(y+=i[0]+i[2],_+=i[1]+i[3],f+=i[1]+i[3]),l&&(_=f),{lines:h,height:v,outerWidth:_,outerHeight:y,lineHeight:s,calculatedLineHeight:o,contentWidth:m,contentHeight:c,width:f}}var Yw=function(){function r(){}return r}(),Wc=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),Zw=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 Xw(r,t){var e=new Zw;if(r!=null&&(r+=""),!r)return e;for(var i=t.width,n=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,s=ru.lastIndex=0,l;(l=ru.exec(r))!=null;){var u=l.index;u>s&&iu(e,r.substring(s,u),t,o),iu(e,l[2],t,o,l[1]),s=ru.lastIndex}s<r.length&&iu(e,r.substring(s,r.length),t,o);var f=[],h=0,c=0,v=t.padding,p=a==="truncate",g=t.lineOverflow==="truncate";function d(k,N,F){k.width=N,k.lineHeight=F,h+=F,c=Math.max(c,N)}t:for(var y=0;y<e.lines.length;y++){for(var m=e.lines[y],_=0,S=0,w=0;w<m.tokens.length;w++){var b=m.tokens[w],x=b.styleName&&t.rich[b.styleName]||{},M=b.textPadding=x.padding,C=M?M[1]+M[3]:0,T=b.font=x.font||t.font;b.contentHeight=Xh(T);var D=et(x.height,b.contentHeight);if(b.innerHeight=D,M&&(D+=M[0]+M[2]),b.height=D,b.lineHeight=va(x.lineHeight,t.lineHeight,D),b.align=x&&x.align||t.align,b.verticalAlign=x&&x.verticalAlign||"middle",g&&n!=null&&h+b.lineHeight>n){w>0?(m.tokens=m.tokens.slice(0,w),d(m,S,_),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y);break t}var L=x.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")b.percentWidth=L,f.push(b),b.contentWidth=se(b.text,T);else{if(I){var P=x.backgroundColor,R=P&&P.image;R&&(R=Hw(R),tl(R)&&(b.width=Math.max(b.width,R.width*D/R.height)))}var E=p&&i!=null?i-S:null;E!=null&&E<b.width?!I||E<C?(b.text="",b.width=b.contentWidth=0):(b.text=Gw(b.text,E-C,T,t.ellipsis,{minChar:t.truncateMinChar}),b.width=b.contentWidth=se(b.text,T)):b.contentWidth=se(b.text,T)}b.width+=C,S+=b.width,x&&(_=Math.max(_,b.lineHeight))}d(m,S,_)}e.outerWidth=e.width=et(i,c),e.outerHeight=e.height=et(n,h),e.contentHeight=h,e.contentWidth=c,v&&(e.outerWidth+=v[1]+v[3],e.outerHeight+=v[0]+v[2]);for(var y=0;y<f.length;y++){var b=f[y],z=b.percentWidth;b.width=parseInt(z,10)/100*e.width}return e}function iu(r,t,e,i,n){var a=t==="",o=n&&e.rich[n]||{},s=r.lines,l=o.font||e.font,u=!1,f,h;if(i){var c=o.padding,v=c?c[1]+c[3]:0;if(o.width!=null&&o.width!=="auto"){var p=Ke(o.width,i.width)+v;s.length>0&&p+i.accumWidth>i.width&&(f=t.split(`
`),u=!0),i.accumWidth=p}else{var g=Lm(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}else f=t.split(`
`);for(var d=0;d<f.length;d++){var y=f[d],m=new Yw;if(m.styleName=n,m.text=y,m.isLineHolder=!y&&!a,typeof o.width=="number"?m.width=o.width:m.width=h?h[d]:se(y,l),!d&&!u){var _=(s[s.length-1]||(s[0]=new Wc)).tokens,S=_.length;S===1&&_[0].isLineHolder?_[0]=m:(y||!S||a)&&_.push(m)}else s.push(new Wc([m]))}}function $w(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var qw=Fr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Kw(r){return $w(r)?!!qw[r]:!0}function Lm(r,t,e,i,n){for(var a=[],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),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var v=se(c,t),p=i?!1:!Kw(c);if(a.length?f+v>e:n+f+v>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):p?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,p?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=n),{accumWidth:f,lines:a,linesWidths:o}}var Vf="__zr_style_"+Math.round(Math.random()*10),yi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},el={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};yi[Vf]=!0;var Uc=["z","z2","invisible"],Qw=["invisible"],Ya=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=bt(e),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Jw(this,e,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new ft(0,0,0,0)),i?ft.applyTransform(e,n,i):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new ft(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:B(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=Ko,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Ko)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Ks(yi,e)},t.prototype.useStyle=function(e){e[Vf]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Vf]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,Uc)},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.style?o?a?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=bt(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=bt(u),c=0;c<p.length;c++){var v=p[c];this.style[v]=this.style[v]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var g=this.__inHover?Qw:Uc,c=0;c<g.length;c++){var v=g[c];i&&i[v]!=null?this[v]=i[v]:l&&n[v]!=null&&(this[v]=n[v])}},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(e,i){return B(e,i),e},t.prototype.getAnimationStyleProps=function(){return el},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=qe|Ko}(),t}(Js),nu=new ft(0,0,0,0),au=new ft(0,0,0,0);function Jw(r,t,e){return nu.copy(r.getBoundingRect()),r.transform&&nu.applyTransform(r.transform),au.width=t,au.height=e,!nu.intersect(au)}var ge=Math.min,ye=Math.max,ou=Math.sin,su=Math.cos,Kr=Math.PI*2,oo=Tn(),so=Tn(),lo=Tn();function Yc(r,t,e,i,n,a){n[0]=ge(r,e),n[1]=ge(t,i),a[0]=ye(r,e),a[1]=ye(t,i)}var Zc=[],Xc=[];function jw(r,t,e,i,n,a,o,s,l,u){var f=im,h=Et,c=f(r,e,n,o,Zc);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,e,n,o,Zc[v]);l[0]=ge(p,l[0]),u[0]=ye(p,u[0])}c=f(t,i,a,s,Xc);for(var v=0;v<c;v++){var g=h(t,i,a,s,Xc[v]);l[1]=ge(g,l[1]),u[1]=ye(g,u[1])}l[0]=ge(r,l[0]),u[0]=ye(r,u[0]),l[0]=ge(o,l[0]),u[0]=ye(o,u[0]),l[1]=ge(t,l[1]),u[1]=ye(t,u[1]),l[1]=ge(s,l[1]),u[1]=ye(s,u[1])}function tx(r,t,e,i,n,a,o,s){var l=nm,u=Qt,f=ye(ge(l(r,e,n),1),0),h=ye(ge(l(t,i,a),1),0),c=u(r,e,n,f),v=u(t,i,a,h);o[0]=ge(r,n,c),o[1]=ge(t,a,v),s[0]=ye(r,n,c),s[1]=ye(t,a,v)}function ex(r,t,e,i,n,a,o,s,l){var u=an,f=on,h=Math.abs(n-a);if(h%Kr<1e-4&&h>1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(oo[0]=su(n)*e+r,oo[1]=ou(n)*i+t,so[0]=su(a)*e+r,so[1]=ou(a)*i+t,u(s,oo,so),f(l,oo,so),n=n%Kr,n<0&&(n=n+Kr),a=a%Kr,a<0&&(a=a+Kr),n>a&&!o?a+=Kr:n<a&&o&&(n+=Kr),o){var c=a;a=n,n=c}for(var v=0;v<a;v+=Math.PI/2)v>n&&(lo[0]=su(v)*e+r,lo[1]=ou(v)*i+t,u(s,lo,s),f(l,lo,l))}var ct={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qr=[],Jr=[],Ve=[],mr=[],Fe=[],He=[],lu=Math.min,uu=Math.max,jr=Math.cos,ti=Math.sin,nr=Math.abs,Ff=Math.PI,Ar=Ff*2,fu=typeof Float32Array<"u",zn=[];function hu(r){var t=Math.round(r/Ff*1e8)/1e8;return t%2*Ff}function Jh(r,t){var e=hu(r[0]);e<0&&(e+=Ar);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=Ar?n=e+Ar:t&&e-n>=Ar?n=e-Ar:!t&&e>n?n=e+(Ar-hu(e-n)):t&&e<n&&(n=e-(Ar-hu(n-e))),r[0]=e,r[1]=n}var Mi=function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(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(t,e,i){i=i||0,i>0&&(this._ux=nr(i/ys/t)||0,this._uy=nr(i/ys/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},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(t,e){return this._drawPendingPt(),this.addData(ct.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=nr(t-this._xi),n=nr(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(ct.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(ct.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(ct.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),zn[0]=n,zn[1]=a,Jh(zn,o),n=zn[0],a=zn[1];var s=a-n;return this.addData(ct.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=jr(a)*i+t,this._yi=ti(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ct.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(ct.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&fu&&(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;a<e;a++)i+=t[a].len();fu&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;a<e;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[n++]=o[s];this._len=n},r.prototype.addData=function(t,e,i,n,a,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 t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,fu&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Ve[0]=Ve[1]=Fe[0]=Fe[1]=Number.MAX_VALUE,mr[0]=mr[1]=He[0]=He[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],i=t[o+1],n=e,a=i),s){case ct.M:e=n=t[o++],i=a=t[o++],Fe[0]=n,Fe[1]=a,He[0]=n,He[1]=a;break;case ct.L:Yc(e,i,t[o],t[o+1],Fe,He),e=t[o++],i=t[o++];break;case ct.C:jw(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Fe,He),e=t[o++],i=t[o++];break;case ct.Q:tx(e,i,t[o++],t[o++],t[o],t[o+1],Fe,He),e=t[o++],i=t[o++];break;case ct.A:var u=t[o++],f=t[o++],h=t[o++],c=t[o++],v=t[o++],p=t[o++]+v;o+=1;var g=!t[o++];l&&(n=jr(v)*h+u,a=ti(v)*c+f),ex(u,f,h,c,v,p,g,Fe,He),e=jr(p)*h+u,i=ti(p)*c+f;break;case ct.R:n=e=t[o++],a=i=t[o++];var d=t[o++],y=t[o++];Yc(n,a,n+d,a+y,Fe,He);break;case ct.Z:e=n,i=a;break}an(Ve,Ve,Fe),on(mr,mr,He)}return o===0&&(Ve[0]=Ve[1]=mr[0]=mr[1]=0),new ft(Ve[0],Ve[1],mr[0]-Ve[0],mr[1]-Ve[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,n=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,h=0,c=0;c<e;){var v=t[c++],p=c===1;p&&(a=t[c],o=t[c+1],s=a,l=o);var g=-1;switch(v){case ct.M:a=s=t[c++],o=l=t[c++];break;case ct.L:{var d=t[c++],y=t[c++],m=d-a,_=y-o;(nr(m)>i||nr(_)>n||c===e-1)&&(g=Math.sqrt(m*m+_*_),a=d,o=y);break}case ct.C:{var S=t[c++],w=t[c++],d=t[c++],y=t[c++],b=t[c++],x=t[c++];g=wb(a,o,S,w,d,y,b,x,10),a=b,o=x;break}case ct.Q:{var S=t[c++],w=t[c++],d=t[c++],y=t[c++];g=Mb(a,o,S,w,d,y,10),a=d,o=y;break}case ct.A:var M=t[c++],C=t[c++],T=t[c++],D=t[c++],L=t[c++],I=t[c++],P=I+L;c+=1,p&&(s=jr(L)*T+M,l=ti(L)*D+C),g=uu(T,D)*lu(Ar,Math.abs(I)),a=jr(P)*T+M,o=ti(P)*D+C;break;case ct.R:{s=a=t[c++],l=o=t[c++];var R=t[c++],E=t[c++];g=R*2+E*2;break}case ct.Z:{var m=s-a,_=l-o;g=Math.sqrt(m*m+_*_),a=s,o=l;break}}g>=0&&(u[h++]=g,f+=g)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,p,g,d=0,y=0,m,_=0,S,w;if(!(v&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,m=e*g,!m)))t:for(var b=0;b<o;){var x=i[b++],M=b===1;switch(M&&(u=i[b],f=i[b+1],s=u,l=f),x!==ct.L&&_>0&&(t.lineTo(S,w),_=0),x){case ct.M:s=u=i[b++],l=f=i[b++],t.moveTo(u,f);break;case ct.L:{h=i[b++],c=i[b++];var C=nr(h-u),T=nr(c-f);if(C>n||T>a){if(v){var D=p[y++];if(d+D>m){var L=(m-d)/D;t.lineTo(u*(1-L)+h*L,f*(1-L)+c*L);break t}d+=D}t.lineTo(h,c),u=h,f=c,_=0}else{var I=C*C+T*T;I>_&&(S=h,w=c,_=I)}break}case ct.C:{var P=i[b++],R=i[b++],E=i[b++],z=i[b++],k=i[b++],N=i[b++];if(v){var D=p[y++];if(d+D>m){var L=(m-d)/D;ps(u,P,E,k,L,Qr),ps(f,R,z,N,L,Jr),t.bezierCurveTo(Qr[1],Jr[1],Qr[2],Jr[2],Qr[3],Jr[3]);break t}d+=D}t.bezierCurveTo(P,R,E,z,k,N),u=k,f=N;break}case ct.Q:{var P=i[b++],R=i[b++],E=i[b++],z=i[b++];if(v){var D=p[y++];if(d+D>m){var L=(m-d)/D;ds(u,P,E,L,Qr),ds(f,R,z,L,Jr),t.quadraticCurveTo(Qr[1],Jr[1],Qr[2],Jr[2]);break t}d+=D}t.quadraticCurveTo(P,R,E,z),u=E,f=z;break}case ct.A:var F=i[b++],G=i[b++],Z=i[b++],rt=i[b++],nt=i[b++],St=i[b++],dt=i[b++],$t=!i[b++],ae=Z>rt?Z:rt,It=nr(Z-rt)>.001,Mt=nt+St,J=!1;if(v){var D=p[y++];d+D>m&&(Mt=nt+St*(m-d)/D,J=!0),d+=D}if(It&&t.ellipse?t.ellipse(F,G,Z,rt,dt,nt,Mt,$t):t.arc(F,G,ae,nt,Mt,$t),J)break t;M&&(s=jr(nt)*Z+F,l=ti(nt)*rt+G),u=jr(Mt)*Z+F,f=ti(Mt)*rt+G;break;case ct.R:s=u=i[b],l=f=i[b+1],h=i[b++],c=i[b++];var at=i[b++],ze=i[b++];if(v){var D=p[y++];if(d+D>m){var Dt=m-d;t.moveTo(h,c),t.lineTo(h+lu(Dt,at),c),Dt-=at,Dt>0&&t.lineTo(h+at,c+lu(Dt,ze)),Dt-=ze,Dt>0&&t.lineTo(h+uu(at-Dt,0),c+ze),Dt-=at,Dt>0&&t.lineTo(h,c+uu(ze-Dt,0));break t}d+=D}t.rect(h,c,at,ze);break;case ct.Z:if(v){var D=p[y++];if(d+D>m){var L=(m-d)/D;t.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break t}d+=D}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=ct,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function Wi(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-i)/(r-e),u=(r*i-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var f=l*a-o+u,h=f*f/(l*l+1);return h<=s/2*s/2}function rx(r,t,e,i,n,a,o,s,l,u,f){if(l===0)return!1;var h=l;if(f>t+h&&f>i+h&&f>a+h&&f>s+h||f<t-h&&f<i-h&&f<a-h&&f<s-h||u>r+h&&u>e+h&&u>n+h&&u>o+h||u<r-h&&u<e-h&&u<n-h&&u<o-h)return!1;var c=bb(r,t,e,i,n,a,o,s,u,f);return c<=h/2}function ix(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>r+u&&s>e+u&&s>n+u||s<r-u&&s<e-u&&s<n-u)return!1;var f=Tb(r,t,e,i,n,a,s,l);return f<=u/2}var $c=Math.PI*2;function uo(r){return r%=$c,r<0&&(r+=$c),r}var Vn=Math.PI*2;function nx(r,t,e,i,n,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var f=Math.sqrt(s*s+l*l);if(f-u>e||f+u<e)return!1;if(Math.abs(i-n)%Vn<1e-4)return!0;if(a){var h=i;i=uo(n),n=uo(h)}else i=uo(i),n=uo(n);i>n&&(n+=Vn);var c=Math.atan2(l,s);return c<0&&(c+=Vn),c>=i&&c<=n||c+Vn>=i&&c+Vn<=n}function ei(r,t,e,i,n,a){if(a>t&&a>i||a<t&&a<i||i===t)return 0;var o=(a-t)/(i-t),s=i<t?1:-1;(o===1||o===0)&&(s=i<t?.5:-.5);var l=o*(e-r)+r;return l===n?1/0:l>n?s:0}var _r=Mi.CMD,ri=Math.PI*2,ax=1e-4;function ox(r,t){return Math.abs(r-t)<ax}var Wt=[-1,-1,-1],pe=[-1,-1];function sx(){var r=pe[0];pe[0]=pe[1],pe[1]=r}function lx(r,t,e,i,n,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var f=cs(t,i,a,s,u,Wt);if(f===0)return 0;for(var h=0,c=-1,v=void 0,p=void 0,g=0;g<f;g++){var d=Wt[g],y=d===0||d===1?.5:1,m=Et(r,e,n,o,d);m<l||(c<0&&(c=im(t,i,a,s,pe),pe[1]<pe[0]&&c>1&&sx(),v=Et(t,i,a,s,pe[0]),c>1&&(p=Et(t,i,a,s,pe[1]))),c===2?d<pe[0]?h+=v<t?y:-y:d<pe[1]?h+=p<v?y:-y:h+=s<p?y:-y:d<pe[0]?h+=v<t?y:-y:h+=s<v?y:-y)}return h}function ux(r,t,e,i,n,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=xb(t,i,a,s,Wt);if(l===0)return 0;var u=nm(t,i,a);if(u>=0&&u<=1){for(var f=0,h=Qt(t,i,a,u),c=0;c<l;c++){var v=Wt[c]===0||Wt[c]===1?.5:1,p=Qt(r,e,n,Wt[c]);p<o||(Wt[c]<u?f+=h<t?v:-v:f+=a<h?v:-v)}return f}else{var v=Wt[0]===0||Wt[0]===1?.5:1,p=Qt(r,e,n,Wt[0]);return p<o?0:a<t?v:-v}}function fx(r,t,e,i,n,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Wt[0]=-l,Wt[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=ri-1e-4){i=0,n=ri;var f=a?1:-1;return o>=Wt[0]+r&&o<=Wt[1]+r?f:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=ri,n+=ri);for(var c=0,v=0;v<2;v++){var p=Wt[v];if(p+r>o){var g=Math.atan2(s,p),f=a?1:-1;g<0&&(g=ri+g),(g>=i&&g<=n||g+ri>=i&&g+ri<=n)&&(g>Math.PI/2&&g<Math.PI*1.5&&(f=-f),c+=f)}}return c}function Im(r,t,e,i,n){for(var a=r.data,o=r.len(),s=0,l=0,u=0,f=0,h=0,c,v,p=0;p<o;){var g=a[p++],d=p===1;switch(g===_r.M&&p>1&&(e||(s+=ei(l,u,f,h,i,n))),d&&(l=a[p],u=a[p+1],f=l,h=u),g){case _r.M:f=a[p++],h=a[p++],l=f,u=h;break;case _r.L:if(e){if(Wi(l,u,a[p],a[p+1],t,i,n))return!0}else s+=ei(l,u,a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case _r.C:if(e){if(rx(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],t,i,n))return!0}else s+=lx(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case _r.Q:if(e){if(ix(l,u,a[p++],a[p++],a[p],a[p+1],t,i,n))return!0}else s+=ux(l,u,a[p++],a[p++],a[p],a[p+1],i,n)||0;l=a[p++],u=a[p++];break;case _r.A:var y=a[p++],m=a[p++],_=a[p++],S=a[p++],w=a[p++],b=a[p++];p+=1;var x=!!(1-a[p++]);c=Math.cos(w)*_+y,v=Math.sin(w)*S+m,d?(f=c,h=v):s+=ei(l,u,c,v,i,n);var M=(i-y)*S/_+y;if(e){if(nx(y,m,S,w,w+b,x,t,M,n))return!0}else s+=fx(y,m,S,w,w+b,x,M,n);l=Math.cos(w+b)*_+y,u=Math.sin(w+b)*S+m;break;case _r.R:f=l=a[p++],h=u=a[p++];var C=a[p++],T=a[p++];if(c=f+C,v=h+T,e){if(Wi(f,h,c,h,t,i,n)||Wi(c,h,c,v,t,i,n)||Wi(c,v,f,v,t,i,n)||Wi(f,v,f,h,t,i,n))return!0}else s+=ei(c,h,c,v,i,n),s+=ei(f,v,f,h,i,n);break;case _r.Z:if(e){if(Wi(l,u,f,h,t,i,n))return!0}else s+=ei(l,u,f,h,i,n);l=f,u=h;break}}return!e&&!ox(u,h)&&(s+=ei(l,u,f,h,i,n)||0),s!==0}function hx(r,t,e){return Im(r,0,!1,t,e)}function vx(r,t,e,i){return Im(r,t,!0,e,i)}var Pm=lt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yi),cx={style:lt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},el.style)},vu=Aa.concat(["invisible","culling","z","z2","zlevel","parent"]),vt=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s<vu.length;++s)n[vu[s]]=this[vu[s]];n.__dirty|=qe}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var i=bt(e);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var a=0;a<i.length;a++){var o=i[a],s=e[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({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(W(e)){var i=gs(e,0);return i>.5?Nf:i>.2?Xb:Bf}else if(e)return Bf}return Nf},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(W(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=gs(e,0)<Of;if(a===o)return i}},t.prototype.buildPath=function(e,i,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Mi(!1)},t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return!(i==null||i==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&na)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){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)),vx(s,l/u,e,i)))return!0}if(this.hasFill())return hx(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=na,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:B(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&na)},t.prototype.createStyle=function(e){return Ks(Pm,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=B({},n.shape),B(u,i.shape)):(u=B({},a?this.shape:n.shape),B(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=B({},this.shape);for(var f={},h=bt(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(e,{shape:f},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var i=r.prototype._mergeStates.call(this,e),n,a=0;a<e.length;a++){var o=e[a];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return cx},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var i=function(a){O(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return X(e.style)},o.prototype.getDefaultShape=function(){return X(e.shape)},o}(t);for(var n in e)typeof e[n]=="function"&&(i.prototype[n]=e[n]);return i},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=qe|Ko|na}(),t}(Ya),px=lt({strokeFirst:!0,font:xi,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Pm),ws=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,i=e.stroke;return i!=null&&i!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.createStyle=function(e){return Ks(px,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var i=e.text;i!=null?i+="":i="";var n=Qs(i,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a}this._rect=n}return this._rect},t.initDefaultProps=function(){var e=t.prototype;e.dirtyRectTolerance=10}(),t}(Ya);ws.prototype.type="tspan";var dx=lt({x:0,y:0},yi),gx={style:lt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},el.style)};function yx(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var je=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Ks(dx,e)},t.prototype._getSize=function(e){var i=this.style,n=i[e];if(n!=null)return n;var a=yx(i.image)?i.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=i[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return gx},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new ft(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Ya);je.prototype.type="image";function mx(r,t){var e=t.x,i=t.y,n=t.width,a=t.height,o=t.r,s,l,u,f;n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),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>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+f,i+a),f!==0&&r.arc(e+f,i+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var ln=Math.round;function Rm(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(ln(i*2)===ln(n*2)&&(r.x1=r.x2=ci(i,s,!0)),ln(a*2)===ln(o*2)&&(r.y1=r.y2=ci(a,s,!0))),r}}function Em(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=ci(i,s,!0),r.y=ci(n,s,!0),r.width=Math.max(ci(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(ci(n+o,s,!1)-r.y,o===0?0:1)),r}}function ci(r,t,e){if(!t)return r;var i=ln(r*2);return(i+ln(t))%2===0?i/2:(i+(e?1:-1))/2}var _x=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Sx={},mt=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new _x},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=Em(Sx,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?mx(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(vt);mt.prototype.type="rect";var qc={fill:"#000"},Kc=2,bx={style:lt({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},el.style)},gt=function(r){O(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=qc,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var i=this._children[e];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,Ax(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new ft(0,0,0,0),i=this._children,n=[],a=null,o=0;o<i.length;o++){var s=i[o],l=s.getBoundingRect(),u=s.getLocalTransform(n);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||qc},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,i){if(!i)return e;var n=i.rich,a=e.rich||n&&{};return B(e,i),n&&a?(this._mergeRich(a,n),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,i){for(var n=bt(i),a=0;a<n.length;a++){var o=n[a];e[o]=e[o]||{},B(e[o],i[o])}},t.prototype.getAnimationStyleProps=function(){return bx},t.prototype._getOrCreateChild=function(e){var i=this._children[this._childCursor];return(!i||!(i instanceof e))&&(i=new e),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},t.prototype._updatePlainTexts=function(){var e=this.style,i=e.font||xi,n=e.padding,a=ip(e),o=Uw(a,e),s=cu(e),l=!!e.backgroundColor,u=o.outerHeight,f=o.outerWidth,h=o.contentWidth,c=o.lines,v=o.lineHeight,p=this._defaultStyle,g=e.x||0,d=e.y||0,y=e.align||p.align||"left",m=e.verticalAlign||p.verticalAlign||"top",_=g,S=rn(d,o.contentHeight,m);if(s||n){var w=oa(g,f,y),b=rn(d,u,m);s&&this._renderBackground(e,e,w,b,f,u)}S+=v/2,n&&(_=rp(g,y,n),m==="top"?S+=n[0]:m==="bottom"&&(S-=n[2]));for(var x=0,M=!1,C=ep("fill"in e?e.fill:(M=!0,p.fill)),T=tp("stroke"in e?e.stroke:!l&&(!p.autoStroke||M)?(x=Kc,p.stroke):null),D=e.textShadowBlur>0,L=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),I=o.calculatedLineHeight,P=0;P<c.length;P++){var R=this._getOrCreateChild(ws),E=R.createStyle();R.useStyle(E),E.text=c[P],E.x=_,E.y=S,E.textAlign=y,E.textBaseline="middle",E.opacity=e.opacity,E.strokeFirst=!0,D&&(E.shadowBlur=e.textShadowBlur||0,E.shadowColor=e.textShadowColor||"transparent",E.shadowOffsetX=e.textShadowOffsetX||0,E.shadowOffsetY=e.textShadowOffsetY||0),E.stroke=T,E.fill=C,T&&(E.lineWidth=e.lineWidth||x,E.lineDash=e.lineDash,E.lineDashOffset=e.lineDashOffset||0),E.font=i,Jc(E,e),S+=v,L&&R.setBoundingRect(new ft(oa(E.x,e.width,E.textAlign),rn(E.y,I,E.textBaseline),h,I))}},t.prototype._updateRichTexts=function(){var e=this.style,i=ip(e),n=Xw(i,e),a=n.width,o=n.outerWidth,s=n.outerHeight,l=e.padding,u=e.x||0,f=e.y||0,h=this._defaultStyle,c=e.align||h.align,v=e.verticalAlign||h.verticalAlign,p=oa(u,o,c),g=rn(f,s,v),d=p,y=g;l&&(d+=l[3],y+=l[0]);var m=d+a;cu(e)&&this._renderBackground(e,e,p,g,o,s);for(var _=!!e.backgroundColor,S=0;S<n.lines.length;S++){for(var w=n.lines[S],b=w.tokens,x=b.length,M=w.lineHeight,C=w.width,T=0,D=d,L=m,I=x-1,P=void 0;T<x&&(P=b[T],!P.align||P.align==="left");)this._placeToken(P,e,M,y,D,"left",_),C-=P.width,D+=P.width,T++;for(;I>=0&&(P=b[I],P.align==="right");)this._placeToken(P,e,M,y,L,"right",_),C-=P.width,L-=P.width,I--;for(D+=(a-(D-d)-(m-L)-C)/2;T<=I;)P=b[T],this._placeToken(P,e,M,y,D+P.width/2,"center",_),D+=P.width,T++;y+=M}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+n/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+n-e.height/2);var c=!e.isLineHolder&&cu(u);c&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,p=e.textPadding;p&&(o=rp(o,s,p),h-=e.height/2-p[0]-e.innerHeight/2);var g=this._getOrCreateChild(ws),d=g.createStyle();g.useStyle(d);var y=this._defaultStyle,m=!1,_=0,S=ep("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,y.fill)),w=tp("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!y.autoStroke||m)?(_=Kc,y.stroke):null),b=u.textShadowBlur>0||i.textShadowBlur>0;d.text=e.text,d.x=o,d.y=h,b&&(d.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,d.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",d.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,d.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),d.textAlign=s,d.textBaseline="middle",d.font=e.font||xi,d.opacity=va(u.opacity,i.opacity,1),Jc(d,u),w&&(d.lineWidth=va(u.lineWidth,i.lineWidth,_),d.lineDash=et(u.lineDash,i.lineDash),d.lineDashOffset=i.lineDashOffset||0,d.stroke=w),S&&(d.fill=S);var x=e.contentWidth,M=e.contentHeight;g.setBoundingRect(new ft(oa(d.x,x,d.textAlign),rn(d.y,M,d.textBaseline),x,M))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,p=this,g,d;if(c||e.lineHeight||u&&f){g=this._getOrCreateChild(mt),g.useStyle(g.createStyle()),g.style.fill=null;var y=g.shape;y.x=n,y.y=a,y.width=o,y.height=s,y.r=v,g.dirtyShape()}if(c){var m=g.style;m.fill=l||null,m.fillOpacity=et(e.fillOpacity,1)}else if(h){d=this._getOrCreateChild(je),d.onload=function(){p.dirtyStyle()};var _=d.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&f){var m=g.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=et(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(g||d).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=va(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return Cx(e)&&(i=[e.fontStyle,e.fontWeight,Mx(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&Ze(i)||e.textFont||e.font},t}(Ya),xx={left:!0,right:1,center:1},Tx={top:1,bottom:1,middle:1},Qc=["fontStyle","fontWeight","fontSize","fontFamily"];function Mx(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Oh+"px":r+"px"}function Jc(r,t){for(var e=0;e<Qc.length;e++){var i=Qc[e],n=t[i];n!=null&&(r[i]=n)}}function Cx(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Ax(r){return jc(r),A(r.rich,jc),r}function jc(r){if(r){r.font=gt.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||xx[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||Tx[e]?e:"top";var i=r.padding;i&&(r.padding=Uy(r.padding))}}function tp(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function ep(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function rp(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function ip(r){var t=r.text;return t!=null&&(t+=""),t}function cu(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var st=_t(),Hf=function(r,t,e,i){if(i){var n=st(i);n.dataIndex=e,n.dataType=t,n.seriesIndex=r,n.ssrType="chart",i.type==="group"&&i.traverse(function(a){var o=st(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},np=1,ap={},km=_t(),jh=_t(),tv=0,rl=1,il=2,re=["emphasis","blur","select"],xs=["normal","emphasis","blur","select"],Dx=10,Lx=9,mi="highlight",rs="downplay",ya="select",is="unselect",ma="toggleSelect";function Ui(r){return r!=null&&r!=="none"}function nl(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function Om(r){nl(r,"emphasis",il)}function Nm(r){r.hoverState===il&&nl(r,"normal",tv)}function ev(r){nl(r,"blur",rl)}function Bm(r){r.hoverState===rl&&nl(r,"normal",tv)}function Ix(r){r.selected=!0}function Px(r){r.selected=!1}function op(r,t,e){t(r,e)}function gr(r,t,e){op(r,t,e),r.isGroup&&r.traverse(function(i){op(i,t,e)})}function sp(r,t){switch(t){case"emphasis":r.hoverState=il;break;case"normal":r.hoverState=tv;break;case"blur":r.hoverState=rl;break;case"select":r.selected=!0}}function Rx(r,t,e,i){for(var n=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=n[s];a[s]=l??(i&&i[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function Ex(r,t,e,i){var n=e&&ot(e,"select")>=0,a=!1;if(r instanceof vt){var o=km(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Ui(s)||Ui(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=B({},i),u=B({},u),u.fill=s):!Ui(u.fill)&&Ui(s)?(a=!0,i=B({},i),u=B({},u),u.fill=Ac(s)):!Ui(u.stroke)&&Ui(l)&&(a||(i=B({},i),u=B({},u)),u.stroke=Ac(l)),i.style=u}}if(i&&i.z2==null){a||(i=B({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f??Dx)}return i}function kx(r,t,e){if(e&&e.z2==null){e=B({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??Lx)}return e}function Ox(r,t,e){var i=ot(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:Rx(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:i?n:a.opacity*.1},o),e.style=o),e}function pu(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return Ex(this,r,t,e);if(r==="blur")return Ox(this,r,e);if(r==="select")return kx(this,r,e)}return e}function Nx(r){r.stateProxy=pu;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=pu),e&&(e.stateProxy=pu)}function lp(r,t){!Hm(r,t)&&!r.__highByOuter&&gr(r,Om)}function up(r,t){!Hm(r,t)&&!r.__highByOuter&&gr(r,Nm)}function Ci(r,t){r.__highByOuter|=1<<(t||0),gr(r,Om)}function Ai(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&gr(r,Nm)}function zm(r){gr(r,ev)}function rv(r){gr(r,Bm)}function Vm(r){gr(r,Ix)}function Fm(r){gr(r,Px)}function Hm(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Gm(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=jh(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){Bm(u)}),s&&e.push(a)),o.isBlured=!1}),A(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Gf(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h<f.length;h++){var c=u.getItemGraphicEl(f[h]);c&&rv(c)}}if(r!=null&&!(!t||t==="none")){var o=n.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];n.eachSeries(function(u){var f=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var c=h&&s?h===s:f;if(!(e==="series"&&!f||e==="coordinateSystem"&&!c||t==="series"&&f)){var v=i.getViewOfSeriesModel(u);if(v.group.traverse(function(d){d.__highByOuter&&f&&t==="self"||ev(d)}),te(t))a(u.getData(),t);else if(Y(t))for(var p=bt(t),g=0;g<p.length;g++)a(u.getData(p[g]),t[p[g]]);l.push(u),jh(u).isBlured=!0}}),n.eachComponent(function(u,f){if(u!=="series"){var h=i.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,n)}})}}function Wf(r,t,e){if(!(r==null||t==null)){var i=e.getModel().getComponent(r,t);if(i){jh(i).isBlured=!0;var n=e.getViewOfComponentModel(i);!n||!n.focusBlurEnabled||n.group.traverse(function(a){ev(a)})}}}function Bx(r,t,e){var i=r.seriesIndex,n=r.getData(t.dataType);if(n){var a=Ti(n,t);a=(V(a)?a[0]:a)||0;var o=n.getItemGraphicEl(a);if(!o)for(var s=n.count(),l=0;!o&&l<s;)o=n.getItemGraphicEl(l++);if(o){var u=st(o);Gf(i,u.focus,u.blurScope,e)}else{var f=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);f!=null&&Gf(i,f,h,e)}}}function iv(r,t,e,i){var n={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return n;var a=i.getModel().getComponent(r,t);if(!a)return n;var o=i.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return n;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(st(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function zx(r,t,e){var i=st(r),n=iv(i.componentMainType,i.componentIndex,i.componentHighDownName,e),a=n.dispatchers,o=n.focusSelf;a?(o&&Wf(i.componentMainType,i.componentIndex,e),A(a,function(s){return lp(s,t)})):(Gf(i.seriesIndex,i.focus,i.blurScope,e),i.focus==="self"&&Wf(i.componentMainType,i.componentIndex,e),lp(r,t))}function Vx(r,t,e){Gm(e);var i=st(r),n=iv(i.componentMainType,i.componentIndex,i.componentHighDownName,e).dispatchers;n?A(n,function(a){return up(a,t)}):up(r,t)}function Fx(r,t,e){if(Yf(t)){var i=t.dataType,n=r.getData(i),a=Ti(n,t);V(a)||(a=[a]),r[t.type===ma?"toggleSelect":t.type===ya?"select":"unselect"](a,i)}}function fp(r){var t=r.getAllData();A(t,function(e){var i=e.data,n=e.type;i.eachItemGraphicEl(function(a,o){r.isSelected(o,n)?Vm(a):Fm(a)})})}function Hx(r){var t=[];return r.eachSeries(function(e){var i=e.getAllData();A(i,function(n){n.data;var a=n.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Ts(r,t,e){nv(r,!0),gr(r,Nx),Wx(r,t,e)}function Gx(r){nv(r,!1)}function dr(r,t,e,i){i?Gx(r):Ts(r,t,e)}function Wx(r,t,e){var i=st(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var hp=["emphasis","blur","select"],Ux={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Di(r,t,e,i){e=e||"itemStyle";for(var n=0;n<hp.length;n++){var a=hp[n],o=t.getModel([a,e]),s=r.ensureState(a);s.style=o[Ux[e]]()}}function nv(r,t){var e=t===!1,i=r;r.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!e)}function Uf(r){return!!(r&&r.__highDownDispatcher)}function Yx(r){var t=ap[r];return t==null&&np<=32&&(t=ap[r]=np++),t}function Yf(r){var t=r.type;return t===ya||t===is||t===ma}function vp(r){var t=r.type;return t===mi||t===rs}function Zx(r){var t=km(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var Yi=Mi.CMD,Xx=[[],[],[]],cp=Math.sqrt,$x=Math.atan2;function qx(r,t){if(t){var e=r.data,i=r.len(),n,a,o,s,l,u,f=Yi.M,h=Yi.C,c=Yi.L,v=Yi.R,p=Yi.A,g=Yi.Q;for(o=0,s=0;o<i;){switch(n=e[o++],s=o,a=0,n){case f:a=1;break;case c:a=1;break;case h:a=3;break;case g:a=2;break;case p:var d=t[4],y=t[5],m=cp(t[0]*t[0]+t[1]*t[1]),_=cp(t[2]*t[2]+t[3]*t[3]),S=$x(-t[1]/_,t[0]/m);e[o]*=m,e[o++]+=d,e[o]*=_,e[o++]+=y,e[o++]*=m,e[o++]*=_,e[o++]+=S,e[o++]+=S,o+=2,s=o;break;case v:u[0]=e[o++],u[1]=e[o++],_e(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],_e(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var w=Xx[l];w[0]=e[o++],w[1]=e[o++],_e(w,w,t),e[s++]=w[0],e[s++]=w[1]}}r.increaseVersion()}}var du=Math.sqrt,fo=Math.sin,ho=Math.cos,Fn=Math.PI;function pp(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Zf(r,t){return(r[0]*t[0]+r[1]*t[1])/(pp(r)*pp(t))}function dp(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(Zf(r,t))}function gp(r,t,e,i,n,a,o,s,l,u,f){var h=l*(Fn/180),c=ho(h)*(r-e)/2+fo(h)*(t-i)/2,v=-1*fo(h)*(r-e)/2+ho(h)*(t-i)/2,p=c*c/(o*o)+v*v/(s*s);p>1&&(o*=du(p),s*=du(p));var g=(n===a?-1:1)*du((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,d=g*o*v/s,y=g*-s*c/o,m=(r+e)/2+ho(h)*d-fo(h)*y,_=(t+i)/2+fo(h)*d+ho(h)*y,S=dp([1,0],[(c-d)/o,(v-y)/s]),w=[(c-d)/o,(v-y)/s],b=[(-1*c-d)/o,(-1*v-y)/s],x=dp(w,b);if(Zf(w,b)<=-1&&(x=Fn),Zf(w,b)>=1&&(x=0),x<0){var M=Math.round(x/Fn*1e6)/1e6;x=Fn*2+M%2*Fn}f.addData(u,m,_,o,s,S,x,h,a)}var Kx=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Qx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Jx(r){var t=new Mi;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Mi.CMD,l=r.match(Kx);if(!l)return t;for(var u=0;u<l.length;u++){for(var f=l[u],h=f.charAt(0),c=void 0,v=f.match(Qx)||[],p=v.length,g=0;g<p;g++)v[g]=parseFloat(v[g]);for(var d=0;d<p;){var y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,b=void 0,x=void 0,M=e,C=i,T=void 0,D=void 0;switch(h){case"l":e+=v[d++],i+=v[d++],c=s.L,t.addData(c,e,i);break;case"L":e=v[d++],i=v[d++],c=s.L,t.addData(c,e,i);break;case"m":e+=v[d++],i+=v[d++],c=s.M,t.addData(c,e,i),n=e,a=i,h="l";break;case"M":e=v[d++],i=v[d++],c=s.M,t.addData(c,e,i),n=e,a=i,h="L";break;case"h":e+=v[d++],c=s.L,t.addData(c,e,i);break;case"H":e=v[d++],c=s.L,t.addData(c,e,i);break;case"v":i+=v[d++],c=s.L,t.addData(c,e,i);break;case"V":i=v[d++],c=s.L,t.addData(c,e,i);break;case"C":c=s.C,t.addData(c,v[d++],v[d++],v[d++],v[d++],v[d++],v[d++]),e=v[d-2],i=v[d-1];break;case"c":c=s.C,t.addData(c,v[d++]+e,v[d++]+i,v[d++]+e,v[d++]+i,v[d++]+e,v[d++]+i),e+=v[d-2],i+=v[d-1];break;case"S":y=e,m=i,T=t.len(),D=t.data,o===s.C&&(y+=e-D[T-4],m+=i-D[T-3]),c=s.C,M=v[d++],C=v[d++],e=v[d++],i=v[d++],t.addData(c,y,m,M,C,e,i);break;case"s":y=e,m=i,T=t.len(),D=t.data,o===s.C&&(y+=e-D[T-4],m+=i-D[T-3]),c=s.C,M=e+v[d++],C=i+v[d++],e+=v[d++],i+=v[d++],t.addData(c,y,m,M,C,e,i);break;case"Q":M=v[d++],C=v[d++],e=v[d++],i=v[d++],c=s.Q,t.addData(c,M,C,e,i);break;case"q":M=v[d++]+e,C=v[d++]+i,e+=v[d++],i+=v[d++],c=s.Q,t.addData(c,M,C,e,i);break;case"T":y=e,m=i,T=t.len(),D=t.data,o===s.Q&&(y+=e-D[T-4],m+=i-D[T-3]),e=v[d++],i=v[d++],c=s.Q,t.addData(c,y,m,e,i);break;case"t":y=e,m=i,T=t.len(),D=t.data,o===s.Q&&(y+=e-D[T-4],m+=i-D[T-3]),e+=v[d++],i+=v[d++],c=s.Q,t.addData(c,y,m,e,i);break;case"A":_=v[d++],S=v[d++],w=v[d++],b=v[d++],x=v[d++],M=e,C=i,e=v[d++],i=v[d++],c=s.A,gp(M,C,e,i,b,x,_,S,w,c,t);break;case"a":_=v[d++],S=v[d++],w=v[d++],b=v[d++],x=v[d++],M=e,C=i,e+=v[d++],i+=v[d++],c=s.A,gp(M,C,e,i,b,x,_,S,w,c,t);break}}(h==="z"||h==="Z")&&(c=s.Z,t.addData(c),e=n,i=a),o=c}return t.toStatic(),t}var Wm=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(vt);function Um(r){return r.setData!=null}function Ym(r,t){var e=Jx(r),i=B({},t);return i.buildPath=function(n){if(Um(n)){n.setData(e.data);var a=n.getContext();a&&n.rebuildPath(a,1)}else{var a=n;e.rebuildPath(a,1)}},i.applyTransform=function(n){qx(e,n),this.dirtyShape()},i}function jx(r,t){return new Wm(Ym(r,t))}function tT(r,t){var e=Ym(r,t),i=function(n){O(a,n);function a(o){var s=n.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a}(Wm);return i}function eT(r,t){for(var e=[],i=r.length,n=0;n<i;n++){var a=r[n];e.push(a.getUpdatedPathProxy(!0))}var o=new vt(t);return o.createPathProxy(),o.buildPath=function(s){if(Um(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var rT=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),al=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new rT},t.prototype.buildPath=function(e,i){e.moveTo(i.cx+i.r,i.cy),e.arc(i.cx,i.cy,i.r,0,Math.PI*2)},t}(vt);al.prototype.type="circle";var iT=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),av=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new iT},t.prototype.buildPath=function(e,i){var n=.5522848,a=i.cx,o=i.cy,s=i.rx,l=i.ry,u=s*n,f=l*n;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-f,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-f,a+s,o),e.bezierCurveTo(a+s,o+f,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+f,a-s,o),e.closePath()},t}(vt);av.prototype.type="ellipse";var Zm=Math.PI,gu=Zm*2,ii=Math.sin,Zi=Math.cos,nT=Math.acos,Nt=Math.atan2,yp=Math.abs,_a=Math.sqrt,sa=Math.max,Ge=Math.min,Ce=1e-4;function aT(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,f=o-n,h=s-a,c=h*l-f*u;if(!(c*c<Ce))return c=(f*(t-a)-h*(r-n))/c,[r+c*l,t+c*u]}function vo(r,t,e,i,n,a,o){var s=r-e,l=t-i,u=(o?a:-a)/_a(s*s+l*l),f=u*l,h=-u*s,c=r+f,v=t+h,p=e+f,g=i+h,d=(c+p)/2,y=(v+g)/2,m=p-c,_=g-v,S=m*m+_*_,w=n-a,b=c*g-p*v,x=(_<0?-1:1)*_a(sa(0,w*w*S-b*b)),M=(b*_-m*x)/S,C=(-b*m-_*x)/S,T=(b*_+m*x)/S,D=(-b*m+_*x)/S,L=M-d,I=C-y,P=T-d,R=D-y;return L*L+I*I>P*P+R*R&&(M=T,C=D),{cx:M,cy:C,x0:-f,y0:-h,x1:M*(n/w-1),y1:C*(n/w-1)}}function oT(r){var t;if(V(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function sT(r,t){var e,i=sa(t.r,0),n=sa(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=yp(u-l),p=v>gu&&v%gu;if(p>Ce&&(v=p),!(i>Ce))r.moveTo(f,h);else if(v>gu-Ce)r.moveTo(f+i*Zi(l),h+i*ii(l)),r.arc(f,h,i,l,u,!c),n>Ce&&(r.moveTo(f+n*Zi(u),h+n*ii(u)),r.arc(f,h,n,u,l,c));else{var g=void 0,d=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,b=void 0,x=void 0,M=void 0,C=void 0,T=void 0,D=void 0,L=void 0,I=void 0,P=void 0,R=i*Zi(l),E=i*ii(l),z=n*Zi(u),k=n*ii(u),N=v>Ce;if(N){var F=t.cornerRadius;F&&(e=oT(F),g=e[0],d=e[1],y=e[2],m=e[3]);var G=yp(i-n)/2;if(_=Ge(G,y),S=Ge(G,m),w=Ge(G,g),b=Ge(G,d),C=x=sa(_,S),T=M=sa(w,b),(x>Ce||M>Ce)&&(D=i*Zi(u),L=i*ii(u),I=n*Zi(l),P=n*ii(l),v<Zm)){var Z=aT(R,E,I,P,D,L,z,k);if(Z){var rt=R-Z[0],nt=E-Z[1],St=D-Z[0],dt=L-Z[1],$t=1/ii(nT((rt*St+nt*dt)/(_a(rt*rt+nt*nt)*_a(St*St+dt*dt)))/2),ae=_a(Z[0]*Z[0]+Z[1]*Z[1]);C=Ge(x,(i-ae)/($t+1)),T=Ge(M,(n-ae)/($t-1))}}}if(!N)r.moveTo(f+R,h+E);else if(C>Ce){var It=Ge(y,C),Mt=Ge(m,C),J=vo(I,P,R,E,i,It,c),at=vo(D,L,z,k,i,Mt,c);r.moveTo(f+J.cx+J.x0,h+J.cy+J.y0),C<x&&It===Mt?r.arc(f+J.cx,h+J.cy,C,Nt(J.y0,J.x0),Nt(at.y0,at.x0),!c):(It>0&&r.arc(f+J.cx,h+J.cy,It,Nt(J.y0,J.x0),Nt(J.y1,J.x1),!c),r.arc(f,h,i,Nt(J.cy+J.y1,J.cx+J.x1),Nt(at.cy+at.y1,at.cx+at.x1),!c),Mt>0&&r.arc(f+at.cx,h+at.cy,Mt,Nt(at.y1,at.x1),Nt(at.y0,at.x0),!c))}else r.moveTo(f+R,h+E),r.arc(f,h,i,l,u,!c);if(!(n>Ce)||!N)r.lineTo(f+z,h+k);else if(T>Ce){var It=Ge(g,T),Mt=Ge(d,T),J=vo(z,k,D,L,n,-Mt,c),at=vo(R,E,I,P,n,-It,c);r.lineTo(f+J.cx+J.x0,h+J.cy+J.y0),T<M&&It===Mt?r.arc(f+J.cx,h+J.cy,T,Nt(J.y0,J.x0),Nt(at.y0,at.x0),!c):(Mt>0&&r.arc(f+J.cx,h+J.cy,Mt,Nt(J.y0,J.x0),Nt(J.y1,J.x1),!c),r.arc(f,h,n,Nt(J.cy+J.y1,J.cx+J.x1),Nt(at.cy+at.y1,at.cx+at.x1),c),It>0&&r.arc(f+at.cx,h+at.cy,It,Nt(at.y1,at.x1),Nt(at.y0,at.x0),!c))}else r.lineTo(f+z,h+k),r.arc(f,h,n,u,l,c)}r.closePath()}}}var lT=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}(),Qe=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new lT},t.prototype.buildPath=function(e,i){sT(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(vt);Qe.prototype.type="sector";var uT=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),ov=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new uT},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t}(vt);ov.prototype.type="ring";function fT(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,f,h;if(i){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c<v;c++)an(f,f,r[c]),on(h,h,r[c]);an(f,f,i[0]),on(h,h,i[1])}for(var c=0,v=r.length;c<v;c++){var p=r[c];if(e)l=r[c?c-1:v-1],u=r[(c+1)%v];else if(c===0||c===v-1){n.push(XS(r[c]));continue}else l=r[c-1],u=r[c+1];$y(a,u,l),Rl(a,a,t);var g=Sf(p,l),d=Sf(p,u),y=g+d;y!==0&&(g/=y,d/=y),Rl(o,a,-g),Rl(s,a,d);var m=fc([],p,o),_=fc([],p,s);i&&(on(m,m,f),an(m,m,h),on(_,_,f),an(_,_,h)),n.push(m),n.push(_)}return e&&n.push(n.shift()),n}function Xm(r,t,e){var i=t.smooth,n=t.points;if(n&&n.length>=2){if(i){var a=fT(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;s<h;s++)r.lineTo(n[s][0],n[s][1])}e&&r.closePath()}}var hT=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),Hr=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new hT},t.prototype.buildPath=function(e,i){Xm(e,i,!0)},t}(vt);Hr.prototype.type="polygon";var vT=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),Oi=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new vT},t.prototype.buildPath=function(e,i){Xm(e,i,!1)},t}(vt);Oi.prototype.type="polyline";var cT={},pT=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),ke=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new pT},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=Rm(cT,i,this.style);n=l.x1,a=l.y1,o=l.x2,s=l.y2}else n=i.x1,a=i.y1,o=i.x2,s=i.y2;var u=i.percent;u!==0&&(e.moveTo(n,a),u<1&&(o=n*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var i=this.shape;return[i.x1*(1-e)+i.x2*e,i.y1*(1-e)+i.y2*e]},t}(vt);ke.prototype.type="line";var qt=[],dT=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 mp(r,t,e){var i=r.cpx2,n=r.cpy2;return i!=null||n!=null?[(e?wc:Et)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?wc:Et)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?xc:Qt)(r.x1,r.cpx1,r.x2,t),(e?xc:Qt)(r.y1,r.cpy1,r.y2,t)]}var ol=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new dT},t.prototype.buildPath=function(e,i){var n=i.x1,a=i.y1,o=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,f=i.cpx2,h=i.cpy2,c=i.percent;c!==0&&(e.moveTo(n,a),f==null||h==null?(c<1&&(ds(n,l,o,c,qt),l=qt[1],o=qt[2],ds(a,u,s,c,qt),u=qt[1],s=qt[2]),e.quadraticCurveTo(l,u,o,s)):(c<1&&(ps(n,l,f,o,c,qt),l=qt[1],f=qt[2],o=qt[3],ps(a,u,h,s,c,qt),u=qt[1],h=qt[2],s=qt[3]),e.bezierCurveTo(l,u,f,h,o,s)))},t.prototype.pointAt=function(e){return mp(this.shape,e,!1)},t.prototype.tangentAt=function(e){var i=mp(this.shape,e,!0);return Fh(i,i)},t}(vt);ol.prototype.type="bezier-curve";var gT=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}(),sl=function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new gT},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,f=Math.cos(s),h=Math.sin(s);e.moveTo(f*o+n,h*o+a),e.arc(n,a,o,s,l,!u)},t}(vt);sl.prototype.type="arc";var yT=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,i=this.shapeChanged(),n=0;n<e.length;n++)i=i||e[n].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],i=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(i[0],i[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,i){for(var n=i.paths||[],a=0;a<n.length;a++)n[a].buildPath(e,n[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],i=0;i<e.length;i++)e[i].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),vt.prototype.getBoundingRect.call(this)},t}(vt),$m=function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r}(),sv=function(r){O(t,r);function t(e,i,n,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=i??0,l.x2=n??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t}($m),mT=function(r){O(t,r);function t(e,i,n,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=i??.5,s.r=n??.5,s.type="radial",s.global=o||!1,s}return t}($m),ni=[0,0],ai=[0,0],co=new j,po=new j,Ms=function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new j;for(var i=0;i<2;i++)this._axes[i]=new j;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var i=this._corners,n=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(i[0].set(a,o),i[1].set(s,o),i[2].set(s,l),i[3].set(a,l),e)for(var u=0;u<4;u++)i[u].transform(e);j.sub(n[0],i[1],i[0]),j.sub(n[1],i[3],i[0]),n[0].normalize(),n[1].normalize();for(var u=0;u<2;u++)this._origin[u]=n[u].dot(i[0])},r.prototype.intersect=function(t,e){var i=!0,n=!e;return co.set(1/0,1/0),po.set(0,0),!this._intersectCheckOneSide(this,t,co,po,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,co,po,n,-1)&&(i=!1,n)||n||j.copy(e,i?co:po),i},r.prototype._intersectCheckOneSide=function(t,e,i,n,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,ni),this._getProjMinMaxOnAxis(l,e._corners,ai),ni[1]<ai[0]||ni[0]>ai[1]){if(s=!1,a)return s;var f=Math.abs(ai[0]-ni[1]),h=Math.abs(ni[0]-ai[1]);Math.min(f,h)>n.len()&&(f<h?j.scale(n,u,-f*o):j.scale(n,u,h*o))}else if(i){var f=Math.abs(ai[0]-ni[1]),h=Math.abs(ni[0]-ai[1]);Math.min(f,h)<i.len()&&(f<h?j.scale(i,u,f*o):j.scale(i,u,-h*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u<e.length;u++){var f=e[u].dot(n)+a[t];s=Math.min(f,s),l=Math.max(f,l)}i[0]=s,i[1]=l},r}(),_T=[],ST=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,i){i?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,i){i=i||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],i)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var i=this._cursor;i<this._displayables.length;i++)e&&e(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)e&&e(this._temporaryDisplayables[i])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var i=this._displayables[e];i.parent=this,i.update(),i.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var i=this._temporaryDisplayables[e];i.parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ft(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var n=this._displayables[i],a=n.getBoundingRect().clone();n.needLocalTransform()&&a.applyTransform(n.getLocalTransform(_T)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();if(a.contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,i))return!0}return!1},t}(Ya),bT=_t();function wT(r,t,e,i,n){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,h=void 0;i?(u=et(i.duration,200),f=et(i.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(h=a.delay)),$(h)&&(h=h(e,n)),$(u)&&(u=u(e));var c={duration:u||0,delay:h,easing:f};return c}else return null}function lv(r,t,e,i,n,a,o){var s=!1,l;$(n)?(o=a,a=n,n=null):Y(n)&&(a=n.cb,o=n.during,s=n.isFrom,l=n.removeOpt,n=n.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var f=wT(r,i,n,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,n):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:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,p):t.animateTo(e,p)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function At(r,t,e,i,n,a){lv("update",r,t,e,i,n,a)}function Ft(r,t,e,i,n,a){lv("enter",r,t,e,i,n,a)}function Sa(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function Cs(r,t,e,i,n,a){Sa(r)||lv("leave",r,t,e,i,n,a)}function _p(r,t,e,i){r.removeTextContent(),r.removeTextGuideLine(),Cs(r,{style:{opacity:0}},t,e,i)}function As(r,t,e){function i(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(n){n.isGroup||_p(n,t,e,i)}):_p(r,t,e,i)}function uv(r){bT(r).oldStyle=r.style}var Ds=Math.max,Ls=Math.min,Xf={};function xT(r){return vt.extend(r)}var TT=tT;function MT(r,t){return TT(r,t)}function Ne(r,t){Xf[r]=t}function CT(r){if(Xf.hasOwnProperty(r))return Xf[r]}function fv(r,t,e,i){var n=jx(r,t);return e&&(i==="center"&&(e=Km(e,n.getBoundingRect())),Qm(n,e)),n}function qm(r,t,e){var i=new je({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(n){if(e==="center"){var a={width:n.width,height:n.height};i.setStyle(Km(t,a))}}});return i}function Km(r,t){var e=t.width/t.height,i=r.height*e,n;i<=r.width?n=r.height:(i=r.width,n=i/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-i/2,y:o-n/2,width:i,height:n}}var AT=eT;function Qm(r,t){if(r.applyTransform){var e=r.getBoundingRect(),i=e.calculateTransform(t);r.applyTransform(i)}}function Ia(r,t){return Rm(r,r,{lineWidth:t}),r}function DT(r){return Em(r.shape,r.shape,r.style),r}var LT=ci;function _i(r,t){for(var e=Gh([]);r&&r!==t;)vn(e,r.getLocalTransform(),e),r=r.parent;return e}function Nr(r,t,e){return t&&!te(t)&&(t=Zh.getLocalTransform(t)),e&&(t=Uh([],t)),_e([],r,t)}function ll(r,t,e){var i=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),n=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[r==="left"?-i:r==="right"?i:0,r==="top"?-n:r==="bottom"?n:0];return a=Nr(a,t,e),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Sp(r){return!r.isGroup}function IT(r){return r.shape!=null}function Jm(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){Sp(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return IT(o)&&(s.shape=B({},o.shape)),s}var a=i(r);t.traverse(function(o){if(Sp(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),At(o,l,e,st(o).dataIndex)}}})}function jm(r,t){return H(r,function(e){var i=e[0];i=Ds(i,t.x),i=Ls(i,t.x+t.width);var n=e[1];return n=Ds(n,t.y),n=Ls(n,t.y+t.height),[i,n]})}function PT(r,t){var e=Ds(r.x,t.x),i=Ls(r.x+r.width,t.x+t.width),n=Ds(r.y,t.y),a=Ls(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function ul(r,t,e){var i=B({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),lt(n,e),new je(i)):fv(r.replace("path://",""),i,e,"center")}function RT(r,t,e,i,n){for(var a=0,o=n[n.length-1];a<n.length;a++){var s=n[a];if(t0(r,t,e,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function t0(r,t,e,i,n,a,o,s){var l=e-r,u=i-t,f=o-n,h=s-a,c=yu(f,h,l,u);if(ET(c))return!1;var v=r-n,p=t-a,g=yu(v,p,l,u)/c;if(g<0||g>1)return!1;var d=yu(v,p,f,h)/c;return!(d<0||d>1)}function yu(r,t,e,i){return r*i-e*t}function ET(r){return r<=1e-6&&r>=-1e-6}function fl(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=W(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&A(bt(l),function(f){mn(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=st(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:lt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function bp(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Za(r,t){if(r)if(V(r))for(var e=0;e<r.length;e++)bp(r[e],t);else bp(r,t)}Ne("circle",al);Ne("ellipse",av);Ne("sector",Qe);Ne("ring",ov);Ne("polygon",Hr);Ne("polyline",Oi);Ne("rect",mt);Ne("line",ke);Ne("bezierCurve",ol);Ne("arc",sl);const kT=Object.freeze(Object.defineProperty({__proto__:null,Arc:sl,BezierCurve:ol,BoundingRect:ft,Circle:al,CompoundPath:yT,Ellipse:av,Group:ht,Image:je,IncrementalDisplayable:ST,Line:ke,LinearGradient:sv,OrientedBoundingRect:Ms,Path:vt,Point:j,Polygon:Hr,Polyline:Oi,RadialGradient:mT,Rect:mt,Ring:ov,Sector:Qe,Text:gt,applyTransform:Nr,clipPointsByRect:jm,clipRectByRect:PT,createIcon:ul,extendPath:MT,extendShape:xT,getShapeClass:CT,getTransform:_i,groupTransition:Jm,initProps:Ft,isElementRemoved:Sa,lineLineIntersect:t0,linePolygonIntersect:RT,makeImage:qm,makePath:fv,mergePath:AT,registerShape:Ne,removeElement:Cs,removeElementWithFadeOut:As,resizePath:Qm,setTooltipConfig:fl,subPixelOptimize:LT,subPixelOptimizeLine:Ia,subPixelOptimizeRect:DT,transformDirection:ll,traverseElements:Za,updateProps:At},Symbol.toStringTag,{value:"Module"}));var hl={};function e0(r,t){for(var e=0;e<re.length;e++){var i=re[e],n=t[i],a=r.ensureState(i);a.style=a.style||{},a.style.text=n}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function $f(r,t,e){var i=r.labelFetcher,n=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;i&&(s=i.getFormattedLabel(n,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=$(r.defaultText)?r.defaultText(n,r,e):r.defaultText);for(var l={normal:s},u=0;u<re.length;u++){var f=re[u],h=t[f];l[f]=et(i?i.getFormattedLabel(n,f,null,a,h&&h.get("formatter")):null,s)}return l}function Ni(r,t,e,i){e=e||hl;for(var n=r instanceof gt,a=!1,o=0;o<xs.length;o++){var s=t[xs[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=n?r:r.getTextContent();if(a){n||(l||(l=new gt,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=$f(e,t),f=t.normal,h=!!f.getShallow("show"),c=kt(f,i&&i.normal,e,!1,!n);c.text=u.normal,n||r.setTextConfig(wp(f,e,!1));for(var o=0;o<re.length;o++){var v=re[o],s=t[v];if(s){var p=l.ensureState(v),g=!!et(s.getShallow("show"),h);if(g!==h&&(p.ignore=!g),p.style=kt(s,i&&i[v],e,!0,!n),p.style.text=u[v],!n){var d=r.ensureState(v);d.textConfig=wp(s,e,!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(),e.enableTextSetter&&(Xa(l).setLabelText=function(y){var m=$f(e,t,y);e0(l,m)})}else l&&(l.ignore=!0);r.dirty()}function Gr(r,t){t=t||"label";for(var e={normal:r.getModel(t)},i=0;i<re.length;i++){var n=re[i];e[n]=r.getModel([n,t])}return e}function kt(r,t,e,i,n){var a={};return OT(a,r,e,i,n),t&&B(a,t),a}function wp(r,t,e){t=t||{};var i={},n,a=r.getShallow("rotate"),o=et(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return n=r.getShallow("position")||(e?null:"inside"),n==="outside"&&(n=t.defaultOutsidePosition||"top"),n!=null&&(i.position=n),s!=null&&(i.offset=s),a!=null&&(a*=Math.PI/180,i.rotation=a),o!=null&&(i.distance=o),i.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",i}function OT(r,t,e,i,n){e=e||hl;var a=t.ecModel,o=a&&a.option.textStyle,s=NT(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var f=t.getModel(["rich",u]);Cp(l[u]={},f,o,e,i,n,!1,!0)}}l&&(r.rich=l);var h=t.get("overflow");h&&(r.overflow=h);var c=t.get("minMargin");c!=null&&(r.margin=c),Cp(r,t,o,e,i,n,!0,!1)}function NT(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||hl).rich;if(e){t=t||{};for(var i=bt(e),n=0;n<i.length;n++){var a=i[n];t[a]=1}}r=r.parentModel}return t}var xp=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Tp=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Mp=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Cp(r,t,e,i,n,a,o,s){e=!n&&e||hl;var l=i&&i.inheritColor,u=t.getShallow("color"),f=t.getShallow("textBorderColor"),h=et(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(f==="inherit"||f==="auto")&&(l?f=l:f=null),a||(u=u||e.color,f=f||e.textBorderColor),u!=null&&(r.fill=u),f!=null&&(r.stroke=f);var c=et(t.getShallow("textBorderWidth"),e.textBorderWidth);c!=null&&(r.lineWidth=c);var v=et(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var p=et(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!n&&h==null&&!s&&(h=i&&i.defaultOpacity),h!=null&&(r.opacity=h),!n&&!a&&r.fill==null&&i.inheritColor&&(r.fill=i.inheritColor);for(var g=0;g<xp.length;g++){var d=xp[g],y=et(t.getShallow(d),e[d]);y!=null&&(r[d]=y)}for(var g=0;g<Tp.length;g++){var d=Tp[g],y=t.getShallow(d);y!=null&&(r[d]=y)}if(r.verticalAlign==null){var m=t.getShallow("baseline");m!=null&&(r.verticalAlign=m)}if(!o||!i.disableBox){for(var g=0;g<Mp.length;g++){var d=Mp[g],y=t.getShallow(d);y!=null&&(r[d]=y)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function r0(r,t){var e=t&&t.getModel("textStyle");return Ze([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Xa=_t();function i0(r,t,e,i){if(r){var n=Xa(r);n.prevValue=n.value,n.value=e;var a=t.normal;n.valueAnimation=a.get("valueAnimation"),n.valueAnimation&&(n.precision=a.get("precision"),n.defaultInterpolatedText=i,n.statesModels=t)}}function BT(r,t,e,i,n){var a=Xa(r);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=et(a.interpolatedValue,a.prevValue),l=a.value;function u(f){var h=xm(e,a.precision,s,l,f);a.interpolatedValue=f===1?null:h;var c=$f({labelDataIndex:t,labelFetcher:n,defaultText:o?o(h):h+""},a.statesModels,h);e0(r,c)}r.percent=0,(a.prevValue==null?Ft:At)(r,{percent:1},i,t,null,u)}var zT=["textStyle","color"],mu=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],_u=new gt,VT=function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(zT):null)},r.prototype.getFont=function(){return r0({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<mu.length;i++)e[mu[i]]=this.getShallow(mu[i]);return _u.useStyle(e),_u.update(),_u.getBoundingRect()},r}(),n0=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],FT=La(n0),HT=function(){function r(){}return r.prototype.getLineStyle=function(t){return FT(this,t)},r}(),a0=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],GT=La(a0),WT=function(){function r(){}return r.prototype.getItemStyle=function(t,e){return GT(this,t,e)},r}(),wt=function(){function r(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return r.prototype.init=function(t,e,i){},r.prototype.mergeOption=function(t,e){tt(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var i=this.option,n=i==null?i:i[t];if(n==null&&!e){var a=this.parentModel;a&&(n=a.getShallow(t))}return n},r.prototype.getModel=function(t,e){var i=t!=null,n=i?this.parsePath(t):null,a=i?this._doGet(n):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(n)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(X(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!Q.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var n=0;n<t.length&&!(t[n]&&(i=i&&typeof i=="object"?i[t[n]]:null,i==null));n++);return i==null&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},r}();Qh(wt);Ow(wt);Oe(wt,HT);Oe(wt,WT);Oe(wt,Fw);Oe(wt,VT);var UT=Math.round(Math.random()*10);function $a(r){return[r||"",UT++].join("_")}function YT(r){var t={};r.registerSubTypeDefaulter=function(e,i){var n=$e(e);t[n.main]=i},r.determineSubType=function(e,i){var n=i.type;if(!n){var a=$e(e).main;r.hasSubTypes(e)&&t[a]&&(n=t[a](i))}return n}}function ZT(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),f=u.graph,h=u.noEntryList,c={};for(A(a,function(m){c[m]=!0});h.length;){var v=h.pop(),p=f[v],g=!!c[v];g&&(s.call(l,v,p.originalDeps.slice()),delete c[v]),A(p.successor,g?y:d)}A(c,function(){var m="";throw new Error(m)});function d(m){f[m].entryCount--,f[m].entryCount===0&&h.push(m)}function y(m){c[m]=!0,d(m)}};function e(a){var o={},s=[];return A(a,function(l){var u=i(o,l),f=u.originalDeps=t(l),h=n(f,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),A(h,function(c){ot(u.predecessor,c)<0&&u.predecessor.push(c);var v=i(o,c);ot(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function i(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function n(a,o){var s=[];return A(a,function(l){ot(o,l)>=0&&s.push(l)}),s}}function Mn(r,t){return tt(tt({},r,!0),t,!0)}const XT={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",custom:"Custom chart",chart:"Chart"}},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:". "}}}},$T={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}};var Is="ZH",hv="EN",pn=hv,ns={},vv={},o0=Q.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||pn).toUpperCase();return r.indexOf(Is)>-1?Is:pn}():pn;function s0(r,t){r=r.toUpperCase(),vv[r]=new wt(t),ns[r]=t}function qT(r){if(W(r)){var t=ns[r.toUpperCase()]||{};return r===Is||r===hv?X(t):tt(X(t),X(ns[pn]),!1)}else return tt(X(r),X(ns[pn]),!1)}function KT(r){return vv[r]}function QT(){return vv[pn]}s0(hv,XT);s0(Is,$T);var cv=1e3,pv=cv*60,ba=pv*60,me=ba*24,Ap=me*365,la={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}"},go="{yyyy}-{MM}-{dd}",Dp={year:"{yyyy}",month:"{yyyy}-{MM}",day:go,hour:go+" "+la.hour,minute:go+" "+la.minute,second:go+" "+la.second,millisecond:la.none},Su=["year","month","day","hour","minute","second","millisecond"],l0=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Sr(r,t){return r+="","0000".substr(0,t-r.length)+r}function dn(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 JT(r){return r===dn(r)}function jT(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function vl(r,t,e,i){var n=pr(r),a=n[dv(e)](),o=n[gn(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[cl(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[Pa(e)](),h=(f-1)%12+1,c=n[pl(e)](),v=n[dl(e)](),p=n[gl(e)](),g=f>=12?"pm":"am",d=g.toUpperCase(),y=i instanceof wt?i:KT(i||o0)||QT(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),w=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,d+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Sr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Sr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Sr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Sr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Sr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Sr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Sr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Sr(p,3)).replace(/{S}/g,p+"")}function tM(r,t,e,i,n){var a=null;if(W(e))a=e;else if($(e))a=e(r.value,t,{level:r.level});else{var o=B({},la);if(r.level>0)for(var s=0;s<Su.length;++s)o[Su[s]]="{primary|"+o[Su[s]]+"}";var l=e?e.inherit===!1?e:lt(e,o):o,u=u0(r.value,n);if(l[u])a=l[u];else if(l.inherit){for(var f=l0.indexOf(u),s=f-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(V(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return vl(new Date(r.value),a,n,i)}function u0(r,t){var e=pr(r),i=e[gn(t)]()+1,n=e[cl(t)](),a=e[Pa(t)](),o=e[pl(t)](),s=e[dl(t)](),l=e[gl(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&n===1,p=v&&i===1;return p?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Lp(r,t,e){var i=yt(r)?pr(r):r;switch(t=t||u0(r,e),t){case"year":return i[dv(e)]();case"half-year":return i[gn(e)]()>=6?1:0;case"quarter":return Math.floor((i[gn(e)]()+1)/4);case"month":return i[gn(e)]();case"day":return i[cl(e)]();case"half-day":return i[Pa(e)]()/24;case"hour":return i[Pa(e)]();case"minute":return i[pl(e)]();case"second":return i[dl(e)]();case"millisecond":return i[gl(e)]()}}function dv(r){return r?"getUTCFullYear":"getFullYear"}function gn(r){return r?"getUTCMonth":"getMonth"}function cl(r){return r?"getUTCDate":"getDate"}function Pa(r){return r?"getUTCHours":"getHours"}function pl(r){return r?"getUTCMinutes":"getMinutes"}function dl(r){return r?"getUTCSeconds":"getSeconds"}function gl(r){return r?"getUTCMilliseconds":"getMilliseconds"}function eM(r){return r?"setUTCFullYear":"setFullYear"}function f0(r){return r?"setUTCMonth":"setMonth"}function h0(r){return r?"setUTCDate":"setDate"}function v0(r){return r?"setUTCHours":"setHours"}function c0(r){return r?"setUTCMinutes":"setMinutes"}function p0(r){return r?"setUTCSeconds":"setSeconds"}function d0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function g0(r){if(!cw(r))return W(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function y0(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var qa=Uy;function qf(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&Ze(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?pr(r):r;if(isNaN(+l)){if(s)return"-"}else return vl(l,i,e)}if(t==="ordinal")return mf(r)?n(r):yt(r)&&a(r)?r+"":"-";var u=Ss(r);return a(u)?g0(u):mf(r)?n(r):typeof r=="boolean"?r+"":"-"}var Ip=["a","b","c","d","e","f","g"],bu=function(r,t){return"{"+r+(t??"")+"}"};function m0(r,t,e){V(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a<n.length;a++){var o=Ip[a];r=r.replace(bu(o),bu(o,0))}for(var s=0;s<i;s++)for(var l=0;l<n.length;l++){var u=t[s][n[l]];r=r.replace(bu(Ip[l],s),e?oe(u):u)}return r}function rM(r,t){var e=W(r)?{color:r,extraCssText:t}:r||{},i=e.color,n=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!i)return"";if(a==="html")return n==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+oe(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+oe(i)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|}  ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Li(r,t){return t=t||"transparent",W(r)?r:Y(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Pp(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var as=A,iM=["left","right","top","bottom","width","height"],yo=[["width","left","right"],["height","top","bottom"]];function gv(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,p;if(r==="horizontal"){var g=f.width+(c?-c.x+f.x:0);v=a+g,v>i||l.newline?(a=0,v=g,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var d=f.height+(c?-c.y+f.y:0);p=o+d,p>n||l.newline?(a+=s+e,o=0,p=d,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=p+e)})}var Si=gv;it(gv,"vertical");it(gv,"horizontal");function Je(r,t,e){e=qa(e||0);var i=t.width,n=t.height,a=q(r.left,i),o=q(r.top,n),s=q(r.right,i),l=q(r.bottom,n),u=q(r.width,i),f=q(r.height,n),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-c-a),isNaN(f)&&(f=n-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>i/n?u=i*.8:f=n*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=i-s-u-c),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=i-c-a-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var p=new ft(a+e[3],o+e[0],u,f);return p.margin=e,p}function _0(r,t,e,i,n,a){a=a||r,a.x=r.x,a.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=Je(lt({width:o.width,height:o.height},t),e,i),u=l.x-o.x,f=l.y-o.y;return a.x+=u,a.y+=f,a===r&&r.markRedraw(),!0}function Ra(r){var t=r.layoutMode||r.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function _n(r,t,e){var i=e&&e.ignoreSize;!V(i)&&(i=[i,i]);var n=o(yo[0],0),a=o(yo[1],1);u(yo[0],r,n),u(yo[1],r,a);function o(f,h){var c={},v=0,p={},g=0,d=2;if(as(f,function(_){p[_]=r[_]}),as(f,function(_){s(t,_)&&(c[_]=p[_]=t[_]),l(c,_)&&v++,l(p,_)&&g++}),i[h])return l(t,f[1])?p[f[2]]=null:l(t,f[2])&&(p[f[1]]=null),p;if(g===d||!v)return p;if(v>=d)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){as(f,function(v){h[v]=c[v]})}}function Ka(r){return nM({},r)}function nM(r,t){return t&&r&&as(iM,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var aM=_t(),ut=function(r){O(t,r);function t(e,i,n){var a=r.call(this,e,i,n)||this;return a.uid=$a("ec_cpt_model"),a}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Ra(this),a=n?Ka(e):{},o=i.getTheme();tt(e,o.get(this.mainType)),tt(e,this.getDefaultOption()),n&&_n(e,a,n)},t.prototype.mergeOption=function(e,i){tt(this.option,e,!0);var n=Ra(this);n&&_n(this.option,e,n)},t.prototype.optionUpdated=function(e,i){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Rw(e))return e.defaultOption;var i=aM(this);if(!i.defaultOption){for(var n=[],a=e;a;){var o=a.prototype.defaultOption;o&&n.push(o),a=a.superClass}for(var s={},l=n.length-1;l>=0;l--)s=tt(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return Ua(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(wt);Mm(ut,wt);js(ut);YT(ut);ZT(ut,oM);function oM(r){var t=[];return A(ut.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=H(t,function(e){return $e(e).main}),r!=="dataset"&&ot(t,"dataset")<=0&&t.unshift("dataset"),t}var S0="";typeof navigator<"u"&&(S0=navigator.platform||"");var Xi="rgba(0, 0, 0, 0.2)";const sM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Xi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Xi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Xi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Xi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Xi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Xi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:S0.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 b0=K(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),xe="original",ie="arrayRows",Be="objectRows",tr="keyedColumns",Br="typedArray",w0="unknown",vr="column",Cn="row",Pt={Must:1,Might:2,Not:3},x0=_t();function lM(r){x0(r).datasetMap=K()}function uM(r,t,e){var i={},n=yv(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=x0(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),A(r,function(g,d){var y=Y(g)?g:r[d]={name:g};y.type==="ordinal"&&f==null&&(f=d,h=p(y)),i[y.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});A(r,function(g,d){var y=g.name,m=p(g);if(f==null){var _=c.valueWayDim;v(i[y],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===d)v(i[y],0,m),v(a,0,m);else{var _=c.categoryWayDim;v(i[y],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(g,d,y){for(var m=0;m<y;m++)g.push(d+m)}function p(g){var d=g.dimsDef;return d?d.length:1}return a.length&&(i.itemName=a),o.length&&(i.seriesName=o),i}function fM(r,t,e){var i={},n=yv(r);if(!n)return i;var a=t.sourceFormat,o=t.dimensionsDefine,s;(a===Be||a===tr)&&A(o,function(f,h){(Y(f)?f.name:f)==="name"&&(s=h)});var l=function(){for(var f={},h={},c=[],v=0,p=Math.min(5,e);v<p;v++){var g=M0(t.data,a,t.seriesLayoutBy,o,t.startIndex,v);c.push(g);var d=g===Pt.Not;if(d&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v||!d&&c[f.n]===Pt.Not)&&(f.n=v),y(f)&&c[f.n]!==Pt.Not)return f;d||(g===Pt.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){i.value=[l.v];var u=s??l.n;i.itemName=[u],i.seriesName=[u]}return i}function yv(r){var t=r.get("data",!0);if(!t)return Ua(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Yt).models[0]}function hM(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Ua(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Yt).models}function T0(r,t){return M0(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function M0(r,t,e,i,n,a){var o,s=5;if(ee(r))return Pt.Not;var l,u;if(i){var f=i[a];Y(f)?(l=f.name,u=f.type):W(f)&&(l=f)}if(u!=null)return u==="ordinal"?Pt.Must:Pt.Not;if(t===ie){var h=r;if(e===Cn){for(var c=h[a],v=0;v<(c||[]).length&&v<s;v++)if((o=S(c[n+v]))!=null)return o}else for(var v=0;v<h.length&&v<s;v++){var p=h[n+v];if(p&&(o=S(p[a]))!=null)return o}}else if(t===Be){var g=r;if(!l)return Pt.Not;for(var v=0;v<g.length&&v<s;v++){var d=g[v];if(d&&(o=S(d[l]))!=null)return o}}else if(t===tr){var y=r;if(!l)return Pt.Not;var c=y[l];if(!c||ee(c))return Pt.Not;for(var v=0;v<c.length&&v<s;v++)if((o=S(c[v]))!=null)return o}else if(t===xe)for(var m=r,v=0;v<m.length&&v<s;v++){var d=m[v],_=Wa(d);if(!V(_))return Pt.Not;if((o=S(_[a]))!=null)return o}function S(w){var b=W(w);if(w!=null&&Number.isFinite(Number(w))&&w!=="")return b?Pt.Might:Pt.Not;if(b&&w!=="-")return Pt.Must}return Pt.Not}var Kf=K();function vM(r,t){Ee(Kf.get(r)==null&&t),Kf.set(r,t)}function cM(r,t,e){var i=Kf.get(t);if(!i)return e;var n=i(r);return n?e.concat(n):e}var Rp=_t();_t();var mv=function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,i){var n=Ot(this.get("color",!0)),a=this.get("colorLayer",!0);return dM(this,Rp,n,a,t,e,i)},r.prototype.clearColorPalette=function(){gM(this,Rp)},r}();function pM(r,t){for(var e=r.length,i=0;i<e;i++)if(r[i].length>t)return r[i];return r[e-1]}function dM(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!i?e:pM(i,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function gM(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var mo,Hn,Ep,kp="\0_ec_inner",yM=1,_v=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new wt(a),this._locale=new wt(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=Bp(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,Bp(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?Ep(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=K(),u=i&&i.replaceMergeMainTypeMap;lM(this),A(e,function(h,c){h!=null&&(ut.hasClass(c)?c&&(s.push(c),l.set(c,!0)):n[c]=n[c]==null?X(h):tt(n[c],h,!0))}),u&&u.each(function(h,c){ut.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ut.topologicalTravel(s,ut.getAllClassMainTypes(),f,this);function f(h){var c=cM(this,h,Ot(e[h])),v=a.get(h),p=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=dw(v,c,p);xw(g,h,ut),n[h]=null,a.set(h,null),o.set(h,0);var d=[],y=[],m=0,_;A(g,function(S,w){var b=S.existing,x=S.newOption;if(!x)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var M=h==="series",C=ut.getClass(h,S.keyInfo.subType,!M);if(!C)return;if(h==="tooltip"){if(_)return;_=!0}if(b&&b.constructor===C)b.name=S.keyInfo.name,b.mergeOption(x,this),b.optionUpdated(x,!1);else{var T=B({componentIndex:w},S.keyInfo);b=new C(x,this,this,T),B(b,T),S.brandNew&&(b.__requireNewView=!0),b.init(x,this,this),b.optionUpdated(null,!0)}}b?(d.push(b.option),y.push(b),m++):(d.push(void 0),y.push(void 0))},this),n[h]=d,a.set(h,y),o.set(h,m),h==="series"&&mo(this)}this._seriesIndices||mo(this)},t.prototype.getOption=function(){var e=X(this.option);return A(e,function(i,n){if(ut.hasClass(n)){for(var a=Ot(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Da(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[kp],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o<n.length;o++)if(n[o])return n[o]}}},t.prototype.queryComponents=function(e){var i=e.mainType;if(!i)return[];var n=e.index,a=e.id,o=e.name,s=this._componentsMap.get(i);if(!s||!s.length)return[];var l;return n!=null?(l=[],A(Ot(n),function(u){s[u]&&l.push(s[u])})):a!=null?l=Op("id",a,s):o!=null?l=Op("name",o,s):l=Lt(s,function(u){return!!u}),Np(l,e)},t.prototype.findComponents=function(e){var i=e.query,n=e.mainType,a=s(i),o=a?this.queryComponents(a):Lt(this._componentsMap.get(n),function(u){return!!u});return l(Np(o,e));function s(u){var f=n+"Index",h=n+"Id",c=n+"Name";return u&&(u[f]!=null||u[h]!=null||u[c]!=null)?{mainType:n,index:u[f],id:u[h],name:u[c]}:null}function l(u){return e.filter?Lt(u,e.filter):u}},t.prototype.eachComponent=function(e,i,n){var a=this._componentsMap;if($(e)){var o=i,s=e;a.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(e)?a.get(e):Y(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var f=l[u];f&&i.call(n,f,f.componentIndex)}},t.prototype.getSeriesByName=function(e){var i=Re(e,null);return Lt(this._componentsMap.get("series"),function(n){return!!n&&i!=null&&n.name===i})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Lt(this._componentsMap.get("series"),function(i){return!!i&&i.subType===e})},t.prototype.getSeries=function(){return Lt(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,i){Hn(this),A(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];e.call(i,a,n)},this)},t.prototype.eachRawSeries=function(e,i){A(this._componentsMap.get("series"),function(n){n&&e.call(i,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,i,n){Hn(this),A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&i.call(n,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,i,n){return A(this.getSeriesByType(e),i,n)},t.prototype.isSeriesFiltered=function(e){return Hn(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,i){Hn(this);var n=[];A(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(i,o,a)&&n.push(a)},this),this._seriesIndices=n,this._seriesIndicesMap=K(n)},t.prototype.restoreData=function(e){mo(this);var i=this._componentsMap,n=[];i.each(function(a,o){ut.hasClass(o)&&n.push(o)}),ut.topologicalTravel(n,ut.getAllClassMainTypes(),function(a){A(i.get(a),function(o){o&&(a!=="series"||!mM(o,e))&&o.restoreData()})})},t.internalField=function(){mo=function(e){var i=e._seriesIndices=[];A(e._componentsMap.get("series"),function(n){n&&i.push(n.componentIndex)}),e._seriesIndicesMap=K(i)},Hn=function(e){},Ep=function(e,i){e.option={},e.option[kp]=yM,e._componentsMap=K({series:[]}),e._componentsCount=K();var n=i.aria;Y(n)&&n.enabled==null&&(n.enabled=!0),_M(i,e._theme.option),tt(i,sM,!1),e._mergeOption(i,null)}}(),t}(wt);function mM(r,t){if(t){var e=t.seriesIndex,i=t.seriesId,n=t.seriesName;return e!=null&&r.componentIndex!==e||i!=null&&r.id!==i||n!=null&&r.name!==n}}function _M(r,t){var e=r.color&&!r.colorLayer;A(t,function(i,n){n==="colorLayer"&&e||ut.hasClass(n)||(typeof i=="object"?r[n]=r[n]?tt(r[n],i,!1):X(i):r[n]==null&&(r[n]=i))})}function Op(r,t,e){if(V(t)){var i=K();return A(t,function(a){if(a!=null){var o=Re(a,null);o!=null&&i.set(a,!0)}}),Lt(e,function(a){return a&&i.get(a[r])})}else{var n=Re(t,null);return Lt(e,function(a){return a&&n!=null&&a[r]===n})}}function Np(r,t){return t.hasOwnProperty("subType")?Lt(r,function(e){return e&&e.subType===t.subType}):r}function Bp(r){var t=K();return r&&A(Ot(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Oe(_v,mv);var SM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],C0=function(){function r(t){A(SM,function(e){this[e]=U(t[e],t)},this)}return r}(),wu={},Sv=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var i=[];A(wu,function(n,a){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},r.prototype.update=function(t,e){A(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){wu[t]=e},r.get=function(t){return wu[t]},r}(),bM=/^(min|max)?(.+)$/,wM=function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,i){t&&(A(Ot(t.series),function(o){o&&o.data&&ee(o.data)&&_f(o.data)}),A(Ot(t.dataset),function(o){o&&o.source&&ee(o.source)&&_f(o.source)})),t=X(t);var n=this._optionBackup,a=xM(t,e,!n);this._newBaseOption=a.baseOption,n?(a.timelineOptions.length&&(n.timelineOptions=a.timelineOptions),a.mediaList.length&&(n.mediaList=a.mediaList),a.mediaDefault&&(n.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],X(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=X(i[n.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!n.length&&!a)return s;for(var l=0,u=n.length;l<u;l++)TM(n[l].query,e,i)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!CM(o,this._currentMediaIndices)&&(s=H(o,function(f){return X(f===-1?a.option:n[f].option)})),this._currentMediaIndices=o,s},r}();function xM(r,t,e){var i=[],n,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||f)&&(r.options=r.media=null),a=r),f&&V(u)&&A(u,function(v){v&&v.option&&(v.query?i.push(v):n||(n=v))}),c(a),A(l,function(v){return c(v)}),A(i,function(v){return c(v.option)});function c(v){A(t,function(p){p(v,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:n,mediaList:i}}function TM(r,t,e){var i={width:t,height:e,aspectratio:t/e},n=!0;return A(r,function(a,o){var s=o.match(bM);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();MM(i[u],a,l)||(n=!1)}}),n}function MM(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function CM(r,t){return r.join(",")===t.join(",")}var Te=A,Ea=Y,zp=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xu(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=zp.length;e<i;e++){var n=zp[e],a=t.normal,o=t.emphasis;a&&a[n]&&(r[n]=r[n]||{},r[n].normal?tt(r[n].normal,a[n]):r[n].normal=a[n],a[n]=null),o&&o[n]&&(r[n]=r[n]||{},r[n].emphasis?tt(r[n].emphasis,o[n]):r[n].emphasis=o[n],o[n]=null)}}function zt(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var i=r[t].normal,n=r[t].emphasis;i&&(e?(r[t].normal=r[t].emphasis=null,lt(r[t],i)):r[t]=i),n&&(r.emphasis=r.emphasis||{},r.emphasis[t]=n,n.focus&&(r.emphasis.focus=n.focus),n.blurScope&&(r.emphasis.blurScope=n.blurScope))}}function ua(r){zt(r,"itemStyle"),zt(r,"lineStyle"),zt(r,"areaStyle"),zt(r,"label"),zt(r,"labelLine"),zt(r,"upperLabel"),zt(r,"edgeLabel")}function Ct(r,t){var e=Ea(r)&&r[t],i=Ea(e)&&e.textStyle;if(i)for(var n=0,a=Hc.length;n<a;n++){var o=Hc[n];i.hasOwnProperty(o)&&(e[o]=i[o])}}function ce(r){r&&(ua(r),Ct(r,"label"),r.emphasis&&Ct(r.emphasis,"label"))}function AM(r){if(Ea(r)){xu(r),ua(r),Ct(r,"label"),Ct(r,"upperLabel"),Ct(r,"edgeLabel"),r.emphasis&&(Ct(r.emphasis,"label"),Ct(r.emphasis,"upperLabel"),Ct(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(xu(t),ce(t));var e=r.markLine;e&&(xu(e),ce(e));var i=r.markArea;i&&ce(i);var n=r.data;if(r.type==="graph"){n=n||r.nodes;var a=r.links||r.edges;if(a&&!ee(a))for(var o=0;o<a.length;o++)ce(a[o]);A(r.categories,function(u){ua(u)})}if(n&&!ee(n))for(var o=0;o<n.length;o++)ce(n[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)ce(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)V(l[o])?(ce(l[o][0]),ce(l[o][1])):ce(l[o]);r.type==="gauge"?(Ct(r,"axisLabel"),Ct(r,"title"),Ct(r,"detail")):r.type==="treemap"?(zt(r.breadcrumb,"itemStyle"),A(r.levels,function(u){ua(u)})):r.type==="tree"&&ua(r.leaves)}}function ar(r){return V(r)?r:r?[r]:[]}function Vp(r){return(V(r)?r[0]:r)||{}}function DM(r,t){Te(ar(r.series),function(i){Ea(i)&&AM(i)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Te(e,function(i){Te(ar(r[i]),function(n){n&&(Ct(n,"axisLabel"),Ct(n.axisPointer,"label"))})}),Te(ar(r.parallel),function(i){var n=i&&i.parallelAxisDefault;Ct(n,"axisLabel"),Ct(n&&n.axisPointer,"label")}),Te(ar(r.calendar),function(i){zt(i,"itemStyle"),Ct(i,"dayLabel"),Ct(i,"monthLabel"),Ct(i,"yearLabel")}),Te(ar(r.radar),function(i){Ct(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),Te(ar(r.geo),function(i){Ea(i)&&(ce(i),Te(ar(i.regions),function(n){ce(n)}))}),Te(ar(r.timeline),function(i){ce(i),zt(i,"label"),zt(i,"itemStyle"),zt(i,"controlStyle",!0);var n=i.data;V(n)&&A(n,function(a){Y(a)&&(zt(a,"label"),zt(a,"itemStyle"))})}),Te(ar(r.toolbox),function(i){zt(i,"iconStyle"),Te(i.feature,function(n){zt(n,"iconStyle")})}),Ct(Vp(r.axisPointer),"label"),Ct(Vp(r.tooltip).axisPointer,"label")}function LM(r,t){for(var e=t.split(","),i=r,n=0;n<e.length&&(i=i&&i[e[n]],i!=null);n++);return i}function IM(r,t,e,i){for(var n=t.split(","),a=r,o,s=0;s<n.length-1;s++)o=n[s],a[o]==null&&(a[o]={}),a=a[o];a[n[s]]==null&&(a[n[s]]=e)}function Fp(r){r&&A(PM,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var PM=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],RM=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Tu=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Gn(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Tu.length;e++){var i=Tu[e][1],n=Tu[e][0];t[i]!=null&&(t[n]=t[i])}}function Hp(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function Gp(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function EM(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function A0(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&A0(r[e].children,t)}function D0(r,t){DM(r,t),r.series=Ot(r.series),A(r.series,function(e){if(Y(e)){var i=e.type;if(i==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(i==="pie"||i==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),Hp(e.label);var n=e.data;if(n&&!ee(n))for(var a=0;a<n.length;a++)Hp(n[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(i==="gauge"){var o=LM(e,"pointer.color");o!=null&&IM(e,"itemStyle.color",o)}else if(i==="bar"){Gn(e),Gn(e.backgroundStyle),Gn(e.emphasis);var n=e.data;if(n&&!ee(n))for(var a=0;a<n.length;a++)typeof n[a]=="object"&&(Gn(n[a]),Gn(n[a]&&n[a].emphasis))}else if(i==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),Gp(e),A0(e.data,Gp)}else i==="graph"||i==="sankey"?EM(e):i==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&lt(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),Fp(e)}}),r.dataRange&&(r.visualMap=r.dataRange),A(RM,function(e){var i=r[e];i&&(V(i)||(i=[i]),A(i,function(n){Fp(n)}))})}function kM(r){var t=K();r.eachSeries(function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),t.each(OM)}function OM(r){A(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,f,h){var c=o.get(t.stackedDimension,h);if(isNaN(c))return n;var v,p;s?p=o.getRawIndex(h):v=o.get(t.stackedByDimension,h);for(var g=NaN,d=e-1;d>=0;d--){var y=r[d];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=fw(c,m),g=m;break}}}return i[0]=c,i[1]=g,i})})}var yl=function(){function r(t){this.data=t.data||(t.sourceFormat===tr?{}:[]),this.sourceFormat=t.sourceFormat||w0,this.seriesLayoutBy=t.seriesLayoutBy||vr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;i<e.length;i++){var n=e[i];n.type==null&&T0(this,i)===Pt.Must&&(n.type="ordinal")}}return r}();function bv(r){return r instanceof yl}function Qf(r,t,e){e=e||I0(r);var i=t.seriesLayoutBy,n=BM(r,e,i,t.sourceHeader,t.dimensions),a=new yl({data:r,sourceFormat:e,seriesLayoutBy:i,dimensionsDefine:n.dimensionsDefine,startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount,metaRawOption:X(t)});return a}function L0(r){return new yl({data:r,sourceFormat:ee(r)?Br:xe})}function NM(r){return new yl({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:X(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function I0(r){var t=w0;if(ee(r))t=Br;else if(V(r)){r.length===0&&(t=ie);for(var e=0,i=r.length;e<i;e++){var n=r[e];if(n!=null){if(V(n)||ee(n)){t=ie;break}else if(Y(n)){t=Be;break}}}}else if(Y(r)){for(var a in r)if(mn(r,a)&&te(r[a])){t=tr;break}}return t}function BM(r,t,e,i,n){var a,o;if(!r)return{dimensionsDefine:Wp(n),startIndex:o,dimensionsDetectedCount:a};if(t===ie){var s=r;i==="auto"||i==null?Up(function(u){u!=null&&u!=="-"&&(W(u)?o==null&&(o=1):o=0)},e,s,10):o=yt(i)?i:i?1:0,!n&&o===1&&(n=[],Up(function(u,f){n[f]=u!=null?u+"":""},e,s,1/0)),a=n?n.length:e===Cn?s.length:s[0]?s[0].length:null}else if(t===Be)n||(n=zM(r));else if(t===tr)n||(n=[],A(r,function(u,f){n.push(f)}));else if(t===xe){var l=Wa(r[0]);a=V(l)&&l.length||1}return{startIndex:o,dimensionsDefine:Wp(n),dimensionsDetectedCount:a}}function zM(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return bt(e)}function Wp(r){if(r){var t=K();return H(r,function(e,i){e=Y(e)?e:{name:e};var n={name:e.name,displayName:e.displayName,type:e.type};if(n.name==null)return n;n.name+="",n.displayName==null&&(n.displayName=n.name);var a=t.get(n.name);return a?n.name+="-"+a.count++:t.set(n.name,{count:1}),n})}}function Up(r,t,e,i){if(t===Cn)for(var n=0;n<e.length&&n<i;n++)r(e[n]?e[n][0]:null,n);else for(var a=e[0]||[],n=0;n<a.length&&n<i;n++)r(a[n],n)}function P0(r){var t=r.sourceFormat;return t===Be||t===tr}var oi,si,li,Yp,Zp,R0=function(){function r(t,e){var i=bv(t)?t:L0(t);this._source=i;var n=this._data=i.data;i.sourceFormat===Br&&(this._offset=0,this._dimSize=e,this._data=n),Zp(this,n,i)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=function(){var t=r.prototype;t.pure=!1,t.persistent=!0}(),r.internalField=function(){var t;Zp=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,h=l.startIndex,c=l.dimensionsDefine,v=Yp[wv(u,f)];if(B(o,v),u===Br)o.getItem=e,o.count=n,o.fillStorage=i;else{var p=E0(u,f);o.getItem=U(p,null,s,h,c);var g=k0(u,f);o.count=U(g,null,s,h,c)}};var e=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},i=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],g=v[1]==null?-1/0:v[1],d=s-o,y=l[c],m=0;m<d;m++){var _=f[m*h+c];y[o+m]=_,_<p&&(p=_),_>g&&(g=_)}v[0]=p,v[1]=g}},n=function(){return this._data?this._data.length/this._dimSize:0};Yp=(t={},t[ie+"_"+vr]={pure:!0,appendData:a},t[ie+"_"+Cn]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Be]={pure:!0,appendData:a},t[tr]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[xe]={appendData:a},t[Br]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),Xp=function(r,t,e,i){return r[i]},VM=(oi={},oi[ie+"_"+vr]=function(r,t,e,i){return r[i+t]},oi[ie+"_"+Cn]=function(r,t,e,i,n){i+=t;for(var a=n||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[i]:null}return a},oi[Be]=Xp,oi[tr]=function(r,t,e,i,n){for(var a=n||[],o=0;o<e.length;o++){var s=e[o].name,l=r[s];a[o]=l?l[i]:null}return a},oi[xe]=Xp,oi);function E0(r,t){var e=VM[wv(r,t)];return e}var $p=function(r,t,e){return r.length},FM=(si={},si[ie+"_"+vr]=function(r,t,e){return Math.max(0,r.length-t)},si[ie+"_"+Cn]=function(r,t,e){var i=r[0];return i?Math.max(0,i.length-t):0},si[Be]=$p,si[tr]=function(r,t,e){var i=e[0].name,n=r[i];return n?n.length:0},si[xe]=$p,si);function k0(r,t){var e=FM[wv(r,t)];return e}var Mu=function(r,t,e){return r[t]},HM=(li={},li[ie]=Mu,li[Be]=function(r,t,e){return r[e]},li[tr]=Mu,li[xe]=function(r,t,e){var i=Wa(r);return i instanceof Array?i[t]:i},li[Br]=Mu,li);function O0(r){var t=HM[r];return t}function wv(r,t){return r===ie?r+"_"+t:r}function Sn(r,t,e){if(r){var i=r.getRawDataItem(t);if(i!=null){var n=r.getStore(),a=n.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=n.getDimensionProperty(o);return O0(a)(i,o,s)}else{var l=i;return a===xe&&(l=Wa(i)),l}}}}var GM=/\{@(.+?)\}/g,xv=function(){function r(){}return r.prototype.getDataParams=function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t),s=i.getRawDataItem(t),l=i.getItemVisual(t,"style"),u=l&&l[i.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,h=this.mainType,c=h==="series",v=i.userOutput&&i.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:a,data:s,dataType:e,value:n,color:u,borderColor:f,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,i,n,a,o){e=e||"normal";var s=this.getData(i),l=this.getDataParams(t,i);if(o&&(l.value=o.interpolatedValue),n!=null&&V(l.value)&&(l.value=l.value[n]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if($(a))return l.status=e,l.dimensionIndex=n,a(l);if(W(a)){var f=m0(a,l);return f.replace(GM,function(h,c){var v=c.length,p=c;p.charAt(0)==="["&&p.charAt(v-1)==="]"&&(p=+p.slice(1,v-1));var g=Sn(s,t,p);if(o&&V(o.interpolatedValue)){var d=s.getDimensionIndex(p);d>=0&&(g=o.interpolatedValue[d])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(t,e){return Sn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r}();function qp(r){var t,e;return Y(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function wa(r){return new WM(r)}var WM=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?this._dueEnd=e._outputDueEnd: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(!i&&(h||v<p)){var g=this._progress;if(V(g))for(var d=0;d<g.length;d++)this._doProgress(g[d],v,p,l,u);else this._doProgress(g,v,p,l,u)}this._dueIndex=p;var y=this._settedOutputEnd!=null?this._settedOutputEnd:p;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(t,e,i,n,a){Kp.reset(e,i,n,a),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:Kp.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,i;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(i=e.forceFirstProgress,e=e.progress),V(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),i},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.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(t){this._outputDueEnd=this._settedOutputEnd=t},r}(),Kp=function(){var r,t,e,i,n,a={reset:function(l,u,f,h){t=l,r=u,e=f,i=h,n=Math.ceil(i/e),a.next=e>1&&i>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%n*e+Math.ceil(t/n),u=t>=r?null:l<i?l:t;return t++,u}}();function zr(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!yt(r)&&r!=null&&r!=="-"&&(r=+pr(r)),r==null||r===""?NaN:Number(r))}K({number:function(r){return parseFloat(r)},time:function(r){return+pr(r)},trim:function(r){return W(r)?Ze(r):r}});var UM=function(){function r(t,e){var i=t==="desc";this._resultLT=i?1:-1,e==null&&(e=i?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var i=yt(t)?t:Ss(t),n=yt(e)?e:Ss(e),a=isNaN(i),o=isNaN(n);if(a&&(i=this._incomparable),o&&(n=this._incomparable),a&&o){var s=W(t),l=W(e);s&&(i=l?t:0),l&&(n=s?e:0)}return i<n?this._resultLT:i>n?-this._resultLT:0},r}(),YM=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return zr(t,e)},r}();function ZM(r,t){var e=new YM,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==vr&&Jt(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(g,d){var y=g.name,m={index:d,name:y,displayName:g.displayName};if(s.push(m),y!=null){var _="";mn(l,y)&&Jt(_),l[y]=m}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var h=E0(n,vr);t.__isBuiltIn&&(e.getRawDataItem=function(g){return h(i,a,s,g)},e.getRawData=U(XM,null,r)),e.cloneRawData=U($M,null,r);var c=k0(n,vr);e.count=U(c,null,i,a,s);var v=O0(n);e.retrieveValue=function(g,d){var y=h(i,a,s,g);return p(y,d)};var p=e.retrieveValueFromItem=function(g,d){if(g!=null){var y=s[d];if(y)return v(g,d,y.name)}};return e.getDimensionInfo=U(qM,null,s,l),e.cloneAllDimensionInfo=U(KM,null,s),e}function XM(r){var t=r.sourceFormat;if(!Tv(t)){var e="";Jt(e)}return r.data}function $M(r){var t=r.sourceFormat,e=r.data;if(!Tv(t)){var i="";Jt(i)}if(t===ie){for(var n=[],a=0,o=e.length;a<o;a++)n.push(e[a].slice());return n}else if(t===Be){for(var n=[],a=0,o=e.length;a<o;a++)n.push(B({},e[a]));return n}}function qM(r,t,e){if(e!=null){if(yt(e)||!isNaN(e)&&!mn(t,e))return r[e];if(mn(t,e))return t[e]}}function KM(r){return X(r)}var N0=K();function QM(r){r=X(r);var t=r.type,e="";t||Jt(e);var i=t.split(":");i.length!==2&&Jt(e);var n=!1;i[0]==="echarts"&&(t=i[1],n=!0),r.__isBuiltIn=n,N0.set(t,r)}function JM(r,t,e){var i=Ot(r),n=i.length,a="";n||Jt(a);for(var o=0,s=n;o<s;o++){var l=i[o];t=jM(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function jM(r,t,e,i){var n="";t.length||Jt(n),Y(r)||Jt(n);var a=r.type,o=N0.get(a);o||Jt(n);var s=H(t,function(u){return ZM(u,o)}),l=Ot(o.transform({upstream:s[0],upstreamList:s,config:X(r.config)}));return H(l,function(u,f){var h="";Y(u)||Jt(h),u.data||Jt(h);var c=I0(u.data);Tv(c)||Jt(h);var v,p=t[0];if(p&&f===0&&!u.dimensions){var g=p.startIndex;g&&(u.data=p.data.slice(0,g).concat(u.data)),v={seriesLayoutBy:vr,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else v={seriesLayoutBy:vr,sourceHeader:0,dimensions:u.dimensions};return Qf(u.data,v,null)})}function Tv(r){return r===ie||r===Be}var ml="undefined",tC=typeof Uint32Array===ml?Array:Uint32Array,eC=typeof Uint16Array===ml?Array:Uint16Array,B0=typeof Int32Array===ml?Array:Int32Array,Qp=typeof Float64Array===ml?Array:Float64Array,z0={float:Qp,int:B0,ordinal:Array,number:Array,time:Qp},Cu;function Wn(r){return r>65535?tC:eC}function $i(){return[1/0,-1/0]}function rC(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Jp(r,t,e,i,n){var a=z0[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(i)}var Jf=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=K()}return r.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var n=t.getSource(),a=this.defaultDimValueGetter=Cu[n.sourceFormat];this._dimValueGetter=i||a,this._rawExtent=[],P0(n),this._dimensions=H(e,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,n=this._dimensions,a=i.get(t);if(a!=null){if(n[a].type===e)return a}else a=n.length;return n[a]={type:e},i.set(t,a),this._chunks[a]=new z0[e||"float"](this._rawCount),this._rawExtent[a]=$i(),a},r.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],n=this._dimensions[t],a=this._rawExtent,o=n.ordinalOffset||0,s=i.length;o===0&&(a[t]=$i());for(var l=a[t],u=o;u<s;u++){var f=i[u]=e.parseAndCollect(i[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}n.ordinalMeta=e,n.ordinalOffset=s,n.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],i=e.ordinalMeta;return i},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var n=e.count();return e.persistent||(n+=i),i<n&&this._initDataFromProvider(i,n,!0),[i,n]},r.prototype.appendValues=function(t,e){for(var i=this._chunks,n=this._dimensions,a=n.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var f=n[u];Jp(i,u,f.type,l,!0)}for(var h=[],c=s;c<l;c++)for(var v=c-s,p=0;p<a;p++){var f=n[p],g=Cu.arrayRows.call(this,t[v]||h,f.property,v,p);i[p][c]=g;var d=o[p];g<d[0]&&(d[0]=g),g>d[1]&&(d[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=H(o,function(m){return m.property}),f=0;f<s;f++){var h=o[f];l[f]||(l[f]=$i()),Jp(a,f,h.type,e,i)}if(n.fillStorage)n.fillStorage(t,e,a,l);else for(var c=[],v=t;v<e;v++){c=n.getItem(v,c);for(var p=0;p<s;p++){var g=a[p],d=this._dimValueGetter(c,u[p],v,p);g[v]=d;var y=l[p];d<y[0]&&(y[0]=d),d>y[1]&&(y[1]=d)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var i=[],n=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)n.push(a)}else n=t;for(var a=0,o=n.length;a<o;a++)i.push(this.get(n[a],e));return i},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],i=0;if(e)for(var n=0,a=this.count();n<a;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var i=e.sort(function(a,o){return a-o}),n=this.count();return n===0?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&i<this._count&&i===t)return t;for(var n=0,a=this._count-1;n<=a;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,i){var n=this._chunks,a=n[t],o=[];if(!a)return o;i==null&&(i=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=e-a[c],p=Math.abs(v);p<=i&&((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 t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a<n;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else{var i=Wn(this._rawCount);t=new i(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),n=i.count(),a=Wn(i._rawCount),o=new a(n),s=[],l=t.length,u=0,f=t[0],h=i._chunks,c=0;c<n;c++){var v=void 0,p=i.getRawIndex(c);if(l===0)v=e(c);else if(l===1){var g=h[f][p];v=e(g,c)}else{for(var d=0;d<l;d++)s[d]=h[t[d]][p];s[d]=c,v=e.apply(null,s)}v&&(o[u++]=p)}return u<n&&(i._indices=o),i._count=u,i._extent=[],i._updateGetRawIdx(),i},r.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var n=bt(t),a=n.length;if(!a)return this;var o=e.count(),s=Wn(e._rawCount),l=new s(o),u=0,f=n[0],h=t[f][0],c=t[f][1],v=e._chunks,p=!1;if(!e._indices){var g=0;if(a===1){for(var d=v[n[0]],y=0;y<i;y++){var m=d[y];(m>=h&&m<=c||isNaN(m))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var d=v[n[0]],_=v[n[1]],S=t[n[1]][0],w=t[n[1]][1],y=0;y<i;y++){var m=d[y],b=_[y];(m>=h&&m<=c||isNaN(m))&&(b>=S&&b<=w||isNaN(b))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var y=0;y<o;y++){var x=e.getRawIndex(y),m=v[n[0]][x];(m>=h&&m<=c||isNaN(m))&&(l[u++]=x)}else for(var y=0;y<o;y++){for(var M=!0,x=e.getRawIndex(y),C=0;C<a;C++){var T=n[C],m=v[T][x];(m<t[T][0]||m>t[T][1])&&(M=!1)}M&&(l[u++]=e.getRawIndex(y))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,i){for(var n=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<e.length;f++)u[e[f]]=$i();for(var h=0;h<s;h++){for(var c=t.getRawIndex(h),v=0;v<o;v++)l[v]=n[e[v]][c];l[o]=h;var p=i&&i.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var f=0;f<p.length;f++){var g=e[f],d=p[f],y=u[g],m=n[g];m&&(m[c]=d),d<y[0]&&(y[0]=d),d>y[1]&&(y[1]=d)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(Wn(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 g=Math.min(p+l,o-1),d=Math.min(p+l*2,o),y=(d+g)/2,m=0,_=g;_<d;_++){var S=this.getRawIndex(_),w=a[S];isNaN(w)||(m+=w)}m/=d-g;var b=p,x=Math.min(p+l,o),M=p-1,C=a[u];f=-1,c=b;for(var T=-1,D=0,_=b;_<x;_++){var S=this.getRawIndex(_),w=a[S];if(isNaN(w)){D++,T<0&&(T=S);continue}h=Math.abs((M-y)*(w-C)-(M-_)*(m-C)),h>f&&(f=h,c=S)}D>0&&D<x-b&&(v[s++]=Math.min(T,c),c=Math.max(T,c)),v[s++]=c,u=c}return v[s++]=this.getRawIndex(o-1),i._count=s,i._indices=v,i.getRawIndex=this._getRawIdx,i},r.prototype.downSample=function(t,e,i,n){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],f=this.count(),h=a._rawExtent[t]=$i(),c=new(Wn(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 g=0;g<l;g++){var d=this.getRawIndex(p+g);s[g]=u[d]}var y=i(s),m=this.getRawIndex(Math.min(p+n(s,y)||0,f-1));u[m]=y,y<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),c[v++]=m}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(i){case 0:e(a);break;case 1:e(n[t[0]][s],a);break;case 2:e(n[t[0]][s],n[t[1]][s],a);break;default:for(var l=0,u=[];l<i;l++)u[l]=n[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],i=$i();if(!e)return i;var n=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=i;for(var s=o[0],l=o[1],u=0;u<n;u++){var f=this.getRawIndex(u),h=e[f];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a<n.length;a++)i.push(n[a][e]);return i},r.prototype.clone=function(t,e){var i=new r,n=this._chunks,a=t&&Fr(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<n.length;o++)i._chunks[o]=a[o]?rC(n[o]):n[o];else i._chunks=n;return this._copyCommonProps(i),e||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=X(this._extent),t._rawExtent=X(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var i=this._indices.length;e=new t(i);for(var n=0;n<i;n++)e[n]=this._indices[n]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,i,n,a){return zr(e[a],this._dimensions[a])}Cu={arrayRows:t,objectRows:function(e,i,n,a){return zr(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return zr(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}}(),r}(),iC=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,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 t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(_o(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=ee(s)?Br:xe,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=et(h.seriesLayoutBy,c.seriesLayoutBy)||null,p=et(h.sourceHeader,c.sourceHeader),g=et(h.dimensions,c.dimensions),d=v!==c.seriesLayoutBy||!!p!=!!c.sourceHeader||g;n=d?[Qf(s,{seriesLayoutBy:v,sourceHeader:p,dimensions:g},l)]:[]}else{var y=t;if(i){var m=this._applyTransform(e);n=m.sourceList,a=m.upstreamSignList}else{var _=y.get("source",!0);n=[Qf(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&jp(a)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&jp(h),s.push(f),l.push(u._getVersionSign())}),i?o=JM(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[NM(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var i=t[e];if(i._isDirty()||this._upstreamSignList[e]!==i._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,i){var n=0,a=this._storeList,o=a[n];o||(o=a[n]={});var s=o[i];if(!s){var l=this._getUpstreamSourceManagers()[0];_o(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,i):(s=new Jf,s.initData(new R0(e,t.length),t)),o[i]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(_o(t)){var e=yv(t);return e?[e.getSourceManager()]:[]}else return H(hM(t),function(i){return i.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,i,n;if(_o(t))e=t.get("seriesLayoutBy",!0),i=t.get("sourceHeader",!0),n=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),i=a.get("sourceHeader",!0),n=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:i,dimensions:n}},r}();function _o(r){return r.mainType==="series"}function jp(r){throw new Error(r)}var V0="line-height:1";function F0(r,t){var e=r.color||"#6e7079",i=r.fontSize||12,n=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+oe(i+"")+"px;color:"+oe(e)+";font-weight:"+oe(n+""),valueStyle:"font-size:"+oe(o+"")+"px;color:"+oe(a)+";font-weight:"+oe(s+"")}:{nameStyle:{fontSize:i,fill:e,fontWeight:n},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var nC=[0,10,20,30],aC=["",`
`,`

`,`


`];function Ii(r,t){return t.type=r,t}function jf(r){return r.type==="section"}function H0(r){return jf(r)?oC:sC}function G0(r){if(jf(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return A(r.blocks,function(n){var a=G0(n);a>=t&&(t=a+ +(i&&(!a||jf(n)&&!n.noHeader)))}),t}return 0}function oC(r,t,e,i){var n=t.noHeader,a=lC(G0(t)),o=[],s=t.blocks||[];Ee(!s||V(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(mn(u,l)){var f=new UM(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var d=t.valueFormatter,y=H0(p)(d?B(B({},r),{valueFormatter:d}):r,p,g>0?a.html:0,i);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(a.richText):th(o.join(""),n?e:a.html);if(n)return h;var c=qf(t.header,"ordinal",r.useUTC),v=F0(i,r.renderMode).nameStyle;return r.renderMode==="richText"?W0(r,c,v)+a.richText+h:th('<div style="'+v+";"+V0+';">'+oe(c)+"</div>"+h,e)}function sC(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=V(S)?S:[S],H(S,function(w,b){return qf(w,V(v)?v[b]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),c=a?"":qf(l,"ordinal",u),v=t.valueType,p=o?[]:f(t.value,t.dataIndex),g=!s||!a,d=!s&&a,y=F0(i,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(a?"":W0(r,c,m))+(o?"":hC(r,p,g,d,_)):th((s?"":h)+(a?"":uC(c,!s,m))+(o?"":fC(p,g,d,_)),e)}}function td(r,t,e,i,n,a){if(r){var o=H0(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function lC(r){return{html:nC[r],richText:aC[r]}}function th(r,t){var e='<div style="clear:both"></div>',i="margin: "+t+"px 0 0";return'<div style="'+i+";"+V0+';">'+r+e+"</div>"}function uC(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+oe(r)+"</span>"}function fC(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=V(r)?r:[r],'<span style="'+a+";"+i+'">'+H(r,function(o){return oe(o)}).join("&nbsp;&nbsp;")+"</span>"}function W0(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function hC(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(V(t)?t.join("  "):t,a)}function vC(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return Li(i)}function U0(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Au=function(){function r(){this.richTextStyles={},this._nextStyleNameId=ym()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=rM({color:e,type:t,renderMode:i,markerId:n});return W(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};V(e)?A(e,function(a){return B(i,a)}):B(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function cC(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=V(s),u=vC(t,e),f,h,c,v;if(o>1||l&&!o){var p=pC(s,t,e,a,u);f=p.inlineValues,h=p.inlineValueTypes,c=p.blocks,v=p.inlineValues[0]}else if(o){var g=n.getDimensionInfo(a[0]);v=f=Sn(n,e,a[0]),h=g.type}else v=f=l?s[0]:s;var d=qh(t),y=d&&t.name||"",m=n.getName(e),_=i?y:m;return Ii("section",{header:y,noHeader:i||!d,sortParam:v,blocks:[Ii("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Ze(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function pC(r,t,e,i,n){var a=t.getData(),o=Fr(r,function(h,c,v){var p=a.getDimensionInfo(v);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];i.length?A(i,function(h){f(Sn(a,e,h),h)}):A(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Ii("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var br=_t();function So(r,t){return r.getName(t)||r.getId(t)}var dC="__universalTransitionEnabled",be=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=wa({count:yC,reset:mC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=br(this).sourceManager=new iC(this);a.prepareSource();var o=this.getInitialData(e,n);rd(o,this),this.dataTask.context.data=o,br(this).dataBeforeProcessed=o,ed(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Ra(this),a=n?Ka(e):{},o=this.subType;ut.hasClass(o)&&(o+="Series"),tt(e,i.getTheme().get(this.subType)),tt(e,this.getDefaultOption()),bs(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&_n(e,a,n)},t.prototype.mergeOption=function(e,i){e=tt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Ra(this);n&&_n(this.option,e,n);var a=br(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);rd(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,br(this).dataBeforeProcessed=o,ed(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!ee(e))for(var i=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&bs(e[n],"label",i)},t.prototype.getInitialData=function(e,i){},t.prototype.appendData=function(e){var i=this.getRawData();i.appendData(e.data)},t.prototype.getData=function(e){var i=eh(this);if(i){var n=i.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return br(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var i=eh(this);if(i){var n=i.context;n.outputData=e,i!==this.dataTask&&(n.data=e)}br(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return K(e)},t.prototype.getSourceManager=function(){return br(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return br(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,i,n){return cC({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Q.node&&!(e&&e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=mv.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=So(o,l);n[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,i){for(var n=[],a=0;a<e.length;a++)n[0]=e[a],this.isSelected(e[a],i)?this.unselect(n,i):this.select(n,i)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,i=bt(e),n=[],a=0;a<i.length;a++){var o=e[i[a]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[So(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[dC])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Y(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var h=i[f],c=So(e,h);u[c]=!0,this._selectedDataIndicesMap[c]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var v=i[l-1],c=So(e,v);o.selectedMap=(n={},n[c]=!0,n),this._selectedDataIndicesMap=(a={},a[c]=e.getRawIndex(v),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var i=[];e.hasItemOption&&e.each(function(n){var a=e.getRawDataItem(n);a&&a.selected&&i.push(n)}),i.length>0&&this._innerSelect(e,i)}},t.registerClass=function(e){return ut.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ut);Oe(be,xv);Oe(be,mv);Mm(be,ut);function ed(r){var t=r.name;qh(r)||(r.name=gC(r)||t)}function gC(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return A(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function yC(r){return r.model.getRawData().count()}function mC(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),_C}function _C(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function rd(r,t){A(YS(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,it(SC,t))})}function SC(r,t){var e=eh(r);return e&&e.setOutputEnd((t||this).count()),t}function eh(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var Zt=function(){function r(){this.group=new ht,this.uid=$a("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Qh(Zt);js(Zt);function Mv(){var r=_t();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var Y0=_t(),bC=Mv(),le=function(){function r(){this.group=new ht,this.uid=$a("viewChart"),this.renderTask=wa({plan:wC,reset:xC}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&nd(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&nd(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){Za(this.group,t)},r.markUpdateMethod=function(t,e){Y0(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function id(r,t,e){r&&Uf(r)&&(t==="emphasis"?Ci:Ai)(r,e)}function nd(r,t,e){var i=Ti(r,t),n=t&&t.highlightKey!=null?Yx(t.highlightKey):null;i!=null?A(Ot(i),function(a){id(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){id(a,e,n)})}Qh(le);js(le);function wC(r){return bC(r.model)}function xC(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&Y0(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),TC[l]}var TC={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ps="\0__throttleOriginMethod",ad="\0__throttleRate",od="\0__throttleType";function _l(r,t,e){var i,n=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=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];i=new Date().getTime(),l=this,u=v;var g=f||t,d=f||e;f=null,s=i-(d?n:a)-g,clearTimeout(o),d?o=setTimeout(h,g):s>=0?h():o=setTimeout(h,-s),n=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function Sl(r,t,e,i){var n=r[t];if(n){var a=n[Ps]||n,o=n[od],s=n[ad];if(s!==e||o!==i){if(e==null)return r[t]=a;n=r[t]=_l(a,e,i==="debounce"),n[Ps]=a,n[od]=i,n[ad]=e}return n}}function Rs(r,t){var e=r[t];e&&e[Ps]&&(e.clear&&e.clear(),r[t]=e[Ps])}var sd=_t(),ld={itemStyle:La(a0,!0),lineStyle:La(n0,!0)},MC={lineStyle:"stroke",itemStyle:"fill"};function Z0(r,t){var e=r.visualStyleMapper||ld[t];return e||(console.warn("Unknown style type '"+t+"'."),ld.itemStyle)}function X0(r,t){var e=r.visualDrawType||MC[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var CC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=Z0(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=X0(r,i),u=o[l],f=$(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||$(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||$(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,p){var g=r.getDataParams(p),d=B({},o);d[l]=f(g),v.setItemVisual(p,"style",d)}}}},Un=new wt,AC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=Z0(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){Un.option=l[i];var u=n(Un),f=o.ensureUniqueItemVisual(s,"style");B(f,u),Un.option.decal&&(o.setItemVisual(s,"decal",Un.option.decal),Un.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},DC={performRawSeries:!0,overallReset:function(r){var t=K();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+i,a=t.get(n);a||(a={},t.set(n,a)),sd(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),n={},a=e.getData(),o=sd(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=X0(e,s);a.each(function(u){var f=a.getRawIndex(u);n[f]=u}),i.each(function(u){var f=n[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=i.getName(u)||u+"",p=i.count();c[l]=e.getColorFromPalette(v,o,p)}})}})}},bo=Math.PI;function LC(r,t){t=t||{},lt(t,{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 e=new ht,i=new mt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new gt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new mt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new sl({shape:{startAngle:-bo/2,endAngle:-bo/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:bo*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:bo*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var $0=function(){function r(t,e,i,n){this._stageTaskMap=K(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=K();t.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;A(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";Ee(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.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(d){s(n,d)&&(d.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,i);var g=o.getPerformArgs(c,n.block);p.each(function(d){d.perform(g)}),c.perform(g)&&(a=!0)}else h&&h.each(function(d,y){s(n,d)&&d.dirty();var m=o.getPerformArgs(d,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(d.context.model),o.updatePayload(d,i),d.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=K(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,n).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||wa({plan:kC,reset:OC,count:BC}));v.context={model:h,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||wa({reset:IC});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=K(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";Ee(!t.createOnAllSeries,v),u?i.eachRawSeriesByType(u,p):f?f(i,n).each(p):(h=!1,A(i.getSeries(),p));function p(g){var d=g.uid,y=l.set(d,s&&s.get(d)||(c=!0,wa({reset:PC,onDirty:EC})));y.context={model:g,overallProgress:h},y.agent=o,y.__block=h,a._pipe(g,y)}c&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return $(t)&&(t={overallReset:t,seriesType:zC(t)}),t.uid=$a("stageHandler"),e&&(t.visualType=e),t},r}();function IC(r){r.overallReset(r.ecModel,r.api,r.payload)}function PC(r){return r.overallProgress&&RC}function RC(){this.agent.dirty(),this.getDownstream().dirty()}function EC(){this.agent&&this.agent.dirty()}function kC(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function OC(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ot(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?H(t,function(e,i){return q0(i)}):NC}var NC=q0(0);function q0(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a<t.end;a++)n.dataEach(i,a);else n&&n.progress&&n.progress(t,i)}}function BC(r){return r.data.count()}function zC(r){Es=null;try{r(ka,K0)}catch{}return Es}var ka={},K0={},Es;Q0(ka,_v);Q0(K0,C0);ka.eachSeriesByType=ka.eachRawSeriesByType=function(r){Es=r};ka.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Es=r.subType)};function Q0(r,t){for(var e in t.prototype)r[e]=Vt}var ud=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const VC={color:ud,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],ud]};var Gt="#B9B8CE",fd="#100C2A",wo=function(){return{axisLine:{lineStyle:{color:Gt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},hd=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],J0={darkMode:!0,color:hd,backgroundColor:fd,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Gt}},textStyle:{color:Gt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Gt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Gt},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Gt}},timeline:{lineStyle:{color:Gt},label:{color:Gt},controlStyle:{color:Gt,borderColor:Gt}},calendar:{itemStyle:{color:fd},dayLabel:{color:Gt},monthLabel:{color:Gt},yearLabel:{color:Gt}},timeAxis:wo(),logAxis:wo(),valueAxis:wo(),categoryAxis:wo(),line:{symbol:"circle"},graph:{color:hd},gauge:{title:{color:Gt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Gt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};J0.categoryAxis.splitLine.show=!1;var FC=function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},i={},n={};if(W(t)){var a=$e(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};A(t,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"&&(e.mainType=p,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.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,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function f(h,c,v,p){return h[v]==null||c[p||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),rh=["symbol","symbolSize","symbolRotate","symbolOffset"],vd=rh.concat(["symbolKeepAspect"]),HC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o<rh.length;o++){var s=rh[o],l=r.get(s);$(l)?(a=!0,n[s]=l):i[s]=l}if(i.symbol=i.symbol||r.defaultSymbol,e.setVisual(B({legendIcon:r.legendIcon||i.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},i)),t.isSeriesFiltered(r))return;var u=bt(n);function f(h,c){for(var v=r.getRawValue(c),p=r.getDataParams(c),g=0;g<u.length;g++){var d=u[g];h.setItemVisual(c,d,n[d](v,p))}}return{dataEach:a?f:null}}},GC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function i(n,a){for(var o=n.getItemModel(a),s=0;s<vd.length;s++){var l=vd[s],u=o.getShallow(l,!0);u!=null&&n.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?i:null}}};function j0(r,t,e){switch(e){case"color":var i=r.getItemVisual(t,"style");return i[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function bl(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t)}}function WC(r,t,e,i){switch(e){case"color":var n=r.ensureUniqueItemVisual(t,"style");n[r.getVisual("drawType")]=i,r.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(t,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(t,e,i);break}}function UC(r,t){function e(i,n){var a=[];return i.eachComponent({mainType:"series",subType:r,query:n},function(o){a.push(o.seriesIndex)}),a}A([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(i){t(i[0],function(n,a,o){n=B({},n),o.dispatchAction(B(n,{type:i[1],seriesIndex:e(a,n)}))})})}function qi(r,t,e,i,n){var a=r+t;e.isSilent(a)||i.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=n.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var h=o.getData(),c=Ti(h,n.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:V(c)?h.getName(c[0]):h.getName(c),selected:W(l)?l:B({},l)})}})}function YC(r,t,e){r.on("selectchanged",function(i){var n=e.getModel();i.isFromClick?(qi("map","selectchanged",t,n,i),qi("pie","selectchanged",t,n,i)):i.fromAction==="select"?(qi("map","selected",t,n,i),qi("pie","selected",t,n,i)):i.fromAction==="unselect"&&(qi("map","unselected",t,n,i),qi("pie","unselected",t,n,i))})}function un(r,t,e){for(var i;r&&!(t(r)&&(i=r,e));)r=r.__hostTarget||r.parent;return i}var ZC=Math.round(Math.random()*9),XC=typeof Object.defineProperty=="function",$C=function(){function r(){this._id="__ec_inner_"+ZC++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var i=this._guard(t);return XC?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r}(),qC=vt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i+a),r.lineTo(e-n,i+a),r.closePath()}}),KC=vt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,i=t.cy,n=t.width/2,a=t.height/2;r.moveTo(e,i-a),r.lineTo(e+n,i),r.lineTo(e,i+a),r.lineTo(e-n,i),r.closePath()}}),QC=vt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,i=t.y,n=t.width/5*3,a=Math.max(n,t.height),o=n/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),f=Math.cos(u)*o,h=Math.sin(u),c=Math.cos(u),v=o*.6,p=o*.7;r.moveTo(e-f,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+f-h*v,l+s+c*v,e,i-p,e,i),r.bezierCurveTo(e,i-p,e-f+h*v,l+s+c*v,e-f,l+s),r.closePath()}}),JC=vt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,i=t.width,n=t.x,a=t.y,o=i/3*2;r.moveTo(n,a),r.lineTo(n+o,a+e),r.lineTo(n,a+e/4*3),r.lineTo(n-o,a+e),r.lineTo(n,a),r.closePath()}}),jC={line:ke,rect:mt,roundRect:mt,square:mt,circle:al,diamond:KC,pin:QC,arrow:JC,triangle:qC},tA={line:function(r,t,e,i,n){n.x1=r,n.y1=t+i/2,n.x2=r+e,n.y2=t+i/2},rect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i},roundRect:function(r,t,e,i,n){n.x=r,n.y=t,n.width=e,n.height=i,n.r=Math.min(e,i)/4},square:function(r,t,e,i,n){var a=Math.min(e,i);n.x=r,n.y=t,n.width=a,n.height=a},circle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.r=Math.min(e,i)/2},diamond:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i},pin:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},arrow:function(r,t,e,i,n){n.x=r+e/2,n.y=t+i/2,n.width=e,n.height=i},triangle:function(r,t,e,i,n){n.cx=r+e/2,n.cy=t+i/2,n.width=e,n.height=i}},ks={};A(jC,function(r,t){ks[t]=new r});var eA=vt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var i=ms(r,t,e),n=this.shape;return n&&n.symbolType==="pin"&&t.position==="inside"&&(i.y=e.y+e.height*.4),i},buildPath:function(r,t,e){var i=t.symbolType;if(i!=="none"){var n=ks[i];n||(i="rect",n=ks[i]),tA[i](t.x,t.y,t.width,t.height,n.shape),n.buildPath(r,n.shape,e)}}});function rA(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function ne(r,t,e,i,n,a,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=qm(r.slice(8),new ft(t,e,i,n),o?"center":"cover"):r.indexOf("path://")===0?l=fv(r.slice(7),{},new ft(t,e,i,n),o?"center":"cover"):l=new eA({shape:{symbolType:r,x:t,y:e,width:i,height:n}}),l.__isEmptyBrush=s,l.setColor=rA,a&&l.setColor(a),l}function Cv(r){return V(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function wl(r,t){if(r!=null)return V(r)||(r=[r,r]),[q(r[0],t[0])||0,q(et(r[1],r[0]),t[1])||0]}function pi(r){return isFinite(r)}function iA(r,t,e){var i=t.x==null?0:t.x,n=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(i=i*e.width+e.x,n=n*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),i=pi(i)?i:0,n=pi(n)?n:1,a=pi(a)?a:0,o=pi(o)?o:0;var s=r.createLinearGradient(i,a,n,o);return s}function nA(r,t,e){var i=e.width,n=e.height,a=Math.min(i,n),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*i+e.x,s=s*n+e.y,l=l*a),o=pi(o)?o:.5,s=pi(s)?s:.5,l=l>=0&&pi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ih(r,t,e){for(var i=t.type==="radial"?nA(r,t,e):iA(r,t,e),n=t.colorStops,a=0;a<n.length;a++)i.addColorStop(n[a].offset,n[a].color);return i}function aA(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function xo(r){return parseInt(r,10)}function To(r,t,e){var i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[i]!=null&&e[i]!=="auto")return parseFloat(e[i]);var s=document.defaultView.getComputedStyle(r);return(r[n]||xo(s[i])||xo(r.style[i]))-(xo(s[a])||0)-(xo(s[o])||0)|0}function oA(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:yt(r)?[r]:V(r)?r:null}function t_(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&oA(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=H(e,function(a){return a/n}),i/=n)}return[e,i]}var sA=new Mi(!0);function Os(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function cd(r){return typeof r=="string"&&r!=="none"}function Ns(r){var t=r.fill;return t!=null&&t!=="none"}function pd(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function dd(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function nh(r,t,e){var i=Cm(t.image,t.__image,e);if(tl(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*ZS),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function lA(r,t,e,i){var n,a=Os(e),o=Ns(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||sA,h=t.__dirty;if(!i){var c=e.fill,v=e.stroke,p=o&&!!c.colorStops,g=a&&!!v.colorStops,d=o&&!!c.image,y=a&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,b=void 0;(p||g)&&(b=t.getBoundingRect()),p&&(m=h?ih(r,c,b):t.__canvasFillGradient,t.__canvasFillGradient=m),g&&(_=h?ih(r,v,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),d&&(S=h||!t.__canvasFillPattern?nh(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(w=h||!t.__canvasStrokePattern?nh(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),p?r.fillStyle=m:d&&(S?r.fillStyle=S:o=!1),g?r.strokeStyle=_:y&&(w?r.strokeStyle=w:a=!1)}var x=t.getGlobalScale();f.setScale(x[0],x[1],t.segmentIgnoreThreshold);var M,C;r.setLineDash&&e.lineDash&&(n=t_(t),M=n[0],C=n[1]);var T=!0;(u||h&na)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),T=!1),f.reset(),t.buildPath(f,t.shape,i),f.toStatic(),t.pathUpdated()),T&&f.rebuildPath(r,l?s:1),M&&(r.setLineDash(M),r.lineDashOffset=C),i||(e.strokeFirst?(a&&dd(r,e),o&&pd(r,e)):(o&&pd(r,e),a&&dd(r,e))),M&&r.setLineDash([])}function uA(r,t,e){var i=t.__image=Cm(e.image,t.__image,t,t.onload);if(!(!i||!tl(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(i,u,f,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(i,u,f,h,c,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function fA(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||xi,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=t_(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Os(e)&&r.strokeText(n,e.x,e.y),Ns(e)&&r.fillText(n,e.x,e.y)):(Ns(e)&&r.fillText(n,e.x,e.y),Os(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var gd=["shadowBlur","shadowOffsetX","shadowOffsetY"],yd=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function e_(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){jt(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?yi.opacity:o}(i||t.blend!==e.blend)&&(a||(jt(r,n),a=!0),r.globalCompositeOperation=t.blend||yi.blend);for(var s=0;s<gd.length;s++){var l=gd[s];(i||t[l]!==e[l])&&(a||(jt(r,n),a=!0),r[l]=r.dpr*(t[l]||0))}return(i||t.shadowColor!==e.shadowColor)&&(a||(jt(r,n),a=!0),r.shadowColor=t.shadowColor||yi.shadowColor),a}function md(r,t,e,i,n){var a=Oa(t,n.inHover),o=i?null:e&&Oa(e,n.inHover)||{};if(a===o)return!1;var s=e_(r,a,o,i,n);if((i||a.fill!==o.fill)&&(s||(jt(r,n),s=!0),cd(a.fill)&&(r.fillStyle=a.fill)),(i||a.stroke!==o.stroke)&&(s||(jt(r,n),s=!0),cd(a.stroke)&&(r.strokeStyle=a.stroke)),(i||a.opacity!==o.opacity)&&(s||(jt(r,n),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(jt(r,n),s=!0),r.lineWidth=u)}for(var f=0;f<yd.length;f++){var h=yd[f],c=h[0];(i||a[c]!==o[c])&&(s||(jt(r,n),s=!0),r[c]=a[c]||h[1])}return s}function hA(r,t,e,i,n){return e_(r,Oa(t,n.inHover),e&&Oa(e,n.inHover),i,n)}function r_(r,t){var e=t.transform,i=r.dpr||1;e?r.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):r.setTransform(i,0,0,i,0,0)}function vA(r,t,e){for(var i=!1,n=0;n<r.length;n++){var a=r[n];i=i||a.isZeroArea(),r_(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=i}function cA(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var _d=1,Sd=2,bd=3,wd=4;function pA(r){var t=Ns(r),e=Os(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function jt(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function Oa(r,t){return t&&r.__hoverStyle||r.style}function i_(r,t){di(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function di(r,t,e,i){var n=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||aA(a,o))&&(o&&o.length&&(jt(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(jt(r,e),r.save(),vA(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var f=t instanceof vt&&t.autoBatch&&pA(t.style);s||cA(n,u.transform)?(jt(r,e),r_(r,t)):f||jt(r,e);var h=Oa(t,e.inHover);t instanceof vt?(e.lastDrawType!==_d&&(l=!0,e.lastDrawType=_d),md(r,t,u,l,e),(!f||!e.batchFill&&!e.batchStroke)&&r.beginPath(),lA(r,t,h,f),f&&(e.batchFill=h.fill||"",e.batchStroke=h.stroke||"")):t instanceof ws?(e.lastDrawType!==bd&&(l=!0,e.lastDrawType=bd),md(r,t,u,l,e),fA(r,t,h)):t instanceof je?(e.lastDrawType!==Sd&&(l=!0,e.lastDrawType=Sd),hA(r,t,u,l,e),uA(r,t,h)):t.getTemporalDisplayables&&(e.lastDrawType!==wd&&(l=!0,e.lastDrawType=wd),dA(r,t,e)),f&&i&&jt(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function dA(r,t,e){var i=t.getDisplayables(),n=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=i.length;o<s;o++){var l=i[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),di(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,f=n.length;u<f;u++){var l=n[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),di(r,l,a,u===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var Du=new $C,xd=new Ga(100),Td=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function ah(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),i=t.getZr(),n=i.painter.type==="svg";r.dirty&&Du.delete(r);var a=Du.get(r);if(a)return a;var o=lt(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=n?1:1/e,Du.set(r,s),r.dirty=!1,s;function l(u){for(var f=[e],h=!0,c=0;c<Td.length;++c){var v=o[Td[c]];if(v!=null&&!V(v)&&!W(v)&&!yt(v)&&typeof v!="boolean"){h=!1;break}f.push(v)}var p;if(h){p=f.join(",")+(n?"-svg":"");var g=xd.get(p);g&&(n?u.svgElement=g:u.image=g)}var d=a_(o.dashArrayX),y=gA(o.dashArrayY),m=n_(o.symbol),_=yA(d),S=o_(y),w=!n&&xn.createCanvas(),b=n&&{tag:"g",attrs:{},key:"dcl",children:[]},x=C(),M;w&&(w.width=x.width*e,w.height=x.height*e,M=w.getContext("2d")),T(),h&&xd.put(p,w||b),u.image=w,u.svgElement=b,u.svgWidth=x.width,u.svgHeight=x.height;function C(){for(var D=1,L=0,I=_.length;L<I;++L)D=Vc(D,_[L]);for(var P=1,L=0,I=m.length;L<I;++L)P=Vc(P,m[L].length);D*=P;var R=S*_.length*m.length;return{width:Math.max(1,Math.min(D,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function T(){M&&(M.clearRect(0,0,w.width,w.height),o.backgroundColor&&(M.fillStyle=o.backgroundColor,M.fillRect(0,0,w.width,w.height)));for(var D=0,L=0;L<y.length;++L)D+=y[L];if(D<=0)return;for(var I=-S,P=0,R=0,E=0;I<x.height;){if(P%2===0){for(var z=R/2%m.length,k=0,N=0,F=0;k<x.width*2;){for(var G=0,L=0;L<d[E].length;++L)G+=d[E][L];if(G<=0)break;if(N%2===0){var Z=(1-o.symbolSize)*.5,rt=k+d[E][N]*Z,nt=I+y[P]*Z,St=d[E][N]*o.symbolSize,dt=y[P]*o.symbolSize,$t=F/2%m[z].length;ae(rt,nt,St,dt,m[z][$t])}k+=d[E][N],++F,++N,N===d[E].length&&(N=0)}++E,E===d.length&&(E=0)}I+=y[P],++R,++P,P===y.length&&(P=0)}function ae(It,Mt,J,at,ze){var Dt=n?1:e,yr=ne(ze,It*Dt,Mt*Dt,J*Dt,at*Dt,o.color,o.symbolKeepAspect);if(n){var ir=i.painter.renderOneToVNode(yr);ir&&b.children.push(ir)}else i_(M,yr)}}}}function n_(r){if(!r||r.length===0)return[["rect"]];if(W(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!W(r[e])){t=!1;break}if(t)return n_([r]);for(var i=[],e=0;e<r.length;++e)W(r[e])?i.push([r[e]]):i.push(r[e]);return i}function a_(r){if(!r||r.length===0)return[[0,0]];if(yt(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,i=0;i<r.length;++i)if(!yt(r[i])){e=!1;break}if(e)return a_([r]);for(var n=[],i=0;i<r.length;++i)if(yt(r[i])){var t=Math.ceil(r[i]);n.push([t,t])}else{var t=H(r[i],function(s){return Math.ceil(s)});t.length%2===1?n.push(t.concat(t)):n.push(t)}return n}function gA(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(yt(r)){var t=Math.ceil(r);return[t,t]}var e=H(r,function(i){return Math.ceil(i)});return r.length%2?e.concat(e):e}function yA(r){return H(r,function(t){return o_(t)})}function o_(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function mA(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var s=i.getItemVisual(o,"decal");if(s){var l=i.ensureUniqueItemVisual(o,"style");l.decal=ah(s,t)}});var n=i.getVisual("decal");if(n){var a=i.getVisual("style");a.decal=ah(n,t)}}})}var De=new we,s_={};function _A(r,t){s_[r]=t}function SA(r){return s_[r]}var bA=1,wA=800,xA=900,TA=1e3,MA=2e3,CA=5e3,l_=1e3,AA=1100,Av=2e3,u_=3e3,DA=4e3,xl=4500,LA=4600,IA=5e3,PA=6e3,f_=7e3,RA={PROCESSOR:{FILTER:TA,SERIES_FILTER:wA,STATISTIC:CA},VISUAL:{LAYOUT:l_,PROGRESSIVE_LAYOUT:AA,GLOBAL:Av,CHART:u_,POST_CHART_LAYOUT:LA,COMPONENT:DA,BRUSH:IA,CHART_ITEM:xl,ARIA:PA,DECAL:f_}},Bt="__flagInMainProcess",Kt="__pendingUpdate",Lu="__needsUpdateStatus",Md=/^[a-zA-Z0-9_]+$/,Iu="__connectUpdateStatus",Cd=0,EA=1,kA=2;function h_(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return c_(this,r,t)}}function v_(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return c_(this,r,t)}}function c_(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),we.prototype[t].apply(r,e)}var p_=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(we),d_=p_.prototype;d_.on=v_("on");d_.off=v_("off");var Ki,Pu,Mo,wr,Ru,Eu,ku,Yn,Zn,Ad,Dd,Ou,Ld,Co,Id,g_,ue,Pd,y_=function(r){O(t,r);function t(e,i,n){var a=r.call(this,new FC)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],n=n||{},W(i)&&(i=m_[i]),a._dom=e;var o="canvas",s="auto",l=!1;n.ssr;var u=a._zr=Bc(e,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:et(n.useDirtyRect,l),useCoarsePointer:et(n.useCoarsePointer,s),pointerSize:n.pointerSize});a._ssr=n.ssr,a._throttledZrFlush=_l(U(u.flush,u),17),i=X(i),i&&D0(i,!0),a._theme=i,a._locale=qT(n.locale||o0),a._coordSysMgr=new Sv;var f=a._api=Id(a);function h(c,v){return c.__prio-v.__prio}return qo(zs,h),qo(oh,h),a._scheduler=new $0(a,f,oh,zs),a._messageCenter=new p_,a._initEvents(),a.resize=U(a.resize,a),u.animation.on("frame",a._onframe,a),Ad(u,a),Dd(u,a),_f(a),a}return t.prototype._onframe=function(){if(!this._disposed){Pd(this);var e=this._scheduler;if(this[Kt]){var i=this[Kt].silent;this[Bt]=!0;try{Ki(this),wr.update.call(this,null,this[Kt].updateParams)}catch(l){throw this[Bt]=!1,this[Kt]=null,l}this._zr.flush(),this[Bt]=!1,this[Kt]=null,Yn.call(this,i),Zn.call(this,i)}else if(e.unfinished){var n=bA,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),Eu(this,a),e.performVisualTasks(a),Co(this,this._model,o,"remain",{}),n-=+new Date-s}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,n){if(!this[Bt]){if(this._disposed){this.id;return}var a,o,s;if(Y(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Bt]=!0,!this._model||i){var l=new wM(this._api),u=this._theme,f=this._model=new _v;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},sh);var h={seriesTransition:s,optionChanged:!0};if(n)this[Kt]={silent:a,updateParams:h},this[Bt]=!1,this.getZr().wakeUp();else{try{Ki(this),wr.update.call(this,null,h)}catch(c){throw this[Kt]=null,this[Bt]=!1,c}this._ssr||this._zr.flush(),this[Kt]=null,this[Bt]=!1,Yn.call(this,a),Zn.call(this,a)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Q.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Q.svgSupported){var e=this._zr,i=e.storage.getDisplayList();return A(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;A(i,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(Rd[n]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();A(Ta,function(_,S){if(_.group===n){var w=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(X(e)),b=_.getDom().getBoundingClientRect();l=a(b.left,l),u=a(b.top,u),f=o(b.right,f),h=o(b.bottom,h),c.push({dom:w,left:b.left,top:b.top})}}),l*=v,u*=v,f*=v,h*=v;var p=f-l,g=h-u,d=xn.createCanvas(),y=Bc(d,{renderer:i?"svg":"canvas"});if(y.resize({width:p,height:g}),i){var m="";return A(c,function(_){var S=_.left-l,w=_.top-u;m+='<g transform="translate('+S+","+w+')">'+_.dom+"</g>"}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new mt({shape:{x:0,y:0,width:p,height:g},style:{fill:e.connectedBackgroundColor}})),A(c,function(_){var S=new je({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),d.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i){return Ru(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return Ru(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=ga(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=ga(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?j0(s,l,i):bl(s,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;A(OA,function(i){var n=function(a){var o=e.getModel(),s=a.target,l,u=i==="globalout";if(u?l={}:s&&un(s,function(p){var g=st(p);if(g&&g.dataIndex!=null){var d=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=d&&d.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=B({},g.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&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];l.event=a,l.type=i,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},e.trigger(i,l)}};n.zrEventfulCallAtLast=!0,e._zr.on(i,n,e)}),A(xa,function(i,n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),A(["selectchanged"],function(i){e._messageCenter.on(i,function(n){this.trigger(i,n)},e)}),YC(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&wm(this.getDom(),Lv,"");var i=this,n=i._api,a=i._model;A(i._componentsViews,function(o){o.dispose(a,n)}),A(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete Ta[i.id]},t.prototype.resize=function(e){if(!this[Bt]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[Kt]&&(a==null&&(a=this[Kt].silent),n=!0,this[Kt]=null),this[Bt]=!0;try{n&&Ki(this),wr.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[Bt]=!1,o}this[Bt]=!1,Yn.call(this,a),Zn.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(Y(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!lh[e]){var n=lh[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=B({},e);return i.type=xa[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(Y(i)||(i={silent:!!i}),!!Bs[e.type]&&this._model){if(this[Bt]){this._pendingActions.push(e);return}var n=i.silent;ku.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&Q.browser.weChat&&this._throttledZrFlush(),Yn.call(this,n),Zn.call(this,n)}},t.prototype.updateLabelLayout=function(){De.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Ki=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Pu(h,!0),Pu(h,!1),c.plan()},Pu=function(h,c){for(var v=h._model,p=h._scheduler,g=c?h._componentsViews:h._chartsViews,d=c?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_<g.length;_++)g[_].__alive=!1;c?v.eachComponent(function(b,x){b!=="series"&&S(x)}):v.eachSeries(S);function S(b){var x=b.__requireNewView;b.__requireNewView=!1;var M="_ec_"+b.id+"_"+b.type,C=!x&&d[M];if(!C){var T=$e(b.type),D=c?Zt.getClass(T.main,T.sub):le.getClass(T.sub);C=new D,C.init(v,m),d[M]=C,g.push(C),y.add(C.group)}b.__viewId=C.__id=M,C.__alive=!0,C.__model=b,C.group.__ecComponentInfo={mainType:b.mainType,index:b.componentIndex},!c&&p.prepareView(C,b,v,m)}for(var _=0;_<g.length;){var w=g[_];w.__alive?_++:(!c&&w.renderTask.dispose(),y.remove(w.group),w.dispose(v,m),g.splice(_,1),d[w.__id]===w&&delete d[w.__id],w.__id=w.group.__ecComponentInfo=null)}},Mo=function(h,c,v,p,g){var d=h._model;if(d.setUpdatePayload(v),!p){A([].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};g&&(m.subType=g);var _=v.excludeSeriesId,S;_!=null&&(S=K(),A(Ot(_),function(b){var x=Re(b,null);x!=null&&S.set(x,!0)})),d&&d.eachComponent(m,function(b){var x=S&&S.get(b.id)!=null;if(!x)if(vp(v))if(b instanceof be)v.type===mi&&!v.notBlur&&!b.get(["emphasis","disabled"])&&Bx(b,v,h._api);else{var M=iv(b.mainType,b.componentIndex,v.name,h._api),C=M.focusSelf,T=M.dispatchers;v.type===mi&&C&&!v.notBlur&&Wf(b.mainType,b.componentIndex,h._api),T&&A(T,function(D){v.type===mi?Ci(D):Ai(D)})}else Yf(v)&&b instanceof be&&(Fx(b,v,h._api),fp(b),ue(h))},h),d&&d.eachComponent(m,function(b){var x=S&&S.get(b.id)!=null;x||w(h[p==="series"?"_chartsMap":"_componentsMap"][b.__viewId])},h);function w(b){b&&b.__alive&&b[c]&&b[c](b.__model,d,h._api,v)}},wr={prepareAndUpdate:function(h){Ki(this),wr.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,c){var v=this._model,p=this._api,g=this._zr,d=this._coordSysMgr,y=this._scheduler;if(v){v.setUpdatePayload(h),y.restoreData(v,h),y.performSeriesTasks(v),d.create(v,p),y.performDataProcessorTasks(v,h),Eu(this,v),d.update(v,p),e(v),y.performVisualTasks(v,h),Ou(this,v,p,h,c);var m=v.get("backgroundColor")||"transparent",_=v.get("darkMode");g.setBackgroundColor(m),_!=null&&_!=="auto"&&g.setDarkMode(_),De.trigger("afterupdate",v,p)}},updateTransform:function(h){var c=this,v=this._model,p=this._api;if(v){v.setUpdatePayload(h);var g=[];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&&g.push(_)}else g.push(_)}});var d=K();v.eachSeries(function(y){var m=c._chartsMap[y.__viewId];if(m.updateTransform){var _=m.updateTransform(y,v,p,h);_&&_.update&&d.set(y.uid,1)}else d.set(y.uid,1)}),e(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0,dirtyMap:d}),Co(this,v,p,h,{},d),De.trigger("afterupdate",v,p)}},updateView:function(h){var c=this._model;c&&(c.setUpdatePayload(h),le.markUpdateMethod(h,"updateView"),e(c),this._scheduler.performVisualTasks(c,h,{setDirty:!0}),Ou(this,c,this._api,h,{}),De.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()}),le.markUpdateMethod(h,"updateVisual"),e(v),this._scheduler.performVisualTasks(v,h,{visualType:"visual",setDirty:!0}),v.eachComponent(function(p,g){if(p!=="series"){var d=c.getViewOfComponentModel(g);d&&d.__alive&&d.updateVisual(g,v,c._api,h)}}),v.eachSeries(function(p){var g=c._chartsMap[p.__viewId];g.updateVisual(p,v,c._api,h)}),De.trigger("afterupdate",v,this._api))},updateLayout:function(h){wr.update.call(this,h)}},Ru=function(h,c,v,p){if(h._disposed){h.id;return}for(var g=h._model,d=h._coordSysMgr.getCoordinateSystems(),y,m=ga(g,v),_=0;_<d.length;_++){var S=d[_];if(S[c]&&(y=S[c](g,m,p))!=null)return y}},Eu=function(h,c){var v=h._chartsMap,p=h._scheduler;c.eachSeries(function(g){p.updateStreamModes(g,v[g.__viewId])})},ku=function(h,c){var v=this,p=this.getModel(),g=h.type,d=h.escapeConnect,y=Bs[g],m=y.actionInfo,_=(m.update||"update").split(":"),S=_.pop(),w=_[0]!=null&&$e(_[0]);this[Bt]=!0;var b=[h],x=!1;h.batch&&(x=!0,b=H(h.batch,function(P){return P=lt(B({},P),h),P.batch=null,P}));var M=[],C,T=Yf(h),D=vp(h);if(D&&Gm(this._api),A(b,function(P){if(C=y.action(P,v._model,v._api),C=C||B({},P),C.type=m.event||C.type,M.push(C),D){var R=Kh(h),E=R.queryOptionMap,z=R.mainTypeSpecified,k=z?E.keys()[0]:"series";Mo(v,S,P,k),ue(v)}else T?(Mo(v,S,P,"series"),ue(v)):w&&Mo(v,S,P,w.main,w.sub)}),S!=="none"&&!D&&!T&&!w)try{this[Kt]?(Ki(this),wr.update.call(this,h),this[Kt]=null):wr[S].call(this,h)}catch(P){throw this[Bt]=!1,P}if(x?C={type:m.event||g,escapeConnect:d,batch:M}:C=M[0],this[Bt]=!1,!c){var L=this._messageCenter;if(L.trigger(C.type,C),T){var I={type:"selectchanged",escapeConnect:d,selected:Hx(p),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};L.trigger(I.type,I)}}},Yn=function(h){for(var c=this._pendingActions;c.length;){var v=c.shift();ku.call(this,v,h)}},Zn=function(h){!h&&this.trigger("updated")},Ad=function(h,c){h.on("rendered",function(v){c.trigger("rendered",v),h.animation.isFinished()&&!c[Kt]&&!c._scheduler.unfinished&&!c._pendingActions.length&&c.trigger("finished")})},Dd=function(h,c){h.on("mouseover",function(v){var p=v.target,g=un(p,Uf);g&&(zx(g,v,c._api),ue(c))}).on("mouseout",function(v){var p=v.target,g=un(p,Uf);g&&(Vx(g,v,c._api),ue(c))}).on("click",function(v){var p=v.target,g=un(p,function(m){return st(m).dataIndex!=null},!0);if(g){var d=g.selected?"unselect":"select",y=st(g);c._api.dispatchAction({type:d,dataType:y.dataType,dataIndexInside:y.dataIndex,seriesIndex:y.seriesIndex,isFromClick:!0})}})};function e(h){h.clearColorPalette(),h.eachSeries(function(c){c.clearColorPalette()})}function i(h){var c=[],v=[],p=!1;if(h.eachComponent(function(m,_){var S=_.get("zlevel")||0,w=_.get("z")||0,b=_.getZLevelKey();p=p||!!b,(m==="series"?v:c).push({zlevel:S,z:w,idx:_.componentIndex,type:m,key:b})}),p){var g=c.concat(v),d,y;qo(g,function(m,_){return m.zlevel===_.zlevel?m.z-_.z:m.zlevel-_.zlevel}),A(g,function(m){var _=h.getComponent(m.type,m.idx),S=m.zlevel,w=m.key;d!=null&&(S=Math.max(d,S)),w?(S===d&&w!==y&&S++,y=w):y&&(S===d&&S++,y=""),d=S,_.setZLevel(S)})}}Ou=function(h,c,v,p,g){i(c),Ld(h,c,v,p,g),A(h._chartsViews,function(d){d.__alive=!1}),Co(h,c,v,p,g),A(h._chartsViews,function(d){d.__alive||d.remove(c,v)})},Ld=function(h,c,v,p,g,d){A(d||h._componentsViews,function(y){var m=y.__model;u(m,y),y.render(m,c,v,p),s(m,y),f(m,y)})},Co=function(h,c,v,p,g,d){var y=h._scheduler;g=B(g||{},{updatedSeries:c.getSeries()}),De.trigger("series:beforeupdate",c,v,g);var m=!1;c.eachSeries(function(_){var S=h._chartsMap[_.__viewId];S.__alive=!0;var w=S.renderTask;y.updatePayload(w,p),u(_,S),d&&d.get(_.uid)&&w.dirty(),w.perform(y.getPerformArgs(w))&&(m=!0),S.group.silent=!!_.get("silent"),o(_,S),fp(_)}),y.unfinished=m||y.unfinished,De.trigger("series:layoutlabels",c,v,g),De.trigger("series:transition",c,v,g),c.eachSeries(function(_){var S=h._chartsMap[_.__viewId];s(_,S),f(_,S)}),a(h,c),De.trigger("series:afterupdate",c,v,g)},ue=function(h){h[Lu]=!0,h.getZr().wakeUp()},Pd=function(h){h[Lu]&&(h.getZr().storage.traverse(function(c){Sa(c)||n(c)}),h[Lu]=!1)};function n(h){for(var c=[],v=h.currentStates,p=0;p<v.length;p++){var g=v[p];g==="emphasis"||g==="blur"||g==="select"||c.push(g)}h.selected&&h.states.select&&c.push("select"),h.hoverState===il&&h.states.emphasis?c.push("emphasis"):h.hoverState===rl&&h.states.blur&&c.push("blur"),h.useStates(c)}function a(h,c){var v=h._zr,p=v.storage,g=0;p.traverse(function(d){d.isGroup||g++}),g>c.get("hoverLayerThreshold")&&!Q.node&&!Q.worker&&c.eachSeries(function(d){if(!d.preventUsingHoverLayer){var y=h._chartsMap[d.__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(g){return l(g,v,p,-1/0),!0})}}function l(h,c,v,p){var g=h.getTextContent(),d=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(g&&(g.z=c,g.zlevel=v,isFinite(p)&&(g.z2=p+2)),d){var S=h.textGuideLineConfig;d.z=c,d.zlevel=v,isFinite(p)&&(d.z2=p+(S&&S.showAbove?1:-1))}return p}function u(h,c){c.eachRendered(function(v){if(!Sa(v)){var p=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.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(),g=v.get("duration"),d=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Sa(y))return;if(y instanceof vt&&Zx(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=d;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=d),S&&(S.stateTransition=d)}y.__dirty&&n(y)}})}Id=function(h){return new(function(c){O(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 g=p.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);p=p.parent}},v.prototype.enterEmphasis=function(p,g){Ci(p,g),ue(h)},v.prototype.leaveEmphasis=function(p,g){Ai(p,g),ue(h)},v.prototype.enterBlur=function(p){zm(p),ue(h)},v.prototype.leaveBlur=function(p){rv(p),ue(h)},v.prototype.enterSelect=function(p){Vm(p),ue(h)},v.prototype.leaveSelect=function(p){Fm(p),ue(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}(C0))(h)},g_=function(h){function c(v,p){for(var g=0;g<v.length;g++){var d=v[g];d[Iu]=p}}A(xa,function(v,p){h._messageCenter.on(p,function(g){if(Rd[h.group]&&h[Iu]!==Cd){if(g&&g.escapeConnect)return;var d=h.makeActionFromEvent(g),y=[];A(Ta,function(m){m!==h&&m.group===h.group&&y.push(m)}),c(y,Cd),A(y,function(m){m[Iu]!==EA&&m.dispatchAction(d)}),c(y,kA)}})})}}(),t}(we),Dv=y_.prototype;Dv.on=h_("on");Dv.off=h_("off");Dv.one=function(r,t,e){var i=this;function n(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),i.off(r,n)}this.on.call(this,r,n,e)};var OA=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Bs={},xa={},oh=[],sh=[],zs=[],m_={},lh={},Ta={},Rd={},NA=+new Date-0,Lv="_echarts_instance_";function BA(r,t,e){var i=!(e&&e.ssr);if(i){var n=zA(r);if(n)return n}var a=new y_(r,t,e);return a.id="ec_"+NA++,Ta[a.id]=a,i&&wm(r,Lv,a.id),g_(a),De.trigger("afterinit",a),a}function zA(r){return Ta[Dw(r,Lv)]}function __(r,t){m_[r]=t}function S_(r){ot(sh,r)<0&&sh.push(r)}function b_(r,t){Pv(oh,r,t,MA)}function VA(r){Iv("afterinit",r)}function FA(r){Iv("afterupdate",r)}function Iv(r,t){De.on(r,t)}function er(r,t,e){$(t)&&(e=t,t="");var i=Y(r)?r.type:[r,r={event:t}][0];r.event=(r.event||i).toLowerCase(),t=r.event,!xa[t]&&(Ee(Md.test(i)&&Md.test(t)),Bs[i]||(Bs[i]={action:e,actionInfo:r}),xa[t]=i)}function HA(r,t){Sv.register(r,t)}function GA(r,t){Pv(zs,r,t,l_,"layout")}function Bi(r,t){Pv(zs,r,t,u_,"visual")}var Ed=[];function Pv(r,t,e,i,n){if(($(t)||Y(t))&&(e=t,t=i),!(ot(Ed,e)>=0)){Ed.push(e);var a=$0.wrapStageHandler(e,n);a.__prio=t,a.__raw=e,r.push(a)}}function w_(r,t){lh[r]=t}function WA(r,t,e){var i=SA("registerMap");i&&i(r,t,e)}var UA=QM;Bi(Av,CC);Bi(xl,AC);Bi(xl,DC);Bi(Av,HC);Bi(xl,GC);Bi(f_,mA);S_(D0);b_(xA,kM);w_("default",LC);er({type:mi,event:mi,update:mi},Vt);er({type:rs,event:rs,update:rs},Vt);er({type:ya,event:ya,update:ya},Vt);er({type:is,event:is,update:is},Vt);er({type:ma,event:ma,update:ma},Vt);__("light",VC);__("dark",J0);function Xn(r){return r==null?0:r.length||1}function kd(r){return r}var Rv=function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||kd,this._newKeyGetter=n||kd,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=n[o],l=i[s],u=Xn(l);if(u>1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=i[l],f=n[l],h=Xn(u),c=Xn(f);if(h>1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[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,n)},r.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var n=t[i],a=e[n],o=Xn(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[n]=null}},r.prototype._initIndexMap=function(t,e,i,n){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[n](t[o],o);if(a||(i[o]=s),!!e){var l=e[s],u=Xn(l);u===0?(e[s]=o,a&&i.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r}(),YA=function(){function r(t,e){this._encode=t,this._schema=e}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 ZA(r,t){var e={},i=e.encode={},n=K(),a=[],o=[],s={};A(r.dimensions,function(c){var v=r.getDimensionInfo(c),p=v.coordDim;if(p){var g=v.coordDimIndex;Nu(i,p)[g]=c,v.isExtraCoord||(n.set(p,1),$A(v.type)&&(a[0]=c),Nu(s,p)[g]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(c)}b0.each(function(d,y){var m=Nu(i,y),_=v.otherDims[y];_!=null&&_!==!1&&(m[_]=v.name)})});var l=[],u={};n.each(function(c,v){var p=i[v];u[v]=p[0],l=l.concat(p)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=H(l,function(c){return r.getDimensionInfo(c).storeDimIndex}),e.encodeFirstDimNotExtra=u;var f=i.label;f&&f.length&&(a=f.slice());var h=i.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=o,e.userOutput=new YA(s,t),e}function Nu(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function XA(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function $A(r){return!(r==="ordinal"||r==="time")}var os=function(){function r(t){this.otherDims={},t!=null&&B(this,t)}return r}(),qA=_t(),KA={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},x_=function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=C_(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return et(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=P0(this.source),i=!A_(t),n="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=e?h.name:null,u=h.type,f=h.ordinalMeta,s++;else{var c=this.getSourceDimension(o);c&&(l=e?c.name:null,u=c.type)}a.push({property:l,type:u,ordinalMeta:f}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(n+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),n+="$",n+=KA[u]||"f",f&&(n+=f.uid),n+="$"}var v=this.source,p=[v.seriesLayoutBy,v.startIndex,n].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var n=void 0,a=this.dimensions[i];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(n=a.name),i++;else{var o=this.getSourceDimension(e);o&&(n=o.name)}t.push(n)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function T_(r){return r instanceof x_}function M_(r){for(var t=K(),e=0;e<(r||[]).length;e++){var i=r[e],n=Y(i)?i.name:i;n!=null&&t.get(n)==null&&t.set(n,e)}return t}function C_(r){var t=qA(r);return t.dimNameMap||(t.dimNameMap=M_(r.dimensionsDefine))}function A_(r){return r>30}var $n=Y,xr=H,QA=typeof Int32Array>"u"?Array:Int32Array,JA="e\0\0",Od=-1,jA=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],tD=["_approximateExtent"],Nd,Ao,qn,Kn,Bu,Do,zu,bi=function(){function r(t,e){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 i,n=!1;T_(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f<i.length;f++){var h=i[f],c=W(h)?new os({name:h}):h instanceof os?h:new os(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),a[v]=c,u[v]!=null&&(l=!0),c.createInvertedIndices&&(s[v]=[]),p.itemName===0&&(this._nameDimIdx=f),p.itemId===0&&(this._idDimIdx=f),n&&(c.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=K();A(o,function(d){g.set(a[d].storeDimIndex,d)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var i=this._dimIdxToName.get(e);if(i!=null)return i;var n=this._schema.getSourceDimension(e);if(n)return n.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(yt(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(i){return e.hasOwnProperty(i)?e[i]:void 0}:function(i){return e[i]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(e==null)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return n?n[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,i=e.encode[t];return(i||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,i){var n=this,a;if(t instanceof Jf&&(a=t),!a){var o=this.dimensions,s=bv(t)||te(t)?new R0(t,o.length):t;a=new Jf;var l=xr(o,function(u){return{type:n._dimInfos[u].type,property:u}});a.initData(s,l,i)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=ZA(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e.length),n=i.start,a=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=n;s<a;s++){var l=s-n;this._nameList[s]=e[l],o&&zu(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var n=this._dimInfos[e[i]];n.ordinalMeta&&t.collectOrdinalMeta(n.storeDimIndex,n.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Br&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===xe;if(l&&!n.pure)for(var u=[],f=t;f<e;f++){var h=n.getItem(f,u);if(!this.hasItemOption&&pw(h)&&(this.hasItemOption=!0),h){var c=h.name;a[f]==null&&c!=null&&(a[f]=Re(c,null));var v=h.id;o[f]==null&&v!=null&&(o[f]=Re(v,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<e;f++)zu(this,f);Nd(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){$n(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return i==null&&this._nameDimIdx!=null&&(i=qn(this,this._nameDimIdx,e)),i==null&&(i=""),i},r.prototype._getCategory=function(t,e){var i=this._store.get(t,e),n=this._store.getOrdinalMeta(t);return n?n.categories[i]:i},r.prototype.getId=function(t){return Ao(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.get(n.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var i=this._store,n=this._dimInfos[t];if(n)return i.getByRawIndex(n.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var i=this,n=this._store;return V(t)?n.getValues(xr(t,function(a){return i._getStoreDimIndex(a)}),e):n.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return n==null||isNaN(n)?Od:n},r.prototype.indicesOfNearest=function(t,e,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,i)},r.prototype.each=function(t,e,i){$(t)&&(i=e,e=t,t=[]);var n=i||this,a=xr(Kn(t),this._getStoreDimIndex,this);this._store.each(a,n?U(e,n):e)},r.prototype.filterSelf=function(t,e,i){$(t)&&(i=e,e=t,t=[]);var n=i||this,a=xr(Kn(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,n?U(e,n):e),this},r.prototype.selectRange=function(t){var e=this,i={},n=bt(t);return A(n,function(a){var o=e._getStoreDimIndex(a);i[o]=t[a]}),this._store=this._store.selectRange(i),this},r.prototype.mapArray=function(t,e,i){$(t)&&(i=e,e=t,t=[]),i=i||this;var n=[];return this.each(t,function(){n.push(e&&e.apply(this,arguments))},i),n},r.prototype.map=function(t,e,i,n){var a=i||n||this,o=xr(Kn(t),this._getStoreDimIndex,this),s=Do(this);return s._store=this._store.map(o,a?U(e,a):e),s},r.prototype.modify=function(t,e,i,n){var a=i||n||this,o=xr(Kn(t),this._getStoreDimIndex,this);this._store.modify(o,a?U(e,a):e)},r.prototype.downSample=function(t,e,i,n){var a=Do(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,i,n),a},r.prototype.lttbDownSample=function(t,e){var i=Do(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new wt(i,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Rv(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Ao(t,i)},function(i){return Ao(e,i)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},$n(t)?B(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t],n=i&&i[e];return n??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),V(a)?a=a.slice():$n(a)&&(a=B({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,$n(e)?B(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){$n(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;Hf(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:xr(this.dimensions,this._getDimInfo,this),this.hostModel)),Bu(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];$(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Vh(arguments)))})},r.internalField=function(){Nd=function(t){var e=t._invertedIndicesMap;A(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new QA(o.categories.length);for(var l=0;l<i.length;l++)i[l]=Od;for(var l=0;l<s.count();l++)i[s.get(a.storeDimIndex,l)]=l}})},qn=function(t,e,i){return Re(t._getCategory(e,i),null)},Ao=function(t,e){var i=t._idList[e];return i==null&&t._idDimIdx!=null&&(i=qn(t,t._idDimIdx,e)),i==null&&(i=JA+e),i},Kn=function(t){return V(t)||(t=t!=null?[t]:[]),t},Do=function(t){var e=new r(t._schema?t._schema:xr(t.dimensions,t._getDimInfo,t),t.hostModel);return Bu(e,t),e},Bu=function(t,e){A(jA.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,A(tD,function(i){t[i]=X(e[i])}),t._calculationInfo=B({},e._calculationInfo)},zu=function(t,e){var i=t._nameList,n=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=i[e],l=n[e];if(s==null&&a!=null&&(i[e]=s=qn(t,a,e)),l==null&&o!=null&&(n[e]=l=qn(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),n[e]=l}}}(),r}();function D_(r,t){bv(r)||(r=L0(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=K(),a=[],o=rD(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&A_(o),l=i===r.dimensionsDefine,u=l?C_(r):M_(i),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=K(f),c=new B0(o),v=0;v<c.length;v++)c[v]=-1;function p(C){var T=c[C];if(T<0){var D=i[C],L=Y(D)?D:{name:D},I=new os,P=L.name;P!=null&&u.get(P)!=null&&(I.name=I.displayName=P),L.type!=null&&(I.type=L.type),L.displayName!=null&&(I.displayName=L.displayName);var R=a.length;return c[C]=R,I.storeDimIndex=C,a.push(I),I}return a[T]}if(!s)for(var v=0;v<o;v++)p(v);h.each(function(C,T){var D=Ot(C).slice();if(D.length===1&&!W(D[0])&&D[0]<0){h.set(T,!1);return}var L=h.set(T,[]);A(D,function(I,P){var R=W(I)?u.get(I):I;R!=null&&R<o&&(L[P]=R,d(p(R),T,P))})});var g=0;A(e,function(C){var T,D,L,I;if(W(C))T=C,I={};else{I=C,T=I.name;var P=I.ordinalMeta;I.ordinalMeta=null,I=B({},I),I.ordinalMeta=P,D=I.dimsDef,L=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var R=h.get(T);if(R!==!1){if(R=Ot(R),!R.length)for(var E=0;E<(D&&D.length||1);E++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&R.push(g++)}A(R,function(z,k){var N=p(z);if(l&&I.type!=null&&(N.type=I.type),d(lt(N,I),T,k),N.name==null&&D){var F=D[k];!Y(F)&&(F={name:F}),N.name=N.displayName=F.name,N.defaultTooltip=F.defaultTooltip}L&&lt(N.otherDims,L)})}});function d(C,T,D){b0.get(T)!=null?C.otherDims[T]=D:(C.coordDim=T,C.coordDimIndex=D,n.set(T,!0))}var y=t.generateCoord,m=t.generateCoordCount,_=m!=null;m=y?m||1:0;var S=y||"value";function w(C){C.name==null&&(C.name=C.coordDim)}if(s)A(a,function(C){w(C)}),a.sort(function(C,T){return C.storeDimIndex-T.storeDimIndex});else for(var b=0;b<o;b++){var x=p(b),M=x.coordDim;M==null&&(x.coordDim=iD(S,n,_),x.coordDimIndex=0,(!y||m<=0)&&(x.isExtraCoord=!0),m--),w(x),x.type==null&&(T0(r,b)===Pt.Must||x.isExtraCoord&&(x.otherDims.itemName!=null||x.otherDims.seriesName!=null))&&(x.type="ordinal")}return eD(a),new x_({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function eD(r){for(var t=K(),e=0;e<r.length;e++){var i=r[e],n=i.name,a=t.get(n)||0;a>0&&(i.name=n+(a-1)),a++,t.set(n,a)}}function rD(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return A(t,function(a){var o;Y(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function iD(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var nD=function(){function r(t){this.coordSysDims=[],this.axisMap=K(),this.categoryAxisMap=K(),this.coordSysName=t}return r}();function aD(r){var t=r.get("coordinateSystem"),e=new nD(t),i=oD[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var oD={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",Yt).models[0],a=r.getReferringComponents("yAxis",Yt).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),Qi(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),Qi(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",Yt).models[0];t.coordSysDims=["single"],e.set("single",n),Qi(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",Yt).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Qi(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),Qi(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();A(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Qi(u)&&(i.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Qi(r){return r.get("type")==="category"}function sD(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;lD(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(A(a,function(m,_){W(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!i&&!u&&(i=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,p=f.type,g=0;A(a,function(m){m.coordDim===v&&g++});var d={name:h,coordDim:v,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:c,coordDim:c,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(d.storeDimIndex=s.ensureCalculationDimension(c,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(d),o.appendCalculationDimension(y)):(a.push(d),a.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:h}}function lD(r){return!T_(r.schema)}function Pi(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function L_(r,t){return Pi(r,t)?r.getCalculationInfo("stackResultDimension"):t}function uD(r,t){var e=r.get("coordinateSystem"),i=Sv.get(e),n;return t&&t.coordSysDims&&(n=H(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=XA(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function fD(r,t,e){var i,n;return e&&A(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function Ev(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;n=i.getSource(),a=n.sourceFormat===xe;var o=aD(t),s=uD(t,o),l=e.useEncodeDefaulter,u=$(l)?l:l?it(uM,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=D_(n,f),c=fD(h.dimensions,e.createInvertedIndices,o),v=a?null:i.getSharedDataStore(h),p=sD(t,{schema:h,store:v}),g=new bi(h,t);g.setCalculationInfo(p);var d=c!=null&&hD(n)?function(y,m,_,S){return S===c?_:this.defaultDimValueGetter(y,m,_,S)}:null;return g.hasItemOption=!1,g.initData(a?n:v,null,d),g}function hD(r){if(r.sourceFormat===xe){var t=vD(r.data||[]);return!V(Wa(t))}}function vD(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var rr=function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();js(rr);var cD=0,uh=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++cD}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&H(i,pD);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!W(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=K(this.categories))},r}();function pD(r){return Y(r)&&r.value!=null?r.value:r+""}function fh(r){return r.type==="interval"||r.type==="log"}function dD(r,t,e,i){var n={},a=r[1]-r[0],o=n.interval=gm(a/t);e!=null&&o<e&&(o=n.interval=e),i!=null&&o>i&&(o=n.interval=i);var s=n.intervalPrecision=I_(o),l=n.niceTickExtent=[Tt(Math.ceil(r[0]/o)*o,s),Tt(Math.floor(r[1]/o)*o,s)];return gD(l,r),n}function Vu(r){var t=Math.pow(10,$h(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Tt(e*t)}function I_(r){return Xe(r)+2}function Bd(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function gD(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Bd(r,0,t),Bd(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Tl(r,t){return r>=t[0]&&r<=t[1]}function Ml(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Cl(r,t){return r*(t[1]-t[0])+t[0]}var kv=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new uh({})),V(n)&&(n=new uh({categories:H(n,function(a){return Y(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:W(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Tl(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Ml(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Cl(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,n=i[0];n<=i[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);o<l;++o){var u=i[o];n[o]=u,a[u]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;n.push(f),a[f]=o}},t.prototype._getTickNumber=function(e){var i=this._ticksByOrdinalNumber;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getRawOrdinalNumber=function(e){var i=this._ordinalNumbersByTick;return i&&e>=0&&e<i.length?i[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var i=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[i];return n==null?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(rr);rr.registerClass(kv);var ui=Tt,An=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Tl(e,this._extent)},t.prototype.normalize=function(e){return Ml(e,this._extent)},t.prototype.scale=function(e){return Cl(e,this._extent)},t.prototype.setExtent=function(e,i){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(i)||(n[1]=parseFloat(i))},t.prototype.unionExtent=function(e){var i=this._extent;e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1]),this.setExtent(i[0],i[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=I_(e)},t.prototype.getTicks=function(e){var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!i)return s;var l=1e4;n[0]<a[0]&&(e?s.push({value:ui(a[0]-i,o)}):s.push({value:n[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=ui(u+i,o),u!==s[s.length-1].value);)if(s.length>l)return[];var f=s.length?s[s.length-1].value:a[1];return n[1]>f&&(e?s.push({value:ui(f+i,o)}):s.push({value:n[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),n=[],a=this.getExtent(),o=1;o<i.length;o++){for(var s=i[o],l=i[o-1],u=0,f=[],h=s.value-l.value,c=h/e;u<e-1;){var v=ui(l.value+(u+1)*c);v>a[0]&&v<a[1]&&f.push(v),u++}n.push(f)}return n},t.prototype.getLabel=function(e,i){if(e==null)return"";var n=i&&i.precision;n==null?n=Xe(e.value)||0:n==="auto"&&(n=this._intervalPrecision);var a=ui(e.value,n,!0);return g0(a)},t.prototype.calcNiceTicks=function(e,i,n){e=e||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=dD(a,e,i,n);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var n=Math.abs(i[0]);e.fixMax||(i[1]+=n/2),i[0]-=n/2}else i[1]=1;var a=i[1]-i[0];isFinite(a)||(i[0]=0,i[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(i[0]=ui(Math.floor(i[0]/o)*o)),e.fixMax||(i[1]=ui(Math.ceil(i[1]/o)*o))},t.prototype.setNiceExtent=function(e,i){this._niceExtent=[e,i]},t.type="interval",t}(rr);rr.registerClass(An);var P_=typeof Float32Array<"u",yD=P_?Float32Array:Array;function ur(r){return V(r)?P_?new Float32Array(r):r:new yD(r)}var mD="__ec_stack_";function R_(r){return r.get("stack")||mD+r.seriesIndex}function Ov(r){return r.dim+r.index}function E_(r,t){var e=[];return t.eachSeriesByType(r,function(i){O_(i)&&e.push(i)}),e}function _D(r){var t={};A(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(),g=0,d=p.count();g<d;++g){var y=p.get(v,g);t[c]?t[c].push(y):t[c]=[y]}});var e={};for(var i in t)if(t.hasOwnProperty(i)){var n=t[i];if(n){n.sort(function(l,u){return l-u});for(var a=null,o=1;o<n.length;++o){var s=n[o]-n[o-1];s>0&&(a=a===null?s:Math.min(a,s))}e[i]=a}}return e}function k_(r){var t=_D(r),e=[];return A(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var p=q(i.get("barWidth"),s),g=q(i.get("barMaxWidth"),s),d=q(i.get("barMinWidth")||(N_(i)?.5:1),s),y=i.get("barGap"),m=i.get("barCategoryGap");e.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:d,barGap:y,barCategoryGap:m,axisKey:Ov(a),stackId:R_(i)})}),SD(e)}function SD(r){var t={};A(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var c=i.barMinWidth;c&&(l[u].minWidth=c);var v=i.barGap;v!=null&&(s.gap=v);var p=i.barCategoryGap;p!=null&&(s.categoryGap=p)});var e={};return A(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=bt(a).length;s=Math.max(35-l*4,15)+"%"}var u=q(s,o),f=q(i.gap,1),h=i.remainedWidth,c=i.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),A(a,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,g;A(a,function(y,m){y.width||(y.width=v),g=y,p+=y.width*(1+f)}),g&&(p-=g.width*f);var d=-p/2;A(a,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:d,width:y.width},d+=y.width*(1+f)})}),e}function bD(r,t,e){if(r&&t){var i=r[Ov(t)];return i}}function wD(r,t){var e=E_(r,t),i=k_(e);A(e,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=R_(n),u=i[Ov(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function xD(r){return{seriesType:r,plan:Mv(),reset:function(t){if(O_(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=Pi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=TD(n,a),p=N_(t),g=t.get("barMinHeight")||0,d=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var w=_.count,b=p&&ur(w*3),x=p&&l&&ur(w*3),M=p&&ur(w),C=i.master.getRect(),T=c?C.width:C.height,D,L=S.getStore(),I=0;(D=_.next())!=null;){var P=L.get(h?d:o,D),R=L.get(s,D),E=v,z=void 0;h&&(z=+P-L.get(o,D));var k=void 0,N=void 0,F=void 0,G=void 0;if(c){var Z=i.dataToPoint([P,R]);if(h){var rt=i.dataToPoint([z,R]);E=rt[0]}k=E,N=Z[1]+m,F=Z[0]-E,G=y,Math.abs(F)<g&&(F=(F<0?-1:1)*g)}else{var Z=i.dataToPoint([R,P]);if(h){var rt=i.dataToPoint([R,z]);E=rt[1]}k=Z[0]+m,N=E,F=y,G=Z[1]-E,Math.abs(G)<g&&(G=(G<=0?-1:1)*g)}p?(b[I]=k,b[I+1]=N,b[I+2]=c?F:G,x&&(x[I]=c?C.x:k,x[I+1]=c?N:C.y,x[I+2]=T),M[D]=D):S.setItemLayout(D,{x:k,y:N,width:F,height:G}),I+=3}p&&S.setLayout({largePoints:b,largeDataIndices:M,largeBackgroundPoints:x,valueAxisHorizontal:c})}}}}}}function O_(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function N_(r){return r.pipelineContext&&r.pipelineContext.large}function TD(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var MD=function(r,t,e,i){for(;e<i;){var n=e+i>>>1;r[n][1]<t?e=n+1:i=n}return e},B_=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="time",i}return t.prototype.getLabel=function(e){var i=this.getSetting("useUTC");return vl(e.value,Dp[jT(dn(this._minLevelUnit))]||Dp.second,i,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,i,n){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return tM(e,i,n,o,a)},t.prototype.getTicks=function(){var e=this._interval,i=this._extent,n=[];if(!e)return n;n.push({value:i[0],level:0});var a=this.getSetting("useUTC"),o=RD(this._minLevelUnit,this._approxInterval,a,i);return n=n.concat(o),n.push({value:i[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1]&&(i[0]-=me,i[1]+=me),i[1]===-1/0&&i[0]===1/0){var n=new Date;i[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),i[0]=i[1]-me}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,i,n){e=e||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/e,i!=null&&this._approxInterval<i&&(this._approxInterval=i),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var s=Lo.length,l=Math.min(MD(Lo,this._approxInterval,0,s),s-1);this._interval=Lo[l][1],this._minLevelUnit=Lo[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return yt(e)?e:+pr(e)},t.prototype.contain=function(e){return Tl(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Ml(this.parse(e),this._extent)},t.prototype.scale=function(e){return Cl(e,this._extent)},t.type="time",t}(An),Lo=[["second",cv],["minute",pv],["hour",ba],["quarter-day",ba*6],["half-day",ba*12],["day",me*1.2],["half-week",me*3.5],["week",me*7],["month",me*31],["quarter",me*95],["half-year",Ap/2],["year",Ap]];function CD(r,t,e,i){var n=pr(t),a=pr(e),o=function(p){return Lp(n,p,i)===Lp(a,p,i)},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 AD(r,t){return r/=me,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function DD(r){var t=30*me;return r/=t,r>6?6:r>3?3:r>2?2:1}function LD(r){return r/=ba,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function zd(r,t){return r/=t?pv:cv,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function ID(r){return gm(r)}function PD(r,t,e){var i=new Date(r);switch(dn(t)){case"year":case"month":i[f0(e)](0);case"day":i[h0(e)](1);case"hour":i[v0(e)](0);case"minute":i[c0(e)](0);case"second":i[p0(e)](0),i[d0(e)](0)}return i.getTime()}function RD(r,t,e,i){var n=1e4,a=l0,o=0;function s(T,D,L,I,P,R,E){for(var z=new Date(D),k=D,N=z[I]();k<L&&k<=i[1];)E.push({value:k}),N+=T,z[P](N),k=z.getTime();E.push({value:k,notAdd:!0})}function l(T,D,L){var I=[],P=!D.length;if(!CD(dn(T),i[0],i[1],e)){P&&(D=[{value:PD(new Date(i[0]),T,e)},{value:i[1]}]);for(var R=0;R<D.length-1;R++){var E=D[R].value,z=D[R+1].value;if(E!==z){var k=void 0,N=void 0,F=void 0,G=!1;switch(T){case"year":k=Math.max(1,Math.round(t/me/365)),N=dv(e),F=eM(e);break;case"half-year":case"quarter":case"month":k=DD(t),N=gn(e),F=f0(e);break;case"week":case"half-week":case"day":k=AD(t),N=cl(e),F=h0(e),G=!0;break;case"half-day":case"quarter-day":case"hour":k=LD(t),N=Pa(e),F=v0(e);break;case"minute":k=zd(t,!0),N=pl(e),F=c0(e);break;case"second":k=zd(t,!1),N=dl(e),F=p0(e);break;case"millisecond":k=ID(t),N=gl(e),F=d0(e);break}s(k,E,z,N,F,G,I),T==="year"&&L.length>1&&R===0&&L.unshift({value:L[0].value-k})}}for(var R=0;R<I.length;R++)L.push(I[R]);return I}}for(var u=[],f=[],h=0,c=0,v=0;v<a.length&&o++<n;++v){var p=dn(a[v]);if(JT(a[v])){l(a[v],u[u.length-1]||[],f);var g=a[v+1]?dn(a[v+1]):null;if(p!==g){if(f.length){c=h,f.sort(function(T,D){return T.value-D.value});for(var d=[],y=0;y<f.length;++y){var m=f[y].value;(y===0||f[y-1].value!==m)&&(d.push(f[y]),m>=i[0]&&m<=i[1]&&h++)}var _=(i[1]-i[0])/t;if(h>_*1.5&&c>_/1.5||(u.push(d),h>_||r===a[v]))break}f=[]}}}for(var S=Lt(H(u,function(T){return Lt(T,function(D){return D.value>=i[0]&&D.value<=i[1]&&!D.notAdd})}),function(T){return T.length>0}),w=[],b=S.length-1,v=0;v<S.length;++v)for(var x=S[v],M=0;M<x.length;++M)w.push({value:x[M].value,level:b-v});w.sort(function(T,D){return T.value-D.value});for(var C=[],v=0;v<w.length;++v)(v===0||w[v].value!==w[v-1].value)&&C.push(w[v]);return C}rr.registerClass(B_);var Vd=rr.prototype,Ma=An.prototype,ED=Tt,kD=Math.floor,OD=Math.ceil,Io=Math.pow,Me=Math.log,Nv=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new An,e._interval=0,e}return t.prototype.getTicks=function(e){var i=this._originalScale,n=this._extent,a=i.getExtent(),o=Ma.getTicks.call(this,e);return H(o,function(s){var l=s.value,u=Tt(Io(this.base,l));return u=l===n[0]&&this._fixMin?Po(u,a[0]):u,u=l===n[1]&&this._fixMax?Po(u,a[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,i){var n=Me(this.base);e=Me(Math.max(0,e))/n,i=Me(Math.max(0,i))/n,Ma.setExtent.call(this,e,i)},t.prototype.getExtent=function(){var e=this.base,i=Vd.getExtent.call(this);i[0]=Io(e,i[0]),i[1]=Io(e,i[1]);var n=this._originalScale,a=n.getExtent();return this._fixMin&&(i[0]=Po(i[0],a[0])),this._fixMax&&(i[1]=Po(i[1],a[1])),i},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var i=this.base;e[0]=Me(e[0])/Me(i),e[1]=Me(e[1])/Me(i),Vd.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.calcNiceTicks=function(e){e=e||10;var i=this._extent,n=i[1]-i[0];if(!(n===1/0||n<=0)){var a=vw(n),o=e/n*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Tt(OD(i[0]/a)*a),Tt(kD(i[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){Ma.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Me(e)/Me(this.base),Tl(e,this._extent)},t.prototype.normalize=function(e){return e=Me(e)/Me(this.base),Ml(e,this._extent)},t.prototype.scale=function(e){return e=Cl(e,this._extent),Io(this.base,e)},t.type="log",t}(rr),z_=Nv.prototype;z_.getMinorTicks=Ma.getMinorTicks;z_.getLabel=Ma.getLabel;function Po(r,t){return ED(r,Xe(t))}rr.registerClass(Nv);var ND=function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var n=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=e.get("min",!0);a==null&&(a=e.get("startValue",!0));var o=this._modelMinRaw=a;$(o)?this._modelMinNum=Ro(t,o({min:i[0],max:i[1]})):o!=="dataMin"&&(this._modelMinNum=Ro(t,o));var s=this._modelMaxRaw=e.get("max",!0);if($(s)?this._modelMaxNum=Ro(t,s({min:i[0],max:i[1]})):s!=="dataMax"&&(this._modelMaxNum=Ro(t,s)),n)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=V(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Ke(u[0],1),Ke(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,i=this._dataMax,n=this._axisDataLen,a=this._boundaryGapInner,o=t?null:i-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=t?n?0:NaN:e-a[0]*o),l==null&&(l=t?n?n-1:NaN:i+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=hs(s)||hs(l)||t&&!n;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(t,e){this[zD[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=BD[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),BD={min:"_determinedMin",max:"_determinedMax"},zD={min:"_dataMin",max:"_dataMax"};function V_(r,t,e){var i=r.rawExtentInfo;return i||(i=new ND(r,t,e),r.rawExtentInfo=i,i)}function Ro(r,t){return t==null?null:hs(t)?NaN:r.parse(t)}function F_(r,t){var e=r.type,i=V_(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=t.ecModel;if(o&&e==="time"){var s=E_("bar",o),l=!1;if(A(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=k_(s),f=VD(n,a,t,u);n=f.min,a=f.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function VD(r,t,e,i){var n=e.axis.getExtent(),a=n[1]-n[0],o=bD(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;A(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function Fd(r,t){var e=t,i=F_(r,e),n=i.extent,a=e.get("splitNumber");r instanceof Nv&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function FD(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new kv({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new B_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(rr.getClass(t)||An)}}function HD(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function Dn(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(i){return function(n,a){return r.scale.getFormattedLabel(n,a,i)}}(t):W(t)?function(i){return function(n){var a=r.scale.getLabel(n),o=i.replace("{value}",a??"");return o}}(t):$(t)?function(i){return function(n,a){return e!=null&&(a=n.value-e),i(Bv(r,n),a,n.level!=null?{level:n.level}:null)}}(t):function(i){return r.scale.getLabel(i)}}function Bv(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function GD(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var i,n,a=e.getExtent();e instanceof kv?n=e.count():(i=e.getTicks(),n=i.length);var o=r.getLabelModel(),s=Dn(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;f<n;f+=u){var h=i?i[f]:{value:a[0]+f},c=s(h,f),v=o.getTextRect(c),p=WD(v,o.get("rotate")||0);l?l.union(p):l=p}return l}}function WD(r,t){var e=t*Math.PI/180,i=r.width,n=r.height,a=i*Math.abs(Math.cos(e))+Math.abs(n*Math.sin(e)),o=i*Math.abs(Math.sin(e))+Math.abs(n*Math.cos(e)),s=new ft(r.x,r.y,a,o);return s}function zv(r){var t=r.get("interval");return t??"auto"}function H_(r){return r.type==="category"&&zv(r.getLabelModel())===0}function G_(r,t){var e={};return A(r.mapDimensionsAll(t),function(i){e[L_(r,i)]=!0}),bt(e)}function UD(r,t,e){t&&A(G_(t,e),function(i){var n=t.getApproximateExtent(i);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}var YD=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),Hd=[],ZD={registerPreprocessor:S_,registerProcessor:b_,registerPostInit:VA,registerPostUpdate:FA,registerUpdateLifecycle:Iv,registerAction:er,registerCoordinateSystem:HA,registerLayout:GA,registerVisual:Bi,registerTransform:UA,registerLoading:w_,registerMap:WA,registerImpl:_A,PRIORITY:RA,ComponentModel:ut,ComponentView:Zt,SeriesModel:be,ChartView:le,registerComponentModel:function(r){ut.registerClass(r)},registerComponentView:function(r){Zt.registerClass(r)},registerSeriesModel:function(r){be.registerClass(r)},registerChartView:function(r){le.registerClass(r)},registerSubTypeDefaulter:function(r,t){ut.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){aw(r,t)}};function Xt(r){if(V(r)){A(r,function(t){Xt(t)});return}ot(Hd,r)>=0||(Hd.push(r),$(r)&&(r={install:r}),r.install(ZD))}var Na=_t();function W_(r,t){var e=H(t,function(i){return r.scale.parse(i)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function XD(r){var t=r.getLabelModel().get("customValues");if(t){var e=Dn(r);return{labels:W_(r,t).map(function(i){var n={value:i};return{formattedLabel:e(n),rawLabel:r.scale.getLabel(n),tickValue:i}})}}return r.type==="category"?qD(r):QD(r)}function $D(r,t){var e=r.getTickModel().get("customValues");return e?{ticks:W_(r,e)}:r.type==="category"?KD(r,t):{ticks:H(r.scale.getTicks(),function(i){return i.value})}}function qD(r){var t=r.getLabelModel(),e=U_(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function U_(r,t){var e=Y_(r,"labels"),i=zv(t),n=Z_(e,i);if(n)return n;var a,o;return $(i)?a=q_(r,i):(o=i==="auto"?JD(r):i,a=$_(r,o)),X_(e,i,{labels:a,labelCategoryInterval:o})}function KD(r,t){var e=Y_(r,"ticks"),i=zv(t),n=Z_(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),$(i))a=q_(r,i,!0);else if(i==="auto"){var s=U_(r,r.getLabelModel());o=s.labelCategoryInterval,a=H(s.labels,function(l){return l.tickValue})}else o=i,a=$_(r,o,!0);return X_(e,i,{ticks:a,tickCategoryInterval:o})}function QD(r){var t=r.scale.getTicks(),e=Dn(r);return{labels:H(t,function(i,n){return{level:i.level,formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value}})}}function Y_(r,t){return Na(r)[t]||(Na(r)[t]=[])}function Z_(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function X_(r,t,e){return r.push({key:t,value:e}),e}function JD(r){var t=Na(r).autoInterval;return t??(Na(r).autoInterval=r.calculateCategoryInterval())}function jD(r){var t=tL(r),e=Dn(r),i=(t.axisRotate-t.labelRotate)/180*Math.PI,n=r.scale,a=n.getExtent(),o=n.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),c=0,v=0;l<=a[1];l+=s){var p=0,g=0,d=Qs(e({value:l}),t.font,"center","top");p=d.width*1.3,g=d.height*1.3,c=Math.max(c,p,7),v=Math.max(v,g,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=Na(r.model),w=r.getExtent(),b=S.lastAutoInterval,x=S.lastTickCount;return b!=null&&x!=null&&Math.abs(b-_)<=1&&Math.abs(x-o)<=1&&b>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=b:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function tL(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function $_(r,t,e){var i=Dn(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=H_(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);v&&p-l!==a[1]&&g(a[1]);function g(d){var y={value:d};s.push(e?d:{formattedLabel:i(y),rawLabel:n.getLabel(y),tickValue:d})}return s}function q_(r,t,e){var i=r.scale,n=Dn(r),a=[];return A(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),a}var Gd=[0,1],eL=function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return pm(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&n.type==="ordinal"&&(i=i.slice(),Wd(i,n.count())),pt(t,Gd,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),Wd(i,n.count()));var a=pt(t,i,Gd,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=$D(this,e),n=i.ticks,a=H(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return rL(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=H(i,function(a){return H(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return XD(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 t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(){return jD(this)},r}();function Wd(r,t){var e=r[1]-r[0],i=t,n=e/i/2;r[0]+=n,r[1]-=n}function rL(r,t,e,i){var n=t.length;if(!r.onBand||e||!n)return;var a=r.getExtent(),o,s;if(n===1)t[0].coord=a[0],o=t[1]={coord:a[1]};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(i?t[0].coord=a[0]:t.shift()),i&&c(a[0],t[0].coord)&&t.unshift({coord:a[0]}),c(a[1],o.coord)&&(i?o.coord=a[1]:t.pop()),i&&c(o.coord,a[1])&&t.push({coord:a[1]});function c(v,p){return v=Tt(v),p=Tt(p),h?v>p:v<p}}function K_(r,t,e,i,n,a,o,s){var l=n-r,u=a-t,f=e-r,h=i-t,c=Math.sqrt(f*f+h*h);f/=c,h/=c;var v=l*f+u*h,p=v/c;p*=c;var g=o[0]=r+p*f,d=o[1]=t+p*h;return Math.sqrt((g-n)*(g-n)+(d-a)*(d-a))}var Pr=new j,xt=new j,Rt=new j,Rr=new j,Ye=new j,Vs=[],Ut=new j;function iL(r,t){if(t<=180&&t>0){t=t/180*Math.PI,Pr.fromArray(r[0]),xt.fromArray(r[1]),Rt.fromArray(r[2]),j.sub(Rr,Pr,xt),j.sub(Ye,Rt,xt);var e=Rr.len(),i=Ye.len();if(!(e<.001||i<.001)){Rr.scale(1/e),Ye.scale(1/i);var n=Rr.dot(Ye),a=Math.cos(t);if(a<n){var o=K_(xt.x,xt.y,Rt.x,Rt.y,Pr.x,Pr.y,Vs);Ut.fromArray(Vs),Ut.scaleAndAdd(Ye,o/Math.tan(Math.PI-t));var s=Rt.x!==xt.x?(Ut.x-xt.x)/(Rt.x-xt.x):(Ut.y-xt.y)/(Rt.y-xt.y);if(isNaN(s))return;s<0?j.copy(Ut,xt):s>1&&j.copy(Ut,Rt),Ut.toArray(r[1])}}}}function nL(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Pr.fromArray(r[0]),xt.fromArray(r[1]),Rt.fromArray(r[2]),j.sub(Rr,xt,Pr),j.sub(Ye,Rt,xt);var i=Rr.len(),n=Ye.len();if(!(i<.001||n<.001)){Rr.scale(1/i),Ye.scale(1/n);var a=Rr.dot(t),o=Math.cos(e);if(a<o){var s=K_(xt.x,xt.y,Rt.x,Rt.y,Pr.x,Pr.y,Vs);Ut.fromArray(Vs);var l=Math.PI/2,u=Math.acos(Ye.dot(t)),f=l+u-e;if(f>=l)j.copy(Ut,Rt);else{Ut.scaleAndAdd(Ye,s/Math.tan(Math.PI/2-f));var h=Rt.x!==xt.x?(Ut.x-xt.x)/(Rt.x-xt.x):(Ut.y-xt.y)/(Rt.y-xt.y);if(isNaN(h))return;h<0?j.copy(Ut,xt):h>1&&j.copy(Ut,Rt)}Ut.toArray(r[1])}}}}function Fu(r,t,e,i){var n=e==="normal",a=n?r:r.ensureState(e);a.ignore=t;var o=i.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=i.getModel("lineStyle").getLineStyle();n?r.useStyle(s):a.style=s}function aL(r,t){var e=t.smooth,i=t.points;if(i)if(r.moveTo(i[0][0],i[0][1]),e>0&&i.length>=3){var n=bf(i[0],i[1]),a=bf(i[1],i[2]);if(!n||!a){r.lineTo(i[1][0],i[1][1]),r.lineTo(i[2][0],i[2][1]);return}var o=Math.min(n,a)*e,s=El([],i[1],i[0],o/n),l=El([],i[1],i[2],o/a),u=El([],s,l,.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],i[2][0],i[2][1])}else for(var f=1;f<i.length;f++)r.lineTo(i[f][0],i[f][1])}function oL(r,t,e){var i=r.getTextGuideLine(),n=r.getTextContent();if(!n){i&&r.removeTextGuideLine();return}for(var a=t.normal,o=a.get("show"),s=n.ignore,l=0;l<xs.length;l++){var u=xs[l],f=t[u],h=u==="normal";if(f){var c=f.get("show"),v=h?s:et(n.states[u]&&n.states[u].ignore,s);if(v||!et(c,o)){var p=h?i:i&&i.states[u];p&&(p.ignore=!0),i&&Fu(i,!0,u,f);continue}i||(i=new Oi,r.setTextGuideLine(i),!h&&(s||!o)&&Fu(i,!0,"normal",t.normal),r.stateProxy&&(i.stateProxy=r.stateProxy)),Fu(i,!1,u,f)}}if(i){lt(i.style,e),i.style.fill=null;var g=a.get("showAbove"),d=r.textGuideLineConfig=r.textGuideLineConfig||{};d.showAbove=g||!1,i.buildPath=aL}}function sL(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},i=0;i<re.length;i++){var n=re[i];e[n]=r.getModel([n,t])}return e}function lL(r){for(var t=[],e=0;e<r.length;e++){var i=r[e];if(!i.defaultAttr.ignore){var n=i.label,a=n.getComputedTransform(),o=n.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=n.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var f=s?new Ms(o,a):null;t.push({label:n,labelLine:i.labelLine,rect:u,localRect:o,obb:f,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:a})}}return t}function uL(r,t,e,i,n,a){var o=r.length;if(o<2)return;r.sort(function(b,x){return b.rect[t]-x.rect[t]});for(var s=0,l,u=!1,f=0;f<o;f++){var h=r[f],c=h.rect;l=c[t]-s,l<0&&(c[t]-=l,h.label[t]-=l,u=!0),s=c[t]+c[e]}var v=r[0],p=r[o-1],g,d;y(),g<0&&S(-g,.8),d<0&&S(d,.8),y(),m(g,d,1),m(d,g,-1),y(),g<0&&w(-g),d<0&&w(d);function y(){g=v.rect[t]-i,d=n-p.rect[t]-p.rect[e]}function m(b,x,M){if(b<0){var C=Math.min(x,-b);if(C>0){_(C*M,0,o);var T=C+b;T<0&&S(-T*M,1)}else S(-b*M,1)}}function _(b,x,M){b!==0&&(u=!0);for(var C=x;C<M;C++){var T=r[C],D=T.rect;D[t]+=b,T.label[t]+=b}}function S(b,x){for(var M=[],C=0,T=1;T<o;T++){var D=r[T-1].rect,L=Math.max(r[T].rect[t]-D[t]-D[e],0);M.push(L),C+=L}if(C){var I=Math.min(Math.abs(b)/C,x);if(b>0)for(var T=0;T<o-1;T++){var P=M[T]*I;_(P,0,T+1)}else for(var T=o-1;T>0;T--){var P=M[T-1]*I;_(-P,T,o)}}}function w(b){var x=b<0?-1:1;b=Math.abs(b);for(var M=Math.ceil(b/(o-1)),C=0;C<o-1;C++)if(x>0?_(M,0,C+1):_(-M,o-C-1,o),b-=M,b<=0)return}return u}function fL(r,t,e,i){return uL(r,"y","height",t,e)}function hL(r){var t=[];r.sort(function(g,d){return d.priority-g.priority});var e=new ft(0,0,0,0);function i(g){if(!g.ignore){var d=g.ensureState("emphasis");d.ignore==null&&(d.ignore=!1)}g.ignore=!0}for(var n=0;n<r.length;n++){var a=r[n],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,f=a.labelLine;e.copy(a.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var h=a.obb,c=!1,v=0;v<t.length;v++){var p=t[v];if(e.intersect(p.rect)){if(o&&p.axisAligned){c=!0;break}if(p.obb||(p.obb=new Ms(p.localRect,p.transform)),h||(h=new Ms(s,l)),h.intersect(p.obb)){c=!0;break}}}c?(i(u),f&&i(f)):(u.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}function Ud(r,t,e){var i=xn.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*e,i.height=a*e,i}var Hu=function(r){O(t,r);function t(e,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;n=n||ys,typeof e=="string"?o=Ud(e,i,n):Y(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(Xy(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=Ud("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,i,n,a){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,b=0,x=0;x<o.length;++x){var M=o[x];if(M.intersect(m)){var C=new ft(0,0,0,0);C.copy(M),C.union(m),o[x]=C,S=!0;break}else if(l){u.copy(m),u.union(M);var T=m.width*m.height,D=M.width*M.height,L=u.width*u.height,I=L-T-D;I<w&&(w=I,b=x)}}if(l&&(o[b].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=e[h];if(c){var v=c.shouldBePainted(n,a,!0,!0),p=c.__isRendered&&(c.__dirty&qe||!v)?c.getPrevPaintRect():null;p&&f(p);var g=v&&(c.__dirty&qe||!c.__isRendered)?c.getPaintRect():null;g&&f(g)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var c=i[h],v=c&&c.shouldBePainted(n,a,!0,!0);if(c&&(!v||!c.__zr)&&c.__isRendered){var p=c.getPrevPaintRect();p&&f(p)}}var d;do{d=!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])?(d=!0,o[h].union(o[y]),o.splice(y,1)):y++;h++}}while(d);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,i){var n=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=i+"px"),a.width=e*n,a.height=i*n,s&&(s.width=e*n,s.height=i*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,i,n){var a=this.dom,o=this.ctx,s=a.width,l=a.height;i=i||this.clearColor;var u=this.motionBlur&&!e,f=this.lastFrameAlpha,h=this.dpr,c=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var v=this.domBack;function p(g,d,y,m){if(o.clearRect(g,d,y,m),i&&i!=="transparent"){var _=void 0;if(qs(i)){var S=i.global||i.__width===y&&i.__height===m;_=S&&i.__canvasGradient||ih(o,i,{x:0,y:0,width:y,height:m}),i.__canvasGradient=_,i.__width=y,i.__height=m}else HS(i)&&(i.scaleX=i.scaleX||h,i.scaleY=i.scaleY||h,_=nh(o,i,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));o.save(),o.fillStyle=_||i,o.fillRect(g,d,y,m),o.restore()}u&&(o.save(),o.globalAlpha=f,o.drawImage(v,g,d,y,m),o.restore())}!n||u?p(0,0,s,l):n.length&&A(n,function(g){p(g.x*h,g.y*h,g.width*h,g.height*h)})},t}(we),Yd=1e5,fi=314159,Eo=.01,vL=.001;function cL(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function pL(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var dL=function(){function r(t,e,i,n){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=i=B({},i||{}),this.dpr=i.devicePixelRatio||ys,this._singleCanvas=a,this.root=t;var o=t.style;o&&(Xy(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var f=t,h=f.width,c=f.height;i.width!=null&&(h=i.width),i.height!=null&&(c=i.height),this.dpr=i.devicePixelRatio||1,f.width=h*this.dpr,f.height=c*this.dpr,this._width=h,this._height=c;var v=new Hu(f,this,this.dpr);v.__builtin__=!0,v.initContext(),l[fi]=v,v.zlevel=fi,s.push(fi),this._domRoot=t}else{this._width=To(t,0,i),this._height=To(t,1,i);var u=this._domRoot=pL(this._width,this._height);t.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 t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),i=this._prevDisplayList,n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,i,t,this._redrawId);for(var a=0;a<n.length;a++){var o=n[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,i=this._hoverlayer;if(i&&i.clear(),!!e){for(var n={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<e;o++){var s=t[o];s.__inHover&&(i||(i=this._hoverlayer=this.getLayer(Yd)),a||(a=i.ctx,a.save()),di(a,s,n,o===e-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(Yd)},r.prototype.paintOne=function(t,e){i_(t,e)},r.prototype._paintList=function(t,e,i,n){if(this._redrawId===n){i=i||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e,i),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;vs(function(){l._paintList(t,e,i,n)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(fi).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},r.prototype._doPaintList=function(t,e,i){for(var n=this,a=[],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||i)&&a.push(u)}for(var f=!0,h=!1,c=function(g){var d=a[g],y=d.ctx,m=o&&d.createRepaintRects(t,e,v._width,v._height),_=i?d.__startIndex:d.__drawIndex,S=!i&&d.incremental&&Date.now,w=S&&Date.now(),b=d.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(d.__startIndex===d.__endIndex)d.clear(!1,b,m);else if(_===d.__startIndex){var x=t[_];(!x.incremental||!x.notClear||i)&&d.clear(!1,b,m)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=d.__startIndex);var M,C=function(I){var P={inHover:!1,allClipped:!1,prevEl:null,viewWidth:n._width,viewHeight:n._height};for(M=_;M<d.__endIndex;M++){var R=t[M];if(R.__inHover&&(h=!0),n._doPaintEl(R,d,o,I,P,M===d.__endIndex-1),S){var E=Date.now()-w;if(E>15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)M=d.__endIndex;else for(var T=v.dpr,D=0;D<m.length;++D){var L=m[D];y.save(),y.beginPath(),y.rect(L.x*T,L.y*T,L.width*T,L.height*T),y.clip(),C(L),y.restore()}else y.save(),C(),y.restore();d.__drawIndex=M,d.__drawIndex<d.__endIndex&&(f=!1)},v=this,p=0;p<a.length;p++)c(p);return Q.wxa&&A(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:f,needsRefreshHover:h}},r.prototype._doPaintEl=function(t,e,i,n,a,o){var s=e.ctx;if(i){var l=t.getPaintRect();(!n||l&&l.intersect(n))&&(di(s,t,a,o),t.setPrevPaintRect(l))}else di(s,t,a,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=fi);var i=this._layers[t];return i||(i=new Hu("zr_"+t,this,this.dpr),i.zlevel=t,i.__builtin__=!0,this._layerConfig[t]?tt(i,this._layerConfig[t],!0):this._layerConfig[t-Eo]&&tt(i,this._layerConfig[t-Eo],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},r.prototype.insertLayer=function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=this._domRoot,s=null,l=-1;if(!i[t]&&cL(e)){if(a>0&&t>n[0]){for(l=0;l<a-1&&!(n[l]<t&&n[l+1]>t);l++);s=i[n[l]]}if(n.splice(l+1,0,t),i[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n];t.call(e,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],o=this._layers[a];o.__builtin__&&t.call(e,o,a)}},r.prototype.eachOtherLayer=function(t,e){for(var i=this._zlevelList,n=0;n<i.length;n++){var a=i[n],o=this._layers[a];o.__builtin__||t.call(e,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,c){h.__dirty=h.__used=!1});function e(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var i=1;i<t.length;i++){var n=t[i];if(n.zlevel!==t[i-1].zlevel||n.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var n=t[l],u=n.zlevel,f=void 0;s!==u&&(s=u,o=0),n.incremental?(f=this.getLayer(u+vL,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(u+(o>0?Eo:0),this._needsManuallyCompositing),f.__builtin__||zh("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),n.__dirty&qe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(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(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,A(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?tt(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];if(a===t||a===t+Eo){var o=this._layers[a];tt(o,i[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(ot(i,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts,a=this.root;if(t!=null&&(n.width=t),e!=null&&(n.height=e),t=To(a,0,n),e=To(a,1,n),i.style.display="",this._width!==t||e!==this._height){i.style.width=t+"px",i.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(fi).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[fi].dom;var e=new Hu("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var i=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,a=e.dom.height;this.eachLayer(function(h){h.__builtin__?i.drawImage(h.dom,0,0,n,a):h.renderToCanvas&&(i.save(),h.renderToCanvas(i),i.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];di(i,f,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();function gL(r){r.registerPainter("canvas",dL)}var yL=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.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"},t}(ut),hh=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Yt).models[0]},t.type="cartesian2dAxis",t}(ut);Oe(hh,YD);var Q_={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)"]}}},mL=tt({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Q_),Vv=tt({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}}},Q_),_L=tt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Vv),SL=lt({logBase:10},Vv);const bL={category:mL,value:Vv,time:_L,log:SL};var wL={value:1,category:1,time:1,log:1};function Zd(r,t,e,i){A(wL,function(n,a){var o=tt(tt({},bL[a],!0),i,!0),s=function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Ra(this),v=c?Ka(f):{},p=h.getTheme();tt(f,p.get(a+"Axis")),tt(f,this.getDefaultOption()),f.type=Xd(f),c&&_n(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=uh.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=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Xd)}function Xd(r){return r.type||(r.data?"category":"value")}var xL=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return H(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Lt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),vh=["x","y"];function $d(r){return r.type==="interval"||r.type==="time"}var TL=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=vh,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!$d(e)||!$d(i))){var n=e.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-n[0]*f,v=o[1]-a[0]*h,p=this._transform=[f,0,0,h,c,v];this._invTransform=Uh([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new ft(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return _e(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i){var n=[];if(this._invTransform)return _e(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new ft(a,o,s,l)},t}(xL),ML=function(r){O(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(eL);function ch(r,t,e){e=e||{};var i=r.coordinateSystem,n=t.axis,a={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=i.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=t.get("offset")||0,p=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[c.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[u==="y"?p[c[l]]:h[0],u==="x"?p[c[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var d={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=d[s],a.labelOffset=o?p[c[s]]-p[c.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Ie(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var y=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-y:y,a.z2=1,a}function qd(r){return r.get("coordinateSystem")==="cartesian2d"}function Kd(r){var t={xAxisModel:null,yAxisModel:null};return A(t,function(e,i){var n=i.replace(/Model$/,""),a=r.getReferringComponents(n,Yt).models[0];t[i]=a}),t}var Gu=Math.log;function CL(r,t,e){var i=An.prototype,n=i.getTicks.call(e),a=i.getTicks.call(e,!0),o=n.length-1,s=i.getInterval.call(e),l=F_(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=Gu(r.base);u=[Gu(u[0])/c,Gu(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=i.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var p=i.getInterval.call(r),g=u[0],d=u[1];if(f&&h)p=(d-g)/o;else if(f)for(d=u[0]+p*o;d<u[1]&&isFinite(d)&&isFinite(u[1]);)p=Vu(p),d=u[0]+p*o;else if(h)for(g=u[1]-p*o;g>u[0]&&isFinite(g)&&isFinite(u[0]);)p=Vu(p),g=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Vu(p));var m=p*o;d=Math.ceil(u[1]/p)*p,g=Tt(d-m),g<0&&u[0]>=0?(g=0,d=Tt(m)):d>0&&u[1]<=0&&(d=0,g=-Tt(m))}var _=(n[0].value-a[0].value)/s,S=(n[o].value-a[o].value)/s;i.setExtent.call(r,g+p*_,d+p*S),i.setInterval.call(r,p),(_||S)&&i.setNiceExtent.call(r,g+p,d-p)}var AL=function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vh,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=bt(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,g=v.scale;fh(g)&&p.get("alignTicks")&&p.get("interval")==null?f.push(v):(Fd(g,p),fh(g)&&(s=v))}f.length&&(s||(s=f.pop(),Fd(s.scale,s.model)),A(f,function(d){CL(d.scale,d.model,s.scale)}))}}n(i.x),n(i.y);var a={};A(i.x,function(o){Qd(i,"y",o,a)}),A(i.y,function(o){Qd(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=t.getBoxLayoutParams(),a=!i&&t.get("containLabel"),o=Je(n,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(A(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=GD(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()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(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]),DL(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},r.prototype.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,i=t.xAxisModel||e&&e.getReferringComponents("xAxis",Yt).models[0],n=t.yAxisModel||e&&e.getReferringComponents("yAxis",Yt).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,ot(o,s)<0&&(s=null);else if(i&&n)s=this.getCartesian(i.componentIndex,n.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(n)l=this.getAxis("y",n.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,i){var n=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,A(s.x,function(f,h){A(s.y,function(c,v){var p="x"+h+"y"+v,g=new TL(p);g.master=n,g.model=t,n._coordsMap[p]=g,n._coordsList.push(g),g.addAxis(f),g.addAxis(c)})});function u(f){return function(h,c){if(Wu(h,t)){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 ML(f,FD(h),[0,0],h.get("type"),v),g=p.type==="category";p.onBand=g&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=c,a._axesList.push(p),s[f][c]=p,l[f]++}}}},r.prototype._updateScale=function(t,e){A(this._axesList,function(n){if(n.scale.setExtent(1/0,-1/0),n.type==="category"){var a=n.model.get("categorySortInfo");n.scale.setSortInfo(a)}}),t.eachSeries(function(n){if(qd(n)){var a=Kd(n),o=a.xAxisModel,s=a.yAxisModel;if(!Wu(o,e)||!Wu(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=n.getData(),f=l.getAxis("x"),h=l.getAxis("y");i(u,f),i(u,h)}},this);function i(n,a){A(G_(n,a.dim),function(o){a.scale.unionExtentFromData(n,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],i=[];return A(this.getCartesians(),function(n){var a=t!=null&&t!=="auto"?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);ot(e,a)<0&&e.push(a),ot(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}},r.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,a){var o=new r(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(n){if(qd(n)){var a=Kd(n),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;n.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),i},r.dimensions=vh,r}();function Wu(r,t){return r.getCoordSysModel()===t}function Qd(r,t,e,i){e.getAxesOnZeroOf=function(){return a?[a]:[]};var n=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)Jd(n[l])&&(a=n[l]);else for(var u in n)if(n.hasOwnProperty(u)&&Jd(n[u])&&!i[f(n[u])]){a=n[u];break}a&&(i[f(a)]=!0);function f(h){return h.dim+"_"+h.index}}function Jd(r){return r&&r.type!=="category"&&r.type!=="time"&&HD(r)}function DL(r,t){var e=r.getExtent(),i=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(n){return n+t}:function(n){return i-n+t},r.toLocalCoord=r.dim==="x"?function(n){return n-t}:function(n){return i-n+t}}var Er=Math.PI,Vr=function(){function r(t,e){this.group=new ht,this.opt=e,this.axisModel=t,lt(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new ht({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return r.prototype.hasBuilder=function(t){return!!jd[t]},r.prototype.add=function(t){jd[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,i){var n=dm(e-t),a,o;return _s(n)?(o=i>0?"top":"bottom",a="center"):_s(n-Er)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n<Er?a=i>0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),jd={axisLine:function(r,t,e,i){var n=t.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var a=t.axis.getExtent(),o=i.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(_e(s,s,o),_e(l,l,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ke({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Ia(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);W(c)&&(c=[c,c]),(W(v)||yt(v))&&(v=[v,v]);var p=wl(t.get(["axisLine","symbolOffset"])||0,v),g=v[0],d=v[1];A([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(c[m]!=="none"&&c[m]!=null){var _=ne(c[m],-g/2,-d/2,g,d,f.stroke,!0),S=y.r+y.offset,w=u?l:s;_.attr({rotation:y.rotate,x:w[0]+S*Math.cos(r.rotation),y:w[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,i){var n=PL(e,i,t,r),a=EL(e,i,t,r);if(IL(t,a,n),RL(e,i,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=lL(H(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));hL(o)}},axisName:function(r,t,e,i){var n=Ie(r.axisName,t.get("name"));if(n){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,eg(a)?r.labelOffset+o*l:0],c,v=t.get("nameRotate");v!=null&&(v=v*Er/180);var p;eg(a)?c=Vr.innerTextLayout(r.rotation,v??r.rotation,o):(c=LL(r.rotation,a,v||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(c.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),d=t.get("nameTruncate",!0)||{},y=d.ellipsis,m=Ie(r.nameTruncateMaxWidth,d.maxWidth,p),_=new gt({x:h[0],y:h[1],rotation:c.rotation,silent:Vr.isLabelSilent(t),style:kt(s,{text:n,font:g,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(fl({el:_,componentModel:t,itemName:n}),_.__fullText=n,_.anid="name",t.get("triggerEvent")){var S=Vr.makeAxisEventDataBase(t);S.targetType="axisName",S.name=n,st(_).eventData=S}i.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function LL(r,t,e,i){var n=dm(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return _s(n-Er/2)?(o=l?"bottom":"top",a="center"):_s(n-Er*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",n<Er*1.5&&n>Er/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function IL(r,t,e){if(!H_(r.axis)){var i=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],f=e[1],h=e[e.length-1],c=e[e.length-2];i===!1?(fe(a),fe(u)):tg(a,o)&&(i?(fe(o),fe(f)):(fe(a),fe(u))),n===!1?(fe(s),fe(h)):tg(l,s)&&(n?(fe(l),fe(c)):(fe(s),fe(h)))}}function fe(r){r&&(r.ignore=!0)}function tg(r,t){var e=r&&r.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(!(!e||!i)){var n=Gh([]);return Wh(n,n,-r.rotation),e.applyTransform(vn([],n,r.getLocalTransform())),i.applyTransform(vn([],n,t.getLocalTransform())),e.intersect(i)}}function eg(r){return r==="middle"||r==="center"}function J_(r,t,e,i,n){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(_e(o,o,t),_e(s,s,t));var f=new ke({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});Ia(f.shape,f.style.lineWidth),f.anid=n+"_"+r[l].tickValue,a.push(f)}return a}function PL(r,t,e,i){var n=e.axis,a=e.getModel("axisTick"),o=a.get("show");if(o==="auto"&&i.handleAutoShown&&(o=i.handleAutoShown("axisTick")),!(!o||n.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=i.tickDirection*a.get("length"),u=n.getTicksCoords(),f=J_(u,t.transform,l,lt(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)r.add(f[h]);return f}}function RL(r,t,e,i){var n=e.axis,a=e.getModel("minorTick");if(!(!a.get("show")||n.scale.isBlank())){var o=n.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=i*a.get("length"),u=lt(s.getLineStyle(),lt(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var h=J_(o[f],t.transform,l,u,"minorticks_"+f),c=0;c<h.length;c++)r.add(h[c])}}function EL(r,t,e,i){var n=e.axis,a=Ie(i.axisLabelShow,e.get(["axisLabel","show"]));if(!(!a||n.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=n.getViewLabels(),u=(Ie(i.labelRotate,o.get("rotate"))||0)*Er/180,f=Vr.innerTextLayout(i.rotation,u,i.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],v=Vr.isLabelSilent(e),p=e.get("triggerEvent");return A(l,function(g,d){var y=n.scale.type==="ordinal"?n.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,m=g.formattedLabel,_=g.rawLabel,S=o;if(h&&h[y]){var w=h[y];Y(w)&&w.textStyle&&(S=new wt(w.textStyle,o,e.ecModel))}var b=S.getTextColor()||e.get(["axisLine","lineStyle","color"]),x=n.dataToCoord(y),M=S.getShallow("align",!0)||f.textAlign,C=et(S.getShallow("alignMinLabel",!0),M),T=et(S.getShallow("alignMaxLabel",!0),M),D=S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||f.textVerticalAlign,L=et(S.getShallow("verticalAlignMinLabel",!0),D),I=et(S.getShallow("verticalAlignMaxLabel",!0),D),P=new gt({x,y:i.labelOffset+i.labelDirection*s,rotation:f.rotation,silent:v,z2:10+(g.level||0),style:kt(S,{text:m,align:d===0?C:d===l.length-1?T:M,verticalAlign:d===0?L:d===l.length-1?I:D,fill:$(b)?b(n.type==="category"?_:n.type==="value"?y+"":y,d):b})});if(P.anid="label_"+y,p){var R=Vr.makeAxisEventDataBase(e);R.targetType="axisLabel",R.value=_,R.tickIndex=d,n.type==="category"&&(R.dataIndex=y),st(P).eventData=R}t.add(P),P.updateTransform(),c.push(P),r.add(P),P.decomposeTransform()}),c}}function kL(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return OL(e,r,t),e.seriesInvolved&&BL(e,r),e}function OL(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Ba(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",i);if(A(s.getAxes(),it(g,!1,null)),s.getTooltipAxes&&i&&h.get("show")){var c=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(c||v)&&A(p.baseAxes,it(g,v?"cross":!0,c)),v&&A(p.otherAxes,it(g,"cross",!1))}function g(d,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!d&&!ph(_))){y==null&&(y=_.get("triggerTooltip")),_=d?NL(m,h,n,t,d,y):_;var w=_.get("snap"),b=_.get("triggerEmphasis"),x=Ba(m.model),M=y||w||m.type==="category",C=r.axesInfo[x]={key:x,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:b,involveSeries:M,snap:w,useHandle:ph(_),seriesModels:[],linkGroup:null};u[x]=C,r.seriesInvolved=r.seriesInvolved||M;var T=zL(a,m);if(T!=null){var D=o[T]||(o[T]={axesInfo:{}});D.axesInfo[x]=C,D.mapper=a[T].mapper,C.linkGroup=D}}}})}function NL(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(c){l[c]=X(o.get(c))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&lt(u,h.textStyle)}}return r.model.getModel("axisPointer",new wt(l,e,i))}function BL(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[Ba(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function zL(r,t){for(var e=t.model,i=t.dim,n=0;n<r.length;n++){var a=r[n]||{};if(Uu(a[i+"AxisId"],e.id)||Uu(a[i+"AxisIndex"],e.componentIndex)||Uu(a[i+"AxisName"],e.name))return n}}function Uu(r,t){return r==="all"||V(r)&&ot(r,t)>=0||r===t}function VL(r){var t=Fv(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=ph(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),n.value=o,s&&(n.status=t.axis.scale.isBlank()?"hide":"show")}}function Fv(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Ba(r)]}function FL(r){var t=Fv(r);return t&&t.axisPointerModel}function ph(r){return!!r.get(["handle","show"])}function Ba(r){return r.type+"||"+r.id}var rg={},j_=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.axisPointerClass&&VL(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},t.prototype.updateAxisPointer=function(e,i,n,a){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,i){var n=this._axisPointer;n&&n.remove(i)},t.prototype.dispose=function(e,i){this._disposeAxisPointer(i),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,i,n){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=FL(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,i,n):this._disposeAxisPointer(i)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,i){rg[e]=i},t.getAxisPointerClass=function(e){return e&&rg[e]},t.type="axis",t}(Zt),dh=_t();function HL(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=n.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var f=s.length,h=dh(r).splitAreaColors,c=K(),v=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(g!=null){v=(g+(f-1)*p)%f;break}}var d=n.toGlobalCoord(u[0].coord),y=o.getAreaStyle();s=V(s)?s:[s];for(var p=1;p<u.length;p++){var m=n.toGlobalCoord(u[p].coord),_=void 0,S=void 0,w=void 0,b=void 0;n.isHorizontal()?(_=d,S=l.y,w=m-_,b=l.height,d=_+w):(_=l.x,S=d,w=l.width,b=m-S,d=S+b);var x=u[p-1].tickValue;x!=null&&c.set(x,v),t.add(new mt({anid:x!=null?"area_"+x:null,shape:{x:_,y:S,width:w,height:b},style:lt({fill:s[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%f}dh(r).splitAreaColors=c}}}function GL(r){dh(r).splitAreaColors=null}var WL=["axisLine","axisTickLabel","axisName"],UL=["splitArea","splitLine","minorSplitLine"],t1=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,i,n,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ht,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=ch(s,e),u=new Vr(e,B({handleAutoShown:function(h){for(var c=s.coordinateSystem.getCartesians(),v=0;v<c.length;v++)if(fh(c[v].getOtherAxis(e.axis).scale))return!0;return!1}},l));A(WL,u.add,u),this._axisGroup.add(u.getGroup()),A(UL,function(h){e.get([h,"show"])&&YL[h](this,this._axisGroup,e,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Jm(o,this._axisGroup,e),r.prototype.render.call(this,e,i,n,a)}},t.prototype.remove=function(){GL(this)},t.type="cartesianAxis",t}(j_),YL={splitLine:function(r,t,e,i){var n=e.axis;if(!n.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=V(s)?s:[s];for(var l=i.coordinateSystem.getRect(),u=n.isHorizontal(),f=0,h=n.getTicksCoords({tickModel:a}),c=[],v=[],p=o.getLineStyle(),g=0;g<h.length;g++){var d=n.toGlobalCoord(h[g].coord);u?(c[0]=d,c[1]=l.y,v[0]=d,v[1]=l.y+l.height):(c[0]=l.x,c[1]=d,v[0]=l.x+l.width,v[1]=d);var y=f++%s.length,m=h[g].tickValue,_=new ke({anid:m!=null?"line_"+h[g].tickValue:null,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:v[0],y2:v[1]},style:lt({stroke:s[y]},p),silent:!0});Ia(_.shape,p.lineWidth),t.add(_)}}},minorSplitLine:function(r,t,e,i){var n=e.axis,a=e.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=i.coordinateSystem.getRect(),l=n.isHorizontal(),u=n.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 g=n.toGlobalCoord(u[v][p].coord);l?(f[0]=g,f[1]=s.y,h[0]=g,h[1]=s.y+s.height):(f[0]=s.x,f[1]=g,h[0]=s.x+s.width,h[1]=g);var d=new ke({anid:"minor_line_"+u[v][p].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:c,silent:!0});Ia(d.shape,c.lineWidth),t.add(d)}},splitArea:function(r,t,e,i){HL(r,t,e,i)}},e1=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t}(t1),ZL=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=e1.type,e}return t.type="yAxis",t}(t1),XL=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,i){this.group.removeAll(),e.get("show")&&this.group.add(new mt({shape:e.coordinateSystem.getRect(),style:lt({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Zt),ig={offset:0};function $L(r){r.registerComponentView(XL),r.registerComponentModel(yL),r.registerCoordinateSystem("cartesian2d",AL),Zd(r,"x",hh,ig),Zd(r,"y",hh,ig),r.registerComponentView(e1),r.registerComponentView(ZL),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var vi=_t(),ng=X,Yu=U,qL=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,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,a,t,e,i);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new ht,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var c=it(ag,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}sg(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=Fv(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=vi(t).pointerEl=new kT[a.type](ng(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=vi(t).labelEl=new gt(ng(e.label));t.add(a),og(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=vi(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=vi(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),og(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=ul(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){cr(u.event)},onmousedown:Yu(this._onHandleDragMove,this,0,0),drift:Yu(this._onHandleDragMove,this),ondragend:Yu(this._onHandleDragEnd,this)}),i.add(n)),sg(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");V(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Sl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){ag(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Zu(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Zu(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Zu(n)),vi(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Rs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r}();function ag(r,t,e,i){r1(vi(e).lastProp,i)||(vi(e).lastProp=i,t?At(e,i,r):(e.stopAnimation(),e.attr(i)))}function r1(r,t){if(Y(r)&&Y(t)){var e=!0;return A(t,function(i,n){e=e&&r1(r[n],i)}),!!e}else return r===t}function og(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Zu(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function sg(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}function KL(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function QL(r,t,e,i,n){var a=e.get("value"),o=i1(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=qa(s.get("padding")||0),u=s.getFont(),f=Qs(o,u),h=n.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],p=n.align;p==="right"&&(h[0]-=c),p==="center"&&(h[0]-=c/2);var g=n.verticalAlign;g==="bottom"&&(h[1]-=v),g==="middle"&&(h[1]-=v/2),JL(h,c,v,i);var d=s.get("backgroundColor");(!d||d==="auto")&&(d=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:kt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:d}),z2:10}}function JL(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function i1(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Bv(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),W(o)?a=o.replace("{value}",a):$(o)&&(a=o(s))}return a}function n1(r,t,e){var i=hn();return Wh(i,i,e.rotation),Cf(i,i,e.position),Nr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function jL(r,t,e,i,n,a){var o=Vr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),QL(t,i,n,a,{position:n1(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function tI(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function eI(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var rI=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),f=lg(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=KL(a),v=iI[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var p=ch(l.model,n);jL(i,e,p,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=ch(i.axis.grid.model,i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=n1(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=lg(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=i[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:e.rotation,cursorPoint:v,tooltipOption:p[f]}},t}(qL);function lg(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var iI={line:function(r,t,e){var i=tI([t,e[0]],[t,e[1]],ug(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:eI([t-i/2,e[0]],[i,n],ug(r))}}};function ug(r){return r.dim==="x"?0:1}var nI=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!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}},t}(ut),fr=_t(),aI=A;function a1(r,t,e){if(!Q.node){var i=t.getZr();fr(i).records||(fr(i).records={}),oI(i,t);var n=fr(i).records[r]||(fr(i).records[r]={});n.handler=e}}function oI(r,t){if(fr(r).initialized)return;fr(r).initialized=!0,e("click",it(fg,"click")),e("mousemove",it(fg,"mousemove")),e("globalout",lI);function e(i,n){r.on(i,function(a){var o=uI(t);aI(fr(r).records,function(s){s&&n(s,a,o.dispatchAction)}),sI(o.pendings,t)})}}function sI(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function lI(r,t,e){r.handler("leave",null,e)}function fg(r,t,e,i){t.handler(r,e,i)}function uI(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function gh(r,t){if(!Q.node){var e=t.getZr(),i=(fr(e).records||{})[r];i&&(fr(e).records[r]=null)}}var fI=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";a1("axisPointer",n,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})})},t.prototype.remove=function(e,i){gh("axisPointer",i)},t.prototype.dispose=function(e,i){gh("axisPointer",i)},t.type="axisPointer",t}(Zt);function o1(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Ti(a,r);if(o==null||o<0||V(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.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=a.mapDimension(c),g=[];g[v]=a.get(p,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(g)||[]}else e=l.dataToPoint(a.getValues(H(l.dimensions,function(y){return a.mapDimension(y)}),o))||[];else if(s){var d=s.getBoundingRect().clone();d.applyTransform(s.transform),e=[d.x+d.width/2,d.y+d.height/2]}return{point:e,el:s}}var hg=_t();function hI(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||U(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){ss(n)&&(n=o1({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=ss(n),u=a.axesInfo,f=s.axesInfo,h=i==="leave"||ss(n),c={},v={},p={list:[],map:{}},g={showPointer:it(cI,v),showTooltip:it(pI,p)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,w){var b=S.axis,x=mI(u,S);if(!h&&_&&(!u||x)){var M=x&&x.value;M==null&&!l&&(M=b.pointToData(n)),M!=null&&vg(S,M,g,!1,c)}})});var d={};return A(f,function(y,m){var _=y.linkGroup;_&&!v[m]&&A(_.axesInfo,function(S,w){var b=v[w];if(S!==y&&b){var x=b.value;_.mapper&&(x=y.axis.scale.parse(_.mapper(x,cg(S),cg(y)))),d[y.key]=x}})}),A(d,function(y,m){vg(f[m],y,g,!0,c)}),dI(v,f,c),gI(p,n,r,o),yI(f,o,e),c}}function vg(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=vI(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&B(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function vI(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var p=r-h,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,n=h,a.length=0),A(c,function(d){a.push({seriesIndex:l.seriesIndex,dataIndexInside:d,dataIndex:l.getData().getRawIndex(d)})}))}}),{payloadBatch:a,snapToValue:n}}function cI(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function pI(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=Ba(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:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function dI(r,t,e){var i=e.axesInfo=[];A(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function gI(r,t,e,i){if(ss(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function yI(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=hg(i)[n]||{},o=hg(i)[n]={};A(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&A(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];A(a,function(u,f){!o[f]&&l.push(u)}),A(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function mI(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function cg(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function ss(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function s1(r){j_.registerAxisPointerClass("CartesianAxisPointer",rI),r.registerComponentModel(nI),r.registerComponentView(fI),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!V(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=kL(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},hI)}function _I(r){Xt($L),Xt(s1)}var pg="\0_ec_interaction_mutex";function SI(r,t,e){var i=Hv(r);i[t]=e}function bI(r,t,e){var i=Hv(r),n=i[t];n===e&&(i[t]=null)}function dg(r,t){return!!Hv(r)[t]}function Hv(r){return r[pg]||(r[pg]={})}er({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Vt);var wI=function(r){O(t,r);function t(e){var i=r.call(this)||this;i._zr=e;var n=U(i._mousedownHandler,i),a=U(i._mousemoveHandler,i),o=U(i._mouseupHandler,i),s=U(i._mousewheelHandler,i),l=U(i._pinchHandler,i);return i.enable=function(u,f){this.disable(),this._opt=lt(X(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",n),e.on("mousemove",a),e.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},i.disable=function(){e.off("mousedown",n),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",l)},i}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!pc(e)){for(var i=e.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var n=e.offsetX,a=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,a)&&(this._x=n,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!ls("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||dg(this._zr,"globalPan"))){var i=e.offsetX,n=e.offsetY,a=this._x,o=this._y,s=i-a,l=n-o;this._x=i,this._y=n,this._opt.preventDefaultMouseMove&&cr(e.event),l1(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:a,oldY:o,newX:i,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){pc(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var i=ls("zoomOnMouseWheel",e,this._opt),n=ls("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!i&&!n)){if(i){var u=o>3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;Xu(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(a),c=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);Xu(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!dg(this._zr,"globalPan")){var i=e.pinchScale>1?1.1:1/1.1;Xu(this,"zoom",null,e,{scale:i,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(we);function Xu(r,t,e,i,n){r.pointerChecker&&r.pointerChecker(i,n.originX,n.originY)&&(cr(i.event),l1(r,t,e,i,n))}function l1(r,t,e,i,n){n.isAvailableBehavior=U(ls,null,e,i),r.trigger(t,n)}function ls(r,t,e){var i=e[r];return!r||i&&(!W(i)||t.event[i+"Key"])}var xI={axisPointer:1,tooltip:1,brush:1};function TI(r,t,e){var i=t.getComponentByElement(r.topTarget),n=i&&i.coordinateSystem;return i&&i!==e&&!xI.hasOwnProperty(i.mainType)&&n&&n.model!==e}function Ln(r,t,e,i,n,a){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Ji(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=Ji(s,[0,o]),n=a=Ji(s,[n,a]),i=0}t[0]=Ji(t[0],e),t[1]=Ji(t[1],e);var l=$u(t,i);t[i]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[i]=Ji(t[i],f);var h;return h=$u(t,i),n!=null&&(h.sign!==l.sign||h.span<n)&&(t[1-i]=t[i]+l.sign*n),h=$u(t,i),a!=null&&h.span>a&&(t[1-i]=t[i]+h.sign*a),t}function $u(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Ji(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var Ri=!0,za=Math.min,bn=Math.max,MI=Math.pow,CI=1e4,AI=6,DI=6,gg="globalPan",LI={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},II={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},yg={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},PI=0,RI=function(r){O(t,r);function t(e){var i=r.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=e,i.group=new ht,i._uid="brushController_"+PI++,A(VI,function(n,a){this._handlers[a]=U(n,this)},i),i}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var i=this._zr;this._enableGlobalPan||SI(i,gg,this._uid),A(this._handlers,function(n,a){i.on(a,n)}),this._brushType=e.brushType,this._brushOption=tt(X(yg),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;bI(e,gg,this._uid),A(this._handlers,function(i,n){e.off(n,i)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var i=this._panels={};A(e,function(n){i[n.panelId]=X(n)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var i=this.group;return this._zr.add(i),i.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=i.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=H(e,function(c){return tt(X(yg),c,!0)});var i="\0-brush-index-",n=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Rv(n,e,u,l).add(f).update(f).remove(h).execute(),this;function l(c,v){return(c.id!=null?c.id:i+v)+"-"+c.brushType}function u(c,v){return l(c.__brushOption,v)}function f(c,v){var p=e[c];if(v!=null&&n[v]===s)a[c]=n[v];else{var g=a[c]=v!=null?(n[v].__brushOption=p,n[v]):f1(o,u1(o,p));Gv(o,g)}}function h(c){n[c]!==s&&o.group.remove(n[c])}},t.prototype.unmount=function(){return this.enableBrush(!1),yh(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(we);function u1(r,t){var e=Al[t.brushType].createCover(r,t);return e.__brushOption=t,v1(e,t),r.group.add(e),e}function f1(r,t){var e=Wv(t);return e.endCreating&&(e.endCreating(r,t),v1(t,t.__brushOption)),t}function h1(r,t){var e=t.__brushOption;Wv(t).updateCoverShape(r,t,e.range,e)}function v1(r,t){var e=t.z;e==null&&(e=CI),r.traverse(function(i){i.z=e,i.z2=e})}function Gv(r,t){Wv(t).updateCommon(r,t),h1(r,t)}function Wv(r){return Al[r.__brushOption.brushType]}function Uv(r,t,e){var i=r._panels;if(!i)return Ri;var n,a=r._transform;return A(i,function(o){o.isTargetByCursor(t,e,a)&&(n=o)}),n}function c1(r,t){var e=r._panels;if(!e)return Ri;var i=t.__brushOption.panelId;return i!=null?e[i]:Ri}function yh(r){var t=r._covers,e=t.length;return A(t,function(i){r.group.remove(i)},r),t.length=0,!!e}function Ei(r,t){var e=H(r._covers,function(i){var n=i.__brushOption,a=X(n.range);return{brushType:n.brushType,panelId:n.panelId,range:a}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function EI(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],i=t[0],n=e[0]-i[0],a=e[1]-i[1],o=MI(n*n+a*a,.5);return o>AI}function p1(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function d1(r,t,e,i){var n=new ht;return n.add(new mt({name:"main",style:Yv(e),silent:!0,draggable:!0,cursor:"move",drift:it(mg,r,t,n,["n","s","w","e"]),ondragend:it(Ei,t,{isEnd:!0})})),A(i,function(a){n.add(new mt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:it(mg,r,t,n,a),ondragend:it(Ei,t,{isEnd:!0})}))}),n}function g1(r,t,e,i){var n=i.brushStyle.lineWidth||0,a=bn(n,DI),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,f=e[0][1],h=e[1][1],c=f-a+n/2,v=h-a+n/2,p=f-o,g=h-s,d=p+n,y=g+n;or(r,t,"main",o,s,p,g),i.transformable&&(or(r,t,"w",l,u,a,y),or(r,t,"e",c,u,a,y),or(r,t,"n",l,u,d,a),or(r,t,"s",l,v,d,a),or(r,t,"nw",l,u,a,a),or(r,t,"ne",c,u,a,a),or(r,t,"sw",l,v,a,a),or(r,t,"se",c,v,a,a))}function mh(r,t){var e=t.__brushOption,i=e.transformable,n=t.childAt(0);n.useStyle(Yv(e)),n.attr({silent:!i,cursor:i?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=t.childOfName(a.join("")),s=a.length===1?_h(r,a[0]):OI(r,a);o&&o.attr({silent:!i,invisible:!i,cursor:i?II[s]+"-resize":null})})}function or(r,t,e,i,n,a,o){var s=t.childOfName(e);s&&s.setShape(BI(Zv(r,t,[[i,n],[i+a,n+o]])))}function Yv(r){return lt({strokeNoScale:!0},r.brushStyle)}function y1(r,t,e,i){var n=[za(r,e),za(t,i)],a=[bn(r,e),bn(t,i)];return[[n[0],a[0]],[n[1],a[1]]]}function kI(r){return _i(r.group)}function _h(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},n=ll(e[t],kI(r));return i[n]}function OI(r,t){var e=[_h(r,t[0]),_h(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function mg(r,t,e,i,n,a){var o=e.__brushOption,s=r.toRectRange(o.range),l=m1(t,n,a);A(i,function(u){var f=LI[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(y1(s[0][0],s[1][0],s[0][1],s[1][1])),Gv(t,e),Ei(t,{isEnd:!1})}function NI(r,t,e,i){var n=t.__brushOption.range,a=m1(r,e,i);A(n,function(o){o[0]+=a[0],o[1]+=a[1]}),Gv(r,t),Ei(r,{isEnd:!1})}function m1(r,t,e){var i=r.group,n=i.transformCoordToLocal(t,e),a=i.transformCoordToLocal(0,0);return[n[0]-a[0],n[1]-a[1]]}function Zv(r,t,e){var i=c1(r,t);return i&&i!==Ri?i.clipPath(e,r._transform):X(e)}function BI(r){var t=za(r[0][0],r[1][0]),e=za(r[0][1],r[1][1]),i=bn(r[0][0],r[1][0]),n=bn(r[0][1],r[1][1]);return{x:t,y:e,width:i-t,height:n-e}}function zI(r,t,e){if(!(!r._brushType||FI(r,t.offsetX,t.offsetY))){var i=r._zr,n=r._covers,a=Uv(r,t,e);if(!r._dragging)for(var o=0;o<n.length;o++){var s=n[o].__brushOption;if(a&&(a===Ri||s.panelId===a.panelId)&&Al[s.brushType].contain(n[o],e[0],e[1]))return}a&&i.setCursorStyle("crosshair")}}function Sh(r){var t=r.event;t.preventDefault&&t.preventDefault()}function bh(r,t,e){return r.childOfName("main").contain(t,e)}function _1(r,t,e,i){var n=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),EI(r)||n){if(a&&!n){o.brushMode==="single"&&yh(r);var l=X(o);l.brushType=_g(l.brushType,a),l.panelId=a===Ri?null:a.panelId,n=r._creatingCover=u1(r,l),r._covers.push(n)}if(n){var u=Al[_g(r._brushType,a)],f=n.__brushOption;f.range=u.getCreatingRange(Zv(r,n,r._track)),i&&(f1(r,n),u.updateCommon(r,n)),h1(r,n),s={isEnd:i}}}else i&&o.brushMode==="single"&&o.removeOnClick&&Uv(r,t,e)&&yh(r)&&(s={isEnd:i,removeOnClick:!0});return s}function _g(r,t){return r==="auto"?t.defaultBrushType:r}var VI={mousedown:function(r){if(this._dragging)Sg(this,r);else if(!r.target||!r.target.draggable){Sh(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=Uv(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,i=this.group.transformCoordToLocal(t,e);if(zI(this,r,i),this._dragging){Sh(r);var n=_1(this,r,i,!1);n&&Ei(this,n)}},mouseup:function(r){Sg(this,r)}};function Sg(r,t){if(r._dragging){Sh(t);var e=t.offsetX,i=t.offsetY,n=r.group.transformCoordToLocal(e,i),a=_1(r,t,n,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&Ei(r,a)}}function FI(r,t,e){var i=r._zr;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var Al={lineX:bg(0),lineY:bg(1),rect:{createCover:function(r,t){function e(i){return i}return d1({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=p1(r);return y1(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,i){g1(r,t,e,i)},updateCommon:mh,contain:bh},polygon:{createCover:function(r,t){var e=new ht;return e.add(new Oi({name:"main",style:Yv(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Hr({name:"main",draggable:!0,drift:it(NI,r,t),ondragend:it(Ei,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,i){t.childAt(0).setShape({points:Zv(r,t,e)})},updateCommon:mh,contain:bh}};function bg(r){return{createCover:function(t,e){return d1({toRectRange:function(i){var n=[i,[0,100]];return r&&n.reverse(),n},fromRectRange:function(i){return i[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=p1(t),i=za(e[0][r],e[1][r]),n=bn(e[0][r],e[1][r]);return[i,n]},updateCoverShape:function(t,e,i,n){var a,o=c1(t,e);if(o!==Ri&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[i,a];r&&l.reverse(),g1(t,e,l,n)},updateCommon:mh,contain:bh}}function HI(r){return r=Xv(r),function(t){return jm(t,r)}}function GI(r,t){return r=Xv(r),function(e){var i=t??e,n=i?r.width:r.height,a=i?r.x:r.y;return[a,a+(n||0)]}}function WI(r,t,e){var i=Xv(r);return function(n,a){return i.contain(a[0],a[1])&&!TI(n,t,e)}}function Xv(r){return ft.create(r)}var wg=["x","y","radius","angle","single"],UI=["cartesian2d","polar","singleAxis"];function YI(r){var t=r.get("coordinateSystem");return ot(UI,t)>=0}function kr(r){return r+"Axis"}function ZI(r,t){var e=K(),i=[],n=K();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!n.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){n.set(f.uid,!0),i.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var p=e.get(c);p&&p[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return i}function S1(r){var t=r.ecModel,e={infoList:[],infoMap:K()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(kr(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var qu=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),Va=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=xg(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=xg(e);tt(this.option,e,!0),tt(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=K(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return A(wg,function(n){var a=this.getReferringComponents(kr(n),Aw);if(a.specified){i=!0;var o=new qu;A(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new qu;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Yt).models[0];v&&A(u,function(p){h.componentIndex!==p.componentIndex&&v===p.getReferringComponents("grid",Yt).models[0]&&c.add(p.componentIndex)})}}}a&&A(wg,function(u){if(a){var f=n.findComponents({mainType:kr(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new qu;h.add(f[0].componentIndex),e.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(kr(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){A(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){var n=this.getAxisModel(e,i);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(kr(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;A(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;a<n.length;a++)for(var o=n[a],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;i||(i=u)}return i},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(ut);function xg(r){var t={};return A(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var XI=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(Va),$v=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n,a){this.dataZoomModel=e,this.ecModel=i,this.api=n},t.type="dataZoom",t}(Zt),$I=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}($v),nn=A,Tg=lr,qI=function(){function r(t,e,i,n){this._dimName=t,this._axisIndex=e,this.ecModel=n,this._dataZoomModel=i}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(YI(e)){var i=kr(this._dimName),n=e.getReferringComponents(i,Yt).models[0];n&&this._axisIndex===n.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return X(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;nn(["start","end"],function(c,v){var p=t[c],g=t[c+"Value"];a[v]==="percent"?(p==null&&(p=o[v]),g=n.parse(pt(p,o,e))):(u=!0,g=g==null?e[v]:n.parse(g),p=pt(g,e,o)),l[v]=g==null||isNaN(g)?e[v]:g,s[v]=p==null||isNaN(p)?o[v]:p}),Tg(l),Tg(s);var f=this._minMaxSpan;u?h(l,s,e,o,!1):h(s,l,o,e,!0);function h(c,v,p,g,d){var y=d?"Span":"ValueSpan";Ln(0,c,p,"all",f["min"+y],f["max"+y]);for(var m=0;m<2;m++)v[m]=pt(c[m],p,g,!0),d&&(v[m]=n.parse(v[m]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=KI(this,this._dimName,e),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;nn(n,function(l){var u=l.getData(),f=u.mapDimensionsAll(i);if(f.length){if(a==="weakFilter"){var h=u.getStore(),c=H(f,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var p,g,d,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;_&&(d=!0),S&&(p=!0),w&&(g=!0)}return d&&p&&g})}else nn(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var p={};p[v]=o,u.selectRange(p)}});nn(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;nn(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=pt(i[0]+o,i,[0,100],!0):a!=null&&(o=pt(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=pm(i,[0,500]);n=Math.min(n,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),e[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function KI(r,t,e){var i=[1/0,-1/0];nn(e,function(o){UD(i,o.getData(),t)});var n=r.getAxisModel(),a=V_(n.axis.scale,n,i).calculate();return[a.min,a.max]}var QI={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(kr(o),s);n(o,s,l,a)})})}t(function(n,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new qI(n,a,s,r),e.push(o.__dzAxisProxy))});var i=K();return A(e,function(n){A(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).reset(e)}),e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function JI(r){r.registerAction("dataZoom",function(t,e){var i=ZI(e,t);A(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Mg=!1;function qv(r){Mg||(Mg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,QI),JI(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function jI(r){r.registerComponentModel(XI),r.registerComponentView($I),qv(r)}var Le=function(){function r(){}return r}(),b1={};function Qn(r,t){b1[r]=t}function w1(r){return b1[r]}var t2=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;A(this.option.feature,function(i,n){var a=w1(n);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(e)),tt(i,a.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.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"}},t}(ut);function e2(r,t,e){var i=t.getBoxLayoutParams(),n=t.get("padding"),a={width:e.getWidth(),height:e.getHeight()},o=Je(i,a,n);Si(t.get("orient"),r,t.get("itemGap"),o.width,o.height),_0(r,i,a,n)}function x1(r,t){var e=qa(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),r=new mt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1}),r}var r2=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),h=[];A(u,function(p,g){h.push(g)}),new Rv(this._featureNames||[],h).add(c).update(c).remove(it(c,null)).execute(),this._featureNames=h;function c(p,g){var d=h[p],y=h[g],m=u[d],_=new wt(m,e,e.ecModel),S;if(a&&a.newTitle!=null&&a.featureName===d&&(m.title=a.newTitle),d&&!y){if(i2(d))S={onclick:_.option.onclick,featureName:d};else{var w=w1(d);if(!w)return;S=new w}f[d]=S}else if(S=f[y],!S)return;S.uid=$a("toolbox-feature"),S.model=_,S.ecModel=i,S.api=n;var b=S instanceof Le;if(!d&&y){b&&S.dispose&&S.dispose(i,n);return}if(!_.get("show")||b&&S.unusable){b&&S.remove&&S.remove(i,n);return}v(_,S,d),_.setIconStatus=function(x,M){var C=this.option,T=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[x]=M,T[x]&&(M==="emphasis"?Ci:Ai)(T[x])},S instanceof Le&&S.render&&S.render(_,i,n,a)}function v(p,g,d){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=g instanceof Le&&g.getIcons?g.getIcons():p.get("icon"),S=p.get("title")||{},w,b;W(_)?(w={},w[d]=_):w=_,W(S)?(b={},b[d]=S):b=S;var x=p.iconPaths={};A(w,function(M,C){var T=ul(M,{},{x:-s/2,y:-s/2,width:s,height:s});T.setStyle(y.getItemStyle());var D=T.ensureState("emphasis");D.style=m.getItemStyle();var L=new gt({style:{text:b[C],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:r0({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},i)},ignore:!0});T.setTextContent(L),fl({el:T,componentModel:e,itemName:C,formatterParamsExtra:{title:b[C]}}),T.__title=b[C],T.on("mouseover",function(){var I=m.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";L.setStyle({fill:m.get("textFill")||I.fill||I.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),T.setTextConfig({position:m.get("textPosition")||P}),L.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&n.leaveEmphasis(this),L.hide()}),(p.get(["iconStatus",C])==="emphasis"?Ci:Ai)(T),o.add(T),T.on("click",U(g.onclick,g,i,n,C)),x[C]=T})}e2(o,e,n),o.add(x1(o.getBoundingRect(),e)),l||o.eachChild(function(p){var g=p.__title,d=p.ensureState("emphasis"),y=d.textConfig||(d.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!$(_)&&g){var S=_.style||(_.style={}),w=Qs(g,gt.makeFont(S)),b=p.x+o.x,x=p.y+o.y+s,M=!1;x+w.height>n.getHeight()&&(y.position="top",M=!0);var C=M?-5-w.height:s+10;b+w.width/2>n.getWidth()?(y.position=["100%",C],S.align="right"):b-w.width/2<0&&(y.position=[0,C],S.align="left")}})},t.prototype.updateView=function(e,i,n,a){A(this._features,function(o){o instanceof Le&&o.updateView&&o.updateView(o.model,i,n,a)})},t.prototype.remove=function(e,i){A(this._features,function(n){n instanceof Le&&n.remove&&n.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){A(this._features,function(n){n instanceof Le&&n.dispose&&n.dispose(e,i)})},t.type="toolbox",t}(Zt);function i2(r){return r.indexOf("my")===0}var n2=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){var n=this.model,a=n.get("name")||e.get("title.0.text")||"echarts",o=i.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Q.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=a+"."+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 g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var d=p.length,y=new Uint8Array(d);d--;)y[d]=p.charCodeAt(d);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,g)}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,g),document.body.removeChild(_)}}else{var b=n.get("lang"),x='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',M=window.open();M.document.write(x),M.document.title=a}},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return i},t}(Le),Cg="__ec_magicType_stack__",a2=[["line","bar"],["stack"]],o2=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),n={};return A(e.get("type"),function(a){i[a]&&(n[a]=i[a])}),n},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return i},t.prototype.onclick=function(e,i,n){var a=this.model,o=a.get(["seriesIndex",n]);if(Ag[n]){var s={series:[]},l=function(h){var c=h.subType,v=h.id,p=Ag[n](c,v,h,a);p&&(lt(p,h.option),s.series.push(p));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(n==="line"||n==="bar")){var d=g.getAxesByScale("ordinal")[0];if(d){var y=d.dim,m=y+"Axis",_=h.getReferringComponents(m,Yt).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=n==="bar"}}};A(a2,function(h){ot(h,n)>=0&&A(h,function(c){a.setIconStatus(c,"normal")})}),a.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=tt({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),i.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Le),Ag={line:function(r,t,e,i){if(r==="bar")return tt({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(r,t,e,i){if(r==="line")return tt({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(r,t,e,i){var n=e.get("stack")===Cg;if(r==="line"||r==="bar")return i.setIconStatus("stack",n?"normal":"emphasis"),tt({id:t,stack:n?"":Cg},i.get(["option","stack"])||{},!0)}};er({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Dl=new Array(60).join("-"),wn="	";function s2(r){var t={},e=[],i=[];return r.eachRawSeries(function(n){var a=n.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:i}}function l2(r){var t=[];return A(r,function(e,i){var n=e.categoryAxis,a=e.valueAxis,o=a.dim,s=[" "].concat(H(e.series,function(v){return v.name})),l=[n.model.getCategories()];A(e.series,function(v){var p=v.getRawData();l.push(v.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(wn)],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(wn))}t.push(u.join(`
`))}),t.join(`

`+Dl+`

`)}function u2(r){return H(r,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=e.getName(o),l=0;l<a-1;l++)n[l]=arguments[l];i.push((s?s+wn:"")+n.join(wn))}),i.join(`
`)}).join(`

`+Dl+`

`)}function f2(r){var t=s2(r);return{value:Lt([l2(t.seriesGroupByCategoryAxis),u2(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`

`+Dl+`

`),meta:t.meta}}function Fs(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function h2(r){var t=r.slice(0,r.indexOf(`
`));if(t.indexOf(wn)>=0)return!0}var wh=new RegExp("["+wn+"]+","g");function v2(r){for(var t=r.split(/\n+/g),e=Fs(t.shift()).split(wh),i=[],n=H(e,function(l){return{name:l,data:[]}}),a=0;a<t.length;a++){var o=Fs(t[a]).split(wh);i.push(o.shift());for(var s=0;s<o.length;s++)n[s]&&(n[s].data[a]=o[s])}return{series:n,categories:i}}function c2(r){for(var t=r.split(/\n+/g),e=Fs(t.shift()),i=[],n=0;n<t.length;n++){var a=Fs(t[n]);if(a){var o=a.split(wh),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),i[n]={name:s,value:[]},l=i[n].value):l=i[n]=[];for(var f=0;f<o.length;f++)l.push(+o[f]);l.length===1&&(u?i[n].value=l[0]:i[n]=l[0])}}return{name:e,data:i}}function p2(r,t){var e=r.split(new RegExp(`
*`+Dl+`
*`,"g")),i={series:[]};return A(e,function(n,a){if(h2(n)){var o=v2(n),s=t[a],l=s.axisDim+"Axis";s&&(i[l]=i[l]||[],i[l][s.axisIndex]={data:o.categories},i.series=i.series.concat(o.series))}else{var o=c2(n);i.series.push(o)}}),i}var d2=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var n=i.getDom(),a=this.model;this._dom&&n.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=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),f=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),c=a.get("contentToOption"),v=f2(e);if($(h)){var p=h(i.getOption());W(p)?u.innerHTML=p:yn(p)&&u.appendChild(p)}else{f.readOnly=a.get("readOnly");var g=f.style;g.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",g.color=a.get("textColor"),g.borderColor=a.get("textareaBorderColor"),g.backgroundColor=a.get("textareaColor"),f.value=v.value,u.appendChild(f)}var d=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:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var w=this;function b(){n.removeChild(o),w._dom=null}Mf(_,"click",b),Mf(S,"click",function(){if(c==null&&h!=null||c!=null&&h==null){b();return}var x;try{$(c)?x=c(u,i.getOption()):x=p2(f.value,d)}catch(M){throw b(),new Error("Data view format error "+M)}x&&i.dispatchAction({type:"changeDataView",newOption:x}),b()}),_.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=_.style.cssText=m,!a.get("readOnly")&&y.appendChild(S),y.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(y),u.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},t.prototype.remove=function(e,i){this._dom&&i.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,i){this.remove(e,i)},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return i},t}(Le);function g2(r,t){return H(r,function(e,i){var n=t&&t[i];if(Y(n)&&!V(n)){var a=Y(e)&&!V(e);a||(e={value:e});var o=n.name!=null&&e.name==null;return e=lt(e,n),o&&delete e.name,e}else return e})}er({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];A(r.newOption.series,function(i){var n=t.getSeriesByName(i.name)[0];if(!n)e.push(B({type:"scatter"},i));else{var a=n.get("data");e.push({name:i.name,data:g2(i.data,a)})}}),t.mergeOption(lt({series:e},r.newOption))});var T1=A,M1=_t();function y2(r,t){var e=Kv(r);T1(t,function(i,n){for(var a=e.length-1;a>=0;a--){var o=e[a];if(o[n])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function m2(r){var t=Kv(r),e=t[t.length-1];t.length>1&&t.pop();var i={};return T1(e,function(n,a){for(var o=t.length-1;o>=0;o--)if(n=t[o][a],n){i[a]=n;break}}),i}function _2(r){M1(r).snapshots=null}function S2(r){return Kv(r).length}function Kv(r){var t=M1(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var b2=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,i){_2(e),i.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","restore","title"])};return i},t}(Le);er({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var w2=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],C1=function(){function r(t,e,i){var n=this;this._targetInfoList=[];var a=Dg(e,t);A(x2,function(o,s){(!i||!i.include||ot(i.include,s)>=0)&&o(a,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,n,a){if((i.coordRanges||(i.coordRanges=[])).push(n),!i.coordRange){i.coordRange=n;var o=Ku[i.brushType](0,a,n);i.__rangeOffset={offset:Rg[i.brushType](o.values,i.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,i){A(t,function(n){var a=this.findTargetInfo(n,e);a&&a!==!0&&A(a.coordSyses,function(o){var s=Ku[n.brushType](1,o,n.range,!0);i(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(i){var n=this.findTargetInfo(i,e);if(i.range=i.range||[],n&&n!==!0){i.panelId=n.panelId;var a=Ku[i.brushType](0,n.coordSys,i.coordRange),o=i.__rangeOffset;i.range=o?Rg[i.brushType](a.values,o.offset,T2(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(t,e){return H(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:HI(n),isTargetByCursor:WI(n,t,i.coordSysModel),getLinearBrushOtherExtent:GI(n)}})},r.prototype.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&ot(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Dg(e,t),a=0;a<i.length;a++){var o=i[a],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<Lg.length;l++)if(Lg[l](n,o))return o}return!0},r}();function xh(r){return r[0]>r[1]&&r.reverse(),r}function Dg(r,t){return ga(r,t,{includeMainTypes:w2})}var x2={grid:function(r,t){var e=r.xAxisModels,i=r.yAxisModels,n=r.gridModels,a=K(),o={},s={};!e&&!i&&!n||(A(e,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),A(i,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),A(n,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,f=[];A(u.getCartesians(),function(h,c){(ot(e,h.getAxis("x").model)>=0||ot(i,h.getAxis("y").model)>=0)&&f.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Ig.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:Ig.geo})})}},Lg=[function(r,t){var e=r.xAxisModel,i=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&i&&(n=i.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Ig={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(_i(r)),t}},Ku={lineX:it(Pg,0),lineY:it(Pg,1),rect:function(r,t,e,i){var n=r?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),a=r?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),o=[xh([n[0],a[0]]),xh([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=H(e,function(o){var s=r?t.pointToData(o,i):t.dataToPoint(o,i);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:a,xyMinMax:n}}};function Pg(r,t,e,i){var n=e.getAxis(["x","y"][r]),a=xh(H([0,1],function(s){return t?n.coordToData(n.toLocalCoord(i[s]),!0):n.toGlobalCoord(n.dataToCoord(i[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var Rg={lineX:it(Eg,0),lineY:it(Eg,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return H(r,function(i,n){return[i[0]-e[0]*t[n][0],i[1]-e[1]*t[n][1]]})}};function Eg(r,t,e,i){return[t[0]-i[r]*e[0],t[1]-i[r]*e[1]]}function T2(r,t){var e=kg(r),i=kg(t),n=[e[0]/i[0],e[1]/i[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function kg(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var Th=A,M2=ww("toolbox-dataZoom_"),C2=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,i,n,a){this._brushController||(this._brushController=new RI(n.getZr()),this._brushController.on("brush",U(this._onBrush,this)).mount()),L2(e,i,this,a,n),D2(e,i)},t.prototype.onclick=function(e,i,n){A2[n].call(this)},t.prototype.remove=function(e,i){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,i){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var i=e.areas;if(!e.isEnd||!i.length)return;var n={},a=this.ecModel;this._brushController.updateCovers([]);var o=new C1(Qv(this.model),a,{include:["grid"]});o.matchOutputRanges(i,a,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)}}),y2(a,n),this._dispatchZoomAction(n);function s(u,f,h){var c=f.getAxis(u),v=c.model,p=l(u,v,a),g=p.findRepresentativeAxisProxy(v).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=Ln(0,h.slice(),c.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(n[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}},t.prototype._dispatchZoomAction=function(e){var i=[];Th(e,function(n,a){i.push(X(n))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){var i={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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return i},t}(Le),A2={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(m2(this.ecModel))}};function Qv(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function D2(r,t){r.setIconStatus("back",S2(t)>1?"emphasis":"normal")}function L2(r,t,e,i,n){var a=e._isZoomActive;i&&i.type==="takeGlobalCursor"&&(a=i.key==="dataZoomSelect"?i.dataZoomSelectActive:!1),e._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new C1(Qv(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}vM("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var i=t.getModel(e),n=[],a=Qv(i),o=ga(r,a);Th(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),Th(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:M2+u+h};c[f]=h,n.push(c)}return n});function I2(r){r.registerComponentModel(t2),r.registerComponentView(r2),Qn("saveAsImage",n2),Qn("magicType",o2),Qn("dataView",d2),Qn("dataZoom",C2),Qn("restore",b2),Xt(jI)}var P2=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.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:.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}},t}(ut);function A1(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function D1(r){if(Q.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e<i;e++)if(r[e]in t)return r[e]}}var L1=D1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),R2=D1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function I1(r,t){if(!r)return t;t=y0(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function E2(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var k2=I1(R2,"transition"),Jv=I1(L1,"transform"),O2="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Q.transform3dSupported?"will-change:transform;":"");function N2(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function B2(r,t,e){if(!W(e)||e==="inside")return"";var i=r.get("backgroundColor"),n=r.get("borderWidth");t=Li(t);var a=N2(e),o=Math.max(Math.round(n)*1.5,6),s="",l=Jv+":",u;ot(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var p=t+" solid "+n+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+i+";"];return'<div style="'+g.join("")+'"></div>'}function z2(r,t){var e="cubic-bezier(0.23,1,0.32,1)",i=" "+r/2+"s "+e,n="opacity"+i+",visibility"+i;return t||(i=" "+r+"s "+e,n+=Q.transformSupported?","+Jv+i:",left"+i+",top"+i),k2+":"+n}function Og(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!Q.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=Q.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+Jv+":"+o+";":[["top",0],["left",0],[L1,o]]}function V2(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont()),e&&t.push("line-height:"+Math.round(e*3/2)+"px");var n=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return n&&a&&t.push("text-shadow:"+o+"px "+s+"px "+a+"px "+n),A(["decoration","align"],function(l){var u=r.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function F2(r,t,e){var i=[],n=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=U0(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return i.push("box-shadow:"+c),t&&n&&i.push(z2(n,e)),a&&i.push("background-color:"+a),A(["width","color","radius"],function(v){var p="border-"+v,g=y0(p),d=r.get(g);d!=null&&i.push(p+":"+d+(v==="color"?"":"px"))}),i.push(V2(f)),h!=null&&i.push("padding:"+qa(h).join("px ")+"px"),i.join(";")+";"}function Ng(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&jS(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var H2=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Q.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(W(a)?document.querySelector(a):yn(a)?a:$(a)&&a(t.getDom()));Ng(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();ve(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=E2(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=O2+F2(t,!this._firstShow,this._longHide)+Og(a[0],a[1],!0)+("border-color:"+Li(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(W(a)&&i.get("trigger")==="item"&&!A1(i)&&(s=B2(i,n,a)),W(t))o.innerHTML=t+s;else if(t){o.innerHTML="",V(t)||(t=[t]);for(var l=0;l<t.length;l++)yn(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},r.prototype.moveTo=function(t,e){var i=this._styleCoord;if(Ng(i,this._zr,this._container,t,e),i[0]!=null&&i[1]!=null){var n=this.el.style,a=Og(i[0],i[1]);A(a,function(o){n[o[0]]=o[1]})}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",Q.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(U(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r}(),G2=function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),zg(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,i,n,a){var o=this;Y(t)&&Jt(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new gt({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:n,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:U0(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),A(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=i.get(u)}),A(["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(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=Bg(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},r.prototype.moveTo=function(t,e){var i=this.el;if(i){var n=this._styleCoord;zg(n,this._zr,t,e),t=n[0],e=n[1];var a=i.style,o=Dr(a.borderWidth||0),s=Bg(a);i.x=t+o+s.left,i.y=e+o+s.top,i.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(U(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function Dr(r){return Math.max(0,r)}function Bg(r){var t=Dr(r.shadowBlur||0),e=Dr(r.shadowOffsetX||0),i=Dr(r.shadowOffsetY||0);return{left:Dr(t-e),right:Dr(t+e),top:Dr(t-i),bottom:Dr(t+i)}}function zg(r,t,e,i){r[0]=e,r[1]=i,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var W2=new mt({shape:{x:-1,y:-1,width:2,height:2}}),U2=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,i){if(!(Q.node||!i.getDom())){var n=e.getComponent("tooltip"),a=this._renderMode=Lw(n.get("renderMode"));this._tooltipContent=a==="richText"?new G2(i):new H2(i,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,i,n){if(!(Q.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=i,this._api=n;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Sl(this,"_updatePosition",50,"fixRate"):Rs(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,i=e.get("triggerOn");a1("itemTooltip",this._api,U(function(n,a,o){i!=="none"&&(i.indexOf(n)>=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||Q.node||!n.getDom())){var o=Vg(a,n);this._ticket="";var s=a.dataByCoordSys,l=$2(a,i,n);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:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=W2;f.x=a.x,f.y=a.y,f.update(),st(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var h=o1(a,i),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Vg(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var f=u.getData(),h=Jn([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=st(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;un(n,function(f){if(st(f).dataIndex!=null)return l=f,!0;if(st(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=U(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Jn([i.tooltipOption],a),l=this._renderMode,u=[],f=Ii("section",{blocks:[],noHeader:!0}),h=[],c=new Au;A(e,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var b=i1(w,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),x=Ii("section",{header:b,noHeader:!Ze(b),sortBlocks:!0,blocks:[]});f.blocks.push(x),A(_.seriesDataIndices,function(M){var C=n.getSeriesByIndex(M.seriesIndex),T=M.dataIndexInside,D=C.getDataParams(T);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Bv(S.axis,{value:w}),D.axisValueLabel=b,D.marker=c.makeTooltipMarker("item",Li(D.color),l);var L=qp(C.formatTooltip(T,!0,null)),I=L.frag;if(I){var P=Jn([C],a).get("valueFormatter");x.blocks.push(P?B({valueFormatter:P},I):I)}L.text&&h.push(L.text),u.push(D)}})}})}),f.blocks.reverse(),h.reverse();var v=i.position,p=s.get("order"),g=td(f,c,l,p,n.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var d=l==="richText"?`

`:"<br/>",y=h.join(d);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,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)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=st(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,p=e.positionDefault,g=Jn([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),d=g.get("trigger");if(!(d!=null&&d!=="item")){var y=u.getDataParams(f,h),m=new Au;y.marker=m.makeTooltipMarker("item",Li(y.color),v);var _=qp(u.formatTooltip(f,!1,h)),S=g.get("order"),w=g.get("valueFormatter"),b=_.frag,x=b?td(w?B({valueFormatter:w},b):b,m,v,S,a.get("useUTC"),g.get("textStyle")):_.text,M="item_"+u.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,x,y,M,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=st(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(W(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=X(l),l.content=oe(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=e.positionDefault,p=Jn(h,this._tooltipModel,v?{position:v}:null),g=p.get("content"),d=Math.random()+"",y=new Au;this._showOrMove(p,function(){var m=X(p.get("formatterParams")||{});this._showTooltipContent(p,g,m,d,e.offsetX,e.offsetY,e.position,i,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=i,p=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor")),g=p.color;if(c)if(W(c)){var d=e.ecModel.get("useUTC"),y=V(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=vl(y.axisValue,v,d)),v=m0(v,n,!0)}else if($(c)){var _=U(function(S,w){S===this._ticket&&(h.setContent(w,f,e,g,l),this._updatePosition(e,l,o,s,h,n,u))},this);this._ticket=a,v=c(n,a,_)}else v=c;h.setContent(v,f,e,g,l),h.show(e,g),this._updatePosition(e,l,o,s,h,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a){if(n==="axis"||V(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!V(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),$(i)&&(i=i([n,a],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),V(i))n=q(i[0],u),a=q(i[1],f);else if(Y(i)){var g=i;g.width=h[0],g.height=h[1];var d=Je(g,{width:u,height:f});n=d.x,a=d.y,c=null,v=null}else if(W(i)&&l){var y=X2(i,p,h,e.get("borderWidth"));n=y[0],a=y[1]}else{var y=Y2(n,a,o,u,f,c?null:20,v?null:20);n=y[0],a=y[1]}if(c&&(n-=Fg(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=Fg(v)?h[1]/2:v==="bottom"?h[1]:0),A1(e)){var y=Z2(n,a,o,u,f);n=y[0],a=y[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&A(u,function(c,v){var p=h[v]||{},g=c.seriesDataIndices||[],d=p.seriesDataIndices||[];o=o&&c.value===p.value&&c.axisType===p.axisType&&c.axisId===p.axisId&&g.length===d.length,o&&A(g,function(y,m){var _=d[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&A(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=i[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){Q.node||!i.getDom()||(Rs(this,"_updatePosition"),this._tooltipContent.dispose(),gh("itemTooltip",i))},t.type="tooltip",t}(Zt);function Jn(r,t,e){var i=t.ecModel,n;e?(n=new wt(e,i,i),n=new wt(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof wt&&(o=o.get("tooltip",!0)),W(o)&&(o={formatter:o}),o&&(n=new wt(o,n,i)))}return n}function Vg(r,t){return r.dispatchAction||U(t.dispatchAction,t)}function Y2(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function Z2(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function X2(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function Fg(r){return r==="center"||r==="middle"}function $2(r,t,e){var i=Kh(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=Ua(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=st(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function q2(r){Xt(s1),r.registerComponentModel(P2),r.registerComponentView(U2),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Vt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Vt)}var Fa=A,K2=Y,Hs=-1,Ht=function(){function r(t){var e=t.mappingMethod,i=t.type,n=this.option=X(t);this.type=i,this.mappingMethod=e,this._normalizeData=j2[e];var a=r.visualHandlers[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[e],e==="piecewise"?(Qu(n),Q2(n)):e==="category"?n.categories?J2(n):Qu(n,!0):(Ee(e!=="linear"||n.dataExtent),Qu(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return U(this._normalizeData,this)},r.listVisualTypes=function(){return bt(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,i){Y(t)?A(t,e,i):e.call(i,t)},r.mapVisual=function(t,e,i){var n,a=V(t)?[]:Y(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(i,o,s);n?a=l:a[s]=l}),a},r.retrieveVisuals=function(t){var e={},i;return t&&Fa(r.visualHandlers,function(n,a){t.hasOwnProperty(a)&&(e[a]=t[a],i=!0)}),i?e:null},r.prepareVisualTypes=function(t){if(V(t))t=t.slice();else if(K2(t)){var e=[];Fa(t,function(i,n){e.push(n)}),t=e}else return[];return t.sort(function(i,n){return n==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,i){for(var n,a=1/0,o=0,s=e.length;o<s;o++){var l=e[o].value;if(l!=null){if(l===t||W(l)&&l===t+"")return o;i&&c(l,o)}}for(var o=0,s=e.length;o<s;o++){var u=e[o],f=u.interval,h=u.close;if(f){if(f[0]===-1/0){if(Oo(h[1],t,f[1]))return o}else if(f[1]===1/0){if(Oo(h[0],f[0],t))return o}else if(Oo(h[0],f[0],t)&&Oo(h[1],t,f[1]))return o;i&&c(f[0],o),i&&c(f[1],o)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function c(v,p){var g=Math.abs(v-t);g<a&&(a=g,n=p)}},r.visualHandlers={color:{applyVisual:jn("color"),getColorMapper:function(){var t=this.option;return U(t.mappingMethod==="category"?function(e,i){return!i&&(e=this._normalizeData(e)),fa.call(this,e)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=Wl(e,t.parsedVisual,n),a?n:hr(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return hr(Wl(t,this.option.parsedVisual),"rgba")},category:fa,piecewise:function(t,e){var i=Ch.call(this,e);return i==null&&(i=hr(Wl(t,this.option.parsedVisual),"rgba")),i},fixed:hi}},colorHue:ko(function(t,e){return Ul(t,e)}),colorSaturation:ko(function(t,e){return Ul(t,null,e)}),colorLightness:ko(function(t,e){return Ul(t,null,null,e)}),colorAlpha:ko(function(t,e){return Lf(t,e)}),decal:{applyVisual:jn("decal"),_normalizedToVisual:{linear:null,category:fa,piecewise:null,fixed:null}},opacity:{applyVisual:jn("opacity"),_normalizedToVisual:Mh([0,1])},liftZ:{applyVisual:jn("liftZ"),_normalizedToVisual:{linear:hi,category:hi,piecewise:hi,fixed:hi}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);i("symbol",n)},_normalizedToVisual:{linear:Hg,category:fa,piecewise:function(t,e){var i=Ch.call(this,e);return i==null&&(i=Hg.call(this,t)),i},fixed:hi}},symbolSize:{applyVisual:jn("symbolSize"),_normalizedToVisual:Mh([0,1])}},r}();function Q2(r){var t=r.pieceList;r.hasSpecialVisual=!1,A(t,function(e,i){e.originIndex=i,e.visual!=null&&(r.hasSpecialVisual=!0)})}function J2(r){var t=r.categories,e=r.categoryMap={},i=r.visual;if(Fa(t,function(o,s){e[o]=s}),!V(i)){var n=[];Y(i)?Fa(i,function(o,s){var l=e[s];n[l??Hs]=o}):n[Hs]=i,i=P1(r,n)}for(var a=t.length-1;a>=0;a--)i[a]==null&&(delete e[t[a]],t.pop())}function Qu(r,t){var e=r.visual,i=[];Y(e)?Fa(e,function(a){i.push(a)}):e!=null&&i.push(e);var n={color:1,symbol:1};!t&&i.length===1&&!n.hasOwnProperty(r.type)&&(i[1]=i[0]),P1(r,i)}function ko(r){return{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);i("color",r(e("color"),n))},_normalizedToVisual:Mh([0,1])}}function Hg(r){var t=this.option.visual;return t[Math.round(pt(r,[0,1],[0,t.length-1],!0))]||{}}function jn(r){return function(t,e,i){i(r,this.mapValueToVisual(t))}}function fa(r){var t=this.option.visual;return t[this.option.loop&&r!==Hs?r%t.length:r]}function hi(){return this.option.visual[0]}function Mh(r){return{linear:function(t){return pt(t,r,this.option.visual,!0)},category:fa,piecewise:function(t,e){var i=Ch.call(this,e);return i==null&&(i=pt(t,r,this.option.visual,!0)),i},fixed:hi}}function Ch(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var i=Ht.findPieceIndex(r,e),n=e[i];if(n&&n.visual)return n.visual[this.type]}}function P1(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=H(t,function(e){var i=Se(e);return i||[0,0,0,1]})),t}var j2={linear:function(r){return pt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=Ht.findPieceIndex(r,t,!0);if(e!=null)return pt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??Hs},fixed:Vt};function Oo(r,t,e){return r?t<=e:t<e}var Gg=A;function Wg(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function Ug(r,t,e){var i={};return Gg(t,function(a){var o=i[a]=n();Gg(r[a],function(s,l){if(Ht.isValidType(l)){var u={type:l,visual:s};e&&e(u,a),o[l]=new Ht(u),l==="opacity"&&(u=X(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Ht(u))}})}),i;function n(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function tP(r,t,e){var i;A(e,function(n){t.hasOwnProperty(n)&&Wg(t[n])&&(i=!0)}),i&&A(e,function(n){t.hasOwnProperty(n)&&Wg(t[n])?r[n]=X(t[n]):delete r[n]})}function eP(r,t,e,i){var n={};return A(r,function(a){var o=Ht.prepareVisualTypes(t[a]);n[a]=o}),{progress:function(o,s){var l;i!=null&&(l=s.getDimensionIndex(i));function u(w){return j0(s,h,w)}function f(w,b){WC(s,h,w,b)}for(var h,c=s.getStore();(h=o.next())!=null;){var v=s.getRawDataItem(h);if(!(v&&v.visualMap===!1))for(var p=i!=null?c.get(l,h):h,g=e(p),d=t[g],y=n[g],m=0,_=y.length;m<_;m++){var S=y[m];d[S]&&d[S].applyVisual(p,u,f)}}}}}var rP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.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"}},t}(ut),iP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=et(e.get("textBaseline"),e.get("textVerticalAlign")),f=new gt({style:kt(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=e.get("subtext"),v=new gt({style:kt(s,{text:c,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=e.get("link"),g=e.get("sublink"),d=e.get("triggerEvent",!0);f.silent=!p&&!d,v.silent=!g&&!d,p&&f.on("click",function(){Pp(p,"_"+e.get("target"))}),g&&v.on("click",function(){Pp(g,"_"+e.get("subtarget"))}),st(f).eventData=st(v).eventData=d?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(f),c&&a.add(v);var y=a.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Je(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),y=a.getBoundingRect();var w=_.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var x=new mt({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:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});a.add(x)}},t.type="title",t}(Zt);function nP(r){r.registerComponentModel(rP),r.registerComponentView(iP)}function R1(r,t){if(!r)return!1;for(var e=V(r)?r:[r],i=0;i<e.length;i++)if(e[i]&&e[i][t])return!0;return!1}function No(r){bs(r,"label",["show"])}var Bo=_t(),ki=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.createdBySelf=!1,e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Q.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,i){this._mergeOption(e,i,!1,!1)},t.prototype._mergeOption=function(e,i,n,a){var o=this.mainType;n||i.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Bo(s)[o];if(!l||!l.data){Bo(s)[o]=null;return}u?u._mergeOption(l,i,!0):(a&&No(l),A(l.data,function(f){f instanceof Array?(No(f[0]),No(f[1])):No(f)}),u=this.createMarkerModelFromSeries(l,this,i),B(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Bo(s)[o]=u},this)},t.prototype.formatTooltip=function(e,i,n){var a=this.getData(),o=this.getRawValue(e),s=a.getName(e);return Ii("section",{header:this.name,blocks:[Ii("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,i){var n=xv.prototype.getDataParams.call(this,e,i),a=this.__hostSeries;return a&&(n.seriesId=a.id,n.seriesName=a.name,n.seriesType=a.subType),n},t.getMarkerModelFromSeries=function(e,i){return Bo(e)[i]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(ut);Oe(ki,xv.prototype);function jv(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=Sn(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o<e.length;o++)a.push(Sn(r,t,e[o]));return a.join(" ")}}function E1(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!V(t))return t+"";for(var i=[],n=0;n<e.length;n++){var a=r.getDimensionIndex(e[n]);a>=0&&i.push(t[a])}return i.join(" ")}var tc=function(r){O(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o){this.removeAll();var s=ne(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=aP,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ci(this.childAt(0))},t.prototype.downplay=function(){Ai(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var h=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,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):At(c,v,s,i),uv(c)}if(this._updateCommon(e,i,l,n,a),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,Ft(c,v,s,i)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,p,g,d,y;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,g=a.labelStatesModels,d=a.hoverScale,y=a.cursorStyle,p=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=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"),g=Gr(m),d=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=wl(e.getItemVisual(i,"symbolOffset"),n);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var b=e.getItemVisual(i,"style"),x=b.fill;if(s instanceof je){var M=s.style;s.useStyle(B({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},b))}else s.__isEmptyBrush?s.useStyle(B({},b)):s.useStyle(b),s.style.decal=null,s.setColor(x,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(i,"liftZ"),T=this._z2;C!=null?T==null&&(this._z2=s.z2,s.z2+=C):T!=null&&(s.z2=T,this._z2=null);var D=o&&o.useNameLabel;Ni(s,g,{labelFetcher:l,labelDataIndex:i,defaultText:L,inheritColor:x,defaultOpacity:b.opacity});function L(R){return D?e.getName(R):jv(e,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=d==null||d===!0?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),dr(this,c,v,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=st(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Cs(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Cs(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return Cv(e.getItemVisual(i,"symbolSize"))},t}(ht);function aP(r,t){this.parent.drift(r,t)}function Ju(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Yg(r){return r!=null&&!Y(r)&&(r={isIgnore:r}),r||{}}function Zg(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Gr(t),cursorStyle:t.get("cursor")}}var oP=function(){function r(t){this.group=new ht,this._SymbolCtor=t||tc}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Yg(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Zg(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||i.removeAll(),t.diff(a).add(function(h){var c=f(h);if(Ju(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),i.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),p=f(h);if(!Ju(t,p,h,e)){i.remove(v);return}var g=t.getItemVisual(h,"symbol")||"circle",d=v&&v.getSymbolType&&v.getSymbolType();if(!v||d&&d!==g)i.remove(v),v=new o(t,h,l,u),v.setPosition(p);else{v.updateData(t,h,l,u);var y={x:p[0],y:p[1]};s?v.attr(y):At(v,y,n)}i.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){i.remove(c)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,n){var a=t._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Zg(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=Yg(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(Ju(e,o,a,i)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(n),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){Za(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(n){n.fadeOut(function(){e.remove(n)},i.hostModel)}):e.removeAll()},r}();function Ah(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function sP(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function zo(r,t,e,i,n,a){var o=[],s=Pi(t,i),l=s?t.getCalculationInfo("stackResultDimension"):i,u=ec(t,l,r),f=t.indicesOfNearest(l,u)[0];o[n]=t.get(e,f),o[a]=t.get(l,f);var h=t.get(i,f),c=Xe(t.get(i,f));return c=Math.min(c,20),c>=0&&(o[a]=+o[a].toFixed(c)),[o,h]}var ju={min:it(zo,"min"),max:it(zo,"max"),average:it(zo,"average"),median:it(zo,"median")};function Gs(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!sP(t)&&!V(t.coord)&&V(n)){var a=k1(t,e,i,r);if(t=X(t),t.type&&ju[t.type]&&a.baseAxis&&a.valueAxis){var o=ot(n,a.baseAxis.dim),s=ot(n,a.valueAxis.dim),l=ju[t.type](e,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!V(n))t.coord=[];else for(var u=t.coord,f=0;f<2;f++)ju[u[f]]&&(u[f]=ec(e,e.mapDimension(n[f]),u[f]));return t}}function k1(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(lP(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function lP(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Ws(r,t){return r&&r.containData&&t.coord&&!Ah(t)?r.containData(t.coord):!0}function uP(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!Ah(t)&&!Ah(e)?r.containZone(t.coord,e.coord):!0}function fP(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return zr(o,t[a])}:function(e,i,n,a){return zr(e.value,t[a])}}function ec(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var tf=_t(),O1=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=K()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){tf(s).keep=!1}),i.eachSeries(function(s){var l=ki.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!tf(s).keep&&a.group.remove(s.group)})},t.prototype.markKeep=function(e){tf(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;A(e,function(a){var o=ki.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?zm(l):rv(l))})}})},t.type="marker",t}(Zt),hP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},t.type="markLine",t.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"},t}(ki),Xg=ke.prototype,ef=ol.prototype,N1=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(N1);function rf(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var vP=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-line",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new N1},t.prototype.buildPath=function(e,i){rf(i)?Xg.buildPath.call(this,e,i):ef.buildPath.call(this,e,i)},t.prototype.pointAt=function(e){return rf(this.shape)?Xg.pointAt.call(this,e):ef.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var i=this.shape,n=rf(i)?[i.x2-i.x1,i.y2-i.y1]:ef.tangentAt.call(this,e);return Fh(n,n)},t}(vt),nf=["fromSymbol","toSymbol"];function $g(r){return"_"+r+"Type"}function qg(r,t,e){var i=t.getItemVisual(e,r);if(!i||i==="none")return i;var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=Cv(n),u=wl(o||0,l);return i+l+u+(a||"")+(s||"")}function Kg(r,t,e){var i=t.getItemVisual(e,r);if(!(!i||i==="none")){var n=t.getItemVisual(e,r+"Size"),a=t.getItemVisual(e,r+"Rotate"),o=t.getItemVisual(e,r+"Offset"),s=t.getItemVisual(e,r+"KeepAspect"),l=Cv(n),u=wl(o||0,l),f=ne(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,f.name=r,f}}function cP(r){var t=new vP({name:"line",subPixelOptimize:!0});return Dh(t.shape,r),t}function Dh(r,t){r.x1=t[0][0],r.y1=t[0][1],r.x2=t[1][0],r.y2=t[1][1],r.percent=1;var e=t[2];e?(r.cpx1=e[0],r.cpy1=e[1]):(r.cpx1=NaN,r.cpy1=NaN)}var pP=function(r){O(t,r);function t(e,i,n){var a=r.call(this)||this;return a._createLine(e,i,n),a}return t.prototype._createLine=function(e,i,n){var a=e.hostModel,o=e.getItemLayout(i),s=cP(o);s.shape.percent=0,Ft(s,{shape:{percent:1}},a,i),this.add(s),A(nf,function(l){var u=Kg(l,e,i);this.add(u),this[$g(l)]=qg(l,e,i)},this),this._updateCommonStl(e,i,n)},t.prototype.updateData=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=e.getItemLayout(i),l={shape:{}};Dh(l.shape,s),At(o,l,a,i),A(nf,function(u){var f=qg(u,e,i),h=$g(u);if(this[h]!==f){this.remove(this.childOfName(u));var c=Kg(u,e,i);this.add(c)}this[h]=f},this),this._updateCommonStl(e,i,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,i,n){var a=e.hostModel,o=this.childOfName("line"),s=n&&n.emphasisLineStyle,l=n&&n.blurLineStyle,u=n&&n.selectLineStyle,f=n&&n.labelStatesModels,h=n&&n.emphasisDisabled,c=n&&n.focus,v=n&&n.blurScope;if(!n||e.hasItemOption){var p=e.getItemModel(i),g=p.getModel("emphasis");s=g.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=g.get("disabled"),c=g.get("focus"),v=g.get("blurScope"),f=Gr(p)}var d=e.getItemVisual(i,"style"),y=d.stroke;o.useStyle(d),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,A(nf,function(b){var x=this.childOfName(b);if(x){x.setColor(y),x.style.opacity=d.opacity;for(var M=0;M<re.length;M++){var C=re[M],T=o.getState(C);if(T){var D=T.style||{},L=x.ensureState(C),I=L.style||(L.style={});D.stroke!=null&&(I[x.__isEmptyBrush?"stroke":"fill"]=D.stroke),D.opacity!=null&&(I.opacity=D.opacity)}}x.markRedraw()}},this);var m=a.getRawValue(i);Ni(this,f,{labelDataIndex:i,labelFetcher:{getFormattedLabel:function(b,x){return a.getFormattedLabel(b,x,e.dataType)}},inheritColor:y||"#000",defaultOpacity:d.opacity,defaultText:(m==null?e.getName(i):isFinite(m)?Tt(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");V(w)||(w=[w,w]),_.__labelDistance=w}this.setTextConfig({position:null,local:!0,inside:!1}),dr(this,c,v,h)},t.prototype.highlight=function(){Ci(this)},t.prototype.downplay=function(){Ai(this)},t.prototype.updateLayout=function(e,i){this.setLinePoints(e.getItemLayout(i))},t.prototype.setLinePoints=function(e){var i=this.childOfName("line");Dh(i.shape,e),i.dirty()},t.prototype.beforeUpdate=function(){var e=this,i=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),a=e.getTextContent();if(!i&&!n&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),h=l.pointAt(u),c=$y([],h,f);Fh(c,c);function v(T,D){var L=T.__specifiedRotation;if(L==null){var I=l.tangentAt(D);T.attr("rotation",(D===1?-1:1)*Math.PI/2-Math.atan2(I[1],I[0]))}else T.attr("rotation",L)}if(i&&(i.setPosition(f),v(i,0),i.scaleX=i.scaleY=o*u,i.markRedraw()),n&&(n.setPosition(h),v(n,1),n.scaleX=n.scaleY=o*u,n.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,g=void 0,d=a.__labelDistance,y=d[0]*o,m=d[1]*o,_=u/2,S=l.tangentAt(_),w=[S[1],-S[0]],b=l.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var x=S[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var M=-Math.atan2(S[1],S[0]);h[0]<f[0]&&(M=Math.PI+M),a.rotation=M}var C=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":C=-m,g="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":C=m,g="top";break;default:C=0,g="middle"}switch(a.__position){case"end":a.x=c[0]*y+h[0],a.y=c[1]*m+h[1],p=c[0]>.8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":a.x=-c[0]*y+f[0],a.y=-c[1]*m+f[1],p=c[0]>.8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=y*x+f[0],a.y=f[1]+C,p=S[0]<0?"right":"left",a.originX=-y*x,a.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=b[0],a.y=b[1]+C,p="center",a.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-y*x+h[0],a.y=h[1]+C,p=S[0]>=0?"right":"left",a.originX=y*x,a.originY=-C;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},t}(ht),dP=function(){function r(t){this.group=new ht,this._LineCtor=t||pP}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=Qg(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Qg(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function i(s){!s.isGroup&&!gP(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n<t.end;n++){var a=e.getItemLayout(n);if(af(a)){var o=new this._LineCtor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(t){Za(this._progressiveEls||this.group,t)},r.prototype._doAdd=function(t,e,i){var n=t.getItemLayout(e);if(af(n)){var a=new this._LineCtor(t,e,i);t.setItemGraphicEl(e,a),this.group.add(a)}},r.prototype._doUpdate=function(t,e,i,n,a){var o=t.getItemGraphicEl(i);if(!af(e.getItemLayout(n))){this.group.remove(o);return}o?o.updateData(e,n,a):o=new this._LineCtor(e,n,a),e.setItemGraphicEl(n,o),this.group.add(o)},r}();function gP(r){return r.animators&&r.animators.length>0}function Qg(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Gr(t)}}function Jg(r){return isNaN(r[0])||isNaN(r[1])}function af(r){return r&&!Jg(r[0])&&!Jg(r[1])}function In(r,t){return r.type===t}var Vo=_t(),yP=function(r,t,e,i){var n=r.getData(),a;if(V(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=Ie(i.yAxis,i.xAxis);else{var u=k1(i,n,t,r);s=u.valueAxis;var f=L_(n,u.valueDataDim);l=ec(n,f,o)}var h=s.dim==="x"?0:1,c=1-h,v=X(i),p={coord:[]};v.type=null,v.coord=[],v.coord[c]=-1/0,p.coord[c]=1/0;var g=e.get("precision");g>=0&&yt(l)&&(l=+l.toFixed(Math.min(g,20))),v.coord[h]=p.coord[h]=l,a=[v,p,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var d=[Gs(r,a[0]),Gs(r,a[1]),B({},a[2])];return d[2].type=d[2].type||null,tt(d[2],d[0]),tt(d[2],d[1]),d};function Us(r){return!isNaN(r)&&!isFinite(r)}function jg(r,t,e,i){var n=1-r,a=i.dimensions[r];return Us(t[n])&&Us(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function mP(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(jg(1,e,i,r)||jg(0,e,i,r)))return!0}return Ws(r,t[0])&&Ws(r,t[1])}function of(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=q(o.get("x"),n.getWidth()),u=q(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=a.dimensions,h=r.get(f[0],t),c=r.get(f[1],t);s=a.dataToPoint([h,c])}if(In(a,"cartesian2d")){var v=a.getAxis("x"),p=a.getAxis("y"),f=a.dimensions;Us(r.get(f[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[e?0:1]):Us(r.get(f[1],t))&&(s[1]=p.toGlobalCoord(p.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var _P=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=ki.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Vo(o).from,u=Vo(o).to;l.each(function(f){of(l,f,!0,a,n),of(u,f,!1,a,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new dP);this.group.add(f.group);var h=SP(o,e,i),c=h.from,v=h.to,p=h.line;Vo(i).from=c,Vo(i).to=v,i.setData(p);var g=i.get("symbol"),d=i.get("symbolSize"),y=i.get("symbolRotate"),m=i.get("symbolOffset");V(g)||(g=[g,g]),V(d)||(d=[d,d]),V(y)||(y=[y,y]),V(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){st(S).dataModel=i,S.traverse(function(w){st(w).dataModel=i})});function _(S,w,b){var x=S.getItemModel(w);of(S,w,b,e,a);var M=x.getModel("itemStyle").getItemStyle();M.fill==null&&(M.fill=bl(l,"color")),S.setItemVisual(w,{symbolKeepAspect:x.get("symbolKeepAspect"),symbolOffset:et(x.get("symbolOffset",!0),m[b?0:1]),symbolRotate:et(x.get("symbolRotate",!0),y[b?0:1]),symbolSize:et(x.get("symbolSize"),d[b?0:1]),symbol:et(x.get("symbol",!0),g[b?0:1]),style:M})}this.markKeep(f),f.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t}(O1);function SP(r,t,e){var i;r?i=H(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new bi(i,e),a=new bi(i,e),o=new bi([],e),s=H(e.get("data"),it(yP,t,r,e));r&&(s=Lt(s,it(mP,r)));var l=fP(!!r,i);return n.initData(H(s,function(u){return u[0]}),null,l),a.initData(H(s,function(u){return u[1]}),null,l),o.initData(H(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}function bP(r){r.registerComponentModel(hP),r.registerComponentView(_P),r.registerPreprocessor(function(t){R1(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var wP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(ki),Fo=_t(),xP=function(r,t,e,i){var n=i[0],a=i[1];if(!(!n||!a)){var o=Gs(r,n),s=Gs(r,a),l=o.coord,u=s.coord;l[0]=Ie(l[0],-1/0),l[1]=Ie(l[1],-1/0),u[0]=Ie(u[0],1/0),u[1]=Ie(u[1],1/0);var f=zS([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Ys(r){return!isNaN(r)&&!isFinite(r)}function ty(r,t,e,i){var n=1-r;return Ys(t[n])&&Ys(e[n])}function TP(r,t){var e=t.coord[0],i=t.coord[1],n={coord:e,x:t.x0,y:t.y0},a={coord:i,x:t.x1,y:t.y1};return In(r,"cartesian2d")?e&&i&&(ty(1,e,i)||ty(0,e,i))?!0:uP(r,n,a):Ws(r,n)||Ws(r,a)}function ey(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=q(o.get(e[0]),n.getWidth()),u=q(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition){var f=r.getValues(["x0","y0"],t),h=r.getValues(["x1","y1"],t),c=a.clampData(f),v=a.clampData(h),p=[];e[0]==="x0"?p[0]=c[0]>v[0]?h[0]:f[0]:p[0]=c[0]>v[0]?f[0]:h[0],e[1]==="y0"?p[1]=c[1]>v[1]?h[1]:f[1]:p[1]=c[1]>v[1]?f[1]:h[1],s=i.getMarkerPosition(p,e,!0)}else{var g=r.get(e[0],t),d=r.get(e[1],t),y=[g,d];a.clampData&&a.clampData(y,y),s=a.dataToPoint(y,!0)}if(In(a,"cartesian2d")){var m=a.getAxis("x"),_=a.getAxis("y"),g=r.get(e[0],t),d=r.get(e[1],t);Ys(g)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Ys(d)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var ry=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=ki.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=H(ry,function(h){return ey(s,l,h,a,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new ht});this.group.add(f.group),this.markKeep(f);var h=CP(o,e,i);i.setData(h),h.each(function(c){var v=H(ry,function(M){return ey(h,c,M,e,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,d=p.getExtent(),y=g.getExtent(),m=[p.parse(h.get("x0",c)),p.parse(h.get("x1",c))],_=[g.parse(h.get("y0",c)),g.parse(h.get("y1",c))];lr(m),lr(_);var S=!(d[0]>m[1]||d[1]<m[0]||y[0]>_[1]||y[1]<_[0]),w=!S;h.setItemLayout(c,{points:v,allClipped:w});var b=h.getItemModel(c).getModel("itemStyle").getItemStyle(),x=bl(l,"color");b.fill||(b.fill=x,W(b.fill)&&(b.fill=Lf(b.fill,.4))),b.stroke||(b.stroke=x),h.setItemVisual(c,"style",b)}),h.diff(Fo(f).data).add(function(c){var v=h.getItemLayout(c);if(!v.allClipped){var p=new Hr({shape:{points:v.points}});h.setItemGraphicEl(c,p),f.group.add(p)}}).update(function(c,v){var p=Fo(f).data.getItemGraphicEl(v),g=h.getItemLayout(c);g.allClipped?p&&f.group.remove(p):(p?At(p,{shape:{points:g.points}},i,c):p=new Hr({shape:{points:g.points}}),h.setItemGraphicEl(c,p),f.group.add(p))}).remove(function(c){var v=Fo(f).data.getItemGraphicEl(c);f.group.remove(v)}).execute(),h.eachItemGraphicEl(function(c,v){var p=h.getItemModel(v),g=h.getItemVisual(v,"style");c.useStyle(h.getItemVisual(v,"style")),Ni(c,Gr(p),{labelFetcher:i,labelDataIndex:v,defaultText:h.getName(v)||"",inheritColor:W(g.fill)?Lf(g.fill,1):"#000"}),Di(c,p),dr(c,null,null,p.get(["emphasis","disabled"])),st(c).dataModel=i}),Fo(f).data=h,f.group.silent=i.get("silent")||e.get("silent")},t.type="markArea",t}(O1);function CP(r,t,e){var i,n,a=["x0","y0","x1","y1"];if(r){var o=H(r&&r.dimensions,function(u){var f=t.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return B(B({},h),{name:u,ordinalMeta:null})});n=H(a,function(u,f){return{name:u,type:o[f%2].type}}),i=new bi(n,e)}else n=[{name:"value",type:"float"}],i=new bi(n,e);var s=H(e.get("data"),it(xP,t,r,e));r&&(s=Lt(s,it(TP,r)));var l=r?function(u,f,h,c){var v=u.coord[Math.floor(c/2)][c%2];return zr(v,n[c])}:function(u,f,h,c){return zr(u.value,n[c])};return i.initData(s,null,l),i.hasItemOption=!0,i}function AP(r){r.registerComponentModel(wP),r.registerComponentView(MP),r.registerPreprocessor(function(t){R1(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var DP=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Lh=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),V(i)&&A(i,function(a,o){W(a)&&(a={type:a}),i[o]=tt(a,DP(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n<e.length;n++){var a=e[n].get("name");if(this.isSelected(a)){this.select(a),i=!0;break}}!i&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var i=[],n=[];e.eachRawSeries(function(l){var u=l.name;n.push(u);var f;if(l.legendVisualProvider){var h=l.legendVisualProvider,c=h.getAllNames();e.isSeriesFiltered(l)||(n=n.concat(c)),c.length?i=i.concat(c):f=!0}else f=!0;f&&qh(l)&&i.push(l.name)}),this._availableNames=n;var a=this.get("data")||i,o=K(),s=H(a,function(l){return(W(l)||yt(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new wt(l,this,this.ecModel))},this);this._data=Lt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var i=this.option.selected,n=this.get("selectedMode");if(n==="single"){var a=this._data;A(a,function(o){i[o.get("name")]=!1})}i[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var i=this.option.selected;i.hasOwnProperty(e)||(i[e]=!0),this[i[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,i=this.option.selected;A(e,function(n){i[n.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,i=this.option.selected;A(e,function(n){var a=n.get("name",!0);i.hasOwnProperty(a)||(i[a]=!0),i[a]=!i[a]})},t.prototype.isSelected=function(e){var i=this.option.selected;return!(i.hasOwnProperty(e)&&!i[e])&&ot(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.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}},t}(ut),ji=it,Ih=A,Ho=ht,B1=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Ho),this.group.add(this._selectorGroup=new Ho),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,n,l,s,u);var f=e.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),v=Je(f,h,c),p=this.layoutInner(e,o,v,a,l,u),g=Je(lt({width:p.width,height:p.height},f),h,c);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=x1(p,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),f=K(),h=i.get("selectedMode"),c=[];n.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Ih(i.getData(),function(v,p){var g=v.get("name");if(!this.newlineDisabled&&(g===""||g===`
`)){var d=new Ho;d.newline=!0,u.add(d);return}var y=n.getSeriesByName(g)[0];if(!f.get(g))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),b=this._createItem(y,g,p,v,i,e,_,w,S,h,a);b.on("click",ji(iy,g,null,a,c)).on("mouseover",ji(Ph,y.name,null,a,c)).on("mouseout",ji(Rh,y.name,null,a,c)),n.ssr&&b.eachChild(function(x){var M=st(x);M.seriesIndex=y.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),f.set(g,!0)}else n.eachRawSeries(function(x){if(!f.get(g)&&x.legendVisualProvider){var M=x.legendVisualProvider;if(!M.containName(g))return;var C=M.indexOfName(g),T=M.getItemVisual(C,"style"),D=M.getItemVisual(C,"legendIcon"),L=Se(T.fill);L&&L[3]===0&&(L[3]=.2,T=B(B({},T),{fill:hr(L,"rgba")}));var I=this._createItem(x,g,p,v,i,e,{},T,D,h,a);I.on("click",ji(iy,null,g,a,c)).on("mouseover",ji(Ph,null,g,a,c)).on("mouseout",ji(Rh,null,g,a,c)),n.ssr&&I.eachChild(function(P){var R=st(P);R.seriesIndex=x.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),f.set(g,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();Ih(e,function(u){var f=u.type,h=new gt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);Ni(h,{normal:c,emphasis:v},{defaultText:u.title}),Ts(h)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,f,h,c){var v=e.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),d=o.isSelected(i),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=LP(f,a,l,u,v,d,c),w=new Ho,b=a.getModel("textStyle");if($(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:p,itemHeight:g,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var x=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;w.add(IP({itemWidth:p,itemHeight:g,icon:f,iconRotate:x,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var M=s==="left"?p+5:-5,C=s,T=o.get("formatter"),D=i;W(T)&&T?D=T.replace("{name}",i??""):$(T)&&(D=T(i));var L=d?b.getTextColor():a.get("inactiveColor");w.add(new gt({style:kt(b,{text:D,x:M,y:g/2,fill:L,align:C,verticalAlign:"middle"},{inheritColor:L})}));var I=new mt({shape:w.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&fl({el:I,componentModel:o,itemName:i,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(w),Ts(w),w.__legendDataIndex=n,w},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Si(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Si("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],p=e.get("selectorButtonGap",!0),g=e.getOrient().index,d=g===0?"width":"height",y=g===0?"height":"width",m=g===0?"y":"x";s==="end"?v[g]+=f[d]+p:h[g]+=c[d]+p,v[1-g]+=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 _[d]=f[d]+p+c[d],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-g]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Zt);function LP(r,t,e,i,n,a,o){function s(d,y){d.lineWidth==="auto"&&(d.lineWidth=y.lineWidth>0?2:0),Ih(d,function(m,_){d[_]==="inherit"&&(d[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:ah(h,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var p=t.get("inactiveBorderWidth"),g=u[f];u.lineWidth=p==="auto"?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function IP(r){var t=r.icon||"roundRect",e=ne(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function iy(r,t,e,i){Rh(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Ph(r,t,e,i)}function z1(r){for(var t=r.getZr().storage.getDisplayList(),e,i=0,n=t.length;i<n&&!(e=t[i].states.emphasis);)i++;return e&&e.hoverLayer}function Ph(r,t,e,i){z1(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:i})}function Rh(r,t,e,i){z1(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:i})}function PP(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0})}function ta(r,t,e){var i={},n=r==="toggleSelected",a;return e.eachComponent("legend",function(o){n&&a!=null?o[a?"select":"unSelect"](t.name):r==="allSelect"||r==="inverseSelect"?o[r]():(o[r](t.name),a=o.isSelected(t.name));var s=o.getData();A(s,function(l){var u=l.get("name");if(!(u===`
`||u==="")){var f=o.isSelected(u);i.hasOwnProperty(u)?i[u]=i[u]&&f:i[u]=f}})}),r==="allSelect"||r==="inverseSelect"?{selected:i}:{name:t.name,selected:i}}function RP(r){r.registerAction("legendToggleSelect","legendselectchanged",it(ta,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",it(ta,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",it(ta,"inverseSelect")),r.registerAction("legendSelect","legendselected",it(ta,"select")),r.registerAction("legendUnSelect","legendunselected",it(ta,"unSelect"))}function V1(r){r.registerComponentModel(Lh),r.registerComponentView(B1),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,PP),r.registerSubTypeDefaulter("legend",function(){return"plain"}),RP(r)}var EP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,i,n){var a=Ka(e);r.prototype.init.call(this,e,i,n),ny(this,e,a)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),ny(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Mn(Lh.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}),t}(Lh);function ny(r,t,e){var i=r.getOrient(),n=[1,1];n[i.index]=0,_n(t,e,{type:"box",ignoreSize:!!n})}var ay=ht,sf=["width","height"],lf=["x","y"],kP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new ay),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ay)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,i,n,a,o,s,l);var f=this._controllerGroup,h=i.get("pageIconSize",!0),c=V(h)?h:[h,h];p("pagePrev",0);var v=i.getModel("pageTextStyle");f.add(new gt({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(g,d){var y=g+"DataIndex",m=ul(i.get("pageIcons",!0)[i.getOrient().name][d],{onclick:U(u._pageGo,u,y,i,a)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});m.name=g,f.add(m)}},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=sf[u],h=lf[u],c=sf[1-u],v=lf[1-u];o&&Si("horizontal",l,e.get("selectorItemGap",!0));var p=e.get("selectorButtonGap",!0),g=l.getBoundingRect(),d=[-g.x,-g.y],y=X(n);o&&(y[f]=n[f]-g[f]-p);var m=this._layoutContentAndController(e,a,y,u,f,c,v,h);if(o){if(s==="end")d[u]+=m[f]+p;else{var _=g[f]+p;d[u]-=_,m[h]-=_}m[f]+=g[f]+p,d[1-u]+=m[v]+m[c]/2-g[c]/2,m[c]=Math.max(m[c],g[c]),m[v]=Math.min(m[v],g[v]+d[1-u]),l.x=d[0],l.y=d[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,i,n,a,o,s,l,u){var f=this.getContentGroup(),h=this._containerGroup,c=this._controllerGroup;Si(e.get("orient"),f,e.get("itemGap"),a?n.width:null,a?null:n.height),Si("horizontal",c,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),p=c.getBoundingRect(),g=this._showController=v[o]>n[o],d=[-v.x,-v.y];i||(d[a]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=et(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(g){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=n[o]-p[o]:y[a]+=p[o]+_}m[1-a]+=v[s]/2-p[s]/2,f.setPosition(d),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=g?n[o]:v[o],w[s]=Math.max(v[s],p[s]),w[l]=Math.min(0,p[l]+m[1-a]),h.__rectSize=n[o],g){var b={x:0,y:0};b[o]=Math.max(n[o]-p[o]-_,0),b[s]=w[s],h.setClipPath(new mt({shape:b})),h.__rectSize=b[o]}else c.eachChild(function(M){M.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return x.pageIndex!=null&&At(f,{x:x.contentPosition[0],y:x.contentPosition[1]},g?e:null),this._updatePageInfoView(e,x),w},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=i[h]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",W(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=sf[o],l=lf[o],u=this._findTargetItemIndex(i),f=n.children(),h=f[u],c=f.length,v=c?1:0,p={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=S(h);p.contentPosition[o]=-g.s;for(var d=u+1,y=g,m=g,_=null;d<=c;++d)_=S(f[d]),(!_&&m.e>y.s+a||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var d=u-1,y=g,m=g,_=null;d>=-1;--d)_=S(f[d]),(!_||!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(b){if(b){var x=b.getBoundingRect(),M=x[l]+b[l];return{s:M,e:M+x[s],i:b.__legendDataIndex}}}function w(b,x){return b.e>=x&&b.s<=x+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t}(B1);function OP(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function NP(r){Xt(V1),r.registerComponentModel(EP),r.registerComponentView(kP),OP(r)}function BP(r){Xt(V1),Xt(NP)}var zP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Mn(Va.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Va),rc=_t();function VP(r,t,e){rc(r).coordSysRecordMap.each(function(i){var n=i.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function FP(r,t){for(var e=rc(r).coordSysRecordMap,i=e.keys(),n=0;n<i.length;n++){var a=i[n],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||F1(e,o))}}}function F1(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function HP(r,t){var e={model:t,containsPoint:it(WP,t),dispatchAction:it(GP,r),dataZoomInfoMap:null,controller:null},i=e.controller=new wI(r.getZr());return A(["pan","zoom","scrollMove"],function(n){i.on(n,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[n],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function GP(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function WP(r,t,e,i){return r.coordinateSystem.containPoint([e,i])}function UP(r){var t,e="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;i[e+s]>i[e+t]&&(t=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function YP(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var i=rc(e),n=i.coordSysRecordMap||(i.coordSysRecordMap=K());n.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=S1(a);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,HP(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=K());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),n.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){F1(n,a);return}var f=UP(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),Sl(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var ZP=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,i,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),VP(n,e,{pan:U(uf.pan,this),zoom:U(uf.zoom,this),scrollMove:U(uf.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){FP(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}($v),uf={zoom:function(r,t,e,i){var n=this.range,a=n.slice(),o=r.axisModels[0];if(o){var s=ff[t](null,[i.originX,i.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Ln(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,n[0]!==a[0]||n[1]!==a[1])return a}},pan:oy(function(r,t,e,i,n,a){var o=ff[i]([a.oldX,a.oldY],[a.newX,a.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:oy(function(r,t,e,i,n,a){var o=ff[i]([0,0],[a.scrollDelta,a.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function oy(r){return function(t,e,i,n){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,i,n);if(Ln(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var ff={grid:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,i,n){var a=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,i,n){var a=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function XP(r){qv(r),r.registerComponentModel(zP),r.registerComponentView(ZP),YP(r)}var $P=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Mn(Va.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:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.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:.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"}}}),t}(Va),ea=mt,sy=7,qP=1,hf=30,KP=7,ra="horizontal",ly="vertical",QP=5,JP=["line","bar","candlestick","scatter"],jP={easing:"cubicOut",duration:100,delay:0},tR=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=U(this._onBrush,this),this._onBrushEnd=U(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),Sl(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Rs(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new ht;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?KP:0,o=this._findCoordRect(),s={width:i.getWidth(),height:i.getHeight()},l=this._orient===ra?{right:s.width-o.x-o.width,top:s.height-hf-sy-a,width:o.width,height:hf}:{right:sy,top:o.y,width:hf,height:o.height},u=Ka(e.option);A(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=Je(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===ly&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===ra&&!o?{scaleY:l?1:-1,scaleX:1}:n===ra&&o?{scaleY:l?1:-1,scaleX:-1}:n===ly&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=i.x-u.x,e.y=i.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new ea({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new ea({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:U(this._onClickPanel,this)}),s=this.api.getZr();a?(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)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,i[1]],p=[0,i[0]],g=[[i[0],0],[0,0]],d=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/i[0]),S;o.each([l],function(C,T){if(_>0&&T%_){m+=y;return}var D=C==null||isNaN(C)||C==="",L=D?0:pt(C,h,v,!0);D&&!S&&T?(g.push([g[g.length-1][0],0]),d.push([d[d.length-1][0],0])):!D&&S&&(g.push([m,0]),d.push([m,0])),g.push([m,L]),d.push([m,L]),m+=y,S=D}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=d}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var w=this.dataZoomModel;function b(C){var T=w.getModel(C?"selectedDataBackground":"dataBackground"),D=new ht,L=new Hr({shape:{points:u},segmentIgnoreThreshold:1,style:T.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),I=new Oi({shape:{points:f},segmentIgnoreThreshold:1,style:T.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(L),D.add(I),D}for(var x=0;x<3;x++){var M=b(x===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(i!==!0&&ot(JP,u.get("type"))<0)){var f=a.getComponent(kr(o),s).axis,h=eR(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),n={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.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=i.filler=new ea({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new ea({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:qP,fill:"rgba(0,0,0,0)"}})),A([0,1],function(_){var S=l.get("handleIcon");!ks[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var w=ne(S,-1,0,2,2,null,!0);w.attr({cursor:uy(this._orient),draggable:!0,drift:U(this._onDragMove,this,_),ondragend:U(this._onDragEnd,this),onmouseover:U(this._showDataInfo,this,!0),onmouseout:U(this._showDataInfo,this,!1),z2:5});var b=w.getBoundingRect(),x=l.get("handleSize");this._handleHeight=q(x,this._size[1]),this._handleWidth=b.width/b.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(),Ts(w);var M=l.get("handleColor");M!=null&&(w.style.fill=M),o.add(n[_]=w);var C=l.getModel("textStyle");e.add(a[_]=new gt({silent:!0,invisible:!0,style:kt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var v=c;if(h){var p=q(l.get("moveHandleSize"),s[1]),g=i.moveHandle=new mt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),d=p*.8,y=i.moveHandleIcon=ne(l.get("moveHandleIcon"),-d/2,-d/2,d,d,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));v=i.moveZone=new mt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(y),o.add(v)}v.attr({draggable:!0,cursor:uy(this._orient),drift:U(this._onDragMove,this,"all"),ondragstart:U(this._showDataInfo,this,!0),ondragend:U(this._onDragEnd,this),onmouseover:U(this._showDataInfo,this,!0),onmouseout:U(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[pt(e[0],[0,100],i,!0),pt(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Ln(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?pt(s.minSpan,l,o,!0):null,s.maxSpan!=null?pt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=lr([pt(a[0],o,l,!0),pt(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=lr(n.slice()),o=this._size;A([0,1],function(v){var p=i.handles[v],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:n[v]+(v?-1:1),y:o[1]/2-g/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;f<l.length;f++){var h=l[f],c=h.getClipPath();c||(c=new mt,h.setClipPath(c)),c.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,s=["",""];if(i.get("showDetail")){var l=i.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,h=e?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 g=_i(n.handles[p].parent,this.group),d=ll(p===0?"right":"left",g),y=this._handleWidth/2+QP,m=Nr([c[p]+(p===0?-y:y),this._size[1]/2],g);a[p].setStyle({x:m[0],y:m[1],verticalAlign:o===ra?"middle":d,align:o===ra?d:"center",text:s[p]})}},t.prototype._formatLabel=function(e,i){var n=this.dataZoomModel,a=n.get("labelFormatter"),o=n.get("labelPrecision");(o==null||o==="auto")&&(o=i.getPixelPrecision());var s=e==null||isNaN(e)?"":i.type==="category"||i.type==="time"?i.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return $(a)?a(e,s):W(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(e){e=this._dragging||e;var i=this._displayables,n=i.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),i.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},t.prototype._onDragMove=function(e,i,n,a){this._dragging=!0,cr(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Nr([i,n],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var i=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>i[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new j(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=lr([pt(n.x,o,s,!0),pt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(cr(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new ea({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),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]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?jP:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=S1(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}($v);function eR(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function uy(r){return r==="vertical"?"ns-resize":"ew-resize"}function rR(r){r.registerComponentModel($P),r.registerComponentView(tR),qv(r)}function iR(r){Xt(XP),Xt(rR)}var H1={get:function(r,t,e){var i=X((nR[r]||{})[t]);return e&&V(i)?i[i.length-1]:i}},nR={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},fy=Ht.mapVisual,aR=Ht.eachVisual,oR=V,hy=A,sR=lr,lR=pt,Zs=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,i){var n=this.option;!i&&tP(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var i=this.stateList;e=U(e,this),this.controllerVisuals=Ug(this.option.controller,i,e),this.targetVisuals=Ug(this.option.target,i,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,i=[];return e==null||e==="all"?this.ecModel.eachSeries(function(n,a){i.push(a)}):i=Ot(e),i},t.prototype.eachTargetSeries=function(e,i){A(this.getTargetSeriesIndices(),function(n){var a=this.ecModel.getSeriesByIndex(n);a&&e.call(i,a)},this)},t.prototype.isTargetSeries=function(e){var i=!1;return this.eachTargetSeries(function(n){n===e&&(i=!0)}),i},t.prototype.formatValueText=function(e,i,n){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;n=n||["<",">"],V(e)&&(e=e.slice(),u=!0);var f=i?e:u?[h(e[0]),h(e[1])]:h(e);if(W(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if($(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[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))}},t.prototype.resetExtent=function(){var e=this.option,i=sR([e.min,e.max]);this._dataExtent=i},t.prototype.getDataDimensionIndex=function(e){var i=this.option.dimension;if(i!=null)return e.getDimensionIndex(i);for(var n=e.dimensions,a=n.length-1;a>=0;a--){var o=n[a],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,i=this.option,n={inRange:i.inRange,outOfRange:i.outOfRange},a=i.target||(i.target={}),o=i.controller||(i.controller={});tt(a,n),tt(o,n);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),f.call(this,o);function l(h){oR(i.color)&&!h.inRange&&(h.inRange={color:i.color.slice().reverse()}),h.inRange=h.inRange||{color:e.get("gradientColor")}}function u(h,c,v){var p=h[c],g=h[v];p&&!g&&(g=h[v]={},hy(p,function(d,y){if(Ht.isValidType(y)){var m=H1.get(y,"inactive",s);m!=null&&(g[y]=m,y==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.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"),g=this.getItemSymbol(),d=g||"roundRect";hy(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=c&&X(c)||(s?d:[d])),_.symbolSize==null&&(_.symbolSize=v&&X(v)||(s?m[0]:[m[0],m[0]])),_.symbol=fy(_.symbol,function(b){return b==="none"?d:b});var S=_.symbolSize;if(S!=null){var w=-1/0;aR(S,function(b){b>w&&(w=b)}),_.symbolSize=fy(S,function(b){return lR(b,[0,w],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.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"}},t}(ut),vy=[20,140],uR=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=vy[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=vy[1])},t.prototype._resetRange=function(){var e=this.getExtent(),i=this.option.range;!i||i.auto?(e.auto=1,this.option.range=e):V(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],e[0]),i[1]=Math.min(i[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var i=this.option.controller[e].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),i=lr((this.get("range")||[]).slice());return i[0]>e[1]&&(i[0]=e[1]),i[1]>e[1]&&(i[1]=e[1]),i[0]<e[0]&&(i[0]=e[0]),i[1]<e[0]&&(i[1]=e[0]),i},t.prototype.getValueState=function(e){var i=this.option.range,n=this.getExtent();return(i[0]<=n[0]||i[0]<=e)&&(i[1]>=n[1]||e<=i[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[];return this.eachTargetSeries(function(n){var a=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&a.push(l)},this),i.push({seriesId:n.id,dataIndex:a})},this),i},t.prototype.getVisualMeta=function(e){var i=cy(this,"outOfRange",this.getExtent()),n=cy(this,"inRange",this.option.range.slice()),a=[];function o(v,p){a.push({value:v,color:e(v,p)})}for(var s=0,l=0,u=n.length,f=i.length;l<f&&(!n.length||i[l]<=n[0]);l++)i[l]<n[s]&&o(i[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&a.length&&o(n[s],"outOfRange"),o(n[s],"inRange");for(var h=1;l<f;l++)(!n.length||n[n.length-1]<i[l])&&(h&&(a.length&&o(a[a.length-1].value,"outOfRange"),h=0),o(i[l],"outOfRange"));var c=a.length;return{stops:a,outerColors:[c?a[0].color:"transparent",c?a[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Mn(Zs.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)"}}),t}(Zs);function cy(r,t,e){if(e[0]===e[1])return e.slice();for(var i=200,n=(e[1]-e[0])/i,a=e[0],o=[],s=0;s<=i&&a<e[1];s++)o.push(a),a+=n;return o.push(e[1]),o}var G1=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return t.prototype.init=function(e,i){this.ecModel=e,this.api=i},t.prototype.render=function(e,i,n,a){if(this.visualMapModel=e,e.get("show")===!1){this.group.removeAll();return}this.doRender(e,i,n,a)},t.prototype.renderBackground=function(e){var i=this.visualMapModel,n=qa(i.get("padding")||0),a=e.getBoundingRect();e.add(new mt({z2:-1,silent:!0,shape:{x:a.x-n[3],y:a.y-n[0],width:a.width+n[3]+n[1],height:a.height+n[0]+n[2]},style:{fill:i.get("backgroundColor"),stroke:i.get("borderColor"),lineWidth:i.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,i,n){n=n||{};var a=n.forceState,o=this.visualMapModel,s={};if(i==="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[a||o.getValueState(e)],c=Ht.prepareVisualTypes(h);return A(c,function(v){var p=h[v];n.convertOpacityToAlpha&&v==="opacity"&&(v="colorAlpha",p=h.__alphaForOpacity),Ht.dependsOn(v,i)&&p&&p.applyVisual(e,u,f)}),s[i]},t.prototype.positionGroup=function(e){var i=this.visualMapModel,n=this.api;_0(e,i.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,i,n,a){},t.type="visualMap",t}(Zt),py=[["left","right","width"],["top","bottom","height"]];function W1(r,t,e){var i=r.option,n=i.align;if(n!=null&&n!=="auto")return n;for(var a={width:t.getWidth(),height:t.getHeight()},o=i.orient==="horizontal"?1:0,s=py[o],l=[0,null,10],u={},f=0;f<3;f++)u[py[1-o][f]]=l[f],u[s[f]]=f===2?e[0]:i[s[f]];var h=[["x","width",3],["y","height",0]][o],c=Je(u,a,i.padding);return s[(c.margin[h[2]]||0)+c[h[0]]+c[h[1]]*.5<a[h[1]]*.5?0:1]}function us(r,t){return A(r||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),r}var We=pt,fR=A,dy=Math.min,vf=Math.max,hR=12,vR=6,cR=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return t.prototype.init=function(e,i){r.prototype.init.call(this,e,i),this._hoverLinkFromSeriesMouseOver=U(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=U(this._hideIndicator,this)},t.prototype.doRender=function(e,i,n,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,i=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(i);var n=e.get("text");this._renderEndsText(i,n,0),this._renderEndsText(i,n,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},t.prototype._renderEndsText=function(e,i,n){if(i){var a=i[1-n];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,f=this._applyTransform([l[0]/2,n===0?-s:l[1]+s],u),h=this._applyTransform(n===0?"bottom":"top",u),c=this._orient,v=this.visualMapModel.textStyleModel;this.group.add(new gt({style:kt(v,{x:f[0],y:f[1],verticalAlign:c==="horizontal"?"middle":h,align:c==="horizontal"?h:"center",text:a})}))}},t.prototype._renderBar=function(e){var i=this.visualMapModel,n=this._shapes,a=i.itemSize,o=this._orient,s=this._useHandle,l=W1(i,this.api,a),u=n.mainGroup=this._createBarGroup(l),f=new ht;u.add(f),f.add(n.outOfRange=gy()),f.add(n.inRange=gy(null,s?my(this._orient):null,U(this._dragHandle,this,"all",!1),U(this._dragHandle,this,"all",!0))),f.setClipPath(new mt({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var h=i.textStyleModel.getTextRect("国"),c=vf(h.width,h.height);s&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(i,u,0,a,c,o),this._createHandle(i,u,1,a,c,o)),this._createIndicator(i,u,a,c,o),e.add(u)},t.prototype._createHandle=function(e,i,n,a,o,s){var l=U(this._dragHandle,this,n,!1),u=U(this._dragHandle,this,n,!0),f=Ke(e.get("handleSize"),a[0]),h=ne(e.get("handleIcon"),-f/2,-f/2,f,f,null,!0),c=my(this._orient);h.attr({cursor:c,draggable:!0,drift:l,ondragend:u,onmousemove:function(y){cr(y.event)}}),h.x=a[0]/2,h.useStyle(e.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),nv(h,!0),i.add(h);var v=this.visualMapModel.textStyleModel,p=new gt({cursor:c,draggable:!0,drift:l,onmousemove:function(y){cr(y.event)},ondragend:u,style:kt(v,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var g=[f,0],d=this._shapes;d.handleThumbs[n]=h,d.handleLabelPoints[n]=g,d.handleLabels[n]=p},t.prototype._createIndicator=function(e,i,n,a,o){var s=Ke(e.get("indicatorSize"),n[0]),l=ne(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof je){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);i.add(l);var h=this.visualMapModel.textStyleModel,c=new gt({silent:!0,invisible:!0,style:kt(h,{x:0,y:0,text:""})});this.group.add(c);var v=[(o==="horizontal"?a/2:vR)+n[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=c,p.indicatorLabelPoint=v,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,i,n,a){if(this._useHandle){if(this._dragging=!i,!i){var o=this._applyTransform([n,a],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}i===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),i?!this._hovering&&this._clearHoverLinkToSeries():yy(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,i=this._dataInterval=e.getSelected(),n=e.getExtent(),a=[0,e.itemSize[1]];this._handleEnds=[We(i[0],n,a,!0),We(i[1],n,a,!0)]},t.prototype._updateInterval=function(e,i){i=i||0;var n=this.visualMapModel,a=this._handleEnds,o=[0,n.itemSize[1]];Ln(i,a,o,e,0);var s=n.getExtent();this._dataInterval=[We(a[0],o,s,!0),We(a[1],o,s,!0)]},t.prototype._updateView=function(e){var i=this.visualMapModel,n=i.getExtent(),a=this._shapes,o=[0,i.itemSize[1]],s=e?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,n,s,"inRange"),u=this._createBarVisual(n,n,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,i,n,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,o),l=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],u=this._createBarPoints(n,l);return{barColor:new sv(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,i){var n=100,a=[],o=(e[1]-e[0])/n;a.push({color:this.getControllerVisual(e[0],"color",i),offset:0});for(var s=1;s<n;s++){var l=e[0]+o*s;if(l>e[1])break;a.push({color:this.getControllerVisual(l,"color",i),offset:s/n})}return a.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),a},t.prototype._createBarPoints=function(e,i){var n=this.visualMapModel.itemSize;return[[n[0]-i[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-i[1],e[1]]]},t.prototype._createBarGroup=function(e){var i=this._orient,n=this.visualMapModel.get("inverse");return new ht(i==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:i==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,i){if(this._useHandle){var n=this._shapes,a=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=a.itemSize,u=a.getExtent();fR([0,1],function(f){var h=o[f];h.setStyle("fill",i.handlesColor[f]),h.y=e[f];var c=We(e[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=Nr(n.handleLabelPoints[f],_i(h,this.group));s[f].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,i,n,a){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(e,"color",c),p=this.getControllerVisual(e,"symbolSize"),g=We(e,s,u,!0),d=l[0]-p/2,y={x:h.x,y:h.y};h.y=g,h.x=d;var m=Nr(f.indicatorLabelPoint,_i(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),w=this._orient,b=w==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(i),verticalAlign:b?S:"middle",align:b?"center":S});var x={x:d,y:g,style:{fill:v}},M={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(x,C),_.animateTo(M,C)}else h.attr(x),_.attr(M);this._firstShowIndicator=!1;var T=this._shapes.handleLabels;if(T)for(var D=0;D<T.length;D++)this.api.enterBlur(T[D])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(i){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,a=e._applyTransform([i.offsetX,i.offsetY],e._shapes.mainGroup,!0,!0);a[1]=dy(vf(0,a[1]),n[1]),e._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,i){var n=this.visualMapModel,a=n.itemSize;if(n.option.hoverLink){var o=[0,a[1]],s=n.getExtent();e=dy(vf(o[0],e),o[1]);var l=pR(n,s,o),u=[e-l,e+l],f=We(e,o,s,!0),h=[We(u[0],o,s,!0),We(u[1],o,s,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var c=this._hoverLinkDataIndices,v=[];(i||yy(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var p=Mw(c,v);this._dispatchHighDown("downplay",us(p[0],n)),this._dispatchHighDown("highlight",us(p[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var i;if(un(e.target,function(l){var u=st(l);if(u.dataIndex!=null)return i=u,!0},!0),!!i){var n=this.ecModel.getSeriesByIndex(i.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(n)){var o=n.getData(i.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),i.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var i=this._shapes.handleLabels;if(i)for(var n=0;n<i.length;n++)this.api.leaveBlur(i[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",us(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,i,n,a){var o=_i(i,a?null:this.group);return V(e)?Nr(e,o,n):ll(e,o,n)},t.prototype._dispatchHighDown=function(e,i){i&&i.length&&this.api.dispatchAction({type:e,batch:i})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(G1);function gy(r,t,e,i){return new Hr({shape:{points:r},draggable:!!e,cursor:t,drift:e,onmousemove:function(n){cr(n.event)},ondragend:i})}function pR(r,t,e){var i=hR/2,n=r.get("hoverLinkDataSize");return n&&(i=We(n,t,e,!0)/2),i}function yy(r){var t=r.get("hoverLinkOnHandle");return!!(t??r.get("realtime"))}function my(r){return r==="vertical"?"ns-resize":"ew-resize"}var dR={type:"selectDataRange",event:"dataRangeSelected",update:"update"},gR=function(r,t){t.eachComponent({mainType:"visualMap",query:r},function(e){e.setSelected(r.selected)})},yR=[{createOnAllSeries:!0,reset:function(r,t){var e=[];return t.eachComponent("visualMap",function(i){var n=r.pipelineContext;!i.isTargetSeries(r)||n&&n.large||e.push(eP(i.stateList,i.targetVisuals,U(i.getValueState,i),i.getDataDimensionIndex(r.getData())))}),e}},{createOnAllSeries:!0,reset:function(r,t){var e=r.getData(),i=[];t.eachComponent("visualMap",function(n){if(n.isTargetSeries(r)){var a=n.getVisualMeta(U(mR,null,r,n))||{stops:[],outerColors:[]},o=n.getDataDimensionIndex(e);o>=0&&(a.dimension=o,i.push(a))}}),r.getData().setVisual("visualMeta",i)}}];function mR(r,t,e,i){for(var n=t.targetVisuals[i],a=Ht.prepareVisualTypes(n),o={color:bl(r.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],f=n[u==="opacity"?"__alphaForOpacity":u];f&&f.applyVisual(e,h,c)}return o.color;function h(v){return o[v]}function c(v,p){o[v]=p}}var _y=A;function _R(r){var t=r&&r.visualMap;V(t)||(t=t?[t]:[]),_y(t,function(e){if(e){tn(e,"splitList")&&!tn(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var i=e.pieces;i&&V(i)&&_y(i,function(n){Y(n)&&(tn(n,"start")&&!tn(n,"min")&&(n.min=n.start),tn(n,"end")&&!tn(n,"max")&&(n.max=n.end))})}})}function tn(r,t){return r&&r.hasOwnProperty&&r.hasOwnProperty(t)}var Sy=!1;function U1(r){Sy||(Sy=!0,r.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(dR,gR),A(yR,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(_R))}function SR(r){r.registerComponentModel(uR),r.registerComponentView(cR),U1(r)}var bR=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,i){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],wR[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var a=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=X(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=H(this._pieceList,function(l){return l=X(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,i={},n=Ht.listVisualTypes(),a=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),A(i,function(s,l){var u=!1;A(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&A(this.stateList,function(f){(e[f]||(e[f]={}))[l]=H1.get(l,f==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,i){var n=this.option,a=this._pieceList,o=(i?n:e).selected||{};if(n.selected=o,A(a,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;A(a,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=X(e)},t.prototype.getValueState=function(e){var i=Ht.findPieceIndex(e,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[],n=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Ht.findPieceIndex(l,n);f===e&&o.push(u)},this),i.push({seriesId:a.id,dataIndex:o})},this),i},t.prototype.getRepresentValue=function(e){var i;if(this.isCategory())i=e.value;else if(e.value!=null)i=e.value;else{var n=e.interval||[];i=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return i},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var i=[],n=["",""],a=this;function o(f,h){var c=a.getRepresentValue({interval:f});h||(h=a.getValueState(c));var v=e(c,h);f[0]===-1/0?n[0]=v:f[1]===1/0?n[1]=v:i.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 A(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:i,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=Mn(Zs.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}),t}(Zs),wR={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),i=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var a=(i[1]-i[0])/n;+a.toFixed(e)!==a&&e<5;)e++;t.precision=e,a=+a.toFixed(e),t.minOpen&&r.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<n;s+=a,o++){var l=o===n-1?i[1]:s+a;r.push({interval:[s,l],close:[1,1]})}t.maxOpen&&r.push({interval:[i[1],1/0],close:[0,0]}),zc(r),A(r,function(u,f){u.index=f,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var t=this.option;A(t.categories,function(e){r.push({text:this.formatValueText(e,!0),value:e})},this),by(t,r)},pieces:function(r){var t=this.option;A(t.pieces,function(e,i){Y(e)||(e={value:e});var n={text:"",index:i};if(e.label!=null&&(n.text=e.label),e.hasOwnProperty("value")){var a=n.value=e.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],s=n.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]=e[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),o[0]===o[1]&&s[0]&&s[1]&&(n.value=o[0])}n.visual=Ht.retrieveVisuals(e),r.push(n)},this),by(t,r),zc(r),A(r,function(e){var i=e.close,n=[["<","≤"][i[1]],[">","≥"][i[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function by(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var xR=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=i.itemSize,f=this._getViewData(),h=f.endsText,c=Ie(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],u,c,l),A(f.viewPieceList,function(v){var p=v.piece,g=new ht;g.onclick=U(this._onItemClick,this,p),this._enableHoverLink(g,v.indexInModelPieceList);var d=i.getRepresentValue(p);if(this._createItemSymbol(g,d,[0,0,u[0],u[1]]),c){var y=this.visualMapModel.getValueState(d);g.add(new gt({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}e.add(g)},this),h&&this._renderEndsText(e,h[1],u,c,l),Si(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,i){var n=this;e.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:us(s.findTargetDataIndices(i),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return W1(e,this.api,e.itemSize);var n=i.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,i,n,a,o){if(i){var s=new ht,l=this.visualMapModel.textStyleModel;s.add(new gt({style:kt(l,{x:a?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:a?o:"center",text:i})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,i=H(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),a=e.get("orient"),o=e.get("inverse");return(a==="horizontal"?o:!o)?i.reverse():n&&(n=n.slice().reverse()),{viewPieceList:i,endsText:n}},t.prototype._createItemSymbol=function(e,i,n){e.add(ne(this.getControllerVisual(i,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(i,"color")))},t.prototype._onItemClick=function(e){var i=this.visualMapModel,n=i.option,a=n.selectedMode;if(a){var o=X(n.selected),s=i.getSelectedMapKey(e);a==="single"||a===!0?(o[s]=!0,A(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})}},t.type="visualMap.piecewise",t}(G1);function TR(r){r.registerComponentModel(bR),r.registerComponentView(xR),U1(r)}function MR(r){Xt(SR),Xt(TR)}var CR=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return Ev(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new ht,n=ne("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(n),n.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=ne(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.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},t}(be);function Y1(r,t,e){var i=r.getBaseAxis(),n=r.getOtherAxis(i),a=AR(n,e),o=i.dim,s=n.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,h=H(r.dimensions,function(p){return t.mapDimension(p)}),c=!1,v=t.getCalculationInfo("stackResultDimension");return Pi(t,h[0])&&(c=!0,h[0]=v),Pi(t,h[1])&&(c=!0,h[1]=v),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function AR(r,t){var e=0,i=r.scale.getExtent();return t==="start"?e=i[0]:t==="end"?e=i[1]:yt(t)&&!isNaN(t)?e=t:i[0]>0?e=i[0]:i[1]<0&&(e=i[1]),e}function Z1(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function DR(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function LR(r,t,e,i,n,a,o,s){for(var l=DR(r,t),u=[],f=[],h=[],c=[],v=[],p=[],g=[],d=Y1(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_<l.length;_++){var S=l[_],w=!0,b=void 0,x=void 0;switch(S.cmd){case"=":b=S.idx*2,x=S.idx1*2;var M=y[b],C=y[b+1],T=m[x],D=m[x+1];(isNaN(M)||isNaN(C))&&(M=T,C=D),u.push(M,C),f.push(T,D),h.push(e[b],e[b+1]),c.push(i[x],i[x+1]),g.push(t.getRawIndex(S.idx1));break;case"+":var L=S.idx,I=d.dataDimsForPoint,P=n.dataToPoint([t.get(I[0],L),t.get(I[1],L)]);x=L*2,u.push(P[0],P[1]),f.push(m[x],m[x+1]);var R=Z1(d,n,t,L);h.push(R[0],R[1]),c.push(i[x],i[x+1]),g.push(t.getRawIndex(L));break;case"-":w=!1}w&&(v.push(S),p.push(p.length))}p.sort(function(St,dt){return g[St]-g[dt]});for(var E=u.length,z=ur(E),k=ur(E),N=ur(E),F=ur(E),G=[],_=0;_<p.length;_++){var Z=p[_],rt=_*2,nt=Z*2;z[rt]=u[nt],z[rt+1]=u[nt+1],k[rt]=f[nt],k[rt+1]=f[nt+1],N[rt]=h[nt],N[rt+1]=h[nt+1],F[rt]=c[nt],F[rt+1]=c[nt+1],G[_]=v[Z]}return{current:z,next:k,stackedOnCurrent:N,stackedOnNext:F,status:G}}var Tr=Math.min,Mr=Math.max;function wi(r,t){return isNaN(r)||isNaN(t)}function Eh(r,t,e,i,n,a,o,s,l){for(var u,f,h,c,v,p,g=e,d=0;d<i;d++){var y=t[g*2],m=t[g*2+1];if(g>=n||g<0)break;if(wi(y,m)){if(l){g+=a;continue}break}if(g===e)r[a>0?"moveTo":"lineTo"](y,m),h=y,c=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){g+=a;continue}if(o>0){for(var w=g+a,b=t[w*2],x=t[w*2+1];b===y&&x===m&&d<i;)d++,w+=a,g+=a,b=t[w*2],x=t[w*2+1],y=t[g*2],m=t[g*2+1],_=y-u,S=m-f;var M=d+1;if(l)for(;wi(b,x)&&M<i;)M++,w+=a,b=t[w*2],x=t[w*2+1];var C=.5,T=0,D=0,L=void 0,I=void 0;if(M>=i||wi(b,x))v=y,p=m;else{T=b-u,D=x-f;var P=y-u,R=b-y,E=m-f,z=x-m,k=void 0,N=void 0;if(s==="x"){k=Math.abs(P),N=Math.abs(R);var F=T>0?1:-1;v=y-F*k*o,p=m,L=y+F*N*o,I=m}else if(s==="y"){k=Math.abs(E),N=Math.abs(z);var G=D>0?1:-1;v=y,p=m-G*k*o,L=y,I=m+G*N*o}else k=Math.sqrt(P*P+E*E),N=Math.sqrt(R*R+z*z),C=N/(N+k),v=y-T*o*(1-C),p=m-D*o*(1-C),L=y+T*o*C,I=m+D*o*C,L=Tr(L,Mr(b,y)),I=Tr(I,Mr(x,m)),L=Mr(L,Tr(b,y)),I=Mr(I,Tr(x,m)),T=L-y,D=I-m,v=y-T*k/N,p=m-D*k/N,v=Tr(v,Mr(u,y)),p=Tr(p,Mr(f,m)),v=Mr(v,Tr(u,y)),p=Mr(p,Tr(f,m)),T=y-v,D=m-p,L=y+T*N/k,I=m+D*N/k}r.bezierCurveTo(h,c,v,p,y,m),h=L,c=I}else r.lineTo(y,m)}u=y,f=m,g+=a}return d}var X1=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),IR=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new X1},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&wi(n[o*2-2],n[o*2-1]);o--);for(;a<o&&wi(n[a*2],n[a*2+1]);a++);}for(;a<o;)a+=Eh(e,n,a,o,o,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},t.prototype.getPointOn=function(e,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path,a=n.data,o=Mi.CMD,s,l,u=i==="x",f=[],h=0;h<a.length;){var c=a[h++],v=void 0,p=void 0,g=void 0,d=void 0,y=void 0,m=void 0,_=void 0;switch(c){case o.M:s=a[h++],l=a[h++];break;case o.L:if(v=a[h++],p=a[h++],_=u?(e-s)/(v-s):(e-l)/(p-l),_<=1&&_>=0){var S=u?(p-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=p;break;case o.C:v=a[h++],p=a[h++],g=a[h++],d=a[h++],y=a[h++],m=a[h++];var w=u?cs(s,v,g,y,e,f):cs(l,p,d,m,e,f);if(w>0)for(var b=0;b<w;b++){var x=f[b];if(x<=1&&x>=0){var S=u?Et(l,p,d,m,x):Et(s,v,g,y,x);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t}(vt),PR=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(X1),RR=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new PR},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&wi(n[s*2-2],n[s*2-1]);s--);for(;o<s&&wi(n[o*2],n[o*2+1]);o++);}for(;o<s;){var u=Eh(e,n,o,s,s,1,i.smooth,l,i.connectNulls);Eh(e,a,o+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),o+=u+1,e.closePath()}},t}(vt);function $1(r,t,e,i,n){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,f=e.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new mt({shape:{x:o,y:s,width:l,height:u}});if(t){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 g=$(n)?function(d){n(d,h)}:null;Ft(h,{shape:{width:l,height:u,x:o,y:s}},e,null,i,g)}return h}function q1(r,t,e){var i=r.getArea(),n=Tt(i.r0,1),a=Tt(i.r,1),o=new Qe({shape:{cx:Tt(r.cx,1),cy:Tt(r.cy,1),r0:n,r:a,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=i.startAngle:o.shape.r=n,Ft(o,{shape:{endAngle:i.endAngle,r:a}},e)}return o}function ER(r,t,e,i,n){if(r){if(r.type==="polar")return q1(r,t,e);if(r.type==="cartesian2d")return $1(r,t,e,i,n)}else return null;return null}function wy(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function xy(r){for(var t=1/0,e=1/0,i=-1/0,n=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),i=Math.max(o,i)),isNaN(s)||(e=Math.min(s,e),n=Math.max(s,n))}return[[t,e],[i,n]]}function Ty(r,t){var e=xy(r),i=e[0],n=e[1],a=xy(t),o=a[0],s=a[1];return Math.max(Math.abs(i[0]-o[0]),Math.abs(i[1]-o[1]),Math.abs(n[0]-s[0]),Math.abs(n[1]-s[1]))}function My(r){return yt(r)?r:r?.5:0}function kR(r,t,e){if(!e.valueDim)return[];for(var i=t.count(),n=ur(i*2),a=0;a<i;a++){var o=Z1(e,r,t,a);n[a*2]=o[0],n[a*2+1]=o[1]}return n}function Cr(r,t,e,i){var n=t.getBaseAxis(),a=n.dim==="x"||n.dim==="radius"?0:1,o=[],s=0,l=[],u=[],f=[],h=[];if(i){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]),e){case"end":l[a]=f[a],l[1-a]=u[1-a],o.push(l[0],l[1]);break;case"middle":var c=(u[a]+f[a])/2,v=[];l[a]=v[a]=c,l[1-a]=u[1-a],v[1-a]=f[1-a],o.push(l[0],l[1]),o.push(v[0],v[1]);break;default:l[a]=u[a],l[1-a]=f[1-a],o.push(l[0],l[1])}return o.push(r[s++],r[s++]),o}function OR(r,t){var e=[],i=r.length,n,a;function o(f,h,c){var v=f.coord,p=(c-v)/(h.coord-v),g=Pb(p,[f.color,h.color]);return{coord:c,color:g}}for(var s=0;s<i;s++){var l=r[s],u=l.coord;if(u<0)n=l;else if(u>t){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function NR(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=H(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=OR(u,n==="x"?e.getWidth():e.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,g=c[0].coord-p,d=c[v-1].coord+p,y=d-g;if(y<.001)return"transparent";A(c,function(_){_.offset=(_.coord-g)/y}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new sv(0,0,0,0,c,!0);return m[n]=g,m[n+"2"]=d,m}}}function BR(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&zR(a,t))){var o=t.mapDimension(a.dim),s={};return A(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function zR(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;o<n;o+=a)if(tc.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>i)return!1;return!0}function VR(r,t){return isNaN(r)||isNaN(t)}function FR(r){for(var t=r.length/2;t>0&&VR(r[t*2-2],r[t*2-1]);t--);return t-1}function Cy(r,t){return[r[t*2],r[t*2+1]]}function HR(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<i;u++)if(o=r[u*2+n],!(isNaN(o)||isNaN(r[u*2+1-n]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function K1(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<re.length;t++)if(r.get([re[t],"endLabel","show"]))return!0;return!1}function cf(r,t,e,i){if(In(t,"cartesian2d")){var n=i.getModel("endLabel"),a=n.get("valueAnimation"),o=i.getData(),s={lastFrameIndex:0},l=K1(i)?function(v,p){r._endLabelOnDuring(v,p,o,s,a,n,t)}:null,u=t.getBaseAxis().isHorizontal(),f=$1(t,e,i,function(){var v=r._endLabel;v&&e&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!i.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 q1(t,e,i)}function GR(r,t){var e=t.getBaseAxis(),i=e.isHorizontal(),n=e.inverse,a=i?n?"right":"left":"center",o=i?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var WR=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new ht,i=new oP;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=e},t.prototype.render=function(e,i,n){var a=this,o=e.coordinateSystem,s=this.group,l=e.getData(),u=e.getModel("lineStyle"),f=e.getModel("areaStyle"),h=l.getLayout("points")||[],c=o.type==="polar",v=this._coordSys,p=this._symbolDraw,g=this._polyline,d=this._polygon,y=this._lineGroup,m=!i.ssr&&e.get("animation"),_=!f.isEmpty(),S=f.get("origin"),w=Y1(o,l,S),b=_&&kR(o,l,w),x=e.get("showSymbol"),M=e.get("connectNulls"),C=x&&!c&&BR(e,l,o),T=this._data;T&&T.eachItemGraphicEl(function(dt,$t){dt.__temp&&(s.remove(dt),T.setItemGraphicEl($t,null))}),x||p.remove(),s.add(y);var D=c?!1:e.get("step"),L;o&&o.getArea&&e.get("clip",!0)&&(L=o.getArea(),L.width!=null?(L.x-=.1,L.y-=.1,L.width+=.2,L.height+=.2):L.r0&&(L.r0-=.5,L.r+=.5)),this._clipShapeForSymbol=L;var I=NR(l,o,n)||l.getVisual("style")[l.getVisual("drawType")];if(!(g&&v.type===o.type&&D===this._step))x&&p.updateData(l,{isIgnore:C,clipShape:L,disableAnimation:!0,getSymbolPoint:function(dt){return[h[dt*2],h[dt*2+1]]}}),m&&this._initSymbolLabelAnimation(l,o,L),D&&(h=Cr(h,o,D,M),b&&(b=Cr(b,o,D,M))),g=this._newPolyline(h),_?d=this._newPolygon(h,b):d&&(y.remove(d),d=this._polygon=null),c||this._initOrUpdateEndLabel(e,o,Li(I)),y.setClipPath(cf(this,o,!0,e));else{_&&!d?d=this._newPolygon(h,b):d&&!_&&(y.remove(d),d=this._polygon=null),c||this._initOrUpdateEndLabel(e,o,Li(I));var P=y.getClipPath();if(P){var R=cf(this,o,!1,e);Ft(P,{shape:R.shape},e)}else y.setClipPath(cf(this,o,!0,e));x&&p.updateData(l,{isIgnore:C,clipShape:L,disableAnimation:!0,getSymbolPoint:function(dt){return[h[dt*2],h[dt*2+1]]}}),(!wy(this._stackedOnPoints,b)||!wy(this._points,h))&&(m?this._doUpdateAnimation(l,b,o,n,D,S,M):(D&&(h=Cr(h,o,D,M),b&&(b=Cr(b,o,D,M))),g.setShape({points:h}),d&&d.setShape({points:h,stackedOnPoints:b})))}var E=e.getModel("emphasis"),z=E.get("focus"),k=E.get("blurScope"),N=E.get("disabled");if(g.useStyle(lt(u.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),Di(g,e,"lineStyle"),g.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var F=g.getState("emphasis").style;F.lineWidth=+g.style.lineWidth+1}st(g).seriesIndex=e.seriesIndex,dr(g,z,k,N);var G=My(e.get("smooth")),Z=e.get("smoothMonotone");if(g.setShape({smooth:G,smoothMonotone:Z,connectNulls:M}),d){var rt=l.getCalculationInfo("stackedOnSeries"),nt=0;d.useStyle(lt(f.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),rt&&(nt=My(rt.get("smooth"))),d.setShape({smooth:G,stackedOnSmooth:nt,smoothMonotone:Z,connectNulls:M}),Di(d,e,"areaStyle"),st(d).seriesIndex=e.seriesIndex,dr(d,z,k,N)}var St=function(dt){a._changePolyState(dt)};l.eachItemGraphicEl(function(dt){dt&&(dt.onHoverStateChange=St)}),this._polyline.onHoverStateChange=St,this._data=l,this._coordSys=o,this._stackedOnPoints=b,this._points=h,this._step=D,this._valueOrigin=S,e.get("triggerLineEvent")&&(this.packEventData(e,g),d&&this.packEventData(e,d))},t.prototype.packEventData=function(e,i){st(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=Ti(o,a);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=e.get("zlevel")||0,v=e.get("z")||0;u=new tc(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 le.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=Ti(o,a);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 le.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;sp(this._polyline,e),i&&sp(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new IR({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new RR({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");$(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=$(h)?h(null):h;e.eachItemGraphicEl(function(v,p){var g=v;if(g){var d=[v.x,v.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,w=i.pointToCoord(d);a?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var b=n;a?(y=b.x,m=b.x+b.width,_=v.x):(y=b.y+b.height,m=b.y,_=v.y)}var x=m===y?0:(_-y)/(m-y);l&&(x=1-x);var M=$(h)?h(p):f*x+c,C=g.getSymbolPath(),T=C.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:M}),T&&T.animateFrom({style:{opacity:0}},{duration:300,delay:M}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(K1(e)){var o=e.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 gt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=FR(l);f>=0&&(Ni(s,Gr(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?E1(o,v):jv(o,h)},enableTextSetter:!0},GR(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),c=n.hostModel,v=c.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,d=l.getBaseAxis(),y=d.isHorizontal(),m=d.inverse,_=i.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?g:0)*(m?-1:1),b=(y?0:-g)*(m?-1:1),x=y?"x":"y",M=HR(h,S,x),C=M.range,T=C[1]-C[0],D=void 0;if(T>=1){if(T>1&&!v){var L=Cy(h,C[0]);u.attr({x:L[0]+w,y:L[1]+b}),o&&(D=c.getRawValue(C[0]))}else{var L=f.getPointOn(S,x);L&&u.attr({x:L[0]+w,y:L[1]+b});var I=c.getRawValue(C[0]),P=c.getRawValue(C[1]);o&&(D=xm(n,p,I,P,M.t))}a.lastFrameIndex=C[0]}else{var R=e===1||a.lastFrameIndex>0?C[0]:0,L=Cy(h,R);o&&(D=c.getRawValue(R)),u.attr({x:L[0]+w,y:L[1]+b})}if(o){var E=Xa(u);typeof E.setLabelText=="function"&&E.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=LR(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=c.current,p=c.stackedOnCurrent,g=c.next,d=c.stackedOnNext;if(o&&(v=Cr(c.current,n,o,l),p=Cr(c.stackedOnCurrent,n,o,l),g=Cr(c.next,n,o,l),d=Cr(c.stackedOnNext,n,o,l)),Ty(v,g)>3e3||f&&Ty(p,d)>3e3){u.stopAnimation(),u.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:d}));return}u.shape.__points=c.current,u.shape.points=v;var y={shape:{points:g}};c.current!==v&&(y.shape.__points=c.next),u.stopAnimation(),At(u,y,h),f&&(f.setShape({points:v,stackedOnPoints:p}),f.stopAnimation(),At(f,{shape:{stackedOnPoints:d}},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 b=e.getItemGraphicEl(_[S].idx1);b&&m.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var x=u.shape.__points,M=0;M<m.length;M++){var C=m[M].el,T=m[M].ptIdx*2;C.x=x[T],C.y=x[T+1],C.markRedraw()}})},t.prototype.remove=function(e){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(a,o){a.__temp&&(i.remove(a),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(le);function UR(r,t){return{seriesType:r,plan:Mv(),reset:function(e){var i=e.getData(),n=e.coordinateSystem;if(e.pipelineContext,!!n){var a=H(n.dimensions,function(h){return i.mapDimension(h)}).slice(0,2),o=a.length,s=i.getCalculationInfo("stackResultDimension");Pi(i,a[0])&&(a[0]=s),Pi(i,a[1])&&(a[1]=s);var l=i.getStore(),u=i.getDimensionIndex(a[0]),f=i.getDimensionIndex(a[1]);return o&&{progress:function(h,c){for(var v=h.end-h.start,p=ur(v*o),g=[],d=[],y=h.start,m=0;y<h.end;y++){var _=void 0;if(o===1){var S=l.get(u,y);_=n.dataToPoint(S,null,d)}else g[0]=l.get(u,y),g[1]=l.get(f,y),_=n.dataToPoint(g,null,d);p[m++]=_[0],p[m++]=_[1]}c.setLayout("points",p)}}}}}}var YR={average:function(r){for(var t=0,e=0,i=0;i<r.length;i++)isNaN(r[i])||(t+=r[i],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},minmax:function(r){for(var t=-1/0,e=-1/0,i=0;i<r.length;i++){var n=r[i],a=Math.abs(n);a>t&&(t=a,e=n)}return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},ZR=function(r){return Math.round(r.length/2)};function Q1(r){return{seriesType:r,reset:function(t,e,i){var n=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"&&t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v));var p=void 0;W(a)?p=YR[a]:$(a)&&(p=a),p&&t.setData(n.downSample(n.mapDimension(u.dim),1/v,p,ZR))}}}}}function XR(r){r.registerChartView(WR),r.registerSeriesModel(CR),r.registerLayout(UR("line")),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Q1("line"))}var kh=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Ev(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)A(a.getAxes(),function(c,v){if(c.type==="category"&&i!=null){var p=c.getTicksCoords(),g=c.getTickModel().get("alignWithLabel"),d=o[v],y=i[v]==="x1"||i[v]==="y1";if(y&&!g&&(d+=1),p.length<2)return;if(p.length===2){s[v]=c.toGlobalCoord(c.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,w=0;w<p.length;w++){var b=p[w].coord,x=w===p.length-1?p[w-1].tickValue+S:p[w].tickValue;if(x===d){_=b;break}else if(x<d)m=b;else if(m!=null&&x>d){_=(b+m)/2;break}w===1&&(S=x-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(be);be.registerClass(kh);var $R=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Ev(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>e&&(e=i),e},t.prototype.brushSelector=function(e,i,n){return n.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Mn(kh.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}),t}(kh),qR=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}(),Xs=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new qR},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,h=i.endAngle,c=i.clockwise,v=Math.PI*2,p=c?h-f<v:f-h<v;p||(f=h-(c?v:-v));var g=Math.cos(f),d=Math.sin(f),y=Math.cos(h),m=Math.sin(h);p?(e.moveTo(g*o+n,d*o+a),e.arc(g*u+n,d*u+a,l,-Math.PI+f,f,!c)):e.moveTo(g*s+n,d*s+a),e.arc(n,a,s,f,h,!c),e.arc(y*u+n,m*u+a,l,h-Math.PI*2,h-Math.PI,!c),o!==0&&e.arc(n,a,o,h,f,c)},t}(vt);function KR(r,t){t=t||{};var e=t.isRoundCap;return function(i,n,a){var o=n.position;if(!o||o instanceof Array)return ms(i,n,a);var s=r(o),l=n.distance!=null?n.distance:5,u=this.shape,f=u.cx,h=u.cy,c=u.r,v=u.r0,p=(c+v)/2,g=u.startAngle,d=u.endAngle,y=(g+d)/2,m=e?Math.abs(c-v)/2:0,_=Math.cos,S=Math.sin,w=f+c*_(g),b=h+c*S(g),x="left",M="top";switch(s){case"startArc":w=f+(v-l)*_(y),b=h+(v-l)*S(y),x="center",M="top";break;case"insideStartArc":w=f+(v+l)*_(y),b=h+(v+l)*S(y),x="center",M="bottom";break;case"startAngle":w=f+p*_(g)+Go(g,l+m,!1),b=h+p*S(g)+Wo(g,l+m,!1),x="right",M="middle";break;case"insideStartAngle":w=f+p*_(g)+Go(g,-l+m,!1),b=h+p*S(g)+Wo(g,-l+m,!1),x="left",M="middle";break;case"middle":w=f+p*_(y),b=h+p*S(y),x="center",M="middle";break;case"endArc":w=f+(c+l)*_(y),b=h+(c+l)*S(y),x="center",M="bottom";break;case"insideEndArc":w=f+(c-l)*_(y),b=h+(c-l)*S(y),x="center",M="top";break;case"endAngle":w=f+p*_(d)+Go(d,l+m,!0),b=h+p*S(d)+Wo(d,l+m,!0),x="left",M="middle";break;case"insideEndAngle":w=f+p*_(d)+Go(d,-l+m,!0),b=h+p*S(d)+Wo(d,-l+m,!0),x="right",M="middle";break;default:return ms(i,n,a)}return i=i||{},i.x=w,i.y=b,i.align=x,i.verticalAlign=M,i}}function QR(r,t,e,i){if(yt(i)){r.setTextConfig({rotation:i});return}else if(V(t)){r.setTextConfig({rotation:0});return}var n=r.shape,a=n.clockwise?n.startAngle:n.endAngle,o=n.clockwise?n.endAngle:n.startAngle,s=(a+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;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 Go(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Wo(r,t,e){return t*Math.cos(r)*(e?1:-1)}function ha(r,t,e){var i=r.get("borderRadius");if(i==null)return e?{cornerRadius:0}:null;V(i)||(i=[i,i,i,i]);var n=Math.abs(t.r||0-t.r0||0);return{cornerRadius:H(i,function(a){return Ke(a,n)})}}var pf=Math.max,df=Math.min;function JR(r,t){var e=r.getArea&&r.getArea();if(In(r,"cartesian2d")){var i=r.getBaseAxis();if(i.type!=="category"||!i.onBand){var n=t.getLayout("bandWidth");i.isHorizontal()?(e.x-=n,e.width+=n*2):(e.y-=n,e.height+=n*2)}}return e}var jR=function(r){O(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,i,n,a){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,i,n):this._renderNormal(e,i,n,a))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,i){this._progressiveEls=[],this._incrementalRenderLarge(e,i)},t.prototype.eachRendered=function(e){Za(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var i=e.pipelineContext.large;(this._isLargeDraw==null||i!==this._isLargeDraw)&&(this._isLargeDraw=i,this._clear())},t.prototype._renderNormal=function(e,i,n,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.getBaseAxis(),h;u.type==="cartesian2d"?h=f.isHorizontal():u.type==="polar"&&(h=f.dim==="angle");var c=e.isAnimationEnabled()?e:null,v=tE(e,u);v&&this._enableRealtimeSort(v,s,n);var p=e.get("clip",!0)||v,g=JR(u,s);o.removeClipPath();var d=e.get("roundCap",!0),y=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),_=m.get("borderRadius")||0,S=[],w=this._backgroundEls,b=a&&a.isInitSort,x=a&&a.type==="changeAxisOrder";function M(D){var L=Uo[u.type](s,D),I=sE(u,h,L);return I.useStyle(m.getItemStyle()),u.type==="cartesian2d"?I.setShape("r",_):I.setShape("cornerRadius",_),S[D]=I,I}s.diff(l).add(function(D){var L=s.getItemModel(D),I=Uo[u.type](s,D,L);if(y&&M(D),!(!s.hasValue(D)||!Py[u.type](I))){var P=!1;p&&(P=Ay[u.type](g,I));var R=Dy[u.type](e,s,D,I,h,c,f.model,!1,d);v&&(R.forceLabelAnimation=!0),Ry(R,s,D,L,I,e,h,u.type==="polar"),b?R.attr({shape:I}):v?Ly(v,c,R,I,D,h,!1,!1):Ft(R,{shape:I},e,D),s.setItemGraphicEl(D,R),o.add(R),R.ignore=P}}).update(function(D,L){var I=s.getItemModel(D),P=Uo[u.type](s,D,I);if(y){var R=void 0;w.length===0?R=M(L):(R=w[L],R.useStyle(m.getItemStyle()),u.type==="cartesian2d"?R.setShape("r",_):R.setShape("cornerRadius",_),S[D]=R);var E=Uo[u.type](s,D),z=j1(h,E,u);At(R,{shape:z},c,D)}var k=l.getItemGraphicEl(L);if(!s.hasValue(D)||!Py[u.type](P)){o.remove(k);return}var N=!1;if(p&&(N=Ay[u.type](g,P),N&&o.remove(k)),k?uv(k):k=Dy[u.type](e,s,D,P,h,c,f.model,!!k,d),v&&(k.forceLabelAnimation=!0),x){var F=k.getTextContent();if(F){var G=Xa(F);G.prevValue!=null&&(G.prevValue=G.value)}}else Ry(k,s,D,I,P,e,h,u.type==="polar");b?k.attr({shape:P}):v?Ly(v,c,k,P,D,h,!0,x):At(k,{shape:P},e,D,null),s.setItemGraphicEl(D,k),k.ignore=N,o.add(k)}).remove(function(D){var L=l.getItemGraphicEl(D);L&&As(L,e,D)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new ht);C.removeAll();for(var T=0;T<S.length;++T)C.add(S[T]);o.add(C),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(e,i,n){this._clear(),ky(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,i){this._removeBackground(),ky(i,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var i=e.get("clip",!0)&&ER(e.coordinateSystem,!1,e),n=this.group;i?n.setClipPath(i):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,i,n){var a=this;if(i.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,e,n),this._isFirstFrame=!1;else{var s=function(l){var u=i.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(i,s,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,i,n){var a=[];return e.each(e.mapDimension(i.dim),function(o,s){var l=n(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:H(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,i,n){for(var a=n.scale,o=e.mapDimension(n.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var f=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=f<0?Number.MIN_VALUE:i(e.indexOfRawIndex(f));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){As(a,e,st(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(le),Ay={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,a=r.y+r.height,o=pf(t.x,r.x),s=df(t.x+t.width,n),l=pf(t.y,r.y),u=df(t.y+t.height,a),f=s<o,h=u<l;return t.x=f&&o>n?s:o,t.y=h&&l>a?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=df(t.r,r.r),a=pf(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},Dy={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new mt({shape:B({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?Xs:Qe,f=new u({shape:i,z2:1});f.name="item";var h=J1(n);if(f.calculateTextPosition=KR(h,{isRoundCap:u===Xs}),a){var c=f.shape,v=n?"r":"endAngle",p={};c[v]=n?i.r0:i.startAngle,p[v]=i[v],(s?At:Ft)(f,{shape:p},a)}return f}};function tE(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function Ly(r,t,e,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?At:Ft)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?At:Ft)(e,{shape:u},f,n)}function Iy(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var eE=["x","y","width","height"],rE=["cx","cy","r","startAngle","endAngle"],Py={cartesian2d:function(r){return!Iy(r,eE)},polar:function(r){return!Iy(r,rE)}},Uo={cartesian2d:function(r,t,e){var i=r.getItemLayout(t),n=e?nE(e,i):0,a=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function iE(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function J1(r){return function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}}(r)}function Ry(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=ha(i.getModel("itemStyle"),f,!0);B(f,h),r.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=i.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=Gr(i);Ni(r,p,{labelFetcher:a,labelDataIndex:e,defaultText:jv(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=r.getTextContent();if(s&&g){var d=i.get(["label","position"]);r.textConfig.inside=d==="middle"?!0:null,QR(r,d==="outside"?v:d,J1(o),i.get(["label","rotate"]))}i0(g,p,a.getRawValue(e),function(m){return E1(t,m)});var y=i.getModel(["emphasis"]);dr(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Di(r,i),iE(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function nE(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var aE=function(){function r(){}return r}(),Ey=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new aE},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<n.length;f+=3)l[a]=u,l[o]=n[f+2],s[a]=n[f+a],s[o]=n[f+o],e.rect(s[0],s[1],l[0],l[1])},t}(vt);function ky(r,t,e,i){var n=r.getData(),a=n.getLayout("valueAxisHorizontal")?1:0,o=n.getLayout("largeDataIndices"),s=n.getLayout("size"),l=r.getModel("backgroundStyle"),u=n.getLayout("largeBackgroundPoints");if(u){var f=new Ey({shape:{points:u},incremental:!!i,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new Ey({shape:{points:n.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(n.getVisual("style")),st(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",Oy),h.on("mousemove",Oy)),e&&e.push(h)}var Oy=_l(function(r){var t=this,e=oE(t,r.offsetX,r.offsetY);st(t).dataIndex=e>=0?e:null},30,!1);function oE(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f<h;f++){var c=f*3;if(l[i]=u,l[n]=a[c+2],s[i]=a[c+i],s[n]=a[c+n],l[n]<0&&(s[n]+=l[n],l[n]=-l[n]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function j1(r,t,e){if(In(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function sE(r,t,e){var i=r.type==="polar"?Qe:mt;return new i({shape:j1(t,e,r),silent:!0,z2:0})}function lE(r){r.registerChartView(jR),r.registerSeriesModel($R),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,it(wD,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,xD("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Q1("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var Ny=Math.PI*2,Yo=Math.PI/180;function tS(r,t){return Je(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function eS(r,t){var e=tS(r,t),i=r.get("center"),n=r.get("radius");V(n)||(n=[0,n]);var a=q(e.width,t.getWidth()),o=q(e.height,t.getHeight()),s=Math.min(a,o),l=q(n[0],s/2),u=q(n[1],s/2),f,h,c=r.coordinateSystem;if(c){var v=c.dataToPoint(i);f=v[0]||0,h=v[1]||0}else V(i)||(i=[i,i]),f=q(i[0],a)+e.x,h=q(i[1],o)+e.y;return{cx:f,cy:h,r0:l,r:u}}function uE(r,t,e){t.eachSeriesByType(r,function(i){var n=i.getData(),a=n.mapDimension("value"),o=tS(i,e),s=eS(i,e),l=s.cx,u=s.cy,f=s.r,h=s.r0,c=-i.get("startAngle")*Yo,v=i.get("endAngle"),p=i.get("padAngle")*Yo;v=v==="auto"?c-Ny:-v*Yo;var g=i.get("minAngle")*Yo,d=g+p,y=0;n.each(a,function(z){!isNaN(z)&&y++});var m=n.getSum(a),_=Math.PI/(m||y)*2,S=i.get("clockwise"),w=i.get("roseType"),b=i.get("stillShowZeroSum"),x=n.getDataExtent(a);x[0]=0;var M=S?1:-1,C=[c,v],T=M*p/2;Jh(C,!S),c=C[0],v=C[1];var D=rS(i);D.startAngle=c,D.endAngle=v,D.clockwise=S;var L=Math.abs(v-c),I=L,P=0,R=c;if(n.setLayout({viewRect:o,r:f}),n.each(a,function(z,k){var N;if(isNaN(z)){n.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:h,r:w?NaN:f});return}w!=="area"?N=m===0&&b?_:z*_:N=L/y,N<d?(N=d,I-=d):P+=z;var F=R+M*N,G=0,Z=0;p>N?(G=R+M*N/2,Z=G):(G=R+T,Z=F-T),n.setItemLayout(k,{angle:N,startAngle:G,endAngle:Z,clockwise:S,cx:l,cy:u,r0:h,r:w?pt(z,x,[h,f]):f}),R=F}),I<Ny&&y)if(I<=.001){var E=L/y;n.each(a,function(z,k){if(!isNaN(z)){var N=n.getItemLayout(k);N.angle=E;var F=0,G=0;E<p?(F=c+M*(k+1/2)*E,G=F):(F=c+M*k*E+T,G=c+M*(k+1)*E-T),N.startAngle=F,N.endAngle=G}})}else _=I/P,R=c,n.each(a,function(z,k){if(!isNaN(z)){var N=n.getItemLayout(k),F=N.angle===d?d:z*_,G=0,Z=0;F<p?(G=R+M*F/2,Z=G):(G=R+T,Z=R+M*F-T),N.startAngle=G,N.endAngle=Z,R+=M*F}})})}var rS=_t();function fE(r){return{seriesType:r,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(!(!i||!i.length)){var n=t.getData();n.filterSelf(function(a){for(var o=n.getName(a),s=0;s<i.length;s++)if(!i[s].isSelected(o))return!1;return!0})}}}}var hE=Math.PI/180;function By(r,t,e,i,n,a,o,s,l,u){if(r.length<2)return;function f(g){for(var d=g.rB,y=d*d,m=0;m<g.list.length;m++){var _=g.list[m],S=Math.abs(_.label.y-e),w=i+_.len,b=w*w,x=Math.sqrt((1-Math.abs(S*S/y))*b),M=t+(x+_.len2)*n,C=M-_.label.x,T=_.targetTextWidth-C*n;iS(_,T,!0),_.label.x=M}}function h(g){for(var d={list:[],maxY:0},y={list:[],maxY:0},m=0;m<g.length;m++)if(g[m].labelAlignTo==="none"){var _=g[m],S=_.label.y>e?y:d,w=Math.abs(_.label.y-e);if(w>=S.maxY){var b=_.label.x-t-_.len2*n,x=i+_.len,M=Math.abs(b)<x?Math.sqrt(w*w/(1-b*b/x/x)):x;S.rB=M,S.maxY=w}S.list.push(_)}f(d),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}fL(r,l,l+o)&&h(r)}function vE(r,t,e,i,n,a,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;gf(r[c])||(v.x<t?(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(!gf(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var v=p.label,g=p.linePoints,d=void 0;p.labelAlignTo==="edge"?v.x<t?d=g[2][0]-p.labelDistance-o-p.edgeDistance:d=o+n-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?v.x<t?d=f-o-p.bleedMargin:d=o+n-h-p.bleedMargin:v.x<t?d=v.x-o-p.bleedMargin:d=o+n-v.x-p.bleedMargin,p.targetTextWidth=d,iS(p,d)}}By(u,t,e,i,1,n,a,o,s,h),By(l,t,e,i,-1,n,a,o,s,f);for(var c=0;c<r.length;c++){var p=r[c];if(!gf(p)&&p.linePoints){var v=p.label,g=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,b=g[1][0]-g[2][0];y?v.x<t?g[2][0]=o+p.edgeDistance+w+p.labelDistance:g[2][0]=o+n-p.edgeDistance-w-p.labelDistance:(v.x<t?g[2][0]=v.x+p.labelDistance:g[2][0]=v.x-p.labelDistance,g[1][0]=g[2][0]+b),g[1][1]=g[2][1]=v.y}}}function iS(r,t,e){if(e===void 0&&(e=!1),r.labelStyleWidth==null){var i=r.label,n=i.style,a=r.rect,o=n.backgroundColor,s=n.padding,l=s?s[1]+s[3]:0,u=n.overflow,f=a.width+(o?0:l);if(t<f||e){var h=a.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",t-l);var c=i.getBoundingRect();i.setStyle("width",Math.ceil(c.width)),i.setStyle("backgroundColor",o)}else{var v=t-l,p=t<f?v:e?v>r.unconstrainedWidth?null:v:null;i.setStyle("width",p)}var g=i.getBoundingRect();a.width=g.width;var d=(i.style.margin||0)+2.1;a.height=g.height+d,a.y-=(a.height-h)/2}}}function gf(r){return r.position==="center"}function cE(r){var t=r.getData(),e=[],i,n,a=!1,o=(r.get("minShowLabelAngle")||0)*hE,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,h=s.y,c=s.height;function v(b){b.ignore=!0}function p(b){if(!b.ignore)return!0;for(var x in b.states)if(b.states[x].ignore===!1)return!0;return!1}t.each(function(b){var x=t.getItemGraphicEl(b),M=x.shape,C=x.getTextContent(),T=x.getTextGuideLine(),D=t.getItemModel(b),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=q(L.get("edgeDistance"),u),z=L.get("bleedMargin"),k=D.getModel("labelLine"),N=k.get("length");N=q(N,u);var F=k.get("length2");if(F=q(F,u),Math.abs(M.endAngle-M.startAngle)<o){A(C.states,v),C.ignore=!0,T&&(A(T.states,v),T.ignore=!0);return}if(p(C)){var G=(M.startAngle+M.endAngle)/2,Z=Math.cos(G),rt=Math.sin(G),nt,St,dt,$t;i=M.cx,n=M.cy;var ae=I==="inside"||I==="inner";if(I==="center")nt=M.cx,St=M.cy,$t="center";else{var It=(ae?(M.r+M.r0)/2*Z:M.r*Z)+i,Mt=(ae?(M.r+M.r0)/2*rt:M.r*rt)+n;if(nt=It+Z*3,St=Mt+rt*3,!ae){var J=It+Z*(N+l-M.r),at=Mt+rt*(N+l-M.r),ze=J+(Z<0?-1:1)*F,Dt=at;R==="edge"?nt=Z<0?f+E:f+u-E:nt=ze+(Z<0?-P:P),St=Dt,dt=[[It,Mt],[J,at],[ze,Dt]]}$t=ae?"center":R==="edge"?Z>0?"right":"left":Z>0?"left":"right"}var yr=Math.PI,ir=0,Pn=L.get("rotate");if(yt(Pn))ir=Pn*(yr/180);else if(I==="center")ir=0;else if(Pn==="radial"||Pn===!0){var lS=Z<0?-G+yr:-G;ir=lS}else if(Pn==="tangential"&&I!=="outside"&&I!=="outer"){var zi=Math.atan2(Z,rt);zi<0&&(zi=yr*2+zi);var uS=rt>0;uS&&(zi=yr+zi),ir=zi-yr}if(a=!!ir,C.x=nt,C.y=St,C.rotation=ir,C.setStyle({verticalAlign:"middle"}),ae){C.setStyle({align:$t});var Ll=C.states.select;Ll&&(Ll.x+=C.x,Ll.y+=C.y)}else{var Rn=C.getBoundingRect().clone();Rn.applyTransform(C.getComputedTransform());var ic=(C.style.margin||0)+2.1;Rn.y-=ic/2,Rn.height+=ic,e.push({label:C,labelLine:T,position:I,len:N,len2:F,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new j(Z,rt),linePoints:dt,textAlign:$t,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:z,rect:Rn,unconstrainedWidth:Rn.width,labelStyleWidth:C.style.width})}x.setTextConfig({inside:ae})}}),!a&&r.get("avoidLabelOverlap")&&vE(e,i,n,l,u,c,f,h);for(var g=0;g<e.length;g++){var d=e[g],y=d.label,m=d.labelLine,_=isNaN(y.x)||isNaN(y.y);if(y){y.setStyle({align:d.textAlign}),_&&(A(y.states,v),y.ignore=!0);var S=y.states.select;S&&(S.x+=y.x,S.y+=y.y)}if(m){var w=d.linePoints;_||!w?(A(m.states,v),m.ignore=!0):(iL(w,d.minTurnAngle),nL(w,d.surfaceNormal,d.maxSurfaceAngle),m.setShape({points:w}),y.__hostTarget.textGuideLineConfig={anchor:new j(w[0][0],w[0][1])})}}}var pE=function(r){O(t,r);function t(e,i,n){var a=r.call(this)||this;a.z2=2;var o=new gt;return a.setTextContent(o),a.updateData(e,i,n,!0),a}return t.prototype.updateData=function(e,i,n,a){var o=this,s=e.hostModel,l=e.getItemModel(i),u=l.getModel("emphasis"),f=e.getItemLayout(i),h=B(ha(l.getModel("itemStyle"),f,!0),f);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var c=s.getShallow("animationType");s.ecModel.ssr?(Ft(o,{scaleX:0,scaleY:0},s,{dataIndex:i,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):c==="scale"?(o.shape.r=f.r0,Ft(o,{shape:{r:f.r}},s,i)):n!=null?(o.setShape({startAngle:n,endAngle:n}),Ft(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,i)):(o.shape.endAngle=f.startAngle,At(o,{shape:{endAngle:f.endAngle}},s,i))}else uv(o),At(o,{shape:h},s,i);o.useStyle(e.getItemVisual(i,"style")),Di(o,l);var v=(f.startAngle+f.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(v)*p,d=Math.sin(v)*p,y=l.getShallow("cursor");y&&o.attr("cursor",y),this._updateLabel(s,e,i),o.ensureState("emphasis").shape=B({r:f.r+(u.get("scale")&&u.get("scaleSize")||0)},ha(u.getModel("itemStyle"),f)),B(o.ensureState("select"),{x:g,y:d,shape:ha(l.getModel(["select","itemStyle"]),f)}),B(o.ensureState("blur"),{shape:ha(l.getModel(["blur","itemStyle"]),f)});var m=o.getTextGuideLine(),_=o.getTextContent();m&&B(m.ensureState("select"),{x:g,y:d}),B(_.ensureState("select"),{x:g,y:d}),dr(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,i,n){var a=this,o=i.getItemModel(n),s=o.getModel("labelLine"),l=i.getItemVisual(n,"style"),u=l&&l.fill,f=l&&l.opacity;Ni(a,Gr(o),{labelFetcher:i.hostModel,labelDataIndex:n,inheritColor:u,defaultOpacity:f,defaultText:e.getFormattedLabel(n,"normal")||i.getName(n)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var c=e.get(["label","position"]);if(c!=="outside"&&c!=="outer")a.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new Oi,this.setTextGuideLine(v)),oL(this,sL(o),{stroke:u,opacity:va(s.get(["lineStyle","opacity"]),f,1)})}},t}(Qe),dE=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,i,n,a){var o=e.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&&e.get("showEmptyCircle")){var c=rS(e),v=new Qe({shape:B(eS(e,n),c)});v.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=v,l.add(v)}o.diff(s).add(function(p){var g=new pE(o,p,u);o.setItemGraphicEl(p,g),l.add(g)}).update(function(p,g){var d=s.getItemGraphicEl(g);d.updateData(o,p,u),d.off("click"),l.add(d),o.setItemGraphicEl(p,d)}).remove(function(p){var g=s.getItemGraphicEl(p);As(g,e,p)}).execute(),cE(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,i){var n=i.getData(),a=n.getItemLayout(0);if(a){var o=e[0]-a.cx,s=e[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},t.type="pie",t}(le);function nS(r,t,e){t=V(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var i=r.getSource(),n=D_(i,t).dimensions,a=new bi(n,r);return a.initData(i,e),a}var gE=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var i=this._getDataWithEncodedVisual();return i.getItemVisual(t,e)},r}(),yE=_t(),mE=function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new gE(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nS(this,{coordDimensions:["value"],encodeDefaulter:it(fM,this)})},t.prototype.getDataParams=function(e){var i=this.getData(),n=yE(i),a=n.seats;if(!a){var o=[];i.each(i.mapDimension("value"),function(l){o.push(l)}),a=n.seats=uw(o,i.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=a[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){bs(e,"labelLine",["show"]);var i=e.labelLine,n=e.emphasis.labelLine;i.show=i.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,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"},t}(be);function _E(r){return{seriesType:r,reset:function(t,e){var i=t.getData();i.filterSelf(function(n){var a=i.mapDimension("value"),o=i.get(a,n);return!(yt(o)&&!isNaN(o)&&o<0)})}}}function SE(r){r.registerChartView(dE),r.registerSeriesModel(mE),UC("pie",r.registerAction),r.registerLayout(it(uE,"pie")),r.registerProcessor(fE("pie")),r.registerProcessor(_E("pie"))}var bE=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),wE=function(r){O(t,r);function t(e){var i=r.call(this,e)||this;return i.type="pointer",i}return t.prototype.getDefaultShape=function(){return new bE},t.prototype.buildPath=function(e,i){var n=Math.cos,a=Math.sin,o=i.r,s=i.width,l=i.angle,u=i.x-n(l)*s*(s>=o/3?1:2),f=i.y-a(l)*s*(s>=o/3?1:2);l=i.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(i.x+n(l)*s,i.y+a(l)*s),e.lineTo(i.x+n(i.angle)*o,i.y+a(i.angle)*o),e.lineTo(i.x-n(l)*s,i.y-a(l)*s),e.lineTo(u,f)},t}(vt);function xE(r,t){var e=r.get("center"),i=t.getWidth(),n=t.getHeight(),a=Math.min(i,n),o=q(e[0],t.getWidth()),s=q(e[1],t.getHeight()),l=q(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Zo(r,t){var e=r==null?"":r+"";return t&&(W(t)?e=t.replace("{value}",e):$(t)&&(e=t(r))),e}var TE=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){this.group.removeAll();var a=e.get(["axisLine","lineStyle","color"]),o=xE(e,n);this._renderMain(e,i,n,a,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,i,n,a,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,h=e.getModel("axisLine"),c=h.get("roundCap"),v=c?Xs:Qe,p=h.get("show"),g=h.getModel("lineStyle"),d=g.get("width"),y=[u,f];Jh(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],w=0;p&&w<a.length;w++){var b=Math.min(Math.max(a[w][0],0),1);f=u+m*b;var x=new v({shape:{startAngle:_,endAngle:f,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-d,r:o.r},silent:!0});x.setStyle({fill:a[w][1]}),x.setStyle(g.getLineStyle(["color","width"])),S.push(x),_=f}S.reverse(),A(S,function(C){return s.add(C)});var M=function(C){if(C<=0)return a[0][1];var T;for(T=0;T<a.length;T++)if(a[T][0]>=C&&(T===0?0:a[T-1][0])<C)return a[T][1];return a[T-1][1]};this._renderTicks(e,i,n,M,o,u,f,l,d),this._renderTitleAndDetail(e,i,n,M,o),this._renderAnchor(e,o),this._renderPointer(e,i,n,M,o,u,f,l,d)},t.prototype._renderTicks=function(e,i,n,a,o,s,l,u,f){for(var h=this.group,c=o.cx,v=o.cy,p=o.r,g=+e.get("min"),d=+e.get("max"),y=e.getModel("splitLine"),m=e.getModel("axisTick"),_=e.getModel("axisLabel"),S=e.get("splitNumber"),w=m.get("splitNumber"),b=q(y.get("length"),p),x=q(m.get("length"),p),M=s,C=(l-s)/S,T=C/w,D=y.getModel("lineStyle").getLineStyle(),L=m.getModel("lineStyle").getLineStyle(),I=y.get("distance"),P,R,E=0;E<=S;E++){if(P=Math.cos(M),R=Math.sin(M),y.get("show")){var z=I?I+f:f,k=new ke({shape:{x1:P*(p-z)+c,y1:R*(p-z)+v,x2:P*(p-b-z)+c,y2:R*(p-b-z)+v},style:D,silent:!0});D.stroke==="auto"&&k.setStyle({stroke:a(E/S)}),h.add(k)}if(_.get("show")){var z=_.get("distance")+I,N=Zo(Tt(E/S*(d-g)+g),_.get("formatter")),F=a(E/S),G=P*(p-b-z)+c,Z=R*(p-b-z)+v,rt=_.get("rotate"),nt=0;rt==="radial"?(nt=-M+2*Math.PI,nt>Math.PI/2&&(nt+=Math.PI)):rt==="tangential"?nt=-M-Math.PI/2:yt(rt)&&(nt=rt*Math.PI/180),nt===0?h.add(new gt({style:kt(_,{text:N,x:G,y:Z,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:F}),silent:!0})):h.add(new gt({style:kt(_,{text:N,x:G,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:G,originY:Z,rotation:nt}))}if(m.get("show")&&E!==S){var z=m.get("distance");z=z?z+f:f;for(var St=0;St<=w;St++){P=Math.cos(M),R=Math.sin(M);var dt=new ke({shape:{x1:P*(p-z)+c,y1:R*(p-z)+v,x2:P*(p-x-z)+c,y2:R*(p-x-z)+v},silent:!0,style:L});L.stroke==="auto"&&dt.setStyle({stroke:a((E+St/w)/S)}),h.add(dt),M+=T}M-=T}else M+=C}},t.prototype._renderPointer=function(e,i,n,a,o,s,l,u,f){var h=this.group,c=this._data,v=this._progressEls,p=[],g=e.get(["pointer","show"]),d=e.getModel("progress"),y=d.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),w=+e.get("max"),b=[S,w],x=[s,l];function M(T,D){var L=m.getItemModel(T),I=L.getModel("pointer"),P=q(I.get("width"),o.r),R=q(I.get("length"),o.r),E=e.get(["pointer","icon"]),z=I.get("offsetCenter"),k=q(z[0],o.r),N=q(z[1],o.r),F=I.get("keepAspect"),G;return E?G=ne(E,k-P/2,N-R,P,R,null,F):G=new wE({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:N}}),G.rotation=-(D+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function C(T,D){var L=d.get("roundCap"),I=L?Xs:Qe,P=d.get("overlap"),R=P?d.get("width"):f/m.count(),E=P?o.r-R:o.r-(T+1)*R,z=P?o.r:o.r-T*R,k=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:z}});return P&&(k.z2=w-m.get(_,T)%w),k}(y||g)&&(m.diff(c).add(function(T){var D=m.get(_,T);if(g){var L=M(T,s);Ft(L,{rotation:-((isNaN(+D)?x[0]:pt(D,b,x,!0))+Math.PI/2)},e),h.add(L),m.setItemGraphicEl(T,L)}if(y){var I=C(T,s),P=d.get("clip");Ft(I,{shape:{endAngle:pt(D,b,x,P)}},e),h.add(I),Hf(e.seriesIndex,m.dataType,T,I),p[T]=I}}).update(function(T,D){var L=m.get(_,T);if(g){var I=c.getItemGraphicEl(D),P=I?I.rotation:s,R=M(T,P);R.rotation=P,At(R,{rotation:-((isNaN(+L)?x[0]:pt(L,b,x,!0))+Math.PI/2)},e),h.add(R),m.setItemGraphicEl(T,R)}if(y){var E=v[D],z=E?E.shape.endAngle:s,k=C(T,z),N=d.get("clip");At(k,{shape:{endAngle:pt(L,b,x,N)}},e),h.add(k),Hf(e.seriesIndex,m.dataType,T,k),p[T]=k}}).execute(),m.each(function(T){var D=m.getItemModel(T),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(g){var E=m.getItemGraphicEl(T),z=m.getItemVisual(T,"style"),k=z.fill;if(E instanceof je){var N=E.style;E.useStyle(B({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},z))}else E.useStyle(z),E.type!=="pointer"&&E.setColor(k);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",a(pt(m.get(_,T),b,[0,1],!0))),E.z2EmphasisLift=0,Di(E,D),dr(E,I,P,R)}if(y){var F=p[T];F.useStyle(m.getItemVisual(T,"style")),F.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,Di(F,D),dr(F,I,P,R)}}),this._progressEls=p)},t.prototype._renderAnchor=function(e,i){var n=e.getModel("anchor"),a=n.get("show");if(a){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=ne(s,i.cx-o/2+q(l[0],i.r),i.cy-o/2+q(l[1],i.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,i,n,a,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),h=+e.get("max"),c=new ht,v=[],p=[],g=e.isAnimationEnabled(),d=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){v[y]=new gt({silent:!0}),p[y]=new gt({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 ht,w=a(pt(_,[f,h],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var x=b.get("offsetCenter"),M=o.cx+q(x[0],o.r),C=o.cy+q(x[1],o.r),T=v[y];T.attr({z2:d?0:2,style:kt(b,{x:M,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),S.add(T)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+q(L[0],o.r),P=o.cy+q(L[1],o.r),R=q(D.get("width"),o.r),E=q(D.get("height"),o.r),z=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,T=p[y],k=D.get("formatter");T.attr({z2:d?0:2,style:kt(D,{x:I,y:P,text:Zo(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:z})}),i0(T,{normal:D},_,function(F){return Zo(F,k)}),g&&BT(T,y,l,e,{getFormattedLabel:function(F,G,Z,rt,nt,St){return Zo(St?St.interpolatedValue:_,k)}}),S.add(T)}c.add(S)}),this.group.add(c),this._titleEls=v,this._detailEls=p},t.type="gauge",t}(le),ME=function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,i){return nS(this,["value"])},t.type="series.gauge",t.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,rotate:0},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}},t}(be);function CE(r){r.registerChartView(TE),r.registerSeriesModel(ME)}Xt(bP);Xt(AP);const AE=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function DE(r){function t(i){return(...n)=>{if(!r.value)throw new Error("ECharts is not initialized yet.");return r.value[i].apply(r.value,n)}}function e(){const i=Object.create(null);return AE.forEach(n=>{i[n]=t(n)}),i}return e()}function LE(r,t,e){$o([e,r,t],([i,n,a],o,s)=>{let l=null;if(i&&n&&a){const{offsetWidth:u,offsetHeight:f}=i,h=a===!0?{}:a,{throttle:c=100,onResize:v}=h;let p=!1;const g=()=>{n.resize(),v==null||v()},d=c?_l(g,c):g;l=new ResizeObserver(()=>{!p&&(p=!0,i.offsetWidth===u&&i.offsetHeight===f)||d()}),l.observe(i)}s(()=>{l&&(l.disconnect(),l=null)})})}const IE={autoresize:[Boolean,Object]},PE=/^on[^a-z]/,aS=r=>PE.test(r);function RE(r){const t={};for(const e in r)aS(e)||(t[e]=r[e]);return t}function fs(r,t){const e=yS(r)?Fy(r):r;return e&&typeof e=="object"&&"value"in e?e.value||t:e||t}const EE="ecLoadingOptions";function kE(r,t,e){const i=Xo(EE,{}),n=en(()=>({...fs(i,{}),...e==null?void 0:e.value}));Vy(()=>{const a=r.value;a&&(t.value?a.showLoading(n.value):a.hideLoading())})}const OE={loading:Boolean,loadingOptions:Object};let ia=null;const oS="x-vue-echarts";function NE(){if(ia!=null)return ia;if(typeof HTMLElement>"u"||typeof customElements>"u")return ia=!1;try{new Function("tag","class EChartsElement extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&(this.__dispose(),this.__dispose=null)}}customElements.get(tag)==null&&customElements.define(tag,EChartsElement);")(oS)}catch{return ia=!1}return ia=!0}document.head.appendChild(document.createElement("style")).textContent=`x-vue-echarts{display:block;width:100%;height:100%;min-width:0}
`;const BE=NE(),sS="ecTheme",zE="ecInitOptions",VE="ecUpdateOptions",zy=/(^&?~?!?)native:/;var FE=fS({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...IE,...OE},emits:{},inheritAttrs:!1,setup(r,{attrs:t}){const e=Il(),i=Il(),n=Il(),a=Xo(sS,null),o=Xo(zE,null),s=Xo(VE,null),{autoresize:l,manualUpdate:u,loading:f,loadingOptions:h}=vS(r),c=en(()=>n.value||r.option||null),v=en(()=>r.theme||fs(a,{})),p=en(()=>r.initOptions||fs(o,{})),g=en(()=>r.updateOptions||fs(s,{})),d=en(()=>RE(t)),y={},m=cS().proxy.$listeners,_={};m?Object.keys(m).forEach(C=>{zy.test(C)?y[C.replace(zy,"$1")]=m[C]:_[C]=m[C]}):Object.keys(t).filter(C=>aS(C)).forEach(C=>{let T=C.charAt(2).toLowerCase()+C.slice(3);if(T.indexOf("native:")===0){const D=`on${T.charAt(7).toUpperCase()}${T.slice(8)}`;y[D]=t[C];return}T.substring(T.length-4)==="Once"&&(T=`~${T.substring(0,T.length-4)}`),_[T]=t[C]});function S(C){if(!e.value)return;const T=i.value=BA(e.value,v.value,p.value);r.group&&(T.group=r.group),Object.keys(_).forEach(I=>{let P=_[I];if(!P)return;let R=I.toLowerCase();R.charAt(0)==="~"&&(R=R.substring(1),P.__once__=!0);let E=T;if(R.indexOf("zr:")===0&&(E=T.getZr(),R=R.substring(3)),P.__once__){delete P.__once__;const z=P;P=(...k)=>{z(...k),E.off(R,P)}}E.on(R,P)});function D(){T&&!T.isDisposed()&&T.resize()}function L(){const I=C||c.value;I&&T.setOption(I,g.value)}l.value?gS(()=>{D(),L()}):L()}function w(C,T){r.manualUpdate&&(n.value=C),i.value?i.value.setOption(C,T||{}):S(C)}function b(){i.value&&(i.value.dispose(),i.value=void 0)}let x=null;$o(u,C=>{typeof x=="function"&&(x(),x=null),C||(x=$o(()=>r.option,(T,D)=>{T&&(i.value?i.value.setOption(T,{notMerge:T!==D,...g.value}):S())},{deep:!0}))},{immediate:!0}),$o([v,p],()=>{b(),S()},{deep:!0}),Vy(()=>{r.group&&i.value&&(i.value.group=r.group)});const M=DE(i);return kE(i,f,h),LE(i,l,e),pS(()=>{S()}),dS(()=>{BE&&e.value?e.value.__dispose=b:b()}),{chart:i,root:e,setOption:w,nonEventAttrs:d,nativeListeners:y,...M}},render(){const r={...this.nonEventAttrs,...this.nativeListeners};return r.ref="root",r.class=r.class?["echarts"].concat(r.class):"echarts",hS(oS,r)}});const HE=mS("useGraphStore",()=>{const r=nc(null),t=nc([]);return{chartRef:r,colors:t}}),GE={class:"w-100"},WE={class:"row"},UE={class:"q-ma-none text-white",style:{"font-size":"larger"}},YE={class:"row"},XE={__name:"deenovaGraphComponent",props:{option:{type:Object},title:{type:String},style:{type:Object},borderRadiusCss:{type:String},refChart:{type:Object}},emits:["update:refChart"],setup(r,{emit:t}){Xt([gL,lE,_I,SE,XR,CE,nP,q2,BP,iR,I2,MR]);function e(){var o,s;a.value=(s=(o=n.value)==null?void 0:o.getOption())==null?void 0:s.color}TS(sS,"dark");const i=HE(),{chartRef:n,colors:a}=_S(i);return(o,s)=>(oc(),ac("div",GE,[r.title?(oc(),ac("div",{key:0,style:sc([{"background-color":"#100C2A",color:"white"},r.borderRadiusCss])},[Pl("div",WE,[Pl("label",UE,wS(r.title),1)]),Pl("div",YE,[xS(o.$slots,"filter")])],4)):SS("",!0),bS(Fy(FE),{class:"chart w-100",option:r.option,ref_key:"chartRef",ref:n,autoresize:"",onFinished:e,style:sc(r.style??"height: 300px")},null,8,["option","style"])]))}};export{FE as E,sS as T,XE as _,CE as a,_I as b,nP as c,q2 as d,BP as e,iR as f,I2 as g,HE as h,gL as i,Xt as u};
//# sourceMappingURL=deenovaGraphComponent-CUF6n5xp.js.map
