echarts-pYZoUxTc.js 708 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. var _u=function(n,t){return _u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},_u(n,t)};function F(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}_u(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var gw=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},fe=new function(){this.browser=new gw,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"};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(fe.wxa=!0,fe.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?fe.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(fe.node=!0,fe.svgSupported=!0):function(n,t){var e=t.browser,i=n.match(/Firefox\/([\d.]+)/),r=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),o=n.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(n);i&&(e.firefox=!0,e.version=i[1]),r&&(e.ie=!0,e.version=r[1]),o&&(e.edge=!0,e.version=o[1],e.newEdge=+o[1].split(".")[0]>18),a&&(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}(navigator.userAgent,fe);var co,af,bi="12px sans-serif",yw=function(n){var t={};if(typeof JSON>"u")return t;for(var e=0;e<95;e++){var i=String.fromCharCode(e+32),r=(n.charCodeAt(e)-20)/100;t[i]=r}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),Bn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(n,t){if(!co){var e=Bn.createCanvas();co=e&&e.getContext("2d")}if(co)return af!==t&&(af=co.font=t||bi),co.measureText(n);n=n||"";var i=/((?:\d+)?\.?\d*)px/.exec(t=t||bi),r=i&&+i[1]||12,o=0;if(t.indexOf("mono")>=0)o=r*n.length;else for(var a=0;a<n.length;a++){var s=yw[n[a]];o+=s==null?r:s*r}return{width:o}},loadImage:function(n,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=n,i}};function sf(n){for(var t in Bn)n[t]&&(Bn[t]=n[t])}var lf=nn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(n,t){return n["[object "+t+"]"]=!0,n},{}),uf=nn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(n,t){return n["[object "+t+"Array]"]=!0,n},{}),yr=Object.prototype.toString,Ya=Array.prototype,vw=Ya.forEach,mw=Ya.filter,xu=Ya.slice,_w=Ya.map,cf=(function(){}).constructor,Za=cf?cf.prototype:null,bu="__proto__",xw=2311;function wu(){return xw++}function qa(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];typeof console<"u"&&console.error.apply(console,n)}function ae(n){if(n==null||typeof n!="object")return n;var t=n,e=yr.call(n);if(e==="[object Array]"){if(!mr(n)){t=[];for(var i=0,r=n.length;i<r;i++)t[i]=ae(n[i])}}else if(uf[e]){if(!mr(n)){var o=n.constructor;if(o.from)t=o.from(n);else for(t=new o(n.length),i=0,r=n.length;i<r;i++)t[i]=n[i]}}else if(!lf[e]&&!mr(n)&&!wi(n))for(var a in t={},n)n.hasOwnProperty(a)&&a!==bu&&(t[a]=ae(n[a]));return t}function de(n,t,e){if(!ne(t)||!ne(n))return e?ae(t):n;for(var i in t)if(t.hasOwnProperty(i)&&i!==bu){var r=n[i],o=t[i];!ne(o)||!ne(r)||Y(o)||Y(r)||wi(o)||wi(r)||Mu(o)||Mu(r)||mr(o)||mr(r)?!e&&i in n||(n[i]=ae(t[i])):de(r,o,e)}return n}function hf(n,t){for(var e=n[0],i=1,r=n.length;i<r;i++)e=de(e,n[i],t);return e}function H(n,t){if(Object.assign)Object.assign(n,t);else for(var e in t)t.hasOwnProperty(e)&&e!==bu&&(n[e]=t[e]);return n}function ce(n,t,e){for(var i=Oe(t),r=0;r<i.length;r++){var o=i[r];(e?t[o]!=null:n[o]==null)&&(n[o]=t[o])}return n}var bw=Bn.createCanvas;function we(n,t){if(n){if(n.indexOf)return n.indexOf(t);for(var e=0,i=n.length;e<i;e++)if(n[e]===t)return e}return-1}function Su(n,t){var e=n.prototype;function i(){}for(var r in i.prototype=t.prototype,n.prototype=new i,e)e.hasOwnProperty(r)&&(n.prototype[r]=e[r]);n.prototype.constructor=n,n.superClass=t}function at(n,t,e){if(n="prototype"in n?n.prototype:n,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),r=0;r<i.length;r++){var o=i[r];o!=="constructor"&&(e?t[o]!=null:n[o]==null)&&(n[o]=t[o])}else ce(n,t,e)}function ft(n){return!!n&&typeof n!="string"&&typeof n.length=="number"}function D(n,t,e){if(n&&t)if(n.forEach&&n.forEach===vw)n.forEach(t,e);else if(n.length===+n.length)for(var i=0,r=n.length;i<r;i++)t.call(e,n[i],i,n);else for(var o in n)n.hasOwnProperty(o)&&t.call(e,n[o],o,n)}function j(n,t,e){if(!n)return[];if(!t)return Ka(n);if(n.map&&n.map===_w)return n.map(t,e);for(var i=[],r=0,o=n.length;r<o;r++)i.push(t.call(e,n[r],r,n));return i}function nn(n,t,e,i){if(n&&t){for(var r=0,o=n.length;r<o;r++)e=t.call(i,e,n[r],r,n);return e}}function He(n,t,e){if(!n)return[];if(!t)return Ka(n);if(n.filter&&n.filter===mw)return n.filter(t,e);for(var i=[],r=0,o=n.length;r<o;r++)t.call(e,n[r],r,n)&&i.push(n[r]);return i}function pf(n,t,e){if(n&&t){for(var i=0,r=n.length;i<r;i++)if(t.call(e,n[i],i,n))return n[i]}}function Oe(n){if(!n)return[];if(Object.keys)return Object.keys(n);var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t}var he=Za&&ue(Za.bind)?Za.call.bind(Za.bind):function(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return function(){return n.apply(t,e.concat(xu.call(arguments)))}};function Se(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return n.apply(this,t.concat(xu.call(arguments)))}}function Y(n){return Array.isArray?Array.isArray(n):yr.call(n)==="[object Array]"}function ue(n){return typeof n=="function"}function Q(n){return typeof n=="string"}function ja(n){return yr.call(n)==="[object String]"}function Ae(n){return typeof n=="number"}function ne(n){var t=typeof n;return t==="function"||!!n&&t==="object"}function Mu(n){return!!lf[yr.call(n)]}function gt(n){return!!uf[yr.call(n)]}function wi(n){return typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.ownerDocument=="object"}function ho(n){return n.colorStops!=null}function df(n){return n.image!=null}function po(n){return n!=n}function Vn(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var e=0,i=n.length;e<i;e++)if(n[e]!=null)return n[e]}function xe(n,t){return n??t}function vr(n,t,e){return n??t??e}function Ka(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return xu.apply(n,t)}function Tu(n){if(typeof n=="number")return[n,n,n,n];var t=n.length;return t===2?[n[0],n[1],n[0],n[1]]:t===3?[n[0],n[1],n[2],n[1]]:n}function Ot(n,t){if(!n)throw new Error(t)}function zt(n){return n==null?null:typeof n.trim=="function"?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ff="__ec_primitive__";function fo(n){n[ff]=!0}function mr(n){return n[ff]}var ww=function(){function n(){this.data={}}return n.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},n.prototype.has=function(t){return this.data.hasOwnProperty(t)},n.prototype.get=function(t){return this.data[t]},n.prototype.set=function(t,e){return this.data[t]=e,this},n.prototype.keys=function(){return Oe(this.data)},n.prototype.forEach=function(t){var e=this.data;for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},n}(),gf=typeof Map=="function",yf=function(){function n(t){var e=Y(t);this.data=gf?new Map:new ww;var i=this;function r(o,a){e?i.set(o,a):i.set(a,o)}t instanceof n?t.each(r):t&&D(t,r)}return n.prototype.hasKey=function(t){return this.data.has(t)},n.prototype.get=function(t){return this.data.get(t)},n.prototype.set=function(t,e){return this.data.set(t,e),e},n.prototype.each=function(t,e){this.data.forEach(function(i,r){t.call(e,i,r)})},n.prototype.keys=function(){var t=this.data.keys();return gf?Array.from(t):t},n.prototype.removeKey=function(t){this.data.delete(t)},n}();function re(n){return new yf(n)}function vf(n,t){for(var e=new n.constructor(n.length+t.length),i=0;i<n.length;i++)e[i]=n[i];var r=n.length;for(i=0;i<t.length;i++)e[i+r]=t[i];return e}function go(n,t){var e;if(Object.create)e=Object.create(n);else{var i=function(){};i.prototype=n,e=new i}return t&&H(e,t),e}function Cu(n){var t=n.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Bt(n,t){return n.hasOwnProperty(t)}function rt(){}var mf=180/Math.PI;const Sw=Object.freeze(Object.defineProperty({__proto__:null,HashMap:yf,RADIAN_TO_DEGREE:mf,assert:Ot,bind:he,clone:ae,concatArray:vf,createCanvas:bw,createHashMap:re,createObject:go,curry:Se,defaults:ce,disableUserSelect:Cu,each:D,eqNaN:po,extend:H,filter:He,find:pf,guid:wu,hasOwn:Bt,indexOf:we,inherits:Su,isArray:Y,isArrayLike:ft,isBuiltInObject:Mu,isDom:wi,isFunction:ue,isGradientObject:ho,isImagePatternObject:df,isNumber:Ae,isObject:ne,isPrimitive:mr,isRegExp:function(n){return yr.call(n)==="[object RegExp]"},isString:Q,isStringSafe:ja,isTypedArray:gt,keys:Oe,logError:qa,map:j,merge:de,mergeAll:hf,mixin:at,noop:rt,normalizeCssArray:Tu,reduce:nn,retrieve:Vn,retrieve2:xe,retrieve3:vr,setAsPrimitive:fo,slice:Ka,trim:zt},Symbol.toStringTag,{value:"Module"}));function Si(n,t){return n==null&&(n=0),t==null&&(t=0),[n,t]}function _f(n,t){return n[0]=t[0],n[1]=t[1],n}function xf(n){return[n[0],n[1]]}function Iu(n,t,e){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n}function bf(n,t,e){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n}function Au(n){return Math.sqrt(Du(n))}var Mw=Au;function Du(n){return n[0]*n[0]+n[1]*n[1]}var Tw=Du;function Ja(n,t,e){return n[0]=t[0]*e,n[1]=t[1]*e,n}function wf(n,t){var e=Au(t);return e===0?(n[0]=0,n[1]=0):(n[0]=t[0]/e,n[1]=t[1]/e),n}function $a(n,t){return Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1]))}var Qa=$a;function Sf(n,t){return(n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1])}var Mi=Sf;function es(n,t,e,i){return n[0]=t[0]+i*(e[0]-t[0]),n[1]=t[1]+i*(e[1]-t[1]),n}function tt(n,t,e){var i=t[0],r=t[1];return n[0]=e[0]*i+e[2]*r+e[4],n[1]=e[1]*i+e[3]*r+e[5],n}function Fn(n,t,e){return n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n}function Gn(n,t,e){return n[0]=Math.max(t[0],e[0]),n[1]=Math.max(t[1],e[1]),n}const Cw=Object.freeze(Object.defineProperty({__proto__:null,add:Iu,applyTransform:tt,clone:xf,copy:_f,create:Si,dist:Qa,distSquare:Mi,distance:$a,distanceSquare:Sf,div:function(n,t,e){return n[0]=t[0]/e[0],n[1]=t[1]/e[1],n},dot:function(n,t){return n[0]*t[0]+n[1]*t[1]},len:Au,lenSquare:Du,length:Mw,lengthSquare:Tw,lerp:es,max:Gn,min:Fn,mul:function(n,t,e){return n[0]=t[0]*e[0],n[1]=t[1]*e[1],n},negate:function(n,t){return n[0]=-t[0],n[1]=-t[1],n},normalize:wf,scale:Ja,scaleAndAdd:function(n,t,e,i){return n[0]=t[0]+e[0]*i,n[1]=t[1]+e[1]*i,n},set:function(n,t,e){return n[0]=t,n[1]=e,n},sub:bf},Symbol.toStringTag,{value:"Module"}));var _r=function(n,t){this.target=n,this.topTarget=t&&t.topTarget},Iw=function(){function n(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return n.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 _r(e,t),"dragstart",t.event))},n.prototype._drag=function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,r=t.offsetY,o=i-this._x,a=r-this._y;this._x=i,this._y=r,e.drift(o,a,t),this.handler.dispatchToElement(new _r(e,t),"drag",t.event);var s=this.handler.findHover(i,r,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new _r(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new _r(s,t),"dragenter",t.event))}},n.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new _r(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new _r(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},n}(),Vt=function(){function n(t){t&&(this._$eventProcessor=t)}return n.prototype.on=function(t,e,i,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if(typeof e=="function"&&(r=i,i=e,e=null),!i||!t)return this;var a=this._$eventProcessor;e!=null&&a&&a.normalizeQuery&&(e=a.normalizeQuery(e)),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===i)return this;var l={h:i,query:e,ctx:r||this,callAtLast:i.zrEventfulCallAtLast},u=o[t].length-1,c=o[t][u];return c&&c.callAtLast?o[t].splice(u,0,l):o[t].push(l),this},n.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},n.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 r=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&r.push(i[t][o]);i[t]=r}i[t]&&i[t].length===0&&delete i[t]}else delete i[t];return this},n.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],o=this._$eventProcessor;if(r)for(var a=e.length,s=r.length,l=0;l<s;l++){var u=r[l];if(!o||!o.filter||u.query==null||o.filter(t,u.query))switch(a){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)}}return o&&o.afterTrigger&&o.afterTrigger(t),this},n.prototype.triggerWithContext=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],o=this._$eventProcessor;if(r)for(var a=e.length,s=e[a-1],l=r.length,u=0;u<l;u++){var c=r[u];if(!o||!o.filter||c.query==null||o.filter(t,c.query))switch(a){case 0:c.h.call(s);break;case 1:c.h.call(s,e[0]);break;case 2:c.h.call(s,e[0],e[1]);break;default:c.h.apply(s,e.slice(1,a-1))}}return o&&o.afterTrigger&&o.afterTrigger(t),this},n}(),Aw=Math.log(2);function ku(n,t,e,i,r,o){var a=i+"-"+r,s=n.length;if(o.hasOwnProperty(a))return o[a];if(t===1){var l=Math.round(Math.log((1<<s)-1&~r)/Aw);return n[e][l]}for(var u=i|1<<e,c=e+1;i&1<<c;)c++;for(var h=0,p=0,d=0;p<s;p++){var f=1<<p;f&r||(h+=(d%2?-1:1)*n[e][p]*ku(n,t-1,c,u,r|f,o),d++)}return o[a]=h,h}function Mf(n,t){var e=[[n[0],n[1],1,0,0,0,-t[0]*n[0],-t[0]*n[1]],[0,0,0,n[0],n[1],1,-t[1]*n[0],-t[1]*n[1]],[n[2],n[3],1,0,0,0,-t[2]*n[2],-t[2]*n[3]],[0,0,0,n[2],n[3],1,-t[3]*n[2],-t[3]*n[3]],[n[4],n[5],1,0,0,0,-t[4]*n[4],-t[4]*n[5]],[0,0,0,n[4],n[5],1,-t[5]*n[4],-t[5]*n[5]],[n[6],n[7],1,0,0,0,-t[6]*n[6],-t[6]*n[7]],[0,0,0,n[6],n[7],1,-t[7]*n[6],-t[7]*n[7]]],i={},r=ku(e,8,0,0,0,i);if(r!==0){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)o[s]==null&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*ku(e,7,a===0?1:0,1<<a,1<<s,i)/r*t[a];return function(l,u,c){var h=u*o[6]+c*o[7]+1;l[0]=(u*o[0]+c*o[1]+o[2])/h,l[1]=(u*o[3]+c*o[4]+o[5])/h}}}var Tf="___zrEVENTSAVED",Lu=[];function Pu(n,t,e,i,r){if(t.getBoundingClientRect&&fe.domSupported&&!Cf(t)){var o=t[Tf]||(t[Tf]={}),a=function(l,u){var c=u.markers;if(c)return c;c=u.markers=[];for(var h=["left","right"],p=["top","bottom"],d=0;d<4;d++){var f=document.createElement("div"),g=d%2,y=(d>>1)%2;f.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",h[g]+":0",p[y]+":0",h[1-g]+":auto",p[1-y]+":auto",""].join("!important;"),l.appendChild(f),c.push(f)}return c}(t,o),s=function(l,u,c){for(var h=c?"invTrans":"trans",p=u[h],d=u.srcCoords,f=[],g=[],y=!0,v=0;v<4;v++){var m=l[v].getBoundingClientRect(),_=2*v,x=m.left,b=m.top;f.push(x,b),y=y&&d&&x===d[_]&&b===d[_+1],g.push(l[v].offsetLeft,l[v].offsetTop)}return y&&p?p:(u.srcCoords=f,u[h]=c?Mf(g,f):Mf(f,g))}(a,o,r);if(s)return s(n,e,i),!0}return!1}function Cf(n){return n.nodeName.toUpperCase()==="CANVAS"}var Dw=/([&<>"'])/g,kw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wt(n){return n==null?"":(n+"").replace(Dw,function(t,e){return kw[e]})}var Lw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ou=[],Pw=fe.browser.firefox&&+fe.browser.version.split(".")[0]<39;function Ru(n,t,e,i){return e=e||{},i?If(n,t,e):Pw&&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):If(n,t,e),e}function If(n,t,e){if(fe.domSupported&&n.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Cf(n)){var o=n.getBoundingClientRect();return e.zrX=i-o.left,void(e.zrY=r-o.top)}if(Pu(Ou,n,i,r))return e.zrX=Ou[0],void(e.zrY=Ou[1])}e.zrX=e.zrY=0}function Nu(n){return n||window.event}function Ft(n,t,e){if((t=Nu(t)).zrX!=null)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var r=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];r&&Ru(n,r,t,e)}else{Ru(n,t,t,e);var o=function(s){var l=s.wheelDelta;if(l)return l;var u=s.deltaX,c=s.deltaY;return u==null||c==null?l:3*Math.abs(c!==0?c:u)*(c>0?-1:c<0?1:u>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return t.which==null&&a!==void 0&&Lw.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Eu(n,t,e,i){n.addEventListener(t,e,i)}var Ti=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function Af(n){return n.which===2||n.which===3}var Ow=function(){function n(){this._track=[]}return n.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(t,e,i){var r=t.touches;if(r){for(var o={points:[],touches:[],target:e,event:t},a=0,s=r.length;a<s;a++){var l=r[a],u=Ru(i,l,{});o.points.push([u.zrX,u.zrY]),o.touches.push(l)}this._track.push(o)}},n.prototype._recognize=function(t){for(var e in zu)if(zu.hasOwnProperty(e)){var i=zu[e](this._track,t);if(i)return i}},n}();function Df(n){var t=n[1][0]-n[0][0],e=n[1][1]-n[0][1];return Math.sqrt(t*t+e*e)}var zu={pinch:function(n,t){var e=n.length;if(e){var i,r=(n[e-1]||{}).points,o=(n[e-2]||{}).points||r;if(o&&o.length>1&&r&&r.length>1){var a=Df(r)/Df(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:n[0].target,event:t}}}}};function yo(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function ts(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function _n(n,t,e){var i=t[0]*e[0]+t[2]*e[1],r=t[1]*e[0]+t[3]*e[1],o=t[0]*e[2]+t[2]*e[3],a=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 n[0]=i,n[1]=r,n[2]=o,n[3]=a,n[4]=s,n[5]=l,n}function Ci(n,t,e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4]+e[0],n[5]=t[5]+e[1],n}function Ii(n,t,e,i){i===void 0&&(i=[0,0]);var r=t[0],o=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(e),h=Math.cos(e);return n[0]=r*h+s*c,n[1]=-r*c+s*h,n[2]=o*h+l*c,n[3]=-o*c+h*l,n[4]=h*(a-i[0])+c*(u-i[1])+i[0],n[5]=h*(u-i[1])-c*(a-i[0])+i[1],n}function Bu(n,t,e){var i=e[0],r=e[1];return n[0]=t[0]*i,n[1]=t[1]*r,n[2]=t[2]*i,n[3]=t[3]*r,n[4]=t[4]*i,n[5]=t[5]*r,n}function Ai(n,t){var e=t[0],i=t[2],r=t[4],o=t[1],a=t[3],s=t[5],l=e*a-o*i;return l?(l=1/l,n[0]=a*l,n[1]=-o*l,n[2]=-i*l,n[3]=e*l,n[4]=(i*s-a*r)*l,n[5]=(o*r-e*s)*l,n):null}const Rw=Object.freeze(Object.defineProperty({__proto__:null,clone:function(n){var t=[1,0,0,1,0,0];return ts(t,n),t},copy:ts,create:function(){return[1,0,0,1,0,0]},identity:yo,invert:Ai,mul:_n,rotate:Ii,scale:Bu,translate:Ci},Symbol.toStringTag,{value:"Module"}));var ge=function(){function n(t,e){this.x=t||0,this.y=e||0}return n.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(t,e){return this.x=t,this.y=e,this},n.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},n.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},n.prototype.scale=function(t){this.x*=t,this.y*=t},n.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},n.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},n.prototype.dot=function(t){return this.x*t.x+this.y*t.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},n.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},n.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.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}},n.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},n.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},n.set=function(t,e,i){t.x=e,t.y=i},n.copy=function(t,e){t.x=e.x,t.y=e.y},n.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},n.lenSquare=function(t){return t.x*t.x+t.y*t.y},n.dot=function(t,e){return t.x*e.x+t.y*e.y},n.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},n.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},n.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},n.scaleAndAdd=function(t,e,i,r){t.x=e.x+i.x*r,t.y=e.y+i.y*r},n.lerp=function(t,e,i,r){var o=1-r;t.x=o*e.x+r*i.x,t.y=o*e.y+r*i.y},n}(),ns=Math.min,is=Math.max,Di=new ge,ki=new ge,Li=new ge,Pi=new ge,vo=new ge,mo=new ge,me=function(){function n(t,e,i,r){i<0&&(t+=i,i=-i),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=i,this.height=r}return n.prototype.union=function(t){var e=ns(t.x,this.x),i=ns(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=is(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=is(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},n.prototype.applyTransform=function(t){n.applyTransform(this,this,t)},n.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,r=t.height/e.height,o=[1,0,0,1,0,0];return Ci(o,o,[-e.x,-e.y]),Bu(o,o,[i,r]),Ci(o,o,[t.x,t.y]),o},n.prototype.intersect=function(t,e){if(!t)return!1;t instanceof n||(t=n.create(t));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,c=t.y,h=t.y+t.height,p=!(o<l||u<r||s<c||h<a);if(e){var d=1/0,f=0,g=Math.abs(o-l),y=Math.abs(u-r),v=Math.abs(s-c),m=Math.abs(h-a),_=Math.min(g,y),x=Math.min(v,m);o<l||u<r?_>f&&(f=_,g<y?ge.set(mo,-g,0):ge.set(mo,y,0)):_<d&&(d=_,g<y?ge.set(vo,g,0):ge.set(vo,-y,0)),s<c||h<a?x>f&&(f=x,v<m?ge.set(mo,0,-v):ge.set(mo,0,m)):_<d&&(d=_,v<m?ge.set(vo,0,v):ge.set(vo,0,-m))}return e&&ge.copy(e,p?vo:mo),p},n.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},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(t){n.copy(this,t)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(t){return new n(t.x,t.y,t.width,t.height)},n.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},n.applyTransform=function(t,e,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return t.x=e.x*r+a,t.y=e.y*o+s,t.width=e.width*r,t.height=e.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Di.x=Li.x=e.x,Di.y=Pi.y=e.y,ki.x=Pi.x=e.x+e.width,ki.y=Li.y=e.y+e.height,Di.transform(i),Pi.transform(i),ki.transform(i),Li.transform(i),t.x=ns(Di.x,ki.x,Li.x,Pi.x),t.y=ns(Di.y,ki.y,Li.y,Pi.y);var l=is(Di.x,ki.x,Li.x,Pi.x),u=is(Di.y,ki.y,Li.y,Pi.y);t.width=l-t.x,t.height=u-t.y}else t!==e&&n.copy(t,e)},n}(),kf="silent";function Nw(){Ti(this.event)}var Ew=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.handler=null,e}return F(t,n),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vt),_o=function(n,t){this.x=n,this.y=t},zw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Vu=new me(0,0,0,0),Lf=function(n){function t(e,i,r,o,a){var s=n.call(this)||this;return s._hovered=new _o(0,0),s.storage=e,s.painter=i,s.painterRoot=o,s._pointerSize=a,r=r||new Ew,s.proxy=null,s.setHandlerProxy(r),s._draggingMgr=new Iw(s),s}return F(t,n),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(D(zw,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,r=e.zrY,o=Of(this,i,r),a=this._hovered,s=a.target;s&&!s.__zr&&(s=(a=this.findHover(a.x,a.y)).target);var l=this._hovered=o?new _o(i,r):this.findHover(i,r),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(a,"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 _o(0,0)},t.prototype.dispatch=function(e,i){var r=this[e];r&&r.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,r){var o=(e=e||{}).target;if(!o||!o.silent){for(var a="on"+i,s=function(l,u,c){return{type:l,event:c,target:u.target,topTarget:u.topTarget,cancelBubble:!1,offsetX:c.zrX,offsetY:c.zrY,gestureEvent:c.gestureEvent,pinchX:c.pinchX,pinchY:c.pinchY,pinchScale:c.pinchScale,wheelDelta:c.zrDelta,zrByTouch:c.zrByTouch,which:c.which,stop:Nw}}(i,e,r);o&&(o[a]&&(s.cancelBubble=!!o[a].call(o,s)),o.trigger(i,s),o=o.__hostTarget?o.__hostTarget:o.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[a]=="function"&&l[a].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,r){var o=this.storage.getDisplayList(),a=new _o(e,i);if(Pf(o,a,e,i,r),this._pointerSize&&!a.target){for(var s=[],l=this._pointerSize,u=l/2,c=new me(e-u,i-u,l,l),h=o.length-1;h>=0;h--){var p=o[h];p===r||p.ignore||p.ignoreCoarsePointer||p.parent&&p.parent.ignoreCoarsePointer||(Vu.copy(p.getBoundingRect()),p.transform&&Vu.applyTransform(p.transform),Vu.intersect(c)&&s.push(p))}if(s.length){for(var d=Math.PI/12,f=2*Math.PI,g=0;g<u;g+=4)for(var y=0;y<f;y+=d)if(Pf(s,a,e+g*Math.cos(y),i+g*Math.sin(y),r),a.target)return a}}return a},t.prototype.processGesture=function(e,i){this._gestureMgr||(this._gestureMgr=new Ow);var r=this._gestureMgr;i==="start"&&r.clear();var o=r.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(i==="end"&&r.clear(),o){var a=o.type;e.gestureEvent=a;var s=new _o;s.target=o.target,this.dispatchToElement(s,a,o.event)}},t}(Vt);function Bw(n,t,e){if(n[n.rectHover?"rectContain":"contain"](t,e)){for(var i=n,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(t,e))return!1}i.silent&&(r=!0),i=i.__hostTarget||i.parent}return!r||kf}return!1}function Pf(n,t,e,i,r){for(var o=n.length-1;o>=0;o--){var a=n[o],s=void 0;if(a!==r&&!a.ignore&&(s=Bw(a,e,i))&&(!t.topTarget&&(t.topTarget=a),s!==kf)){t.target=a;break}}}function Of(n,t,e){var i=n.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}function Rf(n,t,e,i){var r=t+1;if(r===e)return 1;if(i(n[r++],n[t])<0){for(;r<e&&i(n[r],n[r-1])<0;)r++;(function(o,a,s){for(s--;a<s;){var l=o[a];o[a++]=o[s],o[s--]=l}})(n,t,r)}else for(;r<e&&i(n[r],n[r-1])>=0;)r++;return r-t}function Nf(n,t,e,i,r){for(i===t&&i++;i<e;i++){for(var o,a=n[i],s=t,l=i;s<l;)r(a,n[o=s+l>>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:n[s+3]=n[s+2];case 2:n[s+2]=n[s+1];case 1:n[s+1]=n[s];break;default:for(;u>0;)n[s+u]=n[s+u-1],u--}n[s]=a}}function Fu(n,t,e,i,r,o){var a=0,s=0,l=1;if(o(n,t[e+r])>0){for(s=i-r;l<s&&o(n,t[e+r+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(n,t[e+r-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a<l;){var c=a+(l-a>>>1);o(n,t[e+c])>0?a=c+1:l=c}return l}function Gu(n,t,e,i,r,o){var a=0,s=0,l=1;if(o(n,t[e+r])<0){for(s=r+1;l<s&&o(n,t[e+r-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l<s&&o(n,t[e+r+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var c=a+(l-a>>>1);o(n,t[e+c])<0?l=c:a=c+1}return l}function rs(n,t,e,i){e||(e=0),i||(i=n.length);var r=i-e;if(!(r<2)){var o=0;if(r<32)Nf(n,e,i,e+(o=Rf(n,e,i,t)),t);else{var a=function(u,c){var h,p,d=7,f=0,g=[];function y(v){var m=h[v],_=p[v],x=h[v+1],b=p[v+1];p[v]=_+b,v===f-3&&(h[v+1]=h[v+2],p[v+1]=p[v+2]),f--;var w=Gu(u[x],u,m,_,0,c);m+=w,(_-=w)!=0&&(b=Fu(u[m+_-1],u,x,b,b-1,c))!==0&&(_<=b?function(M,S,C,I){var T=0;for(T=0;T<S;T++)g[T]=u[M+T];var A=0,k=C,L=M;if(u[L++]=u[k++],--I!=0)if(S!==1){for(var O,P,R,N=d;;){O=0,P=0,R=!1;do if(c(u[k],g[A])<0){if(u[L++]=u[k++],P++,O=0,--I==0){R=!0;break}}else if(u[L++]=g[A++],O++,P=0,--S==1){R=!0;break}while((O|P)<N);if(R)break;do{if((O=Gu(u[k],g,A,S,0,c))!==0){for(T=0;T<O;T++)u[L+T]=g[A+T];if(L+=O,A+=O,(S-=O)<=1){R=!0;break}}if(u[L++]=u[k++],--I==0){R=!0;break}if((P=Fu(g[A],u,k,I,0,c))!==0){for(T=0;T<P;T++)u[L+T]=u[k+T];if(L+=P,k+=P,(I-=P)==0){R=!0;break}}if(u[L++]=g[A++],--S==1){R=!0;break}N--}while(O>=7||P>=7);if(R)break;N<0&&(N=0),N+=2}if((d=N)<1&&(d=1),S===1){for(T=0;T<I;T++)u[L+T]=u[k+T];u[L+I]=g[A]}else{if(S===0)throw new Error;for(T=0;T<S;T++)u[L+T]=g[A+T]}}else{for(T=0;T<I;T++)u[L+T]=u[k+T];u[L+I]=g[A]}else for(T=0;T<S;T++)u[L+T]=g[A+T]}(m,_,x,b):function(M,S,C,I){var T=0;for(T=0;T<I;T++)g[T]=u[C+T];var A=M+S-1,k=I-1,L=C+I-1,O=0,P=0;if(u[L--]=u[A--],--S!=0)if(I!==1){for(var R=d;;){var N=0,E=0,z=!1;do if(c(g[k],u[A])<0){if(u[L--]=u[A--],N++,E=0,--S==0){z=!0;break}}else if(u[L--]=g[k--],E++,N=0,--I==1){z=!0;break}while((N|E)<R);if(z)break;do{if((N=S-Gu(g[k],u,M,S,S-1,c))!=0){for(S-=N,P=1+(L-=N),O=1+(A-=N),T=N-1;T>=0;T--)u[P+T]=u[O+T];if(S===0){z=!0;break}}if(u[L--]=g[k--],--I==1){z=!0;break}if((E=I-Fu(u[A],g,0,I,I-1,c))!=0){for(I-=E,P=1+(L-=E),O=1+(k-=E),T=0;T<E;T++)u[P+T]=g[O+T];if(I<=1){z=!0;break}}if(u[L--]=u[A--],--S==0){z=!0;break}R--}while(N>=7||E>=7);if(z)break;R<0&&(R=0),R+=2}if((d=R)<1&&(d=1),I===1){for(P=1+(L-=S),O=1+(A-=S),T=S-1;T>=0;T--)u[P+T]=u[O+T];u[L]=g[k]}else{if(I===0)throw new Error;for(O=L-(I-1),T=0;T<I;T++)u[O+T]=g[T]}}else{for(P=1+(L-=S),O=1+(A-=S),T=S-1;T>=0;T--)u[P+T]=u[O+T];u[L]=g[k]}else for(O=L-(I-1),T=0;T<I;T++)u[O+T]=g[T]}(m,_,x,b))}return h=[],p=[],{mergeRuns:function(){for(;f>1;){var v=f-2;if(v>=1&&p[v-1]<=p[v]+p[v+1]||v>=2&&p[v-2]<=p[v]+p[v-1])p[v-1]<p[v+1]&&v--;else if(p[v]>p[v+1])break;y(v)}},forceMergeRuns:function(){for(;f>1;){var v=f-2;v>0&&p[v-1]<p[v+1]&&v--,y(v)}},pushRun:function(v,m){h[f]=v,p[f]=m,f+=1}}}(n,t),s=function(u){for(var c=0;u>=32;)c|=1&u,u>>=1;return u+c}(r);do{if((o=Rf(n,e,i,t))<s){var l=r;l>s&&(l=s),Nf(n,e,e+l,e+o,t),o=l}a.pushRun(e,o),a.mergeRuns(),r-=o,e+=o}while(r!==0);a.forceMergeRuns()}}}D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){Lf.prototype[n]=function(t){var e,i,r=t.zrX,o=t.zrY,a=Of(this,r,o);if(n==="mouseup"&&a||(i=(e=this.findHover(r,o)).target),n==="mousedown")this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if(n==="mouseup")this._upEl=i;else if(n==="click"){if(this._downEl!==this._upEl||!this._downPoint||Qa(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(e,n,t)}});var Ef=!1;function Hu(){Ef||(Ef=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function zf(n,t){return n.zlevel===t.zlevel?n.z===t.z?n.z2-t.z2:n.z-t.z:n.zlevel-t.zlevel}var os,Vw=function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=zf}return n.prototype.traverse=function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},n.prototype.getDisplayList=function(t,e){e=e||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(e),i},n.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,r=0,o=e.length;r<o;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,rs(i,zf)},n.prototype._updateAndAddDisplayable=function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath();if(t.ignoreClip)e=null;else if(r){e=e?e.slice():[];for(var o=r,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),a=o,o=o.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=1),this._updateAndAddDisplayable(u,e,i)}t.__dirty=0}else{var c=t;e&&e.length?c.__clipPaths=e:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(Hu(),c.z=0),isNaN(c.z2)&&(Hu(),c.z2=0),isNaN(c.zlevel)&&(Hu(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,i);var p=t.getTextGuideLine();p&&this._updateAndAddDisplayable(p,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},n.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},n.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e<i;e++)this.delRoot(t[e]);else{var r=we(this._roots,t);r>=0&&this._roots.splice(r,1)}},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n}();os=fe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};var xo={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(2-Math.pow(2,-10*(n-1)))},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var t,e=.1;return n===0?0:n===1?1:(!e||e<1?(e=1,t=.1):t=.4*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(n-=1))*Math.sin((n-t)*(2*Math.PI)/.4))},elasticOut:function(n){var t,e=.1;return n===0?0:n===1?1:(!e||e<1?(e=1,t=.1):t=.4*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*n)*Math.sin((n-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(n){var t,e=.1;return n===0?0:n===1?1:(!e||e<1?(e=1,t=.1):t=.4*Math.asin(1/e)/(2*Math.PI),(n*=2)<1?e*Math.pow(2,10*(n-=1))*Math.sin((n-t)*(2*Math.PI)/.4)*-.5:e*Math.pow(2,-10*(n-=1))*Math.sin((n-t)*(2*Math.PI)/.4)*.5+1)},backIn:function(n){var t=1.70158;return n*n*((t+1)*n-t)},backOut:function(n){var t=1.70158;return--n*n*((t+1)*n+t)+1},backInOut:function(n){var t=2.5949095;return(n*=2)<1?n*n*((t+1)*n-t)*.5:.5*((n-=2)*n*((t+1)*n+t)+2)},bounceIn:function(n){return 1-xo.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?.5*xo.bounceIn(2*n):.5*xo.bounceOut(2*n-1)+.5}},as=Math.pow,ei=Math.sqrt,Bf=1e-4,Vf=ei(3),ss=1/3,xn=Si(),Gt=Si(),xr=Si();function ti(n){return n>-1e-8&&n<1e-8}function Ff(n){return n>1e-8||n<-1e-8}function $e(n,t,e,i,r){var o=1-r;return o*o*(o*n+3*r*t)+r*r*(r*i+3*o*e)}function Gf(n,t,e,i,r){var o=1-r;return 3*(((t-n)*o+2*(e-t)*r)*o+(i-e)*r*r)}function ls(n,t,e,i,r,o){var a=i+3*(t-e)-n,s=3*(e-2*t+n),l=3*(t-n),u=n-r,c=s*s-3*a*l,h=s*l-9*a*u,p=l*l-3*s*u,d=0;if(ti(c)&&ti(h))ti(s)?o[0]=0:(S=-l/s)>=0&&S<=1&&(o[d++]=S);else{var f=h*h-4*c*p;if(ti(f)){var g=h/c,y=-g/2;(S=-s/a+g)>=0&&S<=1&&(o[d++]=S),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=ei(f),m=c*s+1.5*a*(-h+v),_=c*s+1.5*a*(-h-v);(S=(-s-((m=m<0?-as(-m,ss):as(m,ss))+(_=_<0?-as(-_,ss):as(_,ss))))/(3*a))>=0&&S<=1&&(o[d++]=S)}else{var x=(2*c*s-3*a*h)/(2*ei(c*c*c)),b=Math.acos(x)/3,w=ei(c),M=Math.cos(b),S=(-s-2*w*M)/(3*a),C=(y=(-s+w*(M+Vf*Math.sin(b)))/(3*a),(-s+w*(M-Vf*Math.sin(b)))/(3*a));S>=0&&S<=1&&(o[d++]=S),y>=0&&y<=1&&(o[d++]=y),C>=0&&C<=1&&(o[d++]=C)}}return d}function Hf(n,t,e,i,r){var o=6*e-12*t+6*n,a=9*t+3*i-3*n-9*e,s=3*t-3*n,l=0;if(ti(a))Ff(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var u=o*o-4*a*s;if(ti(u))r[0]=-o/(2*a);else if(u>0){var c,h=ei(u),p=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),p>=0&&p<=1&&(r[l++]=p)}}return l}function us(n,t,e,i,r,o){var a=(t-n)*r+n,s=(e-t)*r+t,l=(i-e)*r+e,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=n,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function Wf(n,t,e,i,r,o,a,s,l,u,c){var h,p,d,f,g,y=.005,v=1/0;xn[0]=l,xn[1]=u;for(var m=0;m<1;m+=.05)Gt[0]=$e(n,e,r,a,m),Gt[1]=$e(t,i,o,s,m),(f=Mi(xn,Gt))<v&&(h=m,v=f);v=1/0;for(var _=0;_<32&&!(y<Bf);_++)p=h-y,d=h+y,Gt[0]=$e(n,e,r,a,p),Gt[1]=$e(t,i,o,s,p),f=Mi(Gt,xn),p>=0&&f<v?(h=p,v=f):(xr[0]=$e(n,e,r,a,d),xr[1]=$e(t,i,o,s,d),g=Mi(xr,xn),d<=1&&g<v?(h=d,v=g):y*=.5);return c&&(c[0]=$e(n,e,r,a,h),c[1]=$e(t,i,o,s,h)),ei(v)}function Fw(n,t,e,i,r,o,a,s,l){for(var u=n,c=t,h=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=$e(n,e,r,a,f),y=$e(t,i,o,s,f),v=g-u,m=y-c;h+=Math.sqrt(v*v+m*m),u=g,c=y}return h}function st(n,t,e,i){var r=1-i;return r*(r*n+2*i*t)+i*i*e}function Xf(n,t,e,i){return 2*((1-i)*(t-n)+i*(e-t))}function Uf(n,t,e){var i=n+e-2*t;return i===0?.5:(n-t)/i}function cs(n,t,e,i,r){var o=(t-n)*i+n,a=(e-t)*i+t,s=(a-o)*i+o;r[0]=n,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=e}function Yf(n,t,e,i,r,o,a,s,l){var u,c=.005,h=1/0;xn[0]=a,xn[1]=s;for(var p=0;p<1;p+=.05)Gt[0]=st(n,e,r,p),Gt[1]=st(t,i,o,p),(y=Mi(xn,Gt))<h&&(u=p,h=y);h=1/0;for(var d=0;d<32&&!(c<Bf);d++){var f=u-c,g=u+c;Gt[0]=st(n,e,r,f),Gt[1]=st(t,i,o,f);var y=Mi(Gt,xn);if(f>=0&&y<h)u=f,h=y;else{xr[0]=st(n,e,r,g),xr[1]=st(t,i,o,g);var v=Mi(xr,xn);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=st(n,e,r,u),l[1]=st(t,i,o,u)),ei(h)}function Gw(n,t,e,i,r,o,a){for(var s=n,l=t,u=0,c=1/a,h=1;h<=a;h++){var p=h*c,d=st(n,e,r,p),f=st(t,i,o,p),g=d-s,y=f-l;u+=Math.sqrt(g*g+y*y),s=d,l=f}return u}var Hw=/cubic-bezier\(([0-9,\.e ]+)\)/;function Zf(n){var t=n&&Hw.exec(n);if(t){var e=t[1].split(","),i=+zt(e[0]),r=+zt(e[1]),o=+zt(e[2]),a=+zt(e[3]);if(isNaN(i+r+o+a))return;var s=[];return function(l){return l<=0?0:l>=1?1:ls(0,i,o,1,l,s)&&$e(0,r,a,1,s[0])}}}var Ww=function(){function n(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||rt,this.ondestroy=t.ondestroy||rt,this.onrestart=t.onrestart||rt,t.easing&&this.setEasing(t.easing)}return n.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,r=t-this._startTime-this._pausedTime,o=r/i;o<0&&(o=0),o=Math.min(o,1);var a=this.easingFunc,s=a?a(o):o;if(this.onframe(s),o===1){if(!this.loop)return!0;var l=r%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(t){this.easing=t,this.easingFunc=ue(t)?t:xo[t]||Zf(t)},n}(),qf=function(n){this.value=n},Xw=function(){function n(){this._len=0}return n.prototype.insert=function(t){var e=new qf(t);return this.insertEntry(e),e},n.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++},n.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--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n}(),bo=function(){function n(t){this._list=new Xw,this._maxSize=10,this._map={},this._maxSize=t}return n.prototype.put=function(t,e){var i=this._list,r=this._map,o=null;if(r[t]==null){var a=i.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=i.head;i.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new qf(e),s.key=t,i.insertEntry(s),r[t]=s}return o},n.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},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n}(),jf={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 rn(n){return(n=Math.round(n))<0?0:n>255?255:n}function wo(n){return n<0?0:n>1?1:n}function Wu(n){var t=n;return t.length&&t.charAt(t.length-1)==="%"?rn(parseFloat(t)/100*255):rn(parseInt(t,10))}function Oi(n){var t=n;return t.length&&t.charAt(t.length-1)==="%"?wo(parseFloat(t)/100):wo(parseFloat(t))}function Xu(n,t,e){return e<0?e+=1:e>1&&(e-=1),6*e<1?n+(t-n)*e*6:2*e<1?t:3*e<2?n+(t-n)*(2/3-e)*6:n}function ni(n,t,e){return n+(t-n)*e}function Ht(n,t,e,i,r){return n[0]=t,n[1]=e,n[2]=i,n[3]=r,n}function Uu(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}var Kf=new bo(20),hs=null;function br(n,t){hs&&Uu(hs,t),hs=Kf.put(n,hs||t.slice())}function St(n,t){if(n){t=t||[];var e=Kf.get(n);if(e)return Uu(t,e);var i=(n+="").replace(/ /g,"").toLowerCase();if(i in jf)return Uu(t,jf[i]),br(n,t),t;var r,o=i.length;if(i.charAt(0)==="#")return o===4||o===5?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Ht(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,o===5?parseInt(i.slice(4),16)/15:1),br(n,t),t):void Ht(t,0,0,0,1):o===7||o===9?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Ht(t,(16711680&r)>>16,(65280&r)>>8,255&r,o===9?parseInt(i.slice(7),16)/255:1),br(n,t),t):void Ht(t,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(a!==-1&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ht(t,+u[0],+u[1],+u[2],1):Ht(t,0,0,0,1);c=Oi(u.pop());case"rgb":return u.length>=3?(Ht(t,Wu(u[0]),Wu(u[1]),Wu(u[2]),u.length===3?c:Oi(u[3])),br(n,t),t):void Ht(t,0,0,0,1);case"hsla":return u.length!==4?void Ht(t,0,0,0,1):(u[3]=Oi(u[3]),Yu(u,t),br(n,t),t);case"hsl":return u.length!==3?void Ht(t,0,0,0,1):(Yu(u,t),br(n,t),t);default:return}}Ht(t,0,0,0,1)}}function Yu(n,t){var e=(parseFloat(n[0])%360+360)%360/360,i=Oi(n[1]),r=Oi(n[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Ht(t=t||[],rn(255*Xu(a,o,e+1/3)),rn(255*Xu(a,o,e)),rn(255*Xu(a,o,e-1/3)),1),n.length===4&&(t[3]=n[3]),t}function Zu(n,t){var e=St(n);if(e){for(var i=0;i<3;i++)e[i]=t<0?e[i]*(1-t)|0:(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return on(e,e.length===4?"rgba":"rgb")}}function So(n,t,e){if(t&&t.length&&n>=0&&n<=1){e=e||[];var i=n*(t.length-1),r=Math.floor(i),o=Math.ceil(i),a=t[r],s=t[o],l=i-r;return e[0]=rn(ni(a[0],s[0],l)),e[1]=rn(ni(a[1],s[1],l)),e[2]=rn(ni(a[2],s[2],l)),e[3]=wo(ni(a[3],s[3],l)),e}}var Uw=So;function qu(n,t,e){if(t&&t.length&&n>=0&&n<=1){var i=n*(t.length-1),r=Math.floor(i),o=Math.ceil(i),a=St(t[r]),s=St(t[o]),l=i-r,u=on([rn(ni(a[0],s[0],l)),rn(ni(a[1],s[1],l)),rn(ni(a[2],s[2],l)),wo(ni(a[3],s[3],l))],"rgba");return e?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var Yw=qu;function ps(n,t,e,i){var r=St(n);if(n)return r=function(o){if(o){var a,s,l=o[0]/255,u=o[1]/255,c=o[2]/255,h=Math.min(l,u,c),p=Math.max(l,u,c),d=p-h,f=(p+h)/2;if(d===0)a=0,s=0;else{s=f<.5?d/(p+h):d/(2-p-h);var g=((p-l)/6+d/2)/d,y=((p-u)/6+d/2)/d,v=((p-c)/6+d/2)/d;l===p?a=v-y:u===p?a=1/3+g-v:c===p&&(a=2/3+y-g),a<0&&(a+=1),a>1&&(a-=1)}var m=[360*a,s,f];return o[3]!=null&&m.push(o[3]),m}}(r),t!=null&&(r[0]=function(o){return(o=Math.round(o))<0?0:o>360?360:o}(t)),e!=null&&(r[1]=Oi(e)),i!=null&&(r[2]=Oi(i)),on(Yu(r),"rgba")}function Jf(n,t){var e=St(n);if(e&&t!=null)return e[3]=wo(t),on(e,"rgba")}function on(n,t){if(n&&n.length){var e=n[0]+","+n[1]+","+n[2];return t!=="rgba"&&t!=="hsva"&&t!=="hsla"||(e+=","+n[3]),t+"("+e+")"}}function Mo(n,t){var e=St(n);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var $f=new bo(100);function ju(n){if(Q(n)){var t=$f.get(n);return t||(t=Zu(n,-.1),$f.put(n,t)),t}if(ho(n)){var e=H({},n);return e.colorStops=j(n.colorStops,function(i){return{offset:i.offset,color:Zu(i.color,-.1)}}),e}return n}const Zw=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:So,fastMapToColor:Uw,lerp:qu,lift:Zu,liftColor:ju,lum:Mo,mapToColor:Yw,modifyAlpha:Jf,modifyHSL:ps,parse:St,random:function(){return on([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},stringify:on,toHex:function(n){var t=St(n);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}},Symbol.toStringTag,{value:"Module"}));fe.hasGlobalWindow&&ue(window.btoa);var Ku=Array.prototype.slice;function Hn(n,t,e){return(t-n)*e+n}function Ju(n,t,e,i){for(var r=t.length,o=0;o<r;o++)n[o]=Hn(t[o],e[o],i);return n}function ds(n,t,e,i){for(var r=t.length,o=0;o<r;o++)n[o]=t[o]+e[o]*i;return n}function Qf(n,t,e,i){for(var r=t.length,o=r&&t[0].length,a=0;a<r;a++){n[a]||(n[a]=[]);for(var s=0;s<o;s++)n[a][s]=t[a][s]+e[a][s]*i}return n}function qw(n,t){for(var e=n.length,i=t.length,r=e>i?t:n,o=Math.min(e,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(e,i);s++)r.push({offset:a.offset,color:a.color.slice()})}function jw(n,t,e){var i=n,r=t;if(i.push&&r.push){var o=i.length,a=r.length;if(o!==a)if(o>a)i.length=a;else for(var s=o;s<a;s++)i.push(e===1?r[s]:Ku.call(r[s]));var l=i[0]&&i[0].length;for(s=0;s<i.length;s++)if(e===1)isNaN(i[s])&&(i[s]=r[s]);else for(var u=0;u<l;u++)isNaN(i[s][u])&&(i[s][u]=r[s][u])}}function fs(n){if(ft(n)){var t=n.length;if(ft(n[0])){for(var e=[],i=0;i<t;i++)e.push(Ku.call(n[i]));return e}return Ku.call(n)}return n}function gs(n){return n[0]=Math.floor(n[0])||0,n[1]=Math.floor(n[1])||0,n[2]=Math.floor(n[2])||0,n[3]=n[3]==null?1:n[3],"rgba("+n.join(",")+")"}function eg(n){return n===4||n===5}function ys(n){return n===1||n===2}var To=[0,0,0,0],Kw=function(){function n(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return n.prototype.isFinished=function(){return this._finished},n.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},n.prototype.needsAnimate=function(){return this.keyframes.length>=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var r=this.keyframes,o=r.length,a=!1,s=6,l=e;if(ft(e)){var u=function(d){return ft(d&&d[0])?2:1}(e);s=u,(u===1&&!Ae(e[0])||u===2&&!Ae(e[0][0]))&&(a=!0)}else if(Ae(e)&&!po(e))s=0;else if(Q(e))if(isNaN(+e)){var c=St(e);c&&(l=c,s=3)}else s=0;else if(ho(e)){var h=H({},l);h.colorStops=j(e.colorStops,function(d){return{offset:d.offset,color:St(d.color)}}),e.type==="linear"?s=4:e.type==="radial"&&(s=5),l=h}o===0?this.valType=s:s===this.valType&&s!==6||(a=!0),this.discrete=this.discrete||a;var p={time:t,value:l,rawValue:e,percent:0};return i&&(p.easing=i,p.easingFunc=ue(i)?i:xo[i]||Zf(i)),r.push(p),p},n.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(g,y){return g.time-y.time});for(var r=this.valType,o=i.length,a=i[o-1],s=this.discrete,l=ys(r),u=eg(r),c=0;c<o;c++){var h=i[c],p=h.value,d=a.value;h.percent=h.time/t,s||(l&&c!==o-1?jw(p,d,r):u&&qw(p.colorStops,d.colorStops))}if(!s&&r!==5&&e&&this.needsAnimate()&&e.needsAnimate()&&r===e.valType&&!e._finished){this._additiveTrack=e;var f=i[0].value;for(c=0;c<o;c++)r===0?i[c].additiveValue=i[c].value-f:r===3?i[c].additiveValue=ds([],i[c].value,f,-1):ys(r)&&(i[c].additiveValue=r===1?ds([],i[c].value,f,-1):Qf([],i[c].value,f,-1))}},n.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i,r,o,a=this._additiveTrack!=null,s=a?"additiveValue":"value",l=this.valType,u=this.keyframes,c=u.length,h=this.propName,p=l===3,d=this._lastFr,f=Math.min;if(c===1)r=o=u[0];else{if(e<0)i=0;else if(e<this._lastFrP){for(i=f(d+1,c-1);i>=0&&!(u[i].percent<=e);i--);i=f(i,c-2)}else{for(i=d;i<c&&!(u[i].percent>e);i++);i=f(i-1,c-2)}o=u[i+1],r=u[i]}if(r&&o){this._lastFr=i,this._lastFrP=e;var g=o.percent-r.percent,y=g===0?1:f((e-r.percent)/g,1);o.easingFunc&&(y=o.easingFunc(y));var v=a?this._additiveValue:p?To:t[h];if(!ys(l)&&!p||v||(v=this._additiveValue=[]),this.discrete)t[h]=y<1?r.rawValue:o.rawValue;else if(ys(l))l===1?Ju(v,r[s],o[s],y):function(w,M,S,C){for(var I=M.length,T=I&&M[0].length,A=0;A<I;A++){w[A]||(w[A]=[]);for(var k=0;k<T;k++)w[A][k]=Hn(M[A][k],S[A][k],C)}}(v,r[s],o[s],y);else if(eg(l)){var m=r[s],_=o[s],x=l===4;t[h]={type:x?"linear":"radial",x:Hn(m.x,_.x,y),y:Hn(m.y,_.y,y),colorStops:j(m.colorStops,function(w,M){var S=_.colorStops[M];return{offset:Hn(w.offset,S.offset,y),color:gs(Ju([],w.color,S.color,y))}}),global:_.global},x?(t[h].x2=Hn(m.x2,_.x2,y),t[h].y2=Hn(m.y2,_.y2,y)):t[h].r=Hn(m.r,_.r,y)}else if(p)Ju(v,r[s],o[s],y),a||(t[h]=gs(v));else{var b=Hn(r[s],o[s],y);a?this._additiveValue=b:t[h]=b}a&&this._addToTarget(t)}}},n.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,r=this._additiveValue;e===0?t[i]=t[i]+r:e===3?(St(t[i],To),ds(To,To,r,1),t[i]=gs(To)):e===1?ds(t[i],t[i],r,1):e===2&&Qf(t[i],t[i],r,1)},n}(),$u=function(){function n(t,e,i,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&r?qa("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=i)}return n.prototype.getMaxTime=function(){return this._maxTime},n.prototype.getDelay=function(){return this._delay},n.prototype.getLoop=function(){return this._loop},n.prototype.getTarget=function(){return this._target},n.prototype.changeTarget=function(t){this._target=t},n.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,Oe(e),i)},n.prototype.whenWithKeys=function(t,e,i,r){for(var o=this._tracks,a=0;a<i.length;a++){var s=i[a],l=o[s];if(!l){l=o[s]=new Kw(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var h=c.keyframes,p=h[h.length-1];u=p&&p.value,c.valType===3&&u&&(u=gs(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,fs(u),r),this._trackKeys.push(s)}l.addKeyframe(t,fs(e[s]),r)}return this._maxTime=Math.max(this._maxTime,t),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},n.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)},n.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)},n.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,i=0;i<e.length;i++)t[e[i]].setFinished()},n.prototype._getAdditiveTrack=function(t){var e,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var o=i[r].getTrack(t);o&&(e=o)}return e},n.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,i=[],r=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var a=this._trackKeys[o],s=this._tracks[a],l=this._getAdditiveTrack(a),u=s.keyframes,c=u.length;if(s.prepare(r,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[c-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else i.push(s)}if(i.length||this._force){var p=new Ww({life:r,loop:this._loop,delay:this._delay||0,onframe:function(d){e._started=2;var f=e._additiveAnimators;if(f){for(var g=!1,y=0;y<f.length;y++)if(f[y]._clip){g=!0;break}g||(e._additiveAnimators=null)}for(y=0;y<i.length;y++)i[y].step(e._target,d);var v=e._onframeCbs;if(v)for(y=0;y<v.length;y++)v[y](e._target,d)},ondestroy:function(){e._doneCallback()}});this._clip=p,this.animation&&this.animation.addClip(p),t&&p.setEasing(t)}else this._doneCallback();return this}},n.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},n.prototype.delay=function(t){return this._delay=t,this},n.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},n.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},n.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},n.prototype.getClip=function(){return this._clip},n.prototype.getTrack=function(t){return this._tracks[t]},n.prototype.getTracks=function(){var t=this;return j(this._trackKeys,function(e){return t._tracks[e]})},n.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,o=0;o<t.length;o++){var a=i[t[o]];a&&!a.isFinished()&&(e?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}var s=!0;for(o=0;o<r.length;o++)if(!i[r[o]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},n.prototype.saveTo=function(t,e,i){if(t){e=e||this._trackKeys;for(var r=0;r<e.length;r++){var o=e[r],a=this._tracks[o];if(a&&!a.isFinished()){var s=a.keyframes,l=s[i?0:s.length-1];l&&(t[o]=fs(l.rawValue))}}}},n.prototype.__changeFinalValue=function(t,e){e=e||Oe(t);for(var i=0;i<e.length;i++){var r=e[i],o=this._tracks[r];if(o){var a=o.keyframes;if(a.length>1){var s=a.pop();o.addKeyframe(s.time,t[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},n}();function wr(){return new Date().getTime()}var tg,ng,Jw=function(n){function t(e){var i=n.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 F(t,n),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,r=e.next;i?i.next=r:this._head=r,r?r.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=wr()-this._pausedTime,r=i-this._time,o=this._head;o;){var a=o.next;o.step(i,r)&&(o.ondestroy(),this.removeClip(o)),o=a}this._time=i,e||(this.trigger("frame",r),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,os(function i(){e._running&&(os(i),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=wr(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=wr(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=wr()-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 r=new $u(e,i.loop);return this.addAnimator(r),r},t}(Vt),Qu=fe.domSupported,ec=(ng={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:tg=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:j(tg,function(n){var t=n.replace("mouse","pointer");return ng.hasOwnProperty(t)?t:n})}),$w=["mousemove","mouseup"],Qw=["pointermove","pointerup"],ig=!1;function tc(n){var t=n.pointerType;return t==="pen"||t==="touch"}function nc(n){n&&(n.zrByTouch=!0)}function rg(n,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===n.painterRoot);)e=e.parentNode;return i}var eS=function(n,t){this.stopPropagation=rt,this.stopImmediatePropagation=rt,this.preventDefault=rt,this.type=t.type,this.target=this.currentTarget=n.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},an={mousedown:function(n){n=Ft(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=Ft(this.dom,n);var t=this.__mayPointerCapture;!t||n.zrX===t[0]&&n.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=Ft(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){rg(this,(n=Ft(this.dom,n)).toElement||n.relatedTarget)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){ig=!0,n=Ft(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){ig||(n=Ft(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){nc(n=Ft(this.dom,n)),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),an.mousemove.call(this,n),an.mousedown.call(this,n)},touchmove:function(n){nc(n=Ft(this.dom,n)),this.handler.processGesture(n,"change"),an.mousemove.call(this,n)},touchend:function(n){nc(n=Ft(this.dom,n)),this.handler.processGesture(n,"end"),an.mouseup.call(this,n),+new Date-+this.__lastTouchMoment<300&&an.click.call(this,n)},pointerdown:function(n){an.mousedown.call(this,n)},pointermove:function(n){tc(n)||an.mousemove.call(this,n)},pointerup:function(n){an.mouseup.call(this,n)},pointerout:function(n){tc(n)||an.mouseout.call(this,n)}};D(["click","dblclick","contextmenu"],function(n){an[n]=function(t){t=Ft(this.dom,t),this.trigger(n,t)}});var ic={pointermove:function(n){tc(n)||ic.mousemove.call(this,n)},pointerup:function(n){ic.mouseup.call(this,n)},mousemove:function(n){this.trigger("mousemove",n)},mouseup:function(n){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",n),t&&(n.zrEventControl="only_globalout",this.trigger("mouseout",n))}};function vs(n,t,e,i){n.mounted[t]=e,n.listenerOpts[t]=i,Eu(n.domTarget,t,e,i)}function rc(n){var t,e,i,r,o=n.mounted;for(var a in o)o.hasOwnProperty(a)&&(t=n.domTarget,e=a,i=o[a],r=n.listenerOpts[a],t.removeEventListener(e,i,r));n.mounted={}}var og=function(n,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=n,this.domHandlers=t},tS=function(n){function t(e,i){var r,o,a,s=n.call(this)||this;return s.__pointerCapturing=!1,s.dom=e,s.painterRoot=i,s._localHandlerScope=new og(e,an),Qu&&(s._globalHandlerScope=new og(document,ic)),r=s,o=s._localHandlerScope,a=o.domHandlers,fe.pointerEventsSupported?D(ec.pointer,function(l){vs(o,l,function(u){a[l].call(r,u)})}):(fe.touchEventsSupported&&D(ec.touch,function(l){vs(o,l,function(u){a[l].call(r,u),function(c){c.touching=!0,c.touchTimer!=null&&(clearTimeout(c.touchTimer),c.touchTimer=null),c.touchTimer=setTimeout(function(){c.touching=!1,c.touchTimer=null},700)}(o)})}),D(ec.mouse,function(l){vs(o,l,function(u){u=Nu(u),o.touching||a[l].call(r,u)})})),s}return F(t,n),t.prototype.dispose=function(){rc(this._localHandlerScope),Qu&&rc(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,Qu&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?function(r,o){function a(s){vs(o,s,function(l){l=Nu(l),rg(r,l.target)||(l=function(u,c){return Ft(u.dom,new eS(u,c),!0)}(r,l),o.domHandlers[s].call(r,l))},{capture:!0})}fe.pointerEventsSupported?D(Qw,a):fe.touchEventsSupported||D($w,a)}(this,i):rc(i)}},t}(Vt),ag=1;fe.hasGlobalWindow&&(ag=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ms=ag,oc="#333",ac="#ccc",sg=yo;function Ri(n){return n>5e-5||n<-5e-5}var Ni=[],Sr=[],sc=[1,0,0,1,0,0],lc=Math.abs,ii=function(){function n(){}return n.prototype.getLocalTransform=function(t){return n.getLocalTransform(this,t)},n.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},n.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},n.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},n.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},n.prototype.needLocalTransform=function(){return Ri(this.rotation)||Ri(this.x)||Ri(this.y)||Ri(this.scaleX-1)||Ri(this.scaleY-1)||Ri(this.skewX)||Ri(this.skewY)},n.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;e||t?(i=i||[1,0,0,1,0,0],e?this.getLocalTransform(i):sg(i),t&&(e?_n(i,t,i):ts(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&(sg(i),this.invTransform=null)},n.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Ni);var i=Ni[0]<0?-1:1,r=Ni[1]<0?-1:1,o=((Ni[0]-i)*e+i)/Ni[0]||0,a=((Ni[1]-r)*e+r)/Ni[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ai(this.invTransform,t)},n.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},n.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],r=Math.atan2(t[1],t[0]),o=Math.PI/2+r-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(o),e=Math.sqrt(e),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],_n(Sr,t.invTransform,e),e=Sr);var i=this.originX,r=this.originY;(i||r)&&(sc[4]=i,sc[5]=r,_n(Sr,e,sc),Sr[4]-=i,Sr[5]-=r,e=Sr),this.setLocalTransform(e)}},n.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)},n.prototype.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&tt(i,i,r),i},n.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&tt(i,i,r),i},n.prototype.getLineScale=function(){var t=this.transform;return t&&lc(t[0]-1)>1e-10&&lc(t[3]-1)>1e-10?Math.sqrt(lc(t[0]*t[3]-t[2]*t[1])):1},n.prototype.copyTransform=function(t){(function(e,i){for(var r=0;r<Co.length;r++){var o=Co[r];e[o]=i[o]}})(this,t)},n.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,r=t.originY||0,o=t.scaleX,a=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,h=t.y,p=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(i||r||s||l){var f=i+s,g=r+l;e[4]=-f*o-p*g*a,e[5]=-g*a-d*f*o}else e[4]=e[5]=0;return e[0]=o,e[3]=a,e[1]=d*o,e[2]=p*a,u&&Ii(e,e,u),e[4]+=i+c,e[5]+=r+h,e},n.initDefaultProps=function(){var t=n.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}(),n}(),Co=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],lg={};function Rt(n,t){var e=lg[t=t||bi];e||(e=lg[t]=new bo(500));var i=e.get(n);return i==null&&(i=Bn.measureText(n,t).width,e.put(n,i)),i}function ug(n,t,e,i){var r=Rt(n,t),o=uc(t),a=Ao(0,r,e),s=Mr(0,o,i);return new me(a,s,r,o)}function Io(n,t,e,i){var r=((n||"")+"").split(`
  2. `);if(r.length===1)return ug(r[0],t,e,i);for(var o=new me(0,0,0,0),a=0;a<r.length;a++){var s=ug(r[a],t,e,i);a===0?o.copy(s):o.union(s)}return o}function Ao(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Mr(n,t,e){return e==="middle"?n-=t/2:e==="bottom"&&(n-=t),n}function uc(n){return Rt("\u56FD",n)}function bn(n,t){return typeof n=="string"?n.lastIndexOf("%")>=0?parseFloat(n)/100*t:parseFloat(n):n}function _s(n,t,e){var i=t.position||"inside",r=t.distance!=null?t.distance:5,o=e.height,a=e.width,s=o/2,l=e.x,u=e.y,c="left",h="top";if(i instanceof Array)l+=bn(i[0],e.width),u+=bn(i[1],e.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(n=n||{}).x=l,n.y=u,n.align=c,n.verticalAlign=h,n}var cc="__zr_normal__",hc=Co.concat(["ignore"]),nS=nn(Co,function(n,t){return n[t]=!0,n},{ignore:!1}),Tr={},iS=new me(0,0,0,0),xs=function(){function n(t){this.id=wu(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return n.prototype._init=function(t){this.attr(t)},n.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,o=e.innerTransformable,a=void 0,s=void 0,l=!1;o.parent=r?this:null;var u=!1;if(o.copyTransform(e),i.position!=null){var c=iS;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),r||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Tr,i,c):_s(Tr,i,c),o.x=Tr.x,o.y=Tr.y,a=Tr.align,s=Tr.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var p=void 0,d=void 0;h==="center"?(p=.5*c.width,d=.5*c.height):(p=bn(h[0],c.width),d=bn(h[1],c.height)),u=!0,o.originX=-o.x+p+(r?0:c.x),o.originY=-o.y+d+(r?0:c.y)}}i.rotation!=null&&(o.rotation=i.rotation);var f=i.offset;f&&(o.x+=f[0],o.y+=f[1],u||(o.originX=-f[0],o.originY=-f[1]));var g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,m=void 0,_=void 0;g&&this.canBeInsideText()?(v=i.insideFill,m=i.insideStroke,v!=null&&v!=="auto"||(v=this.getInsideTextFill()),m!=null&&m!=="auto"||(m=this.getInsideTextStroke(v),_=!0)):(v=i.outsideFill,m=i.outsideStroke,v!=null&&v!=="auto"||(v=this.getOutsideFill()),m!=null&&m!=="auto"||(m=this.getOutsideStroke(v),_=!0)),(v=v||"#000")===y.fill&&m===y.stroke&&_===y.autoStroke&&a===y.align&&s===y.verticalAlign||(l=!0,y.fill=v,y.stroke=m,y.autoStroke=_,y.align=a,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=1,l&&e.dirtyStyle(!0)}},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(t){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ac:oc},n.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&St(e);i||(i=[255,255,255,1]);for(var r=i[3],o=this.__zr.isDarkMode(),a=0;a<3;a++)i[a]=i[a]*r+(o?0:255)*(1-r);return i[3]=1,on(i,"rgba")},n.prototype.traverse=function(t,e){},n.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||{},H(this.extra,e)):this[t]=e},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(ne(t))for(var i=Oe(t),r=0;r<i.length;r++){var o=i[r];this.attrKV(o,t[o])}return this.markRedraw(),this},n.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,i=0;i<this.animators.length;i++){var r=this.animators[i],o=r.__fromStateTransition;if(!(r.getLoop()||o&&o!==cc)){var a=r.targetName,s=a?e[a]:e;r.saveTo(s)}}},n.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,hc)},n.prototype._savePrimaryToNormal=function(t,e,i){for(var r=0;r<i.length;r++){var o=i[r];t[o]==null||o in e||(e[o]=this[o])}},n.prototype.hasState=function(){return this.currentStates.length>0},n.prototype.getState=function(t){return this.states[t]},n.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},n.prototype.clearStates=function(t){this.useState(cc,!1,t)},n.prototype.useState=function(t,e,i,r){var o=t===cc;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(we(a,t)>=0)||!e&&a.length!==1){var l;if(this.stateProxy&&!o&&(l=this.stateProxy(t)),l||(l=this.states&&this.states[t]),l||o){o||this.saveCurrentToNormalState(l);var u=!!(l&&l.hoverLayer||r);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,l,this._normalState,e,!i&&!this.__inHover&&s&&s.duration>0,s);var c=this._textContent,h=this._textGuide;return c&&c.useState(t,e,i,u),h&&h.useState(t,e,i,u),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),l}qa("State "+t+" not exists.")}}},n.prototype.useStates=function(t,e,i){if(t.length){var r=[],o=this.currentStates,a=t.length,s=a===o.length;if(s){for(var l=0;l<a;l++)if(t[l]!==o[l]){s=!1;break}}if(s)return;for(l=0;l<a;l++){var u=t[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,t)),c||(c=this.states[u]),c&&r.push(c)}var h=r[a-1],p=!!(h&&h.hoverLayer||i);p&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(r),f=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(t.join(","),d,this._normalState,!1,!e&&!this.__inHover&&f&&f.duration>0,f);var g=this._textContent,y=this._textGuide;g&&g.useStates(t,e,p),y&&y.useStates(t,e,p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},n.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},n.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},n.prototype.removeState=function(t){var e=we(this.currentStates,t);if(e>=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},n.prototype.replaceState=function(t,e,i){var r=this.currentStates.slice(),o=we(r,t),a=we(r,e)>=0;o>=0?a?r.splice(o,1):r[o]=e:i&&!a&&r.push(e),this.useStates(r)},n.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},n.prototype._mergeStates=function(t){for(var e,i={},r=0;r<t.length;r++){var o=t[r];H(i,o),o.textConfig&&H(e=e||{},o.textConfig)}return e&&(i.textConfig=e),i},n.prototype._applyStateObj=function(t,e,i,r,o,a){var s=!(e&&r);e&&e.textConfig?(this.textConfig=H({},r?this.textConfig:i.textConfig),H(this.textConfig,e.textConfig)):s&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<hc.length;c++){var h=hc[c],p=o&&nS[h];e&&e[h]!=null?p?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&i[h]!=null&&(p?(u=!0,l[h]=i[h]):this[h]=i[h])}if(!o)for(c=0;c<this.animators.length;c++){var d=this.animators[c],f=d.targetName;d.getLoop()||d.__changeFinalValue(f?(e||i)[f]:e||i)}u&&this._transitionState(t,l,a)},n.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}},n.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},n.prototype.getClipPath=function(){return this._clipPath},n.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},n.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},n.prototype.getTextContent=function(){return this._textContent},n.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new ii,this._attachComponent(t),this._textContent=t,this.markRedraw())},n.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),H(this.textConfig,t),this.markRedraw()},n.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},n.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},n.prototype.getTextGuideLine=function(){return this._textGuide},n.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},n.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},n.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},n.prototype.dirty=function(){this.markRedraw()},n.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,i=this._textGuide;e&&(e.__inHover=t),i&&(i.__inHover=t)},n.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)}},n.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)}},n.prototype.animate=function(t,e,i){var r=t?this[t]:this,o=new $u(r,e,i);return t&&(o.targetName=t),this.addAnimator(o,t),o},n.prototype.addAnimator=function(t,e){var i=this.__zr,r=this;t.during(function(){r.updateDuringAnimation(e)}).done(function(){var o=r.animators,a=we(o,t);a>=0&&o.splice(a,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},n.prototype.updateDuringAnimation=function(t){this.markRedraw()},n.prototype.stopAnimation=function(t,e){for(var i=this.animators,r=i.length,o=[],a=0;a<r;a++){var s=i[a];t&&t!==s.scope?o.push(s):s.stop(e)}return this.animators=o,this},n.prototype.animateTo=function(t,e,i){pc(this,t,e,i)},n.prototype.animateFrom=function(t,e,i){pc(this,t,e,i,!0)},n.prototype._transitionState=function(t,e,i,r){for(var o=pc(this,e,i,r),a=0;a<o.length;a++)o[a].__fromStateTransition=t},n.prototype.getBoundingRect=function(){return null},n.prototype.getPaintRect=function(){return null},n.initDefaultProps=function(){var t=n.prototype;function e(i,r,o,a){function s(l,u){Object.defineProperty(u,0,{get:function(){return l[o]},set:function(c){l[o]=c}}),Object.defineProperty(u,1,{get:function(){return l[a]},set:function(c){l[a]=c}})}Object.defineProperty(t,i,{get:function(){return this[r]||s(this,this[r]=[]),this[r]},set:function(l){this[o]=l[0],this[a]=l[1],this[r]=l,s(this,l)}})}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),n}();function pc(n,t,e,i,r){var o=[];cg(n,"",n,t,e=e||{},i,o,r);var a=o.length,s=!1,l=e.done,u=e.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},h=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&e.during&&o[0].during(function(f,g){e.during(g)});for(var p=0;p<o.length;p++){var d=o[p];c&&d.done(c),h&&d.aborted(h),e.force&&d.duration(e.duration),d.start(e.easing)}return o}function dc(n,t,e){for(var i=0;i<e;i++)n[i]=t[i]}function rS(n,t,e){if(ft(t[e]))if(ft(n[e])||(n[e]=[]),gt(t[e])){var i=t[e].length;n[e].length!==i&&(n[e]=new t[e].constructor(i),dc(n[e],t[e],i))}else{var r=t[e],o=n[e],a=r.length;if(ft(r[0]))for(var s=r[0].length,l=0;l<a;l++)o[l]?dc(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else dc(o,r,a);o.length=r.length}else n[e]=t[e]}function cg(n,t,e,i,r,o,a,s){for(var l=Oe(i),u=r.duration,c=r.delay,h=r.additive,p=r.setToFinal,d=!ne(o),f=n.animators,g=[],y=0;y<l.length;y++){var v=l[y],m=i[v];if(m!=null&&e[v]!=null&&(d||o[v]))if(!ne(m)||ft(m)||ho(m))g.push(v);else{if(t){s||(e[v]=m,n.updateDuringAnimation(t));continue}cg(n,v,e[v],m,r,o&&o[v],a,s)}else s||(e[v]=m,n.updateDuringAnimation(t),g.push(v))}var _=g.length;if(!h&&_){for(var x=0;x<f.length;x++)if((w=f[x]).targetName===t&&w.stopTracks(g)){var b=we(f,w);f.splice(b,1)}}if(r.force||(g=He(g,function(I){return!((T=i[I])===(A=e[I])||ft(T)&&ft(A)&&function(k,L){var O=k.length;if(O!==L.length)return!1;for(var P=0;P<O;P++)if(k[P]!==L[P])return!1;return!0}(T,A));var T,A}),_=g.length),_>0||r.force&&!a.length){var w,M=void 0,S=void 0,C=void 0;if(s)for(S={},p&&(M={}),x=0;x<_;x++)S[v=g[x]]=e[v],p?M[v]=i[v]:e[v]=i[v];else if(p)for(C={},x=0;x<_;x++)C[v=g[x]]=fs(e[v]),rS(e,i,v);(w=new $u(e,!1,!1,h?He(f,function(I){return I.targetName===t}):null)).targetName=t,r.scope&&(w.scope=r.scope),p&&M&&w.whenWithKeys(0,M,g),C&&w.whenWithKeys(0,C,g),w.whenWithKeys(u??500,s?S:i,g).delay(c||0),n.addAnimator(w,t),a.push(w)}}at(xs,Vt),at(xs,ii);var _e=function(n){function t(e){var i=n.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return F(t,n),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,r=0;r<i.length;r++)if(i[r].name===e)return i[r]},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 r=this._children,o=r.indexOf(i);o>=0&&(r.splice(o,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var r=we(this._children,e);return r>=0&&this.replaceAt(i,r),this},t.prototype.replaceAt=function(e,i){var r=this._children,o=r[i];if(e&&e!==this&&e.parent!==this&&e!==o){r[i]=e,o.parent=null;var a=this.__zr;a&&o.removeSelfFromZr(a),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,r=this._children,o=we(r,e);return o<0||(r.splice(o,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,r=0;r<e.length;r++){var o=e[r];i&&o.removeSelfFromZr(i),o.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,i){for(var r=this._children,o=0;o<r.length;o++){var a=r[o];e.call(i,a,o)}return this},t.prototype.traverse=function(e,i){for(var r=0;r<this._children.length;r++){var o=this._children[r],a=e.call(i,o);o.isGroup&&!a&&o.traverse(e,i)}return this},t.prototype.addSelfToZr=function(e){n.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].addSelfToZr(e)},t.prototype.removeSelfFromZr=function(e){n.prototype.removeSelfFromZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].removeSelfFromZr(e)},t.prototype.getBoundingRect=function(e){for(var i=new me(0,0,0,0),r=e||this._children,o=[],a=null,s=0;s<r.length;s++){var l=r[s];if(!l.ignore&&!l.invisible){var u=l.getBoundingRect(),c=l.getLocalTransform(o);c?(me.applyTransform(i,u,c),(a=a||i.clone()).union(i)):(a=a||u.clone()).union(u)}}return a||i},t}(xs);_e.prototype.type="group";var fc,bs={},Ei={},oS=function(){function n(t,e,i){var r=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 o=new Vw,a=i.renderer||"canvas";bs[a]||(a=Oe(bs)[0]),i.useDirtyRect=i.useDirtyRect!=null&&i.useDirtyRect;var s=new bs[a](e,o,i,t),l=i.ssr||s.ssrOnly;this.storage=o,this.painter=s;var u,c=fe.node||fe.worker||l?null:new tS(s.getViewportRoot(),s.root),h=i.useCoarsePointer;(h==null||h==="auto"?fe.touchEventsSupported:h)&&(u=xe(i.pointerSize,44)),this.handler=new Lf(o,s,c,s.root,u),this.animation=new Jw({stage:{update:l?null:function(){return r._flush(!0)}}}),l||this.animation.start()}return n.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},n.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},n.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},n.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(e){if(!e)return!1;if(typeof e=="string")return Mo(e,1)<.4;if(e.colorStops){for(var i=e.colorStops,r=0,o=i.length,a=0;a<o;a++)r+=Mo(i[a].color,1);return(r/=o)<.4}return!1}(t))},n.prototype.getBackgroundColor=function(){return this._backgroundColor},n.prototype.setDarkMode=function(t){this._darkMode=t},n.prototype.isDarkMode=function(){return this._darkMode},n.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},n.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},n.prototype.flush=function(){this._disposed||this._flush(!1)},n.prototype._flush=function(t){var e,i=wr();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var r=wr();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},n.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},n.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},n.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},n.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},n.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof _e&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},n.prototype.dispose=function(){var t;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,t=this.id,delete Ei[t])},n}();function gc(n,t){var e=new oS(wu(),n,t);return Ei[e.id]=e,e}function hg(n,t){bs[n]=t}function pg(n){fc=n}const aS=Object.freeze(Object.defineProperty({__proto__:null,dispose:function(n){n.dispose()},disposeAll:function(){for(var n in Ei)Ei.hasOwnProperty(n)&&Ei[n].dispose();Ei={}},getElementSSRData:function(n){if(typeof fc=="function")return fc(n)},getInstance:function(n){return Ei[n]},init:gc,registerPainter:hg,registerSSRDataGetter:pg,version:"5.6.0"},Symbol.toStringTag,{value:"Module"}));function Fe(n,t,e,i){var r=t[0],o=t[1],a=e[0],s=e[1],l=o-r,u=s-a;if(l===0)return u===0?a:(a+s)/2;if(i)if(l>0){if(n<=r)return a;if(n>=o)return s}else{if(n>=r)return a;if(n<=o)return s}else{if(n===r)return a;if(n===o)return s}return(n-r)/l*u+a}function ee(n,t){switch(n){case"center":case"middle":n="50%";break;case"left":case"top":n="0%";break;case"right":case"bottom":n="100%"}return Q(n)?(e=n,e.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(n)/100*t:parseFloat(n):n==null?NaN:+n;var e}function We(n,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),20),n=(+n).toFixed(t),e?n:+n}function Do(n){return n.sort(function(t,e){return t-e}),n}function wn(n){if(n=+n,isNaN(n))return 0;if(n>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(n*t)/t===n)return e}return dg(n)}function dg(n){var t=n.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,r=e>0?e:t.length,o=t.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function yc(n,t){var e=Math.log,i=Math.LN10,r=Math.floor(e(n[1]-n[0])/i),o=Math.round(e(Math.abs(t[1]-t[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function fg(n,t){var e=nn(n,function(d,f){return d+(isNaN(f)?0:f)},0);if(e===0)return[];for(var i=Math.pow(10,t),r=j(n,function(d){return(isNaN(d)?0:d)/e*i*100}),o=100*i,a=j(r,function(d){return Math.floor(d)}),s=nn(a,function(d,f){return d+f},0),l=j(r,function(d,f){return d-a[f]});s<o;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,p=l.length;h<p;++h)l[h]>u&&(u=l[h],c=h);++a[c],l[c]=0,++s}return j(a,function(d){return d/i})}function sS(n,t){var e=Math.max(wn(n),wn(t)),i=n+t;return e>20?i:We(i,e)}function vc(n){var t=2*Math.PI;return(n%t+t)%t}function ko(n){return n>-1e-4&&n<1e-4}var lS=/^(?:(\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 Wt(n){if(n instanceof Date)return n;if(Q(n)){var t=lS.exec(n);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))}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)}return n==null?new Date(NaN):new Date(Math.round(n))}function gg(n){return Math.pow(10,ws(n))}function ws(n){if(n===0)return 0;var t=Math.floor(Math.log(n)/Math.LN10);return n/Math.pow(10,t)>=10&&t++,t}function mc(n,t){var e=ws(n),i=Math.pow(10,e),r=n/i;return n=(t?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,e>=-20?+n.toFixed(e<0?-e:0):n}function _c(n){n.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i<n.length;){for(var r=n[i].interval,o=n[i].close,a=0;a<2;a++)r[a]<=t&&(r[a]=t,o[a]=a?1:1-e),t=r[a],e=o[a];r[0]===r[1]&&o[0]*o[1]!=1?n.splice(i,1):i++}return n;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]==(c?-1:1)||!c&&s(l,u,1))}}function Lo(n){var t=parseFloat(n);return t==n&&(t!==0||!Q(n)||n.indexOf("x")<=0)?t:NaN}function xc(n){return!isNaN(Lo(n))}function yg(){return Math.round(9*Math.random())}function vg(n,t){return t===0?n:vg(t,n%t)}function mg(n,t){return n==null?t:t==null?n:n*t/vg(n,t)}function Mt(n){throw new Error(n)}function _g(n,t,e){return(t-n)*e+n}typeof console<"u";var xg="series\0",bg="\0_ec_\0";function Ke(n){return n instanceof Array?n:n==null?[]:[n]}function Po(n,t,e){if(n){n[t]=n[t]||{},n.emphasis=n.emphasis||{},n.emphasis[t]=n.emphasis[t]||{};for(var i=0,r=e.length;i<r;i++){var o=e[i];!n.emphasis[t].hasOwnProperty(o)&&n[t].hasOwnProperty(o)&&(n.emphasis[t][o]=n[t][o])}}}var wg=["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 Oo(n){return!ne(n)||Y(n)||n instanceof Date?n:n.value}function uS(n){return ne(n)&&!(n instanceof Array)}function Sg(n,t,e){var i=sn(t[n],null),r=sn(e[n],null);return i!=null&&r!=null&&i===r}function Ro(n){return sn(n,"")}function sn(n,t){return n==null?t:Q(n)?n:Ae(n)||ja(n)?n+"":t}function bc(n){var t=n.name;return!(!t||!t.indexOf(xg))}function No(n){return n&&n.id!=null&&Ro(n.id).indexOf(bg)===0}function zi(n,t){return t.dataIndexInside!=null?t.dataIndexInside:t.dataIndex!=null?Y(t.dataIndex)?j(t.dataIndex,function(e){return n.indexOfRawIndex(e)}):n.indexOfRawIndex(t.dataIndex):t.name!=null?Y(t.name)?j(t.name,function(e){return n.indexOfName(e)}):n.indexOfName(t.name):void 0}function Ee(){var n="__ec_inner_"+cS++;return function(t){return t[n]||(t[n]={})}}var cS=yg();function Eo(n,t,e){var i=wc(t,e),r=i.mainTypeSpecified,o=i.queryOptionMap,a=i.others,s=e?e.defaultMainType:null;return!r&&s&&o.set(s,{}),o.each(function(l,u){var c=zo(n,u,l,{useDefault:s===u,enableAll:!e||e.enableAll==null||e.enableAll,enableNone:!e||e.enableNone==null||e.enableNone});a[u+"Models"]=c.models,a[u+"Model"]=c.models[0]}),a}function wc(n,t){var e;if(Q(n)){var i={};i[n+"Index"]=0,e=i}else e=n;var r=re(),o={},a=!1;return D(e,function(s,l){if(l!=="dataIndex"&&l!=="dataIndexInside"){var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();!c||!h||t&&t.includeMainTypes&&we(t.includeMainTypes,c)<0||(a=a||!!c,(r.get(c)||r.set(c,{}))[h]=s)}else o[l]=s}),{mainTypeSpecified:a,queryOptionMap:r,others:o}}var Qe={useDefault:!0,enableAll:!1,enableNone:!1},hS={useDefault:!1,enableAll:!0,enableNone:!0};function zo(n,t,e,i){i=i||Qe;var r=e.index,o=e.id,a=e.name,s={models:null,specified:r!=null||o!=null||a!=null};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=n.getComponent(t))?[l]:[],s}return r==="none"||r===!1?(Ot(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(r==="all"&&(Ot(i.enableAll,'`"all"` is not a valid value on index option.'),r=o=a=null),s.models=n.queryComponents({mainType:t,index:r,id:o,name:a}),s)}function Mg(n,t,e){n.setAttribute?n.setAttribute(t,e):n[t]=e}function Tg(n,t,e,i,r){var o=t==null||t==="auto";if(i==null)return i;if(Ae(i))return We(f=_g(e||0,i,r),o?Math.max(wn(e||0),wn(i)):t);if(Q(i))return r<1?e:i;for(var a=[],s=e,l=i,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var h=n.getDimensionInfo(c);if(h&&h.type==="ordinal")a[c]=(r<1&&s?s:l)[c];else{var p=s&&s[c]?s[c]:0,d=l[c],f=_g(p,d,r);a[c]=We(f,o?Math.max(wn(p),wn(d)):t)}}return a}var Bi="___EC__COMPONENT__CONTAINER___",Cg="___EC__EXTENDED_CLASS___";function Sn(n){var t={main:"",sub:""};if(n){var e=n.split(".");t.main=e[0]||"",t.sub=e[1]||""}return t}function Sc(n,t){n.$constructor=n,n.extend=function(e){var i,r,o=this;return ue(r=o)&&/^class\s/.test(Function.prototype.toString.call(r))?i=function(a){function s(){return a.apply(this,arguments)||this}return F(s,a),s}(o):(i=function(){(e.$constructor||o).apply(this,arguments)},Su(i,this)),H(i.prototype,e),i[Cg]=!0,i.extend=this.extend,i.superCall=dS,i.superApply=fS,i.superClass=o,i}}function Ig(n,t){n.extend=t.extend}var pS=Math.round(10*Math.random());function dS(n,t){for(var e=[],i=2;i<arguments.length;i++)e[i-2]=arguments[i];return this.superClass.prototype[t].apply(n,e)}function fS(n,t,e){return this.superClass.prototype[t].apply(n,e)}function Ss(n){var t={};n.registerClass=function(e){var i,r=e.type||e.prototype.type;if(r){Ot(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i=r),'componentType "'+i+'" illegal'),e.prototype.type=r;var o=Sn(r);if(o.sub){if(o.sub!==Bi){var a=function(s){var l=t[s.main];return l&&l[Bi]||((l=t[s.main]={})[Bi]=!0),l}(o);a[o.sub]=e}}else t[o.main]=e}return e},n.getClass=function(e,i,r){var o=t[e];if(o&&o[Bi]&&(o=i?o[i]:null),r&&!o)throw new Error(i?"Component "+e+"."+(i||"")+" is used but not imported.":e+".type should be specified.");return o},n.getClassesByMainType=function(e){var i=Sn(e),r=[],o=t[i.main];return o&&o[Bi]?D(o,function(a,s){s!==Bi&&r.push(a)}):r.push(o),r},n.hasClass=function(e){var i=Sn(e);return!!t[i.main]},n.getAllClassMainTypes=function(){var e=[];return D(t,function(i,r){e.push(r)}),e},n.hasSubTypes=function(e){var i=Sn(e),r=t[i.main];return r&&r[Bi]}}function Cr(n,t){for(var e=0;e<n.length;e++)n[e][1]||(n[e][1]=n[e][0]);return t=t||!1,function(i,r,o){for(var a={},s=0;s<n.length;s++){var l=n[s][1];if(!(r&&we(r,l)>=0||o&&we(o,l)<0)){var u=i.getShallow(l,t);u!=null&&(a[n[s][0]]=u)}}return a}}var gS=Cr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),yS=function(){function n(){}return n.prototype.getAreaStyle=function(t,e){return gS(this,t,e)},n}(),Mc=new bo(50);function vS(n){if(typeof n=="string"){var t=Mc.get(n);return t&&t.image}return n}function Ag(n,t,e,i,r){if(n){if(typeof n=="string"){if(t&&t.__zrImageSrc===n||!e)return t;var o=Mc.get(n),a={hostEl:e,cb:i,cbPayload:r};return o?!Ms(t=o.image)&&o.pending.push(a):((t=Bn.loadImage(n,Dg,Dg)).__zrImageSrc=n,Mc.put(n,t.__cachedImgObj={image:t,pending:[a]})),t}return n}return t}function Dg(){var n=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<n.pending.length;t++){var e=n.pending[t],i=e.cb;i&&i(this,e.cbPayload),e.hostEl.dirty()}n.pending.length=0}function Ms(n){return n&&n.width&&n.height}var Tc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function kg(n,t,e,i,r){if(!t)return"";var o=(n+"").split(`
  3. `);r=Lg(t,e,i,r);for(var a=0,s=o.length;a<s;a++)o[a]=Pg(o[a],r);return o.join(`
  4. `)}function Lg(n,t,e,i){var r=H({},i=i||{});r.font=t,e=xe(e,"..."),r.maxIterations=xe(i.maxIterations,2);var o=r.minChar=xe(i.minChar,0);r.cnCharWidth=Rt("\u56FD",t);var a=r.ascCharWidth=Rt("a",t);r.placeholder=xe(i.placeholder,"");for(var s=n=Math.max(0,n-1),l=0;l<o&&s>=a;l++)s-=a;var u=Rt(e,t);return u>s&&(e="",u=0),s=n-u,r.ellipsis=e,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=n,r}function Pg(n,t){var e=t.containerWidth,i=t.font,r=t.contentWidth;if(!e)return"";var o=Rt(n,i);if(o<=e)return n;for(var a=0;;a++){if(o<=r||a>=t.maxIterations){n+=t.ellipsis;break}var s=a===0?mS(n,r,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(n.length*r/o):0;o=Rt(n=n.substr(0,s),i)}return n===""&&(n=t.placeholder),n}function mS(n,t,e,i){for(var r=0,o=0,a=n.length;o<a&&r<t;o++){var s=n.charCodeAt(o);r+=0<=s&&s<=127?e:i}return o}var _S=function(){},Og=function(n){this.tokens=[],n&&(this.tokens=n)},xS=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Cc(n,t,e,i,r){var o,a,s=t==="",l=r&&e.rich[r]||{},u=n.lines,c=l.font||e.font,h=!1;if(i){var p=l.padding,d=p?p[1]+p[3]:0;if(l.width!=null&&l.width!=="auto"){var f=bn(l.width,i.width)+d;u.length>0&&f+i.accumWidth>i.width&&(o=t.split(`
  5. `),h=!0),i.accumWidth=f}else{var g=Rg(t,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=t.split(`
  6. `);for(var y=0;y<o.length;y++){var v=o[y],m=new _S;if(m.styleName=r,m.text=v,m.isLineHolder=!v&&!s,typeof l.width=="number"?m.width=l.width:m.width=a?a[y]:Rt(v,c),y||h)u.push(new Og([m]));else{var _=(u[u.length-1]||(u[0]=new Og)).tokens,x=_.length;x===1&&_[0].isLineHolder?_[0]=m:(v||!x||s)&&_.push(m)}}}var bS=nn(",&?/;] ".split(""),function(n,t){return n[t]=!0,n},{});function wS(n){return!function(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(n)||!!bS[n]}function Rg(n,t,e,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;h<n.length;h++){var p=n.charAt(h);if(p!==`
  7. `){var d=Rt(p,t),f=!i&&!wS(p);(o.length?c+d>e:r+c+d>e)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(c+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=n,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),o.length===1&&(c+=r),{accumWidth:c,lines:o,linesWidths:a}}var Ic="__zr_style_"+Math.round(10*Math.random()),Vi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ts={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Vi[Ic]=!0;var Ng=["z","z2","invisible"],SS=["invisible"],Fi=function(n){function t(i){return n.call(this,i)||this}var e;return F(t,n),t.prototype._init=function(i){for(var r=Oe(i),o=0;o<r.length;o++){var a=r[o];a==="style"?this.useStyle(i[a]):n.prototype.attrKV.call(this,a,i[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(i,r,o,a){var s,l,u,c=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&(s=this,l=i,u=r,Ac.copy(s.getBoundingRect()),s.transform&&Ac.applyTransform(s.transform),Dc.width=l,Dc.height=u,!Ac.intersect(Dc))||c&&!c[0]&&!c[3])return!1;if(o&&this.__clipPaths){for(var h=0;h<this.__clipPaths.length;++h)if(this.__clipPaths[h].isZeroArea())return!1}if(a&&this.parent)for(var p=this.parent;p;){if(p.ignore)return!1;p=p.parent}return!0},t.prototype.contain=function(i,r){return this.rectContain(i,r)},t.prototype.traverse=function(i,r){i.call(r,this)},t.prototype.rectContain=function(i,r){var o=this.transformCoordToLocal(i,r);return this.getBoundingRect().contain(o[0],o[1])},t.prototype.getPaintRect=function(){var i=this._paintRect;if(!this._paintRect||this.__dirty){var r=this.transform,o=this.getBoundingRect(),a=this.style,s=a.shadowBlur||0,l=a.shadowOffsetX||0,u=a.shadowOffsetY||0;i=this._paintRect||(this._paintRect=new me(0,0,0,0)),r?me.applyTransform(i,o,r):i.copy(o),(s||l||u)&&(i.width+=2*s+Math.abs(l),i.height+=2*s+Math.abs(u),i.x=Math.min(i.x,i.x+l-s),i.y=Math.min(i.y,i.y+u-s));var c=this.dirtyRectTolerance;i.isZero()||(i.x=Math.floor(i.x-c),i.y=Math.floor(i.y-c),i.width=Math.ceil(i.width+1+2*c),i.height=Math.ceil(i.height+1+2*c))}return i},t.prototype.setPrevPaintRect=function(i){i?(this._prevPaintRect=this._prevPaintRect||new me(0,0,0,0),this._prevPaintRect.copy(i)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(i){return this.animate("style",i)},t.prototype.updateDuringAnimation=function(i){i==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(i,r){i!=="style"?n.prototype.attrKV.call(this,i,r):this.style?this.setStyle(r):this.useStyle(r)},t.prototype.setStyle=function(i,r){return typeof i=="string"?this.style[i]=r:H(this.style,i),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(i){i||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(i){return go(Vi,i)},t.prototype.useStyle=function(i){i[Ic]||(i=this.createStyle(i)),this.__inHover?this.__hoverStyle=i:this.style=i,this.dirtyStyle()},t.prototype.isStyleObject=function(i){return i[Ic]},t.prototype._innerSaveToNormal=function(i){n.prototype._innerSaveToNormal.call(this,i);var r=this._normalState;i.style&&!r.style&&(r.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(i,r,Ng)},t.prototype._applyStateObj=function(i,r,o,a,s,l){n.prototype._applyStateObj.call(this,i,r,o,a,s,l);var u,c=!(r&&a);if(r&&r.style?s?a?u=r.style:(u=this._mergeStyle(this.createStyle(),o.style),this._mergeStyle(u,r.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:o.style),this._mergeStyle(u,r.style)):c&&(u=o.style),u)if(s){var h=this.style;if(this.style=this.createStyle(c?{}:h),c)for(var p=Oe(h),d=0;d<p.length;d++)(g=p[d])in u&&(u[g]=u[g],this.style[g]=h[g]);var f=Oe(u);for(d=0;d<f.length;d++){var g=f[d];this.style[g]=this.style[g]}this._transitionState(i,{style:u},l,this.getAnimationStyleProps())}else this.useStyle(u);var y=this.__inHover?SS:Ng;for(d=0;d<y.length;d++)g=y[d],r&&r[g]!=null?this[g]=r[g]:c&&o[g]!=null&&(this[g]=o[g])},t.prototype._mergeStates=function(i){for(var r,o=n.prototype._mergeStates.call(this,i),a=0;a<i.length;a++){var s=i[a];s.style&&(r=r||{},this._mergeStyle(r,s.style))}return r&&(o.style=r),o},t.prototype._mergeStyle=function(i,r){return H(i,r),i},t.prototype.getAnimationStyleProps=function(){return Ts},t.initDefaultProps=((e=t.prototype).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,void(e.__dirty=3)),t}(xs),Ac=new me(0,0,0,0),Dc=new me(0,0,0,0),Xt=Math.min,Ut=Math.max,kc=Math.sin,Lc=Math.cos,Gi=2*Math.PI,Cs=Si(),Is=Si(),As=Si();function Eg(n,t,e,i,r,o){r[0]=Xt(n,e),r[1]=Xt(t,i),o[0]=Ut(n,e),o[1]=Ut(t,i)}var zg=[],Bg=[];function MS(n,t,e,i,r,o,a,s,l,u){var c=Hf,h=$e,p=c(n,e,r,a,zg);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<p;d++){var f=h(n,e,r,a,zg[d]);l[0]=Xt(f,l[0]),u[0]=Ut(f,u[0])}for(p=c(t,i,o,s,Bg),d=0;d<p;d++){var g=h(t,i,o,s,Bg[d]);l[1]=Xt(g,l[1]),u[1]=Ut(g,u[1])}l[0]=Xt(n,l[0]),u[0]=Ut(n,u[0]),l[0]=Xt(a,l[0]),u[0]=Ut(a,u[0]),l[1]=Xt(t,l[1]),u[1]=Ut(t,u[1]),l[1]=Xt(s,l[1]),u[1]=Ut(s,u[1])}function TS(n,t,e,i,r,o,a,s){var l=Uf,u=st,c=Ut(Xt(l(n,e,r),1),0),h=Ut(Xt(l(t,i,o),1),0),p=u(n,e,r,c),d=u(t,i,o,h);a[0]=Xt(n,r,p),a[1]=Xt(t,o,d),s[0]=Ut(n,r,p),s[1]=Ut(t,o,d)}function CS(n,t,e,i,r,o,a,s,l){var u=Fn,c=Gn,h=Math.abs(r-o);if(h%Gi<1e-4&&h>1e-4)return s[0]=n-e,s[1]=t-i,l[0]=n+e,void(l[1]=t+i);if(Cs[0]=Lc(r)*e+n,Cs[1]=kc(r)*i+t,Is[0]=Lc(o)*e+n,Is[1]=kc(o)*i+t,u(s,Cs,Is),c(l,Cs,Is),(r%=Gi)<0&&(r+=Gi),(o%=Gi)<0&&(o+=Gi),r>o&&!a?o+=Gi:r<o&&a&&(r+=Gi),a){var p=o;o=r,r=p}for(var d=0;d<o;d+=Math.PI/2)d>r&&(As[0]=Lc(d)*e+n,As[1]=kc(d)*i+t,u(s,As,s),c(l,As,l))}var De={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Hi=[],Wi=[],Mn=[],ri=[],Tn=[],Cn=[],Pc=Math.min,Oc=Math.max,Xi=Math.cos,Ui=Math.sin,Wn=Math.abs,Rc=Math.PI,oi=2*Rc,Nc=typeof Float32Array<"u",Bo=[];function Ec(n){return Math.round(n/Rc*1e8)/1e8%2*Rc}function zc(n,t){var e=Ec(n[0]);e<0&&(e+=oi);var i=e-n[0],r=n[1];r+=i,!t&&r-e>=oi?r=e+oi:t&&e-r>=oi?r=e-oi:!t&&e>r?r=e+(oi-Ec(e-r)):t&&e<r&&(r=e-(oi-Ec(r-e))),n[0]=e,n[1]=r}var ai=function(){function n(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 n.prototype.increaseVersion=function(){this._version++},n.prototype.getVersion=function(){return this._version},n.prototype.setScale=function(t,e,i){(i=i||0)>0&&(this._ux=Wn(i/ms/t)||0,this._uy=Wn(i/ms/e)||0)},n.prototype.setDPR=function(t){this.dpr=t},n.prototype.setContext=function(t){this._ctx=t},n.prototype.getContext=function(){return this._ctx},n.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},n.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},n.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(De.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},n.prototype.lineTo=function(t,e){var i=Wn(t-this._xi),r=Wn(e-this._yi),o=i>this._ux||r>this._uy;if(this.addData(De.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var a=i*i+r*r;a>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=a)}return this},n.prototype.bezierCurveTo=function(t,e,i,r,o,a){return this._drawPendingPt(),this.addData(De.C,t,e,i,r,o,a),this._ctx&&this._ctx.bezierCurveTo(t,e,i,r,o,a),this._xi=o,this._yi=a,this},n.prototype.quadraticCurveTo=function(t,e,i,r){return this._drawPendingPt(),this.addData(De.Q,t,e,i,r),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,r),this._xi=i,this._yi=r,this},n.prototype.arc=function(t,e,i,r,o,a){this._drawPendingPt(),Bo[0]=r,Bo[1]=o,zc(Bo,a),r=Bo[0];var s=(o=Bo[1])-r;return this.addData(De.A,t,e,i,i,r,s,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,o,a),this._xi=Xi(o)*i+t,this._yi=Ui(o)*i+e,this},n.prototype.arcTo=function(t,e,i,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,r,o),this},n.prototype.rect=function(t,e,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,r),this.addData(De.R,t,e,i,r),this},n.prototype.closePath=function(){this._drawPendingPt(),this.addData(De.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},n.prototype.fill=function(t){t&&t.fill(),this.toStatic()},n.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},n.prototype.len=function(){return this._len},n.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Nc||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},n.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,r=this._len,o=0;o<e;o++)i+=t[o].len();for(Nc&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i)),o=0;o<e;o++)for(var a=t[o].data,s=0;s<a.length;s++)this.data[r++]=a[s];this._len=r},n.prototype.addData=function(t,e,i,r,o,a,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},n.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},n.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}},n.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Nc&&this._len>11&&(this.data=new Float32Array(t)))}},n.prototype.getBoundingRect=function(){Mn[0]=Mn[1]=Tn[0]=Tn[1]=Number.MAX_VALUE,ri[0]=ri[1]=Cn[0]=Cn[1]=-Number.MAX_VALUE;var t,e=this.data,i=0,r=0,o=0,a=0;for(t=0;t<this._len;){var s=e[t++],l=t===1;switch(l&&(o=i=e[t],a=r=e[t+1]),s){case De.M:i=o=e[t++],r=a=e[t++],Tn[0]=o,Tn[1]=a,Cn[0]=o,Cn[1]=a;break;case De.L:Eg(i,r,e[t],e[t+1],Tn,Cn),i=e[t++],r=e[t++];break;case De.C:MS(i,r,e[t++],e[t++],e[t++],e[t++],e[t],e[t+1],Tn,Cn),i=e[t++],r=e[t++];break;case De.Q:TS(i,r,e[t++],e[t++],e[t],e[t+1],Tn,Cn),i=e[t++],r=e[t++];break;case De.A:var u=e[t++],c=e[t++],h=e[t++],p=e[t++],d=e[t++],f=e[t++]+d;t+=1;var g=!e[t++];l&&(o=Xi(d)*h+u,a=Ui(d)*p+c),CS(u,c,h,p,d,f,g,Tn,Cn),i=Xi(f)*h+u,r=Ui(f)*p+c;break;case De.R:Eg(o=i=e[t++],a=r=e[t++],o+e[t++],a+e[t++],Tn,Cn);break;case De.Z:i=o,r=a}Fn(Mn,Mn,Tn),Gn(ri,ri,Cn)}return t===0&&(Mn[0]=Mn[1]=ri[0]=ri[1]=0),new me(Mn[0],Mn[1],ri[0]-Mn[0],ri[1]-Mn[1])},n.prototype._calculateLength=function(){var t=this.data,e=this._len,i=this._ux,r=this._uy,o=0,a=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,p=0;p<e;){var d=t[p++],f=p===1;f&&(s=o=t[p],l=a=t[p+1]);var g=-1;switch(d){case De.M:o=s=t[p++],a=l=t[p++];break;case De.L:var y=t[p++],v=(x=t[p++])-a;(Wn(L=y-o)>i||Wn(v)>r||p===e-1)&&(g=Math.sqrt(L*L+v*v),o=y,a=x);break;case De.C:var m=t[p++],_=t[p++],x=(y=t[p++],t[p++]),b=t[p++],w=t[p++];g=Fw(o,a,m,_,y,x,b,w,10),o=b,a=w;break;case De.Q:g=Gw(o,a,m=t[p++],_=t[p++],y=t[p++],x=t[p++],10),o=y,a=x;break;case De.A:var M=t[p++],S=t[p++],C=t[p++],I=t[p++],T=t[p++],A=t[p++],k=A+T;p+=1,f&&(s=Xi(T)*C+M,l=Ui(T)*I+S),g=Oc(C,I)*Pc(oi,Math.abs(A)),o=Xi(k)*C+M,a=Ui(k)*I+S;break;case De.R:s=o=t[p++],l=a=t[p++],g=2*t[p++]+2*t[p++];break;case De.Z:var L=s-o;v=l-a,g=Math.sqrt(L*L+v*v),o=s,a=l}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},n.prototype.rebuildPath=function(t,e){var i,r,o,a,s,l,u,c,h,p,d=this.data,f=this._ux,g=this._uy,y=this._len,v=e<1,m=0,_=0,x=0;if(!v||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,c=e*this._pathLen))e:for(var b=0;b<y;){var w=d[b++],M=b===1;switch(M&&(i=o=d[b],r=a=d[b+1]),w!==De.L&&x>0&&(t.lineTo(h,p),x=0),w){case De.M:i=o=d[b++],r=a=d[b++],t.moveTo(o,a);break;case De.L:s=d[b++],l=d[b++];var S=Wn(s-o),C=Wn(l-a);if(S>f||C>g){if(v){if(m+($=u[_++])>c){var I=(c-m)/$;t.lineTo(o*(1-I)+s*I,a*(1-I)+l*I);break e}m+=$}t.lineTo(s,l),o=s,a=l,x=0}else{var T=S*S+C*C;T>x&&(h=s,p=l,x=T)}break;case De.C:var A=d[b++],k=d[b++],L=d[b++],O=d[b++],P=d[b++],R=d[b++];if(v){if(m+($=u[_++])>c){us(o,A,L,P,I=(c-m)/$,Hi),us(a,k,O,R,I,Wi),t.bezierCurveTo(Hi[1],Wi[1],Hi[2],Wi[2],Hi[3],Wi[3]);break e}m+=$}t.bezierCurveTo(A,k,L,O,P,R),o=P,a=R;break;case De.Q:if(A=d[b++],k=d[b++],L=d[b++],O=d[b++],v){if(m+($=u[_++])>c){cs(o,A,L,I=(c-m)/$,Hi),cs(a,k,O,I,Wi),t.quadraticCurveTo(Hi[1],Wi[1],Hi[2],Wi[2]);break e}m+=$}t.quadraticCurveTo(A,k,L,O),o=L,a=O;break;case De.A:var N=d[b++],E=d[b++],z=d[b++],B=d[b++],G=d[b++],K=d[b++],V=d[b++],X=!d[b++],Z=z>B?z:B,W=Wn(z-B)>.001,te=G+K,oe=!1;if(v&&(m+($=u[_++])>c&&(te=G+K*(c-m)/$,oe=!0),m+=$),W&&t.ellipse?t.ellipse(N,E,z,B,V,G,te,X):t.arc(N,E,Z,G,te,X),oe)break e;M&&(i=Xi(G)*z+N,r=Ui(G)*B+E),o=Xi(te)*z+N,a=Ui(te)*B+E;break;case De.R:i=o=d[b],r=a=d[b+1],s=d[b++],l=d[b++];var se=d[b++],ie=d[b++];if(v){if(m+($=u[_++])>c){var J=c-m;t.moveTo(s,l),t.lineTo(s+Pc(J,se),l),(J-=se)>0&&t.lineTo(s+se,l+Pc(J,ie)),(J-=ie)>0&&t.lineTo(s+Oc(se-J,0),l+ie),(J-=se)>0&&t.lineTo(s,l+Oc(ie-J,0));break e}m+=$}t.rect(s,l,se,ie);break;case De.Z:if(v){var $;if(m+($=u[_++])>c){I=(c-m)/$,t.lineTo(o*(1-I)+i*I,a*(1-I)+r*I);break e}m+=$}t.closePath(),o=i,a=r}}},n.prototype.clone=function(){var t=new n,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},n.CMD=De,n.initDefaultProps=function(){var t=n.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),n}();function Ir(n,t,e,i,r,o,a){if(r===0)return!1;var s,l=r;if(a>t+l&&a>i+l||a<t-l&&a<i-l||o>n+l&&o>e+l||o<n-l&&o<e-l)return!1;if(n===e)return Math.abs(o-n)<=l/2;var u=(s=(t-i)/(n-e))*o-a+(n*i-e*t)/(n-e);return u*u/(s*s+1)<=l/2*l/2}function IS(n,t,e,i,r,o,a,s,l,u,c){if(l===0)return!1;var h=l;return!(c>t+h&&c>i+h&&c>o+h&&c>s+h||c<t-h&&c<i-h&&c<o-h&&c<s-h||u>n+h&&u>e+h&&u>r+h&&u>a+h||u<n-h&&u<e-h&&u<r-h&&u<a-h)&&Wf(n,t,e,i,r,o,a,s,u,c,null)<=h/2}function AS(n,t,e,i,r,o,a,s,l){if(a===0)return!1;var u=a;return!(l>t+u&&l>i+u&&l>o+u||l<t-u&&l<i-u&&l<o-u||s>n+u&&s>e+u&&s>r+u||s<n-u&&s<e-u&&s<r-u)&&Yf(n,t,e,i,r,o,s,l,null)<=u/2}var Vg=2*Math.PI;function Xn(n){return(n%=Vg)<0&&(n+=Vg),n}var Vo=2*Math.PI;function DS(n,t,e,i,r,o,a,s,l){if(a===0)return!1;var u=a;s-=n,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>e||c+u<e)return!1;if(Math.abs(i-r)%Vo<1e-4)return!0;if(o){var h=i;i=Xn(r),r=Xn(h)}else i=Xn(i),r=Xn(r);i>r&&(r+=Vo);var p=Math.atan2(l,s);return p<0&&(p+=Vo),p>=i&&p<=r||p+Vo>=i&&p+Vo<=r}function Un(n,t,e,i,r,o){if(o>t&&o>i||o<t&&o<i||i===t)return 0;var a=(o-t)/(i-t),s=i<t?1:-1;a!==1&&a!==0||(s=i<t?.5:-.5);var l=a*(e-n)+n;return l===r?1/0:l>r?s:0}var si=ai.CMD,Yi=2*Math.PI,yt=[-1,-1,-1],Yt=[-1,-1];function kS(n,t,e,i,r,o,a,s,l,u){if(u>t&&u>i&&u>o&&u>s||u<t&&u<i&&u<o&&u<s)return 0;var c,h=ls(t,i,o,s,u,yt);if(h===0)return 0;for(var p=0,d=-1,f=void 0,g=void 0,y=0;y<h;y++){var v=yt[y],m=v===0||v===1?.5:1;$e(n,e,r,a,v)<l||(d<0&&(d=Hf(t,i,o,s,Yt),Yt[1]<Yt[0]&&d>1&&(c=Yt[0],Yt[0]=Yt[1],Yt[1]=c),f=$e(t,i,o,s,Yt[0]),d>1&&(g=$e(t,i,o,s,Yt[1]))),d===2?v<Yt[0]?p+=f<t?m:-m:v<Yt[1]?p+=g<f?m:-m:p+=s<g?m:-m:v<Yt[0]?p+=f<t?m:-m:p+=s<f?m:-m)}return p}function LS(n,t,e,i,r,o,a,s){if(s>t&&s>i&&s>o||s<t&&s<i&&s<o)return 0;var l=function(f,g,y,v,m){var _=f-2*g+y,x=2*(g-f),b=f-v,w=0;if(ti(_))Ff(x)&&(S=-b/x)>=0&&S<=1&&(m[w++]=S);else{var M=x*x-4*_*b;if(ti(M))(S=-x/(2*_))>=0&&S<=1&&(m[w++]=S);else if(M>0){var S,C=ei(M),I=(-x-C)/(2*_);(S=(-x+C)/(2*_))>=0&&S<=1&&(m[w++]=S),I>=0&&I<=1&&(m[w++]=I)}}return w}(t,i,o,s,yt);if(l===0)return 0;var u=Uf(t,i,o);if(u>=0&&u<=1){for(var c=0,h=st(t,i,o,u),p=0;p<l;p++){var d=yt[p]===0||yt[p]===1?.5:1;st(n,e,r,yt[p])<a||(yt[p]<u?c+=h<t?d:-d:c+=o<h?d:-d)}return c}return d=yt[0]===0||yt[0]===1?.5:1,st(n,e,r,yt[0])<a?0:o<t?d:-d}function PS(n,t,e,i,r,o,a,s){if((s-=t)>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);yt[0]=-l,yt[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Yi-1e-4){i=0,r=Yi;var c=o?1:-1;return a>=yt[0]+n&&a<=yt[1]+n?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=Yi,r+=Yi);for(var p=0,d=0;d<2;d++){var f=yt[d];if(f+n>a){var g=Math.atan2(s,f);c=o?1:-1,g<0&&(g=Yi+g),(g>=i&&g<=r||g+Yi>=i&&g+Yi<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function Fg(n,t,e,i,r){for(var o,a,s,l,u=n.data,c=n.len(),h=0,p=0,d=0,f=0,g=0,y=0;y<c;){var v=u[y++],m=y===1;switch(v===si.M&&y>1&&(e||(h+=Un(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case si.M:p=f=u[y++],d=g=u[y++];break;case si.L:if(e){if(Ir(p,d,u[y],u[y+1],t,i,r))return!0}else h+=Un(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case si.C:if(e){if(IS(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],t,i,r))return!0}else h+=kS(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case si.Q:if(e){if(AS(p,d,u[y++],u[y++],u[y],u[y+1],t,i,r))return!0}else h+=LS(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case si.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],M=u[y++],S=u[y++];y+=1;var C=!!(1-u[y++]);o=Math.cos(M)*b+_,a=Math.sin(M)*w+x,m?(f=o,g=a):h+=Un(p,d,o,a,i,r);var I=(i-_)*w/b+_;if(e){if(DS(_,x,w,M,M+S,C,t,I,r))return!0}else h+=PS(_,x,w,M,M+S,C,I,r);p=Math.cos(M+S)*b+_,d=Math.sin(M+S)*w+x;break;case si.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],e){if(Ir(f,g,o,g,t,i,r)||Ir(o,g,o,a,t,i,r)||Ir(o,a,f,a,t,i,r)||Ir(f,a,f,g,t,i,r))return!0}else h+=Un(o,g,o,a,i,r),h+=Un(f,a,f,g,i,r);break;case si.Z:if(e){if(Ir(p,d,f,g,t,i,r))return!0}else h+=Un(p,d,f,g,i,r);p=f,d=g}}return e||(s=d,l=g,Math.abs(s-l)<1e-4)||(h+=Un(p,d,f,g,i,r)||0),h!==0}var Gg=ce({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Vi),OS={style:ce({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ts.style)},Bc=Co.concat(["invisible","culling","z","z2","zlevel","parent"]),Ie=function(n){function t(i){return n.call(this,i)||this}var e;return F(t,n),t.prototype.update=function(){var i=this;n.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(u){i.buildPath(u,i.shape)}),o.silent=!0;var a=o.style;for(var s in r)a[s]!==r[s]&&(a[s]=r[s]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var l=0;l<Bc.length;++l)o[Bc[l]]=this[Bc[l]];o.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(i){var r=Oe(i);this.shape=this.getDefaultShape();var o=this.getDefaultStyle();o&&this.useStyle(o);for(var a=0;a<r.length;a++){var s=r[a],l=i[s];s==="style"?this.style?H(this.style,l):this.useStyle(l):s==="shape"?H(this.shape,l):n.prototype.attrKV.call(this,s,l)}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 i=this.style.fill;if(i!=="none"){if(Q(i)){var r=Mo(i,0);return r>.5?oc:r>.2?"#eee":ac}if(i)return ac}return oc},t.prototype.getInsideTextStroke=function(i){var r=this.style.fill;if(Q(r)){var o=this.__zr;if(!(!o||!o.isDarkMode())==Mo(i,0)<.4)return r}},t.prototype.buildPath=function(i,r,o){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(i){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,i),this.path},t.prototype.createPathProxy=function(){this.path=new ai(!1)},t.prototype.hasStroke=function(){var i=this.style,r=i.stroke;return!(r==null||r==="none"||!(i.lineWidth>0))},t.prototype.hasFill=function(){var i=this.style.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var i=this._rect,r=this.style,o=!i;if(o){var a=!1;this.path||(a=!0,this.createPathProxy());var s=this.path;(a||4&this.__dirty)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),i=s.getBoundingRect()}if(this._rect=i,this.hasStroke()&&this.path&&this.path.len()>0){var l=this._rectStroke||(this._rectStroke=i.clone());if(this.__dirty||o){l.copy(i);var u=r.strokeNoScale?this.getLineScale():1,c=r.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;c=Math.max(c,h??4)}u>1e-10&&(l.width+=c/u,l.height+=c/u,l.x-=c/u/2,l.y-=c/u/2)}return l}return i},t.prototype.contain=function(i,r){var o=this.transformCoordToLocal(i,r),a=this.getBoundingRect(),s=this.style;if(i=o[0],r=o[1],a.contain(i,r)){var l=this.path;if(this.hasStroke()){var u=s.lineWidth,c=s.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),function(h,p,d,f){return Fg(h,p,!0,d,f)}(l,u/c,i,r)))return!0}if(this.hasFill())return function(h,p,d){return Fg(h,0,!1,p,d)}(l,i,r)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(i){return this.animate("shape",i)},t.prototype.updateDuringAnimation=function(i){i==="style"?this.dirtyStyle():i==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(i,r){i==="shape"?this.setShape(r):n.prototype.attrKV.call(this,i,r)},t.prototype.setShape=function(i,r){var o=this.shape;return o||(o=this.shape={}),typeof i=="string"?o[i]=r:H(o,i),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(i){return go(Gg,i)},t.prototype._innerSaveToNormal=function(i){n.prototype._innerSaveToNormal.call(this,i);var r=this._normalState;i.shape&&!r.shape&&(r.shape=H({},this.shape))},t.prototype._applyStateObj=function(i,r,o,a,s,l){n.prototype._applyStateObj.call(this,i,r,o,a,s,l);var u,c=!(r&&a);if(r&&r.shape?s?a?u=r.shape:(u=H({},o.shape),H(u,r.shape)):(u=H({},a?this.shape:o.shape),H(u,r.shape)):c&&(u=o.shape),u)if(s){this.shape=H({},this.shape);for(var h={},p=Oe(u),d=0;d<p.length;d++){var f=p[d];typeof u[f]=="object"?this.shape[f]=u[f]:h[f]=u[f]}this._transitionState(i,{shape:h},l)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(i){for(var r,o=n.prototype._mergeStates.call(this,i),a=0;a<i.length;a++){var s=i[a];s.shape&&(r=r||{},this._mergeStyle(r,s.shape))}return r&&(o.shape=r),o},t.prototype.getAnimationStyleProps=function(){return OS},t.prototype.isZeroArea=function(){return!1},t.extend=function(i){var r=function(a){function s(l){var u=a.call(this,l)||this;return i.init&&i.init.call(u,l),u}return F(s,a),s.prototype.getDefaultStyle=function(){return ae(i.style)},s.prototype.getDefaultShape=function(){return ae(i.shape)},s}(t);for(var o in i)typeof i[o]=="function"&&(r.prototype[o]=i[o]);return r},t.initDefaultProps=((e=t.prototype).type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,void(e.__dirty=7)),t}(Fi),RS=ce({strokeFirst:!0,font:bi,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Gg),Fo=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),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.fill;return e!=null&&e!=="none"},t.prototype.createStyle=function(e){return go(RS,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 r=Io(i,e.font,e.textAlign,e.textBaseline);if(r.x+=e.x||0,r.y+=e.y||0,this.hasStroke()){var o=e.lineWidth;r.x-=o/2,r.y-=o/2,r.width+=o,r.height+=o}this._rect=r}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Fi);Fo.prototype.type="tspan";var NS=ce({x:0,y:0},Vi),ES={style:ce({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ts.style)},Tt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.createStyle=function(e){return go(NS,e)},t.prototype._getSize=function(e){var i=this.style,r=i[e];if(r!=null)return r;var o,a=(o=i.image)&&typeof o!="string"&&o.width&&o.height?i.image:this.__image;if(!a)return 0;var s=e==="width"?"height":"width",l=i[s];return l==null?a[e]:a[e]/a[s]*l},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return ES},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new me(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Fi);Tt.prototype.type="image";var Ar=Math.round;function Hg(n,t,e){if(t){var i=t.x1,r=t.x2,o=t.y1,a=t.y2;n.x1=i,n.x2=r,n.y1=o,n.y2=a;var s=e&&e.lineWidth;return s&&(Ar(2*i)===Ar(2*r)&&(n.x1=n.x2=Zi(i,s,!0)),Ar(2*o)===Ar(2*a)&&(n.y1=n.y2=Zi(o,s,!0))),n}}function Wg(n,t,e){if(t){var i=t.x,r=t.y,o=t.width,a=t.height;n.x=i,n.y=r,n.width=o,n.height=a;var s=e&&e.lineWidth;return s&&(n.x=Zi(i,s,!0),n.y=Zi(r,s,!0),n.width=Math.max(Zi(i+o,s,!1)-n.x,o===0?0:1),n.height=Math.max(Zi(r+a,s,!1)-n.y,a===0?0:1)),n}}function Zi(n,t,e){if(!t)return n;var i=Ar(2*n);return(i+Ar(t))%2==0?i/2:(i+(e?1:-1))/2}var zS=function(){this.x=0,this.y=0,this.width=0,this.height=0},BS={},ke=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new zS},t.prototype.buildPath=function(e,i){var r,o,a,s;if(this.subPixelOptimize){var l=Wg(BS,i,this.style);r=l.x,o=l.y,a=l.width,s=l.height,l.r=i.r,i=l}else r=i.x,o=i.y,a=i.width,s=i.height;i.r?function(u,c){var h,p,d,f,g,y=c.x,v=c.y,m=c.width,_=c.height,x=c.r;m<0&&(y+=m,m=-m),_<0&&(v+=_,_=-_),typeof x=="number"?h=p=d=f=x:x instanceof Array?x.length===1?h=p=d=f=x[0]:x.length===2?(h=d=x[0],p=f=x[1]):x.length===3?(h=x[0],p=f=x[1],d=x[2]):(h=x[0],p=x[1],d=x[2],f=x[3]):h=p=d=f=0,h+p>m&&(h*=m/(g=h+p),p*=m/g),d+f>m&&(d*=m/(g=d+f),f*=m/g),p+d>_&&(p*=_/(g=p+d),d*=_/g),h+f>_&&(h*=_/(g=h+f),f*=_/g),u.moveTo(y+h,v),u.lineTo(y+m-p,v),p!==0&&u.arc(y+m-p,v+p,p,-Math.PI/2,0),u.lineTo(y+m,v+_-d),d!==0&&u.arc(y+m-d,v+_-d,d,0,Math.PI/2),u.lineTo(y+f,v+_),f!==0&&u.arc(y+f,v+_-f,f,Math.PI/2,Math.PI),u.lineTo(y,v+h),h!==0&&u.arc(y+h,v+h,h,Math.PI,1.5*Math.PI)}(e,i):e.rect(r,o,a,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ie);ke.prototype.type="rect";var Xg={fill:"#000"},VS={style:ce({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},Ts.style)},Me=function(n){function t(e){var i=n.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Xg,i.attr(e),i}return F(t,n),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){n.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)):n.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var i=this.innerTransformable;return i?i.getLocalTransform(e):n.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),n.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,Zg(e=this.style),D(e.rich,Zg),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){n.prototype.addSelfToZr.call(this,e);for(var i=0;i<this._children.length;i++)this._children[i].__zr=e},t.prototype.removeSelfFromZr=function(e){n.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 me(0,0,0,0),i=this._children,r=[],o=null,a=0;a<i.length;a++){var s=i[a],l=s.getBoundingRect(),u=s.getLocalTransform(r);u?(e.copy(l),e.applyTransform(u),(o=o||e.clone()).union(e)):(o=o||l.clone()).union(l)}this._rect=o||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Xg},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,i){if(!i)return e;var r=i.rich,o=e.rich||r&&{};return H(e,i),r&&o?(this._mergeRich(o,r),e.rich=o):o&&(e.rich=o),e},t.prototype._mergeRich=function(e,i){for(var r=Oe(i),o=0;o<r.length;o++){var a=r[o];e[a]=e[a]||{},H(e[a],i[a])}},t.prototype.getAnimationStyleProps=function(){return VS},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||bi,r=e.padding,o=function(P,R){P!=null&&(P+="");var N,E=R.overflow,z=R.padding,B=R.font,G=E==="truncate",K=uc(B),V=xe(R.lineHeight,K),X=!!R.backgroundColor,Z=R.lineOverflow==="truncate",W=R.width,te=(N=W==null||E!=="break"&&E!=="breakAll"?P?P.split(`
  8. `):[]:P?Rg(P,R.font,W,E==="breakAll",0).lines:[]).length*V,oe=xe(R.height,te);if(te>oe&&Z){var se=Math.floor(oe/V);N=N.slice(0,se)}if(P&&G&&W!=null)for(var ie=Lg(W,B,R.ellipsis,{minChar:R.truncateMinChar,placeholder:R.placeholder}),J=0;J<N.length;J++)N[J]=Pg(N[J],ie);var $=oe,q=0;for(J=0;J<N.length;J++)q=Math.max(Rt(N[J],B),q);W==null&&(W=q);var U=q;return z&&($+=z[0]+z[2],U+=z[1]+z[3],W+=z[1]+z[3]),X&&(U=W),{lines:N,height:oe,outerWidth:U,outerHeight:$,lineHeight:V,calculatedLineHeight:K,contentWidth:q,contentHeight:te,width:W}}(Jg(e),e),a=Vc(e),s=!!e.backgroundColor,l=o.outerHeight,u=o.outerWidth,c=o.contentWidth,h=o.lines,p=o.lineHeight,d=this._defaultStyle,f=e.x||0,g=e.y||0,y=e.align||d.align||"left",v=e.verticalAlign||d.verticalAlign||"top",m=f,_=Mr(g,o.contentHeight,v);if(a||r){var x=Ao(f,u,y),b=Mr(g,l,v);a&&this._renderBackground(e,e,x,b,u,l)}_+=p/2,r&&(m=Kg(f,y,r),v==="top"?_+=r[0]:v==="bottom"&&(_-=r[2]));for(var w=0,M=!1,S=jg("fill"in e?e.fill:(M=!0,d.fill)),C=qg("stroke"in e?e.stroke:s||d.autoStroke&&!M?null:(w=2,d.stroke)),I=e.textShadowBlur>0,T=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),A=o.calculatedLineHeight,k=0;k<h.length;k++){var L=this._getOrCreateChild(Fo),O=L.createStyle();L.useStyle(O),O.text=h[k],O.x=m,O.y=_,y&&(O.textAlign=y),O.textBaseline="middle",O.opacity=e.opacity,O.strokeFirst=!0,I&&(O.shadowBlur=e.textShadowBlur||0,O.shadowColor=e.textShadowColor||"transparent",O.shadowOffsetX=e.textShadowOffsetX||0,O.shadowOffsetY=e.textShadowOffsetY||0),O.stroke=C,O.fill=S,C&&(O.lineWidth=e.lineWidth||w,O.lineDash=e.lineDash,O.lineDashOffset=e.lineDashOffset||0),O.font=i,Yg(O,e),_+=p,T&&L.setBoundingRect(new me(Ao(O.x,e.width,O.textAlign),Mr(O.y,A,O.textBaseline),c,A))}},t.prototype._updateRichTexts=function(){var e=this.style,i=function(L,O){var P=new xS;if(L!=null&&(L+=""),!L)return P;for(var R,N=O.width,E=O.height,z=O.overflow,B=z!=="break"&&z!=="breakAll"||N==null?null:{width:N,accumWidth:0,breakAll:z==="breakAll"},G=Tc.lastIndex=0;(R=Tc.exec(L))!=null;){var K=R.index;K>G&&Cc(P,L.substring(G,K),O,B),Cc(P,R[2],O,B,R[1]),G=Tc.lastIndex}G<L.length&&Cc(P,L.substring(G,L.length),O,B);var V=[],X=0,Z=0,W=O.padding,te=z==="truncate",oe=O.lineOverflow==="truncate";function se(Ve,et,je){Ve.width=et,Ve.lineHeight=je,X+=je,Z=Math.max(Z,et)}e:for(var ie=0;ie<P.lines.length;ie++){for(var J=P.lines[ie],$=0,q=0,U=0;U<J.tokens.length;U++){var le=(pe=J.tokens[U]).styleName&&O.rich[pe.styleName]||{},ve=pe.textPadding=le.padding,Te=ve?ve[1]+ve[3]:0,Ce=pe.font=le.font||O.font;pe.contentHeight=uc(Ce);var Pe=xe(le.height,pe.contentHeight);if(pe.innerHeight=Pe,ve&&(Pe+=ve[0]+ve[2]),pe.height=Pe,pe.lineHeight=vr(le.lineHeight,O.lineHeight,Pe),pe.align=le&&le.align||O.align,pe.verticalAlign=le&&le.verticalAlign||"middle",oe&&E!=null&&X+pe.lineHeight>E){U>0?(J.tokens=J.tokens.slice(0,U),se(J,q,$),P.lines=P.lines.slice(0,ie+1)):P.lines=P.lines.slice(0,ie);break e}var Be=le.width,qe=Be==null||Be==="auto";if(typeof Be=="string"&&Be.charAt(Be.length-1)==="%")pe.percentWidth=Be,V.push(pe),pe.contentWidth=Rt(pe.text,Ce);else{if(qe){var dt=le.backgroundColor,Ne=dt&&dt.image;Ne&&Ms(Ne=vS(Ne))&&(pe.width=Math.max(pe.width,Ne.width*Pe/Ne.height))}var Ge=te&&N!=null?N-q:null;Ge!=null&&Ge<pe.width?!qe||Ge<Te?(pe.text="",pe.width=pe.contentWidth=0):(pe.text=kg(pe.text,Ge-Te,Ce,O.ellipsis,{minChar:O.truncateMinChar}),pe.width=pe.contentWidth=Rt(pe.text,Ce)):pe.contentWidth=Rt(pe.text,Ce)}pe.width+=Te,q+=pe.width,le&&($=Math.max($,pe.lineHeight))}se(J,q,$)}for(P.outerWidth=P.width=xe(N,Z),P.outerHeight=P.height=xe(E,X),P.contentHeight=X,P.contentWidth=Z,W&&(P.outerWidth+=W[1]+W[3],P.outerHeight+=W[0]+W[2]),ie=0;ie<V.length;ie++){var pe,ot=(pe=V[ie]).percentWidth;pe.width=parseInt(ot,10)/100*P.width}return P}(Jg(e),e),r=i.width,o=i.outerWidth,a=i.outerHeight,s=e.padding,l=e.x||0,u=e.y||0,c=this._defaultStyle,h=e.align||c.align,p=e.verticalAlign||c.verticalAlign,d=Ao(l,o,h),f=Mr(u,a,p),g=d,y=f;s&&(g+=s[3],y+=s[0]);var v=g+r;Vc(e)&&this._renderBackground(e,e,d,f,o,a);for(var m=!!e.backgroundColor,_=0;_<i.lines.length;_++){for(var x=i.lines[_],b=x.tokens,w=b.length,M=x.lineHeight,S=x.width,C=0,I=g,T=v,A=w-1,k=void 0;C<w&&(!(k=b[C]).align||k.align==="left");)this._placeToken(k,e,M,y,I,"left",m),S-=k.width,I+=k.width,C++;for(;A>=0&&(k=b[A]).align==="right";)this._placeToken(k,e,M,y,T,"right",m),S-=k.width,T-=k.width,A--;for(I+=(r-(I-g)-(v-T)-S)/2;C<=A;)k=b[C],this._placeToken(k,e,M,y,I+k.width/2,"center",m),I+=k.width,C++;y+=M}},t.prototype._placeToken=function(e,i,r,o,a,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,h=o+r/2;c==="top"?h=o+e.height/2:c==="bottom"&&(h=o+r-e.height/2),!e.isLineHolder&&Vc(u)&&this._renderBackground(u,i,s==="right"?a-e.width:s==="center"?a-e.width/2:a,h-e.height/2,e.width,e.height);var p=!!u.backgroundColor,d=e.textPadding;d&&(a=Kg(a,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Fo),g=f.createStyle();f.useStyle(g);var y=this._defaultStyle,v=!1,m=0,_=jg("fill"in u?u.fill:"fill"in i?i.fill:(v=!0,y.fill)),x=qg("stroke"in u?u.stroke:"stroke"in i?i.stroke:p||l||y.autoStroke&&!v?null:(m=2,y.stroke)),b=u.textShadowBlur>0||i.textShadowBlur>0;g.text=e.text,g.x=a,g.y=h,b&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||bi,g.opacity=vr(u.opacity,i.opacity,1),Yg(g,u),x&&(g.lineWidth=vr(u.lineWidth,i.lineWidth,m),g.lineDash=xe(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=x),_&&(g.fill=_);var w=e.contentWidth,M=e.contentHeight;f.setBoundingRect(new me(Ao(g.x,w,g.textAlign),Mr(g.y,M,g.textBaseline),w,M))},t.prototype._renderBackground=function(e,i,r,o,a,s){var l,u,c,h=e.backgroundColor,p=e.borderWidth,d=e.borderColor,f=h&&h.image,g=h&&!f,y=e.borderRadius,v=this;if(g||e.lineHeight||p&&d){(l=this._getOrCreateChild(ke)).useStyle(l.createStyle()),l.style.fill=null;var m=l.shape;m.x=r,m.y=o,m.width=a,m.height=s,m.r=y,l.dirtyShape()}if(g)(c=l.style).fill=h||null,c.fillOpacity=xe(e.fillOpacity,1);else if(f){(u=this._getOrCreateChild(Tt)).onload=function(){v.dirtyStyle()};var _=u.style;_.image=h.image,_.x=r,_.y=o,_.width=a,_.height=s}p&&d&&((c=l.style).lineWidth=p,c.stroke=d,c.strokeOpacity=xe(e.strokeOpacity,1),c.lineDash=e.borderDash,c.lineDashOffset=e.borderDashOffset||0,l.strokeContainThreshold=0,l.hasFill()&&l.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2));var x=(l||u).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=vr(e.opacity,i.opacity,1)},t.makeFont=function(e){var i,r="";return function(o){return o.fontSize!=null||o.fontFamily||o.fontWeight}(e)&&(r=[e.fontStyle,e.fontWeight,(i=e.fontSize,typeof i!="string"||i.indexOf("px")===-1&&i.indexOf("rem")===-1&&i.indexOf("em")===-1?isNaN(+i)?"12px":i+"px":i),e.fontFamily||"sans-serif"].join(" ")),r&&zt(r)||e.textFont||e.font},t}(Fi),FS={left:!0,right:1,center:1},GS={top:1,bottom:1,middle:1},Ug=["fontStyle","fontWeight","fontSize","fontFamily"];function Yg(n,t){for(var e=0;e<Ug.length;e++){var i=Ug[e],r=t[i];r!=null&&(n[i]=r)}}function Zg(n){if(n){n.font=Me.makeFont(n);var t=n.align;t==="middle"&&(t="center"),n.align=t==null||FS[t]?t:"left";var e=n.verticalAlign;e==="center"&&(e="middle"),n.verticalAlign=e==null||GS[e]?e:"top",n.padding&&(n.padding=Tu(n.padding))}}function qg(n,t){return n==null||t<=0||n==="transparent"||n==="none"?null:n.image||n.colorStops?"#000":n}function jg(n){return n==null||n==="none"?null:n.image||n.colorStops?"#000":n}function Kg(n,t,e){return t==="right"?n-e[1]:t==="center"?n+e[3]/2-e[1]/2:n+e[3]}function Jg(n){var t=n.text;return t!=null&&(t+=""),t}function Vc(n){return!!(n.backgroundColor||n.lineHeight||n.borderWidth&&n.borderColor)}var ye=Ee(),Fc=function(n,t,e,i){if(i){var r=ye(i);r.dataIndex=e,r.dataType=t,r.seriesIndex=n,r.ssrType="chart",i.type==="group"&&i.traverse(function(o){var a=ye(o);a.seriesIndex=n,a.dataIndex=e,a.dataType=t,a.ssrType="chart"})}},$g=1,Qg={},ey=Ee(),Gc=Ee(),Zt=["emphasis","blur","select"],Ds=["normal","emphasis","blur","select"],qi="highlight",ks="downplay",Go="select",Ls="unselect",Ho="toggleSelect";function Dr(n){return n!=null&&n!=="none"}function Ps(n,t,e){n.onHoverStateChange&&(n.hoverState||0)!==e&&n.onHoverStateChange(t),n.hoverState=e}function ty(n){Ps(n,"emphasis",2)}function ny(n){n.hoverState===2&&Ps(n,"normal",0)}function Hc(n){Ps(n,"blur",1)}function iy(n){n.hoverState===1&&Ps(n,"normal",0)}function HS(n){n.selected=!0}function WS(n){n.selected=!1}function ry(n,t,e){t(n,e)}function Yn(n,t,e){ry(n,t,e),n.isGroup&&n.traverse(function(i){ry(i,t,e)})}function Wc(n,t){switch(t){case"emphasis":n.hoverState=2;break;case"normal":n.hoverState=0;break;case"blur":n.hoverState=1;break;case"select":n.selected=!0}}function Xc(n,t){var e=this.states[n];if(this.style){if(n==="emphasis")return function(i,r,o,a){var s=o&&we(o,"select")>=0,l=!1;if(i instanceof Ie){var u=ey(i),c=s&&u.selectFill||u.normalFill,h=s&&u.selectStroke||u.normalStroke;if(Dr(c)||Dr(h)){var p=(a=a||{}).style||{};p.fill==="inherit"?(l=!0,a=H({},a),(p=H({},p)).fill=c):!Dr(p.fill)&&Dr(c)?(l=!0,a=H({},a),(p=H({},p)).fill=ju(c)):!Dr(p.stroke)&&Dr(h)&&(l||(a=H({},a),p=H({},p)),p.stroke=ju(h)),a.style=p}}if(a&&a.z2==null){l||(a=H({},a));var d=i.z2EmphasisLift;a.z2=i.z2+(d??10)}return a}(this,0,t,e);if(n==="blur")return function(i,r,o){var a=we(i.currentStates,r)>=0,s=i.style.opacity,l=a?null:function(c,h,p,d){for(var f=c.style,g={},y=0;y<h.length;y++){var v=h[y],m=f[v];g[v]=m??(d&&d[v])}for(y=0;y<c.animators.length;y++){var _=c.animators[y];_.__fromStateTransition&&_.__fromStateTransition.indexOf(p)<0&&_.targetName==="style"&&_.saveTo(g,h)}return g}(i,["opacity"],r,{opacity:1}),u=(o=o||{}).style||{};return u.opacity==null&&(o=H({},o),u=H({opacity:a?s:.1*l.opacity},u),o.style=u),o}(this,n,e);if(n==="select")return function(i,r,o){if(o&&o.z2==null){o=H({},o);var a=i.z2SelectLift;o.z2=i.z2+(a??9)}return o}(this,0,e)}return e}function Uc(n){n.stateProxy=Xc;var t=n.getTextContent(),e=n.getTextGuideLine();t&&(t.stateProxy=Xc),e&&(e.stateProxy=Xc)}function oy(n,t){!cy(n,t)&&!n.__highByOuter&&Yn(n,ty)}function ay(n,t){!cy(n,t)&&!n.__highByOuter&&Yn(n,ny)}function kr(n,t){n.__highByOuter|=1<<(t||0),Yn(n,ty)}function Lr(n,t){!(n.__highByOuter&=~(1<<(t||0)))&&Yn(n,ny)}function sy(n){Yn(n,iy)}function ly(n){Yn(n,HS)}function uy(n){Yn(n,WS)}function cy(n,t){return n.__highDownSilentOnTouch&&t.zrByTouch}function hy(n){var t=n.getModel(),e=[],i=[];t.eachComponent(function(r,o){var a=Gc(o),s=r==="series",l=s?n.getViewOfSeriesModel(o):n.getViewOfComponentModel(o);!s&&i.push(l),a.isBlured&&(l.group.traverse(function(u){iy(u)}),s&&e.push(o)),a.isBlured=!1}),D(i,function(r){r&&r.toggleBlurSeries&&r.toggleBlurSeries(e,!1,t)})}function Yc(n,t,e,i){var r=i.getModel();function o(u,c){for(var h=0;h<c.length;h++){var p=u.getItemGraphicEl(c[h]);p&&sy(p)}}if(e=e||"coordinateSystem",n!=null&&t&&t!=="none"){var a=r.getSeriesByIndex(n),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];r.eachSeries(function(u){var c=a===u,h=u.coordinateSystem;if(h&&h.master&&(h=h.master),!(e==="series"&&!c||e==="coordinateSystem"&&!(h&&s?h===s:c)||t==="series"&&c)){if(i.getViewOfSeriesModel(u).group.traverse(function(f){f.__highByOuter&&c&&t==="self"||Hc(f)}),ft(t))o(u.getData(),t);else if(ne(t))for(var p=Oe(t),d=0;d<p.length;d++)o(u.getData(p[d]),t[p[d]]);l.push(u),Gc(u).isBlured=!0}}),r.eachComponent(function(u,c){if(u!=="series"){var h=i.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,r)}})}}function Zc(n,t,e){if(n!=null&&t!=null){var i=e.getModel().getComponent(n,t);if(i){Gc(i).isBlured=!0;var r=e.getViewOfComponentModel(i);r&&r.focusBlurEnabled&&r.group.traverse(function(o){Hc(o)})}}}function qc(n,t,e,i){var r={focusSelf:!1,dispatchers:null};if(n==null||n==="series"||t==null||e==null)return r;var o=i.getModel().getComponent(n,t);if(!o)return r;var a=i.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return r;for(var s,l=a.findHighDownDispatchers(e),u=0;u<l.length;u++)if(ye(l[u]).focus==="self"){s=!0;break}return{focusSelf:s,dispatchers:l}}function py(n){D(n.getAllData(),function(t){var e=t.data,i=t.type;e.eachItemGraphicEl(function(r,o){n.isSelected(o,i)?ly(r):uy(r)})})}function XS(n){var t=[];return n.eachSeries(function(e){D(e.getAllData(),function(i){i.data;var r=i.type,o=e.getSelectedDataIndices();if(o.length>0){var a={dataIndex:o,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Wo(n,t,e){jc(n,!0),Yn(n,Uc),function(i,r,o){var a=ye(i);r!=null?(a.focus=r,a.blurScope=o):a.focus&&(a.focus=null)}(n,t,e)}function ln(n,t,e,i){i?function(r){jc(r,!1)}(n):Wo(n,t,e)}var dy=["emphasis","blur","select"],US={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Zn(n,t,e,i){e=e||"itemStyle";for(var r=0;r<dy.length;r++){var o=dy[r],a=t.getModel([o,e]);n.ensureState(o).style=a[US[e]]()}}function jc(n,t){var e=t===!1,i=n;n.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=n.highDownSilentOnTouch),e&&!i.__highDownDispatcher||(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!e)}function Kc(n){return!(!n||!n.__highDownDispatcher)}function Jc(n){var t=n.type;return t===Go||t===Ls||t===Ho}function fy(n){var t=n.type;return t===qi||t===ks}var Pr=ai.CMD,YS=[[],[],[]],gy=Math.sqrt,ZS=Math.atan2,$c=Math.sqrt,Os=Math.sin,Rs=Math.cos,Xo=Math.PI;function yy(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function Qc(n,t){return(n[0]*t[0]+n[1]*t[1])/(yy(n)*yy(t))}function vy(n,t){return(n[0]*t[1]<n[1]*t[0]?-1:1)*Math.acos(Qc(n,t))}function my(n,t,e,i,r,o,a,s,l,u,c){var h=l*(Xo/180),p=Rs(h)*(n-e)/2+Os(h)*(t-i)/2,d=-1*Os(h)*(n-e)/2+Rs(h)*(t-i)/2,f=p*p/(a*a)+d*d/(s*s);f>1&&(a*=$c(f),s*=$c(f));var g=(r===o?-1:1)*$c((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(n+e)/2+Rs(h)*y-Os(h)*v,_=(t+i)/2+Os(h)*y+Rs(h)*v,x=vy([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],M=vy(b,w);if(Qc(b,w)<=-1&&(M=Xo),Qc(b,w)>=1&&(M=0),M<0){var S=Math.round(M/Xo*1e6)/1e6;M=2*Xo+S%2*Xo}c.addData(u,m,_,a,s,x,M,h,o)}var qS=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,jS=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,_y=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.applyTransform=function(e){},t}(Ie);function xy(n){return n.setData!=null}function by(n,t){var e=function(r){var o=new ai;if(!r)return o;var a,s=0,l=0,u=s,c=l,h=ai.CMD,p=r.match(qS);if(!p)return o;for(var d=0;d<p.length;d++){for(var f=p[d],g=f.charAt(0),y=void 0,v=f.match(jS)||[],m=v.length,_=0;_<m;_++)v[_]=parseFloat(v[_]);for(var x=0;x<m;){var b=void 0,w=void 0,M=void 0,S=void 0,C=void 0,I=void 0,T=void 0,A=s,k=l,L=void 0,O=void 0;switch(g){case"l":s+=v[x++],l+=v[x++],y=h.L,o.addData(y,s,l);break;case"L":s=v[x++],l=v[x++],y=h.L,o.addData(y,s,l);break;case"m":s+=v[x++],l+=v[x++],y=h.M,o.addData(y,s,l),u=s,c=l,g="l";break;case"M":s=v[x++],l=v[x++],y=h.M,o.addData(y,s,l),u=s,c=l,g="L";break;case"h":s+=v[x++],y=h.L,o.addData(y,s,l);break;case"H":s=v[x++],y=h.L,o.addData(y,s,l);break;case"v":l+=v[x++],y=h.L,o.addData(y,s,l);break;case"V":l=v[x++],y=h.L,o.addData(y,s,l);break;case"C":y=h.C,o.addData(y,v[x++],v[x++],v[x++],v[x++],v[x++],v[x++]),s=v[x-2],l=v[x-1];break;case"c":y=h.C,o.addData(y,v[x++]+s,v[x++]+l,v[x++]+s,v[x++]+l,v[x++]+s,v[x++]+l),s+=v[x-2],l+=v[x-1];break;case"S":b=s,w=l,L=o.len(),O=o.data,a===h.C&&(b+=s-O[L-4],w+=l-O[L-3]),y=h.C,A=v[x++],k=v[x++],s=v[x++],l=v[x++],o.addData(y,b,w,A,k,s,l);break;case"s":b=s,w=l,L=o.len(),O=o.data,a===h.C&&(b+=s-O[L-4],w+=l-O[L-3]),y=h.C,A=s+v[x++],k=l+v[x++],s+=v[x++],l+=v[x++],o.addData(y,b,w,A,k,s,l);break;case"Q":A=v[x++],k=v[x++],s=v[x++],l=v[x++],y=h.Q,o.addData(y,A,k,s,l);break;case"q":A=v[x++]+s,k=v[x++]+l,s+=v[x++],l+=v[x++],y=h.Q,o.addData(y,A,k,s,l);break;case"T":b=s,w=l,L=o.len(),O=o.data,a===h.Q&&(b+=s-O[L-4],w+=l-O[L-3]),s=v[x++],l=v[x++],y=h.Q,o.addData(y,b,w,s,l);break;case"t":b=s,w=l,L=o.len(),O=o.data,a===h.Q&&(b+=s-O[L-4],w+=l-O[L-3]),s+=v[x++],l+=v[x++],y=h.Q,o.addData(y,b,w,s,l);break;case"A":M=v[x++],S=v[x++],C=v[x++],I=v[x++],T=v[x++],my(A=s,k=l,s=v[x++],l=v[x++],I,T,M,S,C,y=h.A,o);break;case"a":M=v[x++],S=v[x++],C=v[x++],I=v[x++],T=v[x++],my(A=s,k=l,s+=v[x++],l+=v[x++],I,T,M,S,C,y=h.A,o)}}g!=="z"&&g!=="Z"||(y=h.Z,o.addData(y),s=u,l=c),a=y}return o.toStatic(),o}(n),i=H({},t);return i.buildPath=function(r){if(xy(r))r.setData(e.data),(o=r.getContext())&&r.rebuildPath(o,1);else{var o=r;e.rebuildPath(o,1)}},i.applyTransform=function(r){(function(o,a){if(a){var s,l,u,c,h,p,d=o.data,f=o.len(),g=Pr.M,y=Pr.C,v=Pr.L,m=Pr.R,_=Pr.A,x=Pr.Q;for(u=0,c=0;u<f;){switch(s=d[u++],c=u,l=0,s){case g:case v:l=1;break;case y:l=3;break;case x:l=2;break;case _:var b=a[4],w=a[5],M=gy(a[0]*a[0]+a[1]*a[1]),S=gy(a[2]*a[2]+a[3]*a[3]),C=ZS(-a[1]/S,a[0]/M);d[u]*=M,d[u++]+=b,d[u]*=S,d[u++]+=w,d[u++]*=M,d[u++]*=S,d[u++]+=C,d[u++]+=C,c=u+=2;break;case m:p[0]=d[u++],p[1]=d[u++],tt(p,p,a),d[c++]=p[0],d[c++]=p[1],p[0]+=d[u++],p[1]+=d[u++],tt(p,p,a),d[c++]=p[0],d[c++]=p[1]}for(h=0;h<l;h++){var I=YS[h];I[0]=d[u++],I[1]=d[u++],tt(I,I,a),d[c++]=I[0],d[c++]=I[1]}}o.increaseVersion()}})(e,r),this.dirtyShape()},i}function wy(n,t){return new _y(by(n,t))}var KS=function(){this.cx=0,this.cy=0,this.r=0},In=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new KS},t.prototype.buildPath=function(e,i){e.moveTo(i.cx+i.r,i.cy),e.arc(i.cx,i.cy,i.r,0,2*Math.PI)},t}(Ie);In.prototype.type="circle";var JS=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Uo=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new JS},t.prototype.buildPath=function(e,i){var r=.5522848,o=i.cx,a=i.cy,s=i.rx,l=i.ry,u=s*r,c=l*r;e.moveTo(o-s,a),e.bezierCurveTo(o-s,a-c,o-u,a-l,o,a-l),e.bezierCurveTo(o+u,a-l,o+s,a-c,o+s,a),e.bezierCurveTo(o+s,a+c,o+u,a+l,o,a+l),e.bezierCurveTo(o-u,a+l,o-s,a+c,o-s,a),e.closePath()},t}(Ie);Uo.prototype.type="ellipse";var Sy=Math.PI,eh=2*Sy,ji=Math.sin,Or=Math.cos,$S=Math.acos,lt=Math.atan2,My=Math.abs,Yo=Math.sqrt,Zo=Math.max,An=Math.min,un=1e-4;function Ns(n,t,e,i,r,o,a){var s=n-e,l=t-i,u=(a?o:-o)/Yo(s*s+l*l),c=u*l,h=-u*s,p=n+c,d=t+h,f=e+c,g=i+h,y=(p+f)/2,v=(d+g)/2,m=f-p,_=g-d,x=m*m+_*_,b=r-o,w=p*g-f*d,M=(_<0?-1:1)*Yo(Zo(0,b*b*x-w*w)),S=(w*_-m*M)/x,C=(-w*m-_*M)/x,I=(w*_+m*M)/x,T=(-w*m+_*M)/x,A=S-y,k=C-v,L=I-y,O=T-v;return A*A+k*k>L*L+O*O&&(S=I,C=T),{cx:S,cy:C,x0:-c,y0:-h,x1:S*(r/b-1),y1:C*(r/b-1)}}var QS=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Nt=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new QS},t.prototype.buildPath=function(e,i){(function(r,o){var a,s=Zo(o.r,0),l=Zo(o.r0||0,0),u=s>0;if(u||l>0){if(u||(s=l,l=0),l>s){var c=s;s=l,l=c}var h=o.startAngle,p=o.endAngle;if(!isNaN(h)&&!isNaN(p)){var d=o.cx,f=o.cy,g=!!o.clockwise,y=My(p-h),v=y>eh&&y%eh;if(v>un&&(y=v),s>un)if(y>eh-un)r.moveTo(d+s*Or(h),f+s*ji(h)),r.arc(d,f,s,h,p,!g),l>un&&(r.moveTo(d+l*Or(p),f+l*ji(p)),r.arc(d,f,l,p,h,g));else{var m=void 0,_=void 0,x=void 0,b=void 0,w=void 0,M=void 0,S=void 0,C=void 0,I=void 0,T=void 0,A=void 0,k=void 0,L=void 0,O=void 0,P=void 0,R=void 0,N=s*Or(h),E=s*ji(h),z=l*Or(p),B=l*ji(p),G=y>un;if(G){var K=o.cornerRadius;K&&(a=function(le){var ve;if(Y(le)){var Te=le.length;if(!Te)return le;ve=Te===1?[le[0],le[0],0,0]:Te===2?[le[0],le[0],le[1],le[1]]:Te===3?le.concat(le[2]):le}else ve=[le,le,le,le];return ve}(K),m=a[0],_=a[1],x=a[2],b=a[3]);var V=My(s-l)/2;if(w=An(V,x),M=An(V,b),S=An(V,m),C=An(V,_),A=I=Zo(w,M),k=T=Zo(S,C),(I>un||T>un)&&(L=s*Or(p),O=s*ji(p),P=l*Or(h),R=l*ji(h),y<Sy)){var X=function(le,ve,Te,Ce,Pe,Be,qe,dt){var Ne=Te-le,Ge=Ce-ve,pe=qe-Pe,ot=dt-Be,Ve=ot*Ne-pe*Ge;if(!(Ve*Ve<un))return[le+(Ve=(pe*(ve-Be)-ot*(le-Pe))/Ve)*Ne,ve+Ve*Ge]}(N,E,P,R,L,O,z,B);if(X){var Z=N-X[0],W=E-X[1],te=L-X[0],oe=O-X[1],se=1/ji($S((Z*te+W*oe)/(Yo(Z*Z+W*W)*Yo(te*te+oe*oe)))/2),ie=Yo(X[0]*X[0]+X[1]*X[1]);A=An(I,(s-ie)/(se+1)),k=An(T,(l-ie)/(se-1))}}}if(G)if(A>un){var J=An(x,A),$=An(b,A),q=Ns(P,R,N,E,s,J,g),U=Ns(L,O,z,B,s,$,g);r.moveTo(d+q.cx+q.x0,f+q.cy+q.y0),A<I&&J===$?r.arc(d+q.cx,f+q.cy,A,lt(q.y0,q.x0),lt(U.y0,U.x0),!g):(J>0&&r.arc(d+q.cx,f+q.cy,J,lt(q.y0,q.x0),lt(q.y1,q.x1),!g),r.arc(d,f,s,lt(q.cy+q.y1,q.cx+q.x1),lt(U.cy+U.y1,U.cx+U.x1),!g),$>0&&r.arc(d+U.cx,f+U.cy,$,lt(U.y1,U.x1),lt(U.y0,U.x0),!g))}else r.moveTo(d+N,f+E),r.arc(d,f,s,h,p,!g);else r.moveTo(d+N,f+E);l>un&&G?k>un?(J=An(m,k),q=Ns(z,B,L,O,l,-($=An(_,k)),g),U=Ns(N,E,P,R,l,-J,g),r.lineTo(d+q.cx+q.x0,f+q.cy+q.y0),k<T&&J===$?r.arc(d+q.cx,f+q.cy,k,lt(q.y0,q.x0),lt(U.y0,U.x0),!g):($>0&&r.arc(d+q.cx,f+q.cy,$,lt(q.y0,q.x0),lt(q.y1,q.x1),!g),r.arc(d,f,l,lt(q.cy+q.y1,q.cx+q.x1),lt(U.cy+U.y1,U.cx+U.x1),g),J>0&&r.arc(d+U.cx,f+U.cy,J,lt(U.y1,U.x1),lt(U.y0,U.x0),!g))):(r.lineTo(d+z,f+B),r.arc(d,f,l,p,h,g)):r.lineTo(d+z,f+B)}else r.moveTo(d,f);r.closePath()}}})(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ie);Nt.prototype.type="sector";var eM=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Rr=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new eM},t.prototype.buildPath=function(e,i){var r=i.cx,o=i.cy,a=2*Math.PI;e.moveTo(r+i.r,o),e.arc(r,o,i.r,0,a,!1),e.moveTo(r+i.r0,o),e.arc(r,o,i.r0,0,a,!0)},t}(Ie);function Ty(n,t,e){var i=t.smooth,r=t.points;if(r&&r.length>=2){if(i){var o=function(p,d,f,g){var y,v,m,_,x=[],b=[],w=[],M=[];if(g){m=[1/0,1/0],_=[-1/0,-1/0];for(var S=0,C=p.length;S<C;S++)Fn(m,m,p[S]),Gn(_,_,p[S]);Fn(m,m,g[0]),Gn(_,_,g[1])}for(S=0,C=p.length;S<C;S++){var I=p[S];if(f)y=p[S?S-1:C-1],v=p[(S+1)%C];else{if(S===0||S===C-1){x.push(xf(p[S]));continue}y=p[S-1],v=p[S+1]}bf(b,v,y),Ja(b,b,d);var T=$a(I,y),A=$a(I,v),k=T+A;k!==0&&(T/=k,A/=k),Ja(w,b,-T),Ja(M,b,A);var L=Iu([],I,w),O=Iu([],I,M);g&&(Gn(L,L,m),Fn(L,L,_),Gn(O,O,m),Fn(O,O,_)),x.push(L),x.push(O)}return f&&x.push(x.shift()),x}(r,i,e,t.smoothConstraint);n.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;s<(e?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=r[(s+1)%a];n.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{n.moveTo(r[0][0],r[0][1]),s=1;for(var h=r.length;s<h;s++)n.lineTo(r[s][0],r[s][1])}e&&n.closePath()}}Rr.prototype.type="ring";var tM=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},cn=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new tM},t.prototype.buildPath=function(e,i){Ty(e,i,!0)},t}(Ie);cn.prototype.type="polygon";var nM=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},qt=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nM},t.prototype.buildPath=function(e,i){Ty(e,i,!1)},t}(Ie);qt.prototype.type="polyline";var iM={},rM=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},ut=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new rM},t.prototype.buildPath=function(e,i){var r,o,a,s;if(this.subPixelOptimize){var l=Hg(iM,i,this.style);r=l.x1,o=l.y1,a=l.x2,s=l.y2}else r=i.x1,o=i.y1,a=i.x2,s=i.y2;var u=i.percent;u!==0&&(e.moveTo(r,o),u<1&&(a=r*(1-u)+a*u,s=o*(1-u)+s*u),e.lineTo(a,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}(Ie);ut.prototype.type="line";var Ct=[],oM=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Cy(n,t,e){var i=n.cpx2,r=n.cpy2;return i!=null||r!=null?[(e?Gf:$e)(n.x1,n.cpx1,n.cpx2,n.x2,t),(e?Gf:$e)(n.y1,n.cpy1,n.cpy2,n.y2,t)]:[(e?Xf:st)(n.x1,n.cpx1,n.x2,t),(e?Xf:st)(n.y1,n.cpy1,n.y2,t)]}var Es=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new oM},t.prototype.buildPath=function(e,i){var r=i.x1,o=i.y1,a=i.x2,s=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,h=i.cpy2,p=i.percent;p!==0&&(e.moveTo(r,o),c==null||h==null?(p<1&&(cs(r,l,a,p,Ct),l=Ct[1],a=Ct[2],cs(o,u,s,p,Ct),u=Ct[1],s=Ct[2]),e.quadraticCurveTo(l,u,a,s)):(p<1&&(us(r,l,c,a,p,Ct),l=Ct[1],c=Ct[2],a=Ct[3],us(o,u,h,s,p,Ct),u=Ct[1],h=Ct[2],s=Ct[3]),e.bezierCurveTo(l,u,c,h,a,s)))},t.prototype.pointAt=function(e){return Cy(this.shape,e,!1)},t.prototype.tangentAt=function(e){var i=Cy(this.shape,e,!0);return wf(i,i)},t}(Ie);Es.prototype.type="bezier-curve";var aM=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},qo=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new aM},t.prototype.buildPath=function(e,i){var r=i.cx,o=i.cy,a=Math.max(i.r,0),s=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(s),h=Math.sin(s);e.moveTo(c*a+r,h*a+o),e.arc(r,o,a,s,l,!u)},t}(Ie);qo.prototype.type="arc";var th=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="compound",e}return F(t,n),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,i=this.shapeChanged(),r=0;r<e.length;r++)i=i||e[r].shapeChanged();i&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],i=this.getGlobalScale(),r=0;r<e.length;r++)e[r].path||e[r].createPathProxy(),e[r].path.setScale(i[0],i[1],e[r].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,i){for(var r=i.paths||[],o=0;o<r.length;o++)r[o].buildPath(e,r[o].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),Ie.prototype.getBoundingRect.call(this)},t}(Ie),Iy=function(){function n(t){this.colorStops=t||[]}return n.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},n}(),jo=function(n){function t(e,i,r,o,a,s){var l=n.call(this,a)||this;return l.x=e??0,l.y=i??0,l.x2=r??1,l.y2=o??0,l.type="linear",l.global=s||!1,l}return F(t,n),t}(Iy),nh=function(n){function t(e,i,r,o,a){var s=n.call(this,o)||this;return s.x=e??.5,s.y=i??.5,s.r=r??.5,s.type="radial",s.global=a||!1,s}return F(t,n),t}(Iy),Ki=[0,0],Ji=[0,0],zs=new ge,Bs=new ge,Vs=function(){function n(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new ge;for(i=0;i<2;i++)this._axes[i]=new ge;t&&this.fromBoundingRect(t,e)}return n.prototype.fromBoundingRect=function(t,e){var i=this._corners,r=this._axes,o=t.x,a=t.y,s=o+t.width,l=a+t.height;if(i[0].set(o,a),i[1].set(s,a),i[2].set(s,l),i[3].set(o,l),e)for(var u=0;u<4;u++)i[u].transform(e);for(ge.sub(r[0],i[1],i[0]),ge.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize(),u=0;u<2;u++)this._origin[u]=r[u].dot(i[0])},n.prototype.intersect=function(t,e){var i=!0,r=!e;return zs.set(1/0,1/0),Bs.set(0,0),!this._intersectCheckOneSide(this,t,zs,Bs,r,1)&&(i=!1,r)||!this._intersectCheckOneSide(t,this,zs,Bs,r,-1)&&(i=!1,r)||r||ge.copy(e,i?zs:Bs),i},n.prototype._intersectCheckOneSide=function(t,e,i,r,o,a){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,Ki),this._getProjMinMaxOnAxis(l,e._corners,Ji),Ki[1]<Ji[0]||Ki[0]>Ji[1]){if(s=!1,o)return s;var c=Math.abs(Ji[0]-Ki[1]),h=Math.abs(Ki[0]-Ji[1]);Math.min(c,h)>r.len()&&(c<h?ge.scale(r,u,-c*a):ge.scale(r,u,h*a))}else i&&(c=Math.abs(Ji[0]-Ki[1]),h=Math.abs(Ki[0]-Ji[1]),Math.min(c,h)<i.len()&&(c<h?ge.scale(i,u,c*a):ge.scale(i,u,-h*a)))}return s},n.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var r=this._axes[t],o=this._origin,a=e[0].dot(r)+o[t],s=a,l=a,u=1;u<e.length;u++){var c=e[u].dot(r)+o[t];s=Math.min(c,s),l=Math.max(c,l)}i[0]=s,i[1]=l},n}(),sM=[],Ay=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return F(t,n),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 r=0;r<e.length;r++)this.addDisplayable(e[r],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(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++)(i=this._displayables[e]).parent=this,i.update(),i.parent=null;for(e=0;e<this._temporaryDisplayables.length;e++){var i;(i=this._temporaryDisplayables[e]).parent=this,i.update(),i.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new me(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var r=this._displayables[i],o=r.getBoundingRect().clone();r.needLocalTransform()&&o.applyTransform(r.getLocalTransform(sM)),e.union(o)}this._rect=e}return this._rect},t.prototype.contain=function(e,i){var r=this.transformCoordToLocal(e,i);if(this.getBoundingRect().contain(r[0],r[1])){for(var o=0;o<this._displayables.length;o++)if(this._displayables[o].contain(e,i))return!0}return!1},t}(Fi),lM=Ee();function ih(n,t,e,i,r,o,a){var s,l=!1;ue(r)?(a=o,o=r,r=null):ne(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u=n==="leave";u||t.stopAnimation("leave");var c=function(p,d,f,g,y){var v;if(d&&d.ecModel){var m=d.ecModel.getUpdatePayload();v=m&&m.animation}var _=p==="update";if(d&&d.isAnimationEnabled()){var x=void 0,b=void 0,w=void 0;return g?(x=xe(g.duration,200),b=xe(g.easing,"cubicOut"),w=0):(x=d.getShallow(_?"animationDurationUpdate":"animationDuration"),b=d.getShallow(_?"animationEasingUpdate":"animationEasing"),w=d.getShallow(_?"animationDelayUpdate":"animationDelay")),v&&(v.duration!=null&&(x=v.duration),v.easing!=null&&(b=v.easing),v.delay!=null&&(w=v.delay)),ue(w)&&(w=w(f,y)),ue(x)&&(x=x(f)),{duration:x||0,delay:w,easing:b}}return null}(n,i,r,u?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,r):null);if(c&&c.duration>0){var h={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:n,during:a};l?t.animateFrom(e,h):t.animateTo(e,h)}else t.stopAnimation(),!l&&t.attr(e),a&&a(1),o&&o()}function ze(n,t,e,i,r,o){ih("update",n,t,e,i,r,o)}function Ye(n,t,e,i,r,o){ih("enter",n,t,e,i,r,o)}function Nr(n){if(!n.__zr)return!0;for(var t=0;t<n.animators.length;t++)if(n.animators[t].scope==="leave")return!0;return!1}function Ko(n,t,e,i,r,o){Nr(n)||ih("leave",n,t,e,i,r,o)}function Dy(n,t,e,i){n.removeTextContent(),n.removeTextGuideLine(),Ko(n,{style:{opacity:0}},t,e,i)}function Jo(n,t,e){function i(){n.parent&&n.parent.remove(n)}n.isGroup?n.traverse(function(r){r.isGroup||Dy(r,t,e,i)}):Dy(n,t,e,i)}function Er(n){lM(n).oldStyle=n.style}var Fs=Math.max,Gs=Math.min,rh={};function ky(n){return Ie.extend(n)}function Ly(n,t){return e=by(n,t),function(i){function r(o){var a=i.call(this,o)||this;return a.applyTransform=e.applyTransform,a.buildPath=e.buildPath,a}return F(r,i),r}(_y);var e}function jt(n,t){rh[n]=t}function Py(n){if(rh.hasOwnProperty(n))return rh[n]}function Hs(n,t,e,i){var r=wy(n,t);return e&&(i==="center"&&(e=Oy(e,r.getBoundingRect())),ah(r,e)),r}function oh(n,t,e){var i=new Tt({style:{image:n,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(r){if(e==="center"){var o={width:r.width,height:r.height};i.setStyle(Oy(t,o))}}});return i}function Oy(n,t){var e,i=t.width/t.height,r=n.height*i;return e=r<=n.width?n.height:(r=n.width)/i,{x:n.x+n.width/2-r/2,y:n.y+n.height/2-e/2,width:r,height:e}}var Kt=function(n,t){for(var e=[],i=n.length,r=0;r<i;r++){var o=n[r];e.push(o.getUpdatedPathProxy(!0))}var a=new Ie(t);return a.createPathProxy(),a.buildPath=function(s){if(xy(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},a};function ah(n,t){if(n.applyTransform){var e=n.getBoundingRect().calculateTransform(t);n.applyTransform(e)}}function $o(n,t){return Hg(n,n,{lineWidth:t}),n}var uM=Zi;function $i(n,t){for(var e=yo([]);n&&n!==t;)_n(e,n.getLocalTransform(),e),n=n.parent;return e}function li(n,t,e){return t&&!ft(t)&&(t=ii.getLocalTransform(t)),e&&(t=Ai([],t)),tt([],n,t)}function sh(n,t,e){var i=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),r=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),o=[n==="left"?-i:n==="right"?i:0,n==="top"?-r:n==="bottom"?r:0];return o=li(o,t,e),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Ry(n){return!n.isGroup}function Ws(n,t,e){if(n&&t){var i,r=(i={},n.traverse(function(a){Ry(a)&&a.anid&&(i[a.anid]=a)}),i);t.traverse(function(a){if(Ry(a)&&a.anid){var s=r[a.anid];if(s){var l=o(a);a.attr(o(s)),ze(a,l,e,ye(a).dataIndex)}}})}function o(a){var s={x:a.x,y:a.y,rotation:a.rotation};return function(l){return l.shape!=null}(a)&&(s.shape=H({},a.shape)),s}}function lh(n,t){return j(n,function(e){var i=e[0];i=Fs(i,t.x),i=Gs(i,t.x+t.width);var r=e[1];return r=Fs(r,t.y),[i,r=Gs(r,t.y+t.height)]})}function Ny(n,t){var e=Fs(n.x,t.x),i=Gs(n.x+n.width,t.x+t.width),r=Fs(n.y,t.y),o=Gs(n.y+n.height,t.y+t.height);if(i>=e&&o>=r)return{x:e,y:r,width:i-e,height:o-r}}function Qo(n,t,e){var i=H({rectHover:!0},t),r=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},n)return n.indexOf("image://")===0?(r.image=n.slice(8),ce(r,e),new Tt(i)):Hs(n.replace("path://",""),i,e,"center")}function Ey(n,t,e,i,r,o,a,s){var l,u=e-n,c=i-t,h=a-r,p=s-o,d=uh(h,p,u,c);if((l=d)<=1e-6&&l>=-1e-6)return!1;var f=n-r,g=t-o,y=uh(f,g,u,c)/d;if(y<0||y>1)return!1;var v=uh(f,g,h,p)/d;return!(v<0||v>1)}function uh(n,t,e,i){return n*i-e*t}function ea(n){var t=n.itemTooltipOption,e=n.componentModel,i=n.itemName,r=Q(t)?{formatter:t}:t,o=e.mainType,a=e.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=n.formatterParamsExtra;l&&D(Oe(l),function(c){Bt(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ye(n.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:ce({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function zy(n,t){var e;n.isGroup&&(e=t(n)),e||n.traverse(t)}function Xs(n,t){if(n)if(Y(n))for(var e=0;e<n.length;e++)zy(n[e],t);else zy(n,t)}jt("circle",In),jt("ellipse",Uo),jt("sector",Nt),jt("ring",Rr),jt("polygon",cn),jt("polyline",qt),jt("rect",ke),jt("line",ut),jt("bezierCurve",Es),jt("arc",qo);const zr=Object.freeze(Object.defineProperty({__proto__:null,Arc:qo,BezierCurve:Es,BoundingRect:me,Circle:In,CompoundPath:th,Ellipse:Uo,Group:_e,Image:Tt,IncrementalDisplayable:Ay,Line:ut,LinearGradient:jo,OrientedBoundingRect:Vs,Path:Ie,Point:ge,Polygon:cn,Polyline:qt,RadialGradient:nh,Rect:ke,Ring:Rr,Sector:Nt,Text:Me,applyTransform:li,clipPointsByRect:lh,clipRectByRect:Ny,createIcon:Qo,extendPath:Ly,extendShape:ky,getShapeClass:Py,getTransform:$i,groupTransition:Ws,initProps:Ye,isElementRemoved:Nr,lineLineIntersect:Ey,linePolygonIntersect:function(n,t,e,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(Ey(n,t,e,i,s[0],s[1],a[0],a[1]))return!0;a=s}},makeImage:oh,makePath:Hs,mergePath:Kt,registerShape:jt,removeElement:Ko,removeElementWithFadeOut:Jo,resizePath:ah,setTooltipConfig:ea,subPixelOptimize:uM,subPixelOptimizeLine:$o,subPixelOptimizeRect:function(n){return Wg(n.shape,n.shape,n.style),n},transformDirection:sh,traverseElements:Xs,updateProps:ze},Symbol.toStringTag,{value:"Module"}));var Us={};function By(n,t){for(var e=0;e<Zt.length;e++){var i=Zt[e],r=t[i],o=n.ensureState(i);o.style=o.style||{},o.style.text=r}var a=n.currentStates.slice();n.clearStates(!0),n.setStyle({text:t.normal}),n.useStates(a,!0)}function ch(n,t,e){var i,r=n.labelFetcher,o=n.labelDataIndex,a=n.labelDimIndex,s=t.normal;r&&(i=r.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),e!=null?{interpolatedValue:e}:null)),i==null&&(i=ue(n.defaultText)?n.defaultText(o,n,e):n.defaultText);for(var l={normal:i},u=0;u<Zt.length;u++){var c=Zt[u],h=t[c];l[c]=xe(r?r.getFormattedLabel(o,c,null,a,h&&h.get("formatter")):null,i)}return l}function Dn(n,t,e,i){e=e||Us;for(var r=n instanceof Me,o=!1,a=0;a<Ds.length;a++)if((p=t[Ds[a]])&&p.getShallow("show")){o=!0;break}var s=r?n:n.getTextContent();if(o){r||(s||(s=new Me,n.setTextContent(s)),n.stateProxy&&(s.stateProxy=n.stateProxy));var l=ch(e,t),u=t.normal,c=!!u.getShallow("show"),h=nt(u,i&&i.normal,e,!1,!r);for(h.text=l.normal,r||n.setTextConfig(Vy(u,e,!1)),a=0;a<Zt.length;a++){var p,d=Zt[a];if(p=t[d]){var f=s.ensureState(d),g=!!xe(p.getShallow("show"),c);g!==c&&(f.ignore=!g),f.style=nt(p,i&&i[d],e,!0,!r),f.style.text=l[d],r||(n.ensureState(d).textConfig=Vy(p,e,!0))}}s.silent=!!u.getShallow("silent"),s.style.x!=null&&(h.x=s.style.x),s.style.y!=null&&(h.y=s.style.y),s.ignore=!c,s.useStyle(h),s.dirty(),e.enableTextSetter&&(Br(s).setLabelText=function(y){var v=ch(e,t,y);By(s,v)})}else s&&(s.ignore=!0);n.dirty()}function kn(n,t){t=t||"label";for(var e={normal:n.getModel(t)},i=0;i<Zt.length;i++){var r=Zt[i];e[r]=n.getModel([r,t])}return e}function nt(n,t,e,i,r){var o={};return function(a,s,l,u,c){l=l||Us;var h,p=s.ecModel,d=p&&p.option.textStyle,f=function(_){for(var x;_&&_!==_.ecModel;){var b=(_.option||Us).rich;if(b){x=x||{};for(var w=Oe(b),M=0;M<w.length;M++)x[w[M]]=1}_=_.parentModel}return x}(s);if(f){for(var g in h={},f)if(f.hasOwnProperty(g)){var y=s.getModel(["rich",g]);Wy(h[g]={},y,d,l,u,c,!1,!0)}}h&&(a.rich=h);var v=s.get("overflow");v&&(a.overflow=v);var m=s.get("minMargin");m!=null&&(a.margin=m),Wy(a,s,d,l,u,c,!0,!1)}(o,n,e,i,r),t&&H(o,t),o}function Vy(n,t,e){t=t||{};var i,r={},o=n.getShallow("rotate"),a=xe(n.getShallow("distance"),e?null:5),s=n.getShallow("offset");return(i=n.getShallow("position")||(e?null:"inside"))==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(r.position=i),s!=null&&(r.offset=s),o!=null&&(o*=Math.PI/180,r.rotation=o),a!=null&&(r.distance=a),r.outsideFill=n.get("color")==="inherit"?t.inheritColor||null:"auto",r}var Fy=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Gy=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Hy=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Wy(n,t,e,i,r,o,a,s){e=!r&&e||Us;var l=i&&i.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),h=xe(t.getShallow("opacity"),e.opacity);u!=="inherit"&&u!=="auto"||(u=l||null),c!=="inherit"&&c!=="auto"||(c=l||null),o||(u=u||e.color,c=c||e.textBorderColor),u!=null&&(n.fill=u),c!=null&&(n.stroke=c);var p=xe(t.getShallow("textBorderWidth"),e.textBorderWidth);p!=null&&(n.lineWidth=p);var d=xe(t.getShallow("textBorderType"),e.textBorderType);d!=null&&(n.lineDash=d);var f=xe(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);f!=null&&(n.lineDashOffset=f),r||h!=null||s||(h=i&&i.defaultOpacity),h!=null&&(n.opacity=h),r||o||n.fill==null&&i.inheritColor&&(n.fill=i.inheritColor);for(var g=0;g<Fy.length;g++){var y=Fy[g];(m=xe(t.getShallow(y),e[y]))!=null&&(n[y]=m)}for(g=0;g<Gy.length;g++)y=Gy[g],(m=t.getShallow(y))!=null&&(n[y]=m);if(n.verticalAlign==null){var v=t.getShallow("baseline");v!=null&&(n.verticalAlign=v)}if(!a||!i.disableBox){for(g=0;g<Hy.length;g++){var m;y=Hy[g],(m=t.getShallow(y))!=null&&(n[y]=m)}var _=t.getShallow("borderType");_!=null&&(n.borderDash=_),n.backgroundColor!=="auto"&&n.backgroundColor!=="inherit"||!l||(n.backgroundColor=l),n.borderColor!=="auto"&&n.borderColor!=="inherit"||!l||(n.borderColor=l)}}function Xy(n,t){var e=t&&t.getModel("textStyle");return zt([n.fontStyle||e&&e.getShallow("fontStyle")||"",n.fontWeight||e&&e.getShallow("fontWeight")||"",(n.fontSize||e&&e.getShallow("fontSize")||12)+"px",n.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Br=Ee();function Uy(n,t,e,i){if(n){var r=Br(n);r.prevValue=r.value,r.value=e;var o=t.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=t)}}function Yy(n,t,e,i,r){var o=Br(n);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=xe(o.interpolatedValue,o.prevValue),l=o.value;n.percent=0,(o.prevValue==null?Ye:ze)(n,{percent:1},i,t,null,function(u){var c=Tg(e,o.precision,s,l,u);o.interpolatedValue=u===1?null:c;var h=ch({labelDataIndex:t,labelFetcher:r,defaultText:a?a(c):c+""},o.statesModels,c);By(n,h)})}}var hh,ph,cM=["textStyle","color"],dh=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],fh=new Me,hM=function(){function n(){}return n.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(cM):null)},n.prototype.getFont=function(){return Xy({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},n.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<dh.length;i++)e[dh[i]]=this.getShallow(dh[i]);return fh.useStyle(e),fh.update(),fh.getBoundingRect()},n}(),Zy=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],pM=Cr(Zy),dM=function(){function n(){}return n.prototype.getLineStyle=function(t){return pM(this,t)},n}(),qy=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],fM=Cr(qy),gM=function(){function n(){}return n.prototype.getItemStyle=function(t,e){return fM(this,t,e)},n}(),Le=function(){function n(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}return n.prototype.init=function(t,e,i){},n.prototype.mergeOption=function(t,e){de(this.option,t,!0)},n.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},n.prototype.getShallow=function(t,e){var i=this.option,r=i==null?i:i[t];if(r==null&&!e){var o=this.parentModel;o&&(r=o.getShallow(t))}return r},n.prototype.getModel=function(t,e){var i=t!=null,r=i?this.parsePath(t):null;return new n(i?this._doGet(r):this.option,e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),this.ecModel)},n.prototype.isEmpty=function(){return this.option==null},n.prototype.restoreData=function(){},n.prototype.clone=function(){return new this.constructor(ae(this.option))},n.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},n.prototype.resolveParentPath=function(t){return t},n.prototype.isAnimationEnabled=function(){if(!fe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},n.prototype._doGet=function(t,e){var i=this.option;if(!t)return i;for(var r=0;r<t.length&&(!t[r]||(i=i&&typeof i=="object"?i[t[r]]:null)!=null);r++);return i==null&&e&&(i=e._doGet(this.resolveParentPath(t),e.parentModel)),i},n}();Sc(Le),hh=Le,ph=["__\0is_clz",pS++].join("_"),hh.prototype[ph]=!0,hh.isInstance=function(n){return!(!n||!n[ph])},at(Le,dM),at(Le,gM),at(Le,yS),at(Le,hM);var yM=Math.round(10*Math.random());function Vr(n){return[n||"",yM++].join("_")}function ta(n,t){return de(de({},n,!0),t,!0)}var Ys="ZH",gh="EN",na=gh,Zs={},yh={},jy=fe.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||na).toUpperCase().indexOf(Ys)>-1?Ys:na;function vh(n,t){n=n.toUpperCase(),yh[n]=new Le(t),Zs[n]=t}vh(gh,{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:". "}}}}),vh(Ys,{time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}});var Ky=36e5,ia=864e5,Jy=31536e6,ra={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}"},qs="{yyyy}-{MM}-{dd}",$y={year:"{yyyy}",month:"{yyyy}-{MM}",day:qs,hour:qs+" "+ra.hour,minute:qs+" "+ra.minute,second:qs+" "+ra.second,millisecond:ra.none},mh=["year","month","day","hour","minute","second","millisecond"],Qy=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function vt(n,t){return"0000".substr(0,t-(n+="").length)+n}function Fr(n){switch(n){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return n}}function oa(n,t,e,i){var r=Wt(n),o=r[_h(e)](),a=r[Gr(e)]()+1,s=Math.floor((a-1)/3)+1,l=r[js(e)](),u=r["get"+(e?"UTC":"")+"Day"](),c=r[aa(e)](),h=(c-1)%12+1,p=r[Ks(e)](),d=r[Js(e)](),f=r[$s(e)](),g=c>=12?"pm":"am",y=g.toUpperCase(),v=i instanceof Le?i:function(M){return yh[M]}(i||jy)||yh[na],m=v.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),w=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,vt(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,vt(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,vt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,vt(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,vt(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,vt(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,vt(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,vt(f,3)).replace(/{S}/g,f+"")}function ev(n,t){var e=Wt(n),i=e[Gr(t)]()+1,r=e[js(t)](),o=e[aa(t)](),a=e[Ks(t)](),s=e[Js(t)](),l=e[$s(t)]()===0,u=l&&s===0,c=u&&a===0,h=c&&o===0,p=h&&r===1;return p&&i===1?"year":p?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function tv(n,t,e){var i=Ae(n)?Wt(n):n;switch(t=t||ev(n,e)){case"year":return i[_h(e)]();case"half-year":return i[Gr(e)]()>=6?1:0;case"quarter":return Math.floor((i[Gr(e)]()+1)/4);case"month":return i[Gr(e)]();case"day":return i[js(e)]();case"half-day":return i[aa(e)]()/24;case"hour":return i[aa(e)]();case"minute":return i[Ks(e)]();case"second":return i[Js(e)]();case"millisecond":return i[$s(e)]()}}function _h(n){return n?"getUTCFullYear":"getFullYear"}function Gr(n){return n?"getUTCMonth":"getMonth"}function js(n){return n?"getUTCDate":"getDate"}function aa(n){return n?"getUTCHours":"getHours"}function Ks(n){return n?"getUTCMinutes":"getMinutes"}function Js(n){return n?"getUTCSeconds":"getSeconds"}function $s(n){return n?"getUTCMilliseconds":"getMilliseconds"}function vM(n){return n?"setUTCFullYear":"setFullYear"}function nv(n){return n?"setUTCMonth":"setMonth"}function iv(n){return n?"setUTCDate":"setDate"}function rv(n){return n?"setUTCHours":"setHours"}function ov(n){return n?"setUTCMinutes":"setMinutes"}function av(n){return n?"setUTCSeconds":"setSeconds"}function sv(n){return n?"setUTCMilliseconds":"setMilliseconds"}function xh(n){if(!xc(n))return Q(n)?n:"-";var t=(n+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function bh(n,t){return n=(n||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&n&&(n=n.charAt(0).toUpperCase()+n.slice(1)),n}var Hr=Tu;function wh(n,t,e){function i(u){return u&&zt(u)?u:"-"}function r(u){return!(u==null||isNaN(u)||!isFinite(u))}var o=t==="time",a=n instanceof Date;if(o||a){var s=o?Wt(n):n;if(!isNaN(+s))return oa(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",e);if(a)return"-"}if(t==="ordinal")return ja(n)?i(n):Ae(n)&&r(n)?n+"":"-";var l=Lo(n);return r(l)?xh(l):ja(n)?i(n):typeof n=="boolean"?n+"":"-"}var lv=["a","b","c","d","e","f","g"],Sh=function(n,t){return"{"+n+(t??"")+"}"};function Mh(n,t,e){Y(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],o=0;o<r.length;o++){var a=lv[o];n=n.replace(Sh(a),Sh(a,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=t[s][r[l]];n=n.replace(Sh(lv[l],s),e?wt(u):u)}return n}function uv(n,t){var e=Q(n)?{color:n,extraCssText:t}:n||{},i=e.color,r=e.type;t=e.extraCssText;var o=e.renderMode||"html";return i?o==="html"?r==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+wt(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+wt(i)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(e.markerId||"markerX")+"|} ",style:r==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function cv(n){return n&&n.charAt(0).toUpperCase()+n.substr(1)}function Qi(n,t){return t=t||"transparent",Q(n)?n:ne(n)&&n.colorStops&&(n.colorStops[0]||{}).color||t}function hv(n,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=n}else window.open(n,t)}var Qs=D,mM=["left","right","top","bottom","width","height"],el=[["width","left","right"],["height","top","bottom"]];function Th(n,t,e,i,r){var o=0,a=0;i==null&&(i=1/0),r==null&&(r=1/0);var s=0;t.eachChild(function(l,u){var c,h,p=l.getBoundingRect(),d=t.childAt(u+1),f=d&&d.getBoundingRect();if(n==="horizontal"){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+e,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(h=a+y)>r||l.newline?(o+=s+e,a=0,h=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),n==="horizontal"?o=c+e:a=h+e)})}var er=Th;function It(n,t,e){e=Hr(e||0);var i=t.width,r=t.height,o=ee(n.left,i),a=ee(n.top,r),s=ee(n.right,i),l=ee(n.bottom,r),u=ee(n.width,i),c=ee(n.height,r),h=e[2]+e[0],p=e[1]+e[3],d=n.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(c)&&(c=r-l-h-a),d!=null&&(isNaN(u)&&isNaN(c)&&(d>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-c-h),n.left||n.right){case"center":o=i/2-u/2-e[3];break;case"right":o=i-u-p}switch(n.top||n.bottom){case"middle":case"center":a=r/2-c/2-e[0];break;case"bottom":a=r-c-h}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var f=new me(o+e[3],a+e[0],u,c);return f.margin=e,f}function pv(n,t,e,i,r,o){var a;if((o=o||n).x=n.x,o.y=n.y,a=n.getBoundingRect(),n.needLocalTransform()){var s=n.getLocalTransform();(a=a.clone()).applyTransform(s)}var l=It(ce({width:a.width,height:a.height},t),e,i),u=l.x-a.x,c=l.y-a.y;return o.x+=u,o.y+=c,o===n&&n.markRedraw(),!0}function sa(n){var t=n.layoutMode||n.constructor.layoutMode;return ne(t)?t:t?{type:t}:null}function Wr(n,t,e){var i=e&&e.ignoreSize;!Y(i)&&(i=[i,i]);var r=a(el[0],0),o=a(el[1],1);function a(c,h){var p={},d=0,f={},g=0;if(Qs(c,function(m){f[m]=n[m]}),Qs(c,function(m){s(t,m)&&(p[m]=f[m]=t[m]),l(p,m)&&d++,l(f,m)&&g++}),i[h])return l(t,c[1])?f[c[2]]=null:l(t,c[2])&&(f[c[1]]=null),f;if(g!==2&&d){if(d>=2)return p;for(var y=0;y<c.length;y++){var v=c[y];if(!s(p,v)&&s(n,v)){p[v]=n[v];break}}return p}return f}function s(c,h){return c.hasOwnProperty(h)}function l(c,h){return c[h]!=null&&c[h]!=="auto"}function u(c,h,p){Qs(c,function(d){h[d]=p[d]})}u(el[0],n,r),u(el[1],n,o)}function tl(n){return function(t,e){return e&&t&&Qs(mM,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}({},n)}Se(Th,"vertical"),Se(Th,"horizontal");var _M=Ee(),be=function(n){function t(e,i,r){var o=n.call(this,e,i,r)||this;return o.uid=Vr("ec_cpt_model"),o}return F(t,n),t.prototype.init=function(e,i,r){this.mergeDefaultAndTheme(e,r)},t.prototype.mergeDefaultAndTheme=function(e,i){var r=sa(this),o=r?tl(e):{};de(e,i.getTheme().get(this.mainType)),de(e,this.getDefaultOption()),r&&Wr(e,o,r)},t.prototype.mergeOption=function(e,i){de(this.option,e,!0);var r=sa(this);r&&Wr(this.option,e,r)},t.prototype.optionUpdated=function(e,i){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(u){return!(!u||!u[Cg])}(e))return e.defaultOption;var i=_M(this);if(!i.defaultOption){for(var r=[],o=e;o;){var a=o.prototype.defaultOption;a&&r.push(a),o=o.superClass}for(var s={},l=r.length-1;l>=0;l--)s=de(s,r[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var r=e+"Index",o=e+"Id";return zo(this.ecModel,e,{index:this.get(r,!0),id:this.get(o,!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}(Le);Ig(be,Le),Ss(be),function(n){var t={};n.registerSubTypeDefaulter=function(e,i){var r=Sn(e);t[r.main]=i},n.determineSubType=function(e,i){var r=i.type;if(!r){var o=Sn(e).main;n.hasSubTypes(e)&&t[o]&&(r=t[o](i))}return r}}(be),function(){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}be.topologicalTravel=function(t,e,i,r){if(t.length){var o=function(f){var g={},y=[];return D(f,function(v){var m,_,x=n(g,v),b=function(w,M){var S=[];return D(w,function(C){we(M,C)>=0&&S.push(C)}),S}(x.originalDeps=(m=v,_=[],D(be.getClassesByMainType(m),function(w){_=_.concat(w.dependencies||w.prototype.dependencies||[])}),_=j(_,function(w){return Sn(w).main}),m!=="dataset"&&we(_,"dataset")<=0&&_.unshift("dataset"),_),f);x.entryCount=b.length,x.entryCount===0&&y.push(v),D(b,function(w){we(x.predecessor,w)<0&&x.predecessor.push(w);var M=n(g,w);we(M.successor,w)<0&&M.successor.push(v)})}),{graph:g,noEntryList:y}}(e),a=o.graph,s=o.noEntryList,l={};for(D(t,function(f){l[f]=!0});s.length;){var u=s.pop(),c=a[u],h=!!l[u];h&&(i.call(r,u,c.originalDeps.slice()),delete l[u]),D(c.successor,h?d:p)}D(l,function(){throw new Error("")})}function p(f){a[f].entryCount--,a[f].entryCount===0&&s.push(f)}function d(f){l[f]=!0,p(f)}}}();var dv="";typeof navigator<"u"&&(dv=navigator.platform||"");var Xr="rgba(0, 0, 0, 0.2)";const xM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Xr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Xr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Xr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Xr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Xr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Xr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:dv.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 fv=re(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Jt="original",At="arrayRows",hn="objectRows",Ln="keyedColumns",ui="typedArray",gv="unknown",Pn="column",Ur="row",yv=Ee();function bM(n,t,e){var i={},r=Ih(t);if(!r||!n)return i;var o,a,s=[],l=[],u=t.ecModel,c=yv(u).datasetMap,h=r.uid+"_"+e.seriesLayoutBy;D(n=n.slice(),function(g,y){var v=ne(g)?g:n[y]={name:g};v.type==="ordinal"&&o==null&&(o=y,a=f(v)),i[v.name]=[]});var p=c.get(h)||c.set(h,{categoryWayDim:a,valueWayDim:0});function d(g,y,v){for(var m=0;m<v;m++)g.push(y+m)}function f(g){var y=g.dimsDef;return y?y.length:1}return D(n,function(g,y){var v=g.name,m=f(g);if(o==null){var _=p.valueWayDim;d(i[v],_,m),d(l,_,m),p.valueWayDim+=m}else o===y?(d(i[v],0,m),d(s,0,m)):(_=p.categoryWayDim,d(i[v],_,m),d(l,_,m),p.categoryWayDim+=m)}),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i}function Ch(n,t,e){var i={};if(!Ih(n))return i;var r,o=t.sourceFormat,a=t.dimensionsDefine;o!==hn&&o!==Ln||D(a,function(u,c){(ne(u)?u.name:u)==="name"&&(r=c)});var s=function(){for(var u={},c={},h=[],p=0,d=Math.min(5,e);p<d;p++){var f=mv(t.data,o,t.seriesLayoutBy,a,t.startIndex,p);h.push(f);var g=f===3;if(g&&u.v==null&&p!==r&&(u.v=p),(u.n==null||u.n===u.v||!g&&h[u.n]===3)&&(u.n=p),y(u)&&h[u.n]!==3)return u;g||(f===2&&c.v==null&&p!==r&&(c.v=p),c.n!=null&&c.n!==c.v||(c.n=p))}function y(v){return v.v!=null&&v.n!=null}return y(u)?u:y(c)?c:null}();if(s){i.value=[s.v];var l=r??s.n;i.itemName=[l],i.seriesName=[l]}return i}function Ih(n){if(!n.get("data",!0))return zo(n.ecModel,"dataset",{index:n.get("datasetIndex",!0),id:n.get("datasetId",!0)},Qe).models[0]}function vv(n,t){return mv(n.data,n.sourceFormat,n.seriesLayoutBy,n.dimensionsDefine,n.startIndex,t)}function mv(n,t,e,i,r,o){var a,s,l;if(gt(n))return 3;if(i){var u=i[o];ne(u)?(s=u.name,l=u.type):Q(u)&&(s=u)}if(l!=null)return l==="ordinal"?1:3;if(t===At){var c=n;if(e===Ur){for(var h=c[o],p=0;p<(h||[]).length&&p<5;p++)if((a=m(h[r+p]))!=null)return a}else for(p=0;p<c.length&&p<5;p++){var d=c[r+p];if(d&&(a=m(d[o]))!=null)return a}}else if(t===hn){var f=n;if(!s)return 3;for(p=0;p<f.length&&p<5;p++)if((y=f[p])&&(a=m(y[s]))!=null)return a}else if(t===Ln){if(!s||!(h=n[s])||gt(h))return 3;for(p=0;p<h.length&&p<5;p++)if((a=m(h[p]))!=null)return a}else if(t===Jt){var g=n;for(p=0;p<g.length&&p<5;p++){var y,v=Oo(y=g[p]);if(!Y(v))return 3;if((a=m(v[o]))!=null)return a}}function m(_){var x=Q(_);return _!=null&&Number.isFinite(Number(_))&&_!==""?x?2:3:x&&_!=="-"?1:void 0}return 3}var nl,la,_v,Ah=re(),xv=Ee(),wM=Ee(),Dh=function(){function n(){}return n.prototype.getColorFromPalette=function(t,e,i){var r=Ke(this.get("color",!0)),o=this.get("colorLayer",!0);return wv(this,xv,r,o,t,e,i)},n.prototype.clearColorPalette=function(){(function(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}})(this,xv)},n}();function bv(n,t,e,i){var r=Ke(n.get(["aria","decal","decals"]));return wv(n,wM,r,null,t,e,i)}function wv(n,t,e,i,r,o,a){var s=t(o=o||n),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=a!=null&&i?function(p,d){for(var f=p.length,g=0;g<f;g++)if(p[g].length>d)return p[g];return p[f-1]}(i,a):e;if((c=c||e)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}var Sv="\0_ec_inner",kh=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.init=function(e,i,r,o,a,s){o=o||{},this.option=null,this._theme=new Le(o),this._locale=new Le(a),this._optionManager=s},t.prototype.setOption=function(e,i,r){var o=Cv(i);this._optionManager.setOption(e,r,o),this._resetOption(null,o)},t.prototype.resetOption=function(e,i){return this._resetOption(e,Cv(i))},t.prototype._resetOption=function(e,i){var r=!1,o=this._optionManager;if(!e||e==="recreate"){var a=o.mountOption(e==="recreate");this.option&&e!=="recreate"?(this.restoreData(),this._mergeOption(a,i)):_v(this,a),r=!0}if(e!=="timeline"&&e!=="media"||this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=o.getTimelineOption(this);s&&(r=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=o.getMediaOption(this);l.length&&D(l,function(u){r=!0,this._mergeOption(u,i)},this)}return r},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var r=this.option,o=this._componentsMap,a=this._componentsCount,s=[],l=re(),u=i&&i.replaceMergeMainTypeMap;yv(this).datasetMap=re(),D(e,function(c,h){c!=null&&(be.hasClass(h)?h&&(s.push(h),l.set(h,!0)):r[h]=r[h]==null?ae(c):de(r[h],c,!0))}),u&&u.each(function(c,h){be.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),be.topologicalTravel(s,be.getAllClassMainTypes(),function(c){var h=function(m,_,x){var b=Ah.get(_);if(!b)return x;var w=b(m);return w?x.concat(w):x}(this,c,Ke(e[c])),p=o.get(c),d=function(m,_,x){var b=x==="normalMerge",w=x==="replaceMerge",M=x==="replaceAll";m=m||[],_=(_||[]).slice();var S=re();D(_,function(A,k){ne(A)||(_[k]=null)});var C,I,T=function(A,k,L){var O=[];if(L==="replaceAll")return O;for(var P=0;P<A.length;P++){var R=A[P];R&&R.id!=null&&k.set(R.id,P),O.push({existing:L==="replaceMerge"||No(R)?null:R,newOption:null,keyInfo:null,brandNew:null})}return O}(m,S,x);return(b||w)&&function(A,k,L,O){D(O,function(P,R){if(P&&P.id!=null){var N=Ro(P.id),E=L.get(N);if(E!=null){var z=A[E];Ot(!z.newOption,'Duplicated option on id "'+N+'".'),z.newOption=P,z.existing=k[E],O[R]=null}}})}(T,m,S,_),b&&function(A,k){D(k,function(L,O){if(L&&L.name!=null)for(var P=0;P<A.length;P++){var R=A[P].existing;if(!A[P].newOption&&R&&(R.id==null||L.id==null)&&!No(L)&&!No(R)&&Sg("name",R,L))return A[P].newOption=L,void(k[O]=null)}})}(T,_),b||w?function(A,k,L){D(k,function(O){if(O){for(var P,R=0;(P=A[R])&&(P.newOption||No(P.existing)||P.existing&&O.id!=null&&!Sg("id",O,P.existing));)R++;P?(P.newOption=O,P.brandNew=L):A.push({newOption:O,brandNew:L,existing:null,keyInfo:null}),R++}})}(T,_,w):M&&function(A,k){D(k,function(L){A.push({newOption:L,brandNew:!0,existing:null,keyInfo:null})})}(T,_),C=T,I=re(),D(C,function(A){var k=A.existing;k&&I.set(k.id,A)}),D(C,function(A){var k=A.newOption;Ot(!k||k.id==null||!I.get(k.id)||I.get(k.id)===A,"id duplicates: "+(k&&k.id)),k&&k.id!=null&&I.set(k.id,A),!A.keyInfo&&(A.keyInfo={})}),D(C,function(A,k){var L=A.existing,O=A.newOption,P=A.keyInfo;if(ne(O)){if(P.name=O.name!=null?Ro(O.name):L?L.name:xg+k,L)P.id=Ro(L.id);else if(O.id!=null)P.id=Ro(O.id);else{var R=0;do P.id="\0"+P.name+"\0"+R++;while(I.get(P.id))}I.set(P.id,A)}}),T}(p,h,p?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll");(function(m,_,x){D(m,function(b){var w=b.newOption;ne(w)&&(b.keyInfo.mainType=_,b.keyInfo.subType=function(M,S,C,I){return S.type?S.type:C?C.subType:I.determineSubType(M,S)}(_,w,b.existing,x))})})(d,c,be),r[c]=null,o.set(c,null),a.set(c,0);var f,g=[],y=[],v=0;D(d,function(m,_){var x=m.existing,b=m.newOption;if(b){var w=c==="series",M=be.getClass(c,m.keyInfo.subType,!w);if(!M)return;if(c==="tooltip"){if(f)return;f=!0}if(x&&x.constructor===M)x.name=m.keyInfo.name,x.mergeOption(b,this),x.optionUpdated(b,!1);else{var S=H({componentIndex:_},m.keyInfo);H(x=new M(b,this,this,S),S),m.brandNew&&(x.__requireNewView=!0),x.init(b,this,this),x.optionUpdated(null,!0)}}else x&&(x.mergeOption({},this),x.optionUpdated({},!1));x?(g.push(x.option),y.push(x),v++):(g.push(void 0),y.push(void 0))},this),r[c]=g,o.set(c,y),a.set(c,v),c==="series"&&nl(this)},this),this._seriesIndices||nl(this)},t.prototype.getOption=function(){var e=ae(this.option);return D(e,function(i,r){if(be.hasClass(r)){for(var o=Ke(i),a=o.length,s=!1,l=a-1;l>=0;l--)o[l]&&!No(o[l])?s=!0:(o[l]=null,!s&&a--);o.length=a,e[r]=o}}),delete e[Sv],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 r=this._componentsMap.get(e);if(r){var o=r[i||0];if(o)return o;if(i==null){for(var a=0;a<r.length;a++)if(r[a])return r[a]}}},t.prototype.queryComponents=function(e){var i=e.mainType;if(!i)return[];var r,o=e.index,a=e.id,s=e.name,l=this._componentsMap.get(i);return l&&l.length?(o!=null?(r=[],D(Ke(o),function(u){l[u]&&r.push(l[u])})):r=a!=null?Mv("id",a,l):s!=null?Mv("name",s,l):He(l,function(u){return!!u}),Tv(r,e)):[]},t.prototype.findComponents=function(e){var i,r,o,a,s,l=e.query,u=e.mainType,c=(r=u+"Index",o=u+"Id",a=u+"Name",!(i=l)||i[r]==null&&i[o]==null&&i[a]==null?null:{mainType:u,index:i[r],id:i[o],name:i[a]});return s=Tv(c?this.queryComponents(c):He(this._componentsMap.get(u),function(h){return!!h}),e),e.filter?He(s,e.filter):s},t.prototype.eachComponent=function(e,i,r){var o=this._componentsMap;if(ue(e)){var a=i,s=e;o.each(function(h,p){for(var d=0;h&&d<h.length;d++){var f=h[d];f&&s.call(a,p,f,f.componentIndex)}})}else for(var l=Q(e)?o.get(e):ne(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(r,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var i=sn(e,null);return He(this._componentsMap.get("series"),function(r){return!!r&&i!=null&&r.name===i})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return He(this._componentsMap.get("series"),function(i){return!!i&&i.subType===e})},t.prototype.getSeries=function(){return He(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,i){la(this),D(this._seriesIndices,function(r){var o=this._componentsMap.get("series")[r];e.call(i,o,r)},this)},t.prototype.eachRawSeries=function(e,i){D(this._componentsMap.get("series"),function(r){r&&e.call(i,r,r.componentIndex)})},t.prototype.eachSeriesByType=function(e,i,r){la(this),D(this._seriesIndices,function(o){var a=this._componentsMap.get("series")[o];a.subType===e&&i.call(r,a,o)},this)},t.prototype.eachRawSeriesByType=function(e,i,r){return D(this.getSeriesByType(e),i,r)},t.prototype.isSeriesFiltered=function(e){return la(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,i){la(this);var r=[];D(this._seriesIndices,function(o){var a=this._componentsMap.get("series")[o];e.call(i,a,o)&&r.push(o)},this),this._seriesIndices=r,this._seriesIndicesMap=re(r)},t.prototype.restoreData=function(e){nl(this);var i=this._componentsMap,r=[];i.each(function(o,a){be.hasClass(a)&&r.push(a)}),be.topologicalTravel(r,be.getAllClassMainTypes(),function(o){D(i.get(o),function(a){!a||o==="series"&&function(s,l){if(l){var u=l.seriesIndex,c=l.seriesId,h=l.seriesName;return u!=null&&s.componentIndex!==u||c!=null&&s.id!==c||h!=null&&s.name!==h}}(a,e)||a.restoreData()})})},t.internalField=(nl=function(e){var i=e._seriesIndices=[];D(e._componentsMap.get("series"),function(r){r&&i.push(r.componentIndex)}),e._seriesIndicesMap=re(i)},la=function(e){},void(_v=function(e,i){e.option={},e.option[Sv]=1,e._componentsMap=re({series:[]}),e._componentsCount=re();var r=i.aria;ne(r)&&r.enabled==null&&(r.enabled=!0),function(o,a){var s=o.color&&!o.colorLayer;D(a,function(l,u){u==="colorLayer"&&s||be.hasClass(u)||(typeof l=="object"?o[u]=o[u]?de(o[u],l,!1):ae(l):o[u]==null&&(o[u]=l))})}(i,e._theme.option),de(i,xM,!1),e._mergeOption(i,null)})),t}(Le);function Mv(n,t,e){if(Y(t)){var i=re();return D(t,function(o){o!=null&&sn(o,null)!=null&&i.set(o,!0)}),He(e,function(o){return o&&i.get(o[n])})}var r=sn(t,null);return He(e,function(o){return o&&r!=null&&o[n]===r})}function Tv(n,t){return t.hasOwnProperty("subType")?He(n,function(e){return e&&e.subType===t.subType}):n}function Cv(n){var t=re();return n&&D(Ke(n.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}at(kh,Dh);var SM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Iv=function(n){D(SM,function(t){this[t]=he(n[t],n)},this)},Lh={},il=function(){function n(){this._coordinateSystems=[]}return n.prototype.create=function(t,e){var i=[];D(Lh,function(r,o){var a=r.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},n.prototype.update=function(t,e){D(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},n.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},n.register=function(t,e){Lh[t]=e},n.get=function(t){return Lh[t]},n}(),MM=/^(min|max)?(.+)$/,TM=function(){function n(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return n.prototype.setOption=function(t,e,i){t&&(D(Ke(t.series),function(a){a&&a.data&&gt(a.data)&&fo(a.data)}),D(Ke(t.dataset),function(a){a&&a.source&&gt(a.source)&&fo(a.source)})),t=ae(t);var r=this._optionBackup,o=function(a,s,l){var u,c,h=[],p=a.baseOption,d=a.timeline,f=a.options,g=a.media,y=!!a.media,v=!!(f||d||p&&p.timeline);function m(_){D(s,function(x){x(_,l)})}return p?(c=p).timeline||(c.timeline=d):((v||y)&&(a.options=a.media=null),c=a),y&&Y(g)&&D(g,function(_){_&&_.option&&(_.query?h.push(_):u||(u=_))}),m(c),D(f,function(_){return m(_)}),D(h,function(_){return m(_.option)}),{baseOption:c,timelineOptions:f||[],mediaDefault:u,mediaList:h}}(t,e,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},n.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],ae(t?e.baseOption:this._newBaseOption)},n.prototype.getTimelineOption=function(t){var e,i=this._timelineOptions;if(i.length){var r=t.getComponent("timeline");r&&(e=ae(i[r.getCurrentIndex()]))}return e},n.prototype.getMediaOption=function(t){var e,i,r=this._api.getWidth(),o=this._api.getHeight(),a=this._mediaList,s=this._mediaDefault,l=[],u=[];if(!a.length&&!s)return u;for(var c=0,h=a.length;c<h;c++)CM(a[c].query,r,o)&&l.push(c);return!l.length&&s&&(l=[-1]),l.length&&(e=l,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(u=j(l,function(p){return ae(p===-1?s.option:a[p].option)})),this._currentMediaIndices=l,u},n}();function CM(n,t,e){var i={width:t,height:e,aspectratio:t/e},r=!0;return D(n,function(o,a){var s=a.match(MM);if(s&&s[1]&&s[2]){var l=s[1],u=s[2].toLowerCase();(function(c,h,p){return p==="min"?c>=h:p==="max"?c<=h:c===h})(i[u],o,l)||(r=!1)}}),r}var pn=D,ua=ne,Av=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ph(n){var t=n&&n.itemStyle;if(t)for(var e=0,i=Av.length;e<i;e++){var r=Av[e],o=t.normal,a=t.emphasis;o&&o[r]&&(n[r]=n[r]||{},n[r].normal?de(n[r].normal,o[r]):n[r].normal=o[r],o[r]=null),a&&a[r]&&(n[r]=n[r]||{},n[r].emphasis?de(n[r].emphasis,a[r]):n[r].emphasis=a[r],a[r]=null)}}function ct(n,t,e){if(n&&n[t]&&(n[t].normal||n[t].emphasis)){var i=n[t].normal,r=n[t].emphasis;i&&(e?(n[t].normal=n[t].emphasis=null,ce(n[t],i)):n[t]=i),r&&(n.emphasis=n.emphasis||{},n.emphasis[t]=r,r.focus&&(n.emphasis.focus=r.focus),r.blurScope&&(n.emphasis.blurScope=r.blurScope))}}function ca(n){ct(n,"itemStyle"),ct(n,"lineStyle"),ct(n,"areaStyle"),ct(n,"label"),ct(n,"labelLine"),ct(n,"upperLabel"),ct(n,"edgeLabel")}function Ze(n,t){var e=ua(n)&&n[t],i=ua(e)&&e.textStyle;if(i)for(var r=0,o=wg.length;r<o;r++){var a=wg[r];i.hasOwnProperty(a)&&(e[a]=i[a])}}function $t(n){n&&(ca(n),Ze(n,"label"),n.emphasis&&Ze(n.emphasis,"label"))}function qn(n){return Y(n)?n:n?[n]:[]}function Dv(n){return(Y(n)?n[0]:n)||{}}function kv(n){n&&D(IM,function(t){t[0]in n&&!(t[1]in n)&&(n[t[1]]=n[t[0]])})}var IM=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],AM=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Oh=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ha(n){var t=n&&n.itemStyle;if(t)for(var e=0;e<Oh.length;e++){var i=Oh[e][1],r=Oh[e][0];t[i]!=null&&(t[r]=t[i])}}function Lv(n){n&&n.alignTo==="edge"&&n.margin!=null&&n.edgeDistance==null&&(n.edgeDistance=n.margin)}function Pv(n){n&&n.downplay&&!n.blur&&(n.blur=n.downplay)}function Ov(n,t){if(n)for(var e=0;e<n.length;e++)t(n[e]),n[e]&&Ov(n[e].children,t)}function Rv(n,t){(function(e,i){pn(qn(e.series),function(o){ua(o)&&function(a){if(ua(a)){Ph(a),ca(a),Ze(a,"label"),Ze(a,"upperLabel"),Ze(a,"edgeLabel"),a.emphasis&&(Ze(a.emphasis,"label"),Ze(a.emphasis,"upperLabel"),Ze(a.emphasis,"edgeLabel"));var s=a.markPoint;s&&(Ph(s),$t(s));var l=a.markLine;l&&(Ph(l),$t(l));var u=a.markArea;u&&$t(u);var c=a.data;if(a.type==="graph"){c=c||a.nodes;var h=a.links||a.edges;if(h&&!gt(h))for(var p=0;p<h.length;p++)$t(h[p]);D(a.categories,function(g){ca(g)})}if(c&&!gt(c))for(p=0;p<c.length;p++)$t(c[p]);if((s=a.markPoint)&&s.data){var d=s.data;for(p=0;p<d.length;p++)$t(d[p])}if((l=a.markLine)&&l.data){var f=l.data;for(p=0;p<f.length;p++)Y(f[p])?($t(f[p][0]),$t(f[p][1])):$t(f[p])}a.type==="gauge"?(Ze(a,"axisLabel"),Ze(a,"title"),Ze(a,"detail")):a.type==="treemap"?(ct(a.breadcrumb,"itemStyle"),D(a.levels,function(g){ca(g)})):a.type==="tree"&&ca(a.leaves)}}(o)});var r=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];i&&r.push("valueAxis","categoryAxis","logAxis","timeAxis"),pn(r,function(o){pn(qn(e[o]),function(a){a&&(Ze(a,"axisLabel"),Ze(a.axisPointer,"label"))})}),pn(qn(e.parallel),function(o){var a=o&&o.parallelAxisDefault;Ze(a,"axisLabel"),Ze(a&&a.axisPointer,"label")}),pn(qn(e.calendar),function(o){ct(o,"itemStyle"),Ze(o,"dayLabel"),Ze(o,"monthLabel"),Ze(o,"yearLabel")}),pn(qn(e.radar),function(o){Ze(o,"name"),o.name&&o.axisName==null&&(o.axisName=o.name,delete o.name),o.nameGap!=null&&o.axisNameGap==null&&(o.axisNameGap=o.nameGap,delete o.nameGap)}),pn(qn(e.geo),function(o){ua(o)&&($t(o),pn(qn(o.regions),function(a){$t(a)}))}),pn(qn(e.timeline),function(o){$t(o),ct(o,"label"),ct(o,"itemStyle"),ct(o,"controlStyle",!0);var a=o.data;Y(a)&&D(a,function(s){ne(s)&&(ct(s,"label"),ct(s,"itemStyle"))})}),pn(qn(e.toolbox),function(o){ct(o,"iconStyle"),pn(o.feature,function(a){ct(a,"iconStyle")})}),Ze(Dv(e.axisPointer),"label"),Ze(Dv(e.tooltip).axisPointer,"label")})(n,t),n.series=Ke(n.series),D(n.series,function(e){if(ne(e)){var i=e.type;if(i==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(i==="pie"||i==="gauge"){if(e.clockWise!=null&&(e.clockwise=e.clockWise),Lv(e.label),(a=e.data)&&!gt(a))for(var r=0;r<a.length;r++)Lv(a[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(i==="gauge"){var o=function(l){for(var u="pointer.color".split(","),c=l,h=0;h<u.length&&(c=c&&c[u[h]])!=null;h++);return c}(e);o!=null&&function(l,u,c){for(var h,p="itemStyle.color".split(","),d=l,f=0;f<p.length-1;f++)d[h=p[f]]==null&&(d[h]={}),d=d[h];d[p[f]]==null&&(d[p[f]]=c)}(e,0,o)}else if(i==="bar"){var a;if(ha(e),ha(e.backgroundStyle),ha(e.emphasis),(a=e.data)&&!gt(a))for(r=0;r<a.length;r++)typeof a[r]=="object"&&(ha(a[r]),ha(a[r]&&a[r].emphasis))}else if(i==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),Pv(e),Ov(e.data,Pv)}else i==="graph"||i==="sankey"?function(l){l&&l.focusNodeAdjacency!=null&&(l.emphasis=l.emphasis||{},l.emphasis.focus==null&&(l.emphasis.focus="adjacency"))}(e):i==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&ce(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),kv(e)}}),n.dataRange&&(n.visualMap=n.dataRange),D(AM,function(e){var i=n[e];i&&(Y(i)||(i=[i]),D(i,function(r){kv(r)}))})}function DM(n){D(n,function(t,e){var i=[],r=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(u,c,h){var p,d,f=a.get(t.stackedDimension,h);if(isNaN(f))return r;s?d=a.getRawIndex(h):p=a.get(t.stackedByDimension,h);for(var g=NaN,y=e-1;y>=0;y--){var v=n[y];if(s||(d=v.data.rawIndexOf(v.stackedByDimension,p)),d>=0){var m=v.data.getByRawIndex(v.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&f>=0&&m>0||l==="samesign"&&f<=0&&m<0){f=sS(f,m),g=m;break}}}return i[0]=f,i[1]=g,i})})}var Yr,Zr,qr,Nv,Ev,rl=function(){return function(n){this.data=n.data||(n.sourceFormat===Ln?{}:[]),this.sourceFormat=n.sourceFormat||gv,this.seriesLayoutBy=n.seriesLayoutBy||Pn,this.startIndex=n.startIndex||0,this.dimensionsDetectedCount=n.dimensionsDetectedCount,this.metaRawOption=n.metaRawOption;var t=this.dimensionsDefine=n.dimensionsDefine;if(t)for(var e=0;e<t.length;e++){var i=t[e];i.type==null&&vv(this,e)===1&&(i.type="ordinal")}}}();function Rh(n){return n instanceof rl}function Nh(n,t,e){e=e||Bv(n);var i=t.seriesLayoutBy,r=function(o,a,s,l,u){var c,h;if(!o)return{dimensionsDefine:Vv(u),startIndex:h,dimensionsDetectedCount:c};if(a===At){var p=o;l==="auto"||l==null?Fv(function(f){f!=null&&f!=="-"&&(Q(f)?h==null&&(h=1):h=0)},s,p,10):h=Ae(l)?l:l?1:0,u||h!==1||(u=[],Fv(function(f,g){u[g]=f!=null?f+"":""},s,p,1/0)),c=u?u.length:s===Ur?p.length:p[0]?p[0].length:null}else if(a===hn)u||(u=function(f){for(var g,y=0;y<f.length&&!(g=f[y++]););if(g)return Oe(g)}(o));else if(a===Ln)u||(u=[],D(o,function(f,g){u.push(g)}));else if(a===Jt){var d=Oo(o[0]);c=Y(d)&&d.length||1}return{startIndex:h,dimensionsDefine:Vv(u),dimensionsDetectedCount:c}}(n,e,i,t.sourceHeader,t.dimensions);return new rl({data:n,sourceFormat:e,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:ae(t)})}function zv(n){return new rl({data:n,sourceFormat:gt(n)?ui:Jt})}function Bv(n){var t=gv;if(gt(n))t=ui;else if(Y(n)){n.length===0&&(t=At);for(var e=0,i=n.length;e<i;e++){var r=n[e];if(r!=null){if(Y(r)||gt(r)){t=At;break}if(ne(r)){t=hn;break}}}}else if(ne(n)){for(var o in n)if(Bt(n,o)&&ft(n[o])){t=Ln;break}}return t}function Vv(n){if(n){var t=re();return j(n,function(e,i){var r={name:(e=ne(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+="",r.displayName==null&&(r.displayName=r.name);var o=t.get(r.name);return o?r.name+="-"+o.count++:t.set(r.name,{count:1}),r})}}function Fv(n,t,e,i){if(t===Ur)for(var r=0;r<e.length&&r<i;r++)n(e[r]?e[r][0]:null,r);else{var o=e[0]||[];for(r=0;r<o.length&&r<i;r++)n(o[r],r)}}function Gv(n){var t=n.sourceFormat;return t===hn||t===Ln}var Hv=function(){function n(t,e){var i=Rh(t)?t:zv(t);this._source=i;var r=this._data=i.data;i.sourceFormat===ui&&(this._offset=0,this._dimSize=e,this._data=r),Ev(this,r,i)}return n.prototype.getSource=function(){return this._source},n.prototype.count=function(){return 0},n.prototype.getItem=function(t,e){},n.prototype.appendData=function(t){},n.prototype.clean=function(){},n.protoInitialize=function(){var t=n.prototype;t.pure=!1,t.persistent=!0}(),n.internalField=function(){var t;Ev=function(a,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,p=l.dimensionsDefine;if(H(a,Nv[zh(u,c)]),u===ui)a.getItem=e,a.count=r,a.fillStorage=i;else{var d=Xv(u,c);a.getItem=he(d,null,s,h,p);var f=Yv(u,c);a.count=he(f,null,s,h,p)}};var e=function(a,s){a-=this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*a,h=0;h<u;h++)s[h]=l[c+h];return s},i=function(a,s,l,u){for(var c=this._data,h=this._dimSize,p=0;p<h;p++){for(var d=u[p],f=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],y=s-a,v=l[p],m=0;m<y;m++){var _=c[m*h+p];v[a+m]=_,_<f&&(f=_),_>g&&(g=_)}d[0]=f,d[1]=g}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(a){for(var s=0;s<a.length;s++)this._data.push(a[s])}(t={})[At+"_"+Pn]={pure:!0,appendData:o},t[At+"_"+Ur]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[hn]={pure:!0,appendData:o},t[Ln]={pure:!0,appendData:function(a){var s=this._data;D(a,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},t[Jt]={appendData:o},t[ui]={persistent:!1,pure:!0,appendData:function(a){this._data=a},clean:function(){this._offset+=this.count(),this._data=null}},Nv=t}(),n}(),Wv=function(n,t,e,i){return n[i]},kM=((Yr={})[At+"_"+Pn]=function(n,t,e,i){return n[i+t]},Yr[At+"_"+Ur]=function(n,t,e,i,r){i+=t;for(var o=r||[],a=n,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[i]:null}return o},Yr[hn]=Wv,Yr[Ln]=function(n,t,e,i,r){for(var o=r||[],a=0;a<e.length;a++){var s=n[e[a].name];o[a]=s?s[i]:null}return o},Yr[Jt]=Wv,Yr);function Xv(n,t){return kM[zh(n,t)]}var Uv=function(n,t,e){return n.length},LM=((Zr={})[At+"_"+Pn]=function(n,t,e){return Math.max(0,n.length-t)},Zr[At+"_"+Ur]=function(n,t,e){var i=n[0];return i?Math.max(0,i.length-t):0},Zr[hn]=Uv,Zr[Ln]=function(n,t,e){var i=n[e[0].name];return i?i.length:0},Zr[Jt]=Uv,Zr);function Yv(n,t){return LM[zh(n,t)]}var Eh=function(n,t,e){return n[t]},PM=((qr={})[At]=Eh,qr[hn]=function(n,t,e){return n[e]},qr[Ln]=Eh,qr[Jt]=function(n,t,e){var i=Oo(n);return i instanceof Array?i[t]:i},qr[ui]=Eh,qr);function Zv(n){return PM[n]}function zh(n,t){return n===At?n+"_"+t:n}function jr(n,t,e){if(n){var i=n.getRawDataItem(t);if(i!=null){var r=n.getStore(),o=r.getSource().sourceFormat;if(e!=null){var a=n.getDimensionIndex(e),s=r.getDimensionProperty(a);return Zv(o)(i,a,s)}var l=i;return o===Jt&&(l=Oo(i)),l}}}var OM=/\{@(.+?)\}/g,RM=function(){function n(){}return n.prototype.getDataParams=function(t,e){var i=this.getData(e),r=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t),s=i.getRawDataItem(t),l=i.getItemVisual(t,"style"),u=l&&l[i.getItemVisual(t,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,p=h==="series",d=i.userOutput&&i.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:a,dataIndex:o,data:s,dataType:e,value:r,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},n.prototype.getFormattedLabel=function(t,e,i,r,o,a){e=e||"normal";var s=this.getData(i),l=this.getDataParams(t,i);return a&&(l.value=a.interpolatedValue),r!=null&&Y(l.value)&&(l.value=l.value[r]),o||(o=s.getItemModel(t).get(e==="normal"?["label","formatter"]:[e,"label","formatter"])),ue(o)?(l.status=e,l.dimensionIndex=r,o(l)):Q(o)?Mh(o,l).replace(OM,function(u,c){var h=c.length,p=c;p.charAt(0)==="["&&p.charAt(h-1)==="]"&&(p=+p.slice(1,h-1));var d=jr(s,t,p);if(a&&Y(a.interpolatedValue)){var f=s.getDimensionIndex(p);f>=0&&(d=a.interpolatedValue[f])}return d!=null?d+"":""}):void 0},n.prototype.getRawValue=function(t,e){return jr(this.getData(e),t)},n.prototype.formatTooltip=function(t,e,i){},n}();function qv(n){var t,e;return ne(n)?n.type&&(e=n):t=n,{text:t,frag:e}}function pa(n){return new NM(n)}var NM=function(){function n(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return n.prototype.perform=function(t){var e,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=h(this._modBy),l=this._modDataCount||0,u=h(t&&t.modBy),c=t&&t.modDataCount||0;function h(m){return!(m>=1)&&(m=1),m}s===u&&l===c||(e="reset"),(this._dirty||e==="reset")&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=c;var p=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(a||d<f)){var g=this._progress;if(Y(g))for(var y=0;y<g.length;y++)this._doProgress(g[y],d,f,u,c);else this._doProgress(g,d,f,u,c)}this._dueIndex=f;var v=this._settedOutputEnd!=null?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},n.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},n.prototype._doProgress=function(t,e,i,r,o){jv.reset(e,i,r,o),this._callingProgress=t,this._callingProgress({start:e,end:i,count:i-e,next:jv.next},this.context)},n.prototype._doReset=function(t){var e,i;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(i=e.forceFirstProgress,e=e.progress),Y(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),i},n.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},n.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},n.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},n.prototype.getUpstream=function(){return this._upstream},n.prototype.getDownstream=function(){return this._downstream},n.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},n}(),jv=function(){var n,t,e,i,r,o={reset:function(l,u,c,h){t=l,n=u,e=c,i=h,r=Math.ceil(i/e),o.next=e>1&&i>0?s:a}};return o;function a(){return t<n?t++:null}function s(){var l=t%r*e+Math.ceil(t/r),u=t>=n?null:l<i?l:t;return t++,u}}();function ol(n,t){var e=t&&t.type;return e==="ordinal"?n:(e!=="time"||Ae(n)||n==null||n==="-"||(n=+Wt(n)),n==null||n===""?NaN:Number(n))}re({number:function(n){return parseFloat(n)},time:function(n){return+Wt(n)},trim:function(n){return Q(n)?zt(n):n}});var EM=function(){function n(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 n.prototype.evaluate=function(t,e){var i=Ae(t)?t:Lo(t),r=Ae(e)?e:Lo(e),o=isNaN(i),a=isNaN(r);if(o&&(i=this._incomparable),a&&(r=this._incomparable),o&&a){var s=Q(t),l=Q(e);s&&(i=l?t:0),l&&(r=s?e:0)}return i<r?this._resultLT:i>r?-this._resultLT:0},n}(),zM=function(){function n(){}return n.prototype.getRawData=function(){throw new Error("not supported")},n.prototype.getRawDataItem=function(t){throw new Error("not supported")},n.prototype.cloneRawData=function(){},n.prototype.getDimensionInfo=function(t){},n.prototype.cloneAllDimensionInfo=function(){},n.prototype.count=function(){},n.prototype.retrieveValue=function(t,e){},n.prototype.retrieveValueFromItem=function(t,e){},n.prototype.convertValue=function(t,e){return ol(t,e)},n}();function BM(n){return Bh(n.sourceFormat)||Mt(""),n.data}function VM(n){var t=n.sourceFormat,e=n.data;if(Bh(t)||Mt(""),t===At){for(var i=[],r=0,o=e.length;r<o;r++)i.push(e[r].slice());return i}if(t===hn){for(i=[],r=0,o=e.length;r<o;r++)i.push(H({},e[r]));return i}}function FM(n,t,e){if(e!=null)return Ae(e)||!isNaN(e)&&!Bt(t,e)?n[e]:Bt(t,e)?t[e]:void 0}function GM(n){return ae(n)}var Kv=re();function HM(n,t,e,i){t.length||Mt(""),ne(n)||Mt("");var r=n.type,o=Kv.get(r);o||Mt("");var a=j(t,function(s){return function(l,u){var c=new zM,h=l.data,p=c.sourceFormat=l.sourceFormat,d=l.startIndex;l.seriesLayoutBy!==Pn&&Mt("");var f=[],g={},y=l.dimensionsDefine;if(y)D(y,function(w,M){var S=w.name,C={index:M,name:S,displayName:w.displayName};f.push(C),S!=null&&(Bt(g,S)&&Mt(""),g[S]=C)});else for(var v=0;v<l.dimensionsDetectedCount;v++)f.push({index:v});var m=Xv(p,Pn);u.__isBuiltIn&&(c.getRawDataItem=function(w){return m(h,d,f,w)},c.getRawData=he(BM,null,l)),c.cloneRawData=he(VM,null,l);var _=Yv(p,Pn);c.count=he(_,null,h,d,f);var x=Zv(p);c.retrieveValue=function(w,M){var S=m(h,d,f,w);return b(S,M)};var b=c.retrieveValueFromItem=function(w,M){if(w!=null){var S=f[M];return S?x(w,M,S.name):void 0}};return c.getDimensionInfo=he(FM,null,f,g),c.cloneAllDimensionInfo=he(GM,null,f),c}(s,o)});return j(Ke(o.transform({upstream:a[0],upstreamList:a,config:ae(n.config)})),function(s,l){var u;ne(s)||Mt(""),s.data||Mt(""),Bh(Bv(s.data))||Mt("");var c=t[0];if(c&&l===0&&!s.dimensions){var h=c.startIndex;h&&(s.data=c.data.slice(0,h).concat(s.data)),u={seriesLayoutBy:Pn,sourceHeader:h,dimensions:c.metaRawOption.dimensions}}else u={seriesLayoutBy:Pn,sourceHeader:0,dimensions:s.dimensions};return Nh(s.data,u,null)})}function Bh(n){return n===At||n===hn}var Vh,al="undefined",WM=typeof Uint32Array===al?Array:Uint32Array,XM=typeof Uint16Array===al?Array:Uint16Array,Jv=typeof Int32Array===al?Array:Int32Array,$v=typeof Float64Array===al?Array:Float64Array,Qv={float:$v,int:Jv,ordinal:Array,number:Array,time:$v};function da(n){return n>65535?WM:XM}function em(n,t,e,i,r){var o=Qv[e||"float"];if(r){var a=n[t],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;u<s;u++)l[u]=a[u];n[t]=l}}else n[t]=new o(i)}var Fh=function(){function n(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=re()}return n.prototype.initData=function(t,e,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=t.getSource(),o=this.defaultDimValueGetter=Vh[r.sourceFormat];this._dimValueGetter=i||o,this._rawExtent=[],Gv(r),this._dimensions=j(e,function(a){return{type:a.type,property:a.property}}),this._initDataFromProvider(0,t.count())},n.prototype.getProvider=function(){return this._provider},n.prototype.getSource=function(){return this._provider.getSource()},n.prototype.ensureCalculationDimension=function(t,e){var i=this._calcDimNameToIdx,r=this._dimensions,o=i.get(t);if(o!=null){if(r[o].type===e)return o}else o=r.length;return r[o]={type:e},i.set(t,o),this._chunks[o]=new Qv[e||"float"](this._rawCount),this._rawExtent[o]=[1/0,-1/0],o},n.prototype.collectOrdinalMeta=function(t,e){var i=this._chunks[t],r=this._dimensions[t],o=this._rawExtent,a=r.ordinalOffset||0,s=i.length;a===0&&(o[t]=[1/0,-1/0]);for(var l=o[t],u=a;u<s;u++){var c=i[u]=e.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}r.ordinalMeta=e,r.ordinalOffset=s,r.type="ordinal"},n.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},n.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},n.prototype.appendData=function(t){var e=this._provider,i=this.count();e.appendData(t);var r=e.count();return e.persistent||(r+=i),i<r&&this._initDataFromProvider(i,r,!0),[i,r]},n.prototype.appendValues=function(t,e){for(var i=this._chunks,r=this._dimensions,o=r.length,a=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<o;u++)em(i,u,(f=r[u]).type,l,!0);for(var c=[],h=s;h<l;h++)for(var p=h-s,d=0;d<o;d++){var f=r[d],g=Vh.arrayRows.call(this,t[p]||c,f.property,p,d);i[d][h]=g;var y=a[d];g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},n.prototype._initDataFromProvider=function(t,e,i){for(var r=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=j(a,function(m){return m.property}),c=0;c<s;c++){var h=a[c];l[c]||(l[c]=[1/0,-1/0]),em(o,c,h.type,e,i)}if(r.fillStorage)r.fillStorage(t,e,o,l);else for(var p=[],d=t;d<e;d++){p=r.getItem(d,p);for(var f=0;f<s;f++){var g=o[f],y=this._dimValueGetter(p,u[f],d,f);g[d]=y;var v=l[f];y<v[0]&&(v[0]=y),y>v[1]&&(v[1]=y)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent=[]},n.prototype.count=function(){return this._count},n.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},n.prototype.getValues=function(t,e){var i=[],r=[];if(e==null){e=t,t=[];for(var o=0;o<this._dimensions.length;o++)r.push(o)}else r=t;o=0;for(var a=r.length;o<a;o++)i.push(this.get(r[o],e));return i},n.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._chunks[t];return i?i[e]:NaN},n.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var i=0,r=this.count();i<r;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},n.prototype.getMedian=function(t){var e=[];this.each([t],function(o){isNaN(o)||e.push(o)});var i=e.sort(function(o,a){return o-a}),r=this.count();return r===0?0:r%2==1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},n.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 r=0,o=this._count-1;r<=o;){var a=(r+o)/2|0;if(e[a]<t)r=a+1;else{if(!(e[a]>t))return a;o=a-1}}return-1},n.prototype.indicesOfNearest=function(t,e,i){var r=this._chunks[t],o=[];if(!r)return o;i==null&&(i=1/0);for(var a=1/0,s=-1,l=0,u=0,c=this.count();u<c;u++){var h=e-r[this.getRawIndex(u)],p=Math.abs(h);p<=i&&((p<a||p===a&&h>=0&&s<0)&&(a=p,s=h,l=0),h===s&&(o[l++]=u))}return o.length=l,o},n.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,r=this._count;if(i===Array){t=new i(r);for(var o=0;o<r;o++)t[o]=e[o]}else t=new i(e.buffer,0,r)}else for(t=new(i=da(this._rawCount))(this.count()),o=0;o<t.length;o++)t[o]=o;return t},n.prototype.filter=function(t,e){if(!this._count)return this;for(var i=this.clone(),r=i.count(),o=new(da(i._rawCount))(r),a=[],s=t.length,l=0,u=t[0],c=i._chunks,h=0;h<r;h++){var p=void 0,d=i.getRawIndex(h);if(s===0)p=e(h);else if(s===1)p=e(c[u][d],h);else{for(var f=0;f<s;f++)a[f]=c[t[f]][d];a[f]=h,p=e.apply(null,a)}p&&(o[l++]=d)}return l<r&&(i._indices=o),i._count=l,i._extent=[],i._updateGetRawIdx(),i},n.prototype.selectRange=function(t){var e=this.clone(),i=e._count;if(!i)return this;var r=Oe(t),o=r.length;if(!o)return this;var a=e.count(),s=new(da(e._rawCount))(a),l=0,u=r[0],c=t[u][0],h=t[u][1],p=e._chunks,d=!1;if(!e._indices){var f=0;if(o===1){for(var g=p[r[0]],y=0;y<i;y++)((x=g[y])>=c&&x<=h||isNaN(x))&&(s[l++]=f),f++;d=!0}else if(o===2){g=p[r[0]];var v=p[r[1]],m=t[r[1]][0],_=t[r[1]][1];for(y=0;y<i;y++){var x=g[y],b=v[y];(x>=c&&x<=h||isNaN(x))&&(b>=m&&b<=_||isNaN(b))&&(s[l++]=f),f++}d=!0}}if(!d)if(o===1)for(y=0;y<a;y++){var w=e.getRawIndex(y);((x=p[r[0]][w])>=c&&x<=h||isNaN(x))&&(s[l++]=w)}else for(y=0;y<a;y++){for(var M=!0,S=(w=e.getRawIndex(y),0);S<o;S++){var C=r[S];((x=p[C][w])<t[C][0]||x>t[C][1])&&(M=!1)}M&&(s[l++]=e.getRawIndex(y))}return l<a&&(e._indices=s),e._count=l,e._extent=[],e._updateGetRawIdx(),e},n.prototype.map=function(t,e){var i=this.clone(t);return this._updateDims(i,t,e),i},n.prototype.modify=function(t,e){this._updateDims(this,t,e)},n.prototype._updateDims=function(t,e,i){for(var r=t._chunks,o=[],a=e.length,s=t.count(),l=[],u=t._rawExtent,c=0;c<e.length;c++)u[e[c]]=[1/0,-1/0];for(var h=0;h<s;h++){for(var p=t.getRawIndex(h),d=0;d<a;d++)l[d]=r[e[d]][p];l[a]=h;var f=i&&i.apply(null,l);if(f!=null)for(typeof f!="object"&&(o[0]=f,f=o),c=0;c<f.length;c++){var g=e[c],y=f[c],v=u[g],m=r[g];m&&(m[p]=y),y<v[0]&&(v[0]=y),y>v[1]&&(v[1]=y)}}},n.prototype.lttbDownSample=function(t,e){var i,r,o,a=this.clone([t],!0),s=a._chunks[t],l=this.count(),u=0,c=Math.floor(1/e),h=this.getRawIndex(0),p=new(da(this._rawCount))(Math.min(2*(Math.ceil(l/c)+2),l));p[u++]=h;for(var d=1;d<l-1;d+=c){for(var f=Math.min(d+c,l-1),g=Math.min(d+2*c,l),y=(g+f)/2,v=0,m=f;m<g;m++){var _=s[I=this.getRawIndex(m)];isNaN(_)||(v+=_)}v/=g-f;var x=d,b=Math.min(d+c,l),w=d-1,M=s[h];i=-1,o=x;var S=-1,C=0;for(m=x;m<b;m++){var I;_=s[I=this.getRawIndex(m)],isNaN(_)?(C++,S<0&&(S=I)):(r=Math.abs((w-y)*(_-M)-(w-m)*(v-M)))>i&&(i=r,o=I)}C>0&&C<b-x&&(p[u++]=Math.min(S,o),o=Math.max(S,o)),p[u++]=o,h=o}return p[u++]=this.getRawIndex(l-1),a._count=u,a._indices=p,a.getRawIndex=this._getRawIdx,a},n.prototype.downSample=function(t,e,i,r){for(var o=this.clone([t],!0),a=o._chunks,s=[],l=Math.floor(1/e),u=a[t],c=this.count(),h=o._rawExtent[t]=[1/0,-1/0],p=new(da(this._rawCount))(Math.ceil(c/l)),d=0,f=0;f<c;f+=l){l>c-f&&(l=c-f,s.length=l);for(var g=0;g<l;g++){var y=this.getRawIndex(f+g);s[g]=u[y]}var v=i(s),m=this.getRawIndex(Math.min(f+r(s,v)||0,c-1));u[m]=v,v<h[0]&&(h[0]=v),v>h[1]&&(h[1]=v),p[d++]=m}return o._count=d,o._indices=p,o._updateGetRawIdx(),o},n.prototype.each=function(t,e){if(this._count)for(var i=t.length,r=this._chunks,o=0,a=this.count();o<a;o++){var s=this.getRawIndex(o);switch(i){case 0:e(o);break;case 1:e(r[t[0]][s],o);break;case 2:e(r[t[0]][s],r[t[1]][s],o);break;default:for(var l=0,u=[];l<i;l++)u[l]=r[t[l]][s];u[l]=o,e.apply(null,u)}}},n.prototype.getDataExtent=function(t){var e=this._chunks[t],i=[1/0,-1/0];if(!e)return i;var r,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(r=this._extent[t])return r.slice();for(var a=(r=i)[0],s=r[1],l=0;l<o;l++){var u=e[this.getRawIndex(l)];u<a&&(a=u),u>s&&(s=u)}return r=[a,s],this._extent[t]=r,r},n.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],r=this._chunks,o=0;o<r.length;o++)i.push(r[o][e]);return i},n.prototype.clone=function(t,e){var i,r,o=new n,a=this._chunks,s=t&&nn(t,function(u,c){return u[c]=!0,u},{});if(s)for(var l=0;l<a.length;l++)o._chunks[l]=s[l]?(r=void 0,(r=(i=a[l]).constructor)===Array?i.slice():new r(i)):a[l];else o._chunks=a;return this._copyCommonProps(o),e||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},n.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=ae(this._extent),t._rawExtent=ae(this._rawExtent)},n.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 r=0;r<i;r++)e[r]=this._indices[r]}else e=new t(this._indices);return e}return null},n.prototype._getRawIdxIdentity=function(t){return t},n.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},n.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},n.internalField=function(){function t(e,i,r,o){return ol(e[o],this._dimensions[o])}Vh={arrayRows:t,objectRows:function(e,i,r,o){return ol(e[i],this._dimensions[o])},keyedColumns:t,original:function(e,i,r,o){var a=e&&(e.value==null?e:e.value);return ol(a instanceof Array?a[o]:a,this._dimensions[o])},typedArray:function(e,i,r,o){return e[o]}}}(),n}(),tm=function(){function n(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return n.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},n.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},n.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},n.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},n.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,i=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(sl(i)){var a=i,s=void 0,l=void 0,u=void 0;if(o){var c=r[0];c.prepareSource(),s=(u=c.getSource()).data,l=u.sourceFormat,e=[c._getVersionSign()]}else l=gt(s=a.get("data",!0))?ui:Jt,e=[];var h=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},d=xe(h.seriesLayoutBy,p.seriesLayoutBy)||null,f=xe(h.sourceHeader,p.sourceHeader),g=xe(h.dimensions,p.dimensions);t=d!==p.seriesLayoutBy||!!f!=!!p.sourceHeader||g?[Nh(s,{seriesLayoutBy:d,sourceHeader:f,dimensions:g},l)]:[]}else{var y=i;if(o){var v=this._applyTransform(r);t=v.sourceList,e=v.upstreamSignList}else t=[Nh(y.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}this._setLocalSource(t,e)},n.prototype._applyTransform=function(t){var e,i=this._sourceHost,r=i.get("transform",!0),o=i.get("fromTransformResult",!0);o!=null&&t.length!==1&&im("");var a,s=[],l=[];return D(t,function(u){u.prepareSource();var c=u.getSource(o||0);o==null||c||im(""),s.push(c),l.push(u._getVersionSign())}),r?e=function(u,c){var h=Ke(u),p=h.length;p||Mt("");for(var d=0,f=p;d<f;d++)c=HM(h[d],c),d!==f-1&&(c.length=Math.max(c.length,1));return c}(r,s,i.componentIndex):o!=null&&(e=[(a=s[0],new rl({data:a.data,sourceFormat:a.sourceFormat,seriesLayoutBy:a.seriesLayoutBy,dimensionsDefine:ae(a.dimensionsDefine),startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount}))]),{sourceList:e,upstreamSignList:l}},n.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}},n.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},n.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},n.prototype._innerGetDataStore=function(t,e,i){var r=this._storeList,o=r[0];o||(o=r[0]={});var a=o[i];if(!a){var s=this._getUpstreamSourceManagers()[0];sl(this._sourceHost)&&s?a=s._innerGetDataStore(t,e,i):(a=new Fh).initData(new Hv(e,t.length),t),o[i]=a}return a},n.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(sl(t)){var e=Ih(t);return e?[e.getSourceManager()]:[]}return j(function(i){return i.get("transform",!0)||i.get("fromTransformResult",!0)?zo(i.ecModel,"dataset",{index:i.get("fromDatasetIndex",!0),id:i.get("fromDatasetId",!0)},Qe).models:[]}(t),function(i){return i.getSourceManager()})},n.prototype._getSourceMetaRawOption=function(){var t,e,i,r=this._sourceHost;if(sl(r))t=r.get("seriesLayoutBy",!0),e=r.get("sourceHeader",!0),i=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=r;t=o.get("seriesLayoutBy",!0),e=o.get("sourceHeader",!0),i=o.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:e,dimensions:i}},n}();function nm(n){n.option.transform&&fo(n.option.transform)}function sl(n){return n.mainType==="series"}function im(n){throw new Error(n)}var rm="line-height:1";function om(n,t){var e=n.color||"#6e7079",i=n.fontSize||12,r=n.fontWeight||"400",o=n.color||"#464646",a=n.fontSize||14,s=n.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+wt(i+"")+"px;color:"+wt(e)+";font-weight:"+wt(r+""),valueStyle:"font-size:"+wt(a+"")+"px;color:"+wt(o)+";font-weight:"+wt(s+"")}:{nameStyle:{fontSize:i,fill:e,fontWeight:r},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var UM=[0,10,20,30],YM=["",`
  9. `,`
  10. `,`
  11. `];function jn(n,t){return t.type=n,t}function Gh(n){return n.type==="section"}function am(n){return Gh(n)?ZM:qM}function sm(n){if(Gh(n)){var t=0,e=n.blocks.length,i=e>1||e>0&&!n.noHeader;return D(n.blocks,function(r){var o=sm(r);o>=t&&(t=o+ +(i&&(!o||Gh(r)&&!r.noHeader)))}),t}return 0}function ZM(n,t,e,i){var r,o=t.noHeader,a=(r=sm(t),{html:UM[r],richText:YM[r]}),s=[],l=t.blocks||[];Ot(!l||Y(l)),l=l||[];var u=n.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Bt(c,u)){var h=new EM(c[u],null);l.sort(function(g,y){return h.evaluate(g.sortParam,y.sortParam)})}else u==="seriesDesc"&&l.reverse()}D(l,function(g,y){var v=t.valueFormatter,m=am(g)(v?H(H({},n),{valueFormatter:v}):n,g,y>0?a.html:0,i);m!=null&&s.push(m)});var p=n.renderMode==="richText"?s.join(a.richText):Hh(s.join(""),o?e:a.html);if(o)return p;var d=wh(t.header,"ordinal",n.useUTC),f=om(i,n.renderMode).nameStyle;return n.renderMode==="richText"?um(n,d,f)+a.richText+p:Hh('<div style="'+f+";"+rm+';">'+wt(d)+"</div>"+p,e)}function qM(n,t,e,i){var r=n.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=n.useUTC,c=t.valueFormatter||n.valueFormatter||function(x){return j(x=Y(x)?x:[x],function(b,w){return wh(b,Y(d)?d[w]:d,u)})};if(!o||!a){var h=s?"":n.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),p=o?"":wh(l,"ordinal",u),d=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!s||!o,y=!s&&o,v=om(i,r),m=v.nameStyle,_=v.valueStyle;return r==="richText"?(s?"":h)+(o?"":um(n,p,m))+(a?"":function(x,b,w,M,S){var C=[S],I=M?10:20;return w&&C.push({padding:[0,0,0,I],align:"right"}),x.markupStyleCreator.wrapRichTextStyle(Y(b)?b.join(" "):b,C)}(n,f,g,y,_)):Hh((s?"":h)+(o?"":function(x,b,w){return'<span style="'+w+";"+(b?"margin-left:2px":"")+'">'+wt(x)+"</span>"}(p,!s,m))+(a?"":function(x,b,w,M){return'<span style="'+(b?"float:right;margin-left:"+(w?"10px":"20px"):"")+";"+M+'">'+j(x=Y(x)?x:[x],function(S){return wt(S)}).join("&nbsp;&nbsp;")+"</span>"}(f,g,y,_)),e)}}function lm(n,t,e,i,r,o){if(n)return am(n)({useUTC:r,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:n.valueFormatter},n,0,o)}function Hh(n,t){return'<div style="margin: '+t+"px 0 0;"+rm+';">'+n+'<div style="clear:both"></div></div>'}function um(n,t,e){return n.markupStyleCreator.wrapRichTextStyle(t,e)}function cm(n,t){return Qi(n.getData().getItemVisual(t,"style")[n.visualDrawType])}function hm(n,t){var e=n.get("padding");return e??(t==="richText"?[8,10]:10)}var Wh=function(){function n(){this.richTextStyles={},this._nextStyleNameId=yg()}return n.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},n.prototype.makeTooltipMarker=function(t,e,i){var r=i==="richText"?this._generateStyleName():null,o=uv({color:e,type:t,renderMode:i,markerId:r});return Q(o)?o:(this.richTextStyles[r]=o.style,o.content)},n.prototype.wrapRichTextStyle=function(t,e){var i={};Y(e)?D(e,function(o){return H(i,o)}):H(i,e);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+t+"}"},n}(),ci=Ee();function ll(n,t){return n.getName(t)||n.getId(t)}var it=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return F(t,n),t.prototype.init=function(e,i,r){this.seriesIndex=this.componentIndex,this.dataTask=pa({count:jM,reset:KM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,r),(ci(this).sourceManager=new tm(this)).prepareSource();var o=this.getInitialData(e,r);dm(o,this),this.dataTask.context.data=o,ci(this).dataBeforeProcessed=o,pm(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var r=sa(this),o=r?tl(e):{},a=this.subType;be.hasClass(a)&&(a+="Series"),de(e,i.getTheme().get(this.subType)),de(e,this.getDefaultOption()),Po(e,"label",["show"]),this.fillDataTextStyle(e.data),r&&Wr(e,o,r)},t.prototype.mergeOption=function(e,i){e=de(this.option,e,!0),this.fillDataTextStyle(e.data);var r=sa(this);r&&Wr(this.option,e,r);var o=ci(this).sourceManager;o.dirty(),o.prepareSource();var a=this.getInitialData(e,i);dm(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,ci(this).dataBeforeProcessed=a,pm(this),this._initSelectedMapFromData(a)},t.prototype.fillDataTextStyle=function(e){if(e&&!gt(e))for(var i=["show"],r=0;r<e.length;r++)e[r]&&e[r].label&&Po(e[r],"label",i)},t.prototype.getInitialData=function(e,i){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var i=Xh(this);if(i){var r=i.context.data;return e!=null&&r.getLinkedData?r.getLinkedData(e):r}return ci(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=Xh(this);if(i){var r=i.context;r.outputData=e,i!==this.dataTask&&(r.data=e)}ci(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return re(e)},t.prototype.getSourceManager=function(){return ci(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return ci(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"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,r){return function(o){var a,s,l,u,c=o.series,h=o.dataIndex,p=o.multipleSeries,d=c.getData(),f=d.mapDimensionsAll("defaultedTooltip"),g=f.length,y=c.getRawValue(h),v=Y(y),m=cm(c,h);if(g>1||v&&!g){var _=function(C,I,T,A,k){var L=I.getData(),O=nn(C,function(z,B,G){var K=L.getDimensionInfo(G);return z||K&&K.tooltip!==!1&&K.displayName!=null},!1),P=[],R=[],N=[];function E(z,B){var G=L.getDimensionInfo(B);G&&G.otherDims.tooltip!==!1&&(O?N.push(jn("nameValue",{markerType:"subItem",markerColor:k,name:G.displayName,value:z,valueType:G.type})):(P.push(z),R.push(G.type)))}return A.length?D(A,function(z){E(jr(L,T,z),z)}):D(C,E),{inlineValues:P,inlineValueTypes:R,blocks:N}}(y,c,h,f,m);a=_.inlineValues,s=_.inlineValueTypes,l=_.blocks,u=_.inlineValues[0]}else if(g){var x=d.getDimensionInfo(f[0]);u=a=jr(d,h,f[0]),s=x.type}else u=a=v?y[0]:y;var b=bc(c),w=b&&c.name||"",M=d.getName(h),S=p?w:M;return jn("section",{header:w,noHeader:p||!b,sortParam:u,blocks:[jn("nameValue",{markerType:"item",markerColor:m,name:S,noName:!zt(S),value:a,valueType:s,dataIndex:h})].concat(l||[])})}({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(fe.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,r){var o=this.ecModel,a=Dh.prototype.getColorFromPalette.call(this,e,i,r);return a||(a=o.getColorFromPalette(e,i,r)),a},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 r=this.option.selectedMap;if(r){var o=this.option.selectedMode,a=this.getData(i);if(o==="series"||r==="all")return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var s=0;s<e.length;s++){var l=ll(a,e[s]);r[l]=!1,this._selectedDataIndicesMap[l]=-1}}},t.prototype.toggleSelect=function(e,i){for(var r=[],o=0;o<e.length;o++)r[0]=e[o],this.isSelected(e[o],i)?this.unselect(r,i):this.select(r,i)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,i=Oe(e),r=[],o=0;o<i.length;o++){var a=e[i[o]];a>=0&&r.push(a)}return r},t.prototype.isSelected=function(e,i){var r=this.option.selectedMap;if(!r)return!1;var o=this.getData(i);return(r==="all"||r[ll(o,e)])&&!o.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(e===!0||e&&e.enabled)},t.prototype._innerSelect=function(e,i){var r,o,a=this.option,s=a.selectedMode,l=i.length;if(s&&l){if(s==="series")a.selectedMap="all";else if(s==="multiple"){ne(a.selectedMap)||(a.selectedMap={});for(var u=a.selectedMap,c=0;c<l;c++){var h=i[c];u[d=ll(e,h)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var p=i[l-1],d=ll(e,p);a.selectedMap=((r={})[d]=!0,r),this._selectedDataIndicesMap=((o={})[d]=e.getRawIndex(p),o)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var i=[];e.hasItemOption&&e.each(function(r){var o=e.getRawDataItem(r);o&&o.selected&&i.push(r)}),i.length>0&&this._innerSelect(e,i)}},t.registerClass=function(e){return be.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}(be);function pm(n){var t=n.name;bc(n)||(n.name=function(e){var i=e.getRawData(),r=i.mapDimensionsAll("seriesName"),o=[];return D(r,function(a){var s=i.getDimensionInfo(a);s.displayName&&o.push(s.displayName)}),o.join(" ")}(n)||t)}function jM(n){return n.model.getRawData().count()}function KM(n){var t=n.model;return t.setData(t.getRawData().cloneShallow()),JM}function JM(n,t){t.outputData&&n.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function dm(n,t){D(vf(n.CHANGABLE_METHODS,n.DOWNSAMPLE_METHODS),function(e){n.wrapMethod(e,Se($M,t))})}function $M(n,t){var e=Xh(n);return e&&e.setOutputEnd((t||this).count()),t}function Xh(n){var t=(n.ecModel||{}).scheduler,e=t&&t.getPipeline(n.uid);if(e){var i=e.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(n.uid))}return i}}at(it,RM),at(it,Dh),Ig(it,be);var Xe=function(){function n(){this.group=new _e,this.uid=Vr("viewComponent")}return n.prototype.init=function(t,e){},n.prototype.render=function(t,e,i,r){},n.prototype.dispose=function(t,e){},n.prototype.updateView=function(t,e,i,r){},n.prototype.updateLayout=function(t,e,i,r){},n.prototype.updateVisual=function(t,e,i,r){},n.prototype.toggleBlurSeries=function(t,e,i){},n.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},n}();function Uh(){var n=Ee();return function(t){var e=n(t),i=t.pipelineContext,r=!!e.large,o=!!e.progressiveRender,a=e.large=!(!i||!i.large),s=e.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Sc(Xe),Ss(Xe);var fm=Ee(),QM=Uh(),Je=function(){function n(){this.group=new _e,this.uid=Vr("viewChart"),this.renderTask=pa({plan:eT,reset:tT}),this.renderTask.context={view:this}}return n.prototype.init=function(t,e){},n.prototype.render=function(t,e,i,r){},n.prototype.highlight=function(t,e,i,r){var o=t.getData(r&&r.dataType);o&&ym(o,r,"emphasis")},n.prototype.downplay=function(t,e,i,r){var o=t.getData(r&&r.dataType);o&&ym(o,r,"normal")},n.prototype.remove=function(t,e){this.group.removeAll()},n.prototype.dispose=function(t,e){},n.prototype.updateView=function(t,e,i,r){this.render(t,e,i,r)},n.prototype.updateLayout=function(t,e,i,r){this.render(t,e,i,r)},n.prototype.updateVisual=function(t,e,i,r){this.render(t,e,i,r)},n.prototype.eachRendered=function(t){Xs(this.group,t)},n.markUpdateMethod=function(t,e){fm(t).updateMethod=e},n.protoInitialize=void(n.prototype.type="chart"),n}();function gm(n,t,e){n&&Kc(n)&&(t==="emphasis"?kr:Lr)(n,e)}function ym(n,t,e){var i=zi(n,t),r=t&&t.highlightKey!=null?function(o){var a=Qg[o];return a==null&&$g<=32&&(a=Qg[o]=$g++),a}(t.highlightKey):null;i!=null?D(Ke(i),function(o){gm(n.getItemGraphicEl(o),e,r)}):n.eachItemGraphicEl(function(o){gm(o,e,r)})}function eT(n){return QM(n.model)}function tT(n){var t=n.model,e=n.ecModel,i=n.api,r=n.payload,o=t.pipelineContext.progressiveRender,a=n.view,s=r&&fm(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return l!=="render"&&a[l](t,e,i,r),nT[l]}Sc(Je),Ss(Je);var nT={incrementalPrepareRender:{progress:function(n,t){t.view.incrementalRender(n,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(n,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ul="\0__throttleOriginMethod",vm="\0__throttleRate",mm="\0__throttleType";function cl(n,t,e){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=new Date().getTime(),c=null,n.apply(o,a||[])}t=t||0;var p=function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];i=new Date().getTime(),o=this,a=d;var g=s||t,y=s||e;s=null,r=i-(y?l:u)-g,clearTimeout(c),y?c=setTimeout(h,g):r>=0?h():c=setTimeout(h,-r),l=i};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(d){s=d},p}function Yh(n,t,e,i){var r=n[t];if(r){var o=r[ul]||r,a=r[mm];if(r[vm]!==e||a!==i){if(e==null||!i)return n[t]=o;(r=n[t]=cl(o,e,i==="debounce"))[ul]=o,r[mm]=i,r[vm]=e}return r}}function hl(n,t){var e=n[t];e&&e[ul]&&(e.clear&&e.clear(),n[t]=e[ul])}var _m=Ee(),xm={itemStyle:Cr(qy,!0),lineStyle:Cr(Zy,!0)},iT={lineStyle:"stroke",itemStyle:"fill"};function bm(n,t){return n.visualStyleMapper||xm[t]||(console.warn("Unknown style type '"+t+"'."),xm.itemStyle)}function wm(n,t){return n.visualDrawType||iT[t]||(console.warn("Unknown style type '"+t+"'."),"fill")}var rT={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){var e=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=n.getModel(i),o=bm(n,i)(r),a=r.getShallow("decal");a&&(e.setVisual("decal",a),a.dirty=!0);var s=wm(n,i),l=o[s],u=ue(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[s]||u||c){var h=n.getColorFromPalette(n.name,null,t.getSeriesCount());o[s]||(o[s]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ue(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||ue(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",s),!t.isSeriesFiltered(n)&&u)return e.setVisual("colorFromPalette",!1),{dataEach:function(p,d){var f=n.getDataParams(d),g=H({},o);g[s]=u(f),p.setItemVisual(d,"style",g)}}}},fa=new Le,oT={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){if(!n.ignoreStyleOnData&&!t.isSeriesFiltered(n)){var e=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=bm(n,i),o=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(a,s){var l=a.getRawDataItem(s);if(l&&l[i]){fa.option=l[i];var u=r(fa);H(a.ensureUniqueItemVisual(s,"style"),u),fa.option.decal&&(a.setItemVisual(s,"decal",fa.option.decal),fa.option.decal.dirty=!0),o in u&&a.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},aT={performRawSeries:!0,overallReset:function(n){var t=re();n.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+i,o=t.get(r);o||(o={},t.set(r,o)),_m(e).scope=o}}),n.eachSeries(function(e){if(!e.isColorBySeries()&&!n.isSeriesFiltered(e)){var i=e.getRawData(),r={},o=e.getData(),a=_m(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=wm(e,s);o.each(function(u){var c=o.getRawIndex(u);r[c]=u}),i.each(function(u){var c=r[u];if(o.getItemVisual(c,"colorFromPalette")){var h=o.ensureUniqueItemVisual(c,"style"),p=i.getName(u)||u+"",d=i.count();h[l]=e.getColorFromPalette(p,a,d)}})}})}},pl=Math.PI,Sm=function(){function n(t,e,i,r){this._stageTaskMap=re(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return n.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var r=i.overallTask;r&&r.dirty()})},n.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),r=i.context,o=!e&&i.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=r&&r.modDataCount;return{step:o,modBy:a!=null?Math.ceil(a/o):null,modDataCount:a}}},n.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},n.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),r=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&r>=i.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?r:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:a}},n.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=re();t.eachSeries(function(r){var o=r.getProgressive(),a=r.uid;i.set(a,{id:a,head:null,tail:null,threshold:r.getProgressiveThreshold(),progressiveEnabled:o&&!(r.preventIncremental&&r.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),e._pipe(r,r.dataTask)})},n.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;D(this._allHandlers,function(r){var o=t.get(r.uid)||t.set(r.uid,{});Ot(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,e,i),r.overallReset&&this._createOverallStageTask(r,o,e,i)},this)},n.prototype.prepareView=function(t,e,i,r){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=r,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},n.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},n.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},n.prototype._performStageTasks=function(t,e,i,r){r=r||{};var o=!1,a=this;function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}D(t,function(l,u){if(!r.visualType||r.visualType===l.visualType){var c=a._stageTaskMap.get(l.uid),h=c.seriesTaskMap,p=c.overallTask;if(p){var d,f=p.agentStubMap;f.each(function(y){s(r,y)&&(y.dirty(),d=!0)}),d&&p.dirty(),a.updatePayload(p,i);var g=a.getPerformArgs(p,r.block);f.each(function(y){y.perform(g)}),p.perform(g)&&(o=!0)}else h&&h.each(function(y,v){s(r,y)&&y.dirty();var m=a.getPerformArgs(y,r.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(y.context.model),a.updatePayload(y,i),y.perform(m)&&(o=!0)})}}),this.unfinished=o||this.unfinished},n.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},n.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)})},n.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},n.prototype._createSeriesStageTask=function(t,e,i,r){var o=this,a=e.seriesTaskMap,s=e.seriesTaskMap=re(),l=t.seriesType,u=t.getTargetSeries;function c(h){var p=h.uid,d=s.set(p,a&&a.get(p)||pa({plan:hT,reset:pT,count:fT}));d.context={model:h,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(h,d)}t.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,r).each(c)},n.prototype._createOverallStageTask=function(t,e,i,r){var o=this,a=e.overallTask=e.overallTask||pa({reset:sT});a.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:o};var s=a.agentStubMap,l=a.agentStubMap=re(),u=t.seriesType,c=t.getTargetSeries,h=!0,p=!1;function d(f){var g=f.uid,y=l.set(g,s&&s.get(g)||(p=!0,pa({reset:lT,onDirty:cT})));y.context={model:f,overallProgress:h},y.agent=a,y.__block=h,o._pipe(f,y)}Ot(!t.createOnAllSeries,""),u?i.eachRawSeriesByType(u,d):c?c(i,r).each(d):(h=!1,D(i.getSeries(),d)),p&&a.dirty()},n.prototype._pipe=function(t,e){var i=t.uid,r=this._pipelineMap.get(i);!r.head&&(r.head=e),r.tail&&r.tail.pipe(e),r.tail=e,e.__idxInPipeline=r.count++,e.__pipeline=r},n.wrapStageHandler=function(t,e){return ue(t)&&(t={overallReset:t,seriesType:gT(t)}),t.uid=Vr("stageHandler"),e&&(t.visualType=e),t},n}();function sT(n){n.overallReset(n.ecModel,n.api,n.payload)}function lT(n){return n.overallProgress&&uT}function uT(){this.agent.dirty(),this.getDownstream().dirty()}function cT(){this.agent&&this.agent.dirty()}function hT(n){return n.plan?n.plan(n.model,n.ecModel,n.api,n.payload):null}function pT(n){n.useClearVisual&&n.data.clearAllVisual();var t=n.resetDefines=Ke(n.reset(n.model,n.ecModel,n.api,n.payload));return t.length>1?j(t,function(e,i){return Mm(i)}):dT}var dT=Mm(0);function Mm(n){return function(t,e){var i=e.data,r=e.resetDefines[n];if(r&&r.dataEach)for(var o=t.start;o<t.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(t,i)}}function fT(n){return n.data.count()}function gT(n){dl=null;try{n(ga,Tm)}catch{}return dl}var dl,ga={},Tm={};function Cm(n,t){for(var e in t.prototype)n[e]=rt}Cm(ga,kh),Cm(Tm,Iv),ga.eachSeriesByType=ga.eachRawSeriesByType=function(n){dl=n},ga.eachComponent=function(n){n.mainType==="series"&&n.subType&&(dl=n.subType)};var Im=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const yT={color:Im,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Im]};var mt="#B9B8CE",Am="#100C2A",fl=function(){return{axisLine:{lineStyle:{color:mt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Dm=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],km={darkMode:!0,color:Dm,backgroundColor:Am,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:mt}},textStyle:{color:mt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:mt}},dataZoom:{borderColor:"#71708A",textStyle:{color:mt},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:mt}},timeline:{lineStyle:{color:mt},label:{color:mt},controlStyle:{color:mt,borderColor:mt}},calendar:{itemStyle:{color:Am},dayLabel:{color:mt},monthLabel:{color:mt},yearLabel:{color:mt}},timeAxis:fl(),logAxis:fl(),valueAxis:fl(),categoryAxis:fl(),line:{symbol:"circle"},graph:{color:Dm},gauge:{title:{color:mt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:mt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};km.categoryAxis.splitLine.show=!1;var vT=function(){function n(){}return n.prototype.normalizeQuery=function(t){var e={},i={},r={};if(Q(t)){var o=Sn(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};D(t,function(l,u){for(var c=!1,h=0;h<a.length;h++){var p=a[h],d=u.lastIndexOf(p);if(d>0&&d===u.length-p.length){var f=u.slice(0,d);f!=="data"&&(e.mainType=f,e[p.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(r[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:r}},n.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,o=i.packedEvent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,a,"mainType")&&c(l,a,"subType")&&c(l,a,"index","componentIndex")&&c(l,a,"name")&&c(l,a,"id")&&c(u,o,"name")&&c(u,o,"dataIndex")&&c(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,o));function c(h,p,d,f){return h[d]==null||p[f||d]===h[d]}},n.prototype.afterTrigger=function(){this.eventInfo=null},n}(),Zh=["symbol","symbolSize","symbolRotate","symbolOffset"],Lm=Zh.concat(["symbolKeepAspect"]),mT={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){var e=n.getData();if(n.legendIcon&&e.setVisual("legendIcon",n.legendIcon),n.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a<Zh.length;a++){var s=Zh[a],l=n.get(s);ue(l)?(o=!0,r[s]=l):i[s]=l}if(i.symbol=i.symbol||n.defaultSymbol,e.setVisual(H({legendIcon:n.legendIcon||i.symbol,symbolKeepAspect:n.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(n)){var u=Oe(r);return{dataEach:o?function(c,h){for(var p=n.getRawValue(h),d=n.getDataParams(h),f=0;f<u.length;f++){var g=u[f];c.setItemVisual(h,g,r[g](p,d))}}:null}}}}},_T={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){if(n.hasSymbolVisual&&!t.isSeriesFiltered(n))return{dataEach:n.getData().hasItemOption?function(e,i){for(var r=e.getItemModel(i),o=0;o<Lm.length;o++){var a=Lm[o],s=r.getShallow(a,!0);s!=null&&e.setItemVisual(i,a,s)}}:null}}};function Pm(n,t,e){switch(e){case"color":return n.getItemVisual(t,"style")[n.getVisual("drawType")];case"opacity":return n.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return n.getItemVisual(t,e)}}function Om(n,t){switch(t){case"color":return n.getVisual("style")[n.getVisual("drawType")];case"opacity":return n.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return n.getVisual(t)}}function Rm(n,t){function e(i,r){var o=[];return i.eachComponent({mainType:"series",subType:n,query:r},function(a){o.push(a.seriesIndex)}),o}D([[n+"ToggleSelect","toggleSelect"],[n+"Select","select"],[n+"UnSelect","unselect"]],function(i){t(i[0],function(r,o,a){r=H({},r),a.dispatchAction(H(r,{type:i[1],seriesIndex:e(o,r)}))})})}function Kr(n,t,e,i,r){var o=n+t;e.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(a){for(var s=a.seriesIndex,l=a.option.selectedMap,u=r.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var h=a.getData(),p=zi(h,r.fromActionPayload);e.trigger(o,{type:o,seriesId:a.id,name:Y(p)?h.getName(p[0]):h.getName(p),selected:Q(l)?l:H({},l)})}})}function tr(n,t,e){for(var i;n&&(!t(n)||(i=n,!e));)n=n.__hostTarget||n.parent;return i}var xT=Math.round(9*Math.random()),bT=typeof Object.defineProperty=="function",wT=function(){function n(){this._id="__ec_inner_"+xT++}return n.prototype.get=function(t){return this._guard(t)[this._id]},n.prototype.set=function(t,e){var i=this._guard(t);return bT?Object.defineProperty(i,this._id,{value:e,enumerable:!1,configurable:!0}):i[this._id]=e,this},n.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},n.prototype.has=function(t){return!!this._guard(t)[this._id]},n.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},n}(),ST=Ie.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(n,t){var e=t.cx,i=t.cy,r=t.width/2,o=t.height/2;n.moveTo(e,i-o),n.lineTo(e+r,i+o),n.lineTo(e-r,i+o),n.closePath()}}),MT=Ie.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(n,t){var e=t.cx,i=t.cy,r=t.width/2,o=t.height/2;n.moveTo(e,i-o),n.lineTo(e+r,i),n.lineTo(e,i+o),n.lineTo(e-r,i),n.closePath()}}),TT=Ie.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(n,t){var e=t.x,i=t.y,r=t.width/5*3,o=Math.max(r,t.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,h=Math.sin(u),p=Math.cos(u),d=.6*a,f=.7*a;n.moveTo(e-c,l+s),n.arc(e,l,a,Math.PI-u,2*Math.PI+u),n.bezierCurveTo(e+c-h*d,l+s+p*d,e,i-f,e,i),n.bezierCurveTo(e,i-f,e-c+h*d,l+s+p*d,e-c,l+s),n.closePath()}}),CT=Ie.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(n,t){var e=t.height,i=t.width,r=t.x,o=t.y,a=i/3*2;n.moveTo(r,o),n.lineTo(r+a,o+e),n.lineTo(r,o+e/4*3),n.lineTo(r-a,o+e),n.lineTo(r,o),n.closePath()}}),IT={line:function(n,t,e,i,r){r.x1=n,r.y1=t+i/2,r.x2=n+e,r.y2=t+i/2},rect:function(n,t,e,i,r){r.x=n,r.y=t,r.width=e,r.height=i},roundRect:function(n,t,e,i,r){r.x=n,r.y=t,r.width=e,r.height=i,r.r=Math.min(e,i)/4},square:function(n,t,e,i,r){var o=Math.min(e,i);r.x=n,r.y=t,r.width=o,r.height=o},circle:function(n,t,e,i,r){r.cx=n+e/2,r.cy=t+i/2,r.r=Math.min(e,i)/2},diamond:function(n,t,e,i,r){r.cx=n+e/2,r.cy=t+i/2,r.width=e,r.height=i},pin:function(n,t,e,i,r){r.x=n+e/2,r.y=t+i/2,r.width=e,r.height=i},arrow:function(n,t,e,i,r){r.x=n+e/2,r.y=t+i/2,r.width=e,r.height=i},triangle:function(n,t,e,i,r){r.cx=n+e/2,r.cy=t+i/2,r.width=e,r.height=i}},qh={};D({line:ut,rect:ke,roundRect:ke,square:ke,circle:In,diamond:MT,pin:TT,arrow:CT,triangle:ST},function(n,t){qh[t]=new n});var AT=Ie.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(n,t,e){var i=_s(n,t,e),r=this.shape;return r&&r.symbolType==="pin"&&t.position==="inside"&&(i.y=e.y+.4*e.height),i},buildPath:function(n,t,e){var i=t.symbolType;if(i!=="none"){var r=qh[i];r||(r=qh[i="rect"]),IT[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(n,r.shape,e)}}});function DT(n,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=n,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=n:e.fill=n,this.markRedraw()}}function _t(n,t,e,i,r,o,a){var s,l=n.indexOf("empty")===0;return l&&(n=n.substr(5,1).toLowerCase()+n.substr(6)),(s=n.indexOf("image://")===0?oh(n.slice(8),new me(t,e,i,r),a?"center":"cover"):n.indexOf("path://")===0?Hs(n.slice(7),{},new me(t,e,i,r),a?"center":"cover"):new AT({shape:{symbolType:n,x:t,y:e,width:i,height:r}})).__isEmptyBrush=l,s.setColor=DT,o&&s.setColor(o),s}function Nm(n){return Y(n)||(n=[+n,+n]),[n[0]||0,n[1]||0]}function jh(n,t){if(n!=null)return Y(n)||(n=[n,n]),[ee(n[0],t[0])||0,ee(xe(n[1],n[0]),t[1])||0]}function nr(n){return isFinite(n)}function Kh(n,t,e){for(var i=t.type==="radial"?function(a,s,l){var u=l.width,c=l.height,h=Math.min(u,c),p=s.x==null?.5:s.x,d=s.y==null?.5:s.y,f=s.r==null?.5:s.r;return s.global||(p=p*u+l.x,d=d*c+l.y,f*=h),p=nr(p)?p:.5,d=nr(d)?d:.5,f=f>=0&&nr(f)?f:.5,a.createRadialGradient(p,d,0,p,d,f)}(n,t,e):function(a,s,l){var u=s.x==null?0:s.x,c=s.x2==null?1:s.x2,h=s.y==null?0:s.y,p=s.y2==null?0:s.y2;return s.global||(u=u*l.width+l.x,c=c*l.width+l.x,h=h*l.height+l.y,p=p*l.height+l.y),u=nr(u)?u:0,c=nr(c)?c:1,h=nr(h)?h:0,p=nr(p)?p:0,a.createLinearGradient(u,h,c,p)}(n,t,e),r=t.colorStops,o=0;o<r.length;o++)i.addColorStop(r[o].offset,r[o].color);return i}function gl(n){return parseInt(n,10)}function yl(n,t,e){var i=["width","height"][t],r=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(e[i]!=null&&e[i]!=="auto")return parseFloat(e[i]);var s=document.defaultView.getComputedStyle(n);return(n[r]||gl(s[i])||gl(n.style[i]))-(gl(s[o])||0)-(gl(s[a])||0)|0}function Em(n){var t,e,i=n.style,r=i.lineDash&&i.lineWidth>0&&(t=i.lineDash,e=i.lineWidth,t&&t!=="solid"&&e>0?t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:Ae(t)?[t]:Y(t)?t:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&n.getLineScale?n.getLineScale():1;a&&a!==1&&(r=j(r,function(s){return s/a}),o/=a)}return[r,o]}var kT=new ai(!0);function vl(n){var t=n.stroke;return!(t==null||t==="none"||!(n.lineWidth>0))}function zm(n){return typeof n=="string"&&n!=="none"}function ml(n){var t=n.fill;return t!=null&&t!=="none"}function Bm(n,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=n.globalAlpha;n.globalAlpha=t.fillOpacity*t.opacity,n.fill(),n.globalAlpha=e}else n.fill()}function Vm(n,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=n.globalAlpha;n.globalAlpha=t.strokeOpacity*t.opacity,n.stroke(),n.globalAlpha=e}else n.stroke()}function Jh(n,t,e){var i=Ag(t.image,t.__image,e);if(Ms(i)){var r=n.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*mf),o.scaleSelf(t.scaleX||1,t.scaleY||1),r.setTransform(o)}return r}}var Fm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Gm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Hm(n,t,e,i,r){var o=!1;if(!i&&t===(e=e||{}))return!1;if(i||t.opacity!==e.opacity){Dt(n,r),o=!0;var a=Math.max(Math.min(t.opacity,1),0);n.globalAlpha=isNaN(a)?Vi.opacity:a}(i||t.blend!==e.blend)&&(o||(Dt(n,r),o=!0),n.globalCompositeOperation=t.blend||Vi.blend);for(var s=0;s<Fm.length;s++){var l=Fm[s];(i||t[l]!==e[l])&&(o||(Dt(n,r),o=!0),n[l]=n.dpr*(t[l]||0))}return(i||t.shadowColor!==e.shadowColor)&&(o||(Dt(n,r),o=!0),n.shadowColor=t.shadowColor||Vi.shadowColor),o}function Wm(n,t,e,i,r){var o=ya(t,r.inHover),a=i?null:e&&ya(e,r.inHover)||{};if(o===a)return!1;var s=Hm(n,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Dt(n,r),s=!0),zm(o.fill)&&(n.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(Dt(n,r),s=!0),zm(o.stroke)&&(n.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(Dt(n,r),s=!0),n.globalAlpha=o.opacity==null?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);n.lineWidth!==l&&(s||(Dt(n,r),s=!0),n.lineWidth=l)}for(var u=0;u<Gm.length;u++){var c=Gm[u],h=c[0];(i||o[h]!==a[h])&&(s||(Dt(n,r),s=!0),n[h]=o[h]||c[1])}return s}function Xm(n,t){var e=t.transform,i=n.dpr||1;e?n.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):n.setTransform(i,0,0,i,0,0)}function Dt(n,t){t.batchFill&&n.fill(),t.batchStroke&&n.stroke(),t.batchFill="",t.batchStroke=""}function ya(n,t){return t&&n.__hoverStyle||n.style}function $h(n,t){ir(n,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function ir(n,t,e,i){var r=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=e.prevElClipPaths,s=!1,l=!1;if(a&&!function(f,g){if(f===g||!f&&!g)return!1;if(!f||!g||f.length!==g.length)return!0;for(var y=0;y<f.length;y++)if(f[y]!==g[y])return!0;return!1}(o,a)||(a&&a.length&&(Dt(n,e),n.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),o&&o.length&&(Dt(n,e),n.save(),function(f,g,y){for(var v=!1,m=0;m<f.length;m++){var _=f[m];v=v||_.isZeroArea(),Xm(g,_),g.beginPath(),_.buildPath(g,_.shape),g.clip()}y.allClipped=v}(o,n,e),s=!0),e.prevElClipPaths=o),e.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var c,h,p=t instanceof Ie&&t.autoBatch&&function(f){var g=ml(f),y=vl(f);return!(f.lineDash||!(+g^+y)||g&&typeof f.fill!="string"||y&&typeof f.stroke!="string"||f.strokePercent<1||f.strokeOpacity<1||f.fillOpacity<1)}(t.style);s||(c=r,h=u.transform,c&&h?c[0]!==h[0]||c[1]!==h[1]||c[2]!==h[2]||c[3]!==h[3]||c[4]!==h[4]||c[5]!==h[5]:c||h)?(Dt(n,e),Xm(n,t)):p||Dt(n,e);var d=ya(t,e.inHover);t instanceof Ie?(e.lastDrawType!==1&&(l=!0,e.lastDrawType=1),Wm(n,t,u,l,e),p&&(e.batchFill||e.batchStroke)||n.beginPath(),function(f,g,y,v){var m,_=vl(y),x=ml(y),b=y.strokePercent,w=b<1,M=!g.path;g.silent&&!w||!M||g.createPathProxy();var S=g.path||kT,C=g.__dirty;if(!v){var I=y.fill,T=y.stroke,A=x&&!!I.colorStops,k=_&&!!T.colorStops,L=x&&!!I.image,O=_&&!!T.image,P=void 0,R=void 0,N=void 0,E=void 0,z=void 0;(A||k)&&(z=g.getBoundingRect()),A&&(P=C?Kh(f,I,z):g.__canvasFillGradient,g.__canvasFillGradient=P),k&&(R=C?Kh(f,T,z):g.__canvasStrokeGradient,g.__canvasStrokeGradient=R),L&&(N=C||!g.__canvasFillPattern?Jh(f,I,g):g.__canvasFillPattern,g.__canvasFillPattern=N),O&&(E=C||!g.__canvasStrokePattern?Jh(f,T,g):g.__canvasStrokePattern,g.__canvasStrokePattern=N),A?f.fillStyle=P:L&&(N?f.fillStyle=N:x=!1),k?f.strokeStyle=R:O&&(E?f.strokeStyle=E:_=!1)}var B,G,K=g.getGlobalScale();S.setScale(K[0],K[1],g.segmentIgnoreThreshold),f.setLineDash&&y.lineDash&&(B=(m=Em(g))[0],G=m[1]);var V=!0;(M||4&C)&&(S.setDPR(f.dpr),w?S.setContext(null):(S.setContext(f),V=!1),S.reset(),g.buildPath(S,g.shape,v),S.toStatic(),g.pathUpdated()),V&&S.rebuildPath(f,w?b:1),B&&(f.setLineDash(B),f.lineDashOffset=G),v||(y.strokeFirst?(_&&Vm(f,y),x&&Bm(f,y)):(x&&Bm(f,y),_&&Vm(f,y))),B&&f.setLineDash([])}(n,t,d,p),p&&(e.batchFill=d.fill||"",e.batchStroke=d.stroke||"")):t instanceof Fo?(e.lastDrawType!==3&&(l=!0,e.lastDrawType=3),Wm(n,t,u,l,e),function(f,g,y){var v,m=y.text;if(m!=null&&(m+=""),m){f.font=y.font||bi,f.textAlign=y.textAlign,f.textBaseline=y.textBaseline;var _=void 0,x=void 0;f.setLineDash&&y.lineDash&&(_=(v=Em(g))[0],x=v[1]),_&&(f.setLineDash(_),f.lineDashOffset=x),y.strokeFirst?(vl(y)&&f.strokeText(m,y.x,y.y),ml(y)&&f.fillText(m,y.x,y.y)):(ml(y)&&f.fillText(m,y.x,y.y),vl(y)&&f.strokeText(m,y.x,y.y)),_&&f.setLineDash([])}}(n,t,d)):t instanceof Tt?(e.lastDrawType!==2&&(l=!0,e.lastDrawType=2),function(f,g,y,v,m){Hm(f,ya(g,m.inHover),y&&ya(y,m.inHover),v,m)}(n,t,u,l,e),function(f,g,y){var v=g.__image=Ag(y.image,g.__image,g,g.onload);if(v&&Ms(v)){var m=y.x||0,_=y.y||0,x=g.getWidth(),b=g.getHeight(),w=v.width/v.height;if(x==null&&b!=null?x=b*w:b==null&&x!=null?b=x/w:x==null&&b==null&&(x=v.width,b=v.height),y.sWidth&&y.sHeight){var M=y.sx||0,S=y.sy||0;f.drawImage(v,M,S,y.sWidth,y.sHeight,m,_,x,b)}else if(y.sx&&y.sy){var C=x-(M=y.sx),I=b-(S=y.sy);f.drawImage(v,M,S,C,I,m,_,x,b)}else f.drawImage(v,m,_,x,b)}}(n,t,d)):t.getTemporalDisplayables&&(e.lastDrawType!==4&&(l=!0,e.lastDrawType=4),function(f,g,y){var v=g.getDisplayables(),m=g.getTemporalDisplayables();f.save();var _,x,b={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:y.viewWidth,viewHeight:y.viewHeight,inHover:y.inHover};for(_=g.getCursor(),x=v.length;_<x;_++)(S=v[_]).beforeBrush&&S.beforeBrush(),S.innerBeforeBrush(),ir(f,S,b,_===x-1),S.innerAfterBrush(),S.afterBrush&&S.afterBrush(),b.prevEl=S;for(var w=0,M=m.length;w<M;w++){var S;(S=m[w]).beforeBrush&&S.beforeBrush(),S.innerBeforeBrush(),ir(f,S,b,w===M-1),S.innerAfterBrush(),S.afterBrush&&S.afterBrush(),b.prevEl=S}g.clearTemporalDisplayables(),g.notClear=!0,f.restore()}(n,t,e)),p&&i&&Dt(n,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var Qh=new wT,Um=new bo(100),Ym=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function _l(n,t){if(n==="none")return null;var e=t.getDevicePixelRatio(),i=t.getZr(),r=i.painter.type==="svg";n.dirty&&Qh.delete(n);var o=Qh.get(n);if(o)return o;var a=ce(n,{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});a.backgroundColor==="none"&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(l){for(var u,c=[e],h=!0,p=0;p<Ym.length;++p){var d=a[Ym[p]];if(d!=null&&!Y(d)&&!Q(d)&&!Ae(d)&&typeof d!="boolean"){h=!1;break}c.push(d)}if(h){u=c.join(",")+(r?"-svg":"");var f=Um.get(u);f&&(r?l.svgElement=f:l.image=f)}var g,y=qm(a.dashArrayX),v=function(S){if(!S||typeof S=="object"&&S.length===0)return[0,0];if(Ae(S)){var C=Math.ceil(S);return[C,C]}var I=j(S,function(T){return Math.ceil(T)});return S.length%2?I.concat(I):I}(a.dashArrayY),m=Zm(a.symbol),_=j(y,function(S){return jm(S)}),x=jm(v),b=!r&&Bn.createCanvas(),w=r&&{tag:"g",attrs:{},key:"dcl",children:[]},M=function(){for(var S=1,C=0,I=_.length;C<I;++C)S=mg(S,_[C]);var T=1;for(C=0,I=m.length;C<I;++C)T=mg(T,m[C].length);S*=T;var A=x*_.length*m.length;return{width:Math.max(1,Math.min(S,a.maxTileWidth)),height:Math.max(1,Math.min(A,a.maxTileHeight))}}();b&&(b.width=M.width*e,b.height=M.height*e,g=b.getContext("2d")),function(){g&&(g.clearRect(0,0,b.width,b.height),a.backgroundColor&&(g.fillStyle=a.backgroundColor,g.fillRect(0,0,b.width,b.height)));for(var S=0,C=0;C<v.length;++C)S+=v[C];if(!(S<=0))for(var I=-x,T=0,A=0,k=0;I<M.height;){if(T%2==0){for(var L=A/2%m.length,O=0,P=0,R=0;O<2*M.width;){var N=0;for(C=0;C<y[k].length;++C)N+=y[k][C];if(N<=0)break;if(P%2==0){var E=.5*(1-a.symbolSize),z=O+y[k][P]*E,B=I+v[T]*E,G=y[k][P]*a.symbolSize,K=v[T]*a.symbolSize,V=R/2%m[L].length;X(z,B,G,K,m[L][V])}O+=y[k][P],++R,++P===y[k].length&&(P=0)}++k===y.length&&(k=0)}I+=v[T],++A,++T===v.length&&(T=0)}function X(Z,W,te,oe,se){var ie=r?1:e,J=_t(se,Z*ie,W*ie,te*ie,oe*ie,a.color,a.symbolKeepAspect);if(r){var $=i.painter.renderOneToVNode(J);$&&w.children.push($)}else $h(g,J)}}(),h&&Um.put(u,b||w),l.image=b,l.svgElement=w,l.svgWidth=M.width,l.svgHeight=M.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=r?1:1/e,Qh.set(n,s),n.dirty=!1,s}function Zm(n){if(!n||n.length===0)return[["rect"]];if(Q(n))return[[n]];for(var t=!0,e=0;e<n.length;++e)if(!Q(n[e])){t=!1;break}if(t)return Zm([n]);var i=[];for(e=0;e<n.length;++e)Q(n[e])?i.push([n[e]]):i.push(n[e]);return i}function qm(n){if(!n||n.length===0)return[[0,0]];if(Ae(n))return[[r=Math.ceil(n),r]];for(var t=!0,e=0;e<n.length;++e)if(!Ae(n[e])){t=!1;break}if(t)return qm([n]);var i=[];for(e=0;e<n.length;++e)if(Ae(n[e])){var r=Math.ceil(n[e]);i.push([r,r])}else(r=j(n[e],function(o){return Math.ceil(o)})).length%2==1?i.push(r.concat(r)):i.push(r);return i}function jm(n){for(var t=0,e=0;e<n.length;++e)t+=n[e];return n.length%2==1?2*t:t}var dn=new Vt,Km={};function Jm(n){return Km[n]}var LT="5.5.1",PT={zrender:"5.6.0"},ep=2e3,xl=4500,$m={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:ep,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:xl,ARIA:6e3,DECAL:7e3}},ht="__flagInMainProcess",kt="__pendingUpdate",tp="__needsUpdateStatus",Qm=/^[a-zA-Z0-9_]+$/,np="__connectUpdateStatus";function e0(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!this.isDisposed())return n0(this,n,t);this.id}}function t0(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n0(this,n,t)}}function n0(n,t,e){return e[0]=e[0]&&e[0].toLowerCase(),Vt.prototype[t].apply(n,e)}var Jr,ip,bl,hi,rp,op,ap,va,ma,i0,r0,sp,o0,wl,a0,s0,Qt,l0,u0=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t}(Vt),c0=u0.prototype;c0.on=t0("on"),c0.off=t0("off");var Sl=function(n){function t(e,i,r){var o=n.call(this,new vT)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],r=r||{},Q(i)&&(i=h0[i]),o._dom=e,r.ssr&&pg(function(u){var c=ye(u),h=c.dataIndex;if(h!=null){var p=re();return p.set("series_index",c.seriesIndex),p.set("data_index",h),c.ssrType&&p.set("ssr_type",c.ssrType),p}});var a=o._zr=gc(e,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:xe(r.useDirtyRect,!1),useCoarsePointer:xe(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});o._ssr=r.ssr,o._throttledZrFlush=cl(he(a.flush,a),17),(i=ae(i))&&Rv(i,!0),o._theme=i,o._locale=function(u){if(Q(u)){var c=Zs[u.toUpperCase()]||{};return u===Ys||u===gh?ae(c):de(ae(c),ae(Zs[na]),!1)}return de(ae(u),ae(Zs[na]),!1)}(r.locale||jy),o._coordSysMgr=new il;var s=o._api=a0(o);function l(u,c){return u.__prio-c.__prio}return rs(Tl,l),rs(up,l),o._scheduler=new Sm(o,s,up,Tl),o._messageCenter=new u0,o._initEvents(),o.resize=he(o.resize,o),a.animation.on("frame",o._onframe,o),i0(a,o),r0(a,o),fo(o),o}return F(t,n),t.prototype._onframe=function(){if(!this._disposed){l0(this);var e=this._scheduler;if(this[kt]){var i=this[kt].silent;this[ht]=!0;try{Jr(this),hi.update.call(this,null,this[kt].updateParams)}catch(l){throw this[ht]=!1,this[kt]=null,l}this._zr.flush(),this[ht]=!1,this[kt]=null,va.call(this,i),ma.call(this,i)}else if(e.unfinished){var r=1,o=this._model,a=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(o),e.performDataProcessorTasks(o),op(this,o),e.performVisualTasks(o),wl(this,this._model,a,"remain",{}),r-=+new Date-s}while(r>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,r){if(!this[ht])if(this._disposed)this.id;else{var o,a,s;if(ne(i)&&(r=i.lazyUpdate,o=i.silent,a=i.replaceMerge,s=i.transition,i=i.notMerge),this[ht]=!0,!this._model||i){var l=new TM(this._api),u=this._theme,c=this._model=new kh;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:a},cp);var h={seriesTransition:s,optionChanged:!0};if(r)this[kt]={silent:o,updateParams:h},this[ht]=!1,this.getZr().wakeUp();else{try{Jr(this),hi.update.call(this,null,h)}catch(p){throw this[kt]=null,this[ht]=!1,p}this._ssr||this._zr.flush(),this[kt]=null,this[ht]=!1,va.call(this,o),ma.call(this,o)}}},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||fe.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(fe.svgSupported){var e=this._zr;return D(e.storage.getDisplayList(),function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var i=(e=e||{}).excludeComponents,r=this._model,o=[],a=this;D(i,function(l){r.eachComponent({mainType:l},function(u){var c=a._componentsMap[u.__viewId];c.group.ignore||(o.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return D(o,function(l){l.group.ignore=!1}),s}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var i=e.type==="svg",r=this.group,o=Math.min,a=Math.max,s=1/0;if(Cl[r]){var l=s,u=s,c=-1/0,h=-1/0,p=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();D(rr,function(_,x){if(_.group===r){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ae(e)),w=_.getDom().getBoundingClientRect();l=o(w.left,l),u=o(w.top,u),c=a(w.right,c),h=a(w.bottom,h),p.push({dom:b,left:w.left,top:w.top})}});var f=(c*=d)-(l*=d),g=(h*=d)-(u*=d),y=Bn.createCanvas(),v=gc(y,{renderer:i?"svg":"canvas"});if(v.resize({width:f,height:g}),i){var m="";return D(p,function(_){var x=_.left-l,b=_.top-u;m+='<g transform="translate('+x+","+b+')">'+_.dom+"</g>"}),v.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&v.painter.setBackgroundColor(e.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return e.connectedBackgroundColor&&v.add(new ke({shape:{x:0,y:0,width:f,height:g},style:{fill:e.connectedBackgroundColor}})),D(p,function(_){var x=new Tt({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});v.add(x)}),v.refreshImmediately(),y.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,i){return rp(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return rp(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){var r;if(!this._disposed)return D(Eo(this._model,e),function(o,a){a.indexOf("Models")>=0&&D(o,function(s){var l=s.coordinateSystem;if(l&&l.containPoint)r=r||!!l.containPoint(i);else if(a==="seriesModels"){var u=this._chartsMap[s.__viewId];u&&u.containPoint&&(r=r||u.containPoint(i,s))}},this)},this),!!r;this.id},t.prototype.getVisual=function(e,i){var r=Eo(this._model,e,{defaultMainType:"series"}),o=r.seriesModel.getData(),a=r.hasOwnProperty("dataIndexInside")?r.dataIndexInside:r.hasOwnProperty("dataIndex")?o.indexOfRawIndex(r.dataIndex):null;return a!=null?Pm(o,a,i):Om(o,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,i,r,o=this;D(OT,function(a){var s=function(l){var u,c=o.getModel(),h=l.target;if(a==="globalout"?u={}:h&&tr(h,function(y){var v=ye(y);if(v&&v.dataIndex!=null){var m=v.dataModel||c.getSeriesByIndex(v.seriesIndex);return u=m&&m.getDataParams(v.dataIndex,v.dataType,h)||{},!0}if(v.eventData)return u=H({},v.eventData),!0},!0),u){var p=u.componentType,d=u.componentIndex;p!=="markLine"&&p!=="markPoint"&&p!=="markArea"||(p="series",d=u.seriesIndex);var f=p&&d!=null&&c.getComponent(p,d),g=f&&o[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];u.event=l,u.type=a,o._$eventProcessor.eventInfo={targetEl:h,packedEvent:u,model:f,view:g},o.trigger(a,u)}};s.zrEventfulCallAtLast=!0,o._zr.on(a,s,o)}),D(_a,function(a,s){o._messageCenter.on(s,function(l){this.trigger(s,l)},o)}),D(["selectchanged"],function(a){o._messageCenter.on(a,function(s){this.trigger(a,s)},o)}),e=this._messageCenter,i=this,r=this._api,e.on("selectchanged",function(a){var s=r.getModel();a.isFromClick?(Kr("map","selectchanged",i,s,a),Kr("pie","selectchanged",i,s,a)):a.fromAction==="select"?(Kr("map","selected",i,s,a),Kr("pie","selected",i,s,a)):a.fromAction==="unselect"&&(Kr("map","unselected",i,s,a),Kr("pie","unselected",i,s,a))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Mg(this.getDom(),pp,"");var e=this,i=e._api,r=e._model;D(e._componentsViews,function(o){o.dispose(r,i)}),D(e._chartsViews,function(o){o.dispose(r,i)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete rr[e.id]}},t.prototype.resize=function(e){if(!this[ht])if(this._disposed)this.id;else{this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),i){var r=i.resetOption("media"),o=e&&e.silent;this[kt]&&(o==null&&(o=this[kt].silent),r=!0,this[kt]=null),this[ht]=!0;try{r&&Jr(this),hi.update.call(this,{type:"resize",animation:H({duration:0},e&&e.animation)})}catch(a){throw this[ht]=!1,a}this[ht]=!1,va.call(this,o),ma.call(this,o)}}},t.prototype.showLoading=function(e,i){if(this._disposed)this.id;else if(ne(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),hp[e]){var r=hp[e](this._api,i),o=this._zr;this._loadingFX=r,o.add(r)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var i=H({},e);return i.type=_a[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed)this.id;else if(ne(i)||(i={silent:!!i}),Ml[e.type]&&this._model)if(this[ht])this._pendingActions.push(e);else{var r=i.silent;ap.call(this,e,r);var o=i.flush;o?this._zr.flush():o!==!1&&fe.browser.weChat&&this._throttledZrFlush(),va.call(this,r),ma.call(this,r)}},t.prototype.updateLabelLayout=function(){dn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var i=e.seriesIndex;this.getModel().getSeriesByIndex(i).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(l){l.clearColorPalette(),l.eachSeries(function(u){u.clearColorPalette()})}function i(l){for(var u=[],c=l.currentStates,h=0;h<c.length;h++){var p=c[h];p!=="emphasis"&&p!=="blur"&&p!=="select"&&u.push(p)}l.selected&&l.states.select&&u.push("select"),l.hoverState===2&&l.states.emphasis?u.push("emphasis"):l.hoverState===1&&l.states.blur&&u.push("blur"),l.useStates(u)}function r(l,u){if(!l.preventAutoZ){var c=l.get("z")||0,h=l.get("zlevel")||0;u.eachRendered(function(p){return o(p,c,h,-1/0),!0})}}function o(l,u,c,h){var p=l.getTextContent(),d=l.getTextGuideLine();if(l.isGroup)for(var f=l.childrenRef(),g=0;g<f.length;g++)h=Math.max(o(f[g],u,c,h),h);else l.z=u,l.zlevel=c,h=Math.max(l.z2,h);if(p&&(p.z=u,p.zlevel=c,isFinite(h)&&(p.z2=h+2)),d){var y=l.textGuideLineConfig;d.z=u,d.zlevel=c,isFinite(h)&&(d.z2=h+(y&&y.showAbove?1:-1))}return h}function a(l,u){u.eachRendered(function(c){if(!Nr(c)){var h=c.getTextContent(),p=c.getTextGuideLine();c.stateTransition&&(c.stateTransition=null),h&&h.stateTransition&&(h.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),c.hasState()?(c.prevStates=c.currentStates,c.clearStates()):c.prevStates&&(c.prevStates=null)}})}function s(l,u){var c=l.getModel("stateAnimation"),h=l.isAnimationEnabled(),p=c.get("duration"),d=p>0?{duration:p,delay:c.get("delay"),easing:c.get("easing")}:null;u.eachRendered(function(f){if(f.states&&f.states.emphasis){if(Nr(f))return;if(f instanceof Ie&&function(m){var _=ey(m);_.normalFill=m.style.fill,_.normalStroke=m.style.stroke;var x=m.states.select||{};_.selectFill=x.style&&x.style.fill||null,_.selectStroke=x.style&&x.style.stroke||null}(f),f.__dirty){var g=f.prevStates;g&&f.useStates(g)}if(h){f.stateTransition=d;var y=f.getTextContent(),v=f.getTextGuideLine();y&&(y.stateTransition=d),v&&(v.stateTransition=d)}f.__dirty&&i(f)}})}Jr=function(l){var u=l._scheduler;u.restorePipelines(l._model),u.prepareStageTasks(),ip(l,!0),ip(l,!1),u.plan()},ip=function(l,u){for(var c=l._model,h=l._scheduler,p=u?l._componentsViews:l._chartsViews,d=u?l._componentsMap:l._chartsMap,f=l._zr,g=l._api,y=0;y<p.length;y++)p[y].__alive=!1;function v(_){var x=_.__requireNewView;_.__requireNewView=!1;var b="_ec_"+_.id+"_"+_.type,w=!x&&d[b];if(!w){var M=Sn(_.type);(w=new(u?Xe.getClass(M.main,M.sub):Je.getClass(M.sub))).init(c,g),d[b]=w,p.push(w),f.add(w.group)}_.__viewId=w.__id=b,w.__alive=!0,w.__model=_,w.group.__ecComponentInfo={mainType:_.mainType,index:_.componentIndex},!u&&h.prepareView(w,_,c,g)}for(u?c.eachComponent(function(_,x){_!=="series"&&v(x)}):c.eachSeries(v),y=0;y<p.length;){var m=p[y];m.__alive?y++:(!u&&m.renderTask.dispose(),f.remove(m.group),m.dispose(c,g),p.splice(y,1),d[m.__id]===m&&delete d[m.__id],m.__id=m.group.__ecComponentInfo=null)}},bl=function(l,u,c,h,p){var d=l._model;if(d.setUpdatePayload(c),h){var f={};f[h+"Id"]=c[h+"Id"],f[h+"Index"]=c[h+"Index"],f[h+"Name"]=c[h+"Name"];var g={mainType:h,query:f};p&&(g.subType=p);var y,v=c.excludeSeriesId;v!=null&&(y=re(),D(Ke(v),function(_){var x=sn(_,null);x!=null&&y.set(x,!0)})),d&&d.eachComponent(g,function(_){if(!y||y.get(_.id)==null)if(fy(c))if(_ instanceof it)c.type!==qi||c.notBlur||_.get(["emphasis","disabled"])||function(M,S,C){var I=M.seriesIndex,T=M.getData(S.dataType);if(T){var A=zi(T,S);A=(Y(A)?A[0]:A)||0;var k=T.getItemGraphicEl(A);if(!k)for(var L=T.count(),O=0;!k&&O<L;)k=T.getItemGraphicEl(O++);if(k){var P=ye(k);Yc(I,P.focus,P.blurScope,C)}else{var R=M.get(["emphasis","focus"]),N=M.get(["emphasis","blurScope"]);R!=null&&Yc(I,R,N,C)}}}(_,c,l._api);else{var x=qc(_.mainType,_.componentIndex,c.name,l._api),b=x.focusSelf,w=x.dispatchers;c.type===qi&&b&&!c.notBlur&&Zc(_.mainType,_.componentIndex,l._api),w&&D(w,function(M){c.type===qi?kr(M):Lr(M)})}else Jc(c)&&_ instanceof it&&(function(M,S){if(Jc(S)){var C=S.dataType,I=zi(M.getData(C),S);Y(I)||(I=[I]),M[S.type===Ho?"toggleSelect":S.type===Go?"select":"unselect"](I,C)}}(_,c,l._api),py(_),Qt(l))},l),d&&d.eachComponent(g,function(_){y&&y.get(_.id)!=null||m(l[h==="series"?"_chartsMap":"_componentsMap"][_.__viewId])},l)}else D([].concat(l._componentsViews).concat(l._chartsViews),m);function m(_){_&&_.__alive&&_[u]&&_[u](_.__model,d,l._api,c)}},hi={prepareAndUpdate:function(l){Jr(this),hi.update.call(this,l,{optionChanged:l.newOption!=null})},update:function(l,u){var c=this._model,h=this._api,p=this._zr,d=this._coordSysMgr,f=this._scheduler;if(c){c.setUpdatePayload(l),f.restoreData(c,l),f.performSeriesTasks(c),d.create(c,h),f.performDataProcessorTasks(c,l),op(this,c),d.update(c,h),e(c),f.performVisualTasks(c,l),sp(this,c,h,l,u);var g=c.get("backgroundColor")||"transparent",y=c.get("darkMode");p.setBackgroundColor(g),y!=null&&y!=="auto"&&p.setDarkMode(y),dn.trigger("afterupdate",c,h)}},updateTransform:function(l){var u=this,c=this._model,h=this._api;if(c){c.setUpdatePayload(l);var p=[];c.eachComponent(function(f,g){if(f!=="series"){var y=u.getViewOfComponentModel(g);if(y&&y.__alive)if(y.updateTransform){var v=y.updateTransform(g,c,h,l);v&&v.update&&p.push(y)}else p.push(y)}});var d=re();c.eachSeries(function(f){var g=u._chartsMap[f.__viewId];if(g.updateTransform){var y=g.updateTransform(f,c,h,l);y&&y.update&&d.set(f.uid,1)}else d.set(f.uid,1)}),e(c),this._scheduler.performVisualTasks(c,l,{setDirty:!0,dirtyMap:d}),wl(this,c,h,l,{},d),dn.trigger("afterupdate",c,h)}},updateView:function(l){var u=this._model;u&&(u.setUpdatePayload(l),Je.markUpdateMethod(l,"updateView"),e(u),this._scheduler.performVisualTasks(u,l,{setDirty:!0}),sp(this,u,this._api,l,{}),dn.trigger("afterupdate",u,this._api))},updateVisual:function(l){var u=this,c=this._model;c&&(c.setUpdatePayload(l),c.eachSeries(function(h){h.getData().clearAllVisual()}),Je.markUpdateMethod(l,"updateVisual"),e(c),this._scheduler.performVisualTasks(c,l,{visualType:"visual",setDirty:!0}),c.eachComponent(function(h,p){if(h!=="series"){var d=u.getViewOfComponentModel(p);d&&d.__alive&&d.updateVisual(p,c,u._api,l)}}),c.eachSeries(function(h){u._chartsMap[h.__viewId].updateVisual(h,c,u._api,l)}),dn.trigger("afterupdate",c,this._api))},updateLayout:function(l){hi.update.call(this,l)}},rp=function(l,u,c,h){if(l._disposed)l.id;else for(var p,d=l._model,f=l._coordSysMgr.getCoordinateSystems(),g=Eo(d,c),y=0;y<f.length;y++){var v=f[y];if(v[u]&&(p=v[u](d,g,h))!=null)return p}},op=function(l,u){var c=l._chartsMap,h=l._scheduler;u.eachSeries(function(p){h.updateStreamModes(p,c[p.__viewId])})},ap=function(l,u){var c=this,h=this.getModel(),p=l.type,d=l.escapeConnect,f=Ml[p],g=f.actionInfo,y=(g.update||"update").split(":"),v=y.pop(),m=y[0]!=null&&Sn(y[0]);this[ht]=!0;var _=[l],x=!1;l.batch&&(x=!0,_=j(l.batch,function(T){return(T=ce(H({},T),l)).batch=null,T}));var b,w=[],M=Jc(l),S=fy(l);if(S&&hy(this._api),D(_,function(T){if((b=(b=f.action(T,c._model,c._api))||H({},T)).type=g.event||b.type,w.push(b),S){var A=wc(l),k=A.queryOptionMap,L=A.mainTypeSpecified?k.keys()[0]:"series";bl(c,v,T,L),Qt(c)}else M?(bl(c,v,T,"series"),Qt(c)):m&&bl(c,v,T,m.main,m.sub)}),v!=="none"&&!S&&!M&&!m)try{this[kt]?(Jr(this),hi.update.call(this,l),this[kt]=null):hi[v].call(this,l)}catch(T){throw this[ht]=!1,T}if(b=x?{type:g.event||p,escapeConnect:d,batch:w}:w[0],this[ht]=!1,!u){var C=this._messageCenter;if(C.trigger(b.type,b),M){var I={type:"selectchanged",escapeConnect:d,selected:XS(h),isFromClick:l.isFromClick||!1,fromAction:l.type,fromActionPayload:l};C.trigger(I.type,I)}}},va=function(l){for(var u=this._pendingActions;u.length;){var c=u.shift();ap.call(this,c,l)}},ma=function(l){!l&&this.trigger("updated")},i0=function(l,u){l.on("rendered",function(c){u.trigger("rendered",c),!l.animation.isFinished()||u[kt]||u._scheduler.unfinished||u._pendingActions.length||u.trigger("finished")})},r0=function(l,u){l.on("mouseover",function(c){var h=tr(c.target,Kc);h&&(function(p,d,f){var g=ye(p),y=qc(g.componentMainType,g.componentIndex,g.componentHighDownName,f),v=y.dispatchers,m=y.focusSelf;v?(m&&Zc(g.componentMainType,g.componentIndex,f),D(v,function(_){return oy(_,d)})):(Yc(g.seriesIndex,g.focus,g.blurScope,f),g.focus==="self"&&Zc(g.componentMainType,g.componentIndex,f),oy(p,d))}(h,c,u._api),Qt(u))}).on("mouseout",function(c){var h=tr(c.target,Kc);h&&(function(p,d,f){hy(f);var g=ye(p),y=qc(g.componentMainType,g.componentIndex,g.componentHighDownName,f).dispatchers;y?D(y,function(v){return ay(v,d)}):ay(p,d)}(h,c,u._api),Qt(u))}).on("click",function(c){var h=tr(c.target,function(f){return ye(f).dataIndex!=null},!0);if(h){var p=h.selected?"unselect":"select",d=ye(h);u._api.dispatchAction({type:p,dataType:d.dataType,dataIndexInside:d.dataIndex,seriesIndex:d.seriesIndex,isFromClick:!0})}})},sp=function(l,u,c,h,p){(function(d){var f=[],g=[],y=!1;if(d.eachComponent(function(x,b){var w=b.get("zlevel")||0,M=b.get("z")||0,S=b.getZLevelKey();y=y||!!S,(x==="series"?g:f).push({zlevel:w,z:M,idx:b.componentIndex,type:x,key:S})}),y){var v,m,_=f.concat(g);rs(_,function(x,b){return x.zlevel===b.zlevel?x.z-b.z:x.zlevel-b.zlevel}),D(_,function(x){var b=d.getComponent(x.type,x.idx),w=x.zlevel,M=x.key;v!=null&&(w=Math.max(v,w)),M?(w===v&&M!==m&&w++,m=M):m&&(w===v&&w++,m=""),v=w,b.setZLevel(w)})}})(u),o0(l,u,c,h,p),D(l._chartsViews,function(d){d.__alive=!1}),wl(l,u,c,h,p),D(l._chartsViews,function(d){d.__alive||d.remove(u,c)})},o0=function(l,u,c,h,p,d){D(d||l._componentsViews,function(f){var g=f.__model;a(0,f),f.render(g,u,c,h),r(g,f),s(g,f)})},wl=function(l,u,c,h,p,d){var f=l._scheduler;p=H(p||{},{updatedSeries:u.getSeries()}),dn.trigger("series:beforeupdate",u,c,p);var g=!1;u.eachSeries(function(y){var v=l._chartsMap[y.__viewId];v.__alive=!0;var m=v.renderTask;f.updatePayload(m,h),a(0,v),d&&d.get(y.uid)&&m.dirty(),m.perform(f.getPerformArgs(m))&&(g=!0),v.group.silent=!!y.get("silent"),function(_,x){var b=_.get("blendMode")||null;x.eachRendered(function(w){w.isGroup||(w.style.blend=b)})}(y,v),py(y)}),f.unfinished=g||f.unfinished,dn.trigger("series:layoutlabels",u,c,p),dn.trigger("series:transition",u,c,p),u.eachSeries(function(y){var v=l._chartsMap[y.__viewId];r(y,v),s(y,v)}),function(y,v){var m=y._zr.storage,_=0;m.traverse(function(x){x.isGroup||_++}),_>v.get("hoverLayerThreshold")&&!fe.node&&!fe.worker&&v.eachSeries(function(x){if(!x.preventUsingHoverLayer){var b=y._chartsMap[x.__viewId];b.__alive&&b.eachRendered(function(w){w.states.emphasis&&(w.states.emphasis.hoverLayer=!0)})}})}(l,u),dn.trigger("series:afterupdate",u,c,p)},Qt=function(l){l[tp]=!0,l.getZr().wakeUp()},l0=function(l){l[tp]&&(l.getZr().storage.traverse(function(u){Nr(u)||i(u)}),l[tp]=!1)},a0=function(l){return new(function(u){function c(){return u!==null&&u.apply(this,arguments)||this}return F(c,u),c.prototype.getCoordinateSystems=function(){return l._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(h){for(;h;){var p=h.__ecComponentInfo;if(p!=null)return l._model.getComponent(p.mainType,p.index);h=h.parent}},c.prototype.enterEmphasis=function(h,p){kr(h,p),Qt(l)},c.prototype.leaveEmphasis=function(h,p){Lr(h,p),Qt(l)},c.prototype.enterBlur=function(h){(function(p){Yn(p,Hc)})(h),Qt(l)},c.prototype.leaveBlur=function(h){sy(h),Qt(l)},c.prototype.enterSelect=function(h){ly(h),Qt(l)},c.prototype.leaveSelect=function(h){uy(h),Qt(l)},c.prototype.getModel=function(){return l.getModel()},c.prototype.getViewOfComponentModel=function(h){return l.getViewOfComponentModel(h)},c.prototype.getViewOfSeriesModel=function(h){return l.getViewOfSeriesModel(h)},c}(Iv))(l)},s0=function(l){function u(c,h){for(var p=0;p<c.length;p++)c[p][np]=h}D(_a,function(c,h){l._messageCenter.on(h,function(p){if(Cl[l.group]&&l[np]!==0){if(p&&p.escapeConnect)return;var d=l.makeActionFromEvent(p),f=[];D(rr,function(g){g!==l&&g.group===l.group&&f.push(g)}),u(f,0),D(f,function(g){g[np]!==1&&g.dispatchAction(d)}),u(f,2)}})})}}(),t}(Vt),lp=Sl.prototype;lp.on=e0("on"),lp.off=e0("off"),lp.one=function(n,t,e){var i=this;this.on.call(this,n,function r(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];t&&t.apply&&t.apply(this,o),i.off(n,r)},e)};var OT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],Ml={},_a={},up=[],cp=[],Tl=[],h0={},hp={},rr={},Cl={},RT=+new Date-0,NT=+new Date-0,pp="_echarts_instance_";function ET(n,t,e){var i=!(e&&e.ssr);if(i){var r=dp(n);if(r)return r}var o=new Sl(n,t,e);return o.id="ec_"+RT++,rr[o.id]=o,i&&Mg(n,pp,o.id),s0(o),dn.trigger("afterinit",o),o}function zT(n){if(Y(n)){var t=n;n=null,D(t,function(e){e.group!=null&&(n=e.group)}),n=n||"g_"+NT++,D(t,function(e){e.group=n})}return Cl[n]=!0,n}function p0(n){Cl[n]=!1}var BT=p0;function VT(n){Q(n)?n=rr[n]:n instanceof Sl||(n=dp(n)),n instanceof Sl&&!n.isDisposed()&&n.dispose()}function dp(n){return rr[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(n,pp)]}function FT(n){return rr[n]}function fp(n,t){h0[n]=t}function gp(n){we(cp,n)<0&&cp.push(n)}function yp(n,t){vp(up,n,t,2e3)}function d0(n){Il("afterinit",n)}function f0(n){Il("afterupdate",n)}function Il(n,t){dn.on(n,t)}function fn(n,t,e){ue(t)&&(e=t,t="");var i=ne(n)?n.type:[n,n={event:t}][0];n.event=(n.event||i).toLowerCase(),t=n.event,_a[t]||(Ot(Qm.test(i)&&Qm.test(t)),Ml[i]||(Ml[i]={action:e,actionInfo:n}),_a[t]=i)}function g0(n,t){il.register(n,t)}function GT(n){var t=il.get(n);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function y0(n,t){vp(Tl,n,t,1e3,"layout")}function pi(n,t){vp(Tl,n,t,3e3,"visual")}var v0=[];function vp(n,t,e,i,r){if((ue(t)||ne(t))&&(e=t,t=i),!(we(v0,e)>=0)){v0.push(e);var o=Sm.wrapStageHandler(e,r);o.__prio=t,o.__raw=e,n.push(o)}}function mp(n,t){hp[n]=t}function HT(n){sf({createCanvas:n})}function m0(n,t,e){var i=Jm("registerMap");i&&i(n,t,e)}function WT(n){var t=Jm("getMap");return t&&t(n)}var _0=function(n){var t=(n=ae(n)).type;t||Mt("");var e=t.split(":");e.length!==2&&Mt("");var i=!1;e[0]==="echarts"&&(t=e[1],i=!0),n.__isBuiltIn=i,Kv.set(t,n)};pi(ep,rT),pi(xl,oT),pi(xl,aT),pi(ep,mT),pi(xl,_T),pi(7e3,function(n,t){n.eachRawSeries(function(e){if(!n.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var a=i.getItemVisual(o,"decal");a&&(i.ensureUniqueItemVisual(o,"style").decal=_l(a,t))});var r=i.getVisual("decal");r&&(i.getVisual("style").decal=_l(r,t))}})}),gp(Rv),yp(900,function(n){var t=re();n.eachSeries(function(e){var i=e.get("stack");if(i){var r=t.get(i)||t.set(i,[]),o=e.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(a)}}),t.each(DM)}),mp("default",function(n,t){ce(t=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 _e,i=new ke({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var r,o=new Me({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 ke({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return e.add(a),t.showSpinner&&((r=new qo({shape:{startAngle:-pl/2,endAngle:-pl/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*pl/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*pl/2}).delay(300).start("circularInOut"),e.add(r)),e.resize=function(){var s=o.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(n.getWidth()-2*l-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=n.getHeight()/2;t.showSpinner&&r.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:2*l,height:2*l}),i.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},e.resize(),e}),fn({type:qi,event:qi,update:qi},rt),fn({type:ks,event:ks,update:ks},rt),fn({type:Go,event:Go,update:Go},rt),fn({type:Ls,event:Ls,update:Ls},rt),fn({type:Ho,event:Ho,update:Ho},rt),fp("light",yT),fp("dark",km);var XT={};function xa(n){return n==null?0:n.length||1}function x0(n){return n}var _p=function(){function n(t,e,i,r,o,a){this._old=t,this._new=e,this._oldKeyGetter=i||x0,this._newKeyGetter=r||x0,this.context=o,this._diffModeMultiple=a==="multiple"}return n.prototype.add=function(t){return this._add=t,this},n.prototype.update=function(t){return this._update=t,this},n.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},n.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},n.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},n.prototype.remove=function(t){return this._remove=t,this},n.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},n.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a<t.length;a++){var s=r[a],l=i[s],u=xa(l);if(u>1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,a)}else u===1?(i[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,i)},n.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},r={},o=[],a=[];this._initIndexMap(t,i,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s<o.length;s++){var l=o[s],u=i[l],c=r[l],h=xa(u),p=xa(c);if(h>1&&p===1)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(h===1&&p>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(h===1&&p===1)this._update&&this._update(c,u),r[l]=null;else if(h>1&&p>1)this._updateManyToMany&&this._updateManyToMany(c,u),r[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(a,r)},n.prototype._performRestAdd=function(t,e){for(var i=0;i<t.length;i++){var r=t[i],o=e[r],a=xa(o);if(a>1)for(var s=0;s<a;s++)this._add&&this._add(o[s]);else a===1&&this._add&&this._add(o);e[r]=null}},n.prototype._initIndexMap=function(t,e,i,r){for(var o=this._diffModeMultiple,a=0;a<t.length;a++){var s="_ec_"+this[r](t[a],a);if(o||(i[a]=s),e){var l=e[s],u=xa(l);u===0?(e[s]=a,o&&i.push(s)):u===1?e[s]=[l,a]:l.push(a)}}},n}(),UT=function(){function n(t,e){this._encode=t,this._schema=e}return n.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},n.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},n}();function xp(n,t){return n.hasOwnProperty(t)||(n[t]=[]),n[t]}var Al=function(n){this.otherDims={},n!=null&&H(this,n)},YT=Ee(),ZT={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},b0=function(){function n(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return n.prototype.isDimensionOmitted=function(){return this._dimOmitted},n.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=M0(this.source)))},n.prototype.getSourceDimensionIndex=function(t){return xe(this._dimNameMap.get(t),-1)},n.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},n.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Gv(this.source),i=!T0(t),r="",o=[],a=0,s=0;a<t;a++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===a)l=e?h.name:null,u=h.type,c=h.ordinalMeta,s++;else{var p=this.getSourceDimension(a);p&&(l=e?p.name:null,u=p.type)}o.push({property:l,type:u,ordinalMeta:c}),!e||l==null||h&&h.isCalculationCoord||(r+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),r+="$",r+=ZT[u]||"f",c&&(r+=c.uid),r+="$"}var d=this.source;return{dimensions:o,hash:[d.seriesLayoutBy,d.startIndex,r].join("$$")}},n.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,i=0;e<this._fullDimCount;e++){var r=void 0,o=this.dimensions[i];if(o&&o.storeDimIndex===e)o.isCalculationCoord||(r=o.name),i++;else{var a=this.getSourceDimension(e);a&&(r=a.name)}t.push(r)}return t},n.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},n}();function w0(n){return n instanceof b0}function S0(n){for(var t=re(),e=0;e<(n||[]).length;e++){var i=n[e],r=ne(i)?i.name:i;r!=null&&t.get(r)==null&&t.set(r,e)}return t}function M0(n){var t=YT(n);return t.dimNameMap||(t.dimNameMap=S0(n.dimensionsDefine))}function T0(n){return n>30}var C0,Dl,ba,wa,bp,kl,wp,Sa=ne,di=j,qT=typeof Int32Array>"u"?Array:Int32Array,jT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],KT=["_approximateExtent"],Sp=function(){function n(t,e){var i;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 r=!1;w0(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,i=t),i=i||["x","y"];for(var o={},a=[],s={},l=!1,u={},c=0;c<i.length;c++){var h=i[c],p=Q(h)?new Al({name:h}):h instanceof Al?h:new Al(h),d=p.name;p.type=p.type||"float",p.coordDim||(p.coordDim=d,p.coordDimIndex=0);var f=p.otherDims=p.otherDims||{};a.push(d),o[d]=p,u[d]!=null&&(l=!0),p.createInvertedIndices&&(s[d]=[]),f.itemName===0&&(this._nameDimIdx=c),f.itemId===0&&(this._idDimIdx=c),r&&(p.storeDimIndex=c)}if(this.dimensions=a,this._dimInfos=o,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=re();D(a,function(y){g.set(o[y].storeDimIndex,y)})}}return n.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 r=this._schema.getSourceDimension(e);return r?r.name:void 0},n.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},n.prototype._recognizeDimIndex=function(t){if(Ae(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},n.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},n.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},n.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]}},n.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},n.prototype.mapDimension=function(t,e){var i=this._dimSummary;if(e==null)return i.encodeFirstDimNotExtra[t];var r=i.encode[t];return r?r[e]:null},n.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},n.prototype.getStore=function(){return this._store},n.prototype.initData=function(t,e,i){var r,o=this;if(t instanceof Fh&&(r=t),!r){var a=this.dimensions,s=Rh(t)||ft(t)?new Hv(t,a.length):t;r=new Fh;var l=di(a,function(u){return{type:o._dimInfos[u].type,property:u}});r.initData(s,l,i)}this._store=r,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(u,c){var h={},p=h.encode={},d=re(),f=[],g=[],y={};D(u.dimensions,function(b){var w,M=u.getDimensionInfo(b),S=M.coordDim;if(S){var C=M.coordDimIndex;xp(p,S)[C]=b,M.isExtraCoord||(d.set(S,1),(w=M.type)!=="ordinal"&&w!=="time"&&(f[0]=b),xp(y,S)[C]=u.getDimensionIndex(M.name)),M.defaultTooltip&&g.push(b)}fv.each(function(I,T){var A=xp(p,T),k=M.otherDims[T];k!=null&&k!==!1&&(A[k]=M.name)})});var v=[],m={};d.each(function(b,w){var M=p[w];m[w]=M[0],v=v.concat(M)}),h.dataDimsOnCoord=v,h.dataDimIndicesOnCoord=j(v,function(b){return u.getDimensionInfo(b).storeDimIndex}),h.encodeFirstDimNotExtra=m;var _=p.label;_&&_.length&&(f=_.slice());var x=p.tooltip;return x&&x.length?g=x.slice():g.length||(g=f.slice()),p.defaultedLabel=f,p.defaultedTooltip=g,h.userOutput=new UT(y,c),h}(this,this._schema),this.userOutput=this._dimSummary.userOutput},n.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},n.prototype.appendValues=function(t,e){var i=this._store.appendValues(t,e.length),r=i.start,o=i.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=r;s<o;s++){var l=s-r;this._nameList[s]=e[l],a&&wp(this,s)}},n.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,i=0;i<e.length;i++){var r=this._dimInfos[e[i]];r.ordinalMeta&&t.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},n.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==ui&&!t.fillStorage},n.prototype._doInit=function(t,e){if(!(t>=e)){var i=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(i.getSource().sourceFormat===Jt&&!i.pure)for(var a=[],s=t;s<e;s++){var l=i.getItem(s,a);if(!this.hasItemOption&&uS(l)&&(this.hasItemOption=!0),l){var u=l.name;r[s]==null&&u!=null&&(r[s]=sn(u,null));var c=l.id;o[s]==null&&c!=null&&(o[s]=sn(c,null))}}if(this._shouldMakeIdFromName())for(s=t;s<e;s++)wp(this,s);C0(this)}},n.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},n.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},n.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},n.prototype.setCalculationInfo=function(t,e){Sa(t)?H(this._calculationInfo,t):this._calculationInfo[t]=e},n.prototype.getName=function(t){var e=this.getRawIndex(t),i=this._nameList[e];return i==null&&this._nameDimIdx!=null&&(i=ba(this,this._nameDimIdx,e)),i==null&&(i=""),i},n.prototype._getCategory=function(t,e){var i=this._store.get(t,e),r=this._store.getOrdinalMeta(t);return r?r.categories[i]:i},n.prototype.getId=function(t){return Dl(this,this.getRawIndex(t))},n.prototype.count=function(){return this._store.count()},n.prototype.get=function(t,e){var i=this._store,r=this._dimInfos[t];if(r)return i.get(r.storeDimIndex,e)},n.prototype.getByRawIndex=function(t,e){var i=this._store,r=this._dimInfos[t];if(r)return i.getByRawIndex(r.storeDimIndex,e)},n.prototype.getIndices=function(){return this._store.getIndices()},n.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},n.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},n.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},n.prototype.getValues=function(t,e){var i=this,r=this._store;return Y(t)?r.getValues(di(t,function(o){return i._getStoreDimIndex(o)}),e):r.getValues(t)},n.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,i=0,r=e.length;i<r;i++)if(isNaN(this._store.get(e[i],t)))return!1;return!0},n.prototype.indexOfName=function(t){for(var e=0,i=this._store.count();e<i;e++)if(this.getName(e)===t)return e;return-1},n.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},n.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},n.prototype.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return i==null||isNaN(i)?-1:i},n.prototype.indicesOfNearest=function(t,e,i){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,i)},n.prototype.each=function(t,e,i){ue(t)&&(i=e,e=t,t=[]);var r=i||this,o=di(wa(t),this._getStoreDimIndex,this);this._store.each(o,r?he(e,r):e)},n.prototype.filterSelf=function(t,e,i){ue(t)&&(i=e,e=t,t=[]);var r=i||this,o=di(wa(t),this._getStoreDimIndex,this);return this._store=this._store.filter(o,r?he(e,r):e),this},n.prototype.selectRange=function(t){var e=this,i={};return D(Oe(t),function(r){var o=e._getStoreDimIndex(r);i[o]=t[r]}),this._store=this._store.selectRange(i),this},n.prototype.mapArray=function(t,e,i){ue(t)&&(i=e,e=t,t=[]),i=i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i),r},n.prototype.map=function(t,e,i,r){var o=i||r||this,a=di(wa(t),this._getStoreDimIndex,this),s=kl(this);return s._store=this._store.map(a,o?he(e,o):e),s},n.prototype.modify=function(t,e,i,r){var o=i||r||this,a=di(wa(t),this._getStoreDimIndex,this);this._store.modify(a,o?he(e,o):e)},n.prototype.downSample=function(t,e,i,r){var o=kl(this);return o._store=this._store.downSample(this._getStoreDimIndex(t),e,i,r),o},n.prototype.lttbDownSample=function(t,e){var i=kl(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),i},n.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},n.prototype.getItemModel=function(t){var e=this.hostModel,i=this.getRawDataItem(t);return new Le(i,e,e&&e.ecModel)},n.prototype.diff=function(t){var e=this;return new _p(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(i){return Dl(t,i)},function(i){return Dl(e,i)})},n.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},n.prototype.setVisual=function(t,e){this._visual=this._visual||{},Sa(t)?H(this._visual,t):this._visual[t]=e},n.prototype.getItemVisual=function(t,e){var i=this._itemVisuals[t];return(i&&i[e])??this.getVisual(e)},n.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},n.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,r=i[t];r||(r=i[t]={});var o=r[e];return o==null&&(Y(o=this.getVisual(e))?o=o.slice():Sa(o)&&(o=H({},o)),r[e]=o),o},n.prototype.setItemVisual=function(t,e,i){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,Sa(e)?H(r,e):r[e]=i},n.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},n.prototype.setLayout=function(t,e){Sa(t)?H(this._layout,t):this._layout[t]=e},n.prototype.getLayout=function(t){return this._layout[t]},n.prototype.getItemLayout=function(t){return this._itemLayouts[t]},n.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?H(this._itemLayouts[t]||{},e):e},n.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},n.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;Fc(i,this.dataType,t,e),this._graphicEls[t]=e},n.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},n.prototype.eachItemGraphicEl=function(t,e){D(this._graphicEls,function(i,r){i&&t&&t.call(e,i,r)})},n.prototype.cloneShallow=function(t){return t||(t=new n(this._schema?this._schema:di(this.dimensions,this._getDimInfo,this),this.hostModel)),bp(t,this),t._store=this._store,t},n.prototype.wrapMethod=function(t,e){var i=this[t];ue(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var r=i.apply(this,arguments);return e.apply(this,[r].concat(Ka(arguments)))})},n.internalField=(C0=function(t){var e=t._invertedIndicesMap;D(e,function(i,r){var o=t._dimInfos[r],a=o.ordinalMeta,s=t._store;if(a){i=e[r]=new qT(a.categories.length);for(var l=0;l<i.length;l++)i[l]=-1;for(l=0;l<s.count();l++)i[s.get(o.storeDimIndex,l)]=l}})},ba=function(t,e,i){return sn(t._getCategory(e,i),null)},Dl=function(t,e){var i=t._idList[e];return i==null&&t._idDimIdx!=null&&(i=ba(t,t._idDimIdx,e)),i==null&&(i="e\0\0"+e),i},wa=function(t){return Y(t)||(t=t!=null?[t]:[]),t},kl=function(t){var e=new n(t._schema?t._schema:di(t.dimensions,t._getDimInfo,t),t.hostModel);return bp(e,t),e},bp=function(t,e){D(jT.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,D(KT,function(i){t[i]=ae(e[i])}),t._calculationInfo=H({},e._calculationInfo)},void(wp=function(t,e){var i=t._nameList,r=t._idList,o=t._nameDimIdx,a=t._idDimIdx,s=i[e],l=r[e];if(s==null&&o!=null&&(i[e]=s=ba(t,o,e)),l==null&&a!=null&&(r[e]=l=ba(t,a,e)),l==null&&s!=null){var u=t._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),r[e]=l}})),n}();function I0(n,t){return Mp(n,t).dimensions}function Mp(n,t){Rh(n)||(n=zv(n));var e=(t=t||{}).coordDimensions||[],i=t.dimensionsDefine||n.dimensionsDefine||[],r=re(),o=[],a=function(S,C,I,T){var A=Math.max(S.dimensionsDetectedCount||1,C.length,I.length,T||0);return D(C,function(k){var L;ne(k)&&(L=k.dimsDef)&&(A=Math.max(A,L.length))}),A}(n,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&T0(a),l=i===n.dimensionsDefine,u=l?M0(n):S0(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(n,a));for(var h=re(c),p=new Jv(a),d=0;d<p.length;d++)p[d]=-1;function f(S){var C=p[S];if(C<0){var I=i[S],T=ne(I)?I:{name:I},A=new Al,k=T.name;k!=null&&u.get(k)!=null&&(A.name=A.displayName=k),T.type!=null&&(A.type=T.type),T.displayName!=null&&(A.displayName=T.displayName);var L=o.length;return p[S]=L,A.storeDimIndex=S,o.push(A),A}return o[C]}if(!s)for(d=0;d<a;d++)f(d);h.each(function(S,C){var I=Ke(S).slice();if(I.length===1&&!Q(I[0])&&I[0]<0)h.set(C,!1);else{var T=h.set(C,[]);D(I,function(A,k){var L=Q(A)?u.get(A):A;L!=null&&L<a&&(T[k]=L,y(f(L),C,k))})}});var g=0;function y(S,C,I){fv.get(C)!=null?S.otherDims[C]=I:(S.coordDim=C,S.coordDimIndex=I,r.set(C,!0))}D(e,function(S){var C,I,T,A;if(Q(S))C=S,A={};else{C=(A=S).name;var k=A.ordinalMeta;A.ordinalMeta=null,(A=H({},A)).ordinalMeta=k,I=A.dimsDef,T=A.otherDims,A.name=A.coordDim=A.coordDimIndex=A.dimsDef=A.otherDims=null}var L=h.get(C);if(L!==!1){if(!(L=Ke(L)).length)for(var O=0;O<(I&&I.length||1);O++){for(;g<a&&f(g).coordDim!=null;)g++;g<a&&L.push(g++)}D(L,function(P,R){var N=f(P);if(l&&A.type!=null&&(N.type=A.type),y(ce(N,A),C,R),N.name==null&&I){var E=I[R];!ne(E)&&(E={name:E}),N.name=N.displayName=E.name,N.defaultTooltip=E.defaultTooltip}T&&ce(N.otherDims,T)})}});var v=t.generateCoord,m=t.generateCoordCount,_=m!=null;m=v?m||1:0;var x=v||"value";function b(S){S.name==null&&(S.name=S.coordDim)}if(s)D(o,function(S){b(S)}),o.sort(function(S,C){return S.storeDimIndex-C.storeDimIndex});else for(var w=0;w<a;w++){var M=f(w);M.coordDim==null&&(M.coordDim=JT(x,r,_),M.coordDimIndex=0,(!v||m<=0)&&(M.isExtraCoord=!0),m--),b(M),M.type!=null||vv(n,w)!==1&&(!M.isExtraCoord||M.otherDims.itemName==null&&M.otherDims.seriesName==null)||(M.type="ordinal")}return function(S){for(var C=re(),I=0;I<S.length;I++){var T=S[I],A=T.name,k=C.get(A)||0;k>0&&(T.name=A+(k-1)),k++,C.set(A,k)}}(o),new b0({source:n,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function JT(n,t,e){if(e||t.hasKey(n)){for(var i=0;t.hasKey(n+i);)i++;n+=i}return t.set(n,!0),n}var $T=function(){return function(n){this.coordSysDims=[],this.axisMap=re(),this.categoryAxisMap=re(),this.coordSysName=n}}(),QT={cartesian2d:function(n,t,e,i){var r=n.getReferringComponents("xAxis",Qe).models[0],o=n.getReferringComponents("yAxis",Qe).models[0];t.coordSysDims=["x","y"],e.set("x",r),e.set("y",o),$r(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),$r(o)&&(i.set("y",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(n,t,e,i){var r=n.getReferringComponents("singleAxis",Qe).models[0];t.coordSysDims=["single"],e.set("single",r),$r(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(n,t,e,i){var r=n.getReferringComponents("polar",Qe).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",o),e.set("angle",a),$r(o)&&(i.set("radius",o),t.firstCategoryDimIndex=0),$r(a)&&(i.set("angle",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(n,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(n,t,e,i){var r=n.ecModel,o=r.getComponent("parallel",n.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();D(o.parallelAxisIndex,function(s,l){var u=r.getComponent("parallelAxis",s),c=a[l];e.set(c,u),$r(u)&&(i.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function $r(n){return n.get("type")==="category"}function A0(n,t,e){var i,r,o,a=(e=e||{}).byIndex,s=e.stackedCoordDimension;(function(m){return!w0(m.schema)})(t)?i=t:(r=t.schema,i=r.dimensions,o=t.store);var l,u,c,h,p=!(!n||!n.get("stack"));if(D(i,function(m,_){Q(m)&&(i[_]=m={name:m}),p&&!m.isExtraCoord&&(a||l||!m.ordinalMeta||(l=m),u||m.type==="ordinal"||m.type==="time"||s&&s!==m.coordDim||(u=m))}),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+n.id,h="__\0ecstackedover_"+n.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;D(i,function(m){m.coordDim===d&&g++});var y={name:c,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:h,coordDim:h,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(y.storeDimIndex=o.ensureCalculationDimension(h,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),r.appendCalculationDimension(y),r.appendCalculationDimension(v)):(i.push(y),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function fi(n,t){return!!t&&t===n.getCalculationInfo("stackedDimension")}function D0(n,t){return fi(n,t)?n.getCalculationInfo("stackResultDimension"):t}function Ll(n,t,e){e=e||{};var i,r,o=t.getSourceManager();r=(i=o.getSource()).sourceFormat===Jt;var a=function(y){var v=y.get("coordinateSystem"),m=new $T(v),_=QT[v];if(_)return _(y,m,m.axisMap,m.categoryAxisMap),m}(t),s=function(y,v){var m,_=y.get("coordinateSystem"),x=il.get(_);return v&&v.coordSysDims&&(m=j(v.coordSysDims,function(b){var w={name:b},M=v.axisMap.get(b);if(M){var S=M.get("type");w.type=function(C){return C==="category"?"ordinal":C==="time"?"time":"float"}(S)}return w})),m||(m=x&&(x.getDimensionsInfo?x.getDimensionsInfo():x.dimensions.slice())||["x","y"]),m}(t,a),l=e.useEncodeDefaulter,u=ue(l)?l:l?Se(bM,s,t):null,c=Mp(i,{coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!r}),h=function(y,v,m){var _,x;return m&&D(y,function(b,w){var M=b.coordDim,S=m.categoryAxisMap.get(M);S&&(_==null&&(_=w),b.ordinalMeta=S.getOrdinalMeta(),v&&(b.createInvertedIndices=!0)),b.otherDims.itemName!=null&&(x=!0)}),x||_==null||(y[_].otherDims.itemName=0),_}(c.dimensions,e.createInvertedIndices,a),p=r?null:o.getSharedDataStore(c),d=A0(t,{schema:c,store:p}),f=new Sp(c,t);f.setCalculationInfo(d);var g=h!=null&&function(y){if(y.sourceFormat===Jt){var v=function(m){for(var _=0;_<m.length&&m[_]==null;)_++;return m[_]}(y.data||[]);return!Y(Oo(v))}}(i)?function(y,v,m,_){return _===h?m:this.defaultDimValueGetter(y,v,m,_)}:null;return f.hasItemOption=!1,f.initData(r?i:p,null,g),f}var On=function(){function n(t){this._setting=t||{},this._extent=[1/0,-1/0]}return n.prototype.getSetting=function(t){return this._setting[t]},n.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},n.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},n.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(t){this._isBlank=t},n}();Ss(On);var eC=0,Tp=function(){function n(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++eC}return n.createByAxisModel=function(t){var e=t.option,i=e.data,r=i&&j(i,tC);return new n({categories:r,needCollect:!r,deduplication:e.dedplication!==!1})},n.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},n.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!Q(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return(e=r.get(t))==null&&(i?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},n.prototype._getOrCreateMap=function(){return this._map||(this._map=re(this.categories))},n}();function tC(n){return ne(n)&&n.value!=null?n.value:n+""}function Cp(n){return n.type==="interval"||n.type==="log"}function Ip(n){var t=Math.pow(10,ws(n)),e=n/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,We(e*t)}function k0(n){return wn(n)+2}function L0(n,t,e){n[t]=Math.max(Math.min(n[t],e[1]),e[0])}function Pl(n,t){return n>=t[0]&&n<=t[1]}function Ol(n,t){return t[1]===t[0]?.5:(n-t[0])/(t[1]-t[0])}function Rl(n,t){return n*(t[1]-t[0])+t[0]}var Ap=function(n){function t(e){var i=n.call(this,e)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new Tp({})),Y(r)&&(r=new Tp({categories:j(r,function(o){return ne(o)?o.value:o})})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return F(t,n),t.prototype.parse=function(e){return e==null?NaN:Q(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Pl(e=this.parse(e),this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return Ol(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(Rl(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,r=i[0];r<=i[1];)e.push({value:r}),r++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e!=null){for(var i=e.ordinalNumbers,r=this._ordinalNumbersByTick=[],o=this._ticksByOrdinalNumber=[],a=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);a<l;++a){var u=i[a];r[a]=u,o[u]=a}for(var c=0;a<s;++a){for(;o[c]!=null;)c++;r.push(c),o[c]=a}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},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),r=this._ordinalMeta.categories[i];return r==null?"":r+""}},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}(On);On.registerClass(Ap);var or=We,gi=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return F(t,n),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Pl(e,this._extent)},t.prototype.normalize=function(e){return Ol(e,this._extent)},t.prototype.scale=function(e){return Rl(e,this._extent)},t.prototype.setExtent=function(e,i){var r=this._extent;isNaN(e)||(r[0]=parseFloat(e)),isNaN(i)||(r[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=k0(e)},t.prototype.getTicks=function(e){var i=this._interval,r=this._extent,o=this._niceExtent,a=this._intervalPrecision,s=[];if(!i)return s;r[0]<o[0]&&(e?s.push({value:or(o[0]-i,a)}):s.push({value:r[0]}));for(var l=o[0];l<=o[1]&&(s.push({value:l}),(l=or(l+i,a))!==s[s.length-1].value);)if(s.length>1e4)return[];var u=s.length?s[s.length-1].value:o[1];return r[1]>u&&(e?s.push({value:or(u+i,a)}):s.push({value:r[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),r=[],o=this.getExtent(),a=1;a<i.length;a++){for(var s=i[a],l=i[a-1],u=0,c=[],h=(s.value-l.value)/e;u<e-1;){var p=or(l.value+(u+1)*h);p>o[0]&&p<o[1]&&c.push(p),u++}r.push(c)}return r},t.prototype.getLabel=function(e,i){if(e==null)return"";var r=i&&i.precision;return r==null?r=wn(e.value)||0:r==="auto"&&(r=this._intervalPrecision),xh(or(e.value,r,!0))},t.prototype.calcNiceTicks=function(e,i,r){e=e||5;var o=this._extent,a=o[1]-o[0];if(isFinite(a)){a<0&&(a=-a,o.reverse());var s=function(l,u,c,h){var p={},d=l[1]-l[0],f=p.interval=mc(d/u,!0);c!=null&&f<c&&(f=p.interval=c),h!=null&&f>h&&(f=p.interval=h);var g=p.intervalPrecision=k0(f);return function(y,v){!isFinite(y[0])&&(y[0]=v[0]),!isFinite(y[1])&&(y[1]=v[1]),L0(y,0,v),L0(y,1,v),y[0]>y[1]&&(y[0]=y[1])}(p.niceTickExtent=[We(Math.ceil(l[0]/f)*f,g),We(Math.floor(l[1]/f)*f,g)],l),p}(o,e,i,r);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 r=Math.abs(i[0]);e.fixMax||(i[1]+=r/2),i[0]-=r/2}else i[1]=1;var o=i[1]-i[0];isFinite(o)||(i[0]=0,i[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var a=this._interval;e.fixMin||(i[0]=or(Math.floor(i[0]/a)*a)),e.fixMax||(i[1]=or(Math.ceil(i[1]/a)*a))},t.prototype.setNiceExtent=function(e,i){this._niceExtent=[e,i]},t.type="interval",t}(On);On.registerClass(gi);var P0=typeof Float32Array<"u",nC=P0?Float32Array:Array;function Kn(n){return Y(n)?P0?new Float32Array(n):n:new nC(n)}function O0(n){return n.get("stack")||"__ec_stack_"+n.seriesIndex}function Dp(n){return n.dim+n.index}function R0(n,t){var e=[];return t.eachSeriesByType(n,function(i){B0(i)&&e.push(i)}),e}function N0(n){var t=function(i){var r={};D(i,function(h){var p=h.coordinateSystem.getBaseAxis();if(p.type==="time"||p.type==="value")for(var d=h.getData(),f=p.dim+"_"+p.index,g=d.getDimensionIndex(d.mapDimension(p.dim)),y=d.getStore(),v=0,m=y.count();v<m;++v){var _=y.get(g,v);r[f]?r[f].push(_):r[f]=[_]}});var o={};for(var a in r)if(r.hasOwnProperty(a)){var s=r[a];if(s){s.sort(function(h,p){return h-p});for(var l=null,u=1;u<s.length;++u){var c=s[u]-s[u-1];c>0&&(l=l===null?c:Math.min(l,c))}o[a]=l}}return o}(n),e=[];return D(n,function(i){var r,o=i.coordinateSystem.getBaseAxis(),a=o.getExtent();if(o.type==="category")r=o.getBandWidth();else if(o.type==="value"||o.type==="time"){var s=o.dim+"_"+o.index,l=t[s],u=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),h=Math.abs(c[1]-c[0]);r=l?u/h*l:u}else{var p=i.getData();r=Math.abs(a[1]-a[0])/p.count()}var d=ee(i.get("barWidth"),r),f=ee(i.get("barMaxWidth"),r),g=ee(i.get("barMinWidth")||(V0(i)?.5:1),r),y=i.get("barGap"),v=i.get("barCategoryGap");e.push({bandWidth:r,barWidth:d,barMaxWidth:f,barMinWidth:g,barGap:y,barCategoryGap:v,axisKey:Dp(o),stackId:O0(i)})}),function(i){var r={};D(i,function(a,s){var l=a.axisKey,u=a.bandWidth,c=r[l]||{bandWidth:u,remainedWidth:u,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},h=c.stacks;r[l]=c;var p=a.stackId;h[p]||c.autoWidthCount++,h[p]=h[p]||{width:0,maxWidth:0};var d=a.barWidth;d&&!h[p].width&&(h[p].width=d,d=Math.min(c.remainedWidth,d),c.remainedWidth-=d);var f=a.barMaxWidth;f&&(h[p].maxWidth=f);var g=a.barMinWidth;g&&(h[p].minWidth=g);var y=a.barGap;y!=null&&(c.gap=y);var v=a.barCategoryGap;v!=null&&(c.categoryGap=v)});var o={};return D(r,function(a,s){o[s]={};var l=a.stacks,u=a.bandWidth,c=a.categoryGap;if(c==null){var h=Oe(l).length;c=Math.max(35-4*h,15)+"%"}var p=ee(c,u),d=ee(a.gap,1),f=a.remainedWidth,g=a.autoWidthCount,y=(f-p)/(g+(g-1)*d);y=Math.max(y,0),D(l,function(x){var b=x.maxWidth,w=x.minWidth;if(x.width)M=x.width,b&&(M=Math.min(M,b)),w&&(M=Math.max(M,w)),x.width=M,f-=M+d*M,g--;else{var M=y;b&&b<M&&(M=Math.min(b,f)),w&&w>M&&(M=w),M!==y&&(x.width=M,f-=M+d*M,g--)}}),y=(f-p)/(g+(g-1)*d),y=Math.max(y,0);var v,m=0;D(l,function(x,b){x.width||(x.width=y),v=x,m+=x.width*(1+d)}),v&&(m-=v.width*d);var _=-m/2;D(l,function(x,b){o[s][b]=o[s][b]||{bandWidth:u,offset:_,width:x.width},_+=x.width*(1+d)})}),o}(e)}function E0(n,t){var e=R0(n,t),i=N0(e);D(e,function(r){var o=r.getData(),a=r.coordinateSystem.getBaseAxis(),s=O0(r),l=i[Dp(a)][s],u=l.offset,c=l.width;o.setLayout({bandWidth:l.bandWidth,offset:u,size:c})})}function z0(n){return{seriesType:n,plan:Uh(),reset:function(t){if(B0(t)){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),o=i.getOtherAxis(r),a=e.getDimensionIndex(e.mapDimension(o.dim)),s=e.getDimensionIndex(e.mapDimension(r.dim)),l=t.get("showBackground",!0),u=e.mapDimension(o.dim),c=e.getCalculationInfo("stackResultDimension"),h=fi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),p=o.isHorizontal(),d=function(_,x){var b=x.model.get("startValue");return b||(b=0),x.toGlobalCoord(x.dataToCoord(x.type==="log"?b>0?b:1:b))}(0,o),f=V0(t),g=t.get("barMinHeight")||0,y=c&&e.getDimensionIndex(c),v=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,x){for(var b,w=_.count,M=f&&Kn(3*w),S=f&&l&&Kn(3*w),C=f&&Kn(w),I=i.master.getRect(),T=p?I.width:I.height,A=x.getStore(),k=0;(b=_.next())!=null;){var L=A.get(h?y:a,b),O=A.get(s,b),P=d,R=void 0;h&&(R=+L-A.get(a,b));var N=void 0,E=void 0,z=void 0,B=void 0;if(p){var G=i.dataToPoint([L,O]);h&&(P=i.dataToPoint([R,O])[0]),N=P,E=G[1]+m,z=G[0]-P,B=v,Math.abs(z)<g&&(z=(z<0?-1:1)*g)}else G=i.dataToPoint([O,L]),h&&(P=i.dataToPoint([O,R])[1]),N=G[0]+m,E=P,z=v,B=G[1]-P,Math.abs(B)<g&&(B=(B<=0?-1:1)*g);f?(M[k]=N,M[k+1]=E,M[k+2]=p?z:B,S&&(S[k]=p?I.x:N,S[k+1]=p?E:I.y,S[k+2]=T),C[b]=b):x.setItemLayout(b,{x:N,y:E,width:z,height:B}),k+=3}f&&x.setLayout({largePoints:M,largeDataIndices:C,largeBackgroundPoints:S,valueAxisHorizontal:p})}}}}}}function B0(n){return n.coordinateSystem&&n.coordinateSystem.type==="cartesian2d"}function V0(n){return n.pipelineContext&&n.pipelineContext.large}var F0=function(n){function t(e){var i=n.call(this,e)||this;return i.type="time",i}return F(t,n),t.prototype.getLabel=function(e){var i=this.getSetting("useUTC");return oa(e.value,$y[function(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Fr(this._minLevelUnit))]||$y.second,i,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,i,r){var o=this.getSetting("useUTC");return function(a,s,l,u,c){var h=null;if(Q(l))h=l;else if(ue(l))h=l(a.value,s,{level:a.level});else{var p=H({},ra);if(a.level>0)for(var d=0;d<mh.length;++d)p[mh[d]]="{primary|"+p[mh[d]]+"}";var f=l?l.inherit===!1?l:ce(l,p):p,g=ev(a.value,c);if(f[g])h=f[g];else if(f.inherit){for(d=Qy.indexOf(g)-1;d>=0;--d)if(f[g]){h=f[g];break}h=h||p.none}if(Y(h)){var y=a.level==null?0:a.level>=0?a.level:h.length+a.level;h=h[y=Math.min(y,h.length-1)]}}return oa(new Date(a.value),h,c,u)}(e,i,r,this.getSetting("locale"),o)},t.prototype.getTicks=function(){var e=this._interval,i=this._extent,r=[];if(!e)return r;r.push({value:i[0],level:0});var o=this.getSetting("useUTC"),a=function(s,l,u,c){var h,p=Qy,d=0;function f(P,R,N,E,z,B,G){for(var K=new Date(R),V=R,X=K[E]();V<N&&V<=c[1];)G.push({value:V}),X+=P,K[z](X),V=K.getTime();G.push({value:V,notAdd:!0})}function g(P,R,N){var E=[],z=!R.length;if(!function(W,te,oe,se){var ie=Wt(te),J=Wt(oe),$=function(Pe){return tv(ie,Pe,se)===tv(J,Pe,se)},q=function(){return $("year")},U=function(){return q()&&$("month")},le=function(){return U()&&$("day")},ve=function(){return le()&&$("hour")},Te=function(){return ve()&&$("minute")},Ce=function(){return Te()&&$("second")};switch(W){case"year":return q();case"month":return U();case"day":return le();case"hour":return ve();case"minute":return Te();case"second":return Ce();case"millisecond":return Ce()&&$("millisecond")}}(Fr(P),c[0],c[1],u)){z&&(R=[{value:sC(new Date(c[0]),P,u)},{value:c[1]}]);for(var B=0;B<R.length-1;B++){var G=R[B].value,K=R[B+1].value;if(G!==K){var V=void 0,X=void 0,Z=void 0;switch(P){case"year":V=Math.max(1,Math.round(l/ia/365)),X=_h(u),Z=vM(u);break;case"half-year":case"quarter":case"month":V=rC(l),X=Gr(u),Z=nv(u);break;case"week":case"half-week":case"day":V=iC(l),X=js(u),Z=iv(u);break;case"half-day":case"quarter-day":case"hour":V=oC(l),X=aa(u),Z=rv(u);break;case"minute":V=G0(l,!0),X=Ks(u),Z=ov(u);break;case"second":V=G0(l,!1),X=Js(u),Z=av(u);break;case"millisecond":V=aC(l),X=$s(u),Z=sv(u)}f(V,G,K,X,Z,0,E),P==="year"&&N.length>1&&B===0&&N.unshift({value:N[0].value-V})}}for(B=0;B<E.length;B++)N.push(E[B]);return E}}for(var y=[],v=[],m=0,_=0,x=0;x<p.length&&d++<1e4;++x){var b=Fr(p[x]);if((h=p[x])===Fr(h)&&(g(p[x],y[y.length-1]||[],v),b!==(p[x+1]?Fr(p[x+1]):null))){if(v.length){_=m,v.sort(function(P,R){return P.value-R.value});for(var w=[],M=0;M<v.length;++M){var S=v[M].value;M!==0&&v[M-1].value===S||(w.push(v[M]),S>=c[0]&&S<=c[1]&&m++)}var C=(c[1]-c[0])/l;if(m>1.5*C&&_>C/1.5||(y.push(w),m>C||s===p[x]))break}v=[]}}var I=He(j(y,function(P){return He(P,function(R){return R.value>=c[0]&&R.value<=c[1]&&!R.notAdd})}),function(P){return P.length>0}),T=[],A=I.length-1;for(x=0;x<I.length;++x)for(var k=I[x],L=0;L<k.length;++L)T.push({value:k[L].value,level:A-x});T.sort(function(P,R){return P.value-R.value});var O=[];for(x=0;x<T.length;++x)x!==0&&T[x].value===T[x-1].value||O.push(T[x]);return O}(this._minLevelUnit,this._approxInterval,o,i);return(r=r.concat(a)).push({value:i[1],level:0}),r},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1]&&(i[0]-=ia,i[1]+=ia),i[1]===-1/0&&i[0]===1/0){var r=new Date;i[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),i[0]=i[1]-ia}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,i,r){e=e||10;var o=this._extent,a=o[1]-o[0];this._approxInterval=a/e,i!=null&&this._approxInterval<i&&(this._approxInterval=i),r!=null&&this._approxInterval>r&&(this._approxInterval=r);var s=Nl.length,l=Math.min(function(u,c,h,p){for(;h<p;){var d=h+p>>>1;u[d][1]<c?h=d+1:p=d}return h}(Nl,this._approxInterval,0,s),s-1);this._interval=Nl[l][1],this._minLevelUnit=Nl[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return Ae(e)?e:+Wt(e)},t.prototype.contain=function(e){return Pl(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Ol(this.parse(e),this._extent)},t.prototype.scale=function(e){return Rl(e,this._extent)},t.type="time",t}(gi),Nl=[["second",1e3],["minute",6e4],["hour",Ky],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",Jy/2],["year",Jy]];function iC(n,t){return(n/=ia)>16?16:n>7.5?7:n>3.5?4:n>1.5?2:1}function rC(n){return(n/=2592e6)>6?6:n>3?3:n>2?2:1}function oC(n){return(n/=Ky)>12?12:n>6?6:n>3.5?4:n>2?2:1}function G0(n,t){return(n/=t?6e4:1e3)>30?30:n>20?20:n>15?15:n>10?10:n>5?5:n>2?2:1}function aC(n){return mc(n,!0)}function sC(n,t,e){var i=new Date(n);switch(Fr(t)){case"year":case"month":i[nv(e)](0);case"day":i[iv(e)](1);case"hour":i[rv(e)](0);case"minute":i[ov(e)](0);case"second":i[av(e)](0),i[sv(e)](0)}return i.getTime()}On.registerClass(F0);var H0=On.prototype,Ma=gi.prototype,lC=We,uC=Math.floor,cC=Math.ceil,El=Math.pow,gn=Math.log,kp=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new gi,e._interval=0,e}return F(t,n),t.prototype.getTicks=function(e){var i=this._originalScale,r=this._extent,o=i.getExtent();return j(Ma.getTicks.call(this,e),function(a){var s=a.value,l=We(El(this.base,s));return l=s===r[0]&&this._fixMin?zl(l,o[0]):l,{value:l=s===r[1]&&this._fixMax?zl(l,o[1]):l}},this)},t.prototype.setExtent=function(e,i){var r=gn(this.base);e=gn(Math.max(0,e))/r,i=gn(Math.max(0,i))/r,Ma.setExtent.call(this,e,i)},t.prototype.getExtent=function(){var e=this.base,i=H0.getExtent.call(this);i[0]=El(e,i[0]),i[1]=El(e,i[1]);var r=this._originalScale.getExtent();return this._fixMin&&(i[0]=zl(i[0],r[0])),this._fixMax&&(i[1]=zl(i[1],r[1])),i},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var i=this.base;e[0]=gn(e[0])/gn(i),e[1]=gn(e[1])/gn(i),H0.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,r=i[1]-i[0];if(!(r===1/0||r<=0)){var o=gg(r);for(e/r*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var a=[We(cC(i[0]/o)*o),We(uC(i[1]/o)*o)];this._interval=o,this._niceExtent=a}},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 Pl(e=gn(e)/gn(this.base),this._extent)},t.prototype.normalize=function(e){return Ol(e=gn(e)/gn(this.base),this._extent)},t.prototype.scale=function(e){return e=Rl(e,this._extent),El(this.base,e)},t.type="log",t}(On),W0=kp.prototype;function zl(n,t){return lC(n,wn(t))}W0.getMinorTicks=Ma.getMinorTicks,W0.getLabel=Ma.getLabel,On.registerClass(kp);var hC=function(){function n(t,e,i){this._prepareParams(t,e,i)}return n.prototype._prepareParams=function(t,e,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var r=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var o=e.get("min",!0);o==null&&(o=e.get("startValue",!0));var a=this._modelMinRaw=o;ue(a)?this._modelMinNum=Bl(t,a({min:i[0],max:i[1]})):a!=="dataMin"&&(this._modelMinNum=Bl(t,a));var s=this._modelMaxRaw=e.get("max",!0);if(ue(s)?this._modelMaxNum=Bl(t,s({min:i[0],max:i[1]})):s!=="dataMax"&&(this._modelMaxNum=Bl(t,s)),r)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=Y(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[bn(u[0],1),bn(u[1],1)]}},n.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,i=this._dataMax,r=this._axisDataLen,o=this._boundaryGapInner,a=t?null:i-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=t?r?0:NaN:e-o[0]*a),l==null&&(l=t?r?r-1:NaN:i+o[1]*a),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=po(s)||po(l)||t&&!r;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var p=this._determinedMin,d=this._determinedMax;return p!=null&&(s=p,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},n.prototype.modifyDataMinMax=function(t,e){this[dC[t]]=e},n.prototype.setDeterminedMinMax=function(t,e){this[pC[t]]=e},n.prototype.freeze=function(){this.frozen=!0},n}(),pC={min:"_determinedMin",max:"_determinedMax"},dC={min:"_dataMin",max:"_dataMax"};function X0(n,t,e){var i=n.rawExtentInfo;return i||(i=new hC(n,t,e),n.rawExtentInfo=i,i)}function Bl(n,t){return t==null?null:po(t)?NaN:n.parse(t)}function U0(n,t){var e=n.type,i=X0(n,t,n.getExtent()).calculate();n.setBlank(i.isBlank);var r=i.min,o=i.max,a=t.ecModel;if(a&&e==="time"){var s=R0("bar",a),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=N0(s),c=function(h,p,d,f){var g=d.axis.getExtent(),y=g[1]-g[0],v=function(M,S){if(M&&S){var C=M[Dp(S)];return C}}(f,d.axis);if(v===void 0)return{min:h,max:p};var m=1/0;D(v,function(M){m=Math.min(M.offset,m)});var _=-1/0;D(v,function(M){_=Math.max(M.offset+M.width,_)}),m=Math.abs(m),_=Math.abs(_);var x=m+_,b=p-h,w=b/(1-(m+_)/y)-b;return{min:h-=w*(m/x),max:p+=w*(_/x)}}(r,o,t,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function Qr(n,t){var e=t,i=U0(n,e),r=i.extent,o=e.get("splitNumber");n instanceof kp&&(n.base=e.get("logBase"));var a=n.type,s=e.get("interval"),l=a==="interval"||a==="time";n.setExtent(r[0],r[1]),n.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&n.setInterval&&n.setInterval(s)}function Vl(n,t){if(t=t||n.get("type"))switch(t){case"category":return new Ap({ordinalMeta:n.getOrdinalMeta?n.getOrdinalMeta():n.getCategories(),extent:[1/0,-1/0]});case"time":return new F0({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new(On.getClass(t)||gi)}}function eo(n){var t,e,i=n.getLabelModel().get("formatter"),r=n.type==="category"?n.scale.getExtent()[0]:null;return n.scale.type==="time"?(e=i,function(o,a){return n.scale.getFormattedLabel(o,a,e)}):Q(i)?function(o){return function(a){var s=n.scale.getLabel(a);return o.replace("{value}",s??"")}}(i):ue(i)?(t=i,function(o,a){return r!=null&&(a=o.value-r),t(Lp(n,o),a,o.level!=null?{level:o.level}:null)}):function(o){return n.scale.getLabel(o)}}function Lp(n,t){return n.type==="category"?n.scale.getLabel(t):t.value}function fC(n,t){var e=t*Math.PI/180,i=n.width,r=n.height,o=i*Math.abs(Math.cos(e))+Math.abs(r*Math.sin(e)),a=i*Math.abs(Math.sin(e))+Math.abs(r*Math.cos(e));return new me(n.x,n.y,o,a)}function Pp(n){return n.get("interval")??"auto"}function Y0(n){return n.type==="category"&&Pp(n.getLabelModel())===0}function Fl(n,t){var e={};return D(n.mapDimensionsAll(t),function(i){e[D0(n,i)]=!0}),Oe(e)}var Ta=function(){function n(){}return n.prototype.getNeedCrossZero=function(){return!this.option.scale},n.prototype.getCoordSysModel=function(){},n}(),gC={isDimensionStacked:fi,enableDataStack:A0,getStackedDimension:D0};function Z0(n,t){return nt(n,null,null,(t=t||{}).state!=="normal")}const yC=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:I0,createList:function(n){return Ll(0,n)},createScale:function(n,t){var e=t;t instanceof Le||(e=new Le(t));var i=Vl(e);return i.setExtent(n[0],n[1]),Qr(i,e),i},createSymbol:_t,createTextStyle:Z0,dataStack:gC,enableHoverEmphasis:Wo,getECData:ye,getLayoutRect:It,mixinAxisModelCommonMethods:function(n){at(n,Ta)}},Symbol.toStringTag,{value:"Module"}));var q0=[],vC={registerPreprocessor:gp,registerProcessor:yp,registerPostInit:d0,registerPostUpdate:f0,registerUpdateLifecycle:Il,registerAction:fn,registerCoordinateSystem:g0,registerLayout:y0,registerVisual:pi,registerTransform:_0,registerLoading:mp,registerMap:m0,registerImpl:function(n,t){Km[n]=t},PRIORITY:$m,ComponentModel:be,ComponentView:Xe,SeriesModel:it,ChartView:Je,registerComponentModel:function(n){be.registerClass(n)},registerComponentView:function(n){Xe.registerClass(n)},registerSeriesModel:function(n){it.registerClass(n)},registerChartView:function(n){Je.registerClass(n)},registerSubTypeDefaulter:function(n,t){be.registerSubTypeDefaulter(n,t)},registerPainter:function(n,t){hg(n,t)}};function Lt(n){Y(n)?D(n,function(t){Lt(t)}):we(q0,n)>=0||(q0.push(n),ue(n)&&(n={install:n}),n.install(vC))}function j0(n,t){return Math.abs(n-t)<1e-8}function K0(n,t,e){var i=0,r=n[0];if(!r)return!1;for(var o=1;o<n.length;o++){var a=n[o];i+=Un(r[0],r[1],a[0],a[1],t,e),r=a}var s=n[0];return j0(r[0],s[0])&&j0(r[1],s[1])||(i+=Un(r[0],r[1],s[0],s[1],t,e)),i!==0}var mC=[];function Op(n,t){for(var e=0;e<n.length;e++)tt(n[e],n[e],t)}function J0(n,t,e,i){for(var r=0;r<n.length;r++){var o=n[r];i&&(o=i.project(o)),o&&isFinite(o[0])&&isFinite(o[1])&&(Fn(t,t,o),Gn(e,e,o))}}var $0=function(){function n(t){this.name=t}return n.prototype.setCenter=function(t){this._center=t},n.prototype.getCenter=function(){var t=this._center;return t||(t=this._center=this.calcCenter()),t},n}(),Q0=function(n,t){this.type="polygon",this.exterior=n,this.interiors=t},e_=function(n){this.type="linestring",this.points=n},t_=function(n){function t(e,i,r){var o=n.call(this,e)||this;return o.type="geoJSON",o.geometries=i,o._center=r&&[r[0],r[1]],o}return F(t,n),t.prototype.calcCenter=function(){for(var e,i=this.geometries,r=0,o=0;o<i.length;o++){var a=i[o],s=a.exterior,l=s&&s.length;l>r&&(e=a,r=l)}if(e)return function(c){for(var h=0,p=0,d=0,f=c.length,g=c[f-1][0],y=c[f-1][1],v=0;v<f;v++){var m=c[v][0],_=c[v][1],x=g*_-m*y;h+=x,p+=(g+m)*x,d+=(y+_)*x,g=m,y=_}return h?[p/h/3,d/h/3,h]:[c[0][0]||0,c[0][1]||0]}(e.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var i=this._rect;if(i&&!e)return i;var r=[1/0,1/0],o=[-1/0,-1/0];return D(this.geometries,function(a){a.type==="polygon"?J0(a.exterior,r,o,e):D(a.points,function(s){J0(s,r,o,e)})}),isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])||(r[0]=r[1]=o[0]=o[1]=0),i=new me(r[0],r[1],o[0]-r[0],o[1]-r[1]),e||(this._rect=i),i},t.prototype.contain=function(e){var i=this.getBoundingRect(),r=this.geometries;if(!i.contain(e[0],e[1]))return!1;e:for(var o=0,a=r.length;o<a;o++){var s=r[o];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(K0(l,e[0],e[1])){for(var c=0;c<(u?u.length:0);c++)if(K0(u[c],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,i,r,o){var a=this.getBoundingRect(),s=a.width/a.height;r?o||(o=r/s):r=s*o;for(var l=new me(e,i,r,o),u=a.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var p=c[h];p.type==="polygon"?(Op(p.exterior,u),D(p.interiors,function(d){Op(d,u)})):D(p.points,function(d){Op(d,u)})}(a=this._rect).copy(l),this._center=[a.x+a.width/2,a.y+a.height/2]},t.prototype.cloneShallow=function(e){e==null&&(e=this.name);var i=new t(e,this.geometries,this._center);return i._rect=this._rect,i.transformTo=null,i},t}($0),_C=function(n){function t(e,i){var r=n.call(this,e)||this;return r.type="geoSVG",r._elOnlyForCalculate=i,r}return F(t,n),t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,i=e.getBoundingRect(),r=[i.x+i.width/2,i.y+i.height/2],o=yo(mC),a=e;a&&!a.isGeoSVGGraphicRoot;)_n(o,a.getLocalTransform(),o),a=a.parent;return Ai(o,o),tt(r,r,o),r},t}($0);function n_(n,t,e){for(var i=0;i<n.length;i++)n[i]=i_(n[i],t[i],e)}function i_(n,t,e){for(var i=[],r=t[0],o=t[1],a=0;a<n.length;a+=2){var s=n.charCodeAt(a)-64,l=n.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/e,l/e])}return i}function r_(n,t){return j(He((n=function(e){if(!e.UTF8Encoding)return e;var i=e,r=i.UTF8Scale;return r==null&&(r=1024),D(i.features,function(o){var a=o.geometry,s=a.encodeOffsets,l=a.coordinates;if(s)switch(a.type){case"LineString":a.coordinates=i_(l,s,r);break;case"Polygon":case"MultiLineString":n_(l,s,r);break;case"MultiPolygon":D(l,function(u,c){return n_(u,s[c],r)})}}),i.UTF8Encoding=!1,i}(n)).features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,r=e.geometry,o=[];switch(r.type){case"Polygon":var a=r.coordinates;o.push(new Q0(a[0],a.slice(1)));break;case"MultiPolygon":D(r.coordinates,function(l){l[0]&&o.push(new Q0(l[0],l.slice(1)))});break;case"LineString":o.push(new e_([r.coordinates]));break;case"MultiLineString":o.push(new e_(r.coordinates))}var s=new t_(i[t||"name"],o,i.cp);return s.properties=i,s})}const xC=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:9007199254740991,asc:Do,getPercentWithPrecision:function(n,t,e){return n[t]&&fg(n,e)[t]||0},getPixelPrecision:yc,getPrecision:wn,getPrecisionSafe:dg,isNumeric:xc,isRadianAroundZero:ko,linearMap:Fe,nice:mc,numericToNumber:Lo,parseDate:Wt,quantile:function(n,t){var e=(n.length-1)*t+1,i=Math.floor(e),r=+n[i-1],o=e-i;return o?r+o*(n[i]-r):r},quantity:gg,quantityExponent:ws,reformIntervals:_c,remRadian:vc,round:We},Symbol.toStringTag,{value:"Module"})),bC=Object.freeze(Object.defineProperty({__proto__:null,format:oa,parse:Wt},Symbol.toStringTag,{value:"Module"})),wC=Object.freeze(Object.defineProperty({__proto__:null,Arc:qo,BezierCurve:Es,BoundingRect:me,Circle:In,CompoundPath:th,Ellipse:Uo,Group:_e,Image:Tt,IncrementalDisplayable:Ay,Line:ut,LinearGradient:jo,Polygon:cn,Polyline:qt,RadialGradient:nh,Rect:ke,Ring:Rr,Sector:Nt,Text:Me,clipPointsByRect:lh,clipRectByRect:Ny,createIcon:Qo,extendPath:Ly,extendShape:ky,getShapeClass:Py,getTransform:$i,initProps:Ye,makeImage:oh,makePath:Hs,mergePath:Kt,registerShape:jt,resizePath:ah,updateProps:ze},Symbol.toStringTag,{value:"Module"})),SC=Object.freeze(Object.defineProperty({__proto__:null,addCommas:xh,capitalFirst:cv,encodeHTML:wt,formatTime:function(n,t,e){n!=="week"&&n!=="month"&&n!=="quarter"&&n!=="half-year"&&n!=="year"||(n=`MM-dd
  12. yyyy`);var i=Wt(t),r=e?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),c=i[r+"Seconds"](),h=i[r+"Milliseconds"]();return n.replace("MM",vt(a,2)).replace("M",a).replace("yyyy",o).replace("yy",vt(o%100+"",2)).replace("dd",vt(s,2)).replace("d",s).replace("hh",vt(l,2)).replace("h",l).replace("mm",vt(u,2)).replace("m",u).replace("ss",vt(c,2)).replace("s",c).replace("SSS",vt(h,3))},formatTpl:Mh,getTextRect:function(n,t,e,i,r,o,a,s){return new Me({style:{text:n,font:t,align:e,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:uv,normalizeCssArray:Hr,toCamelCase:bh,truncateText:kg},Symbol.toStringTag,{value:"Module"})),MC=Object.freeze(Object.defineProperty({__proto__:null,bind:he,clone:ae,curry:Se,defaults:ce,each:D,extend:H,filter:He,indexOf:we,inherits:Su,isArray:Y,isFunction:ue,isObject:ne,isString:Q,map:j,merge:de,reduce:nn},Symbol.toStringTag,{value:"Module"}));var Ca=Ee();function o_(n,t){var e=j(t,function(i){return n.scale.parse(i)});return n.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function a_(n,t){var e,i,r=s_(n,"labels"),o=Pp(t);return l_(r,o)||(ue(o)?e=h_(n,o):(i=o==="auto"?function(a){var s=Ca(a).autoInterval;return s??(Ca(a).autoInterval=a.calculateCategoryInterval())}(n):o,e=c_(n,i)),u_(r,o,{labels:e,labelCategoryInterval:i}))}function s_(n,t){return Ca(n)[t]||(Ca(n)[t]=[])}function l_(n,t){for(var e=0;e<n.length;e++)if(n[e].key===t)return n[e].value}function u_(n,t,e){return n.push({key:t,value:e}),e}function c_(n,t,e){var i=eo(n),r=n.scale,o=r.getExtent(),a=n.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=r.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Y0(n),p=a.get("showMinLabel")||h,d=a.get("showMaxLabel")||h;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(y){var v={value:y};s.push(e?y:{formattedLabel:i(v),rawLabel:r.getLabel(v),tickValue:y})}return d&&f-l!==o[1]&&g(o[1]),s}function h_(n,t,e){var i=n.scale,r=eo(n),o=[];return D(i.getTicks(),function(a){var s=i.getLabel(a),l=a.value;t(a.value,s)&&o.push(e?l:{formattedLabel:r(a),rawLabel:s,tickValue:l})}),o}var p_=[0,1],Rn=function(){function n(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return n.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]);return t>=i&&t<=r},n.prototype.containData=function(t){return this.scale.contain(t)},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.getPixelPrecision=function(t){return yc(t||this.scale.getExtent(),this._extent)},n.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},n.prototype.dataToCoord=function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&r.type==="ordinal"&&d_(i=i.slice(),r.count()),Fe(t,p_,i,e)},n.prototype.coordToData=function(t,e){var i=this._extent,r=this.scale;this.onBand&&r.type==="ordinal"&&d_(i=i.slice(),r.count());var o=Fe(t,i,p_,e);return this.scale.scale(o)},n.prototype.pointToData=function(t,e){},n.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=j(function(r,o){var a=r.getTickModel().get("customValues");return a?{ticks:o_(r,a)}:r.type==="category"?function(s,l){var u,c,h=s_(s,"ticks"),p=Pp(l),d=l_(h,p);if(d)return d;if(l.get("show")&&!s.scale.isBlank()||(u=[]),ue(p))u=h_(s,p,!0);else if(p==="auto"){var f=a_(s,s.getLabelModel());c=f.labelCategoryInterval,u=j(f.labels,function(g){return g.tickValue})}else u=c_(s,c=p,!0);return u_(h,p,{ticks:u,tickCategoryInterval:c})}(r,o):{ticks:j(r.scale.getTicks(),function(s){return s.value})}}(this,e).ticks,function(r){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(r):r),tickValue:r}},this);return function(r,o,a,s){var l=o.length;if(r.onBand&&!a&&l){var u,c,h=r.getExtent();if(l===1)o[0].coord=h[0],u=o[1]={coord:h[1]};else{var p=o[l-1].tickValue-o[0].tickValue,d=(o[l-1].coord-o[0].coord)/p;D(o,function(y){y.coord-=d/2}),c=1+r.scale.getExtent()[1]-o[l-1].tickValue,u={coord:o[l-1].coord+d*c},o.push(u)}var f=h[0]>h[1];g(o[0].coord,h[0])&&(s?o[0].coord=h[0]:o.shift()),s&&g(h[0],o[0].coord)&&o.unshift({coord:h[0]}),g(h[1],u.coord)&&(s?u.coord=h[1]:o.pop()),s&&g(u.coord,h[1])&&o.push({coord:h[1]})}function g(y,v){return y=We(y),v=We(v),f?y>v:y<v}}(this,i,e.get("alignWithLabel"),t.clamp),i},n.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick").get("splitNumber");return t>0&&t<100||(t=5),j(this.scale.getMinorTicks(t),function(e){return j(e,function(i){return{coord:this.dataToCoord(i),tickValue:i}},this)},this)},n.prototype.getViewLabels=function(){return function(t){var e=t.getLabelModel().get("customValues");if(e){var i=eo(t);return{labels:o_(t,e).map(function(r){var o={value:r};return{formattedLabel:i(o),rawLabel:t.scale.getLabel(o),tickValue:r}})}}return t.type==="category"?function(r){var o=r.getLabelModel(),a=a_(r,o);return!o.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:a.labelCategoryInterval}:a}(t):function(r){var o=r.scale.getTicks(),a=eo(r);return{labels:j(o,function(s,l){return{level:s.level,formattedLabel:a(s,l),rawLabel:r.scale.getLabel(s),tickValue:s.value}})}}(t)}(this).labels},n.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},n.prototype.getTickModel=function(){return this.model.getModel("axisTick")},n.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 r=Math.abs(t[1]-t[0]);return Math.abs(r)/i},n.prototype.calculateCategoryInterval=function(){return function(t){var e=function(C){var I=C.getLabelModel();return{axisRotate:C.getRotate?C.getRotate():C.isHorizontal&&!C.isHorizontal()?90:0,labelRotate:I.get("rotate")||0,font:I.getFont()}}(t),i=eo(t),r=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),s=o.count();if(a[1]-a[0]<1)return 0;var l=1;s>40&&(l=Math.max(1,Math.floor(s/40)));for(var u=a[0],c=t.dataToCoord(u+1)-t.dataToCoord(u),h=Math.abs(c*Math.cos(r)),p=Math.abs(c*Math.sin(r)),d=0,f=0;u<=a[1];u+=l){var g,y,v=Io(i({value:u}),e.font,"center","top");g=1.3*v.width,y=1.3*v.height,d=Math.max(d,g,7),f=Math.max(f,y,7)}var m=d/h,_=f/p;isNaN(m)&&(m=1/0),isNaN(_)&&(_=1/0);var x=Math.max(0,Math.floor(Math.min(m,_))),b=Ca(t.model),w=t.getExtent(),M=b.lastAutoInterval,S=b.lastTickCount;return M!=null&&S!=null&&Math.abs(M-x)<=1&&Math.abs(S-s)<=1&&M>x&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?x=M:(b.lastTickCount=s,b.lastAutoInterval=x,b.axisExtent0=w[0],b.axisExtent1=w[1]),x}(this)},n}();function d_(n,t){var e=(n[1]-n[0])/t/2;n[0]+=e,n[1]-=e}function TC(n){var t=be.extend(n);return be.registerClass(t),t}function CC(n){var t=Xe.extend(n);return Xe.registerClass(t),t}function IC(n){var t=it.extend(n);return it.registerClass(t),t}function AC(n){var t=Je.extend(n);return Je.registerClass(t),t}var Ia=2*Math.PI,ar=ai.CMD,DC=["top","right","bottom","left"];function kC(n,t,e,i,r){var o=e.width,a=e.height;switch(n){case"top":i.set(e.x+o/2,e.y-t),r.set(0,-1);break;case"bottom":i.set(e.x+o/2,e.y+a+t),r.set(0,1);break;case"left":i.set(e.x-t,e.y+a/2),r.set(-1,0);break;case"right":i.set(e.x+o+t,e.y+a/2),r.set(1,0)}}function LC(n,t,e,i,r,o,a,s,l){a-=n,s-=t;var u=Math.sqrt(a*a+s*s),c=(a/=u)*e+n,h=(s/=u)*e+t;if(Math.abs(i-r)%Ia<1e-4)return l[0]=c,l[1]=h,u-e;if(o){var p=i;i=Xn(r),r=Xn(p)}else i=Xn(i),r=Xn(r);i>r&&(r+=Ia);var d=Math.atan2(s,a);if(d<0&&(d+=Ia),d>=i&&d<=r||d+Ia>=i&&d+Ia<=r)return l[0]=c,l[1]=h,u-e;var f=e*Math.cos(i)+n,g=e*Math.sin(i)+t,y=e*Math.cos(r)+n,v=e*Math.sin(r)+t,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function Gl(n,t,e,i,r,o,a,s){var l=r-n,u=o-t,c=e-n,h=i-t,p=Math.sqrt(c*c+h*h),d=(l*(c/=p)+u*(h/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=n+d*c,g=a[1]=t+d*h;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function f_(n,t,e,i,r,o,a){e<0&&(n+=e,e=-e),i<0&&(t+=i,i=-i);var s=n+e,l=t+i,u=a[0]=Math.min(Math.max(r,n),s),c=a[1]=Math.min(Math.max(o,t),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var yn=[];function PC(n,t,e){var i=f_(t.x,t.y,t.width,t.height,n.x,n.y,yn);return e.set(yn[0],yn[1]),i}function OC(n,t,e){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=t.data,h=n.x,p=n.y,d=0;d<c.length;){var f=c[d++];d===1&&(s=o=c[d],l=a=c[d+1]);var g=u;switch(f){case ar.M:o=s=c[d++],a=l=c[d++];break;case ar.L:g=Gl(o,a,c[d],c[d+1],h,p,yn,!0),o=c[d++],a=c[d++];break;case ar.C:g=Wf(o,a,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,p,yn),o=c[d++],a=c[d++];break;case ar.Q:g=Yf(o,a,c[d++],c[d++],c[d],c[d+1],h,p,yn),o=c[d++],a=c[d++];break;case ar.A:var y=c[d++],v=c[d++],m=c[d++],_=c[d++],x=c[d++],b=c[d++];d+=1;var w=!!(1-c[d++]);i=Math.cos(x)*m+y,r=Math.sin(x)*_+v,d<=1&&(s=i,l=r),g=LC(y,v,_,x,x+b,w,(h-y)*_/m+y,p,yn),o=Math.cos(x+b)*m+y,a=Math.sin(x+b)*_+v;break;case ar.R:g=f_(s=o=c[d++],l=a=c[d++],c[d++],c[d++],h,p,yn);break;case ar.Z:g=Gl(o,a,s,l,h,p,yn,!0),o=s,a=l}g<u&&(u=g,e.set(yn[0],yn[1]))}return u}var vn=new ge,Re=new ge,Ue=new ge,Nn=new ge,En=new ge;function g_(n,t){if(n){var e=n.getTextGuideLine(),i=n.getTextContent();if(i&&e){var r=n.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||DC,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,c=n.getComputedTransform(),h=c&&Ai([],c),p=t.get("length2")||0;u&&Ue.copy(u);for(var d=0;d<a.length;d++){kC(a[d],0,s,vn,Nn),ge.scaleAndAdd(Re,vn,Nn,p),Re.transform(h);var f=n.getBoundingRect(),g=u?u.distance(Re):n instanceof Ie?OC(Re,n.path,Ue):PC(Re,f,Ue);g<l&&(l=g,Re.transform(c),Ue.transform(c),Ue.toArray(o[0]),Re.toArray(o[1]),vn.toArray(o[2]))}y_(o,t.get("minTurnAngle")),e.setShape({points:o})}}}var Hl=[],xt=new ge;function y_(n,t){if(t<=180&&t>0){t=t/180*Math.PI,vn.fromArray(n[0]),Re.fromArray(n[1]),Ue.fromArray(n[2]),ge.sub(Nn,vn,Re),ge.sub(En,Ue,Re);var e=Nn.len(),i=En.len();if(!(e<.001||i<.001)){Nn.scale(1/e),En.scale(1/i);var r=Nn.dot(En);if(Math.cos(t)<r){var o=Gl(Re.x,Re.y,Ue.x,Ue.y,vn.x,vn.y,Hl,!1);xt.fromArray(Hl),xt.scaleAndAdd(En,o/Math.tan(Math.PI-t));var a=Ue.x!==Re.x?(xt.x-Re.x)/(Ue.x-Re.x):(xt.y-Re.y)/(Ue.y-Re.y);if(isNaN(a))return;a<0?ge.copy(xt,Re):a>1&&ge.copy(xt,Ue),xt.toArray(n[1])}}}}function RC(n,t,e){if(e<=180&&e>0){e=e/180*Math.PI,vn.fromArray(n[0]),Re.fromArray(n[1]),Ue.fromArray(n[2]),ge.sub(Nn,Re,vn),ge.sub(En,Ue,Re);var i=Nn.len(),r=En.len();if(!(i<.001||r<.001)&&(Nn.scale(1/i),En.scale(1/r),Nn.dot(t)<Math.cos(e))){var o=Gl(Re.x,Re.y,Ue.x,Ue.y,vn.x,vn.y,Hl,!1);xt.fromArray(Hl);var a=Math.PI/2,s=a+Math.acos(En.dot(t))-e;if(s>=a)ge.copy(xt,Ue);else{xt.scaleAndAdd(En,o/Math.tan(Math.PI/2-s));var l=Ue.x!==Re.x?(xt.x-Re.x)/(Ue.x-Re.x):(xt.y-Re.y)/(Ue.y-Re.y);if(isNaN(l))return;l<0?ge.copy(xt,Re):l>1&&ge.copy(xt,Ue)}xt.toArray(n[1])}}}function Rp(n,t,e,i){var r=e==="normal",o=r?n:n.ensureState(e);o.ignore=t;var a=i.get("smooth");a&&a===!0&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?n.useStyle(s):o.style=s}function NC(n,t){var e=t.smooth,i=t.points;if(i)if(n.moveTo(i[0][0],i[0][1]),e>0&&i.length>=3){var r=Qa(i[0],i[1]),o=Qa(i[1],i[2]);if(!r||!o)return n.lineTo(i[1][0],i[1][1]),void n.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*e,s=es([],i[1],i[0],a/r),l=es([],i[1],i[2],a/o),u=es([],s,l,.5);n.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),n.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c<i.length;c++)n.lineTo(i[c][0],i[c][1])}function Np(n,t,e){var i=n.getTextGuideLine(),r=n.getTextContent();if(r){for(var o=t.normal,a=o.get("show"),s=r.ignore,l=0;l<Ds.length;l++){var u=Ds[l],c=t[u],h=u==="normal";if(c){var p=c.get("show");if((h?s:xe(r.states[u]&&r.states[u].ignore,s))||!xe(p,a)){var d=h?i:i&&i.states[u];d&&(d.ignore=!0),i&&Rp(i,!0,u,c);continue}i||(i=new qt,n.setTextGuideLine(i),h||!s&&a||Rp(i,!0,"normal",t.normal),n.stateProxy&&(i.stateProxy=n.stateProxy)),Rp(i,!1,u,c)}}if(i){ce(i.style,e),i.style.fill=null;var f=o.get("showAbove");(n.textGuideLineConfig=n.textGuideLineConfig||{}).showAbove=f||!1,i.buildPath=NC}}else i&&n.removeTextGuideLine()}function Ep(n,t){t=t||"labelLine";for(var e={normal:n.getModel(t)},i=0;i<Zt.length;i++){var r=Zt[i];e[r]=n.getModel([r,t])}return e}function v_(n){for(var t=[],e=0;e<n.length;e++){var i=n[e];if(!i.defaultAttr.ignore){var r=i.label,o=r.getComputedTransform(),a=r.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=r.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new Vs(a,o):null;t.push({label:r,labelLine:i.labelLine,rect:u,localRect:a,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:o})}}return t}function m_(n,t,e,i,r,o){var a=n.length;if(!(a<2)){n.sort(function(M,S){return M.rect[t]-S.rect[t]});for(var s,l=0,u=!1,c=0,h=0;h<a;h++){var p=n[h],d=p.rect;(s=d[t]-l)<0&&(d[t]-=s,p.label[t]-=s,u=!0),c+=Math.max(-s,0),l=d[t]+d[e]}c>0&&o&&x(-c/a,0,a);var f,g,y=n[0],v=n[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[t]-i,g=r-v.rect[t]-v.rect[e]}function _(M,S,C){if(M<0){var I=Math.min(S,-M);if(I>0){x(I*C,0,a);var T=I+M;T<0&&b(-T*C,1)}else b(-M*C,1)}}function x(M,S,C){M!==0&&(u=!0);for(var I=S;I<C;I++){var T=n[I];T.rect[t]+=M,T.label[t]+=M}}function b(M,S){for(var C=[],I=0,T=1;T<a;T++){var A=n[T-1].rect,k=Math.max(n[T].rect[t]-A[t]-A[e],0);C.push(k),I+=k}if(I){var L=Math.min(Math.abs(M)/I,S);if(M>0)for(T=0;T<a-1;T++)x(C[T]*L,0,T+1);else for(T=a-1;T>0;T--)x(-C[T-1]*L,T,a)}}function w(M){var S=M<0?-1:1;M=Math.abs(M);for(var C=Math.ceil(M/(a-1)),I=0;I<a-1;I++)if(S>0?x(C,0,I+1):x(-C,a-I-1,a),(M-=C)<=0)return}}function __(n,t,e,i){return m_(n,"y","height",t,e,i)}function x_(n){var t=[];n.sort(function(g,y){return y.priority-g.priority});var e=new me(0,0,0,0);function i(g){if(!g.ignore){var y=g.ensureState("emphasis");y.ignore==null&&(y.ignore=!1)}g.ignore=!0}for(var r=0;r<n.length;r++){var o=n[r],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;e.copy(o.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var h=o.obb,p=!1,d=0;d<t.length;d++){var f=t[d];if(e.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Vs(f.localRect,f.transform)),h||(h=new Vs(s,l)),h.intersect(f.obb)){p=!0;break}}}p?(i(u),c&&i(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}function EC(n){if(n){for(var t=[],e=0;e<n.length;e++)t.push(n[e].slice());return t}}function zC(n,t){var e=n.label,i=t&&t.getTextGuideLine();return{dataIndex:n.dataIndex,dataType:n.dataType,seriesIndex:n.seriesModel.seriesIndex,text:n.label.style.text,rect:n.hostRect,labelRect:n.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:EC(i&&i.shape.points)}}var b_=["align","verticalAlign","width","height","fontSize"],bt=new ii,zp=Ee(),BC=Ee();function Wl(n,t,e){for(var i=0;i<e.length;i++){var r=e[i];t[r]!=null&&(n[r]=t[r])}}var Xl=["x","y","rotation"],VC=function(){function n(){this._labelList=[],this._chartViewList=[]}return n.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},n.prototype._addLabel=function(t,e,i,r,o){var a=r.style,s=r.__hostTarget.textConfig||{},l=r.getComputedTransform(),u=r.getBoundingRect().plain();me.applyTransform(u,u,l),l?bt.setLocalTransform(l):(bt.x=bt.y=bt.rotation=bt.originX=bt.originY=0,bt.scaleX=bt.scaleY=1),bt.rotation=Xn(bt.rotation);var c,h=r.__hostTarget;if(h){c=h.getBoundingRect().plain();var p=h.getComputedTransform();me.applyTransform(c,c,p)}var d=c&&h.getTextGuideLine();this._labelList.push({label:r,labelLine:d,seriesModel:i,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:u,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:d&&d.ignore,x:bt.x,y:bt.y,scaleX:bt.scaleX,scaleY:bt.scaleY,rotation:bt.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:s.position,attachedRot:s.rotation}})},n.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var i=t.__model,r=i.get("labelLayout");(ue(r)||Oe(r).length)&&t.group.traverse(function(o){if(o.ignore)return!0;var a=o.getTextContent(),s=ye(o);a&&!a.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,i,a,r)})},n.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),i=t.getHeight();function r(v,m){return function(){g_(v,m)}}for(var o=0;o<this._labelList.length;o++){var a=this._labelList[o],s=a.label,l=s.__hostTarget,u=a.defaultAttr,c=void 0;c=(c=ue(a.layoutOption)?a.layoutOption(zC(a,l)):a.layoutOption)||{},a.computedLayoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var p=!1;if(c.x!=null?(s.x=ee(c.x,e),s.setStyle("x",0),p=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=ee(c.y,i),s.setStyle("y",0),p=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),p=!1)}zp(s).needsUpdateLabelLine=p,s.rotation=c.rotate!=null?c.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var f=0;f<b_.length;f++){var g=b_[f];s.setStyle(g,c[g]!=null?c[g]:u.style[g])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var y=a.seriesModel;a.dataIndex!=null&&(y=a.seriesModel.getData(a.dataType).getItemModel(a.dataIndex)),s.on("drag",r(l,y.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},n.prototype.layout=function(t){var e=t.getWidth(),i=t.getHeight(),r=v_(this._labelList),o=He(r,function(s){return s.layoutOption.moveOverlap==="shiftX"}),a=He(r,function(s){return s.layoutOption.moveOverlap==="shiftY"});m_(o,"x","width",0,e,void 0),__(a,0,i),x_(He(r,function(s){return s.layoutOption.hideOverlap}))},n.prototype.processLabelsOverall=function(){var t=this;D(this._chartViewList,function(e){var i=e.__model,r=e.ignoreLabelLineUpdate,o=i.isAnimationEnabled();e.group.traverse(function(a){if(a.ignore&&!a.forceLabelAnimation)return!0;var s=!r,l=a.getTextContent();!s&&l&&(s=zp(l).needsUpdateLabelLine),s&&t._updateLabelLine(a,i),o&&t._animateLabels(a,i)})})},n.prototype._updateLabelLine=function(t,e){var i=t.getTextContent(),r=ye(t),o=r.dataIndex;if(i&&o!=null){var a=e.getData(r.dataType),s=a.getItemModel(o),l={},u=a.getItemVisual(o,"style");if(u){var c=a.getVisual("drawType");l.stroke=u[c]}var h=s.getModel("labelLine");Np(t,Ep(s),l),g_(t,h)}},n.prototype._animateLabels=function(t,e){var i=t.getTextContent(),r=t.getTextGuideLine();if(i&&(t.forceLabelAnimation||!i.ignore&&!i.invisible&&!t.disableLabelAnimation&&!Nr(t))){var o=(f=zp(i)).oldLayout,a=ye(t),s=a.dataIndex,l={x:i.x,y:i.y,rotation:i.rotation},u=e.getData(a.dataType);if(o){i.attr(o);var c=t.prevStates;c&&(we(c,"select")>=0&&i.attr(f.oldLayoutSelect),we(c,"emphasis")>=0&&i.attr(f.oldLayoutEmphasis)),ze(i,l,e,s)}else if(i.attr(l),!Br(i).valueAnimation){var h=xe(i.style.opacity,1);i.style.opacity=0,Ye(i,{style:{opacity:h}},e,s)}if(f.oldLayout=l,i.states.select){var p=f.oldLayoutSelect={};Wl(p,l,Xl),Wl(p,i.states.select,Xl)}if(i.states.emphasis){var d=f.oldLayoutEmphasis={};Wl(d,l,Xl),Wl(d,i.states.emphasis,Xl)}Yy(i,s,u,e,e)}if(r&&!r.ignore&&!r.invisible){o=(f=BC(r)).oldLayout;var f,g={points:r.shape.points};o?(r.attr({shape:o}),ze(r,{shape:g},e)):(r.setShape(g),r.style.strokePercent=0,Ye(r,{style:{strokePercent:1}},e)),f.oldLayout=g}},n}(),Bp=Ee();function FC(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){var r=Bp(e).labelManager;r||(r=Bp(e).labelManager=new VC),r.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(t,e,i){var r=Bp(e).labelManager;i.updatedSeries.forEach(function(o){r.addLabelsOfSeries(e.getViewOfSeriesModel(o))}),r.updateLayoutConfig(e),r.layout(e),r.processLabelsOverall()})}var GC=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return F(t,n),t.prototype.getInitialData=function(e){return Ll(0,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new _e,r=_t("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(r),r.setStyle(e.lineStyle);var o=this.getData().getVisual("symbol"),a=this.getData().getVisual("symbolRotate"),s=o==="none"?"circle":o,l=.8*e.itemHeight,u=_t(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?a:e.iconRotate||0;return u.rotation=c*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}(it);function Ul(n,t){var e=n.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var r=jr(n,t,e[0]);return r!=null?r+"":null}if(i){for(var o=[],a=0;a<e.length;a++)o.push(jr(n,t,e[a]));return o.join(" ")}}function w_(n,t){var e=n.mapDimensionsAll("defaultedLabel");if(!Y(t))return t+"";for(var i=[],r=0;r<e.length;r++){var o=n.getDimensionIndex(e[r]);o>=0&&i.push(t[o])}return i.join(" ")}var Vp=function(n){function t(e,i,r,o){var a=n.call(this)||this;return a.updateData(e,i,r,o),a}return F(t,n),t.prototype._createSymbol=function(e,i,r,o,a){this.removeAll();var s=_t(e,-1,-1,2,2,null,a);s.attr({z2:100,culling:!0,scaleX:o[0]/2,scaleY:o[1]/2}),s.drift=HC,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(){kr(this.childAt(0))},t.prototype.downplay=function(){Lr(this.childAt(0))},t.prototype.setZ=function(e,i){var r=this.childAt(0);r.zlevel=e,r.z=i},t.prototype.setDraggable=function(e,i){var r=this.childAt(0);r.draggable=e,r.cursor=!i&&e?"move":r.cursor},t.prototype.updateData=function(e,i,r,o){this.silent=!1;var a=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=a!==this._symbolType,c=o&&o.disableAnimation;if(u){var h=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(a,e,i,l,h)}else{(d=this.childAt(0)).silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};c?d.attr(p):ze(d,p,s,i),Er(d)}if(this._updateCommon(e,i,l,r,o),u){var d=this.childAt(0);c||(p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,Ye(d,p,s,i))}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,r,o,a){var s,l,u,c,h,p,d,f,g,y=this.childAt(0),v=e.hostModel;if(o&&(s=o.emphasisItemStyle,l=o.blurItemStyle,u=o.selectItemStyle,c=o.focus,h=o.blurScope,d=o.labelStatesModels,f=o.hoverScale,g=o.cursorStyle,p=o.emphasisDisabled),!o||e.hasItemOption){var m=o&&o.itemModel?o.itemModel:e.getItemModel(i),_=m.getModel("emphasis");s=_.getModel("itemStyle").getItemStyle(),u=m.getModel(["select","itemStyle"]).getItemStyle(),l=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),h=_.get("blurScope"),p=_.get("disabled"),d=kn(m),f=_.getShallow("scale"),g=m.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");y.attr("rotation",(x||0)*Math.PI/180||0);var b=jh(e.getItemVisual(i,"symbolOffset"),r);b&&(y.x=b[0],y.y=b[1]),g&&y.attr("cursor",g);var w=e.getItemVisual(i,"style"),M=w.fill;if(y instanceof Tt){var S=y.style;y.useStyle(H({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},w))}else y.__isEmptyBrush?y.useStyle(H({},w)):y.useStyle(w),y.style.decal=null,y.setColor(M,a&&a.symbolInnerColor),y.style.strokeNoScale=!0;var C=e.getItemVisual(i,"liftZ"),I=this._z2;C!=null?I==null&&(this._z2=y.z2,y.z2+=C):I!=null&&(y.z2=I,this._z2=null);var T=a&&a.useNameLabel;Dn(y,d,{labelFetcher:v,labelDataIndex:i,defaultText:function(L){return T?e.getName(L):Ul(e,L)},inheritColor:M,defaultOpacity:w.opacity}),this._sizeX=r[0]/2,this._sizeY=r[1]/2;var A=y.ensureState("emphasis");A.style=s,y.ensureState("select").style=u,y.ensureState("blur").style=l;var k=f==null||f===!0?Math.max(1.1,3/this._sizeY):isFinite(f)&&f>0?+f:1;A.scaleX=this._sizeX*k,A.scaleY=this._sizeY*k,this.setSymbolScale(1),ln(this,c,h,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,r){var o=this.childAt(0),a=ye(this).dataIndex,s=r&&r.animation;if(this.silent=o.silent=!0,r&&r.fadeLabel){var l=o.getTextContent();l&&Ko(l,{style:{opacity:0}},i,{dataIndex:a,removeOpt:s,cb:function(){o.removeTextContent()}})}else o.removeTextContent();Ko(o,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:a,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return Nm(e.getItemVisual(i,"symbolSize"))},t}(_e);function HC(n,t){this.parent.drift(n,t)}function Fp(n,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]))&&n.getItemVisual(e,"symbol")!=="none"}function S_(n){return n==null||ne(n)||(n={isIgnore:n}),n||{}}function M_(n){var t=n.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:kn(t),cursorStyle:t.get("cursor")}}var WC=function(){function n(t){this.group=new _e,this._SymbolCtor=t||Vp}return n.prototype.updateData=function(t,e){this._progressiveEls=null,e=S_(e);var i=this.group,r=t.hostModel,o=this._data,a=this._SymbolCtor,s=e.disableAnimation,l=M_(t),u={disableAnimation:s},c=e.getSymbolPoint||function(h){return t.getItemLayout(h)};o||i.removeAll(),t.diff(o).add(function(h){var p=c(h);if(Fp(t,p,h,e)){var d=new a(t,h,l,u);d.setPosition(p),t.setItemGraphicEl(h,d),i.add(d)}}).update(function(h,p){var d=o.getItemGraphicEl(p),f=c(h);if(Fp(t,f,h,e)){var g=t.getItemVisual(h,"symbol")||"circle",y=d&&d.getSymbolType&&d.getSymbolType();if(!d||y&&y!==g)i.remove(d),(d=new a(t,h,l,u)).setPosition(f);else{d.updateData(t,h,l,u);var v={x:f[0],y:f[1]};s?d.attr(v):ze(d,v,r)}i.add(d),t.setItemGraphicEl(h,d)}else i.remove(d)}).remove(function(h){var p=o.getItemGraphicEl(h);p&&p.fadeOut(function(){i.remove(p)},r)}).execute(),this._getSymbolPoint=c,this._data=t},n.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,r){var o=t._getSymbolPoint(r);i.setPosition(o),i.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=M_(t),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e,i){function r(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],i=S_(i);for(var o=t.start;o<t.end;o++){var a=e.getItemLayout(o);if(Fp(e,a,o,i)){var s=new this._SymbolCtor(e,o,this._seriesScope);s.traverse(r),s.setPosition(a),this.group.add(s),e.setItemGraphicEl(o,s),this._progressiveEls.push(s)}}},n.prototype.eachRendered=function(t){Xs(this._progressiveEls||this.group,t)},n.prototype.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(r){r.fadeOut(function(){e.remove(r)},i.hostModel)}):e.removeAll()},n}();function T_(n,t,e){var i=n.getBaseAxis(),r=n.getOtherAxis(i),o=function(f,g){var y=0,v=f.scale.getExtent();return g==="start"?y=v[0]:g==="end"?y=v[1]:Ae(g)&&!isNaN(g)?y=g:v[0]>0?y=v[0]:v[1]<0&&(y=v[1]),y}(r,e),a=i.dim,s=r.dim,l=t.mapDimension(s),u=t.mapDimension(a),c=s==="x"||s==="radius"?1:0,h=j(n.dimensions,function(f){return t.mapDimension(f)}),p=!1,d=t.getCalculationInfo("stackResultDimension");return fi(t,h[0])&&(p=!0,h[0]=d),fi(t,h[1])&&(p=!0,h[1]=d),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function C_(n,t,e,i){var r=NaN;n.stacked&&(r=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=n.valueStart);var o=n.baseDataOffset,a=[];return a[o]=e.get(n.baseDim,i),a[1-o]=r,t.dataToPoint(a)}var yi=Math.min,vi=Math.max;function sr(n,t){return isNaN(n)||isNaN(t)}function Gp(n,t,e,i,r,o,a,s,l){for(var u,c,h,p,d,f,g=e,y=0;y<i;y++){var v=t[2*g],m=t[2*g+1];if(g>=r||g<0)break;if(sr(v,m)){if(l){g+=o;continue}break}if(g===e)n[o>0?"moveTo":"lineTo"](v,m),h=v,p=m;else{var _=v-u,x=m-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],M=t[2*b+1];w===v&&M===m&&y<i;)y++,g+=o,w=t[2*(b+=o)],M=t[2*b+1],_=(v=t[2*g])-u,x=(m=t[2*g+1])-c;var S=y+1;if(l)for(;sr(w,M)&&S<i;)S++,w=t[2*(b+=o)],M=t[2*b+1];var C=.5,I=0,T=0,A=void 0,k=void 0;if(S>=i||sr(w,M))d=v,f=m;else{I=w-u,T=M-c;var L=v-u,O=w-v,P=m-c,R=M-m,N=void 0,E=void 0;if(s==="x"){var z=I>0?1:-1;d=v-z*(N=Math.abs(L))*a,f=m,A=v+z*(E=Math.abs(O))*a,k=m}else if(s==="y"){var B=T>0?1:-1;d=v,f=m-B*(N=Math.abs(P))*a,A=v,k=m+B*(E=Math.abs(R))*a}else N=Math.sqrt(L*L+P*P),d=v-I*a*(1-(C=(E=Math.sqrt(O*O+R*R))/(E+N))),f=m-T*a*(1-C),k=m+T*a*C,A=yi(A=v+I*a*C,vi(w,v)),k=yi(k,vi(M,m)),A=vi(A,yi(w,v)),f=m-(T=(k=vi(k,yi(M,m)))-m)*N/E,d=yi(d=v-(I=A-v)*N/E,vi(u,v)),f=yi(f,vi(c,m)),A=v+(I=v-(d=vi(d,yi(u,v))))*E/N,k=m+(T=m-(f=vi(f,yi(c,m))))*E/N}n.bezierCurveTo(h,p,d,f,v,m),h=A,p=k}else n.lineTo(v,m)}u=v,c=m,g+=o}return y}var I_=function(){this.smooth=0,this.smoothConstraint=!0},XC=function(n){function t(e){var i=n.call(this,e)||this;return i.type="ec-polyline",i}return F(t,n),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new I_},t.prototype.buildPath=function(e,i){var r=i.points,o=0,a=r.length/2;if(i.connectNulls){for(;a>0&&sr(r[2*a-2],r[2*a-1]);a--);for(;o<a&&sr(r[2*o],r[2*o+1]);o++);}for(;o<a;)o+=Gp(e,r,o,a,a,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 r,o,a=this.path.data,s=ai.CMD,l=i==="x",u=[],c=0;c<a.length;){var h=void 0,p=void 0,d=void 0,f=void 0,g=void 0,y=void 0,v=void 0;switch(a[c++]){case s.M:r=a[c++],o=a[c++];break;case s.L:if(h=a[c++],p=a[c++],(v=l?(e-r)/(h-r):(e-o)/(p-o))<=1&&v>=0){var m=l?(p-o)*v+o:(h-r)*v+r;return l?[e,m]:[m,e]}r=h,o=p;break;case s.C:h=a[c++],p=a[c++],d=a[c++],f=a[c++],g=a[c++],y=a[c++];var _=l?ls(r,h,d,g,e,u):ls(o,p,f,y,e,u);if(_>0)for(var x=0;x<_;x++){var b=u[x];if(b<=1&&b>=0)return m=l?$e(o,p,f,y,b):$e(r,h,d,g,b),l?[e,m]:[m,e]}r=g,o=y}}},t}(Ie),UC=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t}(I_),YC=function(n){function t(e){var i=n.call(this,e)||this;return i.type="ec-polygon",i}return F(t,n),t.prototype.getDefaultShape=function(){return new UC},t.prototype.buildPath=function(e,i){var r=i.points,o=i.stackedOnPoints,a=0,s=r.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&sr(r[2*s-2],r[2*s-1]);s--);for(;a<s&&sr(r[2*a],r[2*a+1]);a++);}for(;a<s;){var u=Gp(e,r,a,s,s,1,i.smooth,l,i.connectNulls);Gp(e,o,a+u-1,u,s,-1,i.stackedOnSmooth,l,i.connectNulls),a+=u+1,e.closePath()}},t}(Ie);function A_(n,t,e,i,r){var o=n.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=e.get(["lineStyle","width"])||2;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var h=new ke({shape:{x:a,y:s,width:l,height:u}});if(t){var p=n.getBaseAxis(),d=p.isHorizontal(),f=p.inverse;d?(f&&(h.shape.x+=l),h.shape.width=0):(f||(h.shape.y+=u),h.shape.height=0);var g=ue(r)?function(y){r(y,h)}:null;Ye(h,{shape:{width:l,height:u,x:a,y:s}},e,null,i,g)}return h}function D_(n,t,e){var i=n.getArea(),r=We(i.r0,1),o=We(i.r,1),a=new Nt({shape:{cx:We(n.cx,1),cy:We(n.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(n.getBaseAxis().dim==="angle"?a.shape.endAngle=i.startAngle:a.shape.r=r,Ye(a,{shape:{endAngle:i.endAngle,r:o}},e)),a}function k_(n,t,e,i,r){return n?n.type==="polar"?D_(n,t,e):n.type==="cartesian2d"?A_(n,t,e,i,r):null:null}function Hp(n,t){return n.type===t}function L_(n,t){if(n.length===t.length){for(var e=0;e<n.length;e++)if(n[e]!==t[e])return;return!0}}function P_(n){for(var t=1/0,e=1/0,i=-1/0,r=-1/0,o=0;o<n.length;){var a=n[o++],s=n[o++];isNaN(a)||(t=Math.min(a,t),i=Math.max(a,i)),isNaN(s)||(e=Math.min(s,e),r=Math.max(s,r))}return[[t,e],[i,r]]}function O_(n,t){var e=P_(n),i=e[0],r=e[1],o=P_(t),a=o[0],s=o[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-s[0]),Math.abs(r[1]-s[1]))}function R_(n){return Ae(n)?n:n?.5:0}function mi(n,t,e,i){var r=t.getBaseAxis(),o=r.dim==="x"||r.dim==="radius"?0:1,a=[],s=0,l=[],u=[],c=[],h=[];if(i){for(s=0;s<n.length;s+=2)isNaN(n[s])||isNaN(n[s+1])||h.push(n[s],n[s+1]);n=h}for(s=0;s<n.length-2;s+=2)switch(c[0]=n[s+2],c[1]=n[s+3],u[0]=n[s],u[1]=n[s+1],a.push(u[0],u[1]),e){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var p=(u[o]+c[o])/2,d=[];l[o]=d[o]=p,l[1-o]=u[1-o],d[1-o]=c[1-o],a.push(l[0],l[1]),a.push(d[0],d[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(n[s++],n[s++]),a}function N_(n,t){return[n[2*t],n[2*t+1]]}function E_(n){if(n.get(["endLabel","show"]))return!0;for(var t=0;t<Zt.length;t++)if(n.get([Zt[t],"endLabel","show"]))return!0;return!1}function Wp(n,t,e,i){if(Hp(t,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=E_(i)?function(d,f){n._endLabelOnDuring(d,f,a,s,o,r,t)}:null,u=t.getBaseAxis().isHorizontal(),c=A_(t,e,i,function(){var d=n._endLabel;d&&e&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var h=c.shape,p=Math.max(h.width,h.height);u?(h.y-=p,h.height+=2*p):(h.x-=p,h.width+=2*p)}return l&&l(1,c),c}return D_(t,e,i)}var ZC=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.init=function(){var e=new _e,i=new WC;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=e},t.prototype.render=function(e,i,r){var o=this,a=e.coordinateSystem,s=this.group,l=e.getData(),u=e.getModel("lineStyle"),c=e.getModel("areaStyle"),h=l.getLayout("points")||[],p=a.type==="polar",d=this._coordSys,f=this._symbolDraw,g=this._polyline,y=this._polygon,v=this._lineGroup,m=!i.ssr&&e.get("animation"),_=!c.isEmpty(),x=c.get("origin"),b=T_(a,l,x),w=_&&function(V,X,Z){if(!Z.valueDim)return[];for(var W=X.count(),te=Kn(2*W),oe=0;oe<W;oe++){var se=C_(Z,V,X,oe);te[2*oe]=se[0],te[2*oe+1]=se[1]}return te}(a,l,b),M=e.get("showSymbol"),S=e.get("connectNulls"),C=M&&!p&&function(V,X,Z){var W=V.get("showAllSymbol"),te=W==="auto";if(!W||te){var oe=Z.getAxesByScale("ordinal")[0];if(oe&&(!te||!function(J,$){var q=J.getExtent(),U=Math.abs(q[1]-q[0])/J.scale.count();isNaN(U)&&(U=0);for(var le=$.count(),ve=Math.max(1,Math.round(le/5)),Te=0;Te<le;Te+=ve)if(1.5*Vp.getSymbolSize($,Te)[J.isHorizontal()?1:0]>U)return!1;return!0}(oe,X))){var se=X.mapDimension(oe.dim),ie={};return D(oe.getViewLabels(),function(J){var $=oe.scale.getRawOrdinalNumber(J.tickValue);ie[$]=1}),function(J){return!ie.hasOwnProperty(X.get(se,J))}}}}(e,l,a),I=this._data;I&&I.eachItemGraphicEl(function(V,X){V.__temp&&(s.remove(V),I.setItemGraphicEl(X,null))}),M||f.remove(),s.add(v);var T,A=!p&&e.get("step");a&&a.getArea&&e.get("clip",!0)&&((T=a.getArea()).width!=null?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var k=function(V,X,Z){var W=V.getVisual("visualMeta");if(W&&W.length&&V.count()&&X.type==="cartesian2d"){for(var te,oe,se=W.length-1;se>=0;se--){var ie=V.getDimensionInfo(W[se].dimension);if((te=ie&&ie.coordDim)==="x"||te==="y"){oe=W[se];break}}if(oe){var J=X.getAxis(te),$=j(oe.stops,function(qe){return{coord:J.toGlobalCoord(J.dataToCoord(qe.value)),color:qe.color}}),q=$.length,U=oe.outerColors.slice();q&&$[0].coord>$[q-1].coord&&($.reverse(),U.reverse());var le=function(qe,dt){var Ne,Ge,pe=[],ot=qe.length;function Ve(Qn,uo,gr){var Ua=Qn.coord;return{coord:gr,color:qu((gr-Ua)/(uo.coord-Ua),[Qn.color,uo.color])}}for(var et=0;et<ot;et++){var je=qe[et],fr=je.coord;if(fr<0)Ne=je;else{if(fr>dt){Ge?pe.push(Ve(Ge,je,dt)):Ne&&pe.push(Ve(Ne,je,0),Ve(Ne,je,dt));break}Ne&&(pe.push(Ve(Ne,je,0)),Ne=null),pe.push(je),Ge=je}}return pe}($,te==="x"?Z.getWidth():Z.getHeight()),ve=le.length;if(!ve&&q)return $[0].coord<0?U[1]?U[1]:$[q-1].color:U[0]?U[0]:$[0].color;var Te=le[0].coord-10,Ce=le[ve-1].coord+10,Pe=Ce-Te;if(Pe<.001)return"transparent";D(le,function(qe){qe.offset=(qe.coord-Te)/Pe}),le.push({offset:ve?le[ve-1].offset:.5,color:U[1]||"transparent"}),le.unshift({offset:ve?le[0].offset:.5,color:U[0]||"transparent"});var Be=new jo(0,0,0,0,le,!0);return Be[te]=Te,Be[te+"2"]=Ce,Be}}}(l,a,r)||l.getVisual("style")[l.getVisual("drawType")];if(g&&d.type===a.type&&A===this._step){_&&!y?y=this._newPolygon(h,w):y&&!_&&(v.remove(y),y=this._polygon=null),p||this._initOrUpdateEndLabel(e,a,Qi(k));var L=v.getClipPath();L?Ye(L,{shape:Wp(this,a,!1,e).shape},e):v.setClipPath(Wp(this,a,!0,e)),M&&f.updateData(l,{isIgnore:C,clipShape:T,disableAnimation:!0,getSymbolPoint:function(V){return[h[2*V],h[2*V+1]]}}),L_(this._stackedOnPoints,w)&&L_(this._points,h)||(m?this._doUpdateAnimation(l,w,a,r,A,x,S):(A&&(h=mi(h,a,A,S),w&&(w=mi(w,a,A,S))),g.setShape({points:h}),y&&y.setShape({points:h,stackedOnPoints:w})))}else M&&f.updateData(l,{isIgnore:C,clipShape:T,disableAnimation:!0,getSymbolPoint:function(V){return[h[2*V],h[2*V+1]]}}),m&&this._initSymbolLabelAnimation(l,a,T),A&&(h=mi(h,a,A,S),w&&(w=mi(w,a,A,S))),g=this._newPolyline(h),_?y=this._newPolygon(h,w):y&&(v.remove(y),y=this._polygon=null),p||this._initOrUpdateEndLabel(e,a,Qi(k)),v.setClipPath(Wp(this,a,!0,e));var O=e.getModel("emphasis"),P=O.get("focus"),R=O.get("blurScope"),N=O.get("disabled");g.useStyle(ce(u.getLineStyle(),{fill:"none",stroke:k,lineJoin:"bevel"})),Zn(g,e,"lineStyle"),g.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"&&(g.getState("emphasis").style.lineWidth=+g.style.lineWidth+1),ye(g).seriesIndex=e.seriesIndex,ln(g,P,R,N);var E=R_(e.get("smooth")),z=e.get("smoothMonotone");if(g.setShape({smooth:E,smoothMonotone:z,connectNulls:S}),y){var B=l.getCalculationInfo("stackedOnSeries"),G=0;y.useStyle(ce(c.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),B&&(G=R_(B.get("smooth"))),y.setShape({smooth:E,stackedOnSmooth:G,smoothMonotone:z,connectNulls:S}),Zn(y,e,"areaStyle"),ye(y).seriesIndex=e.seriesIndex,ln(y,P,R,N)}var K=function(V){o._changePolyState(V)};l.eachItemGraphicEl(function(V){V&&(V.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=l,this._coordSys=a,this._stackedOnPoints=w,this._points=h,this._step=A,this._valueOrigin=x,e.get("triggerLineEvent")&&(this.packEventData(e,g),y&&this.packEventData(e,y))},t.prototype.packEventData=function(e,i){ye(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,r,o){var a=e.getData(),s=zi(a,o);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=a.getLayout("points"),u=a.getItemGraphicEl(s);if(!u){var c=l[2*s],h=l[2*s+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var p=e.get("zlevel")||0,d=e.get("z")||0;(u=new Vp(a,s)).x=c,u.y=h,u.setZ(p,d);var f=u.getSymbolPath().getTextContent();f&&(f.zlevel=p,f.z=d,f.z2=this._polyline.z2+1),u.__temp=!0,a.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Je.prototype.highlight.call(this,e,i,r,o)},t.prototype.downplay=function(e,i,r,o){var a=e.getData(),s=zi(a,o);if(this._changePolyState("normal"),s!=null&&s>=0){var l=a.getItemGraphicEl(s);l&&(l.__temp?(a.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Je.prototype.downplay.call(this,e,i,r,o)},t.prototype._changePolyState=function(e){var i=this._polygon;Wc(this._polyline,e),i&&Wc(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new XC({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new YC({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(r),this._polygon=r,r},t.prototype._initSymbolLabelAnimation=function(e,i,r){var o,a,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(o=s.isHorizontal(),a=!1):i.type==="polar"&&(o=s.dim==="angle",a=!0);var u=e.hostModel,c=u.get("animationDuration");ue(c)&&(c=c(null));var h=u.get("animationDelay")||0,p=ue(h)?h(null):h;e.eachItemGraphicEl(function(d,f){var g=d;if(g){var y=[d.x,d.y],v=void 0,m=void 0,_=void 0;if(r)if(a){var x=r,b=i.pointToCoord(y);o?(v=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(v=x.r0,m=x.r,_=b[0])}else{var w=r;o?(v=w.x,m=w.x+w.width,_=d.x):(v=w.y+w.height,m=w.y,_=d.y)}var M=m===v?0:(_-v)/(m-v);l&&(M=1-M);var S=ue(h)?h(f):c*M+p,C=g.getSymbolPath(),I=C.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:S}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:S}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,r){var o=e.getModel("endLabel");if(E_(e)){var a=e.getData(),s=this._polyline,l=a.getLayout("points");if(!l)return s.removeTextContent(),void(this._endLabel=null);var u=this._endLabel;u||((u=this._endLabel=new Me({z2:200})).ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=function(h){for(var p,d,f=h.length/2;f>0&&(p=h[2*f-2],d=h[2*f-1],isNaN(p)||isNaN(d));f--);return f-1}(l);c>=0&&(Dn(s,kn(e,"endLabel"),{inheritColor:r,labelFetcher:e,labelDataIndex:c,defaultText:function(h,p,d){return d!=null?w_(a,d):Ul(a,h)},enableTextSetter:!0},function(h,p){var d=p.getBaseAxis(),f=d.isHorizontal(),g=d.inverse,y=f?g?"right":"left":"center",v=f?"middle":g?"top":"bottom";return{normal:{align:h.get("align")||y,verticalAlign:h.get("verticalAlign")||v}}}(o,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,r,o,a,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&o.originalX==null&&(o.originalX=u.x,o.originalY=u.y);var h=r.getLayout("points"),p=r.hostModel,d=p.get("connectNulls"),f=s.get("precision"),g=s.get("distance")||0,y=l.getBaseAxis(),v=y.isHorizontal(),m=y.inverse,_=i.shape,x=m?v?_.x:_.y+_.height:v?_.x+_.width:_.y,b=(v?g:0)*(m?-1:1),w=(v?0:-g)*(m?-1:1),M=v?"x":"y",S=function(R,N,E){for(var z,B,G=R.length/2,K=E==="x"?0:1,V=0,X=-1,Z=0;Z<G;Z++)if(B=R[2*Z+K],!isNaN(B)&&!isNaN(R[2*Z+1-K]))if(Z!==0){if(z<=N&&B>=N||z>=N&&B<=N){X=Z;break}V=Z,z=B}else z=B;return{range:[V,X],t:(N-z)/(B-z)}}(h,x,M),C=S.range,I=C[1]-C[0],T=void 0;if(I>=1){if(I>1&&!d){var A=N_(h,C[0]);u.attr({x:A[0]+b,y:A[1]+w}),a&&(T=p.getRawValue(C[0]))}else{(A=c.getPointOn(x,M))&&u.attr({x:A[0]+b,y:A[1]+w});var k=p.getRawValue(C[0]),L=p.getRawValue(C[1]);a&&(T=Tg(r,f,k,L,S.t))}o.lastFrameIndex=C[0]}else{var O=e===1||o.lastFrameIndex>0?C[0]:0;A=N_(h,O),a&&(T=p.getRawValue(O)),u.attr({x:A[0]+b,y:A[1]+w})}if(a){var P=Br(u);typeof P.setLabelText=="function"&&P.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,i,r,o,a,s,l){var u=this._polyline,c=this._polygon,h=e.hostModel,p=function(w,M,S,C,I,T,A){for(var k=function(pe,ot){var Ve=[];return ot.diff(pe).add(function(et){Ve.push({cmd:"+",idx:et})}).update(function(et,je){Ve.push({cmd:"=",idx:je,idx1:et})}).remove(function(et){Ve.push({cmd:"-",idx:et})}).execute(),Ve}(w,M),L=[],O=[],P=[],R=[],N=[],E=[],z=[],B=T_(I,M,A),G=w.getLayout("points")||[],K=M.getLayout("points")||[],V=0;V<k.length;V++){var X=k[V],Z=!0,W=void 0,te=void 0;switch(X.cmd){case"=":W=2*X.idx,te=2*X.idx1;var oe=G[W],se=G[W+1],ie=K[te],J=K[te+1];(isNaN(oe)||isNaN(se))&&(oe=ie,se=J),L.push(oe,se),O.push(ie,J),P.push(S[W],S[W+1]),R.push(C[te],C[te+1]),z.push(M.getRawIndex(X.idx1));break;case"+":var $=X.idx,q=B.dataDimsForPoint,U=I.dataToPoint([M.get(q[0],$),M.get(q[1],$)]);te=2*$,L.push(U[0],U[1]),O.push(K[te],K[te+1]);var le=C_(B,I,M,$);P.push(le[0],le[1]),R.push(C[te],C[te+1]),z.push(M.getRawIndex($));break;case"-":Z=!1}Z&&(N.push(X),E.push(E.length))}E.sort(function(pe,ot){return z[pe]-z[ot]});var ve=L.length,Te=Kn(ve),Ce=Kn(ve),Pe=Kn(ve),Be=Kn(ve),qe=[];for(V=0;V<E.length;V++){var dt=E[V],Ne=2*V,Ge=2*dt;Te[Ne]=L[Ge],Te[Ne+1]=L[Ge+1],Ce[Ne]=O[Ge],Ce[Ne+1]=O[Ge+1],Pe[Ne]=P[Ge],Pe[Ne+1]=P[Ge+1],Be[Ne]=R[Ge],Be[Ne+1]=R[Ge+1],qe[V]=N[dt]}return{current:Te,next:Ce,stackedOnCurrent:Pe,stackedOnNext:Be,status:qe}}(this._data,e,this._stackedOnPoints,i,this._coordSys,0,this._valueOrigin),d=p.current,f=p.stackedOnCurrent,g=p.next,y=p.stackedOnNext;if(a&&(d=mi(p.current,r,a,l),f=mi(p.stackedOnCurrent,r,a,l),g=mi(p.next,r,a,l),y=mi(p.stackedOnNext,r,a,l)),O_(d,g)>3e3||c&&O_(f,y)>3e3)return u.stopAnimation(),u.setShape({points:g}),void(c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:y})));u.shape.__points=p.current,u.shape.points=d;var v={shape:{points:g}};p.current!==d&&(v.shape.__points=p.next),u.stopAnimation(),ze(u,v,h),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),ze(c,{shape:{stackedOnPoints:y}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],_=p.status,x=0;x<_.length;x++)if(_[x].cmd==="="){var b=e.getItemGraphicEl(_[x].idx1);b&&m.push({el:b,ptIdx:x})}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,M=0;M<m.length;M++){var S=m[M].el,C=2*m[M].ptIdx;S.x=w[C],S.y=w[C+1],S.markRedraw()}})},t.prototype.remove=function(e){var i=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl(function(o,a){o.__temp&&(i.remove(o),r.setItemGraphicEl(a,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(Je),qC={average:function(n){for(var t=0,e=0,i=0;i<n.length;i++)isNaN(n[i])||(t+=n[i],e++);return e===0?NaN:t/e},sum:function(n){for(var t=0,e=0;e<n.length;e++)t+=n[e]||0;return t},max:function(n){for(var t=-1/0,e=0;e<n.length;e++)n[e]>t&&(t=n[e]);return isFinite(t)?t:NaN},min:function(n){for(var t=1/0,e=0;e<n.length;e++)n[e]<t&&(t=n[e]);return isFinite(t)?t:NaN},minmax:function(n){for(var t=-1/0,e=-1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r);o>t&&(t=o,e=r)}return isFinite(e)?e:NaN},nearest:function(n){return n[0]}},jC=function(n){return Math.round(n.length/2)};function z_(n){return{seriesType:n,reset:function(t,e,i){var r=t.getData(),o=t.get("sampling"),a=t.coordinateSystem,s=r.count();if(s>10&&a.type==="cartesian2d"&&o){var l=a.getBaseAxis(),u=a.getOtherAxis(l),c=l.getExtent(),h=i.getDevicePixelRatio(),p=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/p);if(isFinite(d)&&d>1){o==="lttb"&&t.setData(r.lttbDownSample(r.mapDimension(u.dim),1/d));var f=void 0;Q(o)?f=qC[o]:ue(o)&&(f=o),f&&t.setData(r.downSample(r.mapDimension(u.dim),1/d,f,jC))}}}}}function KC(n){n.registerChartView(ZC),n.registerSeriesModel(GC),n.registerLayout({seriesType:"line",plan:Uh(),reset:function(t){var e=t.getData(),i=t.coordinateSystem;if(t.pipelineContext,i){var r=j(i.dimensions,function(c){return e.mapDimension(c)}).slice(0,2),o=r.length,a=e.getCalculationInfo("stackResultDimension");fi(e,r[0])&&(r[0]=a),fi(e,r[1])&&(r[1]=a);var s=e.getStore(),l=e.getDimensionIndex(r[0]),u=e.getDimensionIndex(r[1]);return o&&{progress:function(c,h){for(var p=Kn((c.end-c.start)*o),d=[],f=[],g=c.start,y=0;g<c.end;g++){var v=void 0;if(o===1){var m=s.get(l,g);v=i.dataToPoint(m,null,f)}else d[0]=s.get(l,g),d[1]=s.get(u,g),v=i.dataToPoint(d,null,f);p[y++]=v[0],p[y++]=v[1]}h.setLayout("points",p)}}}}}),n.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)}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,z_("line"))}var Aa=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.getInitialData=function(e,i){return Ll(0,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,r){var o=this.coordinateSystem;if(o&&o.clampData){var a=o.clampData(e),s=o.dataToPoint(a);if(r)D(o.getAxes(),function(p,d){if(p.type==="category"&&i!=null){var f=p.getTicksCoords(),g=p.getTickModel().get("alignWithLabel"),y=a[d],v=i[d]==="x1"||i[d]==="y1";if(v&&!g&&(y+=1),f.length<2)return;if(f.length===2)return void(s[d]=p.toGlobalCoord(p.getExtent()[v?1:0]));for(var m=void 0,_=void 0,x=1,b=0;b<f.length;b++){var w=f[b].coord,M=b===f.length-1?f[b-1].tickValue+x:f[b].tickValue;if(M===y){_=w;break}if(M<y)m=w;else if(m!=null&&M>y){_=(w+m)/2;break}b===1&&(x=M-f[0].tickValue)}_==null&&(m?m&&(_=f[f.length-1].coord):_=f[0].coord),s[d]=p.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=o.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/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}(it);it.registerClass(Aa);var JC=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.getInitialData=function(){return Ll(0,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},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,r){return r.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ta(Aa.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}(Aa),$C=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Yl=function(n){function t(e){var i=n.call(this,e)||this;return i.type="sausage",i}return F(t,n),t.prototype.getDefaultShape=function(){return new $C},t.prototype.buildPath=function(e,i){var r=i.cx,o=i.cy,a=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=.5*(s-a),u=a+l,c=i.startAngle,h=i.endAngle,p=i.clockwise,d=2*Math.PI,f=p?h-c<d:c-h<d;f||(c=h-(p?d:-d));var g=Math.cos(c),y=Math.sin(c),v=Math.cos(h),m=Math.sin(h);f?(e.moveTo(g*a+r,y*a+o),e.arc(g*u+r,y*u+o,l,-Math.PI+c,c,!p)):e.moveTo(g*s+r,y*s+o),e.arc(r,o,s,c,h,!p),e.arc(v*u+r,m*u+o,l,h-2*Math.PI,h-Math.PI,!p),a!==0&&e.arc(r,o,a,h,c,p)},t}(Ie);function Zl(n,t,e){return t*Math.sin(n)*(e?-1:1)}function ql(n,t,e){return t*Math.cos(n)*(e?1:-1)}function Da(n,t,e){var i=n.get("borderRadius");if(i==null)return e?{cornerRadius:0}:null;Y(i)||(i=[i,i,i,i]);var r=Math.abs(t.r||0-t.r0||0);return{cornerRadius:j(i,function(o){return bn(o,r)})}}var Xp=Math.max,Up=Math.min,QC=function(n){function t(){var e=n.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return F(t,n),t.prototype.render=function(e,i,r,o){this._model=e,this._removeOnRenderedListener(r),this._updateDrawMode(e);var a=e.get("coordinateSystem");a!=="cartesian2d"&&a!=="polar"||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,i,r):this._renderNormal(e,i,r,o))},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){Xs(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,r,o){var a,s=this.group,l=e.getData(),u=this._data,c=e.coordinateSystem,h=c.getBaseAxis();c.type==="cartesian2d"?a=h.isHorizontal():c.type==="polar"&&(a=h.dim==="angle");var p=e.isAnimationEnabled()?e:null,d=function(T,A){var k=T.get("realtimeSort",!0),L=A.getBaseAxis();if(k&&L.type==="category"&&A.type==="cartesian2d")return{baseAxis:L,otherAxis:A.getOtherAxis(L)}}(e,c);d&&this._enableRealtimeSort(d,l,r);var f=e.get("clip",!0)||d,g=function(T,A){var k=T.getArea&&T.getArea();if(Hp(T,"cartesian2d")){var L=T.getBaseAxis();if(L.type!=="category"||!L.onBand){var O=A.getLayout("bandWidth");L.isHorizontal()?(k.x-=O,k.width+=2*O):(k.y-=O,k.height+=2*O)}}return k}(c,l);s.removeClipPath();var y=e.get("roundCap",!0),v=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),_=m.get("borderRadius")||0,x=[],b=this._backgroundEls,w=o&&o.isInitSort,M=o&&o.type==="changeAxisOrder";function S(T){var A=jl[c.type](l,T),k=function(L,O,P){return new(L.type==="polar"?Nt:ke)({shape:q_(O,P,L),silent:!0,z2:0})}(c,a,A);return k.useStyle(m.getItemStyle()),c.type==="cartesian2d"?k.setShape("r",_):k.setShape("cornerRadius",_),x[T]=k,k}l.diff(u).add(function(T){var A=l.getItemModel(T),k=jl[c.type](l,T,A);if(v&&S(T),l.hasValue(T)&&H_[c.type](k)){var L=!1;f&&(L=B_[c.type](g,k));var O=V_[c.type](e,l,T,k,a,p,h.model,!1,y);d&&(O.forceLabelAnimation=!0),X_(O,l,T,A,k,e,a,c.type==="polar"),w?O.attr({shape:k}):d?F_(d,p,O,k,T,a,!1,!1):Ye(O,{shape:k},e,T),l.setItemGraphicEl(T,O),s.add(O),O.ignore=L}}).update(function(T,A){var k=l.getItemModel(T),L=jl[c.type](l,T,k);if(v){var O=void 0;b.length===0?O=S(A):((O=b[A]).useStyle(m.getItemStyle()),c.type==="cartesian2d"?O.setShape("r",_):O.setShape("cornerRadius",_),x[T]=O);var P=jl[c.type](l,T);ze(O,{shape:q_(a,P,c)},p,T)}var R=u.getItemGraphicEl(A);if(l.hasValue(T)&&H_[c.type](L)){var N=!1;if(f&&(N=B_[c.type](g,L))&&s.remove(R),R?Er(R):R=V_[c.type](e,l,T,L,a,p,h.model,!!R,y),d&&(R.forceLabelAnimation=!0),M){var E=R.getTextContent();if(E){var z=Br(E);z.prevValue!=null&&(z.prevValue=z.value)}}else X_(R,l,T,k,L,e,a,c.type==="polar");w?R.attr({shape:L}):d?F_(d,p,R,L,T,a,!0,M):ze(R,{shape:L},e,T,null),l.setItemGraphicEl(T,R),R.ignore=N,s.add(R)}else s.remove(R)}).remove(function(T){var A=u.getItemGraphicEl(T);A&&Jo(A,e,T)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new _e);C.removeAll();for(var I=0;I<x.length;++I)C.add(x[I]);s.add(C),this._backgroundEls=x,this._data=l},t.prototype._renderLarge=function(e,i,r){this._clear(),Y_(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,i){this._removeBackground(),Y_(i,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var i=e.get("clip",!0)&&k_(e.coordinateSystem,!1,e),r=this.group;i?r.setClipPath(i):r.removeClipPath()},t.prototype._enableRealtimeSort=function(e,i,r){var o=this;if(i.count()){var a=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(i,e,r),this._isFirstFrame=!1;else{var s=function(l){var u=i.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(a.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){o._updateSortWithinSameData(i,s,a,r)},r.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,i,r){var o=[];return e.each(e.mapDimension(i.dim),function(a,s){var l=r(s);l=l??NaN,o.push({dataIndex:s,mappedValue:l,ordinalNumber:a})}),o.sort(function(a,s){return s.mappedValue-a.mappedValue}),{ordinalNumbers:j(o,function(a){return a.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,i,r){for(var o=r.scale,a=e.mapDimension(r.dim),s=Number.MAX_VALUE,l=0,u=o.getOrdinalMeta().categories.length;l<u;++l){var c=e.rawIndexOf(a,o.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:i(e.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var r=i.scale,o=r.getExtent(),a=Math.max(0,o[0]),s=Math.min(o[1],r.getOrdinalMeta().categories.length-1);a<=s;++a)if(e.ordinalNumbers[a]!==r.getRawOrdinalNumber(a))return!0},t.prototype._updateSortWithinSameData=function(e,i,r,o){if(this._isOrderChangedWithinSameData(e,i,r)){var a=this._dataSort(e,r,i);this._isOrderDifferentInView(a,r)&&(this._removeOnRenderedListener(o),o.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",axisId:r.index,sortInfo:a}))}},t.prototype._dispatchInitSort=function(e,i,r){var o=i.baseAxis,a=this._dataSort(e,o,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});r.dispatchAction({type:"changeAxisOrder",componentType:o.dim+"Axis",isInitSort:!0,axisId:o.index,sortInfo:a})},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,r=this._data;e&&e.isAnimationEnabled()&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(o){Jo(o,e,ye(o).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}(Je),B_={cartesian2d:function(n,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 r=n.x+n.width,o=n.y+n.height,a=Xp(t.x,n.x),s=Up(t.x+t.width,r),l=Xp(t.y,n.y),u=Up(t.y+t.height,o),c=s<a,h=u<l;return t.x=c&&a>r?s:a,t.y=h&&l>o?u:l,t.width=c?0:s-a,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),c||h},polar:function(n,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var r=Up(t.r,n.r),o=Xp(t.r0,n.r0);t.r=r,t.r0=o;var a=r-o<0;return e<0&&(i=t.r,t.r=t.r0,t.r0=i),a}},V_={cartesian2d:function(n,t,e,i,r,o,a,s,l){var u=new ke({shape:H({},i),z2:1});return u.__dataIndex=e,u.name="item",o&&(u.shape[r?"height":"width"]=0),u},polar:function(n,t,e,i,r,o,a,s,l){var u=!r&&l?Yl:Nt,c=new u({shape:i,z2:1});c.name="item";var h,p,d=W_(r);if(c.calculateTextPosition=(h=d,p=u===Yl,function(y,v,m){var _=v.position;if(!_||_ instanceof Array)return _s(y,v,m);var x=h(_),b=v.distance!=null?v.distance:5,w=this.shape,M=w.cx,S=w.cy,C=w.r,I=w.r0,T=(C+I)/2,A=w.startAngle,k=w.endAngle,L=(A+k)/2,O=p?Math.abs(C-I)/2:0,P=Math.cos,R=Math.sin,N=M+C*P(A),E=S+C*R(A),z="left",B="top";switch(x){case"startArc":N=M+(I-b)*P(L),E=S+(I-b)*R(L),z="center",B="top";break;case"insideStartArc":N=M+(I+b)*P(L),E=S+(I+b)*R(L),z="center",B="bottom";break;case"startAngle":N=M+T*P(A)+Zl(A,b+O,!1),E=S+T*R(A)+ql(A,b+O,!1),z="right",B="middle";break;case"insideStartAngle":N=M+T*P(A)+Zl(A,-b+O,!1),E=S+T*R(A)+ql(A,-b+O,!1),z="left",B="middle";break;case"middle":N=M+T*P(L),E=S+T*R(L),z="center",B="middle";break;case"endArc":N=M+(C+b)*P(L),E=S+(C+b)*R(L),z="center",B="bottom";break;case"insideEndArc":N=M+(C-b)*P(L),E=S+(C-b)*R(L),z="center",B="top";break;case"endAngle":N=M+T*P(k)+Zl(k,b+O,!0),E=S+T*R(k)+ql(k,b+O,!0),z="left",B="middle";break;case"insideEndAngle":N=M+T*P(k)+Zl(k,-b+O,!0),E=S+T*R(k)+ql(k,-b+O,!0),z="right",B="middle";break;default:return _s(y,v,m)}return(y=y||{}).x=N,y.y=E,y.align=z,y.verticalAlign=B,y}),o){var f=r?"r":"endAngle",g={};c.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?ze:Ye)(c,{shape:g},o)}return c}};function F_(n,t,e,i,r,o,a,s){var l,u;o?(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||(a?ze:Ye)(e,{shape:l},t,r,null),(a?ze:Ye)(e,{shape:u},t?n.baseAxis.model:null,r)}function G_(n,t){for(var e=0;e<t.length;e++)if(!isFinite(n[t[e]]))return!0;return!1}var eI=["x","y","width","height"],tI=["cx","cy","r","startAngle","endAngle"],H_={cartesian2d:function(n){return!G_(n,eI)},polar:function(n){return!G_(n,tI)}},jl={cartesian2d:function(n,t,e){var i=n.getItemLayout(t),r=e?function(s,l){var u=s.get(["itemStyle","borderColor"]);if(!u||u==="none")return 0;var c=s.get(["itemStyle","borderWidth"])||0,h=isNaN(l.width)?Number.MAX_VALUE:Math.abs(l.width),p=isNaN(l.height)?Number.MAX_VALUE:Math.abs(l.height);return Math.min(c,h,p)}(e,i):0,o=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(n,t,e){var i=n.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 W_(n){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}}}(n)}function X_(n,t,e,i,r,o,a,s){var l=t.getItemVisual(e,"style");if(s){if(!o.get("roundCap")){var u=n.shape;H(u,Da(i.getModel("itemStyle"),u,!0)),n.setShape(u)}}else{var c=i.get(["itemStyle","borderRadius"])||0;n.setShape("r",c)}n.useStyle(l);var h=i.getShallow("cursor");h&&n.attr("cursor",h);var p=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",d=kn(i);Dn(n,d,{labelFetcher:o,labelDataIndex:e,defaultText:Ul(o.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=n.getTextContent();if(s&&f){var g=i.get(["label","position"]);n.textConfig.inside=g==="middle"||null,function(v,m,_,x){if(Ae(x))v.setTextConfig({rotation:x});else if(Y(m))v.setTextConfig({rotation:0});else{var b,w=v.shape,M=w.clockwise?w.startAngle:w.endAngle,S=w.clockwise?w.endAngle:w.startAngle,C=(M+S)/2,I=_(m);switch(I){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":b=C;break;case"startAngle":case"insideStartAngle":b=M;break;case"endAngle":case"insideEndAngle":b=S;break;default:return void v.setTextConfig({rotation:0})}var T=1.5*Math.PI-b;I==="middle"&&T>Math.PI/2&&T<1.5*Math.PI&&(T-=Math.PI),v.setTextConfig({rotation:T})}}(n,g==="outside"?p:g,W_(a),i.get(["label","rotate"]))}Uy(f,d,o.getRawValue(e),function(v){return w_(t,v)});var y=i.getModel(["emphasis"]);ln(n,y.get("focus"),y.get("blurScope"),y.get("disabled")),Zn(n,i),function(v){return v.startAngle!=null&&v.endAngle!=null&&v.startAngle===v.endAngle}(r)&&(n.style.fill="none",n.style.stroke="none",D(n.states,function(v){v.style&&(v.style.fill=v.style.stroke="none")}))}var nI=function(){return function(){}}(),U_=function(n){function t(e){var i=n.call(this,e)||this;return i.type="largeBar",i}return F(t,n),t.prototype.getDefaultShape=function(){return new nI},t.prototype.buildPath=function(e,i){for(var r=i.points,o=this.baseDimIdx,a=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<r.length;c+=3)l[o]=u,l[a]=r[c+2],s[o]=r[c+o],s[a]=r[c+a],e.rect(s[0],s[1],l[0],l[1])},t}(Ie);function Y_(n,t,e,i){var r=n.getData(),o=r.getLayout("valueAxisHorizontal")?1:0,a=r.getLayout("largeDataIndices"),s=r.getLayout("size"),l=n.getModel("backgroundStyle"),u=r.getLayout("largeBackgroundPoints");if(u){var c=new U_({shape:{points:u},incremental:!!i,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),e&&e.push(c)}var h=new U_({shape:{points:r.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=o,h.largeDataIndices=a,h.barWidth=s,t.add(h),h.useStyle(r.getVisual("style")),ye(h).seriesIndex=n.seriesIndex,n.get("silent")||(h.on("mousedown",Z_),h.on("mousemove",Z_)),e&&e.push(h)}var Z_=cl(function(n){var t=function(e,i,r){for(var o=e.baseDimIdx,a=1-o,s=e.shape.points,l=e.largeDataIndices,u=[],c=[],h=e.barWidth,p=0,d=s.length/3;p<d;p++){var f=3*p;if(c[o]=h,c[a]=s[f+2],u[o]=s[f+o],u[a]=s[f+a],c[a]<0&&(u[a]+=c[a],c[a]=-c[a]),i>=u[0]&&i<=u[0]+c[0]&&r>=u[1]&&r<=u[1]+c[1])return l[p]}return-1}(this,n.offsetX,n.offsetY);ye(this).dataIndex=t>=0?t:null},30,!1);function q_(n,t,e){if(Hp(e,"cartesian2d")){var i=t,r=e.getArea();return{x:n?i.x:r.x,y:n?r.y:i.y,width:n?i.width:r.width,height:n?r.height:i.height}}var o=t;return{cx:(r=e.getArea()).cx,cy:r.cy,r0:n?r.r0:o.r0,r:n?r.r:o.r,startAngle:n?o.startAngle:0,endAngle:n?o.endAngle:2*Math.PI}}function iI(n){n.registerChartView(QC),n.registerSeriesModel(JC),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,Se(E0,"bar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,z0("bar")),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,z_("bar")),n.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(r){t.sortInfo&&r.axis.setCategorySortInfo(t.sortInfo)})})}var j_=2*Math.PI,Kl=Math.PI/180;function K_(n,t){return It(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function J_(n,t){var e=K_(n,t),i=n.get("center"),r=n.get("radius");Y(r)||(r=[0,r]);var o,a,s=ee(e.width,t.getWidth()),l=ee(e.height,t.getHeight()),u=Math.min(s,l),c=ee(r[0],u/2),h=ee(r[1],u/2),p=n.coordinateSystem;if(p){var d=p.dataToPoint(i);o=d[0]||0,a=d[1]||0}else Y(i)||(i=[i,i]),o=ee(i[0],s)+e.x,a=ee(i[1],l)+e.y;return{cx:o,cy:a,r0:c,r:h}}function rI(n,t,e){t.eachSeriesByType(n,function(i){var r=i.getData(),o=r.mapDimension("value"),a=K_(i,e),s=J_(i,e),l=s.cx,u=s.cy,c=s.r,h=s.r0,p=-i.get("startAngle")*Kl,d=i.get("endAngle"),f=i.get("padAngle")*Kl;d=d==="auto"?p-j_:-d*Kl;var g=i.get("minAngle")*Kl+f,y=0;r.each(o,function(P){!isNaN(P)&&y++});var v=r.getSum(o),m=Math.PI/(v||y)*2,_=i.get("clockwise"),x=i.get("roseType"),b=i.get("stillShowZeroSum"),w=r.getDataExtent(o);w[0]=0;var M=_?1:-1,S=[p,d],C=M*f/2;zc(S,!_),p=S[0],d=S[1];var I=$_(i);I.startAngle=p,I.endAngle=d,I.clockwise=_;var T=Math.abs(d-p),A=T,k=0,L=p;if(r.setLayout({viewRect:a,r:c}),r.each(o,function(P,R){var N;if(isNaN(P))r.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:h,r:x?NaN:c});else{(N=x!=="area"?v===0&&b?m:P*m:T/y)<g?(N=g,A-=g):k+=P;var E=L+M*N,z=0,B=0;f>N?B=z=L+M*N/2:(z=L+C,B=E-C),r.setItemLayout(R,{angle:N,startAngle:z,endAngle:B,clockwise:_,cx:l,cy:u,r0:h,r:x?Fe(P,w,[h,c]):c}),L=E}}),A<j_&&y)if(A<=.001){var O=T/y;r.each(o,function(P,R){if(!isNaN(P)){var N=r.getItemLayout(R);N.angle=O;var E=0,z=0;O<f?z=E=p+M*(R+.5)*O:(E=p+M*R*O+C,z=p+M*(R+1)*O-C),N.startAngle=E,N.endAngle=z}})}else m=A/k,L=p,r.each(o,function(P,R){if(!isNaN(P)){var N=r.getItemLayout(R),E=N.angle===g?g:P*m,z=0,B=0;E<f?B=z=L+M*E/2:(z=L+C,B=L+M*E-C),N.startAngle=z,N.endAngle=B,L+=M*E}})})}var $_=Ee();function Yp(n){return{seriesType:n,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var r=t.getData();r.filterSelf(function(o){for(var a=r.getName(o),s=0;s<i.length;s++)if(!i[s].isSelected(a))return!1;return!0})}}}}var oI=Math.PI/180;function Q_(n,t,e,i,r,o,a,s,l,u){if(!(n.length<2)){for(var c=n.length,h=0;h<c;h++)if(n[h].position==="outer"&&n[h].labelAlignTo==="labelLine"){var p=n[h].label.x-u;n[h].linePoints[1][0]+=p,n[h].label.x=u}__(n,l,l+a)&&function(f){for(var g={list:[],maxY:0},y={list:[],maxY:0},v=0;v<f.length;v++)if(f[v].labelAlignTo==="none"){var m=f[v],_=m.label.y>e?y:g,x=Math.abs(m.label.y-e);if(x>=_.maxY){var b=m.label.x-t-m.len2*r,w=i+m.len,M=Math.abs(b)<w?Math.sqrt(x*x/(1-b*b/w/w)):w;_.rB=M,_.maxY=x}_.list.push(m)}d(g),d(y)}(n)}function d(f){for(var g=f.rB,y=g*g,v=0;v<f.list.length;v++){var m=f.list[v],_=Math.abs(m.label.y-e),x=i+m.len,b=x*x,w=Math.sqrt((1-Math.abs(_*_/y))*b),M=t+(w+m.len2)*r,S=M-m.label.x;e1(m,m.targetTextWidth-S*r,!0),m.label.x=M}}}function e1(n,t,e){if(e===void 0&&(e=!1),n.labelStyleWidth==null){var i=n.label,r=i.style,o=n.rect,a=r.backgroundColor,s=r.padding,l=s?s[1]+s[3]:0,u=r.overflow,c=o.width+(a?0:l);if(t<c||e){var h=o.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",t-l);var p=i.getBoundingRect();i.setStyle("width",Math.ceil(p.width)),i.setStyle("backgroundColor",a)}else{var d=t-l,f=t<c?d:e?d>n.unconstrainedWidth?null:d:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-h)/2}}}function Zp(n){return n.position==="center"}var aI=function(n){function t(e,i,r){var o=n.call(this)||this;o.z2=2;var a=new Me;return o.setTextContent(a),o.updateData(e,i,r,!0),o}return F(t,n),t.prototype.updateData=function(e,i,r,o){var a=this,s=e.hostModel,l=e.getItemModel(i),u=l.getModel("emphasis"),c=e.getItemLayout(i),h=H(Da(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle))a.setShape(h);else{if(o){a.setShape(h);var p=s.getShallow("animationType");s.ecModel.ssr?(Ye(a,{scaleX:0,scaleY:0},s,{dataIndex:i,isFrom:!0}),a.originX=h.cx,a.originY=h.cy):p==="scale"?(a.shape.r=c.r0,Ye(a,{shape:{r:c.r}},s,i)):r!=null?(a.setShape({startAngle:r,endAngle:r}),Ye(a,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,i)):(a.shape.endAngle=c.startAngle,ze(a,{shape:{endAngle:c.endAngle}},s,i))}else Er(a),ze(a,{shape:h},s,i);a.useStyle(e.getItemVisual(i,"style")),Zn(a,l);var d=(c.startAngle+c.endAngle)/2,f=s.get("selectedOffset"),g=Math.cos(d)*f,y=Math.sin(d)*f,v=l.getShallow("cursor");v&&a.attr("cursor",v),this._updateLabel(s,e,i),a.ensureState("emphasis").shape=H({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Da(u.getModel("itemStyle"),c)),H(a.ensureState("select"),{x:g,y,shape:Da(l.getModel(["select","itemStyle"]),c)}),H(a.ensureState("blur"),{shape:Da(l.getModel(["blur","itemStyle"]),c)});var m=a.getTextGuideLine(),_=a.getTextContent();m&&H(m.ensureState("select"),{x:g,y}),H(_.ensureState("select"),{x:g,y}),ln(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))}},t.prototype._updateLabel=function(e,i,r){var o=this,a=i.getItemModel(r),s=a.getModel("labelLine"),l=i.getItemVisual(r,"style"),u=l&&l.fill,c=l&&l.opacity;Dn(o,kn(a),{labelFetcher:i.hostModel,labelDataIndex:r,inheritColor:u,defaultOpacity:c,defaultText:e.getFormattedLabel(r,"normal")||i.getName(r)});var h=o.getTextContent();o.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var p=e.get(["label","position"]);if(p!=="outside"&&p!=="outer")o.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new qt,this.setTextGuideLine(d)),Np(this,Ep(a),{stroke:u,opacity:vr(s.get(["lineStyle","opacity"]),c,1)})}},t}(Nt),sI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return F(t,n),t.prototype.render=function(e,i,r,o){var a,s=e.getData(),l=this._data,u=this.group;if(!l&&s.count()>0){for(var c=s.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<s.count();++h)c=s.getItemLayout(h);c&&(a=c.startAngle)}if(this._emptyCircleSector&&u.remove(this._emptyCircleSector),s.count()===0&&e.get("showEmptyCircle")){var p=$_(e),d=new Nt({shape:H(J_(e,r),p)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,u.add(d)}s.diff(l).add(function(f){var g=new aI(s,f,a);s.setItemGraphicEl(f,g),u.add(g)}).update(function(f,g){var y=l.getItemGraphicEl(g);y.updateData(s,f,a),y.off("click"),u.add(y),s.setItemGraphicEl(f,y)}).remove(function(f){Jo(l.getItemGraphicEl(f),e,f)}).execute(),function(f){var g,y,v=f.getData(),m=[],_=!1,x=(f.get("minShowLabelAngle")||0)*oI,b=v.getLayout("viewRect"),w=v.getLayout("r"),M=b.width,S=b.x,C=b.y,I=b.height;function T(E){E.ignore=!0}v.each(function(E){var z=v.getItemGraphicEl(E),B=z.shape,G=z.getTextContent(),K=z.getTextGuideLine(),V=v.getItemModel(E),X=V.getModel("label"),Z=X.get("position")||V.get(["emphasis","label","position"]),W=X.get("distanceToLabelLine"),te=X.get("alignTo"),oe=ee(X.get("edgeDistance"),M),se=X.get("bleedMargin"),ie=V.getModel("labelLine"),J=ie.get("length");J=ee(J,M);var $=ie.get("length2");if($=ee($,M),Math.abs(B.endAngle-B.startAngle)<x)return D(G.states,T),G.ignore=!0,void(K&&(D(K.states,T),K.ignore=!0));if(function(gr){if(!gr.ignore)return!0;for(var Ua in gr.states)if(gr.states[Ua].ignore===!1)return!0;return!1}(G)){var q,U,le,ve,Te=(B.startAngle+B.endAngle)/2,Ce=Math.cos(Te),Pe=Math.sin(Te);g=B.cx,y=B.cy;var Be=Z==="inside"||Z==="inner";if(Z==="center")q=B.cx,U=B.cy,ve="center";else{var qe=(Be?(B.r+B.r0)/2*Ce:B.r*Ce)+g,dt=(Be?(B.r+B.r0)/2*Pe:B.r*Pe)+y;if(q=qe+3*Ce,U=dt+3*Pe,!Be){var Ne=qe+Ce*(J+w-B.r),Ge=dt+Pe*(J+w-B.r),pe=Ne+(Ce<0?-1:1)*$;q=te==="edge"?Ce<0?S+oe:S+M-oe:pe+(Ce<0?-W:W),U=Ge,le=[[qe,dt],[Ne,Ge],[pe,Ge]]}ve=Be?"center":te==="edge"?Ce>0?"right":"left":Ce>0?"left":"right"}var ot=Math.PI,Ve=0,et=X.get("rotate");if(Ae(et))Ve=et*(ot/180);else if(Z==="center")Ve=0;else if(et==="radial"||et===!0)Ve=Ce<0?-Te+ot:-Te;else if(et==="tangential"&&Z!=="outside"&&Z!=="outer"){var je=Math.atan2(Ce,Pe);je<0&&(je=2*ot+je),Pe>0&&(je=ot+je),Ve=je-ot}if(_=!!Ve,G.x=q,G.y=U,G.rotation=Ve,G.setStyle({verticalAlign:"middle"}),Be){G.setStyle({align:ve});var fr=G.states.select;fr&&(fr.x+=G.x,fr.y+=G.y)}else{var Qn=G.getBoundingRect().clone();Qn.applyTransform(G.getComputedTransform());var uo=(G.style.margin||0)+2.1;Qn.y-=uo/2,Qn.height+=uo,m.push({label:G,labelLine:K,position:Z,len:J,len2:$,minTurnAngle:ie.get("minTurnAngle"),maxSurfaceAngle:ie.get("maxSurfaceAngle"),surfaceNormal:new ge(Ce,Pe),linePoints:le,textAlign:ve,labelDistance:W,labelAlignTo:te,edgeDistance:oe,bleedMargin:se,rect:Qn,unconstrainedWidth:Qn.width,labelStyleWidth:G.style.width})}z.setTextConfig({inside:Be})}}),!_&&f.get("avoidLabelOverlap")&&function(E,z,B,G,K,V,X,Z){for(var W=[],te=[],oe=Number.MAX_VALUE,se=-Number.MAX_VALUE,ie=0;ie<E.length;ie++){var J=E[ie].label;Zp(E[ie])||(J.x<z?(oe=Math.min(oe,J.x),W.push(E[ie])):(se=Math.max(se,J.x),te.push(E[ie])))}for(ie=0;ie<E.length;ie++)if(!Zp(U=E[ie])&&U.linePoints){if(U.labelStyleWidth!=null)continue;J=U.label;var $,q=U.linePoints;$=U.labelAlignTo==="edge"?J.x<z?q[2][0]-U.labelDistance-X-U.edgeDistance:X+K-U.edgeDistance-q[2][0]-U.labelDistance:U.labelAlignTo==="labelLine"?J.x<z?oe-X-U.bleedMargin:X+K-se-U.bleedMargin:J.x<z?J.x-X-U.bleedMargin:X+K-J.x-U.bleedMargin,U.targetTextWidth=$,e1(U,$)}for(Q_(te,z,B,G,1,0,V,0,Z,se),Q_(W,z,B,G,-1,0,V,0,Z,oe),ie=0;ie<E.length;ie++){var U;if(!Zp(U=E[ie])&&U.linePoints){J=U.label,q=U.linePoints;var le=U.labelAlignTo==="edge",ve=J.style.padding,Te=ve?ve[1]+ve[3]:0,Ce=J.style.backgroundColor?0:Te,Pe=U.rect.width+Ce,Be=q[1][0]-q[2][0];le?J.x<z?q[2][0]=X+U.edgeDistance+Pe+U.labelDistance:q[2][0]=X+K-U.edgeDistance-Pe-U.labelDistance:(J.x<z?q[2][0]=J.x+U.labelDistance:q[2][0]=J.x-U.labelDistance,q[1][0]=q[2][0]+Be),q[1][1]=q[2][1]=J.y}}}(m,g,y,w,M,I,S,C);for(var A=0;A<m.length;A++){var k=m[A],L=k.label,O=k.labelLine,P=isNaN(L.x)||isNaN(L.y);if(L){L.setStyle({align:k.textAlign}),P&&(D(L.states,T),L.ignore=!0);var R=L.states.select;R&&(R.x+=L.x,R.y+=L.y)}if(O){var N=k.linePoints;P||!N?(D(O.states,T),O.ignore=!0):(y_(N,k.minTurnAngle),RC(N,k.surfaceNormal,k.maxSurfaceAngle),O.setShape({points:N}),L.__hostTarget.textGuideLineConfig={anchor:new ge(N[0][0],N[0][1])})}}}(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=s)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,i){var r=i.getData().getItemLayout(0);if(r){var o=e[0]-r.cx,a=e[1]-r.cy,s=Math.sqrt(o*o+a*a);return s<=r.r&&s>=r.r0}},t.type="pie",t}(Je);function ka(n,t,e){t=Y(t)&&{coordDimensions:t}||H({encodeDefine:n.getEncode()},t);var i=n.getSource(),r=Mp(i,t).dimensions,o=new Sp(r,n);return o.initData(i,e),o}var qp=function(){function n(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return n.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},n.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},n.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},n.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},n}(),lI=Ee(),uI=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new qp(he(this.getData,this),he(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){n.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return ka(this,{coordDimensions:["value"],encodeDefaulter:Se(Ch,this)})},t.prototype.getDataParams=function(e){var i=this.getData(),r=lI(i),o=r.seats;if(!o){var a=[];i.each(i.mapDimension("value"),function(l){a.push(l)}),o=r.seats=fg(a,i.hostModel.get("percentPrecision"))}var s=n.prototype.getDataParams.call(this,e);return s.percent=o[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Po(e,"labelLine",["show"]);var i=e.labelLine,r=e.emphasis.labelLine;i.show=i.show&&e.label.show,r.show=r.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}(it);function cI(n){n.registerChartView(sI),n.registerSeriesModel(uI),Rm("pie",n.registerAction),n.registerLayout(Se(rI,"pie")),n.registerProcessor(Yp("pie")),n.registerProcessor({seriesType:"pie",reset:function(t,e){var i=t.getData();i.filterSelf(function(r){var o=i.mapDimension("value"),a=i.get(o,r);return!(Ae(a)&&!isNaN(a)&&a<0)})}})}var hI=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),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}(be),jp=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qe).models[0]},t.type="cartesian2dAxis",t}(be);at(jp,Ta);var t1={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)"]}}},pI=de({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},t1),Kp=de({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}}},t1);const n1={category:pI,value:Kp,time:de({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Kp),log:ce({logBase:10},Kp)};var dI={value:1,category:1,time:1,log:1};function La(n,t,e,i){D(dI,function(r,o){var a=de(de({},n1[o],!0),i,!0),s=function(l){function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+o,c}return F(u,l),u.prototype.mergeDefaultAndTheme=function(c,h){var p=sa(this),d=p?tl(c):{};de(c,h.getTheme().get(o+"Axis")),de(c,this.getDefaultOption()),c.type=i1(c),p&&Wr(c,d,p)},u.prototype.optionUpdated=function(){this.option.type==="category"&&(this.__ordinalMeta=Tp.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+o,u.defaultOption=a,u}(e);n.registerComponentModel(s)}),n.registerSubTypeDefaulter(t+"Axis",i1)}function i1(n){return n.type||(n.data?"category":"value")}var fI=function(){function n(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return n.prototype.getAxis=function(t){return this._axes[t]},n.prototype.getAxes=function(){return j(this._dimList,function(t){return this._axes[t]},this)},n.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),He(this.getAxes(),function(e){return e.scale.type===t})},n.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},n}(),Jp=["x","y"];function r1(n){return n.type==="interval"||n.type==="time"}var gI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Jp,e}return F(t,n),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(r1(e)&&r1(i)){var r=e.getExtent(),o=i.getExtent(),a=this.dataToPoint([r[0],o[0]]),s=this.dataToPoint([r[1],o[1]]),l=r[1]-r[0],u=o[1]-o[0];if(l&&u){var c=(s[0]-a[0])/l,h=(s[1]-a[1])/u,p=a[0]-r[0]*c,d=a[1]-o[0]*h,f=this._transform=[c,0,0,h,p,d];this._invTransform=Ai([],f)}}},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"),r=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&r.contain(r.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 r=this.dataToPoint(e),o=this.dataToPoint(i),a=this.getArea(),s=new me(r[0],r[1],o[0]-r[0],o[1]-r[1]);return a.intersect(s)},t.prototype.dataToPoint=function(e,i,r){r=r||[];var o=e[0],a=e[1];if(this._transform&&o!=null&&isFinite(o)&&a!=null&&isFinite(a))return tt(r,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return r[0]=s.toGlobalCoord(s.dataToCoord(o,i)),r[1]=l.toGlobalCoord(l.dataToCoord(a,i)),r},t.prototype.clampData=function(e,i){var r=this.getAxis("x").scale,o=this.getAxis("y").scale,a=r.getExtent(),s=o.getExtent(),l=r.parse(e[0]),u=o.parse(e[1]);return(i=i||[])[0]=Math.min(Math.max(Math.min(a[0],a[1]),l),Math.max(a[0],a[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 r=[];if(this._invTransform)return tt(r,e,this._invTransform);var o=this.getAxis("x"),a=this.getAxis("y");return r[0]=o.coordToData(o.toLocalCoord(e[0]),i),r[1]=a.coordToData(a.toLocalCoord(e[1]),i),r},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(),r=this.getAxis("y").getGlobalExtent(),o=Math.min(i[0],i[1])-e,a=Math.min(r[0],r[1])-e,s=Math.max(i[0],i[1])-o+e,l=Math.max(r[0],r[1])-a+e;return new me(o,a,s,l)},t}(fI),yI=function(n){function t(e,i,r,o,a){var s=n.call(this,e,i,r)||this;return s.index=0,s.type=o||"value",s.position=a||"bottom",s}return F(t,n),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}(Rn);function $p(n,t,e){e=e||{};var i=n.coordinateSystem,r=t.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,f=u==="x"?[h[2]-d,h[3]+d]:[h[0]-d,h[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=[u==="y"?f[p[l]]:h[0],u==="x"?f[p[l]]:h[3]],o.rotation=Math.PI/2*(u==="x"?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Vn(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=t.get(["axisLabel","rotate"]);return o.labelRotate=l==="top"?-y:y,o.z2=1,o}function o1(n){return n.get("coordinateSystem")==="cartesian2d"}function a1(n){var t={xAxisModel:null,yAxisModel:null};return D(t,function(e,i){var r=i.replace(/Model$/,""),o=n.getReferringComponents(r,Qe).models[0];t[i]=o}),t}var Qp=Math.log;function s1(n,t,e){var i=gi.prototype,r=i.getTicks.call(e),o=i.getTicks.call(e,!0),a=r.length-1,s=i.getInterval.call(e),l=U0(n,t),u=l.extent,c=l.fixMin,h=l.fixMax;if(n.type==="log"){var p=Qp(n.base);u=[Qp(u[0])/p,Qp(u[1])/p]}n.setExtent(u[0],u[1]),n.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var d=i.getExtent.call(n);c&&(u[0]=d[0]),h&&(u[1]=d[1]);var f=i.getInterval.call(n),g=u[0],y=u[1];if(c&&h)f=(y-g)/a;else if(c)for(y=u[0]+f*a;y<u[1]&&isFinite(y)&&isFinite(u[1]);)f=Ip(f),y=u[0]+f*a;else if(h)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=Ip(f),g=u[1]-f*a;else{n.getTicks().length-1>a&&(f=Ip(f));var v=f*a;(g=We((y=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=We(v)):y>0&&u[1]<=0&&(y=0,g=-We(v))}var m=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(n,g+f*m,y+f*_),i.setInterval.call(n,f),(m||_)&&i.setNiceExtent.call(n,g+f,y-f)}var vI=function(){function n(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Jp,this._initCartesian(t,e,i),this.model=t}return n.prototype.getRect=function(){return this._rect},n.prototype.update=function(t,e){var i=this._axesMap;function r(a){var s,l=Oe(a),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var p=a[+l[h]],d=p.model,f=p.scale;Cp(f)&&d.get("alignTicks")&&d.get("interval")==null?c.push(p):(Qr(f,d),Cp(f)&&(s=p))}c.length&&(s||Qr((s=c.pop()).scale,s.model),D(c,function(g){s1(g.scale,g.model,s.scale)}))}}this._updateScale(t,this.model),r(i.x),r(i.y);var o={};D(i.x,function(a){l1(i,"y",a,o)}),D(i.y,function(a){l1(i,"x",a,o)}),this.resize(this.model,e)},n.prototype.resize=function(t,e,i){var r=t.getBoxLayoutParams(),o=!i&&t.get("containLabel"),a=It(r,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var s=this._axesList;function l(){D(s,function(u){var c=u.isHorizontal(),h=c?[0,a.width]:[0,a.height],p=u.inverse?1:0;u.setExtent(h[p],h[1-p]),function(d,f){var g=d.getExtent(),y=g[0]+g[1];d.toGlobalCoord=d.dim==="x"?function(v){return v+f}:function(v){return y-v+f},d.toLocalCoord=d.dim==="x"?function(v){return v-f}:function(v){return y-v+f}}(u,c?a.x:a.y)})}l(),o&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=function(d){var f=d.model,g=d.scale;if(f.get(["axisLabel","show"])&&!g.isBlank()){var y,v,m=g.getExtent();v=g instanceof Ap?g.count():(y=g.getTicks()).length;var _,x=d.getLabelModel(),b=eo(d),w=1;v>40&&(w=Math.ceil(v/40));for(var M=0;M<v;M+=w){var S=b(y?y[M]:{value:m[0]+M},M),C=fC(x.getTextRect(S),x.get("rotate")||0);_?_.union(C):_=C}return _}}(u);if(c){var h=u.isHorizontal()?"height":"width",p=u.model.get(["axisLabel","margin"]);a[h]-=c[h]+p,u.position==="top"?a.y+=c.height+p:u.position==="left"&&(a.x+=c.width+p)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()})},n.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},n.prototype.getAxes=function(){return this._axesList.slice()},n.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}ne(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var r=0,o=this._coordsList;r<o.length;r++)if(o[r].getAxis("x").index===t||o[r].getAxis("y").index===e)return o[r]},n.prototype.getCartesians=function(){return this._coordsList.slice()},n.prototype.convertToPixel=function(t,e,i){var r=this._findConvertTarget(e);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},n.prototype.convertFromPixel=function(t,e,i){var r=this._findConvertTarget(e);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},n.prototype._findConvertTarget=function(t){var e,i,r=t.seriesModel,o=t.xAxisModel||r&&r.getReferringComponents("xAxis",Qe).models[0],a=t.yAxisModel||r&&r.getReferringComponents("yAxis",Qe).models[0],s=t.gridModel,l=this._coordsList;return r?we(l,e=r.coordinateSystem)<0&&(e=null):o&&a?e=this.getCartesian(o.componentIndex,a.componentIndex):o?i=this.getAxis("x",o.componentIndex):a?i=this.getAxis("y",a.componentIndex):s&&s.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:i}},n.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},n.prototype._initCartesian=function(t,e,i){var r=this,o=this,a={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)return this._axesMap={},void(this._axesList=[]);function u(c){return function(h,p){if(ed(h,t)){var d=h.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=a.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=a.left?"right":"left"),a[d]=!0;var f=new yI(c,Vl(h),[0,0],h.get("type"),d),g=f.type==="category";f.onBand=g&&h.get("boundaryGap"),f.inverse=h.get("inverse"),h.axis=f,f.model=h,f.grid=o,f.index=p,o._axesList.push(f),s[c][p]=f,l[c]++}}}this._axesMap=s,D(s.x,function(c,h){D(s.y,function(p,d){var f="x"+h+"y"+d,g=new gI(f);g.master=r,g.model=t,r._coordsMap[f]=g,r._coordsList.push(g),g.addAxis(c),g.addAxis(p)})})},n.prototype._updateScale=function(t,e){function i(r,o){D(Fl(r,o.dim),function(a){o.scale.unionExtentFromData(r,a)})}D(this._axesList,function(r){if(r.scale.setExtent(1/0,-1/0),r.type==="category"){var o=r.model.get("categorySortInfo");r.scale.setSortInfo(o)}}),t.eachSeries(function(r){if(o1(r)){var o=a1(r),a=o.xAxisModel,s=o.yAxisModel;if(!ed(a,e)||!ed(s,e))return;var l=this.getCartesian(a.componentIndex,s.componentIndex),u=r.getData(),c=l.getAxis("x"),h=l.getAxis("y");i(u,c),i(u,h)}},this)},n.prototype.getTooltipAxes=function(t){var e=[],i=[];return D(this.getCartesians(),function(r){var o=t!=null&&t!=="auto"?r.getAxis(t):r.getBaseAxis(),a=r.getOtherAxis(o);we(e,o)<0&&e.push(o),we(i,a)<0&&i.push(a)}),{baseAxes:e,otherAxes:i}},n.create=function(t,e){var i=[];return t.eachComponent("grid",function(r,o){var a=new n(r,t,e);a.name="grid_"+o,a.resize(r,e,!0),r.coordinateSystem=a,i.push(a)}),t.eachSeries(function(r){if(o1(r)){var o=a1(r),a=o.xAxisModel,s=o.yAxisModel,l=a.getCoordSysModel().coordinateSystem;r.coordinateSystem=l.getCartesian(a.componentIndex,s.componentIndex)}}),i},n.dimensions=Jp,n}();function ed(n,t){return n.getCoordSysModel()===t}function l1(n,t,e,i){e.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=n[t],a=e.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(l!=null)u1(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&u1(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(h){return h.dim+"_"+h.index}}function u1(n){return n&&n.type!=="category"&&n.type!=="time"&&function(t){var e=t.scale.getExtent(),i=e[0],r=e[1];return!(i>0&&r>0||i<0&&r<0)}(n)}var _i=Math.PI,Pt=function(){function n(t,e){this.group=new _e,this.opt=e,this.axisModel=t,ce(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new _e({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return n.prototype.hasBuilder=function(t){return!!c1[t]},n.prototype.add=function(t){c1[t](this.opt,this.axisModel,this.group,this._transformGroup)},n.prototype.getGroup=function(){return this.group},n.innerTextLayout=function(t,e,i){var r,o,a=vc(e-t);return ko(a)?(o=i>0?"top":"bottom",r="center"):ko(a-_i)?(o=i>0?"bottom":"top",r="center"):(o="middle",r=a>0&&a<_i?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:r,textVerticalAlign:o}},n.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},n.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},n}(),c1={axisLine:function(n,t,e,i){var r=t.get(["axisLine","show"]);if(r==="auto"&&n.handleAutoShown&&(r=n.handleAutoShown("axisLine")),r){var o=t.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(tt(s,s,a),tt(l,l,a));var c=H({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ut({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:n.strokeContainThreshold||5,silent:!0,z2:1});$o(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var p=t.get(["axisLine","symbol"]);if(p!=null){var d=t.get(["axisLine","symbolSize"]);Q(p)&&(p=[p,p]),(Q(d)||Ae(d))&&(d=[d,d]);var f=jh(t.get(["axisLine","symbolOffset"])||0,d),g=d[0],y=d[1];D([{rotate:n.rotation+Math.PI/2,offset:f[0],r:0},{rotate:n.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(v,m){if(p[m]!=="none"&&p[m]!=null){var _=_t(p[m],-g/2,-y/2,g,y,c.stroke,!0),x=v.r+v.offset,b=u?l:s;_.attr({rotation:v.rotate,x:b[0]+x*Math.cos(n.rotation),y:b[1]-x*Math.sin(n.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(n,t,e,i){var r=function(a,s,l,u){var c=l.axis,h=l.getModel("axisTick"),p=h.get("show");if(p==="auto"&&u.handleAutoShown&&(p=u.handleAutoShown("axisTick")),p&&!c.scale.isBlank()){for(var d=h.getModel("lineStyle"),f=u.tickDirection*h.get("length"),g=d1(c.getTicksCoords(),s.transform,f,ce(d.getLineStyle(),{stroke:l.get(["axisLine","lineStyle","color"])}),"ticks"),y=0;y<g.length;y++)a.add(g[y]);return g}}(e,i,t,n),o=function(a,s,l,u){var c=l.axis;if(Vn(u.axisLabelShow,l.get(["axisLabel","show"]))&&!c.scale.isBlank()){var h=l.getModel("axisLabel"),p=h.get("margin"),d=c.getViewLabels(),f=(Vn(u.labelRotate,h.get("rotate"))||0)*_i/180,g=Pt.innerTextLayout(u.rotation,f,u.labelDirection),y=l.getCategories&&l.getCategories(!0),v=[],m=Pt.isLabelSilent(l),_=l.get("triggerEvent");return D(d,function(x,b){var w=c.scale.type==="ordinal"?c.scale.getRawOrdinalNumber(x.tickValue):x.tickValue,M=x.formattedLabel,S=x.rawLabel,C=h;if(y&&y[w]){var I=y[w];ne(I)&&I.textStyle&&(C=new Le(I.textStyle,h,l.ecModel))}var T=C.getTextColor()||l.get(["axisLine","lineStyle","color"]),A=c.dataToCoord(w),k=C.getShallow("align",!0)||g.textAlign,L=xe(C.getShallow("alignMinLabel",!0),k),O=xe(C.getShallow("alignMaxLabel",!0),k),P=C.getShallow("verticalAlign",!0)||C.getShallow("baseline",!0)||g.textVerticalAlign,R=xe(C.getShallow("verticalAlignMinLabel",!0),P),N=xe(C.getShallow("verticalAlignMaxLabel",!0),P),E=new Me({x:A,y:u.labelOffset+u.labelDirection*p,rotation:g.rotation,silent:m,z2:10+(x.level||0),style:nt(C,{text:M,align:b===0?L:b===d.length-1?O:k,verticalAlign:b===0?R:b===d.length-1?N:P,fill:ue(T)?T(c.type==="category"?S:c.type==="value"?w+"":w,b):T})});if(E.anid="label_"+w,_){var z=Pt.makeAxisEventDataBase(l);z.targetType="axisLabel",z.value=S,z.tickIndex=b,c.type==="category"&&(z.dataIndex=w),ye(E).eventData=z}s.add(E),E.updateTransform(),v.push(E),a.add(E),E.decomposeTransform()}),v}}(e,i,t,n);(function(a,s,l){if(!Y0(a.axis)){var u=a.get(["axisLabel","showMinLabel"]),c=a.get(["axisLabel","showMaxLabel"]);l=l||[];var h=(s=s||[])[0],p=s[1],d=s[s.length-1],f=s[s.length-2],g=l[0],y=l[1],v=l[l.length-1],m=l[l.length-2];u===!1?(en(h),en(g)):h1(h,p)&&(u?(en(p),en(y)):(en(h),en(g))),c===!1?(en(d),en(v)):h1(f,d)&&(c?(en(f),en(m)):(en(d),en(v)))}})(t,o,r),function(a,s,l,u){var c=l.axis,h=l.getModel("minorTick");if(h.get("show")&&!c.scale.isBlank()){var p=c.getMinorTicksCoords();if(p.length)for(var d=h.getModel("lineStyle"),f=u*h.get("length"),g=ce(d.getLineStyle(),ce(l.getModel("axisTick").getLineStyle(),{stroke:l.get(["axisLine","lineStyle","color"])})),y=0;y<p.length;y++)for(var v=d1(p[y],s.transform,f,g,"minorticks_"+y),m=0;m<v.length;m++)a.add(v[m])}}(e,i,t,n.tickDirection),t.get(["axisLabel","hideOverlap"])&&x_(v_(j(o,function(a){return{label:a,priority:a.z2,defaultAttr:{ignore:a.ignore}}})))},axisName:function(n,t,e,i){var r=Vn(n.axisName,t.get("name"));if(r){var o,a,s=t.get("nameLocation"),l=n.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,h=t.axis.getExtent(),p=h[0]>h[1]?-1:1,d=[s==="start"?h[0]-p*c:s==="end"?h[1]+p*c:(h[0]+h[1])/2,p1(s)?n.labelOffset+l*c:0],f=t.get("nameRotate");f!=null&&(f=f*_i/180),p1(s)?o=Pt.innerTextLayout(n.rotation,f??n.rotation,l):(o=function(b,w,M,S){var C,I,T=vc(M-b),A=S[0]>S[1],k=w==="start"&&!A||w!=="start"&&A;return ko(T-_i/2)?(I=k?"bottom":"top",C="center"):ko(T-1.5*_i)?(I=k?"top":"bottom",C="center"):(I="middle",C=T<1.5*_i&&T>_i/2?k?"left":"right":k?"right":"left"),{rotation:T,textAlign:C,textVerticalAlign:I}}(n.rotation,s,f||0,h),(a=n.axisNameAvailableWidth)!=null&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=t.get("nameTruncate",!0)||{},v=y.ellipsis,m=Vn(n.nameTruncateMaxWidth,y.maxWidth,a),_=new Me({x:d[0],y:d[1],rotation:o.rotation,silent:Pt.isLabelSilent(t),style:nt(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(ea({el:_,componentModel:t,itemName:r}),_.__fullText=r,_.anid="name",t.get("triggerEvent")){var x=Pt.makeAxisEventDataBase(t);x.targetType="axisName",x.name=r,ye(_).eventData=x}i.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function en(n){n&&(n.ignore=!0)}function h1(n,t){var e=n&&n.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(e&&i){var r=yo([]);return Ii(r,r,-n.rotation),e.applyTransform(_n([],r,n.getLocalTransform())),i.applyTransform(_n([],r,t.getLocalTransform())),e.intersect(i)}}function p1(n){return n==="middle"||n==="center"}function d1(n,t,e,i,r){for(var o=[],a=[],s=[],l=0;l<n.length;l++){var u=n[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=e,t&&(tt(a,a,t),tt(s,s,t));var c=new ut({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});$o(c.shape,c.style.lineWidth),c.anid=r+"_"+n[l].tickValue,o.push(c)}return o}function td(n,t){return n==="all"||Y(n)&&we(n,t)>=0||n===t}function nd(n){var t=(n.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Pa(n)]}function id(n){return!!n.get(["handle","show"])}function Pa(n){return n.type+"||"+n.id}var f1={},Oa=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r,o){this.axisPointerClass&&function(a){var s=nd(a);if(s){var l=s.axisPointerModel,u=s.axis.scale,c=l.option,h=l.get("status"),p=l.get("value");p!=null&&(p=u.parse(p));var d=id(l);h==null&&(c.status=d?"show":"hide");var f=u.getExtent().slice();f[0]>f[1]&&f.reverse(),(p==null||p>f[1])&&(p=f[1]),p<f[0]&&(p=f[0]),c.value=p,d&&(c.status=s.axis.scale.isBlank()?"hide":"show")}}(e),n.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,r,!0)},t.prototype.updateAxisPointer=function(e,i,r,o){this._doUpdateAxisPointerClass(e,r,!1)},t.prototype.remove=function(e,i){var r=this._axisPointer;r&&r.remove(i)},t.prototype.dispose=function(e,i){this._disposeAxisPointer(i),n.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,i,r){var o=t.getAxisPointerClass(this.axisPointerClass);if(o){var a=function(s){var l=nd(s);return l&&l.axisPointerModel}(e);a?(this._axisPointer||(this._axisPointer=new o)).render(e,a,i,r):this._disposeAxisPointer(i)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,i){f1[e]=i},t.getAxisPointerClass=function(e){return e&&f1[e]},t.type="axis",t}(Xe),rd=Ee(),mI=["axisLine","axisTickLabel","axisName"],_I=["splitArea","splitLine","minorSplitLine"],g1=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return F(t,n),t.prototype.render=function(e,i,r,o){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),e.get("show")){var s=e.getCoordSysModel(),l=$p(s,e),u=new Pt(e,H({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),p=0;p<h.length;p++)if(Cp(h[p].getOtherAxis(e.axis).scale))return!0;return!1}},l));D(mI,u.add,u),this._axisGroup.add(u.getGroup()),D(_I,function(c){e.get([c,"show"])&&xI[c](this,this._axisGroup,e,s)},this),o&&o.type==="changeAxisOrder"&&o.isInitSort||Ws(a,this._axisGroup,e),n.prototype.render.call(this,e,i,r,o)}},t.prototype.remove=function(){rd(this).splitAreaColors=null},t.type="cartesianAxis",t}(Oa),xI={splitLine:function(n,t,e,i){var r=e.axis;if(!r.scale.isBlank()){var o=e.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=Y(s)?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),c=0,h=r.getTicksCoords({tickModel:o}),p=[],d=[],f=a.getLineStyle(),g=0;g<h.length;g++){var y=r.toGlobalCoord(h[g].coord);u?(p[0]=y,p[1]=l.y,d[0]=y,d[1]=l.y+l.height):(p[0]=l.x,p[1]=y,d[0]=l.x+l.width,d[1]=y);var v=c++%s.length,m=h[g].tickValue,_=new ut({anid:m!=null?"line_"+h[g].tickValue:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:d[0],y2:d[1]},style:ce({stroke:s[v]},f),silent:!0});$o(_.shape,f.lineWidth),t.add(_)}}},minorSplitLine:function(n,t,e,i){var r=e.axis,o=e.getModel("minorSplitLine").getModel("lineStyle"),a=i.coordinateSystem.getRect(),s=r.isHorizontal(),l=r.getMinorTicksCoords();if(l.length)for(var u=[],c=[],h=o.getLineStyle(),p=0;p<l.length;p++)for(var d=0;d<l[p].length;d++){var f=r.toGlobalCoord(l[p][d].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new ut({anid:"minor_line_"+l[p][d].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:h,silent:!0});$o(g.shape,h.lineWidth),t.add(g)}},splitArea:function(n,t,e,i){(function(r,o,a,s){var l=a.axis;if(!l.scale.isBlank()){var u=a.getModel("splitArea"),c=u.getModel("areaStyle"),h=c.get("color"),p=s.coordinateSystem.getRect(),d=l.getTicksCoords({tickModel:u,clamp:!0});if(d.length){var f=h.length,g=rd(r).splitAreaColors,y=re(),v=0;if(g)for(var m=0;m<d.length;m++){var _=g.get(d[m].tickValue);if(_!=null){v=(_+(f-1)*m)%f;break}}var x=l.toGlobalCoord(d[0].coord),b=c.getAreaStyle();for(h=Y(h)?h:[h],m=1;m<d.length;m++){var w=l.toGlobalCoord(d[m].coord),M=void 0,S=void 0,C=void 0,I=void 0;l.isHorizontal()?(M=x,S=p.y,C=w-M,I=p.height,x=M+C):(M=p.x,S=x,C=p.width,x=S+(I=w-S));var T=d[m-1].tickValue;T!=null&&y.set(T,v),o.add(new ke({anid:T!=null?"area_"+T:null,shape:{x:M,y:S,width:C,height:I},style:ce({fill:h[v]},b),autoBatch:!0,silent:!0})),v=(v+1)%f}rd(r).splitAreaColors=y}}})(n,t,e,i)}},y1=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="xAxis",t}(g1),bI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=y1.type,e}return F(t,n),t.type="yAxis",t}(g1),wI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="grid",e}return F(t,n),t.prototype.render=function(e,i){this.group.removeAll(),e.get("show")&&this.group.add(new ke({shape:e.coordinateSystem.getRect(),style:ce({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Xe),v1={offset:0};function SI(n){n.registerComponentView(wI),n.registerComponentModel(hI),n.registerCoordinateSystem("cartesian2d",vI),La(n,"x",jp,v1),La(n,"y",jp,v1),n.registerComponentView(y1),n.registerComponentView(bI),n.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function MI(n){n.eachSeriesByType("radar",function(t){var e=t.getData(),i=[],r=t.coordinateSystem;if(r){var o=r.getIndicatorAxes();D(o,function(a,s){e.each(e.mapDimension(o[s].dim),function(l,u){i[u]=i[u]||[];var c=r.dataToPoint(l,s);i[u][s]=m1(c)?c:_1(r)})}),e.each(function(a){var s=pf(i[a],function(l){return m1(l)})||_1(r);i[a].push(s.slice()),e.setItemLayout(a,i[a])})}})}function m1(n){return!isNaN(n[0])&&!isNaN(n[1])}function _1(n){return[n.cx,n.cy]}function TI(n){var t=n.polar;if(t){Y(t)||(t=[t]);var e=[];D(t,function(i,r){i.indicator?(i.type&&!i.shape&&(i.shape=i.type),n.radar=n.radar||[],Y(n.radar)||(n.radar=[n.radar]),n.radar.push(i)):e.push(i)}),n.polar=e}D(n.series,function(i){i&&i.type==="radar"&&i.polarIndex&&(i.radarIndex=i.polarIndex)})}var CI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){var o=e.coordinateSystem,a=this.group,s=e.getData(),l=this._data;function u(p,d){var f=p.getItemVisual(d,"symbol")||"circle";if(f!=="none"){var g=Nm(p.getItemVisual(d,"symbolSize")),y=_t(f,-1,-1,2,2),v=p.getItemVisual(d,"symbolRotate")||0;return y.attr({style:{strokeNoScale:!0},z2:100,scaleX:g[0]/2,scaleY:g[1]/2,rotation:v*Math.PI/180||0}),y}}function c(p,d,f,g,y,v){f.removeAll();for(var m=0;m<d.length-1;m++){var _=u(g,y);_&&(_.__dimIdx=m,p[m]?(_.setPosition(p[m]),zr[v?"initProps":"updateProps"](_,{x:d[m][0],y:d[m][1]},e,y)):_.setPosition(d[m]),f.add(_))}}function h(p){return j(p,function(d){return[o.cx,o.cy]})}s.diff(l).add(function(p){var d=s.getItemLayout(p);if(d){var f=new cn,g=new qt,y={shape:{points:d}};f.shape.points=h(d),g.shape.points=h(d),Ye(f,y,e,p),Ye(g,y,e,p);var v=new _e,m=new _e;v.add(g),v.add(f),v.add(m),c(g.shape.points,d,m,s,p,!0),s.setItemGraphicEl(p,v)}}).update(function(p,d){var f=l.getItemGraphicEl(d),g=f.childAt(0),y=f.childAt(1),v=f.childAt(2),m={shape:{points:s.getItemLayout(p)}};m.shape.points&&(c(g.shape.points,m.shape.points,v,s,p,!1),Er(y),Er(g),ze(g,m,e),ze(y,m,e),s.setItemGraphicEl(p,f))}).remove(function(p){a.remove(l.getItemGraphicEl(p))}).execute(),s.eachItemGraphicEl(function(p,d){var f=s.getItemModel(d),g=p.childAt(0),y=p.childAt(1),v=p.childAt(2),m=s.getItemVisual(d,"style"),_=m.fill;a.add(p),g.useStyle(ce(f.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Zn(g,f,"lineStyle"),Zn(y,f,"areaStyle");var x=f.getModel("areaStyle"),b=x.isEmpty()&&x.parentModel.isEmpty();y.ignore=b,D(["emphasis","select","blur"],function(S){var C=f.getModel([S,"areaStyle"]),I=C.isEmpty()&&C.parentModel.isEmpty();y.ensureState(S).ignore=I&&b}),y.useStyle(ce(x.getAreaStyle(),{fill:_,opacity:.7,decal:m.decal}));var w=f.getModel("emphasis"),M=w.getModel("itemStyle").getItemStyle();v.eachChild(function(S){if(S instanceof Tt){var C=S.style;S.useStyle(H({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},m))}else S.useStyle(m),S.setColor(_),S.style.strokeNoScale=!0;S.ensureState("emphasis").style=ae(M);var I=s.getStore().get(s.getDimensionIndex(S.__dimIdx),d);(I==null||isNaN(I))&&(I=""),Dn(S,kn(f),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:S.__dimIdx,defaultText:I,inheritColor:_,defaultOpacity:m.opacity})}),ln(p,w.get("focus"),w.get("blurScope"),w.get("disabled"))}),this._data=s},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(Je),II=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return F(t,n),t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new qp(he(this.getData,this),he(this.getRawData,this))},t.prototype.getInitialData=function(e,i){return ka(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,i,r){var o=this.getData(),a=this.coordinateSystem.getIndicatorAxes(),s=this.getData().getName(e),l=s===""?this.name:s,u=cm(this,e);return jn("section",{header:l,sortBlocks:!0,blocks:j(a,function(c){var h=o.get(o.mapDimension(c.dim),e);return jn("nameValue",{markerType:"subItem",markerColor:u,name:c.name,value:h,sortParam:h})})})},t.prototype.getTooltipPosition=function(e){if(e!=null){for(var i=this.getData(),r=this.coordinateSystem,o=i.getValues(j(r.dimensions,function(u){return i.mapDimension(u)}),e),a=0,s=o.length;a<s;a++)if(!isNaN(o[a])){var l=r.getIndicatorAxes();return r.coordToPoint(l[a].dataToCoord(o[a]),a)}}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(it),Ra=n1.value;function Jl(n,t){return ce({show:t},n)}var AI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),i=this.get("splitNumber"),r=this.get("scale"),o=this.get("axisLine"),a=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),p=this.get("triggerEvent"),d=j(this.get("indicator")||[],function(f){f.max!=null&&f.max>0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var g=l;f.color!=null&&(g=ce({color:f.color},l));var y=de(ae(f),{boundaryGap:e,splitNumber:i,scale:r,axisLine:o,axisTick:a,axisLabel:s,name:f.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:p},!1);if(Q(c)){var v=y.name;y.name=c.replace("{value}",v??"")}else ue(c)&&(y.name=c(y.name,y));var m=new Le(y,null,this.ecModel);return at(m,Ta.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:de({lineStyle:{color:"#bbb"}},Ra.axisLine),axisLabel:Jl(Ra.axisLabel,!1),axisTick:Jl(Ra.axisTick,!1),splitLine:Jl(Ra.splitLine,!0),splitArea:Jl(Ra.splitArea,!0),indicator:[]},t}(be),DI=["axisLine","axisTickLabel","axisName"],kI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var i=e.coordinateSystem;D(j(i.getIndicatorAxes(),function(r){var o=r.model.get("showName")?r.name:"";return new Pt(r.model,{axisName:o,position:[i.cx,i.cy],rotation:r.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(r){D(DI,r.add,r),this.group.add(r.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var i=e.coordinateSystem,r=i.getIndicatorAxes();if(r.length){var o=e.get("shape"),a=e.getModel("splitLine"),s=e.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),c=a.get("show"),h=s.get("show"),p=l.get("color"),d=u.get("color"),f=Y(p)?p:[p],g=Y(d)?d:[d],y=[],v=[];if(o==="circle")for(var m=r[0].getTicksCoords(),_=i.cx,x=i.cy,b=0;b<m.length;b++)c&&y[k(y,f,b)].push(new In({shape:{cx:_,cy:x,r:m[b].coord}})),h&&b<m.length-1&&v[k(v,g,b)].push(new Rr({shape:{cx:_,cy:x,r0:m[b].coord,r:m[b+1].coord}}));else{var w,M=j(r,function(L,O){var P=L.getTicksCoords();return w=w==null?P.length-1:Math.min(P.length-1,w),j(P,function(R){return i.coordToPoint(R.coord,O)})}),S=[];for(b=0;b<=w;b++){for(var C=[],I=0;I<r.length;I++)C.push(M[I][b]);C[0]&&C.push(C[0].slice()),c&&y[k(y,f,b)].push(new qt({shape:{points:C}})),h&&S&&v[k(v,g,b-1)].push(new cn({shape:{points:C.concat(S)}})),S=C.slice().reverse()}}var T=l.getLineStyle(),A=u.getAreaStyle();D(v,function(L,O){this.group.add(Kt(L,{style:ce({stroke:"none",fill:g[O%g.length]},A),silent:!0}))},this),D(y,function(L,O){this.group.add(Kt(L,{style:ce({fill:"none",stroke:f[O%f.length]},T),silent:!0}))},this)}function k(L,O,P){var R=P%O.length;return L[R]=L[R]||[],R}},t.type="radar",t}(Xe),LI=function(n){function t(e,i,r){var o=n.call(this,e,i,r)||this;return o.type="value",o.angle=0,o.name="",o}return F(t,n),t}(Rn),PI=function(){function n(t,e,i){this.dimensions=[],this._model=t,this._indicatorAxes=j(t.getIndicatorModels(),function(r,o){var a="indicator_"+o,s=new LI(a,new gi);return s.name=r.get("name"),s.model=r,r.axis=s,this.dimensions.push(a),s},this),this.resize(t,i)}return n.prototype.getIndicatorAxes=function(){return this._indicatorAxes},n.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},n.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},n.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,r=Math.sqrt(e*e+i*i);e/=r,i/=r;for(var o,a=Math.atan2(-i,e),s=1/0,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<s&&(o=c,l=u,s=h)}return[l,+(o&&o.coordToData(r))]},n.prototype.resize=function(t,e){var i=t.get("center"),r=e.getWidth(),o=e.getHeight(),a=Math.min(r,o)/2;this.cx=ee(i[0],r),this.cy=ee(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var s=t.get("radius");(Q(s)||Ae(s))&&(s=[0,s]),this.r0=ee(s[0],a),this.r=ee(s[1],a),D(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},n.prototype.update=function(t,e){var i=this._indicatorAxes,r=this._model;D(i,function(s){s.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(s,l){if(s.get("coordinateSystem")==="radar"&&t.getComponent("radar",s.get("radarIndex"))===r){var u=s.getData();D(i,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var o=r.get("splitNumber"),a=new gi;a.setExtent(0,o),a.setInterval(1),D(i,function(s,l){s1(s.scale,s.model,a)})},n.prototype.convertToPixel=function(t,e,i){return console.warn("Not implemented."),null},n.prototype.convertFromPixel=function(t,e,i){return console.warn("Not implemented."),null},n.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},n.create=function(t,e){var i=[];return t.eachComponent("radar",function(r){var o=new n(r,t,e);i.push(o),r.coordinateSystem=o}),t.eachSeriesByType("radar",function(r){r.get("coordinateSystem")==="radar"&&(r.coordinateSystem=i[r.get("radarIndex")||0])}),i},n.dimensions=[],n}();function OI(n){n.registerCoordinateSystem("radar",PI),n.registerComponentModel(AI),n.registerComponentView(kI),n.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(i){e.setItemVisual(i,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}function RI(n){Lt(OI),n.registerChartView(CI),n.registerSeriesModel(II),n.registerLayout(MI),n.registerProcessor(Yp("radar")),n.registerPreprocessor(TI)}var x1="\0_ec_interaction_mutex";function b1(n,t){return!!od(n)[t]}function od(n){return n[x1]||(n[x1]={})}fn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},rt);var NI=function(n){function t(e){var i=n.call(this)||this;i._zr=e;var r=he(i._mousedownHandler,i),o=he(i._mousemoveHandler,i),a=he(i._mouseupHandler,i),s=he(i._mousewheelHandler,i),l=he(i._pinchHandler,i);return i.enable=function(u,c){this.disable(),this._opt=ce(ae(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),u!==!0&&u!=="move"&&u!=="pan"||(e.on("mousedown",r),e.on("mousemove",o),e.on("mouseup",a)),u!==!0&&u!=="scale"&&u!=="zoom"||(e.on("mousewheel",s),e.on("pinch",l))},i.disable=function(){e.off("mousedown",r),e.off("mousemove",o),e.off("mouseup",a),e.off("mousewheel",s),e.off("pinch",l)},i}return F(t,n),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(!Af(e)){for(var i=e.target;i;){if(i.draggable)return;i=i.__hostTarget||i.parent}var r=e.offsetX,o=e.offsetY;this.pointerChecker&&this.pointerChecker(e,r,o)&&(this._x=r,this._y=o,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&$l("moveOnMouseMove",e,this._opt)&&e.gestureEvent!=="pinch"&&!b1(this._zr,"globalPan")){var i=e.offsetX,r=e.offsetY,o=this._x,a=this._y,s=i-o,l=r-a;this._x=i,this._y=r,this._opt.preventDefaultMouseMove&&Ti(e.event),w1(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:o,oldY:a,newX:i,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Af(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var i=$l("zoomOnMouseWheel",e,this._opt),r=$l("moveOnMouseWheel",e,this._opt),o=e.wheelDelta,a=Math.abs(o),s=e.offsetX,l=e.offsetY;if(o!==0&&(i||r)){if(i){var u=a>3?1.4:a>1?1.2:1.1;ad(this,"zoom","zoomOnMouseWheel",e,{scale:o>0?u:1/u,originX:s,originY:l,isAvailableBehavior:null})}if(r){var c=Math.abs(o);ad(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(o>0?1:-1)*(c>3?.4:c>1?.15:.05),originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){b1(this._zr,"globalPan")||ad(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Vt);function ad(n,t,e,i,r){n.pointerChecker&&n.pointerChecker(i,r.originX,r.originY)&&(Ti(i.event),w1(n,t,e,i,r))}function w1(n,t,e,i,r){r.isAvailableBehavior=he($l,null,e,i),n.trigger(t,r)}function $l(n,t,e){var i=e[n];return!n||i&&(!Q(i)||t.event[i+"Key"])}var sd,EI={axisPointer:1,tooltip:1,brush:1};function S1(n,t,e){var i=t.getComponentByElement(n.topTarget),r=i&&i.coordinateSystem;return i&&i!==e&&!EI.hasOwnProperty(i.mainType)&&r&&r.model!==e}function M1(n){Q(n)&&(n=new DOMParser().parseFromString(n,"text/xml"));var t=n;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Ql={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},T1=Oe(Ql),eu={"alignment-baseline":"textBaseline","stop-color":"stopColor"},C1=Oe(eu),zI=function(){function n(){this._defs={},this._root=null}return n.prototype.parse=function(t,e){e=e||{};var i=M1(t);this._defsUsePending=[];var r=new _e;this._root=r;var o=[],a=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||e.width),l=parseFloat(i.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Et(i,r,null,!0,!1);for(var u,c,h=i.firstChild;h;)this._parseNode(h,r,o,null,!1,!1),h=h.nextSibling;if(function(f,g){for(var y=0;y<g.length;y++){var v=g[y];v[0].style[v[1]]=f[v[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],a){var p=tu(a);p.length>=4&&(u={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(u&&s!=null&&l!=null&&(c=R1(u,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var d=r;(r=new _e).add(d),d.scaleX=d.scaleY=c.scale,d.x=c.x,d.y=c.y}return e.ignoreRootClip||s==null||l==null||r.setClipPath(new ke({shape:{x:0,y:0,width:s,height:l}})),{root:r,width:s,height:l,viewBoxRect:u,viewBoxTransform:c,named:o}},n.prototype._parseNode=function(t,e,i,r,o,a){var s,l=t.nodeName.toLowerCase(),u=r;if(l==="defs"&&(o=!0),l==="text"&&(a=!0),l==="defs"||l==="switch")s=e;else{if(!o){var c=sd[l];if(c&&Bt(sd,l)){s=c.call(this,t,e);var h=t.getAttribute("name");if(h){var p={name:h,namedFrom:null,svgNodeTagLower:l,el:s};i.push(p),l==="g"&&(u=p)}else r&&i.push({name:r.name,namedFrom:r,svgNodeTagLower:l,el:s});e.add(s)}}var d=I1[l];if(d&&Bt(I1,l)){var f=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=f)}}if(s&&s.isGroup)for(var y=t.firstChild;y;)y.nodeType===1?this._parseNode(y,s,i,u,o,a):y.nodeType===3&&a&&this._parseText(y,s),y=y.nextSibling},n.prototype._parseText=function(t,e){var i=new Fo({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});tn(e,i),Et(t,i,this._defsUsePending,!1,!1),function(l,u){var c=u.__selfStyle;if(c){var h=c.textBaseline,p=h;h&&h!=="auto"?h==="baseline"?p="alphabetic":h==="before-edge"||h==="text-before-edge"?p="top":h==="after-edge"||h==="text-after-edge"?p="bottom":h!=="central"&&h!=="mathematical"||(p="middle"):p="alphabetic",l.style.textBaseline=p}var d=u.__inheritedStyle;if(d){var f=d.textAlign,g=f;f&&(f==="middle"&&(g="center"),l.style.textAlign=g)}}(i,e);var r=i.style,o=r.fontSize;o&&o<9&&(r.fontSize=9,i.scaleX*=o/9,i.scaleY*=o/9);var a=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=a;var s=i.getBoundingRect();return this._textX+=s.width,e.add(i),i},n.internalField=void(sd={g:function(t,e){var i=new _e;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new ke;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new In;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new ut;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new Uo;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i,r=t.getAttribute("points");r&&(i=k1(r));var o=new cn({shape:{points:i||[]},silent:!0});return tn(e,o),Et(t,o,this._defsUsePending,!1,!1),o},polyline:function(t,e){var i,r=t.getAttribute("points");r&&(i=k1(r));var o=new qt({shape:{points:i||[]},silent:!0});return tn(e,o),Et(t,o,this._defsUsePending,!1,!1),o},image:function(t,e){var i=new Tt;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",r=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",a=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(r)+parseFloat(a);var s=new _e;return tn(e,s),Et(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var i=t.getAttribute("x"),r=t.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),r!=null&&(this._textY=parseFloat(r));var o=t.getAttribute("dx")||"0",a=t.getAttribute("dy")||"0",s=new _e;return tn(e,s),Et(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(a),s},path:function(t,e){var i=wy(t.getAttribute("d")||"");return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),n}(),I1={lineargradient:function(n){var t=parseInt(n.getAttribute("x1")||"0",10),e=parseInt(n.getAttribute("y1")||"0",10),i=parseInt(n.getAttribute("x2")||"10",10),r=parseInt(n.getAttribute("y2")||"0",10),o=new jo(t,e,i,r);return A1(n,o),D1(n,o),o},radialgradient:function(n){var t=parseInt(n.getAttribute("cx")||"0",10),e=parseInt(n.getAttribute("cy")||"0",10),i=parseInt(n.getAttribute("r")||"0",10),r=new nh(t,e,i);return A1(n,r),D1(n,r),r}};function A1(n,t){n.getAttribute("gradientUnits")==="userSpaceOnUse"&&(t.global=!0)}function D1(n,t){for(var e=n.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var i,r=e.getAttribute("offset");i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};O1(e,o,o);var a=o.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:a})}e=e.nextSibling}}function tn(n,t){n&&n.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),ce(t.__inheritedStyle,n.__inheritedStyle))}function k1(n){for(var t=tu(n),e=[],i=0;i<t.length;i+=2){var r=parseFloat(t[i]),o=parseFloat(t[i+1]);e.push([r,o])}return e}function Et(n,t,e,i,r){var o=t,a=o.__inheritedStyle=o.__inheritedStyle||{},s={};n.nodeType===1&&(function(l,u){var c=l.getAttribute("transform");if(c){c=c.replace(/,/g," ");var h=[],p=null;c.replace(FI,function(v,m,_){return h.push(m,_),""});for(var d=h.length-1;d>0;d-=2){var f=h[d],g=h[d-1],y=tu(f);switch(p=p||[1,0,0,1,0,0],g){case"translate":Ci(p,p,[parseFloat(y[0]),parseFloat(y[1]||"0")]);break;case"scale":Bu(p,p,[parseFloat(y[0]),parseFloat(y[1]||y[0])]);break;case"rotate":Ii(p,p,-parseFloat(y[0])*ld,[parseFloat(y[1]||"0"),parseFloat(y[2]||"0")]);break;case"skewX":_n(p,[1,0,Math.tan(parseFloat(y[0])*ld),1,0,0],p);break;case"skewY":_n(p,[1,Math.tan(parseFloat(y[0])*ld),0,1,0,0],p);break;case"matrix":p[0]=parseFloat(y[0]),p[1]=parseFloat(y[1]),p[2]=parseFloat(y[2]),p[3]=parseFloat(y[3]),p[4]=parseFloat(y[4]),p[5]=parseFloat(y[5])}}u.setLocalTransform(p)}}(n,t),O1(n,a,s),i||function(l,u,c){for(var h=0;h<T1.length;h++){var p=T1[h];(d=l.getAttribute(p))!=null&&(u[Ql[p]]=d)}for(h=0;h<C1.length;h++){var d;p=C1[h],(d=l.getAttribute(p))!=null&&(c[eu[p]]=d)}}(n,a,s)),o.style=o.style||{},a.fill!=null&&(o.style.fill=L1(o,"fill",a.fill,e)),a.stroke!=null&&(o.style.stroke=L1(o,"stroke",a.stroke,e)),D(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){a[l]!=null&&(o.style[l]=parseFloat(a[l]))}),D(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){a[l]!=null&&(o.style[l]=a[l])}),r&&(o.__selfStyle=s),a.lineDash&&(o.style.lineDash=j(tu(a.lineDash),function(l){return parseFloat(l)})),a.visibility!=="hidden"&&a.visibility!=="collapse"||(o.invisible=!0),a.display==="none"&&(o.ignore=!0)}var BI=/^url\(\s*#(.*?)\)/;function L1(n,t,e,i){var r=e&&e.match(BI);if(!r)return e==="none"&&(e=null),e;var o=zt(r[1]);i.push([n,t,o])}var VI=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function tu(n){return n.match(VI)||[]}var FI=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,ld=Math.PI/180,P1=/([^\s:;]+)\s*:\s*([^:;]+)/g;function O1(n,t,e){var i,r=n.getAttribute("style");if(r)for(P1.lastIndex=0;(i=P1.exec(r))!=null;){var o=i[1],a=Bt(Ql,o)?Ql[o]:null;a&&(t[a]=i[2]);var s=Bt(eu,o)?eu[o]:null;s&&(e[s]=i[2])}}function R1(n,t){var e=t.width/n.width,i=t.height/n.height,r=Math.min(e,i);return{scale:r,x:-(n.x+n.width/2)*r+(t.x+t.width/2),y:-(n.y+n.height/2)*r+(t.y+t.height/2)}}for(var GI=re(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),HI=function(){function n(t,e){this.type="geoSVG",this._usedGraphicMap=re(),this._freedGraphics=[],this._mapName=t,this._parsedXML=M1(e)}return n.prototype.load=function(){var t=this._firstGraphic;if(!t){t=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(t),this._boundingRect=this._firstGraphic.boundingRect.clone();var e=function(o){var a=[],s=re();return D(o,function(l){if(l.namedFrom==null){var u=new _C(l.name,l.el);a.push(u),s.set(l.name,u)}}),{regions:a,regionsMap:s}}(t.named),i=e.regions,r=e.regionsMap;this._regions=i,this._regionsMap=r}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},n.prototype._buildGraphic=function(t){var e,i,r,o;try{Ot((i=(e=t&&(r=t,o={ignoreViewBox:!0,ignoreRootClip:!0},new zI().parse(r,o))||{}).root)!=null)}catch(m){throw new Error(`Invalid svg format
  13. `+m.message)}var a=new _e;a.add(i),a.isGeoSVGGraphicRoot=!0;var s=e.width,l=e.height,u=e.viewBoxRect,c=this._boundingRect;if(!c){var h=void 0,p=void 0,d=void 0,f=void 0;if(s!=null?(h=0,d=s):u&&(h=u.x,d=u.width),l!=null?(p=0,f=l):u&&(p=u.y,f=u.height),h==null||p==null){var g=i.getBoundingRect();h==null&&(h=g.x,d=g.width),p==null&&(p=g.y,f=g.height)}c=this._boundingRect=new me(h,p,d,f)}if(u){var y=R1(u,c);i.scaleX=i.scaleY=y.scale,i.x=y.x,i.y=y.y}a.setClipPath(new ke({shape:c.plain()}));var v=[];return D(e.named,function(m){var _;GI.get(m.svgNodeTagLower)!=null&&(v.push(m),(_=m.el).silent=!1,_.isGroup&&_.traverse(function(x){x.silent=!1}))}),{root:a,boundingRect:c,named:v}},n.prototype.useGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);return i||(i=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,i),i)},n.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,i=e.get(t);i&&(e.removeKey(t),this._freedGraphics.push(i))},n}(),ud=[126,25],N1="\u5357\u6D77\u8BF8\u5C9B",lr=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],ur=0;ur<lr.length;ur++)for(var to=0;to<lr[ur].length;to++)lr[ur][to][0]/=10.5,lr[ur][to][1]/=-14,lr[ur][to][0]+=ud[0],lr[ur][to][1]+=ud[1];var WI={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]},XI=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],UI=function(){function n(t,e,i){var r;this.type="geoJSON",this._parsedMap=re(),this._mapName=t,this._specialAreas=i,this._geoJSON=Q(r=e)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}return n.prototype.load=function(t,e){e=e||"name";var i=this._parsedMap.get(e);if(!i){var r=this._parseToRegions(e);i=this._parsedMap.set(e,{regions:r,boundingRect:YI(r)})}var o=re(),a=[];return D(i.regions,function(s){var l=s.name;t&&Bt(t,l)&&(s=s.cloneShallow(l=t[l])),a.push(s),o.set(l,s)}),{regions:a,boundingRect:i.boundingRect||new me(0,0,0,0),regionsMap:o}},n.prototype._parseToRegions=function(t){var e,i=this._mapName,r=this._geoJSON;try{e=r?r_(r,t):[]}catch(o){throw new Error(`Invalid geoJson format
  14. `+o.message)}return function(o,a){if(o==="china"){for(var s=0;s<a.length;s++)if(a[s].name===N1)return;a.push(new t_(N1,j(lr,function(l){return{type:"polygon",exterior:l}}),ud))}}(i,e),D(e,function(o){var a=o.name;(function(l,u){if(l==="china"){var c=WI[u.name];if(c){var h=u.getCenter();h[0]+=c[0]/10.5,h[1]+=-c[1]/14,u.setCenter(h)}}})(i,o),function(l,u){l==="china"&&u.name==="\u53F0\u6E7E"&&u.geometries.push({type:"polygon",exterior:XI[0]})}(i,o);var s=this._specialAreas&&this._specialAreas[a];s&&o.transformTo(s.left,s.top,s.width,s.height)},this),e},n.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},n}();function YI(n){for(var t,e=0;e<n.length;e++){var i=n[e].getBoundingRect();(t=t||i.clone()).union(i)}return t}var Na=re();const nu=function(n){return Na.get(n)},cd=function(n,t,e){var i=Na.get(n);if(i)return i.load(t,e)};var hd=["rect","circle","line","ellipse","polygon","polyline","path"],ZI=re(hd),qI=re(hd.concat(["g"])),jI=re(hd.concat(["g"])),E1=Ee();function iu(n){var t=n.getItemStyle(),e=n.get("areaColor");return e!=null&&(t.fill=e),t}function z1(n){var t=n.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var B1=function(){function n(t){var e=new _e;this.uid=Vr("ec_map_draw"),this._controller=new NI(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new _e),e.add(this._svgGroup=new _e)}return n.prototype.draw=function(t,e,i,r,o){var a=t.mainType==="geo",s=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(y){s||y.getHostGeoModel()!==t||(s=y.getData())});var l=t.coordinateSystem,u=this._regionsGroup,c=this.group,h=l.getTransformInfo(),p=h.raw,d=h.roam;!u.childAt(0)||o?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):ze(c,d,t);var f=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,g={api:i,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:f,isGeo:a,transformInfoRaw:p};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,u,i,r)},n.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=re(),i=re(),r=this._regionsGroup,o=t.transformInfoRaw,a=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,f){return f&&(d=f(d)),d&&[d[0]*o.scaleX+o.x,d[1]*o.scaleY+o.y]}function h(d){for(var f=[],g=!u&&l&&l.project,y=0;y<d.length;++y){var v=c(d[y],g);v&&f.push(v)}return f}function p(d){return{shape:{points:h(d)}}}r.removeAll(),D(t.geo.regions,function(d){var f=d.name,g=e.get(f),y=i.get(f)||{},v=y.dataIdx,m=y.regionModel;g||(g=e.set(f,new _e),r.add(g),v=s?s.indexOfName(f):null,m=t.isGeo?a.getRegionModel(f):s?s.getItemModel(v):null,i.set(f,{dataIdx:v,regionModel:m}));var _=[],x=[];D(d.geometries,function(M){if(M.type==="polygon"){var S=[M.exterior].concat(M.interiors||[]);u&&(S=X1(S,u)),D(S,function(I){_.push(new cn(p(I)))})}else{var C=M.points;u&&(C=X1(C,u,!0)),D(C,function(I){x.push(new qt(p(I)))})}});var b=c(d.getCenter(),l&&l.project);function w(M,S){if(M.length){var C=new th({culling:!0,segmentIgnoreThreshold:1,shape:{paths:M}});g.add(C),V1(t,C,v,m),F1(t,C,f,m,a,v,b),S&&(z1(C),D(C.states,z1))}}w(_),w(x,!0)}),e.each(function(d,f){var g=i.get(f),y=g.dataIdx,v=g.regionModel;G1(t,d,f,v,a,y),H1(t,d,f,v,a),W1(t,d,f,v,a)},this)},n.prototype._buildSVG=function(t){var e=t.geo.map,i=t.transformInfoRaw;this._svgGroup.x=i.x,this._svgGroup.y=i.y,this._svgGroup.scaleX=i.scaleX,this._svgGroup.scaleY=i.scaleY,this._svgResourceChanged(e)&&(this._freeSVG(),this._useSVG(e));var r=this._svgDispatcherMap=re(),o=!1;D(this._svgGraphicRecord.named,function(a){var s=a.name,l=t.mapOrGeoModel,u=t.data,c=a.svgNodeTagLower,h=a.el,p=u?u.indexOfName(s):null,d=l.getRegionModel(s);ZI.get(c)!=null&&h instanceof Fi&&V1(t,h,p,d),h instanceof Fi&&(h.culling=!0),h.z2EmphasisLift=0,a.namedFrom||(jI.get(c)!=null&&F1(t,h,s,d,l,p,null),G1(t,h,s,d,l,p),H1(t,h,s,d,l),qI.get(c)!=null&&(W1(t,h,s,d,l)==="self"&&(o=!0),(r.get(s)||r.set(s,[])).push(h)))},this),this._enableBlurEntireSVG(o,t)},n.prototype._enableBlurEntireSVG=function(t,e){if(t&&e.isGeo){var i=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(r){if(!r.isGroup){Uc(r);var o=r.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),r.ensureState("emphasis")}})}},n.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},n.prototype.findHighDownDispatchers=function(t,e){if(t==null)return[];var i=e.coordinateSystem;if(i.resourceType==="geoJSON"){var r=this._regionsGroupByName;if(r){var o=r.get(t);return o?[o]:[]}}else if(i.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},n.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},n.prototype._useSVG=function(t){var e=nu(t);if(e&&e.type==="geoSVG"){var i=e.useGraphic(this.uid);this._svgGroup.add(i.root),this._svgGraphicRecord=i,this._svgMapName=t}},n.prototype._freeSVG=function(){var t=this._svgMapName;if(t!=null){var e=nu(t);e&&e.type==="geoSVG"&&e.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},n.prototype._updateController=function(t,e,i){var r=t.coordinateSystem,o=this._controller,a=this._controllerHost;a.zoomLimit=t.get("scaleLimit"),a.zoom=r.getZoom(),o.enable(t.get("roam")||!1);var s=t.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=t.id,u}o.off("pan").on("pan",function(u){this._mouseDownFlag=!1,function(c,h,p){var d=c.target;d.x+=h,d.y+=p,d.dirty()}(a,u.dx,u.dy),i.dispatchAction(H(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),o.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,function(c,h,p,d){var f=c.target,g=c.zoomLimit,y=c.zoom=c.zoom||1;if(y*=h,g){var v=g.min||0,m=g.max||1/0;y=Math.max(Math.min(m,y),v)}var _=y/c.zoom;c.zoom=y,f.x-=(p-f.x)*(_-1),f.y-=(d-f.y)*(_-1),f.scaleX*=_,f.scaleY*=_,f.dirty()}(a,u.scale,u.originX,u.originY),i.dispatchAction(H(l(),{totalZoom:a.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),o.setPointerChecker(function(u,c,h){return r.containPoint([c,h])&&!S1(u,i,t)})},n.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){var e=t.getTextContent();e&&(e.ignore=E1(e).ignore)})},n.prototype._updateMapSelectHandler=function(t,e,i,r){var o=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){o._mouseDownFlag=!0}),e.on("click",function(a){o._mouseDownFlag&&(o._mouseDownFlag=!1)}))},n}();function V1(n,t,e,i){var r=i.getModel("itemStyle"),o=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=iu(r),u=iu(o),c=iu(s),h=iu(a),p=n.data;if(p){var d=p.getItemVisual(e,"style"),f=p.getItemVisual(e,"decal");n.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),f&&(l.decal=_l(f,n.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=h,Uc(t)}function F1(n,t,e,i,r,o,a){var s=n.data,l=n.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),o)),c=s&&s.getItemLayout(o);if(l||u||c&&c.showLabel){var h=l?e:o,p=void 0;(!s||o>=0)&&(p=r);var d=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Dn(t,kn(i),{labelFetcher:p,labelDataIndex:h,defaultText:e},d);var f=t.getTextContent();if(f&&(E1(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function G1(n,t,e,i,r,o){n.data?n.data.setItemGraphicEl(o,t):ye(t).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:e,region:i&&i.option||{}}}function H1(n,t,e,i,r){n.data||ea({el:t,componentModel:r,itemName:e,itemTooltipOption:i.get("tooltip")})}function W1(n,t,e,i,r){t.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return ln(t,a,o.get("blurScope"),o.get("disabled")),n.isGeo&&function(s,l,u){var c=ye(s);c.componentMainType=l.mainType,c.componentIndex=l.componentIndex,c.componentHighDownName=u}(t,r,e),a}function X1(n,t,e){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),D(n,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!e&&s.polygonEnd(),r}var KI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r,o){if(!o||o.type!=="mapToggleSelect"||o.from!==this.uid){var a=this.group;if(a.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&o&&o.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),o&&o.type==="geoRoam"&&o.componentType==="series"&&o.seriesId===e.id)(s=this._mapDraw)&&a.add(s.group);else if(e.needsDrawMap){var s=this._mapDraw||new B1(r);a.add(s.group),s.draw(e,i,r,this,o),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&i.getComponent("legend")&&this._renderSymbols(e,i,r)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,i,r){var o=e.originalData,a=this.group;o.each(o.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=o.getItemLayout(l);if(u&&u.point){var c=u.point,h=u.offset,p=new In({style:{fill:e.getData().getVisual("style").fill},shape:{cx:c[0]+9*h,cy:c[1],r:3},silent:!0,z2:8+(h?0:11)});if(!h){var d=e.mainSeries.getData(),f=o.getName(l),g=d.indexOfName(f),y=o.getItemModel(l),v=y.getModel("label"),m=d.getItemGraphicEl(g);Dn(p,kn(y),{labelFetcher:{getFormattedLabel:function(_,x){return e.getFormattedLabel(g,x)}},defaultText:f}),p.disableLabelAnimation=!0,v.get("position")||p.setTextConfig({position:"bottom"}),m.onHoverStateChange=function(_){Wc(p,_)}}a.add(p)}}})},t.type="map",t}(Je),JI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.needsDrawMap=!1,e.seriesGroup=[],e.getTooltipPosition=function(i){if(i!=null){var r=this.getData().getName(i),o=this.coordinateSystem,a=o.getRegion(r);return a&&o.dataToPoint(a.getCenter())}},e}return F(t,n),t.prototype.getInitialData=function(e){for(var i=ka(this,{coordDimensions:["value"],encodeDefaulter:Se(Ch,this)}),r=re(),o=[],a=0,s=i.count();a<s;a++){var l=i.getName(a);r.set(l,!0)}return D(cd(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(u){var c=u.name;r.get(c)||o.push(c)}),i.appendValues([],o),i},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return e!=null?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var i=this.getData();return i.get(i.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var i=this.getData();return i.getItemModel(i.indexOfName(e))},t.prototype.formatTooltip=function(e,i,r){for(var o=this.getData(),a=this.getRawValue(e),s=o.getName(e),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(s),p=o.mapDimension("value");isNaN(l[c].originalData.get(p,h))||u.push(l[c].name)}return jn("section",{header:u.join(", "),noHeader:!u.length,blocks:[jn("nameValue",{name:s,value:a})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var i=e.icon||"roundRect",r=_t(i,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return r.setStyle(e.itemStyle),r.style.stroke="none",i.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(it);function $I(n){var t={};n.eachSeriesByType("map",function(e){var i=e.getHostGeoModel(),r=i?"o"+i.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)}),D(t,function(e,i){for(var r,o,a,s=(r=j(e,function(u){return u.getData()}),o=e[0].get("mapValueCalculation"),a={},D(r,function(u){u.each(u.mapDimension("value"),function(c,h){var p="ec-"+u.getName(h);a[p]=a[p]||[],isNaN(c)||a[p].push(c)})}),r[0].map(r[0].mapDimension("value"),function(u,c){for(var h="ec-"+r[0].getName(c),p=0,d=1/0,f=-1/0,g=a[h].length,y=0;y<g;y++)d=Math.min(d,a[h][y]),f=Math.max(f,a[h][y]),p+=a[h][y];return g===0?NaN:o==="min"?d:o==="max"?f:o==="average"?p/g:p})),l=0;l<e.length;l++)e[l].originalData=e[l].getData();for(l=0;l<e.length;l++)e[l].seriesGroup=e,e[l].needsDrawMap=l===0&&!e[l].getHostGeoModel(),e[l].setData(s.cloneShallow()),e[l].mainSeries=e[0]})}function QI(n){var t={};n.eachSeriesByType("map",function(e){var i=e.getMapType();if(!e.getHostGeoModel()&&!t[i]){var r={};D(e.seriesGroup,function(a){var s=a.coordinateSystem,l=a.originalData;a.get("showLegendSymbol")&&n.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),p=s.getRegion(h);if(p&&!isNaN(u)){var d=r[h]||0,f=s.dataToPoint(p.getCenter());r[h]=d+1,l.setItemLayout(c,{point:f,offset:d})}})});var o=e.getData();o.each(function(a){var s=o.getName(a),l=o.getItemLayout(a)||{};l.showLabel=!r[s],o.setItemLayout(a,l)}),t[i]=!0}})}var U1=tt,Y1=function(n){function t(e){var i=n.call(this)||this;return i.type="view",i.dimensions=["x","y"],i._roamTransformable=new ii,i._rawTransformable=new ii,i.name=e,i}return F(t,n),t.prototype.setBoundingRect=function(e,i,r,o){return this._rect=new me(e,i,r,o),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,i,r,o){this._transformTo(e,i,r,o),this._viewRect=new me(e,i,r,o)},t.prototype._transformTo=function(e,i,r,o){var a=this.getBoundingRect(),s=this._rawTransformable;s.transform=a.calculateTransform(new me(e,i,r,o));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},t.prototype.setCenter=function(e,i){e&&(this._center=[ee(e[0],i.getWidth()),ee(e[1],i.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var i=this.zoomLimit;i&&(i.max!=null&&(e=Math.min(i.max,e)),i.min!=null&&(e=Math.max(i.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),i=this._roamTransformable,r=this.getDefaultCenter(),o=this.getCenter(),a=this.getZoom();o=tt([],o,e),r=tt([],r,e),i.originX=o[0],i.originY=o[1],i.x=r[0]-o[0],i.y=r[1]-o[1],i.scaleX=i.scaleY=a,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,i=this._rawTransformable;i.parent=e,e.updateTransform(),i.updateTransform(),ts(this.transform||(this.transform=[]),i.transform||[1,0,0,1,0,0]),this._rawTransform=i.getLocalTransform(),this.invTransform=this.invTransform||[],Ai(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,i=this._roamTransformable,r=new ii;return r.transform=i.transform,r.decomposeTransform(),{roam:{x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,i,r){var o=i?this._rawTransform:this.transform;return r=r||[],o?U1(r,e,o):_f(r,e)},t.prototype.pointToData=function(e){var i=this.invTransform;return i?U1([],e,i):[e[0],e[1]]},t.prototype.convertToPixel=function(e,i,r){var o=Z1(i);return o===this?o.dataToPoint(r):null},t.prototype.convertFromPixel=function(e,i,r){var o=Z1(i);return o===this?o.pointToData(r):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(ii);function Z1(n){var t=n.seriesModel;return t?t.coordinateSystem:null}var e2={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},q1=["lng","lat"],pd=function(n){function t(e,i,r){var o=n.call(this,e)||this;o.dimensions=q1,o.type="geo",o._nameCoordMap=re(),o.map=i;var a=r.projection,s=cd(i,r.nameMap,r.nameProperty),l=nu(i);o.resourceType=l?l.type:null;var u,c=o.regions=s.regions,h=e2[l.type];if(o._regionsMap=s.regionsMap,o.regions=s.regions,o.projection=a,a)for(var p=0;p<c.length;p++){var d=c[p].getBoundingRect(a);(u=u||d.clone()).union(d)}else u=s.boundingRect;return o.setBoundingRect(u.x,u.y,u.width,u.height),o.aspectScale=a?1:xe(r.aspectScale,h.aspectScale),o._invertLongitute=!a&&h.invertLongitute,o}return F(t,n),t.prototype._transformTo=function(e,i,r,o){var a=this.getBoundingRect(),s=this._invertLongitute;a=a.clone(),s&&(a.y=-a.y-a.height);var l=this._rawTransformable;l.transform=a.calculateTransform(new me(e,i,r,o));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var i=this.regions,r=0;r<i.length;r++){var o=i[r];if(o.type==="geoJSON"&&o.contain(e))return i[r]}},t.prototype.addGeoCoord=function(e,i){this._nameCoordMap.set(e,i)},t.prototype.getGeoCoord=function(e){var i=this._regionsMap.get(e);return this._nameCoordMap.get(e)||i&&i.getCenter()},t.prototype.dataToPoint=function(e,i,r){if(Q(e)&&(e=this.getGeoCoord(e)),e){var o=this.projection;return o&&(e=o.project(e)),e&&this.projectedToPoint(e,i,r)}},t.prototype.pointToData=function(e){var i=this.projection;return i&&(e=i.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(e){return n.prototype.pointToData.call(this,e)},t.prototype.projectedToPoint=function(e,i,r){return n.prototype.dataToPoint.call(this,e,i,r)},t.prototype.convertToPixel=function(e,i,r){var o=j1(i);return o===this?o.dataToPoint(r):null},t.prototype.convertFromPixel=function(e,i,r){var o=j1(i);return o===this?o.pointToData(r):null},t}(Y1);function j1(n){var t=n.geoModel,e=n.seriesModel;return t?t.coordinateSystem:e?e.coordinateSystem||(e.getReferringComponents("geo",Qe).models[0]||{}).coordinateSystem:null}function K1(n,t){var e=n.get("boundingCoords");if(e!=null){var i=e[0],r=e[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(r[0])&&isFinite(r[1])){var o=this.projection;if(o){var a=i[0],s=i[1],l=r[0],u=r[1];i=[1/0,1/0],r=[-1/0,-1/0];var c=function(w,M,S,C){for(var I=S-w,T=C-M,A=0;A<=100;A++){var k=A/100,L=o.project([w+I*k,M+T*k]);Fn(i,i,L),Gn(r,r,L)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(i[0],i[1],r[0]-i[0],r[1]-i[1])}}var h,p,d,f=this.getBoundingRect(),g=n.get("layoutCenter"),y=n.get("layoutSize"),v=t.getWidth(),m=t.getHeight(),_=f.width/f.height*this.aspectScale,x=!1;if(g&&y&&(h=[ee(g[0],v),ee(g[1],m)],p=ee(y,Math.min(v,m)),isNaN(h[0])||isNaN(h[1])||isNaN(p)||(x=!0)),x)d={},_>1?(d.width=p,d.height=p/_):(d.height=p,d.width=p*_),d.y=h[1]-d.height/2,d.x=h[0]-d.width/2;else{var b=n.getBoxLayoutParams();b.aspect=_,d=It(b,{width:v,height:m})}this.setViewRect(d.x,d.y,d.width,d.height),this.setCenter(n.get("center"),t),this.setZoom(n.get("zoom"))}at(pd,Y1);var t2=function(){function n(){this.dimensions=q1}return n.prototype.create=function(t,e){var i=[];function r(a){return{nameProperty:a.get("nameProperty"),aspectScale:a.get("aspectScale"),projection:a.get("projection")}}t.eachComponent("geo",function(a,s){var l=a.get("map"),u=new pd(l+s,l,H({nameMap:a.get("nameMap")},r(a)));u.zoomLimit=a.get("scaleLimit"),i.push(u),a.coordinateSystem=u,u.model=a,u.resize=K1,u.resize(a,e)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="geo"){var s=a.get("geoIndex")||0;a.coordinateSystem=i[s]}});var o={};return t.eachSeriesByType("map",function(a){if(!a.getHostGeoModel()){var s=a.getMapType();o[s]=o[s]||[],o[s].push(a)}}),D(o,function(a,s){var l=j(a,function(c){return c.get("nameMap")}),u=new pd(s,s,H({nameMap:hf(l)},r(a[0])));u.zoomLimit=Vn.apply(null,j(a,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=K1,u.resize(a[0],e),D(a,function(c){c.coordinateSystem=u,function(h,p){D(p.get("geoCoord"),function(d,f){h.addGeoCoord(f,d)})}(u,c)})}),i},n.prototype.getFilledRegions=function(t,e,i,r){for(var o=(t||[]).slice(),a=re(),s=0;s<o.length;s++)a.set(o[s].name,o[s]);return D(cd(e,i,r).regions,function(l){var u=l.name;!a.get(u)&&o.push({name:u})}),o},n}(),J1=new t2,n2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(e,i,r){var o=nu(e.map);if(o&&o.type==="geoJSON"){var a=e.itemStyle=e.itemStyle||{};"color"in a||(a.color="#eee")}this.mergeDefaultAndTheme(e,r),Po(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,i=this.option;i.regions=J1.getFilledRegions(i.regions,i.map,i.nameMap,i.nameProperty);var r={};this._optionModelMap=nn(i.regions||[],function(o,a){var s=a.name;return s&&(o.set(s,new Le(a,e,e.ecModel)),a.selected&&(r[s]=!0)),o},re()),i.selectedMap||(i.selectedMap=r)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Le(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,i){var r=this.getRegionModel(e),o=i==="normal"?r.get(["label","formatter"]):r.get(["emphasis","label","formatter"]),a={name:e};return ue(o)?(a.status=i,o(a)):Q(o)?o.replace("{a}",e??""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var i=this.option,r=i.selectedMode;r&&(r!=="multiple"&&(i.selectedMap=null),(i.selectedMap||(i.selectedMap={}))[e]=!0)},t.prototype.unSelect=function(e){var i=this.option.selectedMap;i&&(i[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var i=this.option.selectedMap;return!(!i||!i[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(be);function $1(n,t){return n.pointToProjected?n.pointToProjected(t):n.pointToData(t)}var i2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.focusBlurEnabled=!0,e}return F(t,n),t.prototype.init=function(e,i){this._api=i},t.prototype.render=function(e,i,r,o){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new B1(r));var a=this._mapDraw;a.draw(e,i,r,this,o),a.group.on("click",this._handleRegionClick,this),a.group.silent=e.get("silent"),this.group.add(a.group),this.updateSelectStatus(e,i,r)},t.prototype._handleRegionClick=function(e){var i;tr(e.target,function(r){return(i=ye(r).eventData)!=null},!0),i&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:i.name})},t.prototype.updateSelectStatus=function(e,i,r){var o=this;this._mapDraw.group.traverse(function(a){var s=ye(a).eventData;if(s)return o._model.isSelected(s.name)?r.enterSelect(a):r.leaveSelect(a),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(Xe);function r2(n,t,e){(function(i,r,o){if(r.svg){var a=new HI(i,r.svg);Na.set(i,a)}else{var s=r.geoJson||r.geoJSON;s&&!r.features?o=r.specialAreas:s=r,a=new UI(i,s,o),Na.set(i,a)}})(n,t,e)}function o2(n){function t(e,i){i.update="geo:updateSelectStatus",n.registerAction(i,function(r,o){var a={},s=[];return o.eachComponent({mainType:"geo",query:r},function(l){l[e](r.name),D(l.coordinateSystem.regions,function(c){a[c.name]=l.isSelected(c.name)||!1});var u=[];D(a,function(c,h){a[h]&&u.push(h)}),s.push({geoIndex:l.componentIndex,name:u})}),{selected:a,allSelected:s,name:r.name}})}n.registerCoordinateSystem("geo",J1),n.registerComponentModel(n2),n.registerComponentView(i2),n.registerImpl("registerMap",r2),n.registerImpl("getMap",function(e){return function(i){var r=Na.get(i);return r&&r.type==="geoJSON"&&r.getMapForUser()}(e)}),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),n.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,i,r){var o=e.componentType||"series";i.eachComponent({mainType:o,query:e},function(a){var s=a.coordinateSystem;if(s.type==="geo"){var l=function(u,c,h,p){var d=u.getZoom(),f=u.getCenter(),g=c.zoom,y=u.projectedToPoint?u.projectedToPoint(f):u.dataToPoint(f);if(c.dx!=null&&c.dy!=null&&(y[0]-=c.dx,y[1]-=c.dy,u.setCenter($1(u,y),p)),g!=null){if(h){var v=h.min||0,m=h.max||1/0;g=Math.max(Math.min(d*g,m),v)/d}u.scaleX*=g,u.scaleY*=g;var _=(c.originX-u.x)*(g-1),x=(c.originY-u.y)*(g-1);u.x-=_,u.y-=x,u.updateTransform(),u.setCenter($1(u,y),p),u.setZoom(g*d)}return{center:u.getCenter(),zoom:u.getZoom()}}(s,e,a.get("scaleLimit"),r);a.setCenter&&a.setCenter(l.center),a.setZoom&&a.setZoom(l.zoom),o==="series"&&D(a.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function a2(n){Lt(o2),n.registerChartView(KI),n.registerSeriesModel(JI),n.registerLayout(QI),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,$I),Rm("map",n.registerAction)}var Ea=D,s2=ne,pt=function(){function n(t){var e=t.mappingMethod,i=t.type,r=this.option=ae(t);this.type=i,this.mappingMethod=e,this._normalizeData=l2[e];var o=n.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[e],e==="piecewise"?(dd(r),function(a){var s=a.pieceList;a.hasSpecialVisual=!1,D(s,function(l,u){l.originIndex=u,l.visual!=null&&(a.hasSpecialVisual=!0)})}(r)):e==="category"?r.categories?function(a){var s=a.categories,l=a.categoryMap={},u=a.visual;if(Ea(s,function(p,d){l[p]=d}),!Y(u)){var c=[];ne(u)?Ea(u,function(p,d){var f=l[d];c[f??-1]=p}):c[-1]=u,u=ex(a,c)}for(var h=s.length-1;h>=0;h--)u[h]==null&&(delete l[s[h]],s.pop())}(r):dd(r,!0):(Ot(e!=="linear"||r.dataExtent),dd(r))}return n.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},n.prototype.getNormalizer=function(){return he(this._normalizeData,this)},n.listVisualTypes=function(){return Oe(n.visualHandlers)},n.isValidType=function(t){return n.visualHandlers.hasOwnProperty(t)},n.eachVisual=function(t,e,i){ne(t)?D(t,e,i):e.call(i,t)},n.mapVisual=function(t,e,i){var r,o=Y(t)?[]:ne(t)?{}:(r=!0,null);return n.eachVisual(t,function(a,s){var l=e.call(i,a,s);r?o=l:o[s]=l}),o},n.retrieveVisuals=function(t){var e,i={};return t&&Ea(n.visualHandlers,function(r,o){t.hasOwnProperty(o)&&(i[o]=t[o],e=!0)}),e?i:null},n.prepareVisualTypes=function(t){if(Y(t))t=t.slice();else{if(!s2(t))return[];var e=[];Ea(t,function(i,r){e.push(r)}),t=e}return t.sort(function(i,r){return r==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),t},n.dependsOn=function(t,e){return e==="color"?!(!t||t.indexOf(e)!==0):t===e},n.findPieceIndex=function(t,e,i){for(var r,o=1/0,a=0,s=e.length;a<s;a++){var l=e[a].value;if(l!=null){if(l===t||Q(l)&&l===t+"")return a;i&&p(l,a)}}for(a=0,s=e.length;a<s;a++){var u=e[a],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(ou(h[1],t,c[1]))return a}else if(c[1]===1/0){if(ou(h[0],c[0],t))return a}else if(ou(h[0],c[0],t)&&ou(h[1],t,c[1]))return a;i&&p(c[0],a),i&&p(c[1],a)}}if(i)return t===1/0?e.length-1:t===-1/0?0:r;function p(d,f){var g=Math.abs(d-t);g<o&&(o=g,r=f)}},n.visualHandlers={color:{applyVisual:za("color"),getColorMapper:function(){var t=this.option;return he(t.mappingMethod==="category"?function(e,i){return!i&&(e=this._normalizeData(e)),Ba.call(this,e)}:function(e,i,r){var o=!!r;return!i&&(e=this._normalizeData(e)),r=So(e,t.parsedVisual,r),o?r:on(r,"rgba")},this)},_normalizedToVisual:{linear:function(t){return on(So(t,this.option.parsedVisual),"rgba")},category:Ba,piecewise:function(t,e){var i=gd.call(this,e);return i==null&&(i=on(So(t,this.option.parsedVisual),"rgba")),i},fixed:cr}},colorHue:ru(function(t,e){return ps(t,e)}),colorSaturation:ru(function(t,e){return ps(t,null,e)}),colorLightness:ru(function(t,e){return ps(t,null,null,e)}),colorAlpha:ru(function(t,e){return Jf(t,e)}),decal:{applyVisual:za("decal"),_normalizedToVisual:{linear:null,category:Ba,piecewise:null,fixed:null}},opacity:{applyVisual:za("opacity"),_normalizedToVisual:fd([0,1])},liftZ:{applyVisual:za("liftZ"),_normalizedToVisual:{linear:cr,category:cr,piecewise:cr,fixed:cr}},symbol:{applyVisual:function(t,e,i){i("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:Q1,category:Ba,piecewise:function(t,e){var i=gd.call(this,e);return i==null&&(i=Q1.call(this,t)),i},fixed:cr}},symbolSize:{applyVisual:za("symbolSize"),_normalizedToVisual:fd([0,1])}},n}();function dd(n,t){var e=n.visual,i=[];ne(e)?Ea(e,function(r){i.push(r)}):e!=null&&i.push(e),t||i.length!==1||{color:1,symbol:1}.hasOwnProperty(n.type)||(i[1]=i[0]),ex(n,i)}function ru(n){return{applyVisual:function(t,e,i){var r=this.mapValueToVisual(t);i("color",n(e("color"),r))},_normalizedToVisual:fd([0,1])}}function Q1(n){var t=this.option.visual;return t[Math.round(Fe(n,[0,1],[0,t.length-1],!0))]||{}}function za(n){return function(t,e,i){i(n,this.mapValueToVisual(t))}}function Ba(n){var t=this.option.visual;return t[this.option.loop&&n!==-1?n%t.length:n]}function cr(){return this.option.visual[0]}function fd(n){return{linear:function(t){return Fe(t,n,this.option.visual,!0)},category:Ba,piecewise:function(t,e){var i=gd.call(this,e);return i==null&&(i=Fe(t,n,this.option.visual,!0)),i},fixed:cr}}function gd(n){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var i=e[pt.findPieceIndex(n,e)];if(i&&i.visual)return i.visual[this.type]}}function ex(n,t){return n.visual=t,n.type==="color"&&(n.parsedVisual=j(t,function(e){return St(e)||[0,0,0,1]})),t}var l2={linear:function(n){return Fe(n,this.option.dataExtent,[0,1],!0)},piecewise:function(n){var t=this.option.pieceList,e=pt.findPieceIndex(n,t,!0);if(e!=null)return Fe(e,[0,t.length-1],[0,1],!0)},category:function(n){return(this.option.categories?this.option.categoryMap[n]:n)??-1},fixed:rt};function ou(n,t,e){return n?t<=e:t<e}var u2=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},c2=function(n){function t(e){var i=n.call(this,e)||this;return i.type="pointer",i}return F(t,n),t.prototype.getDefaultShape=function(){return new u2},t.prototype.buildPath=function(e,i){var r=Math.cos,o=Math.sin,a=i.r,s=i.width,l=i.angle,u=i.x-r(l)*s*(s>=a/3?1:2),c=i.y-o(l)*s*(s>=a/3?1:2);l=i.angle-Math.PI/2,e.moveTo(u,c),e.lineTo(i.x+r(l)*s,i.y+o(l)*s),e.lineTo(i.x+r(i.angle)*a,i.y+o(i.angle)*a),e.lineTo(i.x-r(l)*s,i.y-o(l)*s),e.lineTo(u,c)},t}(Ie);function au(n,t){var e=n==null?"":n+"";return t&&(Q(t)?e=t.replace("{value}",e):ue(t)&&(e=t(n))),e}var h2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){this.group.removeAll();var o=e.get(["axisLine","lineStyle","color"]),a=function(s,l){var u=s.get("center"),c=l.getWidth(),h=l.getHeight(),p=Math.min(c,h);return{cx:ee(u[0],l.getWidth()),cy:ee(u[1],l.getHeight()),r:ee(s.get("radius"),p/2)}}(e,r);this._renderMain(e,i,r,o,a),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,i,r,o,a){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,h=e.getModel("axisLine"),p=h.get("roundCap")?Yl:Nt,d=h.get("show"),f=h.getModel("lineStyle"),g=f.get("width"),y=[u,c];zc(y,!l);for(var v=(c=y[1])-(u=y[0]),m=u,_=[],x=0;d&&x<o.length;x++){var b=new p({shape:{startAngle:m,endAngle:c=u+v*Math.min(Math.max(o[x][0],0),1),cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-g,r:a.r},silent:!0});b.setStyle({fill:o[x][1]}),b.setStyle(f.getLineStyle(["color","width"])),_.push(b),m=c}_.reverse(),D(_,function(M){return s.add(M)});var w=function(M){if(M<=0)return o[0][1];var S;for(S=0;S<o.length;S++)if(o[S][0]>=M&&(S===0?0:o[S-1][0])<M)return o[S][1];return o[S-1][1]};this._renderTicks(e,i,r,w,a,u,c,l,g),this._renderTitleAndDetail(e,i,r,w,a),this._renderAnchor(e,a),this._renderPointer(e,i,r,w,a,u,c,l,g)},t.prototype._renderTicks=function(e,i,r,o,a,s,l,u,c){for(var h,p,d=this.group,f=a.cx,g=a.cy,y=a.r,v=+e.get("min"),m=+e.get("max"),_=e.getModel("splitLine"),x=e.getModel("axisTick"),b=e.getModel("axisLabel"),w=e.get("splitNumber"),M=x.get("splitNumber"),S=ee(_.get("length"),y),C=ee(x.get("length"),y),I=s,T=(l-s)/w,A=T/M,k=_.getModel("lineStyle").getLineStyle(),L=x.getModel("lineStyle").getLineStyle(),O=_.get("distance"),P=0;P<=w;P++){if(h=Math.cos(I),p=Math.sin(I),_.get("show")){var R=new ut({shape:{x1:h*(y-(N=O?O+c:c))+f,y1:p*(y-N)+g,x2:h*(y-S-N)+f,y2:p*(y-S-N)+g},style:k,silent:!0});k.stroke==="auto"&&R.setStyle({stroke:o(P/w)}),d.add(R)}if(b.get("show")){var N=b.get("distance")+O,E=au(We(P/w*(m-v)+v),b.get("formatter")),z=o(P/w),B=h*(y-S-N)+f,G=p*(y-S-N)+g,K=b.get("rotate"),V=0;K==="radial"?(V=-I+2*Math.PI)>Math.PI/2&&(V+=Math.PI):K==="tangential"?V=-I-Math.PI/2:Ae(K)&&(V=K*Math.PI/180),V===0?d.add(new Me({style:nt(b,{text:E,x:B,y:G,verticalAlign:p<-.8?"top":p>.8?"bottom":"middle",align:h<-.4?"left":h>.4?"right":"center"},{inheritColor:z}),silent:!0})):d.add(new Me({style:nt(b,{text:E,x:B,y:G,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:B,originY:G,rotation:V}))}if(x.get("show")&&P!==w){N=(N=x.get("distance"))?N+c:c;for(var X=0;X<=M;X++){h=Math.cos(I),p=Math.sin(I);var Z=new ut({shape:{x1:h*(y-N)+f,y1:p*(y-N)+g,x2:h*(y-C-N)+f,y2:p*(y-C-N)+g},silent:!0,style:L});L.stroke==="auto"&&Z.setStyle({stroke:o((P+X/M)/w)}),d.add(Z),I+=A}I-=A}else I+=T}},t.prototype._renderPointer=function(e,i,r,o,a,s,l,u,c){var h=this.group,p=this._data,d=this._progressEls,f=[],g=e.get(["pointer","show"]),y=e.getModel("progress"),v=y.get("show"),m=e.getData(),_=m.mapDimension("value"),x=+e.get("min"),b=+e.get("max"),w=[x,b],M=[s,l];function S(I,T){var A,k=m.getItemModel(I).getModel("pointer"),L=ee(k.get("width"),a.r),O=ee(k.get("length"),a.r),P=e.get(["pointer","icon"]),R=k.get("offsetCenter"),N=ee(R[0],a.r),E=ee(R[1],a.r),z=k.get("keepAspect");return(A=P?_t(P,N-L/2,E-O,L,O,null,z):new c2({shape:{angle:-Math.PI/2,width:L,r:O,x:N,y:E}})).rotation=-(T+Math.PI/2),A.x=a.cx,A.y=a.cy,A}function C(I,T){var A=y.get("roundCap")?Yl:Nt,k=y.get("overlap"),L=k?y.get("width"):c/m.count(),O=k?a.r-L:a.r-(I+1)*L,P=k?a.r:a.r-I*L,R=new A({shape:{startAngle:s,endAngle:T,cx:a.cx,cy:a.cy,clockwise:u,r0:O,r:P}});return k&&(R.z2=b-m.get(_,I)%b),R}(v||g)&&(m.diff(p).add(function(I){var T=m.get(_,I);if(g){var A=S(I,s);Ye(A,{rotation:-((isNaN(+T)?M[0]:Fe(T,w,M,!0))+Math.PI/2)},e),h.add(A),m.setItemGraphicEl(I,A)}if(v){var k=C(I,s),L=y.get("clip");Ye(k,{shape:{endAngle:Fe(T,w,M,L)}},e),h.add(k),Fc(e.seriesIndex,m.dataType,I,k),f[I]=k}}).update(function(I,T){var A=m.get(_,I);if(g){var k=p.getItemGraphicEl(T),L=k?k.rotation:s,O=S(I,L);O.rotation=L,ze(O,{rotation:-((isNaN(+A)?M[0]:Fe(A,w,M,!0))+Math.PI/2)},e),h.add(O),m.setItemGraphicEl(I,O)}if(v){var P=d[T],R=C(I,P?P.shape.endAngle:s),N=y.get("clip");ze(R,{shape:{endAngle:Fe(A,w,M,N)}},e),h.add(R),Fc(e.seriesIndex,m.dataType,I,R),f[I]=R}}).execute(),m.each(function(I){var T=m.getItemModel(I),A=T.getModel("emphasis"),k=A.get("focus"),L=A.get("blurScope"),O=A.get("disabled");if(g){var P=m.getItemGraphicEl(I),R=m.getItemVisual(I,"style"),N=R.fill;if(P instanceof Tt){var E=P.style;P.useStyle(H({image:E.image,x:E.x,y:E.y,width:E.width,height:E.height},R))}else P.useStyle(R),P.type!=="pointer"&&P.setColor(N);P.setStyle(T.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",o(Fe(m.get(_,I),w,[0,1],!0))),P.z2EmphasisLift=0,Zn(P,T),ln(P,k,L,O)}if(v){var z=f[I];z.useStyle(m.getItemVisual(I,"style")),z.setStyle(T.getModel(["progress","itemStyle"]).getItemStyle()),z.z2EmphasisLift=0,Zn(z,T),ln(z,k,L,O)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,i){var r=e.getModel("anchor");if(r.get("show")){var o=r.get("size"),a=r.get("icon"),s=r.get("offsetCenter"),l=r.get("keepAspect"),u=_t(a,i.cx-o/2+ee(s[0],i.r),i.cy-o/2+ee(s[1],i.r),o,o,null,l);u.z2=r.get("showAbove")?1:0,u.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(u)}},t.prototype._renderTitleAndDetail=function(e,i,r,o,a){var s=this,l=e.getData(),u=l.mapDimension("value"),c=+e.get("min"),h=+e.get("max"),p=new _e,d=[],f=[],g=e.isAnimationEnabled(),y=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(v){d[v]=new Me({silent:!0}),f[v]=new Me({silent:!0})}).update(function(v,m){d[v]=s._titleEls[m],f[v]=s._detailEls[m]}).execute(),l.each(function(v){var m=l.getItemModel(v),_=l.get(u,v),x=new _e,b=o(Fe(_,[c,h],[0,1],!0)),w=m.getModel("title");if(w.get("show")){var M=w.get("offsetCenter"),S=a.cx+ee(M[0],a.r),C=a.cy+ee(M[1],a.r);(R=d[v]).attr({z2:y?0:2,style:nt(w,{x:S,y:C,text:l.getName(v),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(R)}var I=m.getModel("detail");if(I.get("show")){var T=I.get("offsetCenter"),A=a.cx+ee(T[0],a.r),k=a.cy+ee(T[1],a.r),L=ee(I.get("width"),a.r),O=ee(I.get("height"),a.r),P=e.get(["progress","show"])?l.getItemVisual(v,"style").fill:b,R=f[v],N=I.get("formatter");R.attr({z2:y?0:2,style:nt(I,{x:A,y:k,text:au(_,N),width:isNaN(L)?null:L,height:isNaN(O)?null:O,align:"center",verticalAlign:"middle"},{inheritColor:P})}),Uy(R,{normal:I},_,function(E){return au(E,N)}),g&&Yy(R,v,l,e,{getFormattedLabel:function(E,z,B,G,K,V){return au(V?V.interpolatedValue:_,N)}}),x.add(R)}p.add(x)}),this.group.add(p),this._titleEls=d,this._detailEls=f},t.type="gauge",t}(Je),p2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return F(t,n),t.prototype.getInitialData=function(e,i){return ka(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}(it);function d2(n){n.registerChartView(h2),n.registerSeriesModel(p2)}var f2=["itemStyle","opacity"],g2=function(n){function t(e,i){var r=n.call(this)||this,o=r,a=new qt,s=new Me;return o.setTextContent(s),r.setTextGuideLine(a),r.updateData(e,i,!0),r}return F(t,n),t.prototype.updateData=function(e,i,r){var o=this,a=e.hostModel,s=e.getItemModel(i),l=e.getItemLayout(i),u=s.getModel("emphasis"),c=s.get(f2);c=c??1,r||Er(o),o.useStyle(e.getItemVisual(i,"style")),o.style.lineJoin="round",r?(o.setShape({points:l.points}),o.style.opacity=0,Ye(o,{style:{opacity:c}},a,i)):ze(o,{style:{opacity:c},shape:{points:l.points}},a,i),Zn(o,s),this._updateLabel(e,i),ln(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,i){var r=this,o=this.getTextGuideLine(),a=r.getTextContent(),s=e.hostModel,l=e.getItemModel(i),u=e.getItemLayout(i).label,c=e.getItemVisual(i,"style"),h=c.fill;Dn(a,kn(l),{labelFetcher:e.hostModel,labelDataIndex:i,defaultOpacity:c.opacity,defaultText:e.getName(i)},{normal:{align:u.textAlign,verticalAlign:u.verticalAlign}}),r.setTextConfig({local:!0,inside:!!u.inside,insideStroke:h,outsideFill:h});var p=u.linePoints;o.setShape({points:p}),r.textGuideLineConfig={anchor:p?new ge(p[0][0],p[0][1]):null},ze(a,{style:{x:u.x,y:u.y}},s,i),a.attr({rotation:u.rotation,originX:u.x,originY:u.y,z2:10}),Np(r,Ep(l),{stroke:h})},t}(cn),y2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return F(t,n),t.prototype.render=function(e,i,r){var o=e.getData(),a=this._data,s=this.group;o.diff(a).add(function(l){var u=new g2(o,l);o.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=a.getItemGraphicEl(u);c.updateData(o,l),s.add(c),o.setItemGraphicEl(l,c)}).remove(function(l){Jo(a.getItemGraphicEl(l),e,l)}).execute(),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Je),v2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new qp(he(this.getData,this),he(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,i){return ka(this,{coordDimensions:["value"],encodeDefaulter:Se(Ch,this)})},t.prototype._defaultLabelLine=function(e){Po(e,"labelLine",["show"]);var i=e.labelLine,r=e.emphasis.labelLine;i.show=i.show&&e.label.show,r.show=r.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var i=this.getData(),r=n.prototype.getDataParams.call(this,e),o=i.mapDimension("value"),a=i.getSum(o);return r.percent=a?+(i.get(o,e)/a*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(it);function m2(n,t){n.eachSeriesByType("funnel",function(e){var i=e.getData(),r=i.mapDimension("value"),o=e.get("sort"),a=function(k,L){return It(k.getBoxLayoutParams(),{width:L.getWidth(),height:L.getHeight()})}(e,t),s=e.get("orient"),l=a.width,u=a.height,c=function(k,L){for(var O=k.mapDimension("value"),P=k.mapArray(O,function(B){return B}),R=[],N=L==="ascending",E=0,z=k.count();E<z;E++)R[E]=E;return ue(L)?R.sort(L):L!=="none"&&R.sort(function(B,G){return N?P[B]-P[G]:P[G]-P[B]}),R}(i,o),h=a.x,p=a.y,d=s==="horizontal"?[ee(e.get("minSize"),u),ee(e.get("maxSize"),u)]:[ee(e.get("minSize"),l),ee(e.get("maxSize"),l)],f=i.getDataExtent(r),g=e.get("min"),y=e.get("max");g==null&&(g=Math.min(f[0],0)),y==null&&(y=f[1]);var v=e.get("funnelAlign"),m=e.get("gap"),_=((s==="horizontal"?l:u)-m*(i.count()-1))/i.count(),x=function(k,L){if(s==="horizontal"){var O=Fe(i.get(r,k)||0,[g,y],d,!0),P=void 0;switch(v){case"top":P=p;break;case"center":P=p+(u-O)/2;break;case"bottom":P=p+(u-O)}return[[L,P],[L,P+O]]}var R,N=Fe(i.get(r,k)||0,[g,y],d,!0);switch(v){case"left":R=h;break;case"center":R=h+(l-N)/2;break;case"right":R=h+l-N}return[[R,L],[R+N,L]]};o==="ascending"&&(_=-_,m=-m,s==="horizontal"?h+=l:p+=u,c=c.reverse());for(var b=0;b<c.length;b++){var w=c[b],M=c[b+1],S=i.getItemModel(w);if(s==="horizontal"){var C=S.get(["itemStyle","width"]);C==null?C=_:(C=ee(C,l),o==="ascending"&&(C=-C));var I=x(w,h),T=x(M,h+C);h+=C+m,i.setItemLayout(w,{points:I.concat(T.slice().reverse())})}else{var A=S.get(["itemStyle","height"]);A==null?A=_:(A=ee(A,u),o==="ascending"&&(A=-A)),I=x(w,p),T=x(M,p+A),p+=A+m,i.setItemLayout(w,{points:I.concat(T.slice().reverse())})}}(function(k){var L=k.hostModel.get("orient");k.each(function(O){var P,R,N,E,z=k.getItemModel(O),B=z.getModel("label").get("position"),G=z.getModel("labelLine"),K=k.getItemLayout(O),V=K.points,X=B==="inner"||B==="inside"||B==="center"||B==="insideLeft"||B==="insideRight";if(X)B==="insideLeft"?(R=(V[0][0]+V[3][0])/2+5,N=(V[0][1]+V[3][1])/2,P="left"):B==="insideRight"?(R=(V[1][0]+V[2][0])/2-5,N=(V[1][1]+V[2][1])/2,P="right"):(R=(V[0][0]+V[1][0]+V[2][0]+V[3][0])/4,N=(V[0][1]+V[1][1]+V[2][1]+V[3][1])/4,P="center"),E=[[R,N],[R,N]];else{var Z=void 0,W=void 0,te=void 0,oe=void 0,se=G.get("length");B==="left"?(Z=(V[3][0]+V[0][0])/2,W=(V[3][1]+V[0][1])/2,R=(te=Z-se)-5,P="right"):B==="right"?(Z=(V[1][0]+V[2][0])/2,W=(V[1][1]+V[2][1])/2,R=(te=Z+se)+5,P="left"):B==="top"?(Z=(V[3][0]+V[0][0])/2,N=(oe=(W=(V[3][1]+V[0][1])/2)-se)-5,P="center"):B==="bottom"?(Z=(V[1][0]+V[2][0])/2,N=(oe=(W=(V[1][1]+V[2][1])/2)+se)+5,P="center"):B==="rightTop"?(Z=L==="horizontal"?V[3][0]:V[1][0],W=L==="horizontal"?V[3][1]:V[1][1],L==="horizontal"?(N=(oe=W-se)-5,P="center"):(R=(te=Z+se)+5,P="top")):B==="rightBottom"?(Z=V[2][0],W=V[2][1],L==="horizontal"?(N=(oe=W+se)+5,P="center"):(R=(te=Z+se)+5,P="bottom")):B==="leftTop"?(Z=V[0][0],W=L==="horizontal"?V[0][1]:V[1][1],L==="horizontal"?(N=(oe=W-se)-5,P="center"):(R=(te=Z-se)-5,P="right")):B==="leftBottom"?(Z=L==="horizontal"?V[1][0]:V[3][0],W=L==="horizontal"?V[1][1]:V[2][1],L==="horizontal"?(N=(oe=W+se)+5,P="center"):(R=(te=Z-se)-5,P="right")):(Z=(V[1][0]+V[2][0])/2,W=(V[1][1]+V[2][1])/2,L==="horizontal"?(N=(oe=W+se)+5,P="center"):(R=(te=Z+se)+5,P="left")),L==="horizontal"?R=te=Z:N=oe=W,E=[[Z,W],[te,oe]]}K.label={linePoints:E,x:R,y:N,verticalAlign:"middle",textAlign:P,inside:X}})})(i)})}function _2(n){n.registerChartView(y2),n.registerSeriesModel(v2),n.registerLayout(m2),n.registerProcessor(Yp("funnel"))}function x2(n){(function(t){if(!t.parallel){var e=!1;D(t.series,function(i){i&&i.type==="parallel"&&(e=!0)}),e&&(t.parallel=[{}])}})(n),function(t){D(Ke(t.parallelAxis),function(e){if(ne(e)){var i=e.parallelIndex||0,r=Ke(t.parallel)[i];r&&r.parallelAxisDefault&&de(e,r.parallelAxisDefault,!1)}})}(n)}var b2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){this._model=e,this._api=r,this._handlers||(this._handlers={},D(w2,function(o,a){r.getZr().on(a,this._handlers[a]=he(o,this))},this)),Yh(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,i){hl(this,"_throttledDispatchExpand"),D(this._handlers,function(r,o){i.getZr().off(o,r)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(H({type:"parallelAxisExpand"},e))},t.type="parallel",t}(Xe),w2={mousedown:function(n){yd(this,"click")&&(this._mouseDownPoint=[n.offsetX,n.offsetY])},mouseup:function(n){var t=this._mouseDownPoint;if(yd(this,"click")&&t){var e=[n.offsetX,n.offsetY];if(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(n){if(!this._mouseDownPoint&&yd(this,"mousemove")){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]),i=e.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function yd(n,t){var e=n._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var S2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var i=this.option;e&&de(i,e,!0),this._initDimensions()},t.prototype.contains=function(e,i){var r=e.get("parallelIndex");return r!=null&&i.getComponent("parallel",r)===this},t.prototype.setAxisExpand=function(e){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){e.hasOwnProperty(i)&&(this.option[i]=e[i])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[];D(He(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(r){return(r.get("parallelIndex")||0)===this.componentIndex},this),function(r){e.push("dim"+r.get("dim")),i.push(r.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(be),M2=function(n){function t(e,i,r,o,a){var s=n.call(this,e,i,r)||this;return s.type=o||"value",s.axisIndex=a,s}return F(t,n),t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Rn);function su(n,t,e,i,r,o){n=n||0;var a=e[1]-e[0];if(r!=null&&(r=no(r,[0,a])),o!=null&&(o=Math.max(o,r??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=no(s,[0,a]),r=o=no(s,[r,o]),i=0}t[0]=no(t[0],e),t[1]=no(t[1],e);var l=vd(t,i);t[i]+=n;var u,c=r||0,h=e.slice();return l.sign<0?h[0]+=c:h[1]-=c,t[i]=no(t[i],h),u=vd(t,i),r!=null&&(u.sign!==l.sign||u.span<r)&&(t[1-i]=t[i]+l.sign*r),u=vd(t,i),o!=null&&u.span>o&&(t[1-i]=t[i]+u.sign*o),t}function vd(n,t){var e=n[t]-n[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function no(n,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,n))}var md=D,tx=Math.min,nx=Math.max,ix=Math.floor,T2=Math.ceil,rx=We,C2=Math.PI,I2=function(){function n(t,e,i){this.type="parallel",this._axesMap=re(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return n.prototype._init=function(t,e,i){var r=t.dimensions,o=t.parallelAxisIndex;md(r,function(a,s){var l=o[s],u=e.getComponent("parallelAxis",l),c=this._axesMap.set(a,new M2(a,Vl(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},n.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},n.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,r=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],s=t[o];return a>=i&&a<=i+e.axisLength&&s>=r&&s<=r+e.layoutLength},n.prototype.getModel=function(){return this._model},n.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var r=i.getData();md(this.dimensions,function(o){var a=this._axesMap.get(o);a.scale.unionExtentFromData(r,r.mapDimension(o)),Qr(a.scale,a.model)},this)}},this)},n.prototype.resize=function(t,e){this._rect=It(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},n.prototype.getRect=function(){return this._rect},n.prototype._makeLayoutInfo=function(){var t,e=this._model,i=this._rect,r=["x","y"],o=["width","height"],a=e.get("layout"),s=a==="horizontal"?0:1,l=i[o[s]],u=[0,l],c=this.dimensions.length,h=lu(e.get("axisExpandWidth"),u),p=lu(e.get("axisExpandCount")||0,[0,c]),d=e.get("axisExpandable")&&c>3&&c>p&&p>1&&h>0&&l>0,f=e.get("axisExpandWindow");f?(t=lu(f[1]-f[0],u),f[1]=f[0]+t):(t=lu(h*(p-1),u),(f=[h*(e.get("axisExpandCenter")||ix(c/2))-t/2])[1]=f[0]+t);var g=(l-t)/(c-p);g<3&&(g=0);var y=[ix(rx(f[0]/h,1))+1,T2(rx(f[1]/h,1))-1],v=g/h*f[0];return{layout:a,pixelDimIndex:s,layoutBase:i[r[s]],layoutLength:l,axisBase:i[r[1-s]],axisLength:i[o[1-s]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:c,winInnerIndices:y,axisExpandWindow0Pos:v}},n.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),o=r.layout;e.each(function(a){var s=[0,r.axisLength],l=a.inverse?1:0;a.setExtent(s[l],s[1-l])}),md(i,function(a,s){var l=(r.axisExpandable?D2:A2)(s,r),u={horizontal:{x:l.position,y:r.axisLength},vertical:{x:0,y:l.position}},c={horizontal:C2/2,vertical:0},h=[u[o].x+t.x,u[o].y+t.y],p=c[o],d=[1,0,0,1,0,0];Ii(d,d,p),Ci(d,d,h),this._axesLayout[a]={position:h,rotation:p,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},n.prototype.getAxis=function(t){return this._axesMap.get(t)},n.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},n.prototype.eachActiveState=function(t,e,i,r){i==null&&(i=0),r==null&&(r=t.count());var o=this._axesMap,a=this.dimensions,s=[],l=[];D(a,function(g){s.push(t.mapDimension(g)),l.push(o.get(g).model)});for(var u=this.hasAxisBrushed(),c=i;c<r;c++){var h=void 0;if(u){h="active";for(var p=t.getValues(s,c),d=0,f=a.length;d<f;d++)if(l[d].getActiveState(p[d])==="inactive"){h="inactive";break}}else h="normal";e(h,c)}},n.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,i=!1,r=0,o=t.length;r<o;r++)e.get(t[r]).model.getActiveState()!=="normal"&&(i=!0);return i},n.prototype.axisCoordToPoint=function(t,e){return li([t,0],this._axesLayout[e].transform)},n.prototype.getAxisLayout=function(t){return ae(this._axesLayout[t])},n.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,r=e.axisExpandWindow.slice(),o=r[1]-r[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:r};var s,l=t[i]-e.layoutBase-e.axisExpandWindow0Pos,u="slide",c=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),p=h[0]!=null;if(c)p&&c&&l<o*h[0]?(u="jump",s=l-o*h[2]):p&&c&&l>o*(1-h[0])?(u="jump",s=l-o*(1-h[2])):(s=l-o*h[1])>=0&&(s=l-o*(1-h[1]))<=0&&(s=0),(s*=e.axisExpandWidth/c)?su(s,r,a,"all"):u="none";else{var d=r[1]-r[0];(r=[nx(0,a[1]*l/d-d/2)])[1]=tx(a[1],r[0]+d),r[0]=r[1]-d}return{axisExpandWindow:r,behavior:u}},n}();function lu(n,t){return tx(nx(n,t[0]),t[1])}function A2(n,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*n,axisNameAvailableWidth:e,axisLabelShow:!0}}function D2(n,t){var e,i,r=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return n<l[0]?(e=n*s,i=s):n<=l[1]?(e=t.axisExpandWindow0Pos+n*o-t.axisExpandWindow[0],u=o,c=!0):(e=r-(a-1-n)*s,i=s),{position:e,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}var k2={create:function(n,t){var e=[];return n.eachComponent("parallel",function(i,r){var o=new I2(i,n,t);o.name="parallel_"+r,o.resize(i,t),i.coordinateSystem=o,o.model=i,e.push(o)}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="parallel"){var r=i.getReferringComponents("parallel",Qe).models[0];i.coordinateSystem=r.coordinateSystem}}),e}},_d=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.activeIntervals=[],e}return F(t,n),t.prototype.getAreaSelectStyle=function(){return Cr([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var i=this.activeIntervals=ae(e);if(i)for(var r=i.length-1;r>=0;r--)Do(i[r])},t.prototype.getActiveState=function(e){var i=this.activeIntervals;if(!i.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(i.length===1){var r=i[0];if(r[0]<=e&&e<=r[1])return"active"}else for(var o=0,a=i.length;o<a;o++)if(i[o][0]<=e&&e<=i[o][1])return"active";return"inactive"},t}(be);at(_d,Ta);var hr=!0,Va=Math.min,io=Math.max,L2=Math.pow,ox="globalPan",P2={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},O2={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},ax={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},R2=0,sx=function(n){function t(e){var i=n.call(this)||this;return i._track=[],i._covers=[],i._handlers={},i._zr=e,i.group=new _e,i._uid="brushController_"+R2++,D(E2,function(r,o){this._handlers[o]=he(r,this)},i),i}return F(t,n),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||function(r,o,a){od(r)[o]=a}(i,ox,this._uid),D(this._handlers,function(r,o){i.on(o,r)}),this._brushType=e.brushType,this._brushOption=de(ae(ax),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;(function(i,r,o){var a=od(i);a[r]===o&&(a[r]=null)})(e,ox,this._uid),D(this._handlers,function(i,r){e.off(r,i)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var i=this._panels={};D(e,function(r){i[r.panelId]=ae(r)})}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=j(e,function(u){return de(ae(ax),u,!0)});var i=this._covers,r=this._covers=[],o=this,a=this._creatingCover;return new _p(i,e,function(u,c){return s(u.__brushOption,c)},s).add(l).update(l).remove(function(u){i[u]!==a&&o.group.remove(i[u])}).execute(),this;function s(u,c){return(u.id!=null?u.id:"\0-brush-index-"+c)+"-"+u.brushType}function l(u,c){var h=e[u];if(c!=null&&i[c]===a)r[u]=i[c];else{var p=r[u]=c!=null?(i[c].__brushOption=h,i[c]):ux(o,lx(o,h));xd(o,p)}}},t.prototype.unmount=function(){return this.enableBrush(!1),Sd(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Vt);function lx(n,t){var e=uu[t.brushType].createCover(n,t);return e.__brushOption=t,hx(e,t),n.group.add(e),e}function ux(n,t){var e=bd(t);return e.endCreating&&(e.endCreating(n,t),hx(t,t.__brushOption)),t}function cx(n,t){var e=t.__brushOption;bd(t).updateCoverShape(n,t,e.range,e)}function hx(n,t){var e=t.z;e==null&&(e=1e4),n.traverse(function(i){i.z=e,i.z2=e})}function xd(n,t){bd(t).updateCommon(n,t),cx(n,t)}function bd(n){return uu[n.__brushOption.brushType]}function wd(n,t,e){var i,r=n._panels;if(!r)return hr;var o=n._transform;return D(r,function(a){a.isTargetByCursor(t,e,o)&&(i=a)}),i}function px(n,t){var e=n._panels;if(!e)return hr;var i=t.__brushOption.panelId;return i!=null?e[i]:hr}function Sd(n){var t=n._covers,e=t.length;return D(t,function(i){n.group.remove(i)},n),t.length=0,!!e}function pr(n,t){var e=j(n._covers,function(i){var r=i.__brushOption,o=ae(r.range);return{brushType:r.brushType,panelId:r.panelId,range:o}});n.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function dx(n){var t=n.length-1;return t<0&&(t=0),[n[0],n[t]]}function fx(n,t,e,i){var r=new _e;return r.add(new ke({name:"main",style:Td(e),silent:!0,draggable:!0,cursor:"move",drift:Se(vx,n,t,r,["n","s","w","e"]),ondragend:Se(pr,t,{isEnd:!0})})),D(i,function(o){r.add(new ke({name:o.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Se(vx,n,t,r,o),ondragend:Se(pr,t,{isEnd:!0})}))}),r}function gx(n,t,e,i){var r=i.brushStyle.lineWidth||0,o=io(r,6),a=e[0][0],s=e[1][0],l=a-r/2,u=s-r/2,c=e[0][1],h=e[1][1],p=c-o+r/2,d=h-o+r/2,f=c-a,g=h-s,y=f+r,v=g+r;Jn(n,t,"main",a,s,f,g),i.transformable&&(Jn(n,t,"w",l,u,o,v),Jn(n,t,"e",p,u,o,v),Jn(n,t,"n",l,u,y,o),Jn(n,t,"s",l,d,y,o),Jn(n,t,"nw",l,u,o,o),Jn(n,t,"ne",p,u,o,o),Jn(n,t,"sw",l,d,o,o),Jn(n,t,"se",p,d,o,o))}function Md(n,t){var e=t.__brushOption,i=e.transformable,r=t.childAt(0);r.useStyle(Td(e)),r.attr({silent:!i,cursor:i?"move":"default"}),D([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(o){var a=t.childOfName(o.join("")),s=o.length===1?Cd(n,o[0]):function(l,u){var c=[Cd(l,u[0]),Cd(l,u[1])];return(c[0]==="e"||c[0]==="w")&&c.reverse(),c.join("")}(n,o);a&&a.attr({silent:!i,invisible:!i,cursor:i?O2[s]+"-resize":null})})}function Jn(n,t,e,i,r,o,a){var s=t.childOfName(e);s&&s.setShape(function(l){var u=Va(l[0][0],l[1][0]),c=Va(l[0][1],l[1][1]);return{x:u,y:c,width:io(l[0][0],l[1][0])-u,height:io(l[0][1],l[1][1])-c}}(Id(n,t,[[i,r],[i+o,r+a]])))}function Td(n){return ce({strokeNoScale:!0},n.brushStyle)}function yx(n,t,e,i){var r=[Va(n,e),Va(t,i)],o=[io(n,e),io(t,i)];return[[r[0],o[0]],[r[1],o[1]]]}function Cd(n,t){var e=sh({w:"left",e:"right",n:"top",s:"bottom"}[t],function(i){return $i(i.group)}(n));return{left:"w",right:"e",top:"n",bottom:"s"}[e]}function vx(n,t,e,i,r,o){var a=e.__brushOption,s=n.toRectRange(a.range),l=mx(t,r,o);D(i,function(u){var c=P2[u];s[c[0]][c[1]]+=l[c[0]]}),a.range=n.fromRectRange(yx(s[0][0],s[1][0],s[0][1],s[1][1])),xd(t,e),pr(t,{isEnd:!1})}function N2(n,t,e,i){var r=t.__brushOption.range,o=mx(n,e,i);D(r,function(a){a[0]+=o[0],a[1]+=o[1]}),xd(n,t),pr(n,{isEnd:!1})}function mx(n,t,e){var i=n.group,r=i.transformCoordToLocal(t,e),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function Id(n,t,e){var i=px(n,t);return i&&i!==hr?i.clipPath(e,n._transform):ae(e)}function Ad(n){var t=n.event;t.preventDefault&&t.preventDefault()}function Dd(n,t,e){return n.childOfName("main").contain(t,e)}function _x(n,t,e,i){var r,o=n._creatingCover,a=n._creatingPanel,s=n._brushOption;if(n._track.push(e.slice()),function(c){var h=c._track;if(!h.length)return!1;var p=h[h.length-1],d=h[0],f=p[0]-d[0],g=p[1]-d[1];return L2(f*f+g*g,.5)>6}(n)||o){if(a&&!o){s.brushMode==="single"&&Sd(n);var l=ae(s);l.brushType=xx(l.brushType,a),l.panelId=a===hr?null:a.panelId,o=n._creatingCover=lx(n,l),n._covers.push(o)}if(o){var u=uu[xx(n._brushType,a)];o.__brushOption.range=u.getCreatingRange(Id(n,o,n._track)),i&&(ux(n,o),u.updateCommon(n,o)),cx(n,o),r={isEnd:i}}}else i&&s.brushMode==="single"&&s.removeOnClick&&wd(n,t,e)&&Sd(n)&&(r={isEnd:i,removeOnClick:!0});return r}function xx(n,t){return n==="auto"?t.defaultBrushType:n}var E2={mousedown:function(n){if(this._dragging)bx(this,n);else if(!n.target||!n.target.draggable){Ad(n);var t=this.group.transformCoordToLocal(n.offsetX,n.offsetY);this._creatingCover=null,(this._creatingPanel=wd(this,n,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(n){var t=n.offsetX,e=n.offsetY,i=this.group.transformCoordToLocal(t,e);if(function(o,a,s){if(o._brushType&&!function(d,f,g){var y=d._zr;return f<0||f>y.getWidth()||g<0||g>y.getHeight()}(o,a.offsetX,a.offsetY)){var l=o._zr,u=o._covers,c=wd(o,a,s);if(!o._dragging)for(var h=0;h<u.length;h++){var p=u[h].__brushOption;if(c&&(c===hr||p.panelId===c.panelId)&&uu[p.brushType].contain(u[h],s[0],s[1]))return}c&&l.setCursorStyle("crosshair")}}(this,n,i),this._dragging){Ad(n);var r=_x(this,n,i,!1);r&&pr(this,r)}},mouseup:function(n){bx(this,n)}};function bx(n,t){if(n._dragging){Ad(t);var e=t.offsetX,i=t.offsetY,r=n.group.transformCoordToLocal(e,i),o=_x(n,t,r,!0);n._dragging=!1,n._track=[],n._creatingCover=null,o&&pr(n,o)}}var uu={lineX:Sx(0),lineY:Sx(1),rect:{createCover:function(n,t){function e(i){return i}return fx({toRectRange:e,fromRectRange:e},n,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(n){var t=dx(n);return yx(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(n,t,e,i){gx(n,t,e,i)},updateCommon:Md,contain:Dd},polygon:{createCover:function(n,t){var e=new _e;return e.add(new qt({name:"main",style:Td(t),silent:!0})),e},getCreatingRange:function(n){return n},endCreating:function(n,t){t.remove(t.childAt(0)),t.add(new cn({name:"main",draggable:!0,drift:Se(N2,n,t),ondragend:Se(pr,n,{isEnd:!0})}))},updateCoverShape:function(n,t,e,i){t.childAt(0).setShape({points:Id(n,t,e)})},updateCommon:Md,contain:Dd}};function Sx(n){return{createCover:function(t,e){return fx({toRectRange:function(i){var r=[i,[0,100]];return n&&r.reverse(),r},fromRectRange:function(i){return i[n]}},t,e,[[["w"],["e"]],[["n"],["s"]]][n])},getCreatingRange:function(t){var e=dx(t);return[Va(e[0][n],e[1][n]),io(e[0][n],e[1][n])]},updateCoverShape:function(t,e,i,r){var o,a=px(t,e);if(a!==hr&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(n);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-n]]}var l=[i,o];n&&l.reverse(),gx(t,e,l,r)},updateCommon:Md,contain:Dd}}function Mx(n){return n=kd(n),function(t){return lh(t,n)}}function Tx(n,t){return n=kd(n),function(e){var i=t??e,r=i?n.width:n.height,o=i?n.x:n.y;return[o,o+(r||0)]}}function Cx(n,t,e){var i=kd(n);return function(r,o){return i.contain(o[0],o[1])&&!S1(r,t,e)}}function kd(n){return me.create(n)}var z2=["axisLine","axisTickLabel","axisName"],B2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(e,i){n.prototype.init.apply(this,arguments),(this._brushController=new sx(i.getZr())).on("brush",he(this._onBrush,this))},t.prototype.render=function(e,i,r,o){if(!function(f,g,y){return y&&y.type==="axisAreaSelect"&&g.findComponents({mainType:"parallelAxis",query:y})[0]===f}(e,i,o)){this.axisModel=e,this.api=r,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),e.get("show")){var s=function(f,g){return g.getComponent("parallel",f.get("parallelIndex"))}(e,i),l=s.coordinateSystem,u=e.getAreaSelectStyle(),c=u.width,h=e.axis.dim,p=H({strokeContainThreshold:c},l.getAxisLayout(h)),d=new Pt(e,p);D(z2,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(p,u,e,s,c,r),Ws(a,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,i,r,o,a,s){var l=r.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,.1*Math.abs(u)),h=me.create({x:l[0],y:-a/2,width:u,height:a});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:Mx(h),isTargetByCursor:Cx(h,s,o),getLinearBrushOtherExtent:Tx(h,0)}]).enableBrush({brushType:"lineX",brushStyle:i,removeOnClick:!0}).updateCovers(function(p){var d=p.axis;return j(p.activeIntervals,function(f){return{brushType:"lineX",panelId:"pl",range:[d.dataToCoord(f[0],!0),d.dataToCoord(f[1],!0)]}})}(r))},t.prototype._onBrush=function(e){var i=e.areas,r=this.axisModel,o=r.axis,a=j(i,function(s){return[o.coordToData(s.range[0],!0),o.coordToData(s.range[1],!0)]});(!r.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:a})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(Xe),V2={type:"axisAreaSelect",event:"axisAreaSelected"},F2={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function G2(n){n.registerComponentView(b2),n.registerComponentModel(S2),n.registerCoordinateSystem("parallel",k2),n.registerPreprocessor(x2),n.registerComponentModel(_d),n.registerComponentView(B2),La(n,"parallel",_d,F2),function(t){t.registerAction(V2,function(e,i){i.eachComponent({mainType:"parallelAxis",query:e},function(r){r.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,i){i.eachComponent({mainType:"parallel",query:e},function(r){r.setAxisExpand(e)})})}(n)}var H2=["itemStyle","borderWidth"],Ix=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Ld=new In,W2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){var o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis().isHorizontal(),c=l.master.getRect(),h={ecSize:{width:r.getWidth(),height:r.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:u,valueDim:Ix[+u],categoryDim:Ix[1-+u]};a.diff(s).add(function(d){if(a.hasValue(d)){var f=Rx(a,d),g=Ax(a,d,f,h),y=Nx(a,h,g);a.setItemGraphicEl(d,y),o.add(y),Bx(y,h,g)}}).update(function(d,f){var g=s.getItemGraphicEl(f);if(a.hasValue(d)){var y=Rx(a,d),v=Ax(a,d,y,h),m=zx(a,v);g&&m!==g.__pictorialShapeStr&&(o.remove(g),a.setItemGraphicEl(d,null),g=null),g?function(_,x,b){var w=b.animationModel,M=b.dataIndex;ze(_.__pictorialBundle,{x:b.bundlePosition[0],y:b.bundlePosition[1]},w,M),b.symbolRepeat?kx(_,x,b,!0):Lx(_,0,b,!0),Px(_,b,!0),Ox(_,x,b,!0)}(g,h,v):g=Nx(a,h,v,!0),a.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=v,o.add(g),Bx(g,h,v)}else o.remove(g)}).remove(function(d){var f=s.getItemGraphicEl(d);f&&Ex(s,d,f.__pictorialSymbolMeta.animationModel,f)}).execute();var p=e.get("clip",!0)?k_(e.coordinateSystem,!1,e):null;return p?o.setClipPath(p):o.removeClipPath(),this._data=a,this.group},t.prototype.remove=function(e,i){var r=this.group,o=this._data;e.get("animation")?o&&o.eachItemGraphicEl(function(a){Ex(o,ye(a).dataIndex,e,a)}):r.removeAll()},t.type="pictorialBar",t}(Je);function Ax(n,t,e,i){var r=n.getItemLayout(t),o=e.get("symbolRepeat"),a=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=(e.get("symbolRotate")||0)*Math.PI/180||0,u=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),h={dataIndex:t,layout:r,itemModel:e,symbolType:n.getItemVisual(t,"symbol")||"circle",style:n.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};(function(f,g,y,v,m){var _,x=v.valueDim,b=f.get("symbolBoundingData"),w=v.coordSys.getOtherAxis(v.coordSys.getBaseAxis()),M=w.toGlobalCoord(w.dataToCoord(0)),S=1-+(y[x.wh]<=0);if(Y(b)){var C=[Pd(w,b[0])-M,Pd(w,b[1])-M];C[1]<C[0]&&C.reverse(),_=C[S]}else _=b!=null?Pd(w,b)-M:g?v.coordSysExtent[x.index][S]-M:y[x.wh];m.boundingLength=_,g&&(m.repeatCutLength=y[x.wh]),m.pxSign=_>0?1:-1})(e,o,r,i,h),function(f,g,y,v,m,_,x,b,w,M){var S,C=w.valueDim,I=w.categoryDim,T=Math.abs(y[I.wh]),A=f.getItemVisual(g,"symbolSize");(S=Y(A)?A.slice():A==null?["100%","100%"]:[A,A])[I.index]=ee(S[I.index],T),S[C.index]=ee(S[C.index],v?T:Math.abs(_)),M.symbolSize=S,(M.symbolScale=[S[0]/b,S[1]/b])[C.index]*=(w.isHorizontal?-1:1)*x}(n,t,r,o,0,h.boundingLength,h.pxSign,u,i,h),function(f,g,y,v,m){var _=f.get(H2)||0;_&&(Ld.attr({scaleX:g[0],scaleY:g[1],rotation:y}),Ld.updateTransform(),_/=Ld.getLineScale(),_*=g[v.valueDim.index]),m.valueLineWidth=_||0}(e,h.symbolScale,l,i,h);var p=h.symbolSize,d=jh(e.get("symbolOffset"),p);return function(f,g,y,v,m,_,x,b,w,M,S,C){var I=S.categoryDim,T=S.valueDim,A=C.pxSign,k=Math.max(g[T.index]+b,0),L=k;if(v){var O=Math.abs(w),P=Vn(f.get("symbolMargin"),"15%")+"",R=!1;P.lastIndexOf("!")===P.length-1&&(R=!0,P=P.slice(0,P.length-1));var N=ee(P,g[T.index]),E=Math.max(k+2*N,0),z=R?0:2*N,B=xc(v),G=B?v:Vx((O+z)/E);E=k+2*(N=(O-G*k)/2/(R?G:Math.max(G-1,1))),z=R?0:2*N,B||v==="fixed"||(G=M?Vx((Math.abs(M)+z)/E):0),L=G*E-z,C.repeatTimes=G,C.symbolMargin=N}var K=A*(L/2),V=C.pathPosition=[];V[I.index]=y[I.wh]/2,V[T.index]=x==="start"?K:x==="end"?w-K:w/2,_&&(V[0]+=_[0],V[1]+=_[1]);var X=C.bundlePosition=[];X[I.index]=y[I.xy],X[T.index]=y[T.xy];var Z=C.barRectShape=H({},y);Z[T.wh]=A*Math.max(Math.abs(y[T.wh]),Math.abs(V[T.index]+K)),Z[I.wh]=y[I.wh];var W=C.clipShape={};W[I.xy]=-y[I.xy],W[I.wh]=S.ecSize[I.wh],W[T.xy]=0,W[T.wh]=y[T.wh]}(e,p,r,o,0,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function Pd(n,t){return n.toGlobalCoord(n.dataToCoord(n.scale.parse(t)))}function Dx(n){var t=n.symbolPatternSize,e=_t(n.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function kx(n,t,e,i){var r=n.__pictorialBundle,o=e.symbolSize,a=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,h=o[t.valueDim.index]+a+2*e.symbolMargin;for(Od(n,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c<u?ro(g,null,f(c),e,i):ro(g,null,{scaleX:0,scaleY:0},e,i,function(){r.remove(g)}),c++});c<u;c++){var p=Dx(e);p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,r.add(p);var d=f(c);ro(p,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},e,i)}function f(g){var y=s.slice(),v=e.pxSign,m=g;return(e.symbolRepeatDirection==="start"?v>0:v<0)&&(m=u-1-g),y[l.index]=h*(m-u/2+.5)+s[l.index],{x:y[0],y:y[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function Lx(n,t,e,i){var r=n.__pictorialBundle,o=n.__pictorialMainPath;o?ro(o,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,i):(o=n.__pictorialMainPath=Dx(e),r.add(o),ro(o,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,i))}function Px(n,t,e){var i=H({},t.barRectShape),r=n.__pictorialBarRect;r?ro(r,null,{shape:i},t,e):((r=n.__pictorialBarRect=new ke({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,n.add(r))}function Ox(n,t,e,i){if(e.symbolClip){var r=n.__pictorialClipPath,o=H({},e.clipShape),a=t.valueDim,s=e.animationModel,l=e.dataIndex;if(r)ze(r,{shape:o},s,l);else{o[a.wh]=0,r=new ke({shape:o}),n.__pictorialBundle.setClipPath(r),n.__pictorialClipPath=r;var u={};u[a.wh]=e.clipShape[a.wh],zr[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Rx(n,t){var e=n.getItemModel(t);return e.getAnimationDelayParams=X2,e.isAnimationEnabled=U2,e}function X2(n){return{index:n.__pictorialAnimationIndex,count:n.__pictorialRepeatTimes}}function U2(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Nx(n,t,e,i){var r=new _e,o=new _e;return r.add(o),r.__pictorialBundle=o,o.x=e.bundlePosition[0],o.y=e.bundlePosition[1],e.symbolRepeat?kx(r,t,e):Lx(r,0,e),Px(r,e,i),Ox(r,t,e,i),r.__pictorialShapeStr=zx(n,e),r.__pictorialSymbolMeta=e,r}function Ex(n,t,e,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Od(i,function(a){o.push(a)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(e=null),D(o,function(a){Ko(a,{scaleX:0,scaleY:0},e,t,function(){i.parent&&i.parent.remove(i)})}),n.setItemGraphicEl(t,null)}function zx(n,t){return[n.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Od(n,t,e){D(n.__pictorialBundle.children(),function(i){i!==n.__pictorialBarRect&&t.call(e,i)})}function ro(n,t,e,i,r,o){t&&n.attr(t),i.symbolClip&&!r?e&&n.attr(e):e&&zr[r?"updateProps":"initProps"](n,e,i.animationModel,i.dataIndex,o)}function Bx(n,t,e){var i=e.dataIndex,r=e.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),p=o.get("scale");Od(n,function(g){if(g instanceof Tt){var y=g.style;g.useStyle(H({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},e.style))}else g.useStyle(e.style);var v=g.ensureState("emphasis");v.style=a,p&&(v.scaleX=1.1*g.scaleX,v.scaleY=1.1*g.scaleY),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=e.z2});var d=t.valueDim.posDesc[+(e.boundingLength>0)],f=n.__pictorialBarRect;f.ignoreClip=!0,Dn(f,kn(r),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Ul(t.seriesModel.getData(),i),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:d}),ln(n,c,h,o.get("disabled"))}function Vx(n){var t=Math.round(n);return Math.abs(n-t)<1e-4?t:Math.ceil(n)}var Y2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return F(t,n),t.prototype.getInitialData=function(e){return e.stack=null,n.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ta(Aa.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(Aa);function Z2(n){n.registerChartView(W2),n.registerSeriesModel(Y2),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,Se(E0,"pictorialBar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,z0("pictorialBar"))}var dr=Ee(),Fx=ae,Rd=he,Gx=function(){function n(){this._dragging=!1,this.animationThreshold=15}return n.prototype.render=function(t,e,i,r){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,r||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var s=this._group,l=this._handle;if(!a||a==="hide")return s&&s.hide(),void(l&&l.hide());s&&s.show(),l&&l.show();var u={};this.makeElOption(u,o,t,e,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,e);if(s){var p=Se(Hx,e,h);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,e)}else s=this._group=new _e,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);Ux(s,e,!0),this._renderHandle(o)}},n.prototype.remove=function(t){this.clear(t)},n.prototype.dispose=function(t){this.clear(t)},n.prototype.determineAnimation=function(t,e){var i=e.get("animation"),r=t.axis,o=r.type==="category",a=e.get("snap");if(!a&&!o)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(o&&r.getBandWidth()>s)return!0;if(a){var l=nd(t).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},n.prototype.makeElOption=function(t,e,i,r,o){},n.prototype.createPointerEl=function(t,e,i,r){var o=e.pointer;if(o){var a=dr(t).pointerEl=new zr[o.type](Fx(e.pointer));t.add(a)}},n.prototype.createLabelEl=function(t,e,i,r){if(e.label){var o=dr(t).labelEl=new Me(Fx(e.label));t.add(o),Xx(o,r)}},n.prototype.updatePointerEl=function(t,e,i){var r=dr(t).pointerEl;r&&e.pointer&&(r.setStyle(e.pointer.style),i(r,{shape:e.pointer.shape}))},n.prototype.updateLabelEl=function(t,e,i,r){var o=dr(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{x:e.label.x,y:e.label.y}),Xx(o,r))},n.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,r=this._api.getZr(),o=this._handle,a=i.getModel("handle"),s=i.get("status");if(!a.get("show")||!s||s==="hide")return o&&r.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Qo(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ti(u.event)},onmousedown:Rd(this._onHandleDragMove,this,0,0),drift:Rd(this._onHandleDragMove,this),ondragend:Rd(this._onHandleDragEnd,this)}),r.add(o)),Ux(o,i,!1),o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");Y(l)||(l=[l,l]),o.scaleX=l[0]/2,o.scaleY=l[1]/2,Yh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},n.prototype._moveHandleToValue=function(t,e){Hx(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Nd(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},n.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(Nd(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(Nd(r)),dr(i).lastProp=null,this._doDispatchAxisPointer()}},n.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},n.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},n.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,r=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),r&&e.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),hl(this,"_doDispatchAxisPointer")},n.prototype.doClear=function(){},n.prototype.buildLabel=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},n}();function Hx(n,t,e,i){Wx(dr(e).lastProp,i)||(dr(e).lastProp=i,t?ze(e,i,n):(e.stopAnimation(),e.attr(i)))}function Wx(n,t){if(ne(n)&&ne(t)){var e=!0;return D(t,function(i,r){e=e&&Wx(n[r],i)}),!!e}return n===t}function Xx(n,t){n[t.get(["label","show"])?"show":"hide"]()}function Nd(n){return{x:n.x||0,y:n.y||0,rotation:n.rotation||0}}function Ux(n,t,e){var i=t.get("z"),r=t.get("zlevel");n&&n.traverse(function(o){o.type!=="group"&&(i!=null&&(o.z=i),r!=null&&(o.zlevel=r),o.silent=e)})}function Yx(n){var t,e=n.get("type"),i=n.getModel(e+"Style");return e==="line"?(t=i.getLineStyle()).fill=null:e==="shadow"&&((t=i.getAreaStyle()).stroke=null),t}function Zx(n,t,e,i,r){var o=qx(e.get("value"),t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),a=e.getModel("label"),s=Hr(a.get("padding")||0),l=a.getFont(),u=Io(o,l),c=r.position,h=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;d==="right"&&(c[0]-=h),d==="center"&&(c[0]-=h/2);var f=r.verticalAlign;f==="bottom"&&(c[1]-=p),f==="middle"&&(c[1]-=p/2),function(y,v,m,_){var x=_.getWidth(),b=_.getHeight();y[0]=Math.min(y[0]+v,x)-v,y[1]=Math.min(y[1]+m,b)-m,y[0]=Math.max(y[0],0),y[1]=Math.max(y[1],0)}(c,h,p,i);var g=a.get("backgroundColor");g&&g!=="auto"||(g=t.get(["axisLine","lineStyle","color"])),n.label={x:c[0],y:c[1],style:nt(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function qx(n,t,e,i,r){n=t.scale.parse(n);var o=t.scale.getLabel({value:n},{precision:r.precision}),a=r.formatter;if(a){var s={value:Lp(t,{value:n}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),Q(a)?o=a.replace("{value}",o):ue(a)&&(o=a(s))}return o}function jx(n,t,e){var i=[1,0,0,1,0,0];return Ii(i,i,e.rotation),Ci(i,i,e.position),li([n.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function Kx(n,t,e){return{x1:n[e=e||0],y1:n[1-e],x2:t[e],y2:t[1-e]}}function Jx(n,t,e,i,r,o){return{cx:n,cy:t,r0:e,r:i,startAngle:r,endAngle:o,clockwise:!0}}var q2=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.makeElOption=function(e,i,r,o,a){var s=r.axis,l=s.grid,u=o.get("type"),c=$x(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var p=Yx(o),d=j2[u](s,h,c);d.style=p,e.graphicKey=d.type,e.pointer=d}(function(f,g,y,v,m,_){var x=Pt.innerTextLayout(y.rotation,0,y.labelDirection);y.labelMargin=m.get(["label","margin"]),Zx(g,v,m,_,{position:jx(v.axis,f,y),align:x.textAlign,verticalAlign:x.textVerticalAlign})})(i,e,$p(l.model,r),r,o,a)},t.prototype.getHandleTransform=function(e,i,r){var o=$p(i.axis.grid.model,i,{labelInside:!1});o.labelMargin=r.get(["handle","margin"]);var a=jx(i.axis,e,o);return{x:a[0],y:a[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,r,o){var a=r.axis,s=a.grid,l=a.getGlobalExtent(!0),u=$x(s,a).getOtherAxis(a).getGlobalExtent(),c=a.dim==="x"?0:1,h=[e.x,e.y];h[c]+=i[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var p=(u[1]+u[0])/2,d=[p,p];return d[c]=h[c],{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][c]}},t}(Gx);function $x(n,t){var e={};return e[t.dim+"AxisIndex"]=t.index,n.getCartesian(e)}var j2={line:function(n,t,e){return{type:"Line",subPixelOptimize:!0,shape:Kx([t,e[0]],[t,e[1]],Qx(n))}},shadow:function(n,t,e){var i,r,o,a=Math.max(1,n.getBandWidth()),s=e[1]-e[0];return{type:"Rect",shape:(i=[t-a/2,e[0]],r=[a,s],o=Qx(n),{x:i[o=o||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function Qx(n){return n.dim==="x"?0:1}var K2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),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}(be),$n=Ee(),J2=D;function eb(n,t,e){if(!fe.node){var i=t.getZr();$n(i).records||($n(i).records={}),function(r,o){function a(s,l){r.on(s,function(u){var c=function(h){var p={showTip:[],hideTip:[]},d=function(f){var g=p[f.type];g?g.push(f):(f.dispatchAction=d,h.dispatchAction(f))};return{dispatchAction:d,pendings:p}}(o);J2($n(r).records,function(h){h&&l(h,u,c.dispatchAction)}),function(h,p){var d,f=h.showTip.length,g=h.hideTip.length;f?d=h.showTip[f-1]:g&&(d=h.hideTip[g-1]),d&&(d.dispatchAction=null,p.dispatchAction(d))}(c.pendings,o)})}$n(r).initialized||($n(r).initialized=!0,a("click",Se(tb,"click")),a("mousemove",Se(tb,"mousemove")),a("globalout",$2))}(i,t),($n(i).records[n]||($n(i).records[n]={})).handler=e}}function $2(n,t,e){n.handler("leave",null,e)}function tb(n,t,e,i){t.handler(n,e,i)}function Ed(n,t){if(!fe.node){var e=t.getZr();($n(e).records||{})[n]&&($n(e).records[n]=null)}}var Q2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){var o=i.getComponent("tooltip"),a=e.get("triggerOn")||o&&o.get("triggerOn")||"mousemove|click";eb("axisPointer",r,function(s,l,u){a!=="none"&&(s==="leave"||a.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){Ed("axisPointer",i)},t.prototype.dispose=function(e,i){Ed("axisPointer",i)},t.type="axisPointer",t}(Xe);function nb(n,t){var e,i=[],r=n.seriesIndex;if(r==null||!(e=t.getSeriesByIndex(r)))return{point:[]};var o=e.getData(),a=zi(o,n);if(a==null||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=e.coordinateSystem;if(e.getTooltipPosition)i=e.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(n.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h=u.dim,p=c==="x"||c==="radius"?1:0,d=o.mapDimension(h),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(j(l.dimensions,function(y){return o.mapDimension(y)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var ib=Ee();function eA(n,t,e){var i=n.currTrigger,r=[n.x,n.y],o=n,a=n.dispatchAction||he(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){cu(r)&&(r=nb({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=cu(r),u=o.axesInfo,c=s.axesInfo,h=i==="leave"||cu(r),p={},d={},f={list:[],map:{}},g={showPointer:Se(tA,d),showTooltip:Se(nA,f)};D(s.coordSysMap,function(v,m){var _=l||v.containPoint(r);D(s.coordSysAxesInfo[m],function(x,b){var w=x.axis,M=function(C,I){for(var T=0;T<(C||[]).length;T++){var A=C[T];if(I.axis.dim===A.axisDim&&I.axis.model.componentIndex===A.axisIndex)return A}}(u,x);if(!h&&_&&(!u||M)){var S=M&&M.value;S!=null||l||(S=w.pointToData(r)),S!=null&&rb(x,S,g,!1,p)}})});var y={};return D(c,function(v,m){var _=v.linkGroup;_&&!d[m]&&D(_.axesInfo,function(x,b){var w=d[b];if(x!==v&&w){var M=w.value;_.mapper&&(M=v.axis.scale.parse(_.mapper(M,ob(x),ob(v)))),y[v.key]=M}})}),D(y,function(v,m){rb(c[m],v,g,!0,p)}),function(v,m,_){var x=_.axesInfo=[];D(m,function(b,w){var M=b.axisPointerModel.option,S=v[w];S?(!b.useHandle&&(M.status="show"),M.value=S.value,M.seriesDataIndices=(S.payloadBatch||[]).slice()):!b.useHandle&&(M.status="hide"),M.status==="show"&&x.push({axisDim:b.axis.dim,axisIndex:b.axis.model.componentIndex,value:M.value})})}(d,c,p),function(v,m,_,x){if(!cu(m)&&v.list.length){var b=((v.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};x({type:"showTip",escapeConnect:!0,x:m[0],y:m[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:b.dataIndexInside,dataIndex:b.dataIndex,seriesIndex:b.seriesIndex,dataByCoordSys:v.list})}else x({type:"hideTip"})}(f,r,n,a),function(v,m,_){var x=_.getZr(),b="axisPointerLastHighlights",w=ib(x)[b]||{},M=ib(x)[b]={};D(v,function(I,T){var A=I.axisPointerModel.option;A.status==="show"&&I.triggerEmphasis&&D(A.seriesDataIndices,function(k){var L=k.seriesIndex+" | "+k.dataIndex;M[L]=k})});var S=[],C=[];D(w,function(I,T){!M[T]&&C.push(I)}),D(M,function(I,T){!w[T]&&S.push(I)}),C.length&&_.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:C}),S.length&&_.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:S})}(c,0,e),p}}function rb(n,t,e,i,r){var o=n.axis;if(!o.scale.isBlank()&&o.containData(t))if(n.involveSeries){var a=function(u,c){var h=c.axis,p=h.dim,d=u,f=[],g=Number.MAX_VALUE,y=-1;return D(c.seriesModels,function(v,m){var _,x,b=v.getData().mapDimensionsAll(p);if(v.getAxisTooltipData){var w=v.getAxisTooltipData(b,u,h);x=w.dataIndices,_=w.nestestValue}else{if(!(x=v.getData().indicesOfNearest(b[0],u,h.type==="category"?.5:null)).length)return;_=v.getData().get(b[0],x[0])}if(_!=null&&isFinite(_)){var M=u-_,S=Math.abs(M);S<=g&&((S<g||M>=0&&y<0)&&(g=S,y=M,d=_,f.length=0),D(x,function(C){f.push({seriesIndex:v.seriesIndex,dataIndexInside:C,dataIndex:v.getData().getRawIndex(C)})}))}}),{payloadBatch:f,snapToValue:d}}(t,n),s=a.payloadBatch,l=a.snapToValue;s[0]&&r.seriesIndex==null&&H(r,s[0]),!i&&n.snap&&o.containData(l)&&l!=null&&(t=l),e.showPointer(n,t,s),e.showTooltip(n,a,l)}else e.showPointer(n,t)}function tA(n,t,e,i){n[t.key]={value:e,payloadBatch:i}}function nA(n,t,e,i){var r=e.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=Pa(l),c=n.map[u];c||(c=n.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},n.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function ob(n){var t=n.axis.model,e={},i=e.axisDim=n.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 cu(n){return!n||n[0]==null||isNaN(n[0])||n[1]==null||isNaN(n[1])}function zd(n){Oa.registerAxisPointerClass("CartesianAxisPointer",q2),n.registerComponentModel(K2),n.registerComponentView(Q2),n.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=function(i,r){var o={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(a,s,l){var u=s.getComponent("tooltip"),c=s.getComponent("axisPointer"),h=c.get("link",!0)||[],p=[];D(l.getCoordinateSystems(),function(d){if(d.axisPointerEnabled){var f=Pa(d.model),g=a.coordSysAxesInfo[f]={};a.coordSysMap[f]=d;var y=d.model.getModel("tooltip",u);if(D(d.getAxes(),Se(x,!1,null)),d.getTooltipAxes&&u&&y.get("show")){var v=y.get("trigger")==="axis",m=y.get(["axisPointer","type"])==="cross",_=d.getTooltipAxes(y.get(["axisPointer","axis"]));(v||m)&&D(_.baseAxes,Se(x,!m||"cross",v)),m&&D(_.otherAxes,Se(x,"cross",!1))}}function x(b,w,M){var S=M.model.getModel("axisPointer",c),C=S.get("show");if(C&&(C!=="auto"||b||id(S))){w==null&&(w=S.get("triggerTooltip")),S=b?function(R,N,E,z,B,G){var K=N.getModel("axisPointer"),V={};D(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(te){V[te]=ae(K.get(te))}),V.snap=R.type!=="category"&&!!G,K.get("type")==="cross"&&(V.type="line");var X=V.label||(V.label={});if(X.show==null&&(X.show=!1),B==="cross"){var Z=K.get(["label","show"]);if(X.show=Z==null||Z,!G){var W=V.lineStyle=K.get("crossStyle");W&&ce(X,W.textStyle)}}return R.model.getModel("axisPointer",new Le(V,E,z))}(M,y,c,s,b,w):S;var I=S.get("snap"),T=S.get("triggerEmphasis"),A=Pa(M.model),k=w||I||M.type==="category",L=a.axesInfo[A]={key:A,axis:M,coordSys:d,axisPointerModel:S,triggerTooltip:w,triggerEmphasis:T,involveSeries:k,snap:I,useHandle:id(S),seriesModels:[],linkGroup:null};g[A]=L,a.seriesInvolved=a.seriesInvolved||k;var O=function(R,N){for(var E=N.model,z=N.dim,B=0;B<R.length;B++){var G=R[B]||{};if(td(G[z+"AxisId"],E.id)||td(G[z+"AxisIndex"],E.componentIndex)||td(G[z+"AxisName"],E.name))return B}}(h,M);if(O!=null){var P=p[O]||(p[O]={axesInfo:{}});P.axesInfo[A]=L,P.mapper=h[O].mapper,L.linkGroup=P}}}})}(o,i,r),o.seriesInvolved&&function(a,s){s.eachSeries(function(l){var u=l.coordinateSystem,c=l.get(["tooltip","trigger"],!0),h=l.get(["tooltip","show"],!0);u&&c!=="none"&&c!==!1&&c!=="item"&&h!==!1&&l.get(["axisPointer","show"],!0)!==!1&&D(a.coordSysAxesInfo[Pa(u.model)],function(p){var d=p.axis;u.getAxis(d.dim)===d&&(p.seriesModels.push(l),p.seriesDataCount==null&&(p.seriesDataCount=0),p.seriesDataCount+=l.getData().count())})})}(o,i),o}(t,e)}),n.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},eA)}function iA(n){Lt(SI),Lt(zd)}var rA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.makeElOption=function(e,i,r,o,a){var s=r.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s).getExtent(),c=s.dataToCoord(i),h=o.get("type");if(h&&h!=="none"){var p=Yx(o),d=oA[h](s,l,c,u);d.style=p,e.graphicKey=d.type,e.pointer=d}var f=function(g,y,v,m,_){var x=y.axis,b=x.dataToCoord(g),w=m.getAngleAxis().getExtent()[0];w=w/180*Math.PI;var M,S,C,I=m.getRadiusAxis().getExtent();if(x.dim==="radius"){var T=[1,0,0,1,0,0];Ii(T,T,w),Ci(T,T,[m.cx,m.cy]),M=li([b,-_],T);var A=y.getModel("axisLabel").get("rotate")||0,k=Pt.innerTextLayout(w,A*Math.PI/180,-1);S=k.textAlign,C=k.textVerticalAlign}else{var L=I[1];M=m.coordToPoint([L+_,b]);var O=m.cx,P=m.cy;S=Math.abs(M[0]-O)/L<.3?"center":M[0]>O?"left":"right",C=Math.abs(M[1]-P)/L<.3?"middle":M[1]>P?"top":"bottom"}return{position:M,align:S,verticalAlign:C}}(i,r,0,l,o.get(["label","margin"]));Zx(e,r,o,a,f)},t}(Gx),oA={line:function(n,t,e,i){return n.dim==="angle"?{type:"Line",shape:Kx(t.coordToPoint([i[0],e]),t.coordToPoint([i[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(n,t,e,i){var r=Math.max(1,n.getBandWidth()),o=Math.PI/180;return n.dim==="angle"?{type:"Sector",shape:Jx(t.cx,t.cy,i[0],i[1],(-e-r/2)*o,(r/2-e)*o)}:{type:"Sector",shape:Jx(t.cx,t.cy,e-r/2,e+r/2,0,2*Math.PI)}}},aA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.findAxisModel=function(e){var i;return this.ecModel.eachComponent(e,function(r){r.getCoordSysModel()===this&&(i=r)},this),i},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(be),Bd=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Qe).models[0]},t.type="polarAxis",t}(be);at(Bd,Ta);var sA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="angleAxis",t}(Bd),lA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="radiusAxis",t}(Bd),Vd=function(n){function t(e,i){return n.call(this,"radius",e,i)||this}return F(t,n),t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t}(Rn);Vd.prototype.dataToRadius=Rn.prototype.dataToCoord,Vd.prototype.radiusToData=Rn.prototype.coordToData;var uA=Ee(),Fd=function(n){function t(e,i){return n.call(this,"angle",e,i||[0,360])||this}return F(t,n),t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,i=e.getLabelModel(),r=e.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=o[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),c=Io(s==null?"":s+"",i.getFont(),"center","top"),h=Math.max(c.height,7)/u;isNaN(h)&&(h=1/0);var p=Math.max(0,Math.floor(h)),d=uA(e.model),f=d.lastAutoInterval,g=d.lastTickCount;return f!=null&&g!=null&&Math.abs(f-p)<=1&&Math.abs(g-a)<=1&&f>p?p=f:(d.lastTickCount=a,d.lastAutoInterval=p),p},t}(Rn);Fd.prototype.dataToAngle=Rn.prototype.dataToCoord,Fd.prototype.angleToData=Rn.prototype.coordToData;var ab=["radius","angle"],cA=function(){function n(t){this.dimensions=ab,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Vd,this._angleAxis=new Fd,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return n.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},n.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},n.prototype.getAxis=function(t){return this["_"+t+"Axis"]},n.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},n.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===t&&e.push(i),r.scale.type===t&&e.push(r),e},n.prototype.getAngleAxis=function(){return this._angleAxis},n.prototype.getRadiusAxis=function(){return this._radiusAxis},n.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},n.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},n.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},n.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},n.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,r=this.getAngleAxis(),o=r.getExtent(),a=Math.min(o[0],o[1]),s=Math.max(o[0],o[1]);r.inverse?a=s-360:s=a+360;var l=Math.sqrt(e*e+i*i);e/=l,i/=l;for(var u=Math.atan2(-i,e)/Math.PI*180,c=u<a?1:-1;u<a||u>s;)u+=360*c;return[l,u]},n.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},n.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:t.inverse,contain:function(o,a){var s=o-this.cx,l=a-this.cy,u=s*s+l*l-1e-4,c=this.r,h=this.r0;return u<=c*c&&u>=h*h}}},n.prototype.convertToPixel=function(t,e,i){return sb(e)===this?this.dataToPoint(i):null},n.prototype.convertFromPixel=function(t,e,i){return sb(e)===this?this.pointToData(i):null},n}();function sb(n){var t=n.seriesModel,e=n.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function hA(n,t){var e=this,i=e.getAngleAxis(),r=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),n.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();D(Fl(l,"radius"),function(u){r.scale.unionExtentFromData(l,u)}),D(Fl(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),Qr(i.scale,i.model),Qr(r.scale,r.model),i.type==="category"&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function lb(n,t){var e;if(n.type=t.get("type"),n.scale=Vl(t),n.onBand=t.get("boundaryGap")&&n.type==="category",n.inverse=t.get("inverse"),function(o){return o.mainType==="angleAxis"}(t)){n.inverse=n.inverse!==t.get("clockwise");var i=t.get("startAngle"),r=(e=t.get("endAngle"))!==null&&e!==void 0?e:i+(n.inverse?-360:360);n.setExtent(i,r)}t.axis=n,n.model=t}var pA={dimensions:ab,create:function(n,t){var e=[];return n.eachComponent("polar",function(i,r){var o=new cA(r+"");o.update=hA;var a=o.getRadiusAxis(),s=o.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");lb(a,l),lb(s,u),function(c,h,p){var d=h.get("center"),f=p.getWidth(),g=p.getHeight();c.cx=ee(d[0],f),c.cy=ee(d[1],g);var y=c.getRadiusAxis(),v=Math.min(f,g)/2,m=h.get("radius");m==null?m=[0,"100%"]:Y(m)||(m=[0,m]);var _=[ee(m[0],v),ee(m[1],v)];y.inverse?y.setExtent(_[1],_[0]):y.setExtent(_[0],_[1])}(o,i,t),e.push(o),i.coordinateSystem=o,o.model=i}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var r=i.getReferringComponents("polar",Qe).models[0];i.coordinateSystem=r.coordinateSystem}}),e}},dA=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function hu(n,t,e){t[1]>t[0]&&(t=t.slice().reverse());var i=n.coordToPoint([t[0],e]),r=n.coordToPoint([t[1],e]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function pu(n){return n.getRadiusAxis().inverse?0:1}function ub(n){var t=n[0],e=n[n.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&n.pop()}var fA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return F(t,n),t.prototype.render=function(e,i){if(this.group.removeAll(),e.get("show")){var r=e.axis,o=r.polar,a=o.getRadiusAxis().getExtent(),s=r.getTicksCoords(),l=r.getMinorTicksCoords(),u=j(r.getViewLabels(),function(c){c=ae(c);var h=r.scale,p=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=r.dataToCoord(p),c});ub(u),ub(s),D(dA,function(c){!e.get([c,"show"])||r.scale.isBlank()&&c!=="axisLine"||gA[c](this.group,e,o,s,l,a,u)},this)}},t.type="angleAxis",t}(Oa),gA={axisLine:function(n,t,e,i,r,o){var a,s=t.getModel(["axisLine","lineStyle"]),l=e.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),h=pu(e),p=h?0:1,d=Math.abs(c[1]-c[0])===360?"Circle":"Arc";(a=o[p]===0?new zr[d]({shape:{cx:e.cx,cy:e.cy,r:o[h],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Rr({shape:{cx:e.cx,cy:e.cy,r:o[h],r0:o[p]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,n.add(a)},axisTick:function(n,t,e,i,r,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[pu(e)],u=j(i,function(c){return new ut({shape:hu(e,[l,l+s],c.coord)})});n.add(Kt(u,{style:ce(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(n,t,e,i,r,o){if(r.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[pu(e)],c=[],h=0;h<r.length;h++)for(var p=0;p<r[h].length;p++)c.push(new ut({shape:hu(e,[u,u+l],r[h][p].coord)}));n.add(Kt(c,{style:ce(s.getModel("lineStyle").getLineStyle(),ce(a.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(n,t,e,i,r,o,a){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");D(a,function(h,p){var d=l,f=h.tickValue,g=o[pu(e)],y=e.coordToPoint([g+u,h.coord]),v=e.cx,m=e.cy,_=Math.abs(y[0]-v)/g<.3?"center":y[0]>v?"left":"right",x=Math.abs(y[1]-m)/g<.3?"middle":y[1]>m?"top":"bottom";if(s&&s[f]){var b=s[f];ne(b)&&b.textStyle&&(d=new Le(b.textStyle,l,l.ecModel))}var w=new Me({silent:Pt.isLabelSilent(t),style:nt(d,{x:y[0],y:y[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:x})});if(n.add(w),c){var M=Pt.makeAxisEventDataBase(t);M.targetType="axisLabel",M.value=h.rawLabel,ye(w).eventData=M}},this)},splitLine:function(n,t,e,i,r,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<i.length;c++){var h=l++%s.length;u[h]=u[h]||[],u[h].push(new ut({shape:hu(e,o,i[c].coord)}))}for(c=0;c<u.length;c++)n.add(Kt(u[c],{style:ce({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(n,t,e,i,r,o){if(r.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new ut({shape:hu(e,o,r[l][u].coord)}));n.add(Kt(s,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(n,t,e,i,r,o){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,h=-i[0].coord*c,p=Math.min(o[0],o[1]),d=Math.max(o[0],o[1]),f=t.get("clockwise"),g=1,y=i.length;g<=y;g++){var v=g===y?i[0].coord:i[g].coord,m=l++%s.length;u[m]=u[m]||[],u[m].push(new Nt({shape:{cx:e.cx,cy:e.cy,r0:p,r:d,startAngle:h,endAngle:-v*c,clockwise:f},silent:!0})),h=-v*c}for(g=0;g<u.length;g++)n.add(Kt(u[g],{style:ce({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}},yA=["axisLine","axisTickLabel","axisName"],vA=["splitLine","splitArea","minorSplitLine"],mA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return F(t,n),t.prototype.render=function(e,i){if(this.group.removeAll(),e.get("show")){var r=this._axisGroup,o=this._axisGroup=new _e;this.group.add(o);var a=e.axis,s=a.polar,l=s.getAngleAxis(),u=a.getTicksCoords(),c=a.getMinorTicksCoords(),h=l.getExtent()[0],p=a.getExtent(),d=function(g,y,v){return{position:[g.cx,g.cy],rotation:v/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:y.getModel("axisLabel").get("rotate"),z2:1}}(s,e,h),f=new Pt(e,d);D(yA,f.add,f),o.add(f.getGroup()),Ws(r,o,e),D(vA,function(g){e.get([g,"show"])&&!a.scale.isBlank()&&_A[g](this.group,e,s,h,p,u,c)},this)}},t.type="radiusAxis",t}(Oa),_A={splitLine:function(n,t,e,i,r,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,u=e.getAngleAxis(),c=Math.PI/180,h=u.getExtent(),p=Math.abs(h[1]-h[0])===360?"Circle":"Arc";s=s instanceof Array?s:[s];for(var d=[],f=0;f<o.length;f++){var g=l++%s.length;d[g]=d[g]||[],d[g].push(new zr[p]({shape:{cx:e.cx,cy:e.cy,r:Math.max(o[f].coord,0),startAngle:-h[0]*c,endAngle:-h[1]*c,clockwise:u.inverse}}))}for(f=0;f<d.length;f++)n.add(Kt(d[f],{style:ce({stroke:s[f%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(n,t,e,i,r,o,a){if(a.length){for(var s=t.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new In({shape:{cx:e.cx,cy:e.cy,r:a[u][c].coord}}));n.add(Kt(l,{style:ce({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(n,t,e,i,r,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=o[0].coord,h=1;h<o.length;h++){var p=l++%s.length;u[p]=u[p]||[],u[p].push(new Nt({shape:{cx:e.cx,cy:e.cy,r0:c,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=o[h].coord}for(h=0;h<u.length;h++)n.add(Kt(u[h],{style:ce({fill:s[h%s.length]},a.getAreaStyle()),silent:!0}))}}};function cb(n){return n.get("stack")||"__ec_stack_"+n.seriesIndex}function hb(n,t){return t.dim+n.model.componentIndex}function xA(n,t,e){var i={},r=function(o){var a={};D(o,function(l,u){var c=l.getData(),h=l.coordinateSystem,p=h.getBaseAxis(),d=hb(h,p),f=p.getExtent(),g=p.type==="category"?p.getBandWidth():Math.abs(f[1]-f[0])/c.count(),y=a[d]||{bandWidth:g,remainedWidth:g,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=y.stacks;a[d]=y;var m=cb(l);v[m]||y.autoWidthCount++,v[m]=v[m]||{width:0,maxWidth:0};var _=ee(l.get("barWidth"),g),x=ee(l.get("barMaxWidth"),g),b=l.get("barGap"),w=l.get("barCategoryGap");_&&!v[m].width&&(_=Math.min(y.remainedWidth,_),v[m].width=_,y.remainedWidth-=_),x&&(v[m].maxWidth=x),b!=null&&(y.gap=b),w!=null&&(y.categoryGap=w)});var s={};return D(a,function(l,u){s[u]={};var c=l.stacks,h=l.bandWidth,p=ee(l.categoryGap,h),d=ee(l.gap,1),f=l.remainedWidth,g=l.autoWidthCount,y=(f-p)/(g+(g-1)*d);y=Math.max(y,0),D(c,function(x,b){var w=x.maxWidth;w&&w<y&&(w=Math.min(w,f),x.width&&(w=Math.min(w,x.width)),f-=w,x.width=w,g--)}),y=(f-p)/(g+(g-1)*d),y=Math.max(y,0);var v,m=0;D(c,function(x,b){x.width||(x.width=y),v=x,m+=x.width*(1+d)}),v&&(m-=v.width*d);var _=-m/2;D(c,function(x,b){s[u][b]=s[u][b]||{offset:_,width:x.width},_+=x.width*(1+d)})}),s}(He(t.getSeriesByType(n),function(o){return!t.isSeriesFiltered(o)&&o.coordinateSystem&&o.coordinateSystem.type==="polar"}));t.eachSeriesByType(n,function(o){if(o.coordinateSystem.type==="polar"){var a=o.getData(),s=o.coordinateSystem,l=s.getBaseAxis(),u=hb(s,l),c=cb(o),h=r[u][c],p=h.offset,d=h.width,f=s.getOtherAxis(l),g=o.coordinateSystem.cx,y=o.coordinateSystem.cy,v=o.get("barMinHeight")||0,m=o.get("barMinAngle")||0;i[c]=i[c]||[];for(var _=a.mapDimension(f.dim),x=a.mapDimension(l.dim),b=fi(a,_),w=l.dim!=="radius"||!o.get("roundCap",!0),M=f.model.get("startValue"),S=f.dataToCoord(M||0),C=0,I=a.count();C<I;C++){var T=a.get(_,C),A=a.get(x,C),k=T>=0?"p":"n",L=S;b&&(i[c][A]||(i[c][A]={p:S,n:S}),L=i[c][A][k]);var O=void 0,P=void 0,R=void 0,N=void 0;if(f.dim==="radius"){var E=f.dataToCoord(T)-S,z=l.dataToCoord(A);Math.abs(E)<v&&(E=(E<0?-1:1)*v),O=L,P=L+E,N=(R=z-p)-d,b&&(i[c][A][k]=P)}else{var B=f.dataToCoord(T,w)-S,G=l.dataToCoord(A);Math.abs(B)<m&&(B=(B<0?-1:1)*m),P=(O=G+p)+d,R=L,N=L+B,b&&(i[c][A][k]=N)}a.setItemLayout(C,{cx:g,cy:y,r0:O,r:P,startAngle:-R*Math.PI/180,endAngle:-N*Math.PI/180,clockwise:R>=N})}}})}var bA={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},wA={splitNumber:5},SA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="polar",t}(Xe);function MA(n){Lt(zd),Oa.registerAxisPointerClass("PolarAxisPointer",rA),n.registerCoordinateSystem("polar",pA),n.registerComponentModel(aA),n.registerComponentView(SA),La(n,"angle",sA,bA),La(n,"radius",lA,wA),n.registerComponentView(fA),n.registerComponentView(mA),n.registerLayout(Se(xA,"bar"))}var pb=["x","y","radius","angle","single"],TA=["cartesian2d","polar","singleAxis"];function oo(n){return n+"Axis"}var Gd=function(){function n(){this.indexList=[],this.indexMap=[]}return n.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},n}(),CA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return F(t,n),t.prototype.init=function(e,i,r){var o=db(e);this.settledOption=o,this.mergeDefaultAndTheme(e,r),this._doInit(o)},t.prototype.mergeOption=function(e){var i=db(e);de(this.option,e,!0),de(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var r=this.settledOption;D([["start","startValue"],["end","endValue"]],function(o,a){this._rangePropMode[a]==="value"&&(i[o[0]]=r[o[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=re();this._fillSpecifiedTargetAxis(i)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(r){r.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return D(pb,function(r){var o=this.getReferringComponents(oo(r),hS);if(o.specified){i=!0;var a=new Gd;D(o.models,function(s){a.add(s.componentIndex)}),e.set(r,a)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var r=this.ecModel,o=!0;if(o){var a=i==="vertical"?"y":"x";s(r.findComponents({mainType:a+"Axis"}),a)}function s(l,u){var c=l[0];if(c){var h=new Gd;if(h.add(c.componentIndex),e.set(u,h),o=!1,u==="x"||u==="y"){var p=c.getReferringComponents("grid",Qe).models[0];p&&D(l,function(d){c.componentIndex!==d.componentIndex&&p===d.getReferringComponents("grid",Qe).models[0]&&h.add(d.componentIndex)})}}}o&&s(r.findComponents({mainType:"singleAxis",filter:function(l){return l.get("orient",!0)===i}}),"single"),o&&D(pb,function(l){if(o){var u=r.findComponents({mainType:oo(l),filter:function(h){return h.get("type",!0)==="category"}});if(u[0]){var c=new Gd;c.add(u[0].componentIndex),e.set(l,c),o=!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,r=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(o,a){var s=e[o[0]]!=null,l=e[o[1]]!=null;s&&!l?i[a]="percent":!s&&l?i[a]="value":r?i[a]=r[a]:s&&(i[a]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,r){e==null&&(e=this.ecModel.getComponent(oo(i),r))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(r,o){D(r.indexList,function(a){e.call(i,o,a)})})},t.prototype.getAxisProxy=function(e,i){var r=this.getAxisModel(e,i);if(r)return r.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var r=this._targetAxisInfoMap.get(e);if(r&&r.indexMap[i])return this.ecModel.getComponent(oo(e),i)},t.prototype.setRawRange=function(e){var i=this.option,r=this.settledOption;D([["start","startValue"],["end","endValue"]],function(o){e[o[0]]==null&&e[o[1]]==null||(i[o[0]]=r[o[0]]=e[o[0]],i[o[1]]=r[o[1]]=e[o[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;D(["start","startValue","end","endValue"],function(r){i[r]=e[r]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e!=null||i!=null)return this.getAxisProxy(e,i).getDataValueWindow();var r=this.findRepresentativeAxisProxy();return r?r.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,r=this._targetAxisInfoMap.keys(),o=0;o<r.length;o++)for(var a=r[o],s=this._targetAxisInfoMap.get(a),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(a,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}(be);function db(n){var t={};return D(["start","end","startValue","endValue","throttle"],function(e){n.hasOwnProperty(e)&&(t[e]=n[e])}),t}var IA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="dataZoom.select",t}(CA),AA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="dataZoom.select",t}(function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r,o){this.dataZoomModel=e,this.ecModel=i,this.api=r},t.type="dataZoom",t}(Xe)),ao=D,fb=Do,DA=function(){function n(t,e,i,r){this._dimName=t,this._axisIndex=e,this.ecModel=r,this._dataZoomModel=i}return n.prototype.hostedBy=function(t){return this._dataZoomModel===t},n.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},n.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},n.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(function(o){var a=o.get("coordinateSystem");return we(TA,a)>=0}(e)){var i=oo(this._dimName),r=e.getReferringComponents(i,Qe).models[0];r&&this._axisIndex===r.componentIndex&&t.push(e)}},this),t},n.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},n.prototype.getMinMaxSpan=function(){return ae(this._minMaxSpan)},n.prototype.calculateDataWindow=function(t){var e,i=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),a=[0,100],s=[],l=[];ao(["start","end"],function(h,p){var d=t[h],f=t[h+"Value"];o[p]==="percent"?(d==null&&(d=a[p]),f=r.parse(Fe(d,a,i))):(e=!0,d=Fe(f=f==null?i[p]:r.parse(f),i,a)),l[p]=f==null||isNaN(f)?i[p]:f,s[p]=d==null||isNaN(d)?a[p]:d}),fb(l),fb(s);var u=this._minMaxSpan;function c(h,p,d,f,g){var y=g?"Span":"ValueSpan";su(0,h,d,"all",u["min"+y],u["max"+y]);for(var v=0;v<2;v++)p[v]=Fe(h[v],d,f,!0),g&&(p[v]=r.parse(p[v]))}return e?c(l,s,i,a,!1):c(s,l,a,i,!0),{valueWindow:l,percentWindow:s}},n.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(r,o,a){var s=[1/0,-1/0];ao(a,function(c){(function(h,p,d){p&&D(Fl(p,d),function(f){var g=p.getApproximateExtent(f);g[0]<h[0]&&(h[0]=g[0]),g[1]>h[1]&&(h[1]=g[1])})})(s,c.getData(),o)});var l=r.getAxisModel(),u=X0(l.axis.scale,l,s).calculate();return[u.min,u.max]}(this,this._dimName,e),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},n.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var i=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;o!=="none"&&ao(r,function(s){var l=s.getData(),u=l.mapDimensionsAll(i);if(u.length){if(o==="weakFilter"){var c=l.getStore(),h=j(u,function(p){return l.getDimensionIndex(p)},l);l.filterSelf(function(p){for(var d,f,g,y=0;y<u.length;y++){var v=c.get(h[y],p),m=!isNaN(v),_=v<a[0],x=v>a[1];if(m&&!_&&!x)return!0;m&&(g=!0),_&&(d=!0),x&&(f=!0)}return g&&d&&f})}else ao(u,function(p){if(o==="empty")s.setData(l=l.map(p,function(f){return function(g){return g>=a[0]&&g<=a[1]}(f)?f:NaN}));else{var d={};d[p]=a,l.selectRange(d)}});ao(u,function(p){l.setApproximateExtent(a,p)})}})}},n.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;ao(["min","max"],function(r){var o=e.get(r+"Span"),a=e.get(r+"ValueSpan");a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a!=null?o=Fe(i[0]+a,i,[0,100],!0):o!=null&&(a=Fe(o,[0,100],i,!0)-i[0]),t[r+"Span"]=o,t[r+"ValueSpan"]=a},this)},n.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var r=yc(i,[0,500]);r=Math.min(r,20);var o=t.axis.scale.rawExtentInfo;e[0]!==0&&o.setDeterminedMinMax("min",+i[0].toFixed(r)),e[1]!==100&&o.setDeterminedMinMax("max",+i[1].toFixed(r)),o.freeze()}},n}(),kA={getTargetSeries:function(n){function t(r){n.eachComponent("dataZoom",function(o){o.eachTargetAxis(function(a,s){var l=n.getComponent(oo(a),s);r(a,s,l,o)})})}t(function(r,o,a,s){a.__dzAxisProxy=null});var e=[];t(function(r,o,a,s){a.__dzAxisProxy||(a.__dzAxisProxy=new DA(r,o,s,n),e.push(a.__dzAxisProxy))});var i=re();return D(e,function(r){D(r.getTargetSeriesModels(),function(o){i.set(o.uid,o)})}),i},overallReset:function(n,t){n.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,r){e.getAxisProxy(i,r).reset(e)}),e.eachTargetAxis(function(i,r){e.getAxisProxy(i,r).filterData(e,t)})}),n.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var r=i.getDataPercentWindow(),o=i.getDataValueWindow();e.setCalculatedRange({start:r[0],end:r[1],startValue:o[0],endValue:o[1]})}})}},gb=!1;function LA(n){gb||(gb=!0,n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,kA),function(t){t.registerAction("dataZoom",function(e,i){D(function(r,o){var a,s=re(),l=[],u=re();r.eachComponent({mainType:"dataZoom",query:o},function(p){u.get(p.uid)||h(p)});do a=!1,r.eachComponent("dataZoom",c);while(a);function c(p){!u.get(p.uid)&&function(d){var f=!1;return d.eachTargetAxis(function(g,y){var v=s.get(g);v&&v[y]&&(f=!0)}),f}(p)&&(h(p),a=!0)}function h(p){u.set(p.uid,!0),l.push(p),p.eachTargetAxis(function(d,f){(s.get(d)||s.set(d,[]))[f]=!0})}return l}(i,e),function(r){r.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}(n),n.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function PA(n){n.registerComponentModel(IA),n.registerComponentView(AA),LA(n)}var mn=function(){},yb={};function Fa(n,t){yb[n]=t}function vb(n){return yb[n]}var OA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.optionUpdated=function(){n.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;D(this.option.feature,function(i,r){var o=vb(r);o&&(o.getDefaultOption&&(o.defaultOption=o.getDefaultOption(e)),de(i,o.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}(be);function mb(n,t){var e=Hr(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),new ke({shape:{x:n.x-e[3],y:n.y-e[0],width:n.width+e[1]+e[3],height:n.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}var RA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.render=function(e,i,r,o){var a=this.group;if(a.removeAll(),e.get("show")){var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),h=[];D(u,function(d,f){h.push(f)}),new _p(this._featureNames||[],h).add(p).update(p).remove(Se(p,null)).execute(),this._featureNames=h,function(d,f,g){var y=f.getBoxLayoutParams(),v=f.get("padding"),m={width:g.getWidth(),height:g.getHeight()},_=It(y,m,v);er(f.get("orient"),d,f.get("itemGap"),_.width,_.height),pv(d,y,m,v)}(a,e,r),a.add(mb(a.getBoundingRect(),e)),l||a.eachChild(function(d){var f=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),v=d.getTextContent(),m=v&&v.ensureState("emphasis");if(m&&!ue(m)&&f){var _=m.style||(m.style={}),x=Io(f,Me.makeFont(_)),b=d.x+a.x,w=!1;d.y+a.y+s+x.height>r.getHeight()&&(y.position="top",w=!0);var M=w?-5-x.height:s+10;b+x.width/2>r.getWidth()?(y.position=["100%",M],_.align="right"):b-x.width/2<0&&(y.position=[0,M],_.align="left")}})}function p(d,f){var g,y=h[d],v=h[f],m=u[y],_=new Le(m,e,e.ecModel);if(o&&o.newTitle!=null&&o.featureName===y&&(m.title=o.newTitle),y&&!v){if(function(w){return w.indexOf("my")===0}(y))g={onclick:_.option.onclick,featureName:y};else{var x=vb(y);if(!x)return;g=new x}c[y]=g}else if(!(g=c[v]))return;g.uid=Vr("toolbox-feature"),g.model=_,g.ecModel=i,g.api=r;var b=g instanceof mn;y||!v?!_.get("show")||b&&g.unusable?b&&g.remove&&g.remove(i,r):(function(w,M,S){var C,I,T=w.getModel("iconStyle"),A=w.getModel(["emphasis","iconStyle"]),k=M instanceof mn&&M.getIcons?M.getIcons():w.get("icon"),L=w.get("title")||{};Q(k)?(C={})[S]=k:C=k,Q(L)?(I={})[S]=L:I=L;var O=w.iconPaths={};D(C,function(P,R){var N=Qo(P,{},{x:-s/2,y:-s/2,width:s,height:s});N.setStyle(T.getItemStyle()),N.ensureState("emphasis").style=A.getItemStyle();var E=new Me({style:{text:I[R],align:A.get("textAlign"),borderRadius:A.get("textBorderRadius"),padding:A.get("textPadding"),fill:null,font:Xy({fontStyle:A.get("textFontStyle"),fontFamily:A.get("textFontFamily"),fontSize:A.get("textFontSize"),fontWeight:A.get("textFontWeight")},i)},ignore:!0});N.setTextContent(E),ea({el:N,componentModel:e,itemName:R,formatterParamsExtra:{title:I[R]}}),N.__title=I[R],N.on("mouseover",function(){var z=A.getItemStyle(),B=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:A.get("textFill")||z.fill||z.stroke||"#000",backgroundColor:A.get("textBackgroundColor")}),N.setTextConfig({position:A.get("textPosition")||B}),E.ignore=!e.get("showTitle"),r.enterEmphasis(this)}).on("mouseout",function(){w.get(["iconStatus",R])!=="emphasis"&&r.leaveEmphasis(this),E.hide()}),(w.get(["iconStatus",R])==="emphasis"?kr:Lr)(N),a.add(N),N.on("click",he(M.onclick,M,i,r,R)),O[R]=N})}(_,g,y),_.setIconStatus=function(w,M){var S=this.option,C=this.iconPaths;S.iconStatus=S.iconStatus||{},S.iconStatus[w]=M,C[w]&&(M==="emphasis"?kr:Lr)(C[w])},g instanceof mn&&g.render&&g.render(_,i,r,o)):b&&g.dispose&&g.dispose(i,r)}},t.prototype.updateView=function(e,i,r,o){D(this._features,function(a){a instanceof mn&&a.updateView&&a.updateView(a.model,i,r,o)})},t.prototype.remove=function(e,i){D(this._features,function(r){r instanceof mn&&r.remove&&r.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){D(this._features,function(r){r instanceof mn&&r.dispose&&r.dispose(e,i)})},t.type="toolbox",t}(Xe),NA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.onclick=function(e,i){var r=this.model,o=r.get("name")||e.get("title.0.text")||"echarts",a=i.getZr().painter.getType()==="svg",s=a?"svg":r.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:r.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")}),u=fe.browser;if(typeof MouseEvent!="function"||!u.newEdge&&(u.ie||u.edge))if(window.navigator.msSaveOrOpenBlob||a){var c=l.split(","),h=c[0].indexOf("base64")>-1,p=a?decodeURIComponent(c[1]):c[1];h&&(p=window.atob(p));var d=o+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var f=p.length,g=new Uint8Array(f);f--;)g[f]=p.charCodeAt(f);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,d)}else{var v=document.createElement("iframe");document.body.appendChild(v);var m=v.contentWindow,_=m.document;_.open("image/svg+xml","replace"),_.write(p),_.close(),m.focus(),_.execCommand("SaveAs",!0,d),document.body.removeChild(v)}}else{var x=r.get("lang"),b='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',w=window.open();w.document.write(b),w.document.title=o}else{var M=document.createElement("a");M.download=o+"."+s,M.target="_blank",M.href=l;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});M.dispatchEvent(S)}},t.getDefaultOption=function(e){return{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"])}},t}(mn),_b="__ec_magicType_stack__",EA=[["line","bar"],["stack"]],zA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),r={};return D(e.get("type"),function(o){i[o]&&(r[o]=i[o])}),r},t.getDefaultOption=function(e){return{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:{}}},t.prototype.onclick=function(e,i,r){var o=this.model,a=o.get(["seriesIndex",r]);if(xb[r]){var s,l={series:[]};D(EA,function(c){we(c,r)>=0&&D(c,function(h){o.setIconStatus(h,"normal")})}),o.setIconStatus(r,"emphasis"),e.eachComponent({mainType:"series",query:a==null?null:{seriesIndex:a}},function(c){var h=c.subType,p=c.id,d=xb[r](h,p,c,o);d&&(ce(d,c.option),l.series.push(d));var f=c.coordinateSystem;if(f&&f.type==="cartesian2d"&&(r==="line"||r==="bar")){var g=f.getAxesByScale("ordinal")[0];if(g){var y=g.dim+"Axis",v=c.getReferringComponents(y,Qe).models[0].componentIndex;l[y]=l[y]||[];for(var m=0;m<=v;m++)l[y][v]=l[y][v]||{};l[y][v].boundaryGap=r==="bar"}}});var u=r;r==="stack"&&(s=de({stack:o.option.title.tiled,tiled:o.option.title.stack},o.option.title),o.get(["iconStatus",r])!=="emphasis"&&(u="tiled")),i.dispatchAction({type:"changeMagicType",currentType:u,newOption:l,newTitle:s,featureName:"magicType"})}},t}(mn),xb={line:function(n,t,e,i){if(n==="bar")return de({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(n,t,e,i){if(n==="line")return de({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(n,t,e,i){var r=e.get("stack")===_b;if(n==="line"||n==="bar")return i.setIconStatus("stack",r?"normal":"emphasis"),de({id:t,stack:r?"":_b},i.get(["option","stack"])||{},!0)}};fn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(n,t){t.mergeOption(n.newOption)});var du=new Array(60).join("-"),Ga=" ";function fu(n){return n.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Hd=new RegExp("[ ]+","g"),BA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.onclick=function(e,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var r=i.getDom(),o=this.model;this._dom&&r.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=o.get("lang")||[];s.innerHTML=l[0]||o.get("title"),s.style.cssText="margin:10px 20px",s.style.color=o.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=o.get("optionToContent"),p=o.get("contentToOption"),d=function(M){var S,C,I,T=function(A){var k={},L=[],O=[];return A.eachRawSeries(function(P){var R=P.coordinateSystem;if(!R||R.type!=="cartesian2d"&&R.type!=="polar")L.push(P);else{var N=R.getBaseAxis();if(N.type==="category"){var E=N.dim+"_"+N.index;k[E]||(k[E]={categoryAxis:N,valueAxis:R.getOtherAxis(N),series:[]},O.push({axisDim:N.dim,axisIndex:N.index})),k[E].series.push(P)}else L.push(P)}}),{seriesGroupByCategoryAxis:k,other:L,meta:O}}(M);return{value:He([(C=T.seriesGroupByCategoryAxis,I=[],D(C,function(A,k){var L=A.categoryAxis,O=A.valueAxis.dim,P=[" "].concat(j(A.series,function(G){return G.name})),R=[L.model.getCategories()];D(A.series,function(G){var K=G.getRawData();R.push(G.getRawData().mapArray(K.mapDimension(O),function(V){return V}))});for(var N=[P.join(Ga)],E=0;E<R[0].length;E++){for(var z=[],B=0;B<R.length;B++)z.push(R[B][E]);N.push(z.join(Ga))}I.push(N.join(`
  15. `))}),I.join(`
  16. `+du+`
  17. `)),(S=T.other,j(S,function(A){var k=A.getRawData(),L=[A.name],O=[];return k.each(k.dimensions,function(){for(var P=arguments.length,R=arguments[P-1],N=k.getName(R),E=0;E<P-1;E++)O[E]=arguments[E];L.push((N?N+Ga:"")+O.join(Ga))}),L.join(`
  18. `)}).join(`
  19. `+du+`
  20. `))],function(A){return!!A.replace(/[\n\t\s]/g,"")}).join(`
  21. `+du+`
  22. `),meta:T.meta}}(e);if(ue(h)){var f=h(i.getOption());Q(f)?u.innerHTML=f:wi(f)&&u.appendChild(f)}else{c.readOnly=o.get("readOnly");var g=c.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=o.get("textColor"),g.borderColor=o.get("textareaBorderColor"),g.backgroundColor=o.get("textareaColor"),c.value=d.value,u.appendChild(c)}var y=d.meta,v=document.createElement("div");v.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"),x=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var b=this;function w(){r.removeChild(a),b._dom=null}Eu(_,"click",w),Eu(x,"click",function(){if(p==null&&h!=null||p!=null&&h==null)w();else{var M;try{M=ue(p)?p(u,i.getOption()):function(S,C){var I=S.split(new RegExp(`
  23. *`+du+`
  24. *`,"g")),T={series:[]};return D(I,function(A,k){if(function(R){if(R.slice(0,R.indexOf(`
  25. `)).indexOf(Ga)>=0)return!0}(A)){var L=function(R){for(var N=R.split(/\n+/g),E=[],z=j(fu(N.shift()).split(Hd),function(V){return{name:V,data:[]}}),B=0;B<N.length;B++){var G=fu(N[B]).split(Hd);E.push(G.shift());for(var K=0;K<G.length;K++)z[K]&&(z[K].data[B]=G[K])}return{series:z,categories:E}}(A),O=C[k],P=O.axisDim+"Axis";O&&(T[P]=T[P]||[],T[P][O.axisIndex]={data:L.categories},T.series=T.series.concat(L.series))}else L=function(R){for(var N=R.split(/\n+/g),E=fu(N.shift()),z=[],B=0;B<N.length;B++){var G=fu(N[B]);if(G){var K=G.split(Hd),V="",X=void 0,Z=!1;isNaN(K[0])?(Z=!0,V=K[0],K=K.slice(1),z[B]={name:V,value:[]},X=z[B].value):X=z[B]=[];for(var W=0;W<K.length;W++)X.push(+K[W]);X.length===1&&(Z?z[B].value=X[0]:z[B]=X[0])}}return{name:E,data:z}}(A),T.series.push(L)}),T}(c.value,y)}catch(S){throw w(),new Error("Data view format error "+S)}M&&i.dispatchAction({type:"changeDataView",newOption:M}),w()}}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=m,!o.get("readOnly")&&v.appendChild(x),v.appendChild(_),a.appendChild(s),a.appendChild(u),a.appendChild(v),u.style.height=r.clientHeight-80+"px",r.appendChild(a),this._dom=a},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){return{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"}},t}(mn);function VA(n,t){return j(n,function(e,i){var r=t&&t[i];if(ne(r)&&!Y(r)){ne(e)&&!Y(e)||(e={value:e});var o=r.name!=null&&e.name==null;return e=ce(e,r),o&&delete e.name,e}return e})}fn({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(n,t){var e=[];D(n.newOption.series,function(i){var r=t.getSeriesByName(i.name)[0];if(r){var o=r.get("data");e.push({name:i.name,data:VA(i.data,o)})}else e.push(H({type:"scatter"},i))}),t.mergeOption(ce({series:e},n.newOption))});var bb=D,wb=Ee();function Wd(n){var t=wb(n);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var FA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.onclick=function(e,i){(function(r){wb(r).snapshots=null})(e),i.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{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"])}},t}(mn);fn({type:"restore",event:"restore",update:"prepareAndUpdate"},function(n,t){t.resetOption("recreate")});var GA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Sb=function(){function n(t,e,i){var r=this;this._targetInfoList=[];var o=Mb(e,t);D(HA,function(a,s){(!i||!i.include||we(i.include,s)>=0)&&a(o,r._targetInfoList)})}return n.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,r,o){if((i.coordRanges||(i.coordRanges=[])).push(r),!i.coordRange){i.coordRange=r;var a=Ud[i.brushType](0,o,r);i.__rangeOffset={offset:Ab[i.brushType](a.values,i.range,[1,1]),xyMinMax:a.xyMinMax}}}),t},n.prototype.matchOutputRanges=function(t,e,i){D(t,function(r){var o=this.findTargetInfo(r,e);o&&o!==!0&&D(o.coordSyses,function(a){var s=Ud[r.brushType](1,a,r.range,!0);i(r,s.values,a,e)})},this)},n.prototype.setInputRanges=function(t,e){D(t,function(i){var r,o,a,s,l,u=this.findTargetInfo(i,e);if(i.range=i.range||[],u&&u!==!0){i.panelId=u.panelId;var c=Ud[i.brushType](0,u.coordSys,i.coordRange),h=i.__rangeOffset;i.range=h?Ab[i.brushType](c.values,h.offset,(r=c.xyMinMax,o=h.xyMinMax,a=kb(r),s=kb(o),l=[a[0]/s[0],a[1]/s[1]],isNaN(l[0])&&(l[0]=1),isNaN(l[1])&&(l[1]=1),l)):c.values}},this)},n.prototype.makePanelOpts=function(t,e){return j(this._targetInfoList,function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:Mx(r),isTargetByCursor:Cx(r,t,i.coordSysModel),getLinearBrushOtherExtent:Tx(r)}})},n.prototype.controlSeries=function(t,e,i){var r=this.findTargetInfo(t,i);return r===!0||r&&we(r.coordSyses,e.coordinateSystem)>=0},n.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,r=Mb(e,t),o=0;o<i.length;o++){var a=i[o],s=t.panelId;if(s){if(a.panelId===s)return a}else for(var l=0;l<Tb.length;l++)if(Tb[l](r,a))return a}return!0},n}();function Xd(n){return n[0]>n[1]&&n.reverse(),n}function Mb(n,t){return Eo(n,t,{includeMainTypes:GA})}var HA={grid:function(n,t){var e=n.xAxisModels,i=n.yAxisModels,r=n.gridModels,o=re(),a={},s={};(e||i||r)&&(D(e,function(l){var u=l.axis.grid.model;o.set(u.id,u),a[u.id]=!0}),D(i,function(l){var u=l.axis.grid.model;o.set(u.id,u),s[u.id]=!0}),D(r,function(l){o.set(l.id,l),a[l.id]=!0,s[l.id]=!0}),o.each(function(l){var u=l.coordinateSystem,c=[];D(u.getCartesians(),function(h,p){(we(e,h.getAxis("x").model)>=0||we(i,h.getAxis("y").model)>=0)&&c.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Cb.grid,xAxisDeclared:a[l.id],yAxisDeclared:s[l.id]})}))},geo:function(n,t){D(n.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:Cb.geo})})}},Tb=[function(n,t){var e=n.xAxisModel,i=n.yAxisModel,r=n.gridModel;return!r&&e&&(r=e.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===t.gridModel},function(n,t){var e=n.geoModel;return e&&e===t.geoModel}],Cb={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var n=this.coordSys,t=n.getBoundingRect().clone();return t.applyTransform($i(n)),t}},Ud={lineX:Se(Ib,0),lineY:Se(Ib,1),rect:function(n,t,e,i){var r=n?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),o=n?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),a=[Xd([r[0],o[0]]),Xd([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(n,t,e,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:j(e,function(o){var a=n?t.pointToData(o,i):t.dataToPoint(o,i);return r[0][0]=Math.min(r[0][0],a[0]),r[1][0]=Math.min(r[1][0],a[1]),r[0][1]=Math.max(r[0][1],a[0]),r[1][1]=Math.max(r[1][1],a[1]),a}),xyMinMax:r}}};function Ib(n,t,e,i){var r=e.getAxis(["x","y"][n]),o=Xd(j([0,1],function(s){return t?r.coordToData(r.toLocalCoord(i[s]),!0):r.toGlobalCoord(r.dataToCoord(i[s]))})),a=[];return a[n]=o,a[1-n]=[NaN,NaN],{values:o,xyMinMax:a}}var Ab={lineX:Se(Db,0),lineY:Se(Db,1),rect:function(n,t,e){return[[n[0][0]-e[0]*t[0][0],n[0][1]-e[0]*t[0][1]],[n[1][0]-e[1]*t[1][0],n[1][1]-e[1]*t[1][1]]]},polygon:function(n,t,e){return j(n,function(i,r){return[i[0]-e[0]*t[r][0],i[1]-e[1]*t[r][1]]})}};function Db(n,t,e,i){return[t[0]-i[n]*e[0],t[1]-i[n]*e[1]]}function kb(n){return n?[n[0][1]-n[0][0],n[1][1]-n[1][0]]:[NaN,NaN]}var Yd,Zd,qd=D,WA=bg+"toolbox-dataZoom_",XA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.render=function(e,i,r,o){this._brushController||(this._brushController=new sx(r.getZr()),this._brushController.on("brush",he(this._onBrush,this)).mount()),function(a,s,l,u,c){var h=l._isZoomActive;u&&u.type==="takeGlobalCursor"&&(h=u.key==="dataZoomSelect"&&u.dataZoomSelectActive),l._isZoomActive=h,a.setIconStatus("zoom",h?"emphasis":"normal");var p=new Sb(jd(a),s,{include:["grid"]}).makePanelOpts(c,function(d){return d.xAxisDeclared&&!d.yAxisDeclared?"lineX":!d.xAxisDeclared&&d.yAxisDeclared?"lineY":"rect"});l._brushController.setPanels(p).enableBrush(!(!h||!p.length)&&{brushType:"auto",brushStyle:a.getModel("brushStyle").getItemStyle()})}(e,i,this,o,r),function(a,s){a.setIconStatus("back",function(l){return Wd(l).length}(s)>1?"emphasis":"normal")}(e,i)},t.prototype.onclick=function(e,i,r){UA[r].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){var r={},o=this.ecModel;this._brushController.updateCovers([]),new Sb(jd(this.model),o,{include:["grid"]}).matchOutputRanges(i,o,function(s,l,u){if(u.type==="cartesian2d"){var c=s.brushType;c==="rect"?(a("x",u,l[0]),a("y",u,l[1])):a({lineX:"x",lineY:"y"}[c],u,l)}}),function(s,l){var u=Wd(s);bb(l,function(c,h){for(var p=u.length-1;p>=0&&!u[p][h];p--);if(p<0){var d=s.queryComponents({mainType:"dataZoom",subType:"select",id:h})[0];if(d){var f=d.getPercentRange();u[0][h]={dataZoomId:h,start:f[0],end:f[1]}}}}),u.push(l)}(o,r),this._dispatchZoomAction(r)}function a(s,l,u){var c=l.getAxis(s),h=c.model,p=function(f,g,y){var v;return y.eachComponent({mainType:"dataZoom",subType:"select"},function(m){m.getAxisModel(f,g.componentIndex)&&(v=m)}),v}(s,h,o),d=p.findRepresentativeAxisProxy(h).getMinMaxSpan();d.minValueSpan==null&&d.maxValueSpan==null||(u=su(0,u.slice(),c.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(r[p.id]={dataZoomId:p.id,startValue:u[0],endValue:u[1]})}},t.prototype._dispatchZoomAction=function(e){var i=[];qd(e,function(r,o){i.push(ae(r))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){return{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)"}}},t}(mn),UA={zoom:function(){var n=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:n})},back:function(){this._dispatchZoomAction(function(n){var t=Wd(n),e=t[t.length-1];t.length>1&&t.pop();var i={};return bb(e,function(r,o){for(var a=t.length-1;a>=0;a--)if(r=t[a][o]){i[o]=r;break}}),i}(this.ecModel))}};function jd(n){var t={xAxisIndex:n.get("xAxisIndex",!0),yAxisIndex:n.get("yAxisIndex",!0),xAxisId:n.get("xAxisId",!0),yAxisId:n.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function YA(n){n.registerComponentModel(OA),n.registerComponentView(RA),Fa("saveAsImage",NA),Fa("magicType",zA),Fa("dataView",BA),Fa("dataZoom",XA),Fa("restore",FA),Lt(PA)}Yd="dataZoom",Zd=function(n){var t=n.getComponent("toolbox",0),e=["feature","dataZoom"];if(t&&t.get(e)!=null){var i=t.getModel(e),r=[],o=Eo(n,jd(i));return qd(o.xAxisModels,function(s){return a(s,"xAxis","xAxisIndex")}),qd(o.yAxisModels,function(s){return a(s,"yAxis","yAxisIndex")}),r}function a(s,l,u){var c=s.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:WA+l+c};h[u]=c,r.push(h)}},Ot(Ah.get(Yd)==null&&Zd),Ah.set(Yd,Zd);var ZA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),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}(be);function Lb(n){var t=n.get("confine");return t!=null?!!t:n.get("renderMode")==="richText"}function Pb(n){if(fe.domSupported){for(var t=document.documentElement.style,e=0,i=n.length;e<i;e++)if(n[e]in t)return n[e]}}var Ob=Pb(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function Rb(n,t){if(!n)return t;t=bh(t,!0);var e=n.indexOf(t);return(n=e===-1?t:"-"+n.slice(0,e)+"-"+t).toLowerCase()}var qA=Rb(Pb(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),Kd=Rb(Ob,"transform"),jA="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(fe.transform3dSupported?"will-change:transform;":"");function Nb(n,t,e){var i=n.toFixed(0)+"px",r=t.toFixed(0)+"px";if(!fe.transformSupported)return e?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=fe.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return e?"top:0;left:0;"+Kd+":"+a+";":[["top",0],["left",0],[Ob,a]]}function Eb(n,t,e,i,r){var o=t&&t.painter;if(e){var a=o&&o.getViewportRoot();a&&function(l,u,c,h,p){Pu(Lu,u,h,p,!0)&&Pu(l,c,Lu[0],Lu[1])}(n,a,e,i,r)}else{n[0]=i,n[1]=r;var s=o&&o.getViewportRootOffset();s&&(n[0]+=s.offsetLeft,n[1]+=s.offsetTop)}n[2]=n[0]/t.getWidth(),n[3]=n[1]/t.getHeight()}var KA=function(){function n(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,fe.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=t.getZr(),o=e.appendTo,a=o&&(Q(o)?document.querySelector(o):wi(o)?o:ue(o)&&o(t.getDom()));Eb(this._styleCoord,r,a,t.getWidth()/2,t.getHeight()/2),(a||t.getDom()).appendChild(i),this._api=t,this._container=a;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=r.handler;Ft(r.painter.getViewportRoot(),l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return n.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=(a=(o=e).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(o))?a.position:null,r=e.style;r.position!=="absolute"&&i!=="absolute"&&(r.position="relative")}var o,a,s=t.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=t.get("className")||""},n.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,o=this._styleCoord;i.innerHTML?r.cssText=jA+function(a,s,l){var u=[],c=a.get("transitionDuration"),h=a.get("backgroundColor"),p=a.get("shadowBlur"),d=a.get("shadowColor"),f=a.get("shadowOffsetX"),g=a.get("shadowOffsetY"),y=a.getModel("textStyle"),v=hm(a,"html"),m=f+"px "+g+"px "+p+"px "+d;return u.push("box-shadow:"+m),s&&c&&u.push(function(_,x){var b="cubic-bezier(0.23,1,0.32,1)",w=" "+_/2+"s "+b,M="opacity"+w+",visibility"+w;return x||(w=" "+_+"s "+b,M+=fe.transformSupported?","+Kd+w:",left"+w+",top"+w),qA+":"+M}(c,l)),h&&u.push("background-color:"+h),D(["width","color","radius"],function(_){var x="border-"+_,b=bh(x),w=a.get(b);w!=null&&u.push(x+":"+w+(_==="color"?"":"px"))}),u.push(function(_){var x=[],b=_.get("fontSize"),w=_.getTextColor();w&&x.push("color:"+w),x.push("font:"+_.getFont()),b&&x.push("line-height:"+Math.round(3*b/2)+"px");var M=_.get("textShadowColor"),S=_.get("textShadowBlur")||0,C=_.get("textShadowOffsetX")||0,I=_.get("textShadowOffsetY")||0;return M&&S&&x.push("text-shadow:"+C+"px "+I+"px "+S+"px "+M),D(["decoration","align"],function(T){var A=_.get(T);A&&x.push("text-"+T+":"+A)}),x.join(";")}(y)),v!=null&&u.push("padding:"+Hr(v).join("px ")+"px"),u.join(";")+";"}(t,!this._firstShow,this._longHide)+Nb(o[0],o[1],!0)+"border-color:"+Qi(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},n.prototype.setContent=function(t,e,i,r,o){var a=this.el;if(t!=null){var s="";if(Q(o)&&i.get("trigger")==="item"&&!Lb(i)&&(s=function(c,h,p){if(!Q(p)||p==="inside")return"";var d=c.get("backgroundColor"),f=c.get("borderWidth");h=Qi(h);var g,y,v=(g=p)==="left"?"right":g==="right"?"left":g==="top"?"bottom":"top",m=Math.max(1.5*Math.round(f),6),_="",x=Kd+":";we(["left","right"],v)>-1?(_+="top:50%",x+="translateY(-50%) rotate("+(y=v==="left"?-225:-45)+"deg)"):(_+="left:50%",x+="translateX(-50%) rotate("+(y=v==="top"?225:45)+"deg)");var b=y*Math.PI/180,w=m+f,M=w*Math.abs(Math.cos(b))+w*Math.abs(Math.sin(b)),S=h+" solid "+f+"px;";return'<div style="'+["position:absolute;width:"+m+"px;height:"+m+"px;z-index:-1;",(_+=";"+v+":-"+Math.round(100*((M-Math.SQRT2*f)/2+Math.SQRT2*f-(M-w)/2))/100+"px")+";"+x+";","border-bottom:"+S,"border-right:"+S,"background-color:"+d+";"].join("")+'"></div>'}(i,r,o)),Q(t))a.innerHTML=t+s;else if(t){a.innerHTML="",Y(t)||(t=[t]);for(var l=0;l<t.length;l++)wi(t[l])&&t[l].parentNode!==a&&a.appendChild(t[l]);if(s&&a.childNodes.length){var u=document.createElement("div");u.innerHTML=s,a.appendChild(u)}}}else a.innerHTML=""},n.prototype.setEnterable=function(t){this._enterable=t},n.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},n.prototype.moveTo=function(t,e){var i=this._styleCoord;if(Eb(i,this._zr,this._container,t,e),i[0]!=null&&i[1]!=null){var r=this.el.style;D(Nb(i[0],i[1]),function(o){r[o[0]]=o[1]})}},n.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},n.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",fe.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},n.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(he(this.hide,this),t)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},n}(),JA=function(){function n(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),Bb(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return n.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},n.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},n.prototype.setContent=function(t,e,i,r,o){var a=this;ne(t)&&Mt(""),this.el&&this._zr.remove(this.el);var s=i.getModel("textStyle");this.el=new Me({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:s.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:hm(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),D(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){a.el.style[u]=i.get(u)}),D(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){a.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})},n.prototype.setEnterable=function(t){this._enterable=t},n.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),i=zb(t.style);return[e.width+i.left+i.right,e.height+i.top+i.bottom]},n.prototype.moveTo=function(t,e){var i=this.el;if(i){var r=this._styleCoord;Bb(r,this._zr,t,e),t=r[0],e=r[1];var o=i.style,a=xi(o.borderWidth||0),s=zb(o);i.x=t+a+s.left,i.y=e+a+s.top,i.markRedraw()}},n.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},n.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},n.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(he(this.hide,this),t)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){this._zr.remove(this.el)},n}();function xi(n){return Math.max(0,n)}function zb(n){var t=xi(n.shadowBlur||0),e=xi(n.shadowOffsetX||0),i=xi(n.shadowOffsetY||0);return{left:xi(t-e),right:xi(t+e),top:xi(t-i),bottom:xi(t+i)}}function Bb(n,t,e,i){n[0]=e,n[1]=i,n[2]=n[0]/t.getWidth(),n[3]=n[1]/t.getHeight()}var $A=new ke({shape:{x:-1,y:-1,width:2,height:2}}),QA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(e,i){if(!fe.node&&i.getDom()){var r,o=e.getComponent("tooltip"),a=this._renderMode=(r=o.get("renderMode"))==="auto"?fe.domSupported?"html":"richText":r||"html";this._tooltipContent=a==="richText"?new JA(i):new KA(i,{appendTo:o.get("appendToBody",!0)?"body":o.get("appendTo",!0)})}},t.prototype.render=function(e,i,r){if(!fe.node&&r.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=i,this._api=r;var o=this._tooltipContent;o.update(e),o.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Yh(this,"_updatePosition",50,"fixRate"):hl(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");eb("itemTooltip",this._api,he(function(i,r,o){e!=="none"&&(e.indexOf(i)>=0?this._tryShow(r,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,r=this._api,o=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&o!=="none"&&o!=="click"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&a.manuallyShowTip(e,i,r,{x:a._lastX,y:a._lastY,dataByCoordSys:a._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,r,o){if(o.from!==this.uid&&!fe.node&&r.getDom()){var a=Vb(o,r);this._ticket="";var s=o.dataByCoordSys,l=function(f,g,y){var v=wc(f).queryOptionMap,m=v.keys()[0];if(m&&m!=="series"){var _,x=zo(g,m,v.get(m),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(x)return y.getViewOfComponentModel(x).group.traverse(function(b){var w=ye(b).tooltipConfig;if(w&&w.name===f.name)return _=b,!0}),_?{componentMainType:m,componentIndex:x.componentIndex,el:_}:void 0}}(o,i,r);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:o.position,positionDefault:"bottom"},a)}else if(o.tooltip&&o.x!=null&&o.y!=null){var c=$A;c.x=o.x,c.y=o.y,c.update(),ye(c).tooltipConfig={name:null,option:o.tooltip},this._tryShow({offsetX:o.x,offsetY:o.y,target:c},a)}else if(s)this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,dataByCoordSys:s,tooltipOption:o.tooltipOption},a);else if(o.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,r,o))return;var h=nb(o,i),p=h.point[0],d=h.point[1];p!=null&&d!=null&&this._tryShow({offsetX:p,offsetY:d,target:h.el,position:o.position,positionDefault:"bottom"},a)}else o.x!=null&&o.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:o.x,y:o.y}),this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,target:r.getZr().findHover(o.x,o.y).target},a))}},t.prototype.manuallyHideTip=function(e,i,r,o){var a=this._tooltipContent;this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,o.from!==this.uid&&this._hide(Vb(o,r))},t.prototype._manuallyAxisShowTip=function(e,i,r,o){var a=o.seriesIndex,s=o.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(a!=null&&s!=null&&l!=null){var u=i.getSeriesByIndex(a);if(u&&Ha([u.getData().getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel).get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:s,position:o.position}),!0}},t.prototype._tryShow=function(e,i){var r=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(r){var a,s;if(ye(r).ssrType==="legend")return;this._lastDataByCoordSys=null,tr(r,function(l){return ye(l).dataIndex!=null?(a=l,!0):ye(l).tooltipConfig!=null?(s=l,!0):void 0},!0),a?this._showSeriesItemTooltip(e,a,i):s?this._showComponentItemTooltip(e,s,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var r=e.get("showDelay");i=he(i,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(i,r):i()},t.prototype._showAxisTooltip=function(e,i){var r=this._ecModel,o=this._tooltipModel,a=[i.offsetX,i.offsetY],s=Ha([i.tooltipOption],o),l=this._renderMode,u=[],c=jn("section",{blocks:[],noHeader:!0}),h=[],p=new Wh;D(e,function(m){D(m.dataByAxis,function(_){var x=r.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(x&&b!=null){var w=qx(b,x.axis,r,_.seriesDataIndices,_.valueLabelOpt),M=jn("section",{header:w,noHeader:!zt(w),sortBlocks:!0,blocks:[]});c.blocks.push(M),D(_.seriesDataIndices,function(S){var C=r.getSeriesByIndex(S.seriesIndex),I=S.dataIndexInside,T=C.getDataParams(I);if(!(T.dataIndex<0)){T.axisDim=_.axisDim,T.axisIndex=_.axisIndex,T.axisType=_.axisType,T.axisId=_.axisId,T.axisValue=Lp(x.axis,{value:b}),T.axisValueLabel=w,T.marker=p.makeTooltipMarker("item",Qi(T.color),l);var A=qv(C.formatTooltip(I,!0,null)),k=A.frag;if(k){var L=Ha([C],o).get("valueFormatter");M.blocks.push(L?H({valueFormatter:L},k):k)}A.text&&h.push(A.text),u.push(T)}})}})}),c.blocks.reverse(),h.reverse();var d=i.position,f=s.get("order"),g=lm(c,p,l,f,r.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var y=l==="richText"?`
  26. `:"<br/>",v=h.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,d,a[0],a[1],this._tooltipContent,u):this._showTooltipContent(s,v,u,Math.random()+"",a[0],a[1],d,null,p)})},t.prototype._showSeriesItemTooltip=function(e,i,r){var o=this._ecModel,a=ye(i),s=a.seriesIndex,l=o.getSeriesByIndex(s),u=a.dataModel||l,c=a.dataIndex,h=a.dataType,p=u.getData(h),d=this._renderMode,f=e.positionDefault,g=Ha([p.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),y=g.get("trigger");if(y==null||y==="item"){var v=u.getDataParams(c,h),m=new Wh;v.marker=m.makeTooltipMarker("item",Qi(v.color),d);var _=qv(u.formatTooltip(c,!1,h)),x=g.get("order"),b=g.get("valueFormatter"),w=_.frag,M=w?lm(b?H({valueFormatter:b},w):w,m,d,x,o.get("useUTC"),g.get("textStyle")):_.text,S="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,M,v,S,e.offsetX,e.offsetY,e.position,e.target,m)}),r({type:"showTip",dataIndexInside:c,dataIndex:p.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,r){var o=this._renderMode==="html",a=ye(i),s=a.tooltipConfig.option||{},l=s.encodeHTMLContent;Q(s)&&(s={content:s,formatter:s},l=!0),l&&o&&s.content&&((s=ae(s)).content=wt(s.content));var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var h=e.positionDefault,p=Ha(u,this._tooltipModel,h?{position:h}:null),d=p.get("content"),f=Math.random()+"",g=new Wh;this._showOrMove(p,function(){var y=ae(p.get("formatterParams")||{});this._showTooltipContent(p,d,y,f,e.offsetX,e.offsetY,e.position,i,g)}),r({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,r,o,a,s,l,u,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var p=e.get("formatter");l=l||e.get("position");var d=i,f=this._getNearestPoint([a,s],r,e.get("trigger"),e.get("borderColor")).color;if(p)if(Q(p)){var g=e.ecModel.get("useUTC"),y=Y(r)?r[0]:r;d=p,y&&y.axisType&&y.axisType.indexOf("time")>=0&&(d=oa(y.axisValue,d,g)),d=Mh(d,r,!0)}else if(ue(p)){var v=he(function(m,_){m===this._ticket&&(h.setContent(_,c,e,f,l),this._updatePosition(e,l,a,s,h,r,u))},this);this._ticket=o,d=p(r,o,v)}else d=p;h.setContent(d,c,e,f,l),h.show(e,f),this._updatePosition(e,l,a,s,h,r,u)}},t.prototype._getNearestPoint=function(e,i,r,o){return r==="axis"||Y(i)?{color:o||(this._renderMode==="html"?"#fff":"none")}:Y(i)?void 0:{color:o||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,r,o,a,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||e.get("position");var h=a.getSize(),p=e.get("align"),d=e.get("verticalAlign"),f=l&&l.getBoundingRect().clone();if(l&&f.applyTransform(l.transform),ue(i)&&(i=i([r,o],s,a.el,f,{viewSize:[u,c],contentSize:h.slice()})),Y(i))r=ee(i[0],u),o=ee(i[1],c);else if(ne(i)){var g=i;g.width=h[0],g.height=h[1];var y=It(g,{width:u,height:c});r=y.x,o=y.y,p=null,d=null}else if(Q(i)&&l){var v=function(m,_,x,b){var w=x[0],M=x[1],S=Math.ceil(Math.SQRT2*b)+8,C=0,I=0,T=_.width,A=_.height;switch(m){case"inside":C=_.x+T/2-w/2,I=_.y+A/2-M/2;break;case"top":C=_.x+T/2-w/2,I=_.y-M-S;break;case"bottom":C=_.x+T/2-w/2,I=_.y+A+S;break;case"left":C=_.x-w-S,I=_.y+A/2-M/2;break;case"right":C=_.x+T+S,I=_.y+A/2-M/2}return[C,I]}(i,f,h,e.get("borderWidth"));r=v[0],o=v[1]}else v=function(m,_,x,b,w,M,S){var C=x.getSize(),I=C[0],T=C[1];return M!=null&&(m+I+M+2>b?m-=I+M:m+=M),S!=null&&(_+T+S>w?_-=T+S:_+=S),[m,_]}(r,o,a,u,c,p?null:20,d?null:20),r=v[0],o=v[1];p&&(r-=Fb(p)?h[0]/2:p==="right"?h[0]:0),d&&(o-=Fb(d)?h[1]/2:d==="bottom"?h[1]:0),Lb(e)&&(v=function(m,_,x,b,w){var M=x.getSize(),S=M[0],C=M[1];return m=Math.min(m+S,b)-S,_=Math.min(_+C,w)-C,[m=Math.max(m,0),_=Math.max(_,0)]}(r,o,a,u,c),r=v[0],o=v[1]),a.moveTo(r,o)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var r=this._lastDataByCoordSys,o=this._cbParamsList,a=!!r&&r.length===e.length;return a&&D(r,function(s,l){var u=s.dataByAxis||[],c=(e[l]||{}).dataByAxis||[];(a=a&&u.length===c.length)&&D(u,function(h,p){var d=c[p]||{},f=h.seriesDataIndices||[],g=d.seriesDataIndices||[];(a=a&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&f.length===g.length)&&D(f,function(y,v){var m=g[v];a=a&&y.seriesIndex===m.seriesIndex&&y.dataIndex===m.dataIndex}),o&&D(h.seriesDataIndices,function(y){var v=y.seriesIndex,m=i[v],_=o[v];m&&_&&_.data!==m.data&&(a=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!a},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){!fe.node&&i.getDom()&&(hl(this,"_updatePosition"),this._tooltipContent.dispose(),Ed("itemTooltip",i))},t.type="tooltip",t}(Xe);function Ha(n,t,e){var i,r=t.ecModel;e?(i=new Le(e,r,r),i=new Le(t.option,i,r)):i=t;for(var o=n.length-1;o>=0;o--){var a=n[o];a&&(a instanceof Le&&(a=a.get("tooltip",!0)),Q(a)&&(a={formatter:a}),a&&(i=new Le(a,i,r)))}return i}function Vb(n,t){return n.dispatchAction||he(t.dispatchAction,t)}function Fb(n){return n==="center"||n==="middle"}function eD(n){Lt(zd),n.registerComponentModel(ZA),n.registerComponentView(QA),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},rt),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},rt)}var Gb=D;function Hb(n){if(n){for(var t in n)if(n.hasOwnProperty(t))return!0}}function Wb(n,t,e){var i={};return Gb(t,function(r){var o,a=i[r]=((o=function(){}).prototype.__hidden=o.prototype,new o);Gb(n[r],function(s,l){if(pt.isValidType(l)){var u={type:l,visual:s};e&&e(u,r),a[l]=new pt(u),l==="opacity"&&((u=ae(u)).type="colorAlpha",a.__hidden.__alphaForOpacity=new pt(u))}})}),i}var tD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return F(t,n),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}(be),nD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){if(this.group.removeAll(),e.get("show")){var o=this.group,a=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=xe(e.get("textBaseline"),e.get("textVerticalAlign")),c=new Me({style:nt(a,{text:e.get("text"),fill:a.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),p=e.get("subtext"),d=new Me({style:nt(s,{text:p,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),f=e.get("link"),g=e.get("sublink"),y=e.get("triggerEvent",!0);c.silent=!f&&!y,d.silent=!g&&!y,f&&c.on("click",function(){hv(f,"_"+e.get("target"))}),g&&d.on("click",function(){hv(g,"_"+e.get("subtarget"))}),ye(c).eventData=ye(d).eventData=y?{componentType:"title",componentIndex:e.componentIndex}:null,o.add(c),p&&o.add(d);var v=o.getBoundingRect(),m=e.getBoxLayoutParams();m.width=v.width,m.height=v.height;var _=It(m,{width:r.getWidth(),height:r.getHeight()},e.get("padding"));l||((l=e.get("left")||e.get("right"))==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||((u=e.get("top")||e.get("bottom"))==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),o.x=_.x,o.y=_.y,o.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),d.setStyle(x),v=o.getBoundingRect();var b=_.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var M=new ke({shape:{x:v.x-b[3],y:v.y-b[0],width:v.width+b[1]+b[3],height:v.height+b[0]+b[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});o.add(M)}},t.type="title",t}(Xe);function iD(n){n.registerComponentModel(tD),n.registerComponentView(nD)}var Jd=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return F(t,n),t.prototype.init=function(e,i,r){this.mergeDefaultAndTheme(e,r),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){n.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,r=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),Y(i)&&D(i,function(o,a){Q(o)&&(o={type:o}),i[a]=de(o,function(s,l){return l==="all"?{type:"all",title:s.getLocaleModel().get(["legend","selector","all"])}:l==="inverse"?{type:"inverse",title:s.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(r,o.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,r=0;r<e.length;r++){var o=e[r].get("name");if(this.isSelected(o)){this.select(o),i=!0;break}}!i&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var i=[],r=[];e.eachRawSeries(function(l){var u,c=l.name;if(r.push(c),l.legendVisualProvider){var h=l.legendVisualProvider.getAllNames();e.isSeriesFiltered(l)||(r=r.concat(h)),h.length?i=i.concat(h):u=!0}else u=!0;u&&bc(l)&&i.push(l.name)}),this._availableNames=r;var o=this.get("data")||i,a=re(),s=j(o,function(l){return(Q(l)||Ae(l))&&(l={name:l}),a.get(l.name)?null:(a.set(l.name,!0),new Le(l,this,this.ecModel))},this);this._data=He(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var i=this.option.selected;this.get("selectedMode")==="single"&&D(this._data,function(r){i[r.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;D(e,function(r){i[r.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,i=this.option.selected;D(e,function(r){var o=r.get("name",!0);i.hasOwnProperty(o)||(i[o]=!0),i[o]=!i[o]})},t.prototype.isSelected=function(e){var i=this.option.selected;return!(i.hasOwnProperty(e)&&!i[e])&&we(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}(be),so=Se,$d=D,gu=_e,Xb=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return F(t,n),t.prototype.init=function(){this.group.add(this._contentGroup=new gu),this.group.add(this._selectorGroup=new gu),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,r){var o=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),s=e.get("orient");a&&a!=="auto"||(a=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(a,e,i,r,l,s,u);var c=e.getBoxLayoutParams(),h={width:r.getWidth(),height:r.getHeight()},p=e.get("padding"),d=It(c,h,p),f=this.layoutInner(e,a,d,o,l,u),g=It(ce({width:f.width,height:f.height},c),h,p);this.group.x=g.x-f.x,this.group.y=g.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=mb(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,r,o,a,s,l){var u=this.getContentGroup(),c=re(),h=i.get("selectedMode"),p=[];r.eachRawSeries(function(d){!d.get("legendHoverLink")&&p.push(d.id)}),$d(i.getData(),function(d,f){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===`
  27. `)){var y=new gu;return y.newline=!0,void u.add(y)}var v=r.getSeriesByName(g)[0];if(!c.get(g))if(v){var m=v.getData(),_=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),b=m.getVisual("style"),w=this._createItem(v,g,f,d,i,e,_,b,x,h,o);w.on("click",so(Ub,g,null,o,p)).on("mouseover",so(Qd,v.name,null,o,p)).on("mouseout",so(ef,v.name,null,o,p)),r.ssr&&w.eachChild(function(M){var S=ye(M);S.seriesIndex=v.seriesIndex,S.dataIndex=f,S.ssrType="legend"}),c.set(g,!0)}else r.eachRawSeries(function(M){if(!c.get(g)&&M.legendVisualProvider){var S=M.legendVisualProvider;if(!S.containName(g))return;var C=S.indexOfName(g),I=S.getItemVisual(C,"style"),T=S.getItemVisual(C,"legendIcon"),A=St(I.fill);A&&A[3]===0&&(A[3]=.2,I=H(H({},I),{fill:on(A,"rgba")}));var k=this._createItem(M,g,f,d,i,e,{},I,T,h,o);k.on("click",so(Ub,null,g,o,p)).on("mouseover",so(Qd,null,g,o,p)).on("mouseout",so(ef,null,g,o,p)),r.ssr&&k.eachChild(function(L){var O=ye(L);O.seriesIndex=M.seriesIndex,O.dataIndex=f,O.ssrType="legend"}),c.set(g,!0)}},this)},this),a&&this._createSelector(a,i,o,s,l)},t.prototype._createSelector=function(e,i,r,o,a){var s=this.getSelectorGroup();$d(e,function(l){var u=l.type,c=new Me({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:u==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c),Dn(c,{normal:i.getModel("selectorLabel"),emphasis:i.getModel(["emphasis","selectorLabel"])},{defaultText:l.title}),Wo(c)})},t.prototype._createItem=function(e,i,r,o,a,s,l,u,c,h,p){var d,f,g,y=e.visualDrawType,v=a.get("itemWidth"),m=a.get("itemHeight"),_=a.isSelected(i),x=o.get("symbolRotate"),b=o.get("symbolKeepAspect"),w=o.get("icon"),M=function(N,E,z,B,G,K,V){function X(q,U){q.lineWidth==="auto"&&(q.lineWidth=U.lineWidth>0?2:0),$d(q,function(le,ve){q[ve]==="inherit"&&(q[ve]=U[ve])})}var Z=E.getModel("itemStyle"),W=Z.getItemStyle(),te=N.lastIndexOf("empty",0)===0?"fill":"stroke",oe=Z.getShallow("decal");W.decal=oe&&oe!=="inherit"?_l(oe,V):B.decal,W.fill==="inherit"&&(W.fill=B[G]),W.stroke==="inherit"&&(W.stroke=B[te]),W.opacity==="inherit"&&(W.opacity=(G==="fill"?B:z).opacity),X(W,B);var se=E.getModel("lineStyle"),ie=se.getLineStyle();if(X(ie,z),W.fill==="auto"&&(W.fill=B.fill),W.stroke==="auto"&&(W.stroke=B.fill),ie.stroke==="auto"&&(ie.stroke=B.fill),!K){var J=E.get("inactiveBorderWidth"),$=W[te];W.lineWidth=J==="auto"?B.lineWidth>0&&$?2:0:W.lineWidth,W.fill=E.get("inactiveColor"),W.stroke=E.get("inactiveBorderColor"),ie.stroke=se.get("inactiveColor"),ie.lineWidth=se.get("inactiveWidth")}return{itemStyle:W,lineStyle:ie}}(c=w||c||"roundRect",o,l,u,y,_,p),S=new gu,C=o.getModel("textStyle");if(!ue(e.getLegendIcon)||w&&w!=="inherit"){var I=w==="inherit"&&e.getData().getVisual("symbol")?x==="inherit"?e.getData().getVisual("symbolRotate"):x:0;S.add((d={itemWidth:v,itemHeight:m,icon:c,iconRotate:I,itemStyle:M.itemStyle,lineStyle:M.lineStyle,symbolKeepAspect:b},(g=_t(f=d.icon||"roundRect",0,0,d.itemWidth,d.itemHeight,d.itemStyle.fill,d.symbolKeepAspect)).setStyle(d.itemStyle),g.rotation=(d.iconRotate||0)*Math.PI/180,g.setOrigin([d.itemWidth/2,d.itemHeight/2]),f.indexOf("empty")>-1&&(g.style.stroke=g.style.fill,g.style.fill="#fff",g.style.lineWidth=2),g))}else S.add(e.getLegendIcon({itemWidth:v,itemHeight:m,icon:c,iconRotate:x,itemStyle:M.itemStyle,lineStyle:M.lineStyle,symbolKeepAspect:b}));var T=s==="left"?v+5:-5,A=s,k=a.get("formatter"),L=i;Q(k)&&k?L=k.replace("{name}",i??""):ue(k)&&(L=k(i));var O=_?C.getTextColor():o.get("inactiveColor");S.add(new Me({style:nt(C,{text:L,x:T,y:m/2,fill:O,align:A,verticalAlign:"middle"},{inheritColor:O})}));var P=new ke({shape:S.getBoundingRect(),style:{fill:"transparent"}}),R=o.getModel("tooltip");return R.get("show")&&ea({el:P,componentModel:a,itemName:i,itemTooltipOption:R.option}),S.add(P),S.eachChild(function(N){N.silent=!0}),P.silent=!h,this.getContentGroup().add(S),Wo(S),S.__legendDataIndex=r,S},t.prototype.layoutInner=function(e,i,r,o,a,s){var l=this.getContentGroup(),u=this.getSelectorGroup();er(e.get("orient"),l,e.get("itemGap"),r.width,r.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),a){er("horizontal",u,e.get("selectorItemGap",!0));var p=u.getBoundingRect(),d=[-p.x,-p.y],f=e.get("selectorButtonGap",!0),g=e.getOrient().index,y=g===0?"width":"height",v=g===0?"height":"width",m=g===0?"y":"x";s==="end"?d[g]+=c[y]+f:h[g]+=p[y]+f,d[1-g]+=c[v]/2-p[v]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[y]=c[y]+f+p[y],_[v]=Math.max(c[v],p[v]),_[m]=Math.min(0,p[m]+d[1-g]),_}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}(Xe);function Ub(n,t,e,i){ef(n,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:n??t}),Qd(n,t,e,i)}function Yb(n){for(var t,e=n.getZr().storage.getDisplayList(),i=0,r=e.length;i<r&&!(t=e[i].states.emphasis);)i++;return t&&t.hoverLayer}function Qd(n,t,e,i){Yb(e)||e.dispatchAction({type:"highlight",seriesName:n,name:t,excludeSeriesId:i})}function ef(n,t,e,i){Yb(e)||e.dispatchAction({type:"downplay",seriesName:n,name:t,excludeSeriesId:i})}function rD(n){var t=n.findComponents({mainType:"legend"});t&&t.length&&n.filterSeries(function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0})}function Wa(n,t,e){var i,r={},o=n==="toggleSelected";return e.eachComponent("legend",function(a){o&&i!=null?a[i?"select":"unSelect"](t.name):n==="allSelect"||n==="inverseSelect"?a[n]():(a[n](t.name),i=a.isSelected(t.name)),D(a.getData(),function(s){var l=s.get("name");if(l!==`
  28. `&&l!==""){var u=a.isSelected(l);r.hasOwnProperty(l)?r[l]=r[l]&&u:r[l]=u}})}),n==="allSelect"||n==="inverseSelect"?{selected:r}:{name:t.name,selected:r}}function Zb(n){n.registerComponentModel(Jd),n.registerComponentView(Xb),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,rD),n.registerSubTypeDefaulter("legend",function(){return"plain"}),function(t){t.registerAction("legendToggleSelect","legendselectchanged",Se(Wa,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",Se(Wa,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",Se(Wa,"inverseSelect")),t.registerAction("legendSelect","legendselected",Se(Wa,"select")),t.registerAction("legendUnSelect","legendunselected",Se(Wa,"unSelect"))}(n)}var oD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,i,r){var o=tl(e);n.prototype.init.call(this,e,i,r),qb(this,e,o)},t.prototype.mergeOption=function(e,i){n.prototype.mergeOption.call(this,e,i),qb(this,this.option,e)},t.type="legend.scroll",t.defaultOption=ta(Jd.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}(Jd);function qb(n,t,e){var i=[1,1];i[n.getOrient().index]=0,Wr(t,e,{type:"box",ignoreSize:!!i})}var jb=_e,tf=["width","height"],nf=["x","y"],aD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return F(t,n),t.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new jb),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new jb)},t.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,i,r,o,a,s,l){var u=this;n.prototype.renderInner.call(this,e,i,r,o,a,s,l);var c=this._controllerGroup,h=i.get("pageIconSize",!0),p=Y(h)?h:[h,h];f("pagePrev",0);var d=i.getModel("pageTextStyle");function f(g,y){var v=g+"DataIndex",m=Qo(i.get("pageIcons",!0)[i.getOrient().name][y],{onclick:he(u._pageGo,u,v,i,o)},{x:-p[0]/2,y:-p[1]/2,width:p[0],height:p[1]});m.name=g,c.add(m)}c.add(new Me({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),f("pageNext",1)},t.prototype.layoutInner=function(e,i,r,o,a,s){var l=this.getSelectorGroup(),u=e.getOrient().index,c=tf[u],h=nf[u],p=tf[1-u],d=nf[1-u];a&&er("horizontal",l,e.get("selectorItemGap",!0));var f=e.get("selectorButtonGap",!0),g=l.getBoundingRect(),y=[-g.x,-g.y],v=ae(r);a&&(v[c]=r[c]-g[c]-f);var m=this._layoutContentAndController(e,o,v,u,c,p,d,h);if(a){if(s==="end")y[u]+=m[c]+f;else{var _=g[c]+f;y[u]-=_,m[h]-=_}m[c]+=g[c]+f,y[1-u]+=m[d]+m[p]/2-g[p]/2,m[p]=Math.max(m[p],g[p]),m[d]=Math.min(m[d],g[d]+y[1-u]),l.x=y[0],l.y=y[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,i,r,o,a,s,l,u){var c=this.getContentGroup(),h=this._containerGroup,p=this._controllerGroup;er(e.get("orient"),c,e.get("itemGap"),o?r.width:null,o?null:r.height),er("horizontal",p,e.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),f=p.getBoundingRect(),g=this._showController=d[a]>r[a],y=[-d.x,-d.y];i||(y[o]=c[u]);var v=[0,0],m=[-f.x,-f.y],_=xe(e.get("pageButtonGap",!0),e.get("itemGap",!0));g&&(e.get("pageButtonPosition",!0)==="end"?m[o]+=r[a]-f[a]:v[o]+=f[a]+_),m[1-o]+=d[s]/2-f[s]/2,c.setPosition(y),h.setPosition(v),p.setPosition(m);var x={x:0,y:0};if(x[a]=g?r[a]:d[a],x[s]=Math.max(d[s],f[s]),x[l]=Math.min(0,f[l]+m[1-o]),h.__rectSize=r[a],g){var b={x:0,y:0};b[a]=Math.max(r[a]-f[a]-_,0),b[s]=x[s],h.setClipPath(new ke({shape:b})),h.__rectSize=b[a]}else p.eachChild(function(M){M.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&ze(c,{x:w.contentPosition[0],y:w.contentPosition[1]},g?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,i,r){var o=this._getPageInfo(i)[e];o!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:o,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var r=this._controllerGroup;D(["pagePrev","pageNext"],function(c){var h=i[c+"DataIndex"]!=null,p=r.childOfName(c);p&&(p.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),p.cursor=h?"pointer":"default")});var o=r.childOfName("pageText"),a=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;o&&a&&o.setStyle("text",Q(a)?a.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):a({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),r=this.getContentGroup(),o=this._containerGroup.__rectSize,a=e.getOrient().index,s=tf[a],l=nf[a],u=this._findTargetItemIndex(i),c=r.children(),h=c[u],p=c.length,d=p?1:0,f={contentPosition:[r.x,r.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return f;var g=x(h);f.contentPosition[a]=-g.s;for(var y=u+1,v=g,m=g,_=null;y<=p;++y)(!(_=x(c[y]))&&m.e>v.s+o||_&&!b(_,v.s))&&(v=m.i>v.i?m:_)&&(f.pageNextDataIndex==null&&(f.pageNextDataIndex=v.i),++f.pageCount),m=_;for(y=u-1,v=g,m=g,_=null;y>=-1;--y)(_=x(c[y]))&&b(m,_.s)||!(v.i<m.i)||(m=v,f.pagePrevDataIndex==null&&(f.pagePrevDataIndex=v.i),++f.pageCount,++f.pageIndex),v=_;return f;function x(w){if(w){var M=w.getBoundingRect(),S=M[l]+w[l];return{s:S,e:S+M[s],i:w.__legendDataIndex}}}function b(w,M){return w.e>=M&&w.s<=M+o}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild(function(o,a){var s=o.__legendDataIndex;r==null&&s!=null&&(r=a),s===e&&(i=a)}),i??r):0;var i,r},t.type="legend.scroll",t}(Xb);function sD(n){Lt(Zb),n.registerComponentModel(oD),n.registerComponentView(aD),function(t){t.registerAction("legendScroll","legendscroll",function(e,i){var r=e.scrollDataIndex;r!=null&&i.eachComponent({mainType:"legend",subType:"scroll",query:e},function(o){o.setScrollDataIndex(r)})})}(n)}function lD(n){Lt(Zb),Lt(sD)}var Kb=function(n,t,e){var i=ae((uD[n]||{})[t]);return e&&Y(i)?i[i.length-1]:i},uD={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]}},Jb=pt.mapVisual,cD=pt.eachVisual,hD=Y,$b=D,pD=Do,dD=Fe,yu=function(n){function t(){var e=n!==null&&n.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 F(t,n),t.prototype.init=function(e,i,r){this.mergeDefaultAndTheme(e,r)},t.prototype.optionUpdated=function(e,i){var r=this.option;!i&&function(o,a,s){var l;D(s,function(u){a.hasOwnProperty(u)&&Hb(a[u])&&(l=!0)}),l&&D(s,function(u){a.hasOwnProperty(u)&&Hb(a[u])?o[u]=ae(a[u]):delete o[u]})}(r,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var i=this.stateList;e=he(e,this),this.controllerVisuals=Wb(this.option.controller,i,e),this.targetVisuals=Wb(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(r,o){i.push(o)}):i=Ke(e),i},t.prototype.eachTargetSeries=function(e,i){D(this.getTargetSeriesIndices(),function(r){var o=this.ecModel.getSeriesByIndex(r);o&&e.call(i,o)},this)},t.prototype.isTargetSeries=function(e){var i=!1;return this.eachTargetSeries(function(r){r===e&&(i=!0)}),i},t.prototype.formatValueText=function(e,i,r){var o,a=this.option,s=a.precision,l=this.dataBound,u=a.formatter;r=r||["<",">"],Y(e)&&(e=e.slice(),o=!0);var c=i?e:o?[h(e[0]),h(e[1])]:h(e);return Q(u)?u.replace("{value}",o?c[0]:c).replace("{value2}",o?c[1]:c):ue(u)?o?u(e[0],e[1]):u(e):o?e[0]===l[0]?r[0]+" "+c[1]:e[1]===l[1]?r[1]+" "+c[0]:c[0]+" - "+c[1]:c;function h(p){return p===l[0]?"min":p===l[1]?"max":(+p).toFixed(Math.min(s,20))}},t.prototype.resetExtent=function(){var e=this.option,i=pD([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 r=e.dimensions,o=r.length-1;o>=0;o--){var a=r[o],s=e.getDimensionInfo(a);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,r={inRange:i.inRange,outOfRange:i.outOfRange},o=i.target||(i.target={}),a=i.controller||(i.controller={});de(o,r),de(a,r);var s=this.isCategory();function l(u){hD(i.color)&&!u.inRange&&(u.inRange={color:i.color.slice().reverse()}),u.inRange=u.inRange||{color:e.get("gradientColor")}}l.call(this,o),l.call(this,a),(function(u,c,h){var p=u[c],d=u[h];p&&!d&&(d=u[h]={},$b(p,function(f,g){if(pt.isValidType(g)){var y=Kb(g,"inactive",s);y!=null&&(d[g]=y,g!=="color"||d.hasOwnProperty("opacity")||d.hasOwnProperty("colorAlpha")||(d.opacity=[0,0]))}}))}).call(this,o,"inRange","outOfRange"),(function(u){var c=(u.inRange||{}).symbol||(u.outOfRange||{}).symbol,h=(u.inRange||{}).symbolSize||(u.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol()||"roundRect";$b(this.stateList,function(f){var g=this.itemSize,y=u[f];y||(y=u[f]={color:s?p:[p]}),y.symbol==null&&(y.symbol=c&&ae(c)||(s?d:[d])),y.symbolSize==null&&(y.symbolSize=h&&ae(h)||(s?g[0]:[g[0],g[0]])),y.symbol=Jb(y.symbol,function(_){return _==="none"?d:_});var v=y.symbolSize;if(v!=null){var m=-1/0;cD(v,function(_){_>m&&(m=_)}),y.symbolSize=Jb(v,function(_){return dD(_,[0,m],[0,g[0]],!0)})}},this)}).call(this,a)},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}(be),Qb=[20,140],fD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.optionUpdated=function(e,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){n.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Qb[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Qb[1])},t.prototype._resetRange=function(){var e=this.getExtent(),i=this.option.range;!i||i.auto?(e.auto=1,this.option.range=e):Y(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(){n.prototype.completeVisualOption.apply(this,arguments),D(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=Do((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,r=this.getExtent();return(i[0]<=r[0]||i[0]<=e)&&(i[1]>=r[1]||e<=i[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[];return this.eachTargetSeries(function(r){var o=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(s,l){e[0]<=s&&s<=e[1]&&o.push(l)},this),i.push({seriesId:r.id,dataIndex:o})},this),i},t.prototype.getVisualMeta=function(e){var i=ew(0,0,this.getExtent()),r=ew(0,0,this.option.range.slice()),o=[];function a(d,f){o.push({value:d,color:e(d,f)})}for(var s=0,l=0,u=r.length,c=i.length;l<c&&(!r.length||i[l]<=r[0]);l++)i[l]<r[s]&&a(i[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&o.length&&a(r[s],"outOfRange"),a(r[s],"inRange");for(h=1;l<c;l++)(!r.length||r[r.length-1]<i[l])&&(h&&(o.length&&a(o[o.length-1].value,"outOfRange"),h=0),a(i[l],"outOfRange"));var p=o.length;return{stops:o,outerColors:[p?o[0].color:"transparent",p?o[p-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=ta(yu.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}(yu);function ew(n,t,e){if(e[0]===e[1])return e.slice();for(var i=(e[1]-e[0])/200,r=e[0],o=[],a=0;a<=200&&r<e[1];a++)o.push(r),r+=i;return o.push(e[1]),o}var tw=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.autoPositionValues={left:1,right:1,top:1,bottom:1},e}return F(t,n),t.prototype.init=function(e,i){this.ecModel=e,this.api=i},t.prototype.render=function(e,i,r,o){this.visualMapModel=e,e.get("show")!==!1?this.doRender(e,i,r,o):this.group.removeAll()},t.prototype.renderBackground=function(e){var i=this.visualMapModel,r=Hr(i.get("padding")||0),o=e.getBoundingRect();e.add(new ke({z2:-1,silent:!0,shape:{x:o.x-r[3],y:o.y-r[0],width:o.width+r[3]+r[1],height:o.height+r[0]+r[2]},style:{fill:i.get("backgroundColor"),stroke:i.get("borderColor"),lineWidth:i.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,i,r){var o=(r=r||{}).forceState,a=this.visualMapModel,s={};if(i==="color"){var l=a.get("contentColor");s.color=l}function u(p){return s[p]}function c(p,d){s[p]=d}var h=a.controllerVisuals[o||a.getValueState(e)];return D(pt.prepareVisualTypes(h),function(p){var d=h[p];r.convertOpacityToAlpha&&p==="opacity"&&(p="colorAlpha",d=h.__alphaForOpacity),pt.dependsOn(p,i)&&d&&d.applyVisual(e,u,c)}),s[i]},t.prototype.positionGroup=function(e){var i=this.visualMapModel,r=this.api;pv(e,i.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})},t.prototype.doRender=function(e,i,r,o){},t.type="visualMap",t}(Xe),nw=[["left","right","width"],["top","bottom","height"]];function iw(n,t,e){var i=n.option,r=i.align;if(r!=null&&r!=="auto")return r;for(var o={width:t.getWidth(),height:t.getHeight()},a=i.orient==="horizontal"?1:0,s=nw[a],l=[0,null,10],u={},c=0;c<3;c++)u[nw[1-a][c]]=l[c],u[s[c]]=c===2?e[0]:i[s[c]];var h=[["x","width",3],["y","height",0]][a],p=It(u,o,i.padding);return s[(p.margin[h[2]]||0)+p[h[0]]+.5*p[h[1]]<.5*o[h[1]]?0:1]}function vu(n,t){return D(n||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),n}var zn=Fe,gD=D,rw=Math.min,rf=Math.max,yD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._shapes={},e._dataInterval=[],e._handleEnds=[],e._hoverLinkDataIndices=[],e}return F(t,n),t.prototype.init=function(e,i){n.prototype.init.call(this,e,i),this._hoverLinkFromSeriesMouseOver=he(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=he(this._hideIndicator,this)},t.prototype.doRender=function(e,i,r,o){o&&o.type==="selectDataRange"&&o.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 r=e.get("text");this._renderEndsText(i,r,0),this._renderEndsText(i,r,1),this._updateView(!0),this.renderBackground(i),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(i)},t.prototype._renderEndsText=function(e,i,r){if(i){var o=i[1-r];o=o!=null?o+"":"";var a=this.visualMapModel,s=a.get("textGap"),l=a.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,r===0?-s:l[1]+s],u),h=this._applyTransform(r===0?"bottom":"top",u),p=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Me({style:nt(d,{x:c[0],y:c[1],verticalAlign:p==="horizontal"?"middle":h,align:p==="horizontal"?h:"center",text:o})}))}},t.prototype._renderBar=function(e){var i=this.visualMapModel,r=this._shapes,o=i.itemSize,a=this._orient,s=this._useHandle,l=iw(i,this.api,o),u=r.mainGroup=this._createBarGroup(l),c=new _e;u.add(c),c.add(r.outOfRange=ow()),c.add(r.inRange=ow(null,s?sw(this._orient):null,he(this._dragHandle,this,"all",!1),he(this._dragHandle,this,"all",!0))),c.setClipPath(new ke({shape:{x:0,y:0,width:o[0],height:o[1],r:3}}));var h=i.textStyleModel.getTextRect("\u56FD"),p=rf(h.width,h.height);s&&(r.handleThumbs=[],r.handleLabels=[],r.handleLabelPoints=[],this._createHandle(i,u,0,o,p,a),this._createHandle(i,u,1,o,p,a)),this._createIndicator(i,u,o,p,a),e.add(u)},t.prototype._createHandle=function(e,i,r,o,a,s){var l=he(this._dragHandle,this,r,!1),u=he(this._dragHandle,this,r,!0),c=bn(e.get("handleSize"),o[0]),h=_t(e.get("handleIcon"),-c/2,-c/2,c,c,null,!0),p=sw(this._orient);h.attr({cursor:p,draggable:!0,drift:l,ondragend:u,onmousemove:function(v){Ti(v.event)}}),h.x=o[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(),jc(h,!0),i.add(h);var d=this.visualMapModel.textStyleModel,f=new Me({cursor:p,draggable:!0,drift:l,onmousemove:function(v){Ti(v.event)},ondragend:u,style:nt(d,{x:0,y:0,text:""})});f.ensureState("blur").style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var g=[c,0],y=this._shapes;y.handleThumbs[r]=h,y.handleLabelPoints[r]=g,y.handleLabels[r]=f},t.prototype._createIndicator=function(e,i,r,o,a){var s=bn(e.get("indicatorSize"),r[0]),l=_t(e.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:r[0]/2});var u=e.getModel("indicatorStyle").getItemStyle();if(l instanceof Tt){var c=l.style;l.useStyle(H({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);i.add(l);var h=this.visualMapModel.textStyleModel,p=new Me({silent:!0,invisible:!0,style:nt(h,{x:0,y:0,text:""})});this.group.add(p);var d=[(a==="horizontal"?o/2:6)+r[0]/2,0],f=this._shapes;f.indicator=l,f.indicatorLabel=p,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,i,r,o){if(this._useHandle){if(this._dragging=!i,!i){var a=this._applyTransform([r,o],this._shapes.mainGroup,!0);this._updateInterval(e,a[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():aw(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,i=this._dataInterval=e.getSelected(),r=e.getExtent(),o=[0,e.itemSize[1]];this._handleEnds=[zn(i[0],r,o,!0),zn(i[1],r,o,!0)]},t.prototype._updateInterval=function(e,i){i=i||0;var r=this.visualMapModel,o=this._handleEnds,a=[0,r.itemSize[1]];su(i,o,a,e,0);var s=r.getExtent();this._dataInterval=[zn(o[0],a,s,!0),zn(o[1],a,s,!0)]},t.prototype._updateView=function(e){var i=this.visualMapModel,r=i.getExtent(),o=this._shapes,a=[0,i.itemSize[1]],s=e?a:this._handleEnds,l=this._createBarVisual(this._dataInterval,r,s,"inRange"),u=this._createBarVisual(r,r,a,"outOfRange");o.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),o.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},t.prototype._createBarVisual=function(e,i,r,o){var a={forceState:o,convertOpacityToAlpha:!0},s=this._makeColorGradient(e,a),l=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],u=this._createBarPoints(r,l);return{barColor:new jo(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},t.prototype._makeColorGradient=function(e,i){var r=[],o=(e[1]-e[0])/100;r.push({color:this.getControllerVisual(e[0],"color",i),offset:0});for(var a=1;a<100;a++){var s=e[0]+o*a;if(s>e[1])break;r.push({color:this.getControllerVisual(s,"color",i),offset:a/100})}return r.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),r},t.prototype._createBarPoints=function(e,i){var r=this.visualMapModel.itemSize;return[[r[0]-i[0],e[0]],[r[0],e[0]],[r[0],e[1]],[r[0]-i[1],e[1]]]},t.prototype._createBarGroup=function(e){var i=this._orient,r=this.visualMapModel.get("inverse");return new _e(i!=="horizontal"||r?i==="horizontal"&&r?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i!=="vertical"||r?{scaleX:e==="left"?1:-1}:{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,i){if(this._useHandle){var r=this._shapes,o=this.visualMapModel,a=r.handleThumbs,s=r.handleLabels,l=o.itemSize,u=o.getExtent();gD([0,1],function(c){var h=a[c];h.setStyle("fill",i.handlesColor[c]),h.y=e[c];var p=zn(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(p,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var f=li(r.handleLabelPoints[c],$i(h,this.group));s[c].setStyle({x:f[0],y:f[1],text:o.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",r.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,i,r,o){var a=this.visualMapModel,s=a.getExtent(),l=a.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var p=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),f=zn(e,s,u,!0),g=l[0]-d/2,y={x:h.x,y:h.y};h.y=f,h.x=g;var v=li(c.indicatorLabelPoint,$i(h,this.group)),m=c.indicatorLabel;m.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),x=this._orient==="horizontal";m.setStyle({text:(r||"")+a.formatValueText(i),verticalAlign:x?_:"middle",align:x?"center":_});var b={x:g,y:f,style:{fill:p}},w={style:{x:v[0],y:v[1]}};if(a.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(b,M),m.animateTo(w,M)}else h.attr(b),m.attr(w);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(i){if(e._hovering=!0,!e._dragging){var r=e.visualMapModel.itemSize,o=e._applyTransform([i.offsetX,i.offsetY],e._shapes.mainGroup,!0,!0);o[1]=rw(rf(0,o[1]),r[1]),e._doHoverLinkToSeries(o[1],0<=o[0]&&o[0]<=r[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 r=this.visualMapModel,o=r.itemSize;if(r.option.hoverLink){var a=[0,o[1]],s=r.getExtent();e=rw(rf(a[0],e),a[1]);var l=function(g,y,v){var m=6,_=g.get("hoverLinkDataSize");return _&&(m=zn(_,y,v,!0)/2),m}(r,s,a),u=[e-l,e+l],c=zn(e,a,s,!0),h=[zn(u[0],a,s,!0),zn(u[1],a,s,!0)];u[0]<a[0]&&(h[0]=-1/0),u[1]>a[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var p=this._hoverLinkDataIndices,d=[];(i||aw(r))&&(d=this._hoverLinkDataIndices=r.findTargetDataIndices(h));var f=function(g,y){var v={},m={};return _(g||[],v),_(y||[],m,v),[x(v),x(m)];function _(b,w,M){for(var S=0,C=b.length;S<C;S++){var I=sn(b[S].seriesId,null);if(I==null)return;for(var T=Ke(b[S].dataIndex),A=M&&M[I],k=0,L=T.length;k<L;k++){var O=T[k];A&&A[O]?A[O]=null:(w[I]||(w[I]={}))[O]=1}}}function x(b,w){var M=[];for(var S in b)if(b.hasOwnProperty(S)&&b[S]!=null)if(w)M.push(+S);else{var C=x(b[S],!0);C.length&&M.push({seriesId:S,dataIndex:C})}return M}}(p,d);this._dispatchHighDown("downplay",vu(f[0],r)),this._dispatchHighDown("highlight",vu(f[1],r))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var i;if(tr(e.target,function(l){var u=ye(l);if(u.dataIndex!=null)return i=u,!0},!0),i){var r=this.ecModel.getSeriesByIndex(i.seriesIndex),o=this.visualMapModel;if(o.isTargetSeries(r)){var a=r.getData(i.dataType),s=a.getStore().get(o.getDataDimensionIndex(a),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 r=0;r<i.length;r++)this.api.leaveBlur(i[r])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",vu(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,r,o){var a=$i(i,o?null:this.group);return Y(e)?li(e,a,r):sh(e,a,r)},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}(tw);function ow(n,t,e,i){return new cn({shape:{points:n},draggable:!!e,cursor:t,drift:e,onmousemove:function(r){Ti(r.event)},ondragend:i})}function aw(n){return!!(n.get("hoverLinkOnHandle")??n.get("realtime"))}function sw(n){return n==="vertical"?"ns-resize":"ew-resize"}var vD={type:"selectDataRange",event:"dataRangeSelected",update:"update"},mD=function(n,t){t.eachComponent({mainType:"visualMap",query:n},function(e){e.setSelected(n.selected)})},_D=[{createOnAllSeries:!0,reset:function(n,t){var e=[];return t.eachComponent("visualMap",function(i){var r,o,a,s,l,u=n.pipelineContext;!i.isTargetSeries(n)||u&&u.large||e.push((r=i.stateList,o=i.targetVisuals,a=he(i.getValueState,i),s=i.getDataDimensionIndex(n.getData()),l={},D(r,function(c){var h=pt.prepareVisualTypes(o[c]);l[c]=h}),{progress:function(c,h){var p,d;function f(C){return Pm(h,d,C)}function g(C,I){(function(T,A,k,L){switch(k){case"color":T.ensureUniqueItemVisual(A,"style")[T.getVisual("drawType")]=L,T.setItemVisual(A,"colorFromPalette",!1);break;case"opacity":T.ensureUniqueItemVisual(A,"style").opacity=L;break;case"symbol":case"symbolSize":case"liftZ":T.setItemVisual(A,k,L)}})(h,d,C,I)}s!=null&&(p=h.getDimensionIndex(s));for(var y=h.getStore();(d=c.next())!=null;){var v=h.getRawDataItem(d);if(!v||v.visualMap!==!1)for(var m=s!=null?y.get(p,d):d,_=a(m),x=o[_],b=l[_],w=0,M=b.length;w<M;w++){var S=b[w];x[S]&&x[S].applyVisual(m,f,g)}}}}))}),e}},{createOnAllSeries:!0,reset:function(n,t){var e=n.getData(),i=[];t.eachComponent("visualMap",function(r){if(r.isTargetSeries(n)){var o=r.getVisualMeta(he(xD,null,n,r))||{stops:[],outerColors:[]},a=r.getDataDimensionIndex(e);a>=0&&(o.dimension=a,i.push(o))}}),n.getData().setVisual("visualMeta",i)}}];function xD(n,t,e,i){for(var r=t.targetVisuals[i],o=pt.prepareVisualTypes(r),a={color:Om(n.getData(),"color")},s=0,l=o.length;s<l;s++){var u=o[s],c=r[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(e,h,p)}return a.color;function h(d){return a[d]}function p(d,f){a[d]=f}}var lw=D;function bD(n){var t=n&&n.visualMap;Y(t)||(t=t?[t]:[]),lw(t,function(e){if(e){lo(e,"splitList")&&!lo(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var i=e.pieces;i&&Y(i)&&lw(i,function(r){ne(r)&&(lo(r,"start")&&!lo(r,"min")&&(r.min=r.start),lo(r,"end")&&!lo(r,"max")&&(r.max=r.end))})}})}function lo(n,t){return n&&n.hasOwnProperty&&n.hasOwnProperty(t)}var uw=!1;function cw(n){uw||(uw=!0,n.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),n.registerAction(vD,mD),D(_D,function(t){n.registerVisual(n.PRIORITY.VISUAL.COMPONENT,t)}),n.registerPreprocessor(bD))}function wD(n){n.registerComponentModel(fD),n.registerComponentView(yD),cw(n)}var SD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return F(t,n),t.prototype.optionUpdated=function(e,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],MD[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var o=this.option.categories;this.resetVisual(function(a,s){r==="categories"?(a.mappingMethod="category",a.categories=ae(o)):(a.dataExtent=this.getExtent(),a.mappingMethod="piecewise",a.pieceList=j(this._pieceList,function(l){return l=ae(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,i={},r=pt.listVisualTypes(),o=this.isCategory();function a(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}D(e.pieces,function(s){D(r,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),D(i,function(s,l){var u=!1;D(this.stateList,function(c){u=u||a(e,c,l)||a(e.target,c,l)},this),!u&&D(this.stateList,function(c){(e[c]||(e[c]={}))[l]=Kb(l,c==="inRange"?"active":"inactive",o)})},this),n.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,i){var r=this.option,o=this._pieceList,a=(i?r:e).selected||{};if(r.selected=a,D(o,function(l,u){var c=this.getSelectedMapKey(l);a.hasOwnProperty(c)||(a[c]=!0)},this),r.selectedMode==="single"){var s=!1;D(o,function(l,u){var c=this.getSelectedMapKey(l);a[c]&&(s?a[c]=!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=ae(e)},t.prototype.getValueState=function(e){var i=pt.findPieceIndex(e,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[],r=this._pieceList;return this.eachTargetSeries(function(o){var a=[],s=o.getData();s.each(this.getDataDimensionIndex(s),function(l,u){pt.findPieceIndex(l,r)===e&&a.push(u)},this),i.push({seriesId:o.id,dataIndex:a})},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 r=e.interval||[];i=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return i},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var i=[],r=["",""],o=this,a=this._pieceList.slice();if(a.length){var s=a[0].interval[0];s!==-1/0&&a.unshift({interval:[-1/0,s]}),(s=a[a.length-1].interval[1])!==1/0&&a.push({interval:[s,1/0]})}else a.push({interval:[-1/0,1/0]});var l=-1/0;return D(a,function(c){var h=c.interval;h&&(h[0]>l&&u([l,h[0]],"outOfRange"),u(h.slice()),l=h[1])},this),{stops:i,outerColors:r}}function u(c,h){var p=o.getRepresentValue({interval:c});h||(h=o.getValueState(p));var d=e(p,h);c[0]===-1/0?r[0]=d:c[1]===1/0?r[1]=d:i.push({value:c[0],color:d},{value:c[1],color:d})}},t.type="visualMap.piecewise",t.defaultOption=ta(yu.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}(yu),MD={splitNumber:function(n){var t=this.option,e=Math.min(t.precision,20),i=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(e)!==o&&e<5;)e++;t.precision=e,o=+o.toFixed(e),t.minOpen&&n.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a<r;s+=o,a++){var l=a===r-1?i[1]:s+o;n.push({interval:[s,l],close:[1,1]})}t.maxOpen&&n.push({interval:[i[1],1/0],close:[0,0]}),_c(n),D(n,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(n){var t=this.option;D(t.categories,function(e){n.push({text:this.formatValueText(e,!0),value:e})},this),hw(t,n)},pieces:function(n){var t=this.option;D(t.pieces,function(e,i){ne(e)||(e={value:e});var r={text:"",index:i};if(e.label!=null&&(r.text=e.label),e.hasOwnProperty("value")){var o=r.value=e.value;r.interval=[o,o],r.close=[1,1]}else{for(var a=r.interval=[],s=r.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var p=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&a[h]==null;d++)a[h]=e[p[d]],s[h]=l[d],c[h]=d===2;a[h]==null&&(a[h]=u[h])}c[0]&&a[1]===1/0&&(s[0]=0),c[1]&&a[0]===-1/0&&(s[1]=0),a[0]===a[1]&&s[0]&&s[1]&&(r.value=a[0])}r.visual=pt.retrieveVisuals(e),n.push(r)},this),hw(t,n),_c(n),D(n,function(e){var i=e.close,r=[["<","\u2264"][i[1]],[">","\u2265"][i[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,r)},this)}};function hw(n,t){var e=n.inverse;(n.orient==="vertical"?!e:e)&&t.reverse()}var TD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,r=i.get("textGap"),o=i.textStyleModel,a=o.getFont(),s=o.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),h=c.endsText,p=Vn(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],u,p,l),D(c.viewPieceList,function(d){var f=d.piece,g=new _e;g.onclick=he(this._onItemClick,this,f),this._enableHoverLink(g,d.indexInModelPieceList);var y=i.getRepresentValue(f);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]]),p){var v=this.visualMapModel.getValueState(y);g.add(new Me({style:{x:l==="right"?-r:u[0]+r,y:u[1]/2,text:f.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:v==="outOfRange"?.5:1}}))}e.add(g)},this),h&&this._renderEndsText(e,h[1],u,p,l),er(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,i){var r=this;e.on("mouseover",function(){return o("highlight")}).on("mouseout",function(){return o("downplay")});var o=function(a){var s=r.visualMapModel;s.option.hoverLink&&r.api.dispatchAction({type:a,batch:vu(s.findTargetDataIndices(i),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return iw(e,this.api,e.itemSize);var r=i.align;return r&&r!=="auto"||(r="left"),r},t.prototype._renderEndsText=function(e,i,r,o,a){if(i){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Me({style:nt(l,{x:o?a==="right"?r[0]:0:r[0]/2,y:r[1]/2,verticalAlign:"middle",align:o?a:"center",text:i})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,i=j(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),r=e.get("text"),o=e.get("orient"),a=e.get("inverse");return(o==="horizontal"?a:!a)?i.reverse():r&&(r=r.slice().reverse()),{viewPieceList:i,endsText:r}},t.prototype._createItemSymbol=function(e,i,r){e.add(_t(this.getControllerVisual(i,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(i,"color")))},t.prototype._onItemClick=function(e){var i=this.visualMapModel,r=i.option,o=r.selectedMode;if(o){var a=ae(r.selected),s=i.getSelectedMapKey(e);o==="single"||o===!0?(a[s]=!0,D(a,function(l,u){a[u]=u===s})):a[s]=!a[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}},t.type="visualMap.piecewise",t}(tw);function CD(n){n.registerComponentModel(SD),n.registerComponentView(TD),cw(n)}function ID(n){Lt(wD),Lt(CD)}var AD={label:{enabled:!0},decal:{show:!1}},pw=Ee(),DD={};function kD(n,t){var e=n.getModel("aria");if(e.get("enabled")){var i=ae(AD);de(i.label,n.getLocaleModel().get("aria"),!1),de(e.option,i,!1),function(){if(e.getModel("decal").get("show")){var o=re();n.eachSeries(function(a){if(!a.isColorBySeries()){var s=o.get(a.type);s||(s={},o.set(a.type,s)),pw(a).scope=s}}),n.eachRawSeries(function(a){if(!n.isSeriesFiltered(a))if(ue(a.enableAriaDecal))a.enableAriaDecal();else{var s=a.getData();if(a.isColorBySeries()){var l=bv(a.ecModel,a.name,DD,n.getSeriesCount()),u=s.getVisual("decal");s.setVisual("decal",f(u,l))}else{var c=a.getRawData(),h={},p=pw(a).scope;s.each(function(g){var y=s.getRawIndex(g);h[y]=g});var d=c.count();c.each(function(g){var y=h[g],v=c.getName(g)||g+"",m=bv(a.ecModel,v,p,d),_=s.getItemVisual(y,"decal");s.setItemVisual(y,"decal",f(_,m))})}}function f(g,y){var v=g?H(H({},y),g):y;return v.dirty=!0,v}})}}(),function(){var o=t.getZr().dom;if(o){var a=n.getLocaleModel().get("aria"),s=e.getModel("label");if(s.option=ce(s.option,a),s.get("enabled"))if(s.get("description"))o.setAttribute("aria-label",s.get("description"));else{var l,u=n.getSeriesCount(),c=s.get(["data","maxCount"])||10,h=s.get(["series","maxCount"])||10,p=Math.min(u,h);if(!(u<1)){var d=function(){var m=n.get("title");return m&&m.length&&(m=m[0]),m&&m.text}();l=d?r(s.get(["general","withTitle"]),{title:d}):s.get(["general","withoutTitle"]);var f=[];l+=r(u>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:u}),n.eachSeries(function(m,_){if(_<p){var x=void 0,b=m.get("name")?"withName":"withoutName";x=r(x=u>1?s.get(["series","multiple",b]):s.get(["series","single",b]),{seriesId:m.seriesIndex,seriesName:m.get("name"),seriesType:(L=m.subType,O=n.getLocaleModel().get(["series","typeNames"]),O[L]||O.chart)});var w=m.getData();w.count()>c?x+=r(s.get(["data","partialData"]),{displayCnt:c}):x+=s.get(["data","allData"]);for(var M=s.get(["data","separator","middle"]),S=s.get(["data","separator","end"]),C=[],I=0;I<w.count();I++)if(I<c){var T=w.getName(I),A=w.getValues(I),k=s.get(["data",T?"withName":"withoutName"]);C.push(r(k,{name:T,value:A.join(M)}))}x+=C.join(M)+S,f.push(x)}var L,O});var g=s.getModel(["series","multiple","separator"]),y=g.get("middle"),v=g.get("end");l+=f.join(y)+v,o.setAttribute("aria-label",l)}}}}()}function r(o,a){if(!Q(o))return o;var s=o;return D(a,function(l,u){s=s.replace(new RegExp("\\{\\s*"+u+"\\s*\\}","g"),l)}),s}}function LD(n){if(n&&n.aria){var t=n.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},D(["description","general","series","data"],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function PD(n){n.registerPreprocessor(LD),n.registerVisual(n.PRIORITY.VISUAL.ARIA,kD)}var OD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return F(t,n),t.prototype.init=function(e,i,r){n.prototype.init.call(this,e,i,r),this._sourceManager=new tm(this),nm(this)},t.prototype.mergeOption=function(e,i){n.prototype.mergeOption.call(this,e,i),nm(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:Pn},t}(be),RD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="dataset",e}return F(t,n),t.type="dataset",t}(Xe);function ND(n){n.registerComponentModel(OD),n.registerComponentView(RD)}function dw(n,t,e){var i=Bn.createCanvas(),r=t.getWidth(),o=t.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",n)),i.width=r*e,i.height=o*e,i}var of=function(n){function t(e,i,r){var o,a=n.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,r=r||ms,typeof e=="string"?o=dw(e,i,r):ne(e)&&(e=(o=e).id),a.id=e,a.dom=o;var s=o.style;return s&&(Cu(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=r,a}return F(t,n),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=dw("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,r,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var a,s=[],l=this.maxRepaintRectCount,u=!1,c=new me(0,0,0,0);function h(m){if(m.isFinite()&&!m.isZero())if(s.length===0)(_=new me(0,0,0,0)).copy(m),s.push(_);else{for(var _,x=!1,b=1/0,w=0,M=0;M<s.length;++M){var S=s[M];if(S.intersect(m)){var C=new me(0,0,0,0);C.copy(S),C.union(m),s[M]=C,x=!0;break}if(u){c.copy(m),c.union(S);var I=m.width*m.height,T=S.width*S.height,A=c.width*c.height-I-T;A<b&&(b=A,w=M)}}u&&(s[w].union(m),x=!0),x||((_=new me(0,0,0,0)).copy(m),s.push(_)),u||(u=s.length>=l)}}for(var p=this.__startIndex;p<this.__endIndex;++p)if(g=e[p]){var d=g.shouldBePainted(r,o,!0,!0);(y=g.__isRendered&&(1&g.__dirty||!d)?g.getPrevPaintRect():null)&&h(y);var f=d&&(1&g.__dirty||!g.__isRendered)?g.getPaintRect():null;f&&h(f)}for(p=this.__prevStartIndex;p<this.__prevEndIndex;++p){var g,y;d=(g=i[p])&&g.shouldBePainted(r,o,!0,!0),!g||d&&g.__zr||!g.__isRendered||(y=g.getPrevPaintRect())&&h(y)}do for(a=!1,p=0;p<s.length;)if(s[p].isZero())s.splice(p,1);else{for(var v=p+1;v<s.length;)s[p].intersect(s[v])?(a=!0,s[p].union(s[v]),s.splice(v,1)):v++;p++}while(a);return this._paintRects=s,s},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,i){var r=this.dpr,o=this.dom,a=o.style,s=this.domBack;a&&(a.width=e+"px",a.height=i+"px"),o.width=e*r,o.height=i*r,s&&(s.width=e*r,s.height=i*r,r!==1&&this.ctxBack.scale(r,r))},t.prototype.clear=function(e,i,r){var o=this.dom,a=this.ctx,s=o.width,l=o.height;i=i||this.clearColor;var u=this.motionBlur&&!e,c=this.lastFrameAlpha,h=this.dpr,p=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,s/h,l/h));var d=this.domBack;function f(g,y,v,m){if(a.clearRect(g,y,v,m),i&&i!=="transparent"){var _=void 0;ho(i)?(_=(i.global||i.__width===v&&i.__height===m)&&i.__canvasGradient||Kh(a,i,{x:0,y:0,width:v,height:m}),i.__canvasGradient=_,i.__width=v,i.__height=m):df(i)&&(i.scaleX=i.scaleX||h,i.scaleY=i.scaleY||h,_=Jh(a,i,{dirty:function(){p.setUnpainted(),p.painter.refresh()}})),a.save(),a.fillStyle=_||i,a.fillRect(g,y,v,m),a.restore()}u&&(a.save(),a.globalAlpha=c,a.drawImage(d,g,y,v,m),a.restore())}!r||u?f(0,0,s,l):r.length&&D(r,function(g){f(g.x*h,g.y*h,g.width*h,g.height*h)})},t}(Vt),fw=1e5,Xa=314159,mu=.01,ED=function(){function n(t,e,i,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=i=H({},i||{}),this.dpr=i.devicePixelRatio||ms,this._singleCanvas=o,this.root=t,t.style&&(Cu(t),t.innerHTML=""),this.storage=e;var a=this._zlevelList;this._prevDisplayList=[];var s=this._layers;if(o){var l=t,u=l.width,c=l.height;i.width!=null&&(u=i.width),i.height!=null&&(c=i.height),this.dpr=i.devicePixelRatio||1,l.width=u*this.dpr,l.height=c*this.dpr,this._width=u,this._height=c;var h=new of(l,this,this.dpr);h.__builtin__=!0,h.initContext(),s[314159]=h,h.zlevel=Xa,a.push(Xa),this._domRoot=t}else{this._width=yl(t,0,i),this._height=yl(t,1,i);var p=this._domRoot=function(d,f){var g=document.createElement("div");return g.style.cssText=["position:relative","width:"+d+"px","height:"+f+"px","padding:0","margin:0","border-width:0"].join(";")+";",g}(this._width,this._height);t.appendChild(p)}}return n.prototype.getType=function(){return"canvas"},n.prototype.isSingleCanvas=function(){return this._singleCanvas},n.prototype.getViewportRoot=function(){return this._domRoot},n.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},n.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),i=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,i,t,this._redrawId);for(var o=0;o<r.length;o++){var a=r[o],s=this._layers[a];if(!s.__builtin__&&s.refresh){var l=o===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},n.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},n.prototype._paintHoverList=function(t){var e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){for(var r,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},a=0;a<e;a++){var s=t[a];s.__inHover&&(i||(i=this._hoverlayer=this.getLayer(fw)),r||(r=i.ctx).save(),ir(r,s,o,a===e-1))}r&&r.restore()}},n.prototype.getHoverLayer=function(){return this.getLayer(fw)},n.prototype.paintOne=function(t,e){$h(t,e)},n.prototype._paintList=function(t,e,i,r){if(this._redrawId===r){i=i||!1,this._updateLayerStatus(t);var o=this._doPaintList(t,e,i),a=o.finished,s=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),a)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;os(function(){l._paintList(t,e,i,r)})}}},n.prototype._compositeManually=function(){var t=this.getLayer(Xa).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(r){r.virtual&&t.drawImage(r.dom,0,0,e,i)})},n.prototype._doPaintList=function(t,e,i){for(var r=this,o=[],a=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)&&o.push(u)}for(var c=!0,h=!1,p=function(g){var y,v=o[g],m=v.ctx,_=a&&v.createRepaintRects(t,e,d._width,d._height),x=i?v.__startIndex:v.__drawIndex,b=!i&&v.incremental&&Date.now,w=b&&Date.now(),M=v.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,M,_);else if(x===v.__startIndex){var S=t[x];S.incremental&&S.notClear&&!i||v.clear(!1,M,_)}x===-1&&(console.error("For some unknown reason. drawIndex is -1"),x=v.__startIndex);var C=function(k){var L={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(y=x;y<v.__endIndex;y++){var O=t[y];if(O.__inHover&&(h=!0),r._doPaintEl(O,v,a,k,L,y===v.__endIndex-1),b&&Date.now()-w>15)break}L.prevElClipPaths&&m.restore()};if(_)if(_.length===0)y=v.__endIndex;else for(var I=d.dpr,T=0;T<_.length;++T){var A=_[T];m.save(),m.beginPath(),m.rect(A.x*I,A.y*I,A.width*I,A.height*I),m.clip(),C(A),m.restore()}else m.save(),C(),m.restore();v.__drawIndex=y,v.__drawIndex<v.__endIndex&&(c=!1)},d=this,f=0;f<o.length;f++)p(f);return fe.wxa&&D(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:c,needsRefreshHover:h}},n.prototype._doPaintEl=function(t,e,i,r,o,a){var s=e.ctx;if(i){var l=t.getPaintRect();(!r||l&&l.intersect(r))&&(ir(s,t,o,a),t.setPrevPaintRect(l))}else ir(s,t,o,a)},n.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Xa);var i=this._layers[t];return i||((i=new of("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?de(i,this._layerConfig[t],!0):this._layerConfig[t-mu]&&de(i,this._layerConfig[t-mu],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},n.prototype.insertLayer=function(t,e){var i=this._layers,r=this._zlevelList,o=r.length,a=this._domRoot,s=null,l=-1;if(!i[t]&&function(c){return!!c&&(!!c.__builtin__||typeof c.resize=="function"&&typeof c.refresh=="function")}(e)){if(o>0&&t>r[0]){for(l=0;l<o-1&&!(r[l]<t&&r[l+1]>t);l++);s=i[r[l]]}if(r.splice(l+1,0,t),i[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?a.insertBefore(e.dom,u.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.painter||(e.painter=this)}},n.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,r=0;r<i.length;r++){var o=i[r];t.call(e,this._layers[o],o)}},n.prototype.eachBuiltinLayer=function(t,e){for(var i=this._zlevelList,r=0;r<i.length;r++){var o=i[r],a=this._layers[o];a.__builtin__&&t.call(e,a,o)}},n.prototype.eachOtherLayer=function(t,e){for(var i=this._zlevelList,r=0;r<i.length;r++){var o=i[r],a=this._layers[o];a.__builtin__||t.call(e,a,o)}},n.prototype.getLayers=function(){return this._layers},n.prototype._updateLayerStatus=function(t){function e(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this.eachBuiltinLayer(function(h,p){h.__dirty=h.__used=!1}),this._singleCanvas){for(var i=1;i<t.length;i++)if((l=t[i]).zlevel!==t[i-1].zlevel||l.incremental){this._needsManuallyCompositing=!0;break}}var r,o,a=null,s=0;for(o=0;o<t.length;o++){var l,u=(l=t[o]).zlevel,c=void 0;r!==u&&(r=u,s=0),l.incremental?((c=this.getLayer(u+.001,this._needsManuallyCompositing)).incremental=!0,s=1):c=this.getLayer(u+(s>0?mu:0),this._needsManuallyCompositing),c.__builtin__||qa("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,e(o),a=c),1&l.__dirty&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(h,p){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(t){t.clear()},n.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(e){e.setUnpainted()})},n.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?de(i[t],e,!0):i[t]=e;for(var r=0;r<this._zlevelList.length;r++){var o=this._zlevelList[r];o!==t&&o!==t+mu||de(this._layers[o],i[t],!0)}}},n.prototype.delLayer=function(t){var e=this._layers,i=this._zlevelList,r=e[t];r&&(r.dom.parentNode.removeChild(r.dom),delete e[t],i.splice(we(i,t),1))},n.prototype.resize=function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts,o=this.root;if(t!=null&&(r.width=t),e!=null&&(r.height=e),t=yl(o,0,r),e=yl(o,1,r),i.style.display="",this._width!==t||e!==this._height){for(var a in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].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(Xa).resize(t,e)}return this},n.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},n.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},n.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new of("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 r=e.dom.width,o=e.dom.height;this.eachLayer(function(h){h.__builtin__?i.drawImage(h.dom,0,0,r,o):h.renderToCanvas&&(i.save(),h.renderToCanvas(i),i.restore())})}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];ir(i,c,a,l===u-1)}return e.dom},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n}();function zD(n){n.registerPainter("canvas",ED)}export{LT as $,Rn as A,r_ as B,Je as C,fn as D,g0 as E,y0 as F,mp as G,vh as H,m0 as I,d0 as J,f0 as K,gp as L,Le as M,yp as N,fp as O,$m as P,_0 as Q,Il as R,Sp as S,pi as T,HT as U,sf as V,cl as W,bC as X,Lt as Y,MC as Z,Cw as _,be as a,Sw as a0,aS as a1,lD as a2,iD as a3,eD as a4,YA as a5,iA as a6,MA as a7,PD as a8,G2 as a9,ID as aa,iI as ab,KC as ac,cI as ad,a2 as ae,zD as af,Z2 as ag,RI as ah,d2 as ai,_2 as aj,ND as ak,FC as al,I0 as am,Me as an,Z0 as ao,Wo as ap,Y as aq,D as ar,It as as,Fe as at,cv as au,Xe as b,it as c,Zw as d,zT as e,XT as f,PT as g,BT as h,p0 as i,VT as j,fe as k,AC as l,TC as m,CC as n,IC as o,SC as p,GT as q,dp as r,FT as s,WT as t,wC as u,yC as v,ET as w,$h as x,Rw as y,xC as z};