(()=>{var uT={};(function(rt,za){za(rt.echarts={})})(uT,function(rt){"use strict";var za;typeof window<"u"?za=window.__DEV__:typeof global<"u"&&(za=global.__DEV__),typeof za>"u"&&(za=!0);var z=za,hT=2311,Lp=function(){return hT++},Wn={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?Wn={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?Wn={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?Wn={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:Wn=fT(navigator.userAgent);var at=Wn;function fT(t){var e={},r={},a=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),n=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return a&&(r.firefox=!0,r.version=a[1]),i&&(r.ie=!0,r.version=i[1]),n&&(r.edge=!0,r.version=n[1]),o&&(r.weChat=!0),{browser:r,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:typeof SVGRect<"u",touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=11),domSupported:typeof document<"u"}}var Pp={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Ep={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Un=Object.prototype.toString,$n=Array.prototype,cT=$n.forEach,vT=$n.filter,Zn=$n.slice,dT=$n.map,gT=$n.reduce,Oh={};function Rp(t,e){t==="createCanvas"&&(Hs=null),Oh[t]=e}function Y(t){if(t==null||typeof t!="object")return t;var e=t,r=Un.call(t);if(r==="[object Array]"){if(!zi(t)){e=[];for(var a=0,i=t.length;a"u"?Array:Float32Array;function jr(t,e){var r=new zp(2);return t==null&&(t=0),e==null&&(e=0),r[0]=t,r[1]=e,r}function Jt(t,e){return t[0]=e[0],t[1]=e[1],t}function Qe(t){var e=new zp(2);return e[0]=t[0],e[1]=t[1],e}function Bp(t,e,r){return t[0]=e,t[1]=r,t}function Hh(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function qn(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function Er(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Kn(t){return Math.sqrt(Fh(t))}var mT=Kn;function Fh(t){return t[0]*t[0]+t[1]*t[1]}var yT=Fh;function _T(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function xT(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function wT(t,e){return t[0]*e[0]+t[1]*e[1]}function Ws(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Bi(t,e){var r=Kn(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function Qn(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Rr=Qn;function Vp(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ta=Vp;function bT(t,e){return t[0]=-e[0],t[1]=-e[1],t}function Gp(t,e,r,a){return t[0]=e[0]+a*(r[0]-e[0]),t[1]=e[1]+a*(r[1]-e[1]),t}function xt(t,e,r){var a=e[0],i=e[1];return t[0]=r[0]*a+r[2]*i+r[4],t[1]=r[1]*a+r[3]*i+r[5],t}function kr(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Nr(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var ST=(Object.freeze||Object)({create:jr,copy:Jt,clone:Qe,set:Bp,add:Hh,scaleAndAdd:qn,sub:Er,len:Kn,length:mT,lenSquare:Fh,lengthSquare:yT,mul:_T,div:xT,dot:wT,scale:Ws,normalize:Bi,distance:Qn,dist:Rr,distanceSquare:Vp,distSquare:ta,negate:bT,lerp:Gp,applyTransform:xt,min:kr,max:Nr});function Us(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}Us.prototype={constructor:Us,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(Vi(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,a=t.offsetY,i=r-this._x,n=a-this._y;this._x=r,this._y=a,e.drift(i,n,t),this.dispatchToElement(Vi(e,t),"drag",t.event);var o=this.findHover(r,a,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(Vi(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(Vi(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Vi(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Vi(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function Vi(t,e){return{target:t,topTarget:e&&e.topTarget}}var Hp=Array.prototype.slice,Zt=function(t){this._$handlers={},this._$eventProcessor=t};Zt.prototype={constructor:Zt,one:function(t,e,r,a){return Fp(this,t,e,r,a,!0)},on:function(t,e,r,a){return Fp(this,t,e,r,a,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var r=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var a=[],i=0,n=r[t].length;i3&&(a=Hp.call(a,1));for(var n=e.length,o=0;o4&&(a=Hp.call(a,1,a.length-1));for(var n=a[a.length-1],o=e.length,s=0;s>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",i[u]+":0",a[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),t.appendChild(o),r.push(o)}return r}function IT(t,e,r){for(var a=r?"invTrans":"trans",i=e[a],n=e.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),f=2*u,c=h.left,v=h.top;s.push(c,v),o=o&&n&&c===n[f]&&v===n[f+1],l.push(t[u].offsetLeft,t[u].offsetTop)}return o&&i?i:(e.srcCoords=s,e[a]=r?Wp(l,s):Wp(s,l))}function $p(t){return t.nodeName.toUpperCase()==="CANVAS"}var Zh=typeof window<"u"&&!!window.addEventListener,MT=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Yh=[];function Xh(t,e,r,a){return r=r||{},a||!at.canvasSupported?Zp(t,e,r):at.browser.firefox&&e.layerX!=null&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):e.offsetX!=null?(r.zrX=e.offsetX,r.zrY=e.offsetY):Zp(t,e,r),r}function Zp(t,e,r){if(at.domSupported&&t.getBoundingClientRect){var a=e.clientX,i=e.clientY;if($p(t)){var n=t.getBoundingClientRect();r.zrX=a-n.left,r.zrY=i-n.top;return}else if($h(Yh,t,a,i)){r.zrX=Yh[0],r.zrY=Yh[1];return}}r.zrX=r.zrY=0}function qh(t){return t||window.event}function fr(t,e,r){if(e=qh(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(!i)Xh(t,e,e,r),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;else{var n=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];n&&Xh(t,n,e,r)}var o=e.button;return e.which==null&&o!==void 0&&MT.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function Kh(t,e,r,a){Zh?t.addEventListener(e,r,a):t.attachEvent("on"+e,r)}function LT(t,e,r,a){Zh?t.removeEventListener(e,r,a):t.detachEvent("on"+e,r)}var Va=Zh?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yp(t){return t.which===2||t.which===3}var Qh=function(){this._track=[]};Qh.prototype={constructor:Qh,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var a=t.touches;if(!!a){for(var i={points:[],touches:[],target:e,event:t},n=0,o=a.length;n1&&a&&a.length>1){var n=Xp(a)/Xp(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=PT(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},qp="silent";function ET(t,e,r){return{type:t,event:r,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:RT}}function RT(){Va(this.event)}function Kp(){}Kp.prototype.dispose=function(){};var kT=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Gi=function(t,e,r,a){Zt.call(this),this.storage=t,this.painter=e,this.painterRoot=a,r=r||new Kp,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Us.call(this),this.setHandlerProxy(r)};Gi.prototype={constructor:Gi,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(T(kT,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,r=t.zrY,a=Qp(this,e,r),i=this._hovered,n=i.target;n&&!n.__zr&&(i=this.findHover(i.x,i.y),n=i.target);var o=this._hovered=a?{x:e,y:r}:this.findHover(e,r),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),n&&s!==n&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(o,"mousemove",t),s&&s!==n&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,r=t.zrIsToLocalDOM;e!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),e!=="no_globalout"&&!r&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,r){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var i="on"+e,n=ET(e,t,r);a&&(a[i]&&(n.cancelBubble=a[i].call(a,n)),a.trigger(e,n),a=a.parent,!n.cancelBubble););n.cancelBubble||(this.trigger(e,n),this.painter&&this.painter.eachOtherLayer(function(o){typeof o[i]=="function"&&o[i].call(o,n),o.trigger&&o.trigger(e,n)}))}},findHover:function(t,e,r){for(var a=this.storage.getDisplayList(),i={x:t,y:e},n=a.length-1;n>=0;n--){var o;if(a[n]!==r&&!a[n].ignore&&(o=NT(a[n],t,e))&&(!i.topTarget&&(i.topTarget=a[n]),o!==qp)){i.target=a[n];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Qh);var r=this._gestureMgr;e==="start"&&r.clear();var a=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(e==="end"&&r.clear(),a){var i=a.type;t.gestureEvent=i,this.dispatchToElement({target:a.target},i,a.event)}}},T(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Gi.prototype[t]=function(e){var r=e.zrX,a=e.zrY,i=Qp(this,r,a),n,o;if((t!=="mouseup"||!i)&&(n=this.findHover(r,a),o=n.target),t==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(t==="mouseup")this._upEl=o;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||Rr(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function NT(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var a=t,i;a;){if(a.clipPath&&!a.clipPath.contain(e,r))return!1;a.silent&&(i=!0),a=a.parent}return i?qp:!0}return!1}function Qp(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}pt(Gi,Zt),pt(Gi,Us);var OT=typeof Float32Array>"u"?Array:Float32Array;function ce(){var t=new OT(6);return Hi(t),t}function Hi(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Jn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ea(t,e,r){var a=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],n=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=a,t[1]=i,t[2]=n,t[3]=o,t[4]=s,t[5]=l,t}function Je(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function Or(t,e,r){var a=e[0],i=e[2],n=e[4],o=e[1],s=e[3],l=e[5],u=Math.sin(r),h=Math.cos(r);return t[0]=a*h+o*u,t[1]=-a*u+o*h,t[2]=i*h+s*u,t[3]=-i*u+h*s,t[4]=h*n+u*l,t[5]=h*l-u*n,t}function jn(t,e,r){var a=r[0],i=r[1];return t[0]=e[0]*a,t[1]=e[1]*i,t[2]=e[2]*a,t[3]=e[3]*i,t[4]=e[4]*a,t[5]=e[5]*i,t}function $s(t,e){var r=e[0],a=e[2],i=e[4],n=e[1],o=e[3],s=e[5],l=r*o-n*a;return l?(l=1/l,t[0]=o*l,t[1]=-n*l,t[2]=-a*l,t[3]=r*l,t[4]=(a*s-o*i)*l,t[5]=(n*i-r*s)*l,t):null}function Jp(t){var e=ce();return Jn(e,t),e}var zT=(Object.freeze||Object)({create:ce,identity:Hi,copy:Jn,mul:ea,translate:Je,rotate:Or,scale:jn,invert:$s,clone:Jp}),jh=Hi,jp=5e-5;function Ga(t){return t>jp||t<-jp}var je=function(t){t=t||{},t.position||(this.position=[0,0]),t.rotation==null&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},tr=je.prototype;tr.transform=null,tr.needLocalTransform=function(){return Ga(this.rotation)||Ga(this.position[0])||Ga(this.position[1])||Ga(this.scale[0]-1)||Ga(this.scale[1]-1)};var Ha=[];tr.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&jh(a);return}a=a||ce(),r?this.getLocalTransform(a):jh(a),e&&(r?ea(a,t.transform,a):Jn(a,t.transform)),this.transform=a;var i=this.globalScaleRatio;if(i!=null&&i!==1){this.getGlobalScale(Ha);var n=Ha[0]<0?-1:1,o=Ha[1]<0?-1:1,s=((Ha[0]-n)*i+n)/Ha[0]||0,l=((Ha[1]-o)*i+o)/Ha[1]||0;a[0]*=s,a[1]*=s,a[2]*=l,a[3]*=l}this.invTransform=this.invTransform||ce(),$s(this.invTransform,a)},tr.getLocalTransform=function(t){return je.getLocalTransform(this,t)},tr.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},tr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Fi=[],tf=ce();tr.setLocalTransform=function(t){if(!!t){var e=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=this.position,i=this.scale;Ga(e-1)&&(e=Math.sqrt(e)),Ga(r-1)&&(r=Math.sqrt(r)),t[0]<0&&(e=-e),t[3]<0&&(r=-r),a[0]=t[4],a[1]=t[5],i[0]=e,i[1]=r,this.rotation=Math.atan2(-t[1]/r,t[0]/e)}},tr.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ea(Fi,t.invTransform,e),e=Fi);var r=this.origin;r&&(r[0]||r[1])&&(tf[4]=r[0],tf[5]=r[1],ea(Fi,e,tf),Fi[4]-=r[0],Fi[5]-=r[1],e=Fi),this.setLocalTransform(e)}},tr.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)},tr.transformCoordToLocal=function(t,e){var r=[t,e],a=this.invTransform;return a&&xt(r,r,a),r},tr.transformCoordToGlobal=function(t,e){var r=[t,e],a=this.transform;return a&&xt(r,r,a),r},je.getLocalTransform=function(t,e){e=e||[],jh(e);var r=t.origin,a=t.scale||[1,1],i=t.rotation||0,n=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),jn(e,e,a),i&&Or(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=n[0],e[5]+=n[1],e};var Zs={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)))},elasticOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/a)+1)},elasticInOut:function(t){var e,r=.1,a=.4;return t===0?0:t===1?1:(!r||r<1?(r=1,e=a/4):e=a*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/a)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Zs.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?Zs.bounceIn(t*2)*.5:Zs.bounceOut(t*2-1)*.5+.5}};function ef(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=t.loop==null?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}ef.prototype={constructor:ef,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused){this._pausedTime+=e;return}var r=(t-this._startTime-this._pausedTime)/this._life;if(!(r<0)){r=Math.min(r,1);var a=this.easing,i=typeof a=="string"?Zs[a]:a,n=typeof i=="function"?i(r):r;return this.fire("frame",n),r===1?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var tm=function(){this.head=null,this.tail=null,this._len=0},to=tm.prototype;to.insert=function(t){var e=new em(t);return this.insertEntry(e),e},to.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++},to.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},to.len=function(){return this._len},to.clear=function(){this.head=this.tail=null,this._len=0};var em=function(t){this.value=t,this.next,this.prev},rf=function(t){this._list=new tm,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},af=rf.prototype;af.put=function(t,e){var r=this._list,a=this._map,i=null;if(a[t]==null){var n=r.len(),o=this._lastRemovedEntry;if(n>=this._maxSize&&n>0){var s=r.head;r.remove(s),delete a[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new em(e),o.key=t,r.insertEntry(o),a[t]=o}return i},af.get=function(t){var e=this._map[t],r=this._list;if(e!=null)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},af.clear=function(){this._list.clear(),this._map={}};var rm={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 er(t){return t=Math.round(t),t<0?0:t>255?255:t}function BT(t){return t=Math.round(t),t<0?0:t>360?360:t}function eo(t){return t<0?0:t>1?1:t}function nf(t){return t.length&&t.charAt(t.length-1)==="%"?er(parseFloat(t)/100*255):er(parseInt(t,10))}function Wi(t){return t.length&&t.charAt(t.length-1)==="%"?eo(parseFloat(t)/100):eo(parseFloat(t))}function of(t,e,r){return r<0?r+=1:r>1&&(r-=1),r*6<1?t+(e-t)*r*6:r*2<1?e:r*3<2?t+(e-t)*(2/3-r)*6:t}function ra(t,e,r){return t+(e-t)*r}function rr(t,e,r,a,i){return t[0]=e,t[1]=r,t[2]=a,t[3]=i,t}function sf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var am=new rf(20),Ys=null;function Ui(t,e){Ys&&sf(Ys,e),Ys=am.put(t,Ys||e.slice())}function be(t,e){if(!!t){e=e||[];var r=am.get(t);if(r)return sf(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in rm)return sf(e,rm[a]),Ui(t,e),e;if(a.charAt(0)==="#"){if(a.length===4){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=4095)){rr(e,0,0,0,1);return}return rr(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),Ui(t,e),e}else if(a.length===7){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=16777215)){rr(e,0,0,0,1);return}return rr(e,(i&16711680)>>16,(i&65280)>>8,i&255,1),Ui(t,e),e}return}var n=a.indexOf("("),o=a.indexOf(")");if(n!==-1&&o+1===a.length){var s=a.substr(0,n),l=a.substr(n+1,o-(n+1)).split(","),u=1;switch(s){case"rgba":if(l.length!==4){rr(e,0,0,0,1);return}u=Wi(l.pop());case"rgb":if(l.length!==3){rr(e,0,0,0,1);return}return rr(e,nf(l[0]),nf(l[1]),nf(l[2]),u),Ui(t,e),e;case"hsla":if(l.length!==4){rr(e,0,0,0,1);return}return l[3]=Wi(l[3]),lf(l,e),Ui(t,e),e;case"hsl":if(l.length!==3){rr(e,0,0,0,1);return}return lf(l,e),Ui(t,e),e;default:return}}rr(e,0,0,0,1)}}function lf(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=Wi(t[1]),i=Wi(t[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],rr(e,er(of(o,n,r+1/3)*255),er(of(o,n,r)*255),er(of(o,n,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function VT(t){if(!!t){var e=t[0]/255,r=t[1]/255,a=t[2]/255,i=Math.min(e,r,a),n=Math.max(e,r,a),o=n-i,s=(n+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(n+i):u=o/(2-n-i);var h=((n-e)/6+o/2)/o,f=((n-r)/6+o/2)/o,c=((n-a)/6+o/2)/o;e===n?l=c-f:r===n?l=1/3+h-c:a===n&&(l=2/3+f-h),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return t[3]!=null&&v.push(t[3]),v}}function im(t,e){var r=be(t);if(r){for(var a=0;a<3;a++)e<0?r[a]=r[a]*(1-e)|0:r[a]=(255-r[a])*e+r[a]|0,r[a]>255?r[a]=255:t[a]<0&&(r[a]=0);return zr(r,r.length===4?"rgba":"rgb")}}function uf(t){var e=be(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function ro(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){r=r||[];var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=e[i],s=e[n],l=a-i;return r[0]=er(ra(o[0],s[0],l)),r[1]=er(ra(o[1],s[1],l)),r[2]=er(ra(o[2],s[2],l)),r[3]=eo(ra(o[3],s[3],l)),r}}var GT=ro;function nm(t,e,r){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var a=t*(e.length-1),i=Math.floor(a),n=Math.ceil(a),o=be(e[i]),s=be(e[n]),l=a-i,u=zr([er(ra(o[0],s[0],l)),er(ra(o[1],s[1],l)),er(ra(o[2],s[2],l)),eo(ra(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}var HT=nm;function $i(t,e,r,a){if(t=be(t),t)return t=VT(t),e!=null&&(t[0]=BT(e)),r!=null&&(t[1]=Wi(r)),a!=null&&(t[2]=Wi(a)),zr(lf(t),"rgba")}function Xs(t,e){if(t=be(t),t&&e!=null)return t[3]=eo(e),zr(t,"rgba")}function zr(t,e){if(!(!t||!t.length)){var r=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(r+=","+t[3]),e+"("+r+")"}}var FT=(Object.freeze||Object)({parse:be,lift:im,toHex:uf,fastLerp:ro,fastMapToColor:GT,lerp:nm,mapToColor:HT,modifyHSL:$i,modifyAlpha:Xs,stringify:zr}),hf=Array.prototype.slice;function WT(t,e){return t[e]}function UT(t,e,r){t[e]=r}function ff(t,e,r){return(e-t)*r+t}function om(t,e,r){return r>.5?e:t}function sm(t,e,r,a,i){var n=t.length;if(i===1)for(var o=0;oi;if(n)t.length=i;else for(var o=a;o=0&&!(p[N]<=F);N--);N=Math.min(N,u-2)}else{for(N=A;NF);N++);N=Math.min(N-1,u-2)}A=N,C=F;var $=p[N+1]-p[N];if($!==0)if(I=(F-p[N])/$,l)if(M=m[N],L=m[N===0?N:N-1],B=m[N>u-2?u-1:N+1],k=m[N>u-3?u-1:N+2],f)um(L,M,B,k,I,I*I,I*I*I,o(W,i),d);else{var et;if(c)et=um(L,M,B,k,I,I*I,I*I*I,O,1),et=hm(O);else{if(v)return om(M,B,I);et=cf(L,M,B,k,I,I*I,I*I*I)}s(W,i,et)}else if(f)sm(m[N],m[N+1],I,o(W,i),d);else{var et;if(c)sm(m[N],m[N+1],I,O,1),et=hm(O);else{if(v)return om(m[N],m[N+1],I);et=ff(m[N],m[N+1],I)}s(W,i,et)}},H=new ef({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:V,ondestroy:r});return e&&e!=="spline"&&(H.easing=e),H}}}var vf=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||WT,this._setter=a||UT,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};vf.prototype={when:function(t,e){var r=this._tracks;for(var a in e)if(!!e.hasOwnProperty(a)){if(!r[a]){r[a]=[];var i=this._getter(this._target,a);if(i==null)continue;t!==0&&r[a].push({time:0,value:ZT(i)})}r[a].push({time:t,value:e[a]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t0&&t.animate(e,!1).when(i??500,s).delay(n||0)}function gm(t,e,r,a){if(!e)t.attr(r,a);else{var i={};i[e]={},i[e][r]=a,t.attr(i)}}var Br=function(t){je.call(this,t),Zt.call(this,t),Ks.call(this,t),this.id=t.id||Lp()};Br.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if(t==="position"||t==="scale"||t==="origin"){if(e){var r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(Q(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;r=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new it(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},it.create=function(t){return new it(t.x,t.y,t.width,t.height)};var G=function(t){t=t||{},Br.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};G.prototype={constructor:G,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r=0&&(r.splice(a,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof G&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,a=this._children,i=ut(a,t);return i<0?this:(a.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof G&&t.delChildrenFromStorage(r)),e&&e.refresh(),this)},removeAll:function(){var t=this._children,e=this.__storage,r,a;for(a=0;a=pm;)e|=t&1,t>>=1;return t+e}function mm(t,e,r,a){var i=e+1;if(i===r)return 1;if(a(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function QT(t,e,r){for(r--;e>>1,i(n,t[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:t[o+3]=t[o+2];case 2:t[o+2]=t[o+1];case 1:t[o+1]=t[o];break;default:for(;u>0;)t[o+u]=t[o+u-1],u--}t[o]=n}}function df(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])>0){for(s=a-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);n(t,e[r+h])>0?o=h+1:l=h}return l}function gf(t,e,r,a,i,n){var o=0,s=0,l=1;if(n(t,e[r+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=a-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);n(t,e[r+h])<0?l=h:o=h+1}return l}function JT(t,e){var r=ao,a,i,n=0,o=[];a=[],i=[];function s(v,d){a[n]=v,i[n]=d,n+=1}function l(){for(;n>1;){var v=n-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]i[v+1])break;h(v)}}function u(){for(;n>1;){var v=n-2;v>0&&i[v-1]=ao||b>=ao);if(A)break;w<0&&(w=0),w+=2}if(r=w,r<1&&(r=1),d===1){for(m=0;m=0;m--)t[S+m]=t[w+m];t[x]=o[_];return}for(var b=r;;){var A=0,C=0,D=!1;do if(e(o[_],t[y])<0){if(t[x--]=t[y--],A++,C=0,--d===0){D=!0;break}}else if(t[x--]=o[_--],C++,A=0,--p===1){D=!0;break}while((A|C)=0;m--)t[S+m]=t[w+m];if(d===0){D=!0;break}}if(t[x--]=o[_--],--p===1){D=!0;break}if(C=p-df(t[y],o,0,p,p-1,e),C!==0){for(x-=C,_-=C,p-=C,S=x+1,w=_+1,m=0;m=ao||C>=ao);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),p===1){for(x-=d,y-=d,S=x+1,w=y+1,m=d-1;m>=0;m--)t[S+m]=t[w+m];t[x]=o[_]}else{if(p===0)throw new Error;for(w=x-(p-1),m=0;ms&&(l=s),ym(t,r,r+l,r+n,e),n=l}o.pushRun(r,n),o.mergeRuns(),i-=n,r+=n}while(i!==0);o.forceMergeRuns()}}function _m(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var pf=function(){this._roots=[],this._displayList=[],this._displayListLen=0};pf.prototype={constructor:pf,traverse:function(t,e){for(var r=0;r=0&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof G&&t.delChildrenFromStorage(this))},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:_m};var jT={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},mf=function(t,e,r){return jT.hasOwnProperty(e)?r*=t.dpr:r},ia={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},yf=9,el=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],na=function(t){this.extendFrom(t,!1)};function tC(t,e,r){var a=e.x==null?0:e.x,i=e.x2==null?1:e.x2,n=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(a=a*r.width+r.x,i=i*r.width+r.x,n=n*r.height+r.y,o=o*r.height+r.y),a=isNaN(a)?0:a,i=isNaN(i)?1:i,n=isNaN(n)?0:n,o=isNaN(o)?0:o;var s=t.createLinearGradient(a,n,i,o);return s}function eC(t,e,r){var a=r.width,i=r.height,n=Math.min(a,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*a+r.x,s=s*i+r.y,l=l*n);var u=t.createRadialGradient(o,s,0,o,s,l);return u}na.prototype={constructor:na,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,r){var a=this,i=r&&r.style,n=!i||t.__attrCachedBy!==ia.STYLE_BIND;t.__attrCachedBy=ia.STYLE_BIND;for(var o=0;o0},extendFrom:function(t,e){if(t)for(var r in t)t.hasOwnProperty(r)&&(e===!0||(e===!1?!this.hasOwnProperty(r):t[r]!=null))&&(this[r]=t[r])},set:function(t,e){typeof t=="string"?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,r){for(var a=e.type==="radial"?eC:tC,i=a(t,e,r),n=e.colorStops,o=0;onC&&(Tf=0,al={}),Tf++,al[r]=i,i}function cr(t,e,r,a,i,n,o,s){return o?lC(t,e,r,a,i,n,o,s):sC(t,e,r,a,i,n,s)}function sC(t,e,r,a,i,n,o){var s=Lf(t,e,i,n,o),l=Oe(t,e);i&&(l+=i[1]+i[3]);var u=s.outerHeight,h=no(0,l,r),f=Zi(0,u,a),c=new it(h,f,l,u);return c.lineHeight=s.lineHeight,c}function lC(t,e,r,a,i,n,o,s){var l=Pf(t,{rich:o,truncate:s,font:e,textAlign:r,textPadding:i,textLineHeight:n}),u=l.outerWidth,h=l.outerHeight,f=no(0,u,r),c=Zi(0,h,a);return new it(f,c,u,h)}function no(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function Zi(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function If(t,e,r){var a=e.textPosition,i=e.textDistance,n=r.x,o=r.y;i=i||0;var s=r.height,l=r.width,u=s/2,h="left",f="top";switch(a){case"left":n-=i,o+=u,h="right",f="middle";break;case"right":n+=i+l,o+=u,f="middle";break;case"top":n+=l/2,o-=i,h="center",f="bottom";break;case"bottom":n+=l/2,o+=s+i,h="center";break;case"inside":n+=l/2,o+=u,h="center",f="middle";break;case"insideLeft":n+=i,o+=u,f="middle";break;case"insideRight":n+=l-i,o+=u,h="right",f="middle";break;case"insideTop":n+=l/2,o+=i,h="center";break;case"insideBottom":n+=l/2,o+=s-i,h="center",f="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=l-i,o+=i,h="right";break;case"insideBottomLeft":n+=i,o+=s-i,f="bottom";break;case"insideBottomRight":n+=l-i,o+=s-i,h="right",f="bottom";break}return t=t||{},t.x=n,t.y=o,t.textAlign=h,t.textVerticalAlign=f,t}function Mf(t,e,r,a,i){if(!e)return"";var n=(t+"").split(` `);i=bm(e,r,a,i);for(var o=0,s=n.length;o=o;l++)s-=o;var u=Oe(i,e);return u>s&&(i="",u=0),s=t-u,a.ellipsis=i,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=t,a}function Sm(t,e){var r=e.containerWidth,a=e.font,i=e.contentWidth;if(!r)return"";var n=Oe(t,a);if(n<=r)return t;for(var o=0;;o++){if(n<=i||o>=e.maxIterations){t+=e.ellipsis;break}var s=o===0?uC(t,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*i/n):0;t=t.substr(0,s),n=Oe(t,a)}return t===""&&(t=e.placeholder),t}function uC(t,e,r,a){for(var i=0,n=0,o=t.length;nh)t="",o=[];else if(f!=null)for(var c=bm(f-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),v=0,d=o.length;va&&Ef(r,t.substring(a,n)),Ef(r,i[2],i[1]),a=Cf.lastIndex}av)return{lines:[],width:0,height:0};_.textWidth=Oe(_.text,S);var A=x.textWidth,C=A==null||A==="auto";if(typeof A=="string"&&A.charAt(A.length-1)==="%")_.percentWidth=A,u.push(_),A=0;else{if(C){A=_.textWidth;var D=x.textBackgroundColor,I=D&&D.image;I&&(I=aC(I),rl(I)&&(A=Math.max(A,I.width*b/I.height)))}var L=w?w[1]+w[3]:0;A+=L;var M=c!=null?c-m:null;M!=null&&Mi&&(f=s+l,s*=i/f,l*=i/f),u+h>i&&(f=u+h,u*=i/f,h*=i/f),l+u>n&&(f=l+u,l*=n/f,u*=n/f),s+h>n&&(f=s+h,s*=n/f,h*=n/f),t.moveTo(r+s,a),t.lineTo(r+i-l,a),l!==0&&t.arc(r+i-l,a+l,l,-Math.PI/2,0),t.lineTo(r+i,a+n-u),u!==0&&t.arc(r+i-u,a+n-u,u,0,Math.PI/2),t.lineTo(r+h,a+n),h!==0&&t.arc(r+h,a+n-h,h,Math.PI/2,Math.PI),t.lineTo(r,a+s),s!==0&&t.arc(r+s,a+s,s,Math.PI,Math.PI*1.5)}var Rf=il,fC={left:1,right:1,center:1},cC={top:1,bottom:1,middle:1},Dm=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Im={},Mm={};function oo(t){return Lm(t),T(t.rich,Lm),t}function Lm(t){if(t){t.font=Tm(t);var e=t.textAlign;e==="middle"&&(e="center"),t.textAlign=e==null||fC[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle"),t.textVerticalAlign=r==null||cC[r]?r:"top";var a=t.textPadding;a&&(t.textPadding=Bh(t.textPadding))}}function Pm(t,e,r,a,i,n){a.rich?dC(t,e,r,a,i,n):vC(t,e,r,a,i,n)}function vC(t,e,r,a,i,n){"use strict";var o=Nf(a),s,l=!1,u=e.__attrCachedBy===ia.PLAIN_TEXT;n!==yf?(n&&(s=n.style,l=!o&&u&&s),e.__attrCachedBy=o?ia.NONE:ia.PLAIN_TEXT):u&&(e.__attrCachedBy=ia.NONE);var h=a.font||Rf;(!l||h!==(s.font||Rf))&&(e.font=h);var f=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,f=t.__computedFont=e.font);var c=a.textPadding,v=a.textLineHeight,d=t.__textCotentBlock;(!d||t.__dirtyText)&&(d=t.__textCotentBlock=Lf(r,f,c,v,a.truncate));var g=d.outerHeight,p=d.lines,m=d.lineHeight,y=zf(Mm,t,a,i),_=y.baseX,x=y.baseY,w=y.textAlign||"left",S=y.textVerticalAlign;Em(e,a,i,_,x);var b=Zi(x,g,S),A=_,C=b;if(o||c){var D=Oe(r,f),I=D;c&&(I+=c[1]+c[3]);var L=no(_,I,w);o&&Of(t,e,a,L,b,I,g),c&&(A=km(_,w,c),C+=c[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=a.opacity||1;for(var M=0;M=0&&(M=w[L],M.textAlign==="right");)kf(t,e,M,a,b,m,I,"right"),A-=M.width,I-=M.width,L--;for(D+=(n-(D-p)-(y-I)-A)/2;C<=L;)M=w[C],kf(t,e,M,a,b,m,D+M.width/2,"center"),D+=M.width,C++;m+=b}}function Em(t,e,r,a,i){if(r&&e.textRotation){var n=e.textOrigin;n==="center"?(a=r.width/2+r.x,i=r.height/2+r.y):n&&(a=n[0]+r.x,i=n[1]+r.y),t.translate(a,i),t.rotate(-e.textRotation),t.translate(-a,-i)}}function kf(t,e,r,a,i,n,o,s){var l=a.rich[r.styleName]||{};l.text=r.text;var u=r.textVerticalAlign,h=n+i/2;u==="top"?h=n+r.height/2:u==="bottom"&&(h=n+i-r.height/2),!r.isLineHolder&&Nf(l)&&Of(t,e,l,s==="right"?o-r.width:s==="center"?o-r.width/2:o,h-r.height/2,r.width,r.height);var f=r.textPadding;f&&(o=km(o,s,f),h-=r.height/2-f[2]-r.textHeight/2),jt(e,"shadowBlur",Ba(l.textShadowBlur,a.textShadowBlur,0)),jt(e,"shadowColor",l.textShadowColor||a.textShadowColor||"transparent"),jt(e,"shadowOffsetX",Ba(l.textShadowOffsetX,a.textShadowOffsetX,0)),jt(e,"shadowOffsetY",Ba(l.textShadowOffsetY,a.textShadowOffsetY,0)),jt(e,"textAlign",s),jt(e,"textBaseline","middle"),jt(e,"font",r.font||Rf);var c=Bf(l.textStroke||a.textStroke,d),v=Rm(l.textFill||a.textFill),d=Nt(l.textStrokeWidth,a.textStrokeWidth);c&&(jt(e,"lineWidth",d),jt(e,"strokeStyle",c),e.strokeText(r.text,o,h)),v&&(jt(e,"fillStyle",v),e.fillText(r.text,o,h))}function Nf(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Of(t,e,r,a,i,n,o){var s=r.textBackgroundColor,l=r.textBorderWidth,u=r.textBorderColor,h=_t(s);if(jt(e,"shadowBlur",r.textBoxShadowBlur||0),jt(e,"shadowColor",r.textBoxShadowColor||"transparent"),jt(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),jt(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var f=r.textBorderRadius;f?Cm(e,{x:a,y:i,width:n,height:o,r:f}):e.rect(a,i,n,o),e.closePath()}if(h)if(jt(e,"fillStyle",s),r.fillOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.fillOpacity*r.opacity,e.fill(),e.globalAlpha=c}else e.fill();else if(Q(s)){var v=s.image;v=wm(v,null,t,pC,s),v&&rl(v)&&e.drawImage(v,a,i,n,o)}if(l&&u)if(jt(e,"lineWidth",l),jt(e,"strokeStyle",u),r.strokeOpacity!=null){var c=e.globalAlpha;e.globalAlpha=r.strokeOpacity*r.opacity,e.stroke(),e.globalAlpha=c}else e.stroke()}function pC(t,e){e.image=t}function zf(t,e,r,a){var i=r.x||0,n=r.y||0,o=r.textAlign,s=r.textVerticalAlign;if(a){var l=r.textPosition;if(l instanceof Array)i=a.x+Vf(l[0],a.width),n=a.y+Vf(l[1],a.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Im,r,a):If(Im,r,a);i=u.x,n=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var h=r.textOffset;h&&(i+=h[0],n+=h[1])}return t=t||{},t.baseX=i,t.baseY=n,t.textAlign=o,t.textVerticalAlign=s,t}function jt(t,e,r){return t[e]=mf(t,e,r),t[e]}function Bf(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function Rm(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function Vf(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function km(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function Gf(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var Hf=new it,nl=function(){};nl.prototype={constructor:nl,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&oo(r,!0);var a=r.text;if(a!=null&&(a+=""),!!Gf(a,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(Hf.copy(e),Hf.applyTransform(i),e=Hf),Pm(this,t,a,r,e,yf),t.restore()}}};function ve(t){t=t||{},Br.call(this,t);for(var e in t)t.hasOwnProperty(e)&&e!=="style"&&(this[e]=t[e]);this.style=new na(t.style,this),this._rect=null,this.__clipPaths=null}ve.prototype={constructor:ve,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect();return a.contain(r[0],r[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){t!=="style"?Br.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new na(t,this),this.dirty(!1),this},calculateTextPosition:null},yt(ve,Br),pt(ve,nl);function Qt(t){ve.call(this,t)}Qt.prototype={constructor:Qt,type:"image",brush:function(t,e){var r=this.style,a=r.image;r.bind(t,this,e);var i=this._image=wm(a,this._image,this,this.onload);if(!(!i||!rl(i))){var n=r.x||0,o=r.y||0,s=r.width,l=r.height,u=i.width/i.height;if(s==null&&l!=null?s=l*u:l==null&&s!=null?l=s/u:s==null&&l==null&&(s=i.width,l=i.height),this.setTransform(t),r.sWidth&&r.sHeight){var h=r.sx||0,f=r.sy||0;t.drawImage(i,h,f,r.sWidth,r.sHeight,n,o,s,l)}else if(r.sx&&r.sy){var h=r.sx,f=r.sy,c=s-h,v=l-f;t.drawImage(i,h,f,c,v,n,o,s,l)}else t.drawImage(i,n,o,s,l);r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new it(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},yt(Qt,ve);var Nm=1e5,Fa=314159,ol=.01,mC=.001;function sl(t){return parseInt(t,10)}function yC(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}var Ff=new it(0,0,0,0),Wf=new it(0,0,0,0);function _C(t,e,r){return Ff.copy(t.getBoundingRect()),t.transform&&Ff.applyTransform(t.transform),Wf.width=e,Wf.height=r,!Ff.intersect(Wf)}function xC(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var r=0;r=0&&r.splice(a,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;r15)break}}n.__drawIndex=g,n.__drawIndex0&&t>a[0]){for(o=0;ot);o++);n=r[a[o]]}if(a.splice(o+1,0,t),r[t]=e,!e.virtual)if(n){var l=n.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var r=this._zlevelList,a,i;for(i=0;i0?ol:0),this._needsManuallyCompositing),l.__builtin__||aa("ZLevel "+s+" has been used by unkown layer "+l.id),l!==i&&(l.__used=!0,l.__startIndex!==r&&(l.__dirty=!0),l.__startIndex=r,l.incremental?l.__drawIndex=-1:l.__drawIndex=r,e(r),i=l),a.__dirty&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(u,h){!u.__used&&u.getElementCount()>0&&(u.__dirty=!0,u.__startIndex=u.__endIndex=u.__drawIndex=0),u.__dirty&&u.__drawIndex<0&&(u.__drawIndex=u.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?J(r[t],e,!0):r[t]=e;for(var a=0;a=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;r=r.length&&r.push({option:a})}}),r}function Um(t){var e=j();Yi(t,function(r,a){var i=r.exist;i&&e.set(i.id,r)}),Yi(t,function(r,a){var i=r.option;ot(!i||i.id==null||!e.get(i.id)||e.get(i.id)===r,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,r),!r.keyInfo&&(r.keyInfo={})}),Yi(t,function(r,a){var i=r.exist,n=r.option,o=r.keyInfo;if(!!Xi(n)){if(o.name=n.name!=null?n.name+"":i?i.name:Fm+a,i)o.id=i.id;else if(n.id!=null)o.id=n.id+"";else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,r)}})}function nc(t){var e=t.name;return!!(e&&e.indexOf(Fm))}function fl(t){return Xi(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function NC(t,e){var r={},a={};return i(t||[],r),i(e||[],a,r),[n(r),n(a)];function i(o,s,l){for(var u=0,h=o.length;u=0||i&&ut(i,s)<0)){var l=r.getShallow(s);l!=null&&(n[t[o][0]]=l)}}return n}},WC=qi([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),UC={getLineStyle:function(t){var e=WC(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){t==null&&(t=1);var e=this.get("type"),r=Math.max(t,2),a=t*4;return e==="solid"||e==null?!1:e==="dashed"?[a,a]:[r,r]}},$C=qi([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ZC={getAreaStyle:function(t,e){return $C(this,t,e)}},pl=Math.pow,sa=Math.sqrt,ml=1e-8,Ym=1e-4,Xm=sa(3),yl=1/3,vr=jr(),ze=jr(),Ki=jr();function la(t){return t>-ml&&tml||t<-ml}function he(t,e,r,a,i){var n=1-i;return n*n*(n*t+3*i*e)+i*i*(i*a+3*n*r)}function Km(t,e,r,a,i){var n=1-i;return 3*(((e-t)*n+2*(r-e)*i)*n+(a-r)*i*i)}function YC(t,e,r,a,i,n){var o=a+3*(e-r)-t,s=3*(r-e*2+t),l=3*(e-t),u=t-i,h=s*s-3*o*l,f=s*l-9*o*u,c=l*l-3*s*u,v=0;if(la(h)&&la(f))if(la(s))n[0]=0;else{var d=-l/s;d>=0&&d<=1&&(n[v++]=d)}else{var g=f*f-4*h*c;if(la(g)){var p=f/h,d=-s/o+p,m=-p/2;d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m)}else if(g>0){var y=sa(g),_=h*s+1.5*o*(-f+y),x=h*s+1.5*o*(-f-y);_<0?_=-pl(-_,yl):_=pl(_,yl),x<0?x=-pl(-x,yl):x=pl(x,yl);var d=(-s-(_+x))/(3*o);d>=0&&d<=1&&(n[v++]=d)}else{var w=(2*h*s-3*o*f)/(2*sa(h*h*h)),S=Math.acos(w)/3,b=sa(h),A=Math.cos(S),d=(-s-2*b*A)/(3*o),m=(-s+b*(A+Xm*Math.sin(S)))/(3*o),C=(-s+b*(A-Xm*Math.sin(S)))/(3*o);d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m),C>=0&&C<=1&&(n[v++]=C)}}return v}function Qm(t,e,r,a,i){var n=6*r-12*e+6*t,o=9*e+3*a-3*t-9*r,s=3*e-3*t,l=0;if(la(o)){if(qm(n)){var u=-s/n;u>=0&&u<=1&&(i[l++]=u)}}else{var h=n*n-4*o*s;if(la(h))i[0]=-n/(2*o);else if(h>0){var f=sa(h),u=(-n+f)/(2*o),c=(-n-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function Jm(t,e,r,a,i,n){var o=(e-t)*i+t,s=(r-e)*i+e,l=(a-r)*i+r,u=(s-o)*i+o,h=(l-s)*i+s,f=(h-u)*i+u;n[0]=t,n[1]=o,n[2]=u,n[3]=f,n[4]=f,n[5]=h,n[6]=l,n[7]=a}function XC(t,e,r,a,i,n,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,m;vr[0]=l,vr[1]=u;for(var y=0;y<1;y+=.05)ze[0]=he(t,r,i,o,y),ze[1]=he(e,a,n,s,y),p=ta(vr,ze),p=0&&p=0&&u<=1&&(i[l++]=u)}}else{var h=o*o-4*n*s;if(la(h)){var u=-o/(2*n);u>=0&&u<=1&&(i[l++]=u)}else if(h>0){var f=sa(h),u=(-o+f)/(2*n),c=(-o-f)/(2*n);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function jm(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function uc(t,e,r,a,i){var n=(e-t)*a+t,o=(r-e)*a+e,s=(o-n)*a+n;i[0]=t,i[1]=n,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function KC(t,e,r,a,i,n,o,s,l){var u,h=.005,f=1/0;vr[0]=o,vr[1]=s;for(var c=0;c<1;c+=.05){ze[0]=ne(t,r,i,c),ze[1]=ne(e,a,n,c);var v=ta(vr,ze);v=0&&v1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(_l[0]=fc(i)*r+t,_l[1]=hc(i)*a+e,xl[0]=fc(n)*r+t,xl[1]=hc(n)*a+e,u(s,_l,xl),h(l,_l,xl),i=i%Za,i<0&&(i=i+Za),n=n%Za,n<0&&(n=n+Za),i>n&&!o?n+=Za:ii&&(wl[0]=fc(v)*r+t,wl[1]=hc(v)*a+e,u(s,wl,s),h(l,wl,l))}var kt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},dr=[],ua=[],gr=[],pr=[],a0=Math.min,i0=Math.max,ho=Math.cos,fo=Math.sin,bl=Math.sqrt,Qi=Math.abs,cc=typeof Float32Array<"u",me=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};me.prototype={constructor:me,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,r){r=r||0,this._ux=Qi(r/qs/t)||0,this._uy=Qi(r/qs/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(kt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=Qi(t-this._xi)>this._ux||Qi(e-this._yi)>this._uy||this._len<5;return this.addData(kt.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,a,i,n){return this.addData(kt.C,t,e,r,a,i,n),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,a,i,n):this._ctx.bezierCurveTo(t,e,r,a,i,n)),this._xi=i,this._yi=n,this},quadraticCurveTo:function(t,e,r,a){return this.addData(kt.Q,t,e,r,a),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,a):this._ctx.quadraticCurveTo(t,e,r,a)),this._xi=r,this._yi=a,this},arc:function(t,e,r,a,i,n){return this.addData(kt.A,t,e,r,r,a,i-a,0,n?0:1),this._ctx&&this._ctx.arc(t,e,r,a,i,n),this._xi=ho(i)*r+t,this._yi=fo(i)*r+e,this},arcTo:function(t,e,r,a,i){return this._ctx&&this._ctx.arcTo(t,e,r,a,i),this},rect:function(t,e,r,a){return this._ctx&&this._ctx.rect(t,e,r,a),this.addData(kt.R,t,e,r,a),this},closePath:function(){this.addData(kt.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,r=0;re.length&&(this._expandData(),e=this.data);for(var r=0;r0&&f<=t||l<0&&f>=t||l===0&&(u>0&&c<=e||u<0&&c>=e);)g=this._dashIdx,v=i[g],f+=l*v,c+=u*v,this._dashIdx=(g+1)%d,!(l>0&&fo||u>0&&cs)&&n[g%2?"moveTo":"lineTo"](l>=0?a0(f,t):i0(f,t),u>=0?a0(c,e):i0(c,e));l=f-t,u=c-e,this._dashOffset=-bl(l*l+u*u)},_dashedBezierTo:function(t,e,r,a,i,n){var o=this._dashSum,s=this._dashOffset,l=this._lineDash,u=this._ctx,h=this._xi,f=this._yi,c,v,d,g=he,p=0,m=this._dashIdx,y=l.length,_,x,w=0;for(s<0&&(s=o+s),s%=o,c=0;c<1;c+=.1)v=g(h,t,r,i,c+.1)-g(h,t,r,i,c),d=g(f,e,a,n,c+.1)-g(f,e,a,n,c),p+=bl(v*v+d*d);for(;ms));m++);for(c=(w-s)/p;c<=1;)_=g(h,t,r,i,c),x=g(f,e,a,n,c),m%2?u.moveTo(_,x):u.lineTo(_,x),c+=l[m]/p,m=(m+1)%y;m%2!==0&&u.lineTo(i,n),v=i-_,d=n-x,this._dashOffset=-bl(v*v+d*d)},_dashedQuadraticTo:function(t,e,r,a){var i=r,n=a;r=(r+2*t)/3,a=(a+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,a,i,n)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,cc&&(this.data=new Float32Array(t)))},getBoundingRect:function(){dr[0]=dr[1]=gr[0]=gr[1]=Number.MAX_VALUE,ua[0]=ua[1]=pr[0]=pr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,a=0,i=0,n=0;nl||Qi(s-n)>u||f===h-1)&&(t.lineTo(o,s),i=o,n=s);break;case kt.C:t.bezierCurveTo(e[f++],e[f++],e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case kt.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case kt.A:var v=e[f++],d=e[f++],g=e[f++],p=e[f++],m=e[f++],y=e[f++],_=e[f++],x=e[f++],w=g>p?g:p,S=g>p?1:g/p,b=g>p?p/g:1,A=Math.abs(g-p)>.001,C=m+y;A?(t.translate(v,d),t.rotate(_),t.scale(S,b),t.arc(0,0,w,m,C,1-x),t.scale(1/S,1/b),t.rotate(-_),t.translate(-v,-d)):t.arc(v,d,w,m,C,1-x),f===1&&(r=ho(m)*g+v,a=fo(m)*p+d),i=ho(C)*g+v,n=fo(C)*p+d;break;case kt.R:r=i=e[f],a=n=e[f+1],t.rect(e[f++],e[f++],e[f++],e[f++]);break;case kt.Z:t.closePath(),i=r,n=a}}}},me.CMD=kt;function ha(t,e,r,a,i,n,o){if(i===0)return!1;var s=i,l=0,u=t;if(o>e+s&&o>a+s||ot+s&&n>r+s||ne+f&&h>a+f&&h>n+f&&h>s+f||ht+f&&u>r+f&&u>i+f&&u>o+f||ue+u&&l>a+u&&l>n+u||lt+u&&s>r+u&&s>i+u||sr||h+ui&&(i+=co);var c=Math.atan2(l,s);return c<0&&(c+=co),c>=a&&c<=i||c+co>=a&&c+co<=i}function Vr(t,e,r,a,i,n){if(n>e&&n>a||ni?o:0}var ca=me.CMD,Ji=Math.PI*2,rD=1e-4;function aD(t,e){return Math.abs(t-e)e&&u>a&&u>n&&u>s||u1&&iD(),v=he(e,a,n,s,Be[0]),c>1&&(d=he(e,a,n,s,Be[1]))),c===2?pe&&s>a&&s>n||s=0&&u<=1){for(var h=0,f=ne(e,a,n,u),c=0;cr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);fe[0]=-l,fe[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u%Ji<1e-4){a=0,i=Ji;var h=n?1:-1;return o>=fe[0]+t&&o<=fe[1]+t?h:0}if(n){var l=a;a=fa(i),i=fa(l)}else a=fa(a),i=fa(i);a>i&&(i+=Ji);for(var f=0,c=0;c<2;c++){var v=fe[c];if(v+t>o){var d=Math.atan2(s,v),h=n?1:-1;d<0&&(d=Ji+d),(d>=a&&d<=i||d+Ji>=a&&d+Ji<=i)&&(d>Math.PI/2&&d1&&(r||(n+=Vr(o,s,l,u,a,i))),h===1&&(o=t[h],s=t[h+1],l=o,u=s),f){case ca.M:l=t[h++],u=t[h++],o=l,s=u;break;case ca.L:if(r){if(ha(o,s,t[h],t[h+1],e,a,i))return!0}else n+=Vr(o,s,t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case ca.C:if(r){if(tD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=nD(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case ca.Q:if(r){if(n0(o,s,t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=oD(o,s,t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case ca.A:var c=t[h++],v=t[h++],d=t[h++],g=t[h++],p=t[h++],m=t[h++];h+=1;var y=1-t[h++],S=Math.cos(p)*d+c,b=Math.sin(p)*g+v;h>1?n+=Vr(o,s,S,b,a,i):(l=S,u=b);var _=(a-c)*g/d+c;if(r){if(eD(c,v,g,p,p+m,y,e,_,i))return!0}else n+=sD(c,v,g,p,p+m,y,_,i);o=Math.cos(p+m)*d+c,s=Math.sin(p+m)*g+v;break;case ca.R:l=o=t[h++],u=s=t[h++];var x=t[h++],w=t[h++],S=l+x,b=u+w;if(r){if(ha(l,u,S,u,e,a,i)||ha(S,u,S,b,e,a,i)||ha(S,b,l,b,e,a,i)||ha(l,b,l,u,e,a,i))return!0}else n+=Vr(S,u,S,b,a,i),n+=Vr(l,b,l,u,a,i);break;case ca.Z:if(r){if(ha(o,s,l,u,e,a,i))return!0}else n+=Vr(o,s,l,u,a,i);o=l,s=u;break}}return!r&&!aD(s,u)&&(n+=Vr(o,s,l,u,a,i)||0),n!==0}function lD(t,e,r){return s0(t,0,!1,e,r)}function uD(t,e,r,a){return s0(t,e,!0,r,a)}var l0=bf.prototype.getCanvasPattern,vc=Math.abs,hD=new me(!0);function st(t){ve.call(this,t),this.path=null}st.prototype={constructor:st,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var r=this.style,a=this.path||hD,i=r.hasStroke(),n=r.hasFill(),o=r.fill,s=r.stroke,l=n&&!!o.colorStops,u=i&&!!s.colorStops,h=n&&!!o.image,f=i&&!!s.image;if(r.bind(t,this,e),this.setTransform(t),this.__dirty){var c;l&&(c=c||this.getBoundingRect(),this._fillGradient=r.getGradient(t,o,c)),u&&(c=c||this.getBoundingRect(),this._strokeGradient=r.getGradient(t,s,c))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=l0.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=l0.call(s,t));var v=r.lineDash,d=r.lineDashOffset,g=!!t.setLineDash,p=this.getGlobalScale();if(a.setScale(p[0],p[1],this.segmentIgnoreThreshold),this.__dirtyPath||v&&!g&&i?(a.beginPath(t),v&&!g&&(a.setLineDash(v),a.setLineDashOffset(d)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),n)if(r.fillOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.fillOpacity*r.opacity,a.fill(t),t.globalAlpha=m}else a.fill(t);if(v&&g&&(t.setLineDash(v),t.lineDashOffset=d),i)if(r.strokeOpacity!=null){var m=t.globalAlpha;t.globalAlpha=r.strokeOpacity*r.opacity,a.stroke(t),t.globalAlpha=m}else a.stroke(t);v&&g&&t.setLineDash([]),r.text!=null&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,r){},createPathProxy:function(){this.path=new me},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var a=this.path;a||(a=this.path=new me),this.__dirtyPath&&(a.beginPath(),this.buildPath(a,this.shape,!1)),t=a.getBoundingRect()}if(this._rect=t,e.hasStroke()){var i=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){i.copy(t);var n=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(n=Math.max(n,this.strokeContainThreshold||4)),o>1e-10&&(i.width+=n/o,i.height+=n/o,i.x-=n/o/2,i.y-=n/o/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),a=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],a.contain(t,e)){var n=this.path.data;if(i.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),uD(n,o/s,t,e)))return!0}if(i.hasFill())return lD(n,t,e)}return!1},dirty:function(t){t==null&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){t==="shape"?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ve.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(Q(t))for(var a in t)t.hasOwnProperty(a)&&(r[a]=t[a]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&vc(t[0]-1)>1e-10&&vc(t[3]-1)>1e-10?Math.sqrt(vc(t[0]*t[3]-t[2]*t[1])):1}},st.extend=function(t){var e=function(a){st.call(this,a),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,a)};yt(e,st);for(var r in t)r!=="style"&&r!=="shape"&&(e.prototype[r]=t[r]);return e},yt(st,ve);var ji=me.CMD,fD=[[],[],[]],u0=Math.sqrt,cD=Math.atan2,vD=function(t,e){var r=t.data,a,i,n,o,s,l,u=ji.M,h=ji.C,f=ji.L,c=ji.R,v=ji.A,d=ji.Q;for(n=0,o=0;n1&&(o*=dc(d),s*=dc(d));var g=(i===n?-1:1)*dc((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,p=g*o*v/s,m=g*-s*c/o,y=(t+r)/2+Al(f)*p-Sl(f)*m,_=(e+a)/2+Sl(f)*p+Al(f)*m,x=f0([1,0],[(c-p)/o,(v-m)/s]),w=[(c-p)/o,(v-m)/s],S=[(-1*c-p)/o,(-1*v-m)/s],b=f0(w,S);gc(w,S)<=-1&&(b=Tl),gc(w,S)>=1&&(b=0),n===0&&b>0&&(b=b-2*Tl),n===1&&b<0&&(b=b+2*Tl),h.addData(u,y,_,o,s,x,b,f,n)}var dD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,gD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function pD(t){if(!t)return new me;for(var e=0,r=0,a=e,i=r,n,o=new me,s=me.CMD,l=t.match(dD),u=0;u=11?function(){var e=this.__clipPaths,r=this.style,a;if(e)for(var i=0;ir-2?r-1:l+1],v=t[l>r-3?r-1:l+2]);var d=u*u,g=u*d;a.push([g0(h[0],f[0],c[0],v[0],u,d,g),g0(h[1],f[1],c[1],v[1],u,d,g)])}return a},xD=function(t,e,r,a){var i=[],n=[],o=[],s=[],l,u,h,f;if(a){h=[1/0,1/0],f=[-1/0,-1/0];for(var c=0,v=t.length;c=2){if(i&&i!=="spline"){var n=xD(a,i,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(r?o:o-1);s++){var l=n[s*2],u=n[s*2+1],h=a[(s+1)%o];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{i==="spline"&&(a=_D(a,r)),t.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;s=0),l=!s&&i!=null;(s||l)&&(a={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",t.textStroke==null&&(t.textStroke=i,t.textStrokeWidth==null&&(t.textStrokeWidth=2))),l&&(t.textFill=i)}t.insideRollback=a}function Nl(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Sc(t,e){var r=e&&e.getModel("textStyle");return Ne([t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" "))}function z0(t,e,r,a,i,n){typeof i=="function"&&(n=i,i=null);var o=a&&a.isAnimationEnabled();if(o){var s=t?"Update":"",l=a.getShallow("animationDuration"+s),u=a.getShallow("animationEasing"+s),h=a.getShallow("animationDelay"+s);typeof h=="function"&&(h=h(i,a.getAnimationDelayParams?a.getAnimationDelayParams(e,i):null)),typeof l=="function"&&(l=l(i)),l>0?e.animateTo(r,l,h||0,u,n,!!n):(e.stopAnimation(),e.attr(r),n&&n())}else e.stopAnimation(),e.attr(r),n&&n()}function tt(t,e,r,a,i){z0(!0,t,e,r,a,i)}function oe(t,e,r,a,i){z0(!1,t,e,r,a,i)}function Qa(t,e){for(var r=Hi([]);t&&t!==e;)ea(r,t.getLocalTransform(),r),t=t.parent;return r}function xr(t,e,r){return e&&!Pr(e)&&(e=je.getLocalTransform(e)),r&&(e=$s([],e)),xt([],t,e)}function Ac(t,e,r){var a=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),n=[t==="left"?-a:t==="right"?a:0,t==="top"?-i:t==="bottom"?i:0];return n=xr(n,e,r),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function Ol(t,e,r,a){if(!t||!e)return;function i(s){var l={};return s.traverse(function(u){!u.isGroup&&u.anid&&(l[u.anid]=u)}),l}function n(s){var l={position:Qe(s.position),rotation:s.rotation};return s.shape&&(l.shape=Z({},s.shape)),l}var o=i(t);e.traverse(function(s){if(!s.isGroup&&s.anid){var l=o[s.anid];if(l){var u=n(s);s.attr(n(l)),tt(s,u,r,s.dataIndex)}}})}function B0(t,e){return E(t,function(r){var a=r[0];a=Ml(a,e.x),a=Ll(a,e.x+e.width);var i=r[1];return i=Ml(i,e.y),i=Ll(i,e.y+e.height),[a,i]})}function RD(t,e){var r=Ml(t.x,e.x),a=Ll(t.x+t.width,e.x+e.width),i=Ml(t.y,e.y),n=Ll(t.y+t.height,e.y+e.height);if(a>=r&&n>=i)return{x:r,y:i,width:a-r,height:n-i}}function xo(t,e,r){e=Z({rectHover:!0},e);var a=e.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(a.image=t.slice(8),U(a,r),new Qt(e)):po(t.replace("path://",""),e,r,"center")}function wo(t,e,r,a,i){for(var n=0,o=i[i.length-1];n1)return!1;var p=Tc(v,d,h,f)/c;return!(p<0||p>1)}function Tc(t,e,r,a){return t*a-r*e}function kD(t){return t<=1e-6&&t>=-1e-6}_r("circle",mr),_r("sector",ir),_r("ring",Cl),_r("polygon",Se),_r("polyline",Ve),_r("rect",ft),_r("line",ee),_r("bezierCurve",Dl),_r("arc",mc);var Gr=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:go,CACHED_LABEL_STYLE_PROPERTIES:w0,extendShape:Ge,extendPath:bD,registerShape:_r,getShapeClass:_c,makePath:po,makeImage:C0,mergePath:He,resizePath:I0,subPixelOptimizeLine:SD,subPixelOptimizeRect:AD,subPixelOptimize:El,setElementHoverStyle:yo,setHoverStyle:St,setAsHighDownDispatcher:Ka,isHighDownDispatcher:Rl,getHighlightDigit:k0,setLabelStyle:Te,modifyLabelStyle:bc,setTextStyle:Rt,setText:PD,getFont:Sc,updateProps:tt,initProps:oe,getTransform:Qa,applyTransform:xr,transformDirection:Ac,groupTransition:Ol,clipPointsByRect:B0,clipRectByRect:RD,createIcon:xo,linePolygonIntersect:wo,lineLineIntersect:V0,Group:G,Image:Qt,Text:nt,Circle:mr,Sector:ir,Ring:Cl,Polygon:Se,Polyline:Ve,Rect:ft,Line:ee,BezierCurve:Dl,Arc:mc,IncrementalDisplayable:Ae,CompoundPath:x0,LinearGradient:qa,RadialGradient:Il,BoundingRect:it}),ND=["textStyle","color"],OD={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(ND):null)},getFont:function(){return Sc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return cr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},zD=qi([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),BD={getItemStyle:function(t,e){var r=zD(this,t,e),a=this.getBorderLineDash();return a&&(r.lineDash=a),r},getBorderLineDash:function(){var t=this.get("borderType");return t==="solid"||t==null?null:t==="dashed"?[5,5]:[1,1]}},zl=pt,G0=de();function ht(t,e,r){this.parentModel=e,this.ecModel=r,this.option=t}ht.prototype={constructor:ht,init:null,mergeOption:function(t){J(this.option,t,!0)},get:function(t,e){return t==null?this.option:H0(this.option,this.parsePath(t),!e&&Cc(this,t))},getShallow:function(t,e){var r=this.option,a=r==null?r:r[t],i=!e&&Cc(this,t);return a==null&&i&&(a=i.getShallow(t)),a},getModel:function(t,e){var r=t==null?this.option:H0(this.option,t=this.parsePath(t)),a;return e=e||(a=Cc(this,t))&&a.getModel(t),new ht(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(Y(this.option))},setReadOnly:function(t){},parsePath:function(t){return typeof t=="string"&&(t=t.split(".")),t},customizeGetParent:function(t){G0(this).getParent=t},isAnimationEnabled:function(){if(!at.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}};function H0(t,e,r){for(var a=0;a=0&&s.push(l)}),s}}var F0=1e-4;function FD(t){return t.replace(/^\s+|\s+$/g,"")}function At(t,e,r,a){var i=e[1]-e[0],n=r[1]-r[0];if(i===0)return n===0?r[0]:(r[0]+r[1])/2;if(a)if(i>0){if(t<=e[0])return r[0];if(t>=e[1])return r[1]}else{if(t>=e[0])return r[0];if(t<=e[1])return r[1]}else{if(t===e[0])return r[0];if(t===e[1])return r[1]}return(t-e[0])/i*n+r[0]}function R(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return typeof t=="string"?FD(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function Ft(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t}function Ja(t){return t.sort(function(e,r){return e-r}),t}function W0(t){if(t=+t,isNaN(t))return 0;for(var e=1,r=0;Math.round(t*e)/e!==t;)e*=10,r++;return r}function Bl(t){var e=t.toString(),r=e.indexOf("e");if(r>0){var a=+e.slice(r+1);return a<0?-a:0}else{var i=e.indexOf(".");return i<0?0:e.length-1-i}}function Dc(t,e){var r=Math.log,a=Math.LN10,i=Math.floor(r(t[1]-t[0])/a),n=Math.round(r(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-i+n,0),20);return isFinite(o)?o:20}function U0(t,e,r){if(!t[e])return 0;var a=ki(t,function(d,g){return d+(isNaN(g)?0:g)},0);if(a===0)return 0;for(var i=Math.pow(10,r),n=E(t,function(d){return(isNaN(d)?0:d)/a*i*100}),o=i*100,s=E(n,function(d){return Math.floor(d)}),l=ki(s,function(d,g){return d+g},0),u=E(n,function(d,g){return d-s[g]});lh&&(h=u[c],f=c);++s[f],u[f]=0,++l}return s[e]/i}var Ic=9007199254740991;function Mc(t){var e=Math.PI*2;return(t%e+e)%e}function So(t){return t>-F0&&t=10&&e++,e}function Pc(t,e){var r=Lc(t),a=Math.pow(10,r),i=t/a,n;return e?i<1.5?n=1:i<2.5?n=2:i<4?n=3:i<7?n=5:n=10:i<1?n=1:i<2?n=2:i<3?n=3:i<5?n=5:n=10,t=n*a,r>=-20?+t.toFixed(r<0?-r:0):t}function UD(t,e){var r=(t.length-1)*e+1,a=Math.floor(r),i=+t[a-1],n=r-a;return n?i+n*(t[a]-i):i}function Ec(t){t.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,r=1,a=0;a=0}var $D=(Object.freeze||Object)({linearMap:At,parsePercent:R,round:Ft,asc:Ja,getPrecision:W0,getPrecisionSafe:Bl,getPixelPrecision:Dc,getPercentWithPrecision:U0,MAX_SAFE_INTEGER:Ic,remRadian:Mc,isRadianAroundZero:So,parseDate:Ao,quantity:$0,quantityExponent:Lc,nice:Pc,quantile:UD,reformIntervals:Ec,isNumeric:Z0});function da(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Y0(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(r,a){return a.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var ja=Bh,ZD=/([&<>"'])/g,YD={"&":"&","<":"<",">":">",'"':""","'":"'"};function Tt(t){return t==null?"":(t+"").replace(ZD,function(e,r){return YD[r]})}var X0=["a","b","c","d","e","f","g"],Rc=function(t,e){return"{"+t+(e??"")+"}"};function kc(t,e,r){P(e)||(e=[e]);var a=e.length;if(!a)return"";for(var i=e[0].$vars||[],n=0;n':'':{renderMode:n,content:"{marker"+o+"|} ",style:{color:r}}:""}function en(t,e){return t+="","0000".substr(0,e-t.length)+t}function Nc(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd yyyy`);var a=Ao(e),i=r?"UTC":"",n=a["get"+i+"FullYear"](),o=a["get"+i+"Month"]()+1,s=a["get"+i+"Date"](),l=a["get"+i+"Hours"](),u=a["get"+i+"Minutes"](),h=a["get"+i+"Seconds"](),f=a["get"+i+"Milliseconds"]();return t=t.replace("MM",en(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",en(s,2)).replace("d",s).replace("hh",en(l,2)).replace("h",l).replace("mm",en(u,2)).replace("m",u).replace("ss",en(h,2)).replace("s",h).replace("SSS",en(f,3)),t}function Gl(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var K0=Mf;function XD(t){return cr(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function qD(t,e,r,a,i,n,o,s){return cr(t,e,r,a,i,s,n,o)}function To(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location=t}else window.open(t,e)}var KD=(Object.freeze||Object)({addCommas:da,toCamelCase:Y0,normalizeCssArray:ja,encodeHTML:Tt,formatTpl:kc,formatTplSimple:q0,getTooltipMarker:Vl,formatTime:Nc,capitalFirst:Gl,truncateText:K0,getTextBoundingRect:XD,getTextRect:qD,windowOpen:To}),Hl=T,Q0=["left","right","top","bottom","width","height"],ti=[["width","left","right"],["height","top","bottom"]];function Oc(t,e,r,a,i){var n=0,o=0;a==null&&(a=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var h=l.position,f=l.getBoundingRect(),c=e.childAt(u+1),v=c&&c.getBoundingRect(),d,g;if(t==="horizontal"){var p=f.width+(v?-v.x+f.x:0);d=n+p,d>a||l.newline?(n=0,d=p,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(v?-v.y+f.y:0);g=o+m,g>i||l.newline?(n+=s+r,o=0,g=m,s=f.width):s=Math.max(s,f.width)}l.newline||(h[0]=n,h[1]=o,t==="horizontal"?n=d+r:o=g+r)})}var ei=Oc,KB=K(Oc,"vertical"),QB=K(Oc,"horizontal");function QD(t,e,r){var a=e.width,i=e.height,n=R(t.x,a),o=R(t.y,i),s=R(t.x2,a),l=R(t.y2,i);return(isNaN(n)||isNaN(parseFloat(t.x)))&&(n=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=a),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=i),r=ja(r||0),{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function Ot(t,e,r){r=ja(r||0);var a=e.width,i=e.height,n=R(t.left,a),o=R(t.top,i),s=R(t.right,a),l=R(t.bottom,i),u=R(t.width,a),h=R(t.height,i),f=r[2]+r[0],c=r[1]+r[3],v=t.aspect;switch(isNaN(u)&&(u=a-s-c-n),isNaN(h)&&(h=i-l-f-o),v!=null&&(isNaN(u)&&isNaN(h)&&(v>a/i?u=a*.8:h=i*.8),isNaN(u)&&(u=v*h),isNaN(h)&&(h=u/v)),isNaN(n)&&(n=a-s-u-c),isNaN(o)&&(o=i-l-h-f),t.left||t.right){case"center":n=a/2-u/2-r[3];break;case"right":n=a-u-c;break}switch(t.top||t.bottom){case"middle":case"center":o=i/2-h/2-r[0];break;case"bottom":o=i-h-f;break}n=n||0,o=o||0,isNaN(u)&&(u=a-c-n-(s||0)),isNaN(h)&&(h=i-f-o-(l||0));var d=new it(n+r[3],o+r[0],u,h);return d.margin=r,d}function Fl(t,e,r,a,i){var n=!i||!i.hv||i.hv[0],o=!i||!i.hv||i.hv[1],s=i&&i.boundingMode||"all";if(!(!n&&!o)){var l;if(s==="raw")l=t.type==="group"?new it(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();l=l.clone(),l.applyTransform(u)}e=Ot(U({width:l.width,height:l.height},e),r,a);var h=t.position,f=n?e.x-l.x:0,c=o?e.y-l.y:0;t.attr("position",s==="raw"?[f,c]:[h[0]+f,h[1]+c])}}function JD(t,e){return t[ti[e][0]]!=null||t[ti[e][1]]!=null&&t[ti[e][2]]!=null}function ga(t,e,r){!Q(r)&&(r={});var a=r.ignoreSize;!P(a)&&(a=[a,a]);var i=o(ti[0],0),n=o(ti[1],1);u(ti[0],t,i),u(ti[1],t,n);function o(h,f){var c={},v=0,d={},g=0,p=2;if(Hl(h,function(_){d[_]=t[_]}),Hl(h,function(_){s(e,_)&&(c[_]=d[_]=e[_]),l(c,_)&&v++,l(d,_)&&g++}),a[f])return l(e,h[1])?d[h[2]]=null:l(e,h[2])&&(d[h[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var m=0;m=0;n--)i=J(i,e[n],!0);t.defaultOption=i}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});gl(ct,{registerWhenExtend:!0}),GD(ct),HD(ct,eI);function eI(t){var e=[];return T(ct.getClassesByMainType(t),function(r){e=e.concat(r.prototype.dependencies||[])}),e=E(e,function(r){return oa(r).main}),t!=="dataset"&&ut(e,"dataset")<=0&&e.unshift("dataset"),e}pt(ct,jD);var j0="";typeof navigator<"u"&&(j0=navigator.platform||"");var rI={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:j0.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},zc=de();function aI(t,e){for(var r=t.length,a=0;ae)return t[a];return t[r-1]}var Bc={clearColorPalette:function(){zc(this).colorIdx=0,zc(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var a=zc(e),i=a.colorIdx||0,n=a.colorNameMap=a.colorNameMap||{};if(n.hasOwnProperty(t))return n[t];var o=te(this.get("color",!0)),s=this.get("colorLayer",!0),l=r==null||!s?o:aI(s,r);if(l=l||o,!(!l||!l.length)){var u=l[i];return t&&(n[t]=u),a.colorIdx=(i+1)%l.length,u}}},ri="original",Co="arrayRows",Do="objectRows",Io="keyedColumns",ty="unknown",Mo="typedArray",ey="column",Vc="row";function nr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Io?{}:[]),this.sourceFormat=t.sourceFormat||ty,this.seriesLayoutBy=t.seriesLayoutBy||ey,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&j(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}nr.seriesDataToSource=function(t){return new nr({data:t,sourceFormat:Ke(t)?Mo:ri,fromDataset:!1})},dl(nr);var se={Must:1,Might:2,Not:3},an=de();function iI(t){var e=t.option.source,r=ty;if(Ke(e))r=Mo;else if(P(e)){e.length===0&&(r=Co);for(var a=0,i=e.length;a=0;a--)fl(e[a])&&e.splice(a,1);t[r]=e}}),delete t[Fc],t},getTheme:function(){return this._theme},getComponent:function(t,e){var r=this._componentsMap.get(t);if(r)return r[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var r=t.index,a=t.id,i=t.name,n=this._componentsMap.get(e);if(!n||!n.length)return[];var o;if(r!=null)P(r)||(r=[r]),o=Ht(E(r,function(u){return n[u]}),function(u){return!!u});else if(a!=null){var s=P(a);o=Ht(n,function(u){return s&&ut(a,u.id)>=0||!s&&u.id===a})}else if(i!=null){var l=P(i);o=Ht(n,function(u){return l&&ut(i,u.name)>=0||!l&&u.name===i})}else o=n.slice();return sy(o,t)},findComponents:function(t){var e=t.query,r=t.mainType,a=n(e),i=a?this.queryComponents(a):this._componentsMap.get(r);return o(sy(i,t));function n(s){var l=r+"Index",u=r+"Id",h=r+"Name";return s&&(s[l]!=null||s[u]!=null||s[h]!=null)?{mainType:r,index:s[l],id:s[u],name:s[h]}:null}function o(s){return t.filter?Ht(s,t.filter):s}},eachComponent:function(t,e,r){var a=this._componentsMap;if(typeof t=="function")r=e,e=t,a.each(function(n,o){T(n,function(s,l){e.call(r,o,s,l)})});else if(_t(t))T(a.get(t),e,r);else if(Q(t)){var i=this.findComponents(t);T(i,e,r)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Ht(e,function(r){return r.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return Ht(e,function(r){return r.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){Wl(this),T(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(e,a,r)},this)},eachRawSeries:function(t,e){T(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,r){Wl(this),T(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];i.subType===t&&e.call(r,i,a)},this)},eachRawSeriesByType:function(t,e,r){return T(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){return Wl(this),this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Wl(this);var r=Ht(this._componentsMap.get("series"),t,e);Uc(this,r)},restoreData:function(t){var e=this._componentsMap;Uc(this,e.get("series"));var r=[];e.each(function(a,i){r.push(i)}),ct.topologicalTravel(r,ct.getAllClassMainTypes(),function(a,i){T(e.get(a),function(n){(a!=="series"||!hI(n,t))&&n.restoreData()})})}});function hI(t,e){if(e){var r=e.seiresIndex,a=e.seriesId,i=e.seriesName;return r!=null&&t.componentIndex!==r||a!=null&&t.id!==a||i!=null&&t.name!==i}}function fI(t,e){var r=t.color&&!t.colorLayer;T(e,function(a,i){i==="colorLayer"&&r||ct.hasClass(i)||(typeof a=="object"?t[i]=t[i]?J(t[i],a,!1):Y(a):t[i]==null&&(t[i]=a))})}function cI(t){t=t,this.option={},this.option[Fc]=1,this._componentsMap=j({series:[]}),this._seriesIndices,this._seriesIndicesMap,fI(t,this._theme.option),J(t,rI,!1),this.mergeOption(t)}function vI(t,e){P(e)||(e=e?[e]:[]);var r={};return T(e,function(a){r[a]=(t.get(a)||[]).slice()}),r}function dI(t,e,r){var a=e.type?e.type:r?r.subType:ct.determineSubType(t,e);return a}function Uc(t,e){t._seriesIndicesMap=j(t._seriesIndices=E(e,function(r){return r.componentIndex})||[])}function sy(t,e){return e.hasOwnProperty("subType")?Ht(t,function(r){return r.subType===e.subType}):t}function Wl(t){if(z&&!t._seriesIndices)throw new Error("Option should contains series.")}pt(Wc,Bc);var gI=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function ly(t){T(gI,function(e){this[e]=X(t[e],t)},this)}var $c={};function re(){this._coordinateSystems=[]}re.prototype={constructor:re,create:function(t,e){var r=[];T($c,function(a,i){var n=a.create(t,e);r=r.concat(n||[])}),this._coordinateSystems=r},update:function(t,e){T(this._coordinateSystems,function(r){r.update&&r.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},re.register=function(t,e){$c[t]=e},re.get=function(t){return $c[t]};var Ul=T,ai=Y,$l=E,uy=J,pI=/^(min|max)?(.+)$/;function Zc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}Zc.prototype={constructor:Zc,setOption:function(t,e){t&&T(te(t.series),function(i){i&&i.data&&Ke(i.data)&&Vh(i.data)}),t=ai(t);var r=this._optionBackup,a=mI.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(wI(r.baseOption,a.baseOption),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=$l(e.timelineOptions,ai),this._mediaList=$l(e.mediaList,ai),this._mediaDefault=ai(e.mediaDefault),this._currentMediaIndices=[],ai(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,r=this._timelineOptions;if(r.length){var a=t.getComponent("timeline");a&&(e=ai(r[a.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,n=[],o=[];if(!a.length&&!i)return o;for(var s=0,l=a.length;s=e:r==="max"?t<=e:t===e}function xI(t,e){return t.join(",")===e.join(",")}function wI(t,e){e=e||{},Ul(e,function(r,a){if(r!=null){var i=t[a];if(!ct.hasClass(a))t[a]=uy(i,r,!0);else{r=te(r),i=te(i);var n=ic(i,r);t[a]=$l(n,function(o){return o.option&&o.exist?uy(o.exist,o.option,!0):o.exist||o.option})}}})}var or=T,Lo=Q,hy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Yc(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,a=hy.length;r=0;p--){var m=t[p];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(c>=0&&y>0||c<=0&&y<0){c+=y,g=y;break}}}return a[0]=c,a[1]=g,a});o.hostModel.setData(l),e.data=l})}function dy(t,e){nr.isInstance(t)||(t=nr.seriesDataToSource(t)),this._source=t;var r=this._data=t.data,a=t.sourceFormat;if(a===Mo){if(z&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=r}var i=LI[a===Co?a+"_"+t.seriesLayoutBy:a];z&&ot(i,"Invalide sourceFormat: "+a),Z(this,i)}var Xc=dy.prototype;Xc.pure=!1,Xc.persistent=!0,Xc.getSource=function(){return this._source};var LI={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:qc},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],r=this._data,a=0;a=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=RI(this,r)),this._modBy=s,this._modDataCount=l;var f=t&&t.step;if(e?(z&&ot(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(z&&ot(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var c=this._dueIndex,v=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!r&&(h||c=this._outputDueEnd),this._outputDueEnd=p}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var wy=function(){var t,e,r,a,i,n={reset:function(l,u,h,f){e=l,t=u,r=h,a=f,i=Math.ceil(a/r),n.next=r>1&&a>0?s:o}};return n;function o(){return e=t?null:l":` `,o=a==="richText",s={},l=0;function u(C){var D=ki(C,function(k,O,V){var H=f.getDimensionInfo(V);return k|=H&&H.tooltip!==!1&&H.displayName!=null},0),I=[];c.length?T(c,function(k){L(ii(f,t,k),k)}):T(C,L);function L(k,O){var V=f.getDimensionInfo(O);if(!(!V||V.otherDims.tooltip===!1)){var H=V.type,W="sub"+i.seriesIndex+"at"+l,F=Vl({color:p,type:"subItem",renderMode:a,markerId:W}),N=typeof F=="string"?F:F.content,$=(D?N+Tt(V.displayName||"-")+": ":"")+Tt(H==="ordinal"?k+"":H==="time"?e?"":Nc("yyyy/MM/dd hh:mm:ss",k):da(k));$&&I.push($),o&&(s[W]=p,++l)}}var M=D?o?` `:"
":"",B=M+I.join(M||", ");return{renderMode:a,content:B,style:s}}function h(C){return{renderMode:a,content:Tt(da(C)),style:s}}var f=this.getData(),c=f.mapDimension("defaultedTooltip",!0),v=c.length,d=this.getRawValue(t),g=P(d),p=f.getItemVisual(t,"color");Q(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var m=v>1||g&&!v?u(d):h(v?ii(f,t,c[0]):g?d[0]:d),y=m.content,_=i.seriesIndex+"at"+l,x=Vl({color:p,type:"item",renderMode:a,markerId:_});s[_]=p,++l;var w=f.getName(t),S=this.name;nc(this)||(S=""),S=S?Tt(S)+(e?": ":n):"";var b=typeof x=="string"?x:x.content,A=e?b+S+y:S+b+(w?Tt(w)+": "+y:y);return{html:A,markers:s}},isAnimationEnabled:function(){if(at.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,r){var a=this.ecModel,i=Bc.getColorFromPalette.call(this,t,e,r);return i||(i=a.getColorFromPalette(t,e,r)),i},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});pt(Dt,Jc),pt(Dt,Bc);function Sy(t){var e=t.name;nc(t)||(t.name=kI(t)||e)}function kI(t){var e=t.getRawData(),r=e.mapDimension("seriesName",!0),a=[];return T(r,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function NI(t){return t.model.getRawData().count()}function OI(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),zI}function zI(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ay(t,e){T(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,K(BI,e))})}function BI(t){var e=jc(t);e&&e.setOutputEnd(this.count())}function jc(t){var e=(t.ecModel||{}).scheduler,r=e&&e.getPipeline(t.uid);if(r){var a=r.currentTask;if(a){var i=a.agentStubMap;i&&(a=i.get(t.uid))}return a}}var wr=function(){this.group=new G,this.uid=bo("viewComponent")};wr.prototype={constructor:wr,init:function(t,e){},render:function(t,e,r,a){},dispose:function(){},filterForExposedEvent:null};var tv=wr.prototype;tv.updateView=tv.updateLayout=tv.updateVisual=function(t,e,r,a){},lo(wr),gl(wr,{registerWhenExtend:!0});var nn=function(){var t=de();return function(e){var r=t(e),a=e.pipelineContext,i=r.large,n=r.progressiveRender,o=r.large=a&&a.large,s=r.progressiveRender=a&&a.progressiveRender;return!!(i^o||n^s)&&"reset"}},Ty=de(),VI=nn();function Yt(){this.group=new G,this.uid=bo("viewChart"),this.renderTask=Eo({plan:GI,reset:HI}),this.renderTask.context={view:this}}Yt.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,a){},highlight:function(t,e,r,a){Cy(t.getData(),a,"emphasis")},downplay:function(t,e,r,a){Cy(t.getData(),a,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var ev=Yt.prototype;ev.updateView=ev.updateLayout=ev.updateVisual=function(t,e,r,a){this.render(t,e,r,a)};function rv(t,e,r){if(t&&(t.trigger(e,r),t.isGroup&&!Rl(t)))for(var a=0,i=t.childCount();a=0?f():o=setTimeout(f,-s),i=a};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){h=v},c}function ko(t,e,r,a){var i=t[e];if(!!i){var n=i[Zl]||i,o=i[Iy],s=i[Dy];if(s!==r||o!==a){if(r==null||!a)return t[e]=n;i=t[e]=Yl(n,r,a==="debounce"),i[Zl]=n,i[Iy]=a,i[Dy]=r}return i}}function My(t,e){var r=t[e];r&&r[Zl]&&(t[e]=r[Zl])}var WI={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var r=t.getData(),a=(t.visualColorAccessPath||"itemStyle.color").split("."),i=t.get(a),n=$t(i)&&!(i instanceof yr)?i:null;(!i||n)&&(i=t.getColorFromPalette(t.name,null,e.getSeriesCount())),r.setVisual("color",i);var o=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(o);if(r.setVisual("borderColor",s),!e.isSeriesFiltered(t)){n&&r.each(function(u){r.setItemVisual(u,"color",n(t.getDataParams(u)))});var l=function(u,h){var f=u.getItemModel(h),c=f.get(a,!0),v=f.get(o,!0);c!=null&&u.setItemVisual(h,"color",c),v!=null&&u.setItemVisual(h,"borderColor",v)};return{dataEach:r.hasItemOption?l:null}}}},Fr={legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}},UI=function(t,e){var r=e.getModel("aria");if(r.get("show")){if(r.get("description")){t.setAttribute("aria-label",r.get("description"));return}}else return;var a=0;e.eachSeries(function(g,p){++a},this);var i=r.get("data.maxCount")||10,n=r.get("series.maxCount")||10,o=Math.min(a,n),s;if(a<1)return;var l=v();l?s=f(c("general.withTitle"),{title:l}):s=c("general.withoutTitle");var u=[],h=a>1?"series.multiple.prefix":"series.single.prefix";s+=f(c(h),{seriesCount:a}),e.eachSeries(function(g,p){if(p1?"multiple":"single")+".";m=c(y?_+"withName":_+"withoutName"),m=f(m,{seriesId:g.seriesIndex,seriesName:g.get("name"),seriesType:d(g.subType)});var x=g.getData();window.data=x,x.count()>i?m+=f(c("data.partialData"),{displayCnt:i}):m+=c("data.allData");for(var w=[],S=0;Sr.blockIndex,n=i?r.step:null,o=a&&a.modDataCount,s=o!=null?Math.ceil(o/n):null;return{step:n,modBy:s,modDataCount:o}}},We.getPipeline=function(t){return this._pipelineMap.get(t)},We.updateStreamModes=function(t,e){var r=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),n=r.progressiveEnabled&&e.incrementalPrepareRender&&i>=r.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=r.context={progressiveRender:n,modDataCount:s,large:o}},We.restorePipelines=function(t){var e=this,r=e._pipelineMap=j();t.eachSeries(function(a){var i=a.getProgressive(),n=a.uid;r.set(n,{id:n,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),Kl(e,a,a.dataTask)})},We.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),r=this.api;T(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,[]);a.reset&&ZI(this,a,i,e,r),a.overallReset&&YI(this,a,i,e,r)},this)},We.prepareView=function(t,e,r,a){var i=t.renderTask,n=i.context;n.model=e,n.ecModel=r,n.api=a,i.__block=!t.incrementalPrepareRender,Kl(this,e,i)},We.performDataProcessorTasks=function(t,e){Ly(this,this._dataProcessorHandlers,t,e,{block:!0})},We.performVisualTasks=function(t,e,r){Ly(this,this._visualHandlers,t,e,r)};function Ly(t,e,r,a,i){i=i||{};var n;T(e,function(s,l){if(!(i.visualType&&i.visualType!==s.visualType)){var u=t._stageTaskMap.get(s.uid),h=u.seriesTaskMap,f=u.overallTask;if(f){var c,v=f.agentStubMap;v.each(function(g){o(i,g)&&(g.dirty(),c=!0)}),c&&f.dirty(),Py(f,a);var d=t.getPerformArgs(f,i.block);v.each(function(g){g.perform(d)}),n|=f.perform(d)}else h&&h.each(function(g,p){o(i,g)&&g.dirty();var m=t.getPerformArgs(g,i.block);m.skip=!s.performRawSeries&&r.isSeriesFiltered(g.context.model),Py(g,a),n|=g.perform(m)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}t.unfinished|=n}We.performSeriesTasks=function(t){var e;t.eachSeries(function(r){e|=r.dataTask.perform()}),this.unfinished|=e},We.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)})};var Py=We.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function ZI(t,e,r,a,i){var n=r.seriesTaskMap||(r.seriesTaskMap=j()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(l):o?a.eachRawSeriesByType(o,l):s&&s(a,i).each(l);function l(h){var f=h.uid,c=n.get(f)||n.set(f,Eo({plan:JI,reset:jI,count:eM}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Kl(t,h,c)}var u=t._pipelineMap;n.each(function(h,f){u.get(f)||(h.dispose(),n.removeKey(f))})}function YI(t,e,r,a,i){var n=r.overallTask=r.overallTask||Eo({reset:XI});n.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:t};var o=n.agentStubMap=n.agentStubMap||j(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?a.eachRawSeriesByType(s,f):l?l(a,i).each(f):(u=!1,T(a.getSeries(),f));function f(v){var d=v.uid,g=o.get(d);g||(g=o.set(d,Eo({reset:qI,onDirty:QI})),n.dirty()),g.context={model:v,overallProgress:u,modifyOutputEnd:h},g.agent=n,g.__block=u,Kl(t,v,g)}var c=t._pipelineMap;o.each(function(v,d){c.get(d)||(v.dispose(),n.dirty(),o.removeKey(d))})}function XI(t){t.overallReset(t.ecModel,t.api,t.payload)}function qI(t,e){return t.overallProgress&&KI}function KI(){this.agent.dirty(),this.getDownstream().dirty()}function QI(){this.agent&&this.agent.dirty()}function JI(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function jI(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=te(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?E(e,function(r,a){return Ey(a)}):tM}var tM=Ey(0);function Ey(t){return function(e,r){var a=r.data,i=r.resetDefines[t];if(i&&i.dataEach)for(var n=e.start;n=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&n!=null&&o!=null&&(u=Hy(l,n,o),!e.ignoreViewBox)){var f=a;a=new G,a.add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return!e.ignoreRootClip&&n!=null&&o!=null&&a.setClipPath(new ft({shape:{x:0,y:0,width:n,height:o}})),{root:a,width:n,height:o,viewBoxRect:l,viewBoxTransform:u}},jl.prototype._parseNode=function(t,e){var r=t.nodeName.toLowerCase();r==="defs"?this._isDefine=!0:r==="text"&&(this._isText=!0);var a;if(this._isDefine){var i=oM[r];if(i){var n=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=n)}}else{var i=nM[r];i&&(a=i.call(this,t,e),e.add(a))}for(var s=t.firstChild;s;)s.nodeType===1&&this._parseNode(s,a),s.nodeType===3&&this._isText&&this._parseText(s,a),s=s.nextSibling;r==="defs"?this._isDefine=!1:r==="text"&&(this._isText=!1)},jl.prototype._parseText=function(t,e){if(t.nodeType===1){var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX+=parseFloat(r),this._textY+=parseFloat(a)}var i=new nt({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Ue(e,i),Ce(t,i,this._defs);var n=i.style.fontSize;n&&n<9&&(i.style.fontSize=9,i.scale=i.scale||[1,1],i.scale[0]*=n/9,i.scale[1]*=n/9);var o=i.getBoundingRect();return this._textX+=o.width,e.add(i),i};var nM={g:function(t,e){var r=new G;return Ue(e,r),Ce(t,r,this._defs),r},rect:function(t,e){var r=new ft;return Ue(e,r),Ce(t,r,this._defs),r.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)}),r},circle:function(t,e){var r=new mr;return Ue(e,r),Ce(t,r,this._defs),r.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),r},line:function(t,e){var r=new ee;return Ue(e,r),Ce(t,r,this._defs),r.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)}),r},ellipse:function(t,e){var r=new iM;return Ue(e,r),Ce(t,r,this._defs),r.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)}),r},polygon:function(t,e){var r=t.getAttribute("points");r&&(r=By(r));var a=new Se({shape:{points:r||[]}});return Ue(e,a),Ce(t,a,this._defs),a},polyline:function(t,e){var r=new st;Ue(e,r),Ce(t,r,this._defs);var a=t.getAttribute("points");a&&(a=By(a));var i=new Ve({shape:{points:a||[]}});return i},image:function(t,e){var r=new Qt;return Ue(e,r),Ce(t,r,this._defs),r.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),r},text:function(t,e){var r=t.getAttribute("x")||0,a=t.getAttribute("y")||0,i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX=parseFloat(r)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(n);var o=new G;return Ue(e,o),Ce(t,o,this._defs),o},tspan:function(t,e){var r=t.getAttribute("x"),a=t.getAttribute("y");r!=null&&(this._textX=parseFloat(r)),a!=null&&(this._textY=parseFloat(a));var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0,o=new G;return Ue(e,o),Ce(t,o,this._defs),this._textX+=i,this._textY+=n,o},path:function(t,e){var r=t.getAttribute("d")||"",a=d0(r);return Ue(e,a),Ce(t,a,this._defs),a}},oM={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),r=parseInt(t.getAttribute("y1")||0,10),a=parseInt(t.getAttribute("x2")||10,10),i=parseInt(t.getAttribute("y2")||0,10),n=new qa(e,r,a,i);return sM(t,n),n},radialgradient:function(t){}};function sM(t,e){for(var r=t.firstChild;r;){if(r.nodeType===1){var a=r.getAttribute("offset");a.indexOf("%")>0?a=parseInt(a,10)/100:a?a=parseFloat(a):a=0;var i=r.getAttribute("stop-color")||"#000000";e.addColorStop(a,i)}r=r.nextSibling}}function Ue(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),U(e.__inheritedStyle,t.__inheritedStyle))}function By(t){for(var e=Ne(t).split(ma),r=[],a=0;a0;n-=2){var o=i[n],s=i[n-1];switch(a=a||ce(),s){case"translate":o=Ne(o).split(ma),Je(a,a,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Ne(o).split(ma),jn(a,a,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Ne(o).split(ma),Or(a,a,parseFloat(o[0]));break;case"skew":o=Ne(o).split(ma),console.warn("Skew transform is not supported yet");break;case"matrix":var o=Ne(o).split(ma);a[0]=parseFloat(o[0]),a[1]=parseFloat(o[1]),a[2]=parseFloat(o[2]),a[3]=parseFloat(o[3]),a[4]=parseFloat(o[4]),a[5]=parseFloat(o[5]);break}}e.setLocalTransform(a)}}var Gy=/([^\s:;]+)\s*:\s*([^:;]+)/g;function fM(t){var e=t.getAttribute("style"),r={};if(!e)return r;var a={};Gy.lastIndex=0;for(var i;(i=Gy.exec(e))!=null;)a[i[1]]=i[2];for(var n in on)on.hasOwnProperty(n)&&a[n]!=null&&(r[on[n]]=a[n]);return r}function Hy(t,e,r){var a=e/t.width,i=r/t.height,n=Math.min(a,i),o=[n,n],s=[-(t.x+t.width/2)*n+e/2,-(t.y+t.height/2)*n+r/2];return{scale:o,position:s}}function cM(t,e){var r=new jl;return r.parse(t,e)}var Fy=j(),tu={registerMap:function(t,e,r){var a;return P(e)?a=e:e.svg?a=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(r=e.specialAreas,e=e.geoJson),a=[{type:"geoJSON",source:e,specialAreas:r}]),T(a,function(i){var n=i.type;n==="geoJson"&&(n=i.type="geoJSON");var o=vM[n];z&&ot(o,"Illegal map type: "+n),o(i)}),Fy.set(t,a)},retrieveMap:function(t){return Fy.get(t)}},vM={geoJSON:function(t){var e=t.source;t.geoJSON=_t(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=zy(t.source)}},sn=ot,Wt=T,dM=$t,Oo=Q,iv=ct.parseClassType,Wy="4.8.0",nv={zrender:"4.3.1"},gM=1,Uy=1e3,pM=800,mM=900,yM=5e3,$y=1e3,_M=1100,Zy=2e3,Yy=3e3,xM=3500,wM=4e3,bM=5e3,br={PROCESSOR:{FILTER:Uy,SERIES_FILTER:pM,STATISTIC:yM},VISUAL:{LAYOUT:$y,PROGRESSIVE_LAYOUT:_M,GLOBAL:Zy,CHART:Yy,POST_CHART_LAYOUT:xM,COMPONENT:wM,BRUSH:bM}},$e="__flagInMainProcess",ya="__optionUpdated",Xy=/^[a-zA-Z0-9_]+$/;function ln(t,e){return function(r,a,i){if(!e&&this._disposed){De(this.id);return}r=r&&r.toLowerCase(),Zt.prototype[t].call(this,r,a,i)}}function zo(){Zt.call(this)}zo.prototype.on=ln("on",!0),zo.prototype.off=ln("off",!0),zo.prototype.one=ln("one",!0),pt(zo,Zt);function Bo(t,n,r){r=r||{},typeof n=="string"&&(n=i_[n]),this.id,this.group,this._dom=t;var a="canvas";z&&(a=(typeof window>"u"?global:window).__ECHARTS__DEFAULT__RENDERER__||a);var i=this._zr=ec(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=Yl(X(i.flush,i),17);var n=Y(n);n&&vy(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new re;var o=this._api=IM(this);function s(l,u){return l.__prio-u.__prio}tl(nu,s),tl(hv,s),this._scheduler=new ql(this,o,hv,nu),Zt.call(this,this._ecEventProcessor=new uv),this._messageCenter=new zo,this._initEvents(),this.resize=X(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),SM(i,this),Vh(this)}var dt=Bo.prototype;dt._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[ya]){var e=this[ya].silent;this[$e]=!0,Vo(this),_a.update.call(this),this[$e]=!1,this[ya]=!1,eu.call(this,e),ru.call(this,e)}else if(t.unfinished){var r=gM,a=this._model,i=this._api;t.unfinished=!1;do{var n=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),Qy(this,a),t.performVisualTasks(a),sv(this,this._model,i,"remain"),r-=+new Date-n}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},dt.getDom=function(){return this._dom},dt.getZr=function(){return this._zr},dt.setOption=function(t,e,r){if(z&&sn(!this[$e],"`setOption` should not be called during main process."),this._disposed){De(this.id);return}var a;if(Oo(e)&&(r=e.lazyUpdate,a=e.silent,e=e.notMerge),this[$e]=!0,!this._model||e){var i=new Zc(this._api),n=this._theme,o=this._model=new Wc;o.scheduler=this._scheduler,o.init(null,null,n,i)}this._model.setOption(t,r_),r?(this[ya]={silent:a},this[$e]=!1):(Vo(this),_a.update.call(this),this._zr.flush(),this[ya]=!1,this[$e]=!1,eu.call(this,a),ru.call(this,a))},dt.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},dt.getModel=function(){return this._model},dt.getOption=function(){return this._model&&this._model.getOption()},dt.getWidth=function(){return this._zr.getWidth()},dt.getHeight=function(){return this._zr.getHeight()},dt.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},dt.getRenderedCanvas=function(t){if(!!at.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},dt.getSvgDataURL=function(){if(!!at.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return T(e,function(r){r.stopAnimation(!0)}),t.painter.toDataURL()}},dt.getDataURL=function(t){if(this._disposed){De(this.id);return}t=t||{};var e=t.excludeComponents,r=this._model,a=[],i=this;Wt(e,function(o){r.eachComponent({mainType:o},function(s){var l=i._componentsMap[s.__viewId];l.group.ignore||(a.push(l),l.group.ignore=!0)})});var n=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Wt(a,function(o){o.group.ignore=!1}),n},dt.getConnectedDataURL=function(t){if(this._disposed){De(this.id);return}if(!!at.canvasSupported){var e=t.type==="svg",r=this.group,a=Math.min,i=Math.max,n=1/0;if(ou[r]){var o=n,s=n,l=-n,u=-n,h=[],f=t&&t.pixelRatio||1;T(ni,function(m,y){if(m.group===r){var _=e?m.getZr().painter.getSvgDom().innerHTML:m.getRenderedCanvas(Y(t)),x=m.getDom().getBoundingClientRect();o=a(x.left,o),s=a(x.top,s),l=i(x.right,l),u=i(x.bottom,u),h.push({dom:_,left:x.left,top:x.top})}}),o*=f,s*=f,l*=f,u*=f;var c=l-o,v=u-s,d=Ri(),g=ec(d,{renderer:e?"svg":"canvas"});if(g.resize({width:c,height:v}),e){var p="";return Wt(h,function(m){var y=m.left-o,_=m.top-s;p+=''+m.dom+""}),g.painter.getSvgRoot().innerHTML=p,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return t.connectedBackgroundColor&&g.add(new ft({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),Wt(h,function(m){var y=new Qt({style:{x:m.left*f-o,y:m.top*f-s,image:m.dom}});g.add(y)}),g.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)}},dt.convertToPixel=K(qy,"convertToPixel"),dt.convertFromPixel=K(qy,"convertFromPixel");function qy(t,e,r){if(this._disposed){De(this.id);return}var a=this._model,i=this._coordSysMgr.getCoordinateSystems(),n;e=vl(a,e);for(var o=0;o=0&&T(i,function(o){var s=o.coordinateSystem;if(s&&s.containPoint)a|=!!s.containPoint(e);else if(n==="seriesModels"){var l=this._chartsMap[o.__viewId];l&&l.containPoint?a|=l.containPoint(e,o):z&&console.warn(n+": "+(l?"The found component do not support containPoint.":"No view mapping to the found component."))}else z&&console.warn(n+": containPoint is not supported")},this)},this),!!a},dt.getVisual=function(t,e){var r=this._model;t=vl(r,t,{defaultMainType:"series"});var a=t.seriesModel;z&&(a||console.warn("There is no specified seires model"));var i=a.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return n!=null?i.getItemVisual(n,e):i.getVisual(e)},dt.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},dt.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var _a={prepareAndUpdate:function(t){Vo(this),_a.update.call(this,t)},update:function(t){var e=this._model,r=this._api,a=this._zr,i=this._coordSysMgr,n=this._scheduler;if(!!e){n.restoreData(e,t),n.performSeriesTasks(e),i.create(e,r),n.performDataProcessorTasks(e,t),Qy(this,e),i.update(e,r),ov(e),n.performVisualTasks(e,t),t_(this,e,r,t);var o=e.get("backgroundColor")||"transparent";if(at.canvasSupported)a.setBackgroundColor(o);else{var s=be(o);o=zr(s,"rgb"),s[3]===0&&(o="transparent")}lv(e,r)}},updateTransform:function(t){var e=this._model,r=this,a=this._api;if(!!e){var i=[];e.eachComponent(function(o,s){var l=r.getViewOfComponentModel(s);if(l&&l.__alive)if(l.updateTransform){var u=l.updateTransform(s,e,a,t);u&&u.update&&i.push(l)}else i.push(l)});var n=j();e.eachSeries(function(o){var s=r._chartsMap[o.__viewId];if(s.updateTransform){var l=s.updateTransform(o,e,a,t);l&&l.update&&n.set(o.uid,1)}else n.set(o.uid,1)}),ov(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:n}),sv(r,e,a,t,n),lv(e,this._api)}},updateView:function(t){var e=this._model;!e||(Yt.markUpdateMethod(t,"updateView"),ov(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),t_(this,this._model,this._api,t),lv(e,this._api))},updateVisual:function(t){_a.update.call(this,t)},updateLayout:function(t){_a.update.call(this,t)}};function Vo(t){var e=t._model,r=t._scheduler;r.restorePipelines(e),r.prepareStageTasks(),jy(t,"component",e,r),jy(t,"chart",e,r),r.plan()}function Ky(t,e,r,a,i){var n=t._model;if(!a){Wt(t._componentsViews.concat(t._chartsViews),u);return}var o={};o[a+"Id"]=r[a+"Id"],o[a+"Index"]=r[a+"Index"],o[a+"Name"]=r[a+"Name"];var s={mainType:a,query:o};i&&(s.subType=i);var l=r.excludeSeriesId;l!=null&&(l=j(te(l))),n&&n.eachComponent(s,function(h){(!l||l.get(h.id)==null)&&u(t[a==="series"?"_chartsMap":"_componentsMap"][h.__viewId])},t);function u(h){h&&h.__alive&&h[e]&&h[e](h.__model,n,t._api,r)}}dt.resize=function(t){if(z&&sn(!this[$e],"`resize` should not be called during main process."),this._disposed){De(this.id);return}this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!e){var r=e.resetOption("media"),a=t&&t.silent;this[$e]=!0,r&&Vo(this),_a.update.call(this),this[$e]=!1,eu.call(this,a),ru.call(this,a)}};function Qy(t,e){var r=t._chartsMap,a=t._scheduler;e.eachSeries(function(i){a.updateStreamModes(i,r[i.__viewId])})}dt.showLoading=function(t,e){if(this._disposed){De(this.id);return}if(Oo(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!fv[t]){z&&console.warn("Loading effects "+t+" not exists.");return}var r=fv[t](this._api,e),a=this._zr;this._loadingFX=r,a.add(r)},dt.hideLoading=function(){if(this._disposed){De(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},dt.makeActionFromEvent=function(t){var e=Z({},t);return e.type=iu[t.type],e},dt.dispatchAction=function(t,e){if(this._disposed){De(this.id);return}if(Oo(e)||(e={silent:!!e}),!!au[t.type]&&!!this._model){if(this[$e]){this._pendingActions.push(t);return}Jy.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&at.browser.weChat&&this._throttledZrFlush(),eu.call(this,e.silent),ru.call(this,e.silent)}};function Jy(t,e){var r=t.type,a=t.escapeConnect,i=au[r],n=i.actionInfo,o=(n.update||"update").split(":"),s=o.pop();o=o[0]!=null&&iv(o[0]),this[$e]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=E(t.batch,function(v){return v=U(Z({},v),t),v.batch=null,v}));var h=[],f,c=r==="highlight"||r==="downplay";Wt(l,function(v){f=i.action(v,this._model,this._api),f=f||Z({},v),f.type=n.event||f.type,h.push(f),c?Ky(this,s,v,"series"):o&&Ky(this,s,v,o.main,o.sub)},this),s!=="none"&&!c&&!o&&(this[ya]?(Vo(this),_a.update.call(this,t),this[ya]=!1):_a[s].call(this,t)),u?f={type:n.event||r,escapeConnect:a,batch:h}:f=h[0],this[$e]=!1,!e&&this._messageCenter.trigger(f.type,f)}function eu(t){for(var e=this._pendingActions;e.length;){var r=e.shift();Jy.call(this,r,t)}}function ru(t){!t&&this.trigger("updated")}function SM(t,e){t.on("rendered",function(){e.trigger("rendered"),t.animation.isFinished()&&!e[ya]&&!e._scheduler.unfinished&&!e._pendingActions.length&&e.trigger("finished")})}dt.appendData=function(t){if(this._disposed){De(this.id);return}var e=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(e);z&&sn(t.data&&a),a.appendData(t),this._scheduler.unfinished=!0},dt.on=ln("on",!1),dt.off=ln("off",!1),dt.one=ln("one",!1);function jy(t,e,r,a){for(var i=e==="component",n=i?t._componentsViews:t._chartsViews,o=i?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;ue.get("hoverLayerThreshold")&&!at.node&&e.eachSeries(function(n){if(!n.preventUsingHoverLayer){var o=t._chartsMap[n.__viewId];o.__alive&&o.group.traverse(function(s){s.useHoverLayer=!0})}})}function DM(t,e){var r=t.get("blendMode")||null;z&&!at.canvasSupported&&r&&r!=="source-over"&&console.warn("Only canvas support blendMode"),e.group.traverse(function(a){a.isGroup||a.style.blend!==r&&a.setStyle("blend",r),a.eachPendingDisplayable&&a.eachPendingDisplayable(function(i){i.setStyle("blend",r)})})}function e_(t,e){var r=t.get("z"),a=t.get("zlevel");e.group.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),a!=null&&(i.zlevel=a))})}function IM(t){var e=t._coordSysMgr;return Z(new ly(t),{getCoordinateSystems:X(e.getCoordinateSystems,e),getComponentByElement:function(r){for(;r;){var a=r.__ecComponentInfo;if(a!=null)return t._model.getComponent(a.mainType,a.index);r=r.parent}}})}function uv(){this.eventInfo}uv.prototype={constructor:uv,normalizeQuery:function(t){var e={},r={},a={};if(_t(t)){var i=iv(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var n=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};T(t,function(s,l){for(var u=!1,h=0;h0&&c===l.length-f.length){var v=l.slice(0,c);v!=="data"&&(e.mainType=v,e[f.toLowerCase()]=s,u=!0)}}o.hasOwnProperty(l)&&(r[l]=s,u=!0),u||(a[l]=s)})}return{cptQuery:e,dataQuery:r,otherQuery:a}},filter:function(t,e,r){var a=this.eventInfo;if(!a)return!0;var i=a.targetEl,n=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,o,"mainType")&&h(l,o,"subType")&&h(l,o,"index","componentIndex")&&h(l,o,"name")&&h(l,o,"id")&&h(u,n,"name")&&h(u,n,"dataIndex")&&h(u,n,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,n));function h(f,c,v,d){return f[v]==null||c[d||v]===f[v]}},afterTrigger:function(){this.eventInfo=null}};var au={},iu={},hv=[],r_=[],a_=[],nu=[],i_={},fv={},ni={},ou={},MM=new Date-0,LM=new Date-0,cv="_echarts_instance_";function PM(t){var e=0,r=1,a=2,i="__connectUpdateStatus";function n(o,s){for(var l=0;l65535?YM:qM}function KM(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var QM=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],JM=["_extent","_approximateExtent","_rawExtent"];function h_(t,e){T(QM.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,T(JM,function(r){t[r]=Y(e[r])}),t._calculationInfo=Z(e._calculationInfo)}var qt=function(t,e){t=t||["x","y"];for(var r={},a=[],i={},n=0;n_[1]&&(_[1]=y)}e&&(this._nameList[v]=e[d])}this._rawCount=this._count=l,this._extent={},c_(this)},q._initDataFromProvider=function(t,e){if(!(t>=e)){for(var r=this._chunkSize,a=this._rawData,i=this._storage,n=this.dimensions,o=n.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,f=this._nameRepeatCount={},c,v=this._chunkCount,d=0;dA[1]&&(A[1]=b)}if(!a.pure){var C=l[y];if(m&&C==null){if(m.name!=null)l[y]=C=m.name;else if(c!=null){var D=n[c],I=i[D][_];if(I){C=I[x];var L=s[D].ordinalMeta;L&&L.categories.length&&(C=L.categories[C])}}}var M=m==null?null:m.id;M==null&&C!=null&&(f[C]=f[C]||0,M=C,f[C]>0&&(M+="__ec__"+f[C]),f[C]++),M!=null&&(u[y]=M)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},c_(this)}};function f_(t,e,r,a,i){var n=ZM[e.type],o=a-1,s=e.name,l=t[s][o];if(l&&l.length=0&&e=0&&es&&(s=u)}return n=[o,s],this._extent[t]=n,n},q.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},q.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},q.getCalculationInfo=function(t){return this._calculationInfo[t]},q.setCalculationInfo=function(t,e){uu(t)?Z(this._calculationInfo,t):this._calculationInfo[t]=e},q.getSum=function(t){var e=this._storage[t],r=0;if(e)for(var a=0,i=this.count();a=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,r=e[t];if(r!=null&&rt)i=n-1;else return n}return-1},q.indicesOfNearest=function(t,e,r){var a=this._storage,i=a[t],n=[];if(!i)return n;r==null&&(r=1/0);for(var o=1/0,s=-1,l=0,u=0,h=this.count();u=0&&s<0)&&(o=c,s=f,l=0),f===s&&(n[l++]=u))}return n.length=l,n},q.getRawIndex=Fo;function Fo(t){return t}function Wo(t){return t=0?this._indices[t]:-1}q.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],r=0;r=u&&y<=h||isNaN(y))&&(o[s++]=c),c++}f=!0}else if(a===2){for(var v=this._storage[l],_=this._storage[e[1]],x=t[e[1]][0],w=t[e[1]][1],d=0;d=u&&y<=h||isNaN(y))&&(b>=x&&b<=w||isNaN(b))&&(o[s++]=c),c++}f=!0}}if(!f)if(a===1)for(var m=0;m=u&&y<=h||isNaN(y))&&(o[s++]=A)}else for(var m=0;mt[D][1])&&(C=!1)}C&&(o[s++]=this.getRawIndex(m))}return s=0?(i[s]=jM(n[s]),a._rawExtent[s]=cu(),a._extent[s]=null):i[s]=n[s])}return a}function jM(t){for(var e=new Array(t.length),r=0;rw[1]&&(w[1]=x)}}}return i},q.downSample=function(t,e,r,a){for(var i=d_(this,[t]),n=i._storage,o=[],s=Math.floor(1/e),l=n[t],u=this.count(),h=this._chunkSize,f=i._rawExtent[t],c=new(hu(this))(u),v=0,d=0;du-d&&(s=u-d,o.length=s);for(var g=0;gf[1]&&(f[1]=_),c[v++]=x}return i._count=v,i._indices=c,i.getRawIndex=Wo,i},q.getItemModel=function(t){var e=this.hostModel;return new ht(this.getRawDataItem(t),e,e&&e.ecModel)},q.diff=function(t){var e=this;return new Wr(t?t.getIndices():[],this.getIndices(),function(r){return _v(t,r)},function(r){return _v(e,r)})},q.getVisual=function(t){var e=this._visual;return e&&e[t]},q.setVisual=function(t,e){if(uu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setVisual(r,t[r]);return}this._visual=this._visual||{},this._visual[t]=e},q.setLayout=function(t,e){if(uu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setLayout(r,t[r]);return}this._layout[t]=e},q.getLayout=function(t){return this._layout[t]},q.getItemLayout=function(t){return this._itemLayouts[t]},q.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?Z(this._itemLayouts[t]||{},e):e},q.clearItemLayouts=function(){this._itemLayouts.length=0},q.getItemVisual=function(t,e,r){var a=this._itemVisuals[t],i=a&&a[e];return i==null&&!r?this.getVisual(e):i},q.setItemVisual=function(t,e,r){var a=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=a,uu(e)){for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n],i[n]=!0);return}a[e]=r,i[e]=!0},q.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var t2=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};q.setItemGraphicEl=function(t,e){var r=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=r&&r.seriesIndex,e.type==="group"&&e.traverse(t2,e)),this._graphicEls[t]=e},q.getItemGraphicEl=function(t){return this._graphicEls[t]},q.eachItemGraphicEl=function(t,e){T(this._graphicEls,function(r,a){r&&t&&t.call(e,r,a)})},q.cloneShallow=function(t){if(!t){var e=E(this.dimensions,this.getDimensionInfo,this);t=new qt(e,this.hostModel)}if(t._storage=this._storage,h_(t,this),this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Wo:Fo,t},q.wrapMethod=function(t,e){var r=this[t];typeof r=="function"&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=r.apply(this,arguments);return e.apply(this,[a].concat(Oi(arguments)))})},q.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],q.CHANGABLE_METHODS=["filterSelf","selectRange"];function g_(t,e,r){nr.isInstance(e)||(e=nr.seriesDataToSource(e)),r=r||{},t=(t||[]).slice();for(var a=(r.dimsDef||[]).slice(),i=j(),n=j(),o=[],s=e2(e,t,a,r.dimCount),l=0;l=e[0]&&t<=e[1]},Bt.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Bt.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Bt.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Bt.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Bt.prototype.getExtent=function(){return this._extent.slice()},Bt.prototype.setExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e)},Bt.prototype.isBlank=function(){return this._isBlank},Bt.prototype.setBlank=function(t){this._isBlank=t},Bt.prototype.getLabel=null,lo(Bt),gl(Bt,{registerWhenExtend:!0});function $o(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}$o.createByAxisModel=function(t){var e=t.option,r=e.data,a=r&&E(r,s2);return new $o({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})};var y_=$o.prototype;y_.getOrdinal=function(t){return __(this).get(t)},y_.parseAndCollect=function(t){var e,r=this._needCollect;if(typeof t!="string"&&!r)return t;if(r&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=__(this);return e=a.get(t),e==null&&(r?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e};function __(t){return t._map||(t._map=j(t.categories))}function s2(t){return Q(t)&&t.value!=null?t.value:t+""}var wv=Bt.prototype,bv=Bt.extend({type:"ordinal",init:function(t,e){(!t||P(t))&&(t=new $o({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return typeof t=="string"?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),wv.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return wv.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(wv.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,r=e[0];r<=e[1];)t.push(r),r++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:Kt,niceExtent:Kt});bv.create=function(){return new bv};var x_=Ft;function l2(t,e,r,a){var i={},n=t[1]-t[0],o=i.interval=Pc(n/e,!0);r!=null&&oa&&(o=i.interval=a);var s=i.intervalPrecision=w_(o),l=i.niceTickExtent=[x_(Math.ceil(t[0]/o)*o,s),x_(Math.floor(t[1]/o)*o,s)];return S_(l,t),i}function w_(t){return Bl(t)+2}function b_(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function S_(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),b_(t,0,e),b_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var fn=Ft,Sr=Bt.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var r=this._extent;isNaN(t)||(r[0]=parseFloat(t)),isNaN(e)||(r[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Sr.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=w_(t)},getTicks:function(t){var e=this._interval,r=this._extent,a=this._niceExtent,i=this._intervalPrecision,n=[];if(!e)return n;var o=1e4;r[0]o)return[];var l=n.length?n[n.length-1]:a[1];return r[1]>l&&(t?n.push(fn(l+e,i)):n.push(r[1])),n},getMinorTicks:function(t){for(var e=this.getTicks(!0),r=[],a=this.getExtent(),i=1;ia[0]&&f0&&(n=n===null?s:Math.min(n,s))}r[a]=n}}return r}function Dv(t){var e=h2(t),r=[];return T(t,function(a){var i=a.coordinateSystem,n=i.getBaseAxis(),o=n.getExtent(),s;if(n.type==="category")s=n.getBandWidth();else if(n.type==="value"||n.type==="time"){var l=n.dim+"_"+n.index,u=e[l],h=Math.abs(o[1]-o[0]),f=n.scale.getExtent(),c=Math.abs(f[1]-f[0]);s=u?h/c*u:h}else{var v=a.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=R(a.get("barWidth"),s),g=R(a.get("barMaxWidth"),s),p=R(a.get("barMinWidth")||1,s),m=a.get("barGap"),y=a.get("barCategoryGap");r.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:p,barGap:m,barCategoryGap:y,axisKey:Cv(n),stackId:Tv(a)})}),C_(r)}function C_(t){var e={};T(t,function(a,i){var n=a.axisKey,o=a.bandWidth,s=e[n]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;e[n]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=a.barWidth;h&&!l[u].width&&(l[u].width=h,h=Math.min(s.remainedWidth,h),s.remainedWidth-=h);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var c=a.barMinWidth;c&&(l[u].minWidth=c);var v=a.barGap;v!=null&&(s.gap=v);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var r={};return T(e,function(a,i){r[i]={};var n=a.stacks,o=a.bandWidth,s=R(a.categoryGap,o),l=R(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),T(n,function(g){var p=g.maxWidth,m=g.minWidth;if(g.width){var y=g.width;p&&(y=Math.min(y,p)),m&&(y=Math.max(y,m)),g.width=y,u-=y+l*y,h--}else{var y=f;p&&py&&(y=m),y!==f&&(g.width=y,u-=y+l*y,h--)}}),f=(u-s)/(h+(h-1)*l),f=Math.max(f,0);var c=0,v;T(n,function(g,p){g.width||(g.width=f),v=g,c+=g.width*(1+l)}),v&&(c-=v.width*l);var d=-c/2;T(n,function(g,p){r[i][p]=r[i][p]||{bandWidth:o,offset:d,width:g.width},d+=g.width*(1+l)})}),r}function D_(t,e,r){if(t&&e){var a=t[Cv(e)];return a!=null&&r!=null&&(a=a[Tv(r)]),a}}function I_(t,e){var r=T_(t,e),a=Dv(r),i={};T(r,function(n){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Tv(n),h=a[Cv(l)][u],f=h.offset,c=h.width,v=s.getOtherAxis(l),d=n.get("barMinHeight")||0;i[u]=i[u]||[],o.setLayout({bandWidth:h.bandWidth,offset:f,size:c});for(var g=o.mapDimension(v.dim),p=o.mapDimension(l.dim),m=Ur(o,g),y=v.isHorizontal(),_=P_(l,v,m),x=0,w=o.count();x=0?"p":"n",C=_;m&&(i[u][b]||(i[u][b]={p:_,n:_}),C=i[u][b][A]);var D,I,L,M;if(y){var B=s.dataToPoint([S,b]);D=C,I=B[1]+f,L=B[0]-_,M=c,Math.abs(L)A_||(h=A_),{progress:f};function f(c,v){for(var d=c.count,g=new Av(d*2),p=new Av(d*2),m=new Av(d),y,_=[],x=[],w=0,S=0;(y=c.next())!=null;)x[u]=v.get(o,y),x[1-u]=v.get(s,y),_=r.dataToPoint(x,null,_),p[w]=l?a.x+a.width:_[0],g[w++]=_[0],p[w]=l?_[1]:a.y+a.height,g[w++]=_[1],m[S++]=y;v.setLayout({largePoints:g,largeDataIndices:m,largeBackgroundPoints:p,barWidth:h,valueAxisStart:P_(i,n,!1),backgroundStart:l?a.x:a.y,valueAxisHorizontal:l})}}};function M_(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function L_(t){return t.pipelineContext&&t.pipelineContext.large}function P_(t,e,r){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var c2=Sr.prototype,E_=Math.ceil,R_=Math.floor,cn=1e3,vn=cn*60,Zo=vn*60,Mt=Zo*24,v2=function(t,e,r,a){for(;r>>1;t[i][1]r&&(n=r);var o=Mv.length,s=v2(Mv,n,0,o),l=Mv[Math.min(s,o-1)],u=l[1];if(l[0]==="year"){var h=i/u,f=Pc(h/t,!0);u*=f}var c=this.getSetting("useUTC")?0:new Date(+a[0]||+a[1]).getTimezoneOffset()*60*1e3,v=[Math.round(E_((a[0]-c)/u)*u+c),Math.round(R_((a[1]-c)/u)*u+c)];S_(v,a),this._stepLvl=l,this._interval=u,this._niceExtent=v},parse:function(t){return+Ao(t)}});T(["contain","normalize"],function(t){Iv.prototype[t]=function(e){return c2[t].call(this,this.parse(e))}});var Mv=[["hh:mm:ss",cn],["hh:mm:ss",cn*5],["hh:mm:ss",cn*10],["hh:mm:ss",cn*15],["hh:mm:ss",cn*30],[`hh:mm MM-dd`,vn],[`hh:mm MM-dd`,vn*5],[`hh:mm MM-dd`,vn*10],[`hh:mm MM-dd`,vn*15],[`hh:mm MM-dd`,vn*30],[`hh:mm MM-dd`,Zo],[`hh:mm MM-dd`,Zo*2],[`hh:mm MM-dd`,Zo*6],[`hh:mm MM-dd`,Zo*12],[`MM-dd yyyy`,Mt],[`MM-dd yyyy`,Mt*2],[`MM-dd yyyy`,Mt*3],[`MM-dd yyyy`,Mt*4],[`MM-dd yyyy`,Mt*5],[`MM-dd yyyy`,Mt*6],["week",Mt*7],[`MM-dd yyyy`,Mt*10],["week",Mt*14],["week",Mt*21],["month",Mt*31],["week",Mt*42],["month",Mt*62],["week",Mt*70],["quarter",Mt*95],["month",Mt*31*4],["month",Mt*31*5],["half-year",Mt*380/2],["month",Mt*31*8],["month",Mt*31*10],["year",Mt*380]];Iv.create=function(t){return new Iv({useUTC:t.ecModel.get("useUTC")})};var vu=Bt.prototype,Yo=Sr.prototype,d2=Bl,g2=Ft,p2=Math.floor,m2=Math.ceil,du=Math.pow,Ar=Math.log,gu=Bt.extend({type:"log",base:10,$constructor:function(){Bt.apply(this,arguments),this._originalScale=new Sr},getTicks:function(t){var e=this._originalScale,r=this._extent,a=e.getExtent();return E(Yo.getTicks.call(this,t),function(i){var n=Ft(du(this.base,i));return n=i===r[0]&&e.__fixMin?pu(n,a[0]):n,n=i===r[1]&&e.__fixMax?pu(n,a[1]):n,n},this)},getMinorTicks:Yo.getMinorTicks,getLabel:Yo.getLabel,scale:function(t){return t=vu.scale.call(this,t),du(this.base,t)},setExtent:function(t,e){var r=this.base;t=Ar(t)/Ar(r),e=Ar(e)/Ar(r),Yo.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=vu.getExtent.call(this);e[0]=du(t,e[0]),e[1]=du(t,e[1]);var r=this._originalScale,a=r.getExtent();return r.__fixMin&&(e[0]=pu(e[0],a[0])),r.__fixMax&&(e[1]=pu(e[1],a[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Ar(t[0])/Ar(e),t[1]=Ar(t[1])/Ar(e),vu.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,r=e[1]-e[0];if(!(r===1/0||r<=0)){var a=$0(r),i=t/r*a;for(i<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var n=[Ft(m2(e[0]/a)*a),Ft(p2(e[1]/a)*a)];this._interval=a,this._niceExtent=n}},niceExtent:function(t){Yo.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});T(["contain","normalize"],function(t){gu.prototype[t]=function(e){return e=Ar(e)/Ar(this.base),vu[t].call(this,e)}}),gu.create=function(){return new gu};function pu(t,e){return g2(t,d2(e))}function k_(t,e){var r=t.type,a=e.getMin(),i=e.getMax(),n=t.getExtent(),o,s,l;r==="ordinal"?o=e.getCategories().length:(s=e.get("boundaryGap"),P(s)||(s=[s||0,s||0]),typeof s[0]=="boolean"&&(z&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),s=[0,0]),s[0]=R(s[0],1),s[1]=R(s[1],1),l=n[1]-n[0]||Math.abs(n[0])),a==="dataMin"?a=n[0]:typeof a=="function"&&(a=a({min:n[0],max:n[1]})),i==="dataMax"?i=n[1]:typeof i=="function"&&(i=i({min:n[0],max:n[1]}));var u=a!=null,h=i!=null;a==null&&(a=r==="ordinal"?o?0:NaN:n[0]-s[0]*l),i==null&&(i=r==="ordinal"?o?o-1:NaN:n[1]+s[1]*l),(a==null||!isFinite(a))&&(a=NaN),(i==null||!isFinite(i))&&(i=NaN),t.setBlank(Xn(a)||Xn(i)||r==="ordinal"&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(a>0&&i>0&&!u&&(a=0),a<0&&i<0&&!h&&(i=0));var f=e.ecModel;if(f&&r==="time"){var c=T_("bar",f),v;if(T(c,function(p){v|=p.getBaseAxis()===e.axis}),v){var d=Dv(c),g=y2(a,i,e,d);a=g.min,i=g.max}}return{extent:[a,i],fixMin:u,fixMax:h}}function y2(t,e,r,a){var i=r.axis.getExtent(),n=i[1]-i[0],o=D_(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;T(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;T(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,f=1-(s+l)/n,c=h/f-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function xa(t,e){var r=k_(t,e),a=r.extent,i=e.get("splitNumber");t.type==="log"&&(t.base=e.get("logBase"));var n=t.type;t.setExtent(a[0],a[1]),t.niceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:n==="interval"||n==="time"?e.get("minInterval"):null,maxInterval:n==="interval"||n==="time"?e.get("maxInterval"):null});var o=e.get("interval");o!=null&&t.setInterval&&t.setInterval(o)}function dn(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new bv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Sr;default:return(Bt.getClass(e)||Sr).create(t)}}function _2(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function Xo(t){var e=t.getLabelModel().get("formatter"),r=t.type==="category"?t.scale.getExtent()[0]:null;return typeof e=="string"?(e=function(a){return function(i){return i=t.scale.getLabel(i),a.replace("{value}",i??"")}}(e),e):typeof e=="function"?function(a,i){return r!=null&&(i=a-r),e(Lv(t,a),i)}:function(a){return t.scale.getLabel(a)}}function Lv(t,e){return t.type==="category"?t.scale.getLabel(e):e}function x2(t){var e=t.model,r=t.scale;if(!(!e.get("axisLabel.show")||r.isBlank())){var a=t.type==="category",i,n,o=r.getExtent();a?n=r.count():(i=r.getTicks(),n=i.length);var s=t.getLabelModel(),l=Xo(t),u,h=1;n>40&&(h=Math.ceil(n/40));for(var f=0;f>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/r,l/r])}return a}var Rv=function(t,e){return O2(t),E(Ht(t.features,function(r){return r.geometry&&r.properties&&r.geometry.coordinates.length>0}),function(r){var a=r.properties,i=r.geometry,n=i.coordinates,o=[];i.type==="Polygon"&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),i.type==="MultiPolygon"&&T(n,function(l){l[0]&&o.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new qo(a[e||"name"],o,a.cp);return s.properties=a,s})},Ko=de();function z2(t){return t.type==="category"?V2(t):H2(t)}function B2(t,e){return t.type==="category"?G2(t,e):{ticks:t.scale.getTicks()}}function V2(t){var e=t.getLabelModel(),r=B_(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function B_(t,e){var r=V_(t,"labels"),a=Pv(e),i=G_(r,a);if(i)return i;var n,o;return $t(a)?n=W_(t,a):(o=a==="auto"?F2(t):a,n=F_(t,o)),H_(r,a,{labels:n,labelCategoryInterval:o})}function G2(t,e){var r=V_(t,"ticks"),a=Pv(e),i=G_(r,a);if(i)return i;var n,o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),$t(a))n=W_(t,a,!0);else if(a==="auto"){var s=B_(t,t.getLabelModel());o=s.labelCategoryInterval,n=E(s.labels,function(l){return l.tickValue})}else o=a,n=F_(t,o,!0);return H_(r,a,{ticks:n,tickCategoryInterval:o})}function H2(t){var e=t.scale.getTicks(),r=Xo(t);return{labels:E(e,function(a,i){return{formattedLabel:r(a,i),rawLabel:t.scale.getLabel(a),tickValue:a}})}}function V_(t,e){return Ko(t)[e]||(Ko(t)[e]=[])}function G_(t,e){for(var r=0;r40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(a)),f=Math.abs(u*Math.sin(a)),c=0,v=0;l<=n[1];l+=s){var d=0,g=0,p=cr(r(l),e.font,"center","top");d=p.width*1.3,g=p.height*1.3,c=Math.max(c,d,7),v=Math.max(v,g,7)}var m=c/h,y=v/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=Ko(t.model),w=t.getExtent(),S=x.lastAutoInterval,b=x.lastTickCount;return S!=null&&b!=null&&Math.abs(S-_)<=1&&Math.abs(b-o)<=1&&S>_&&x.axisExtend0===w[0]&&x.axisExtend1===w[1]?_=S:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=w[0],x.axisExtend1=w[1]),_}function U2(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function F_(t,e,r){var a=Xo(t),i=t.scale,n=i.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],h=i.count();u!==0&&l>1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=N_(t),c=o.get("showMinLabel")||f,v=o.get("showMaxLabel")||f;c&&u!==n[0]&&g(n[0]);for(var d=u;d<=n[1];d+=l)g(d);v&&d-l!==n[1]&&g(n[1]);function g(p){s.push(r?p:{formattedLabel:a(p),rawLabel:i.getLabel(p),tickValue:p})}return s}function W_(t,e,r){var a=t.scale,i=Xo(t),n=[];return T(a.getTicks(),function(o){var s=a.getLabel(o);e(o,s)&&n.push(r?o:{formattedLabel:i(o),rawLabel:s,tickValue:o})}),n}var U_=[0,1],Vt=function(t,e,r){this.dim=t,this.scale=e,this._extent=r||[0,0],this.inverse=!1,this.onBand=!1};Vt.prototype={constructor:Vt,contain:function(t){var e=this._extent,r=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=r&&t<=a},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Dc(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var r=this._extent;r[0]=t,r[1]=e},dataToCoord:function(t,e){var r=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(r=r.slice(),$_(r,a.count())),At(t,U_,r,e)},coordToData:function(t,e){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),$_(r,a.count()));var i=At(t,r,U_,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=B2(this,e),a=r.ticks,i=E(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this),n=e.get("alignWithLabel");return $2(this,i,n,t.clamp),i},getMinorTicksCoords:function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var r=this.scale.getMinorTicks(e),a=E(r,function(i){return E(i,function(n){return{coord:this.dataToCoord(n),tickValue:n}},this)},this);return a},getViewLabels:function(){return z2(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),r=e[1]-e[0]+(this.onBand?1:0);r===0&&(r=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/r},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return W2(this)}};function $_(t,e){var r=t[1]-t[0],a=e,i=r/a/2;t[0]+=i,t[1]-=i}function $2(t,e,r,a){var i=e.length;if(!t.onBand||r||!i)return;var n=t.getExtent(),o,s;if(i===1)e[0].coord=n[0],o=e[1]={coord:n[0]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;T(e,function(v){v.coord-=u/2});var h=t.scale.getExtent();s=1+h[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var f=n[0]>n[1];c(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&c(n[0],e[0].coord)&&e.unshift({coord:n[0]}),c(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&c(o.coord,n[1])&&e.push({coord:n[1]});function c(v,d){return v=Ft(v),d=Ft(d),f?v>d:v0?r=a[0]:a[1]<0&&(r=a[1]),r}function zv(t,e,r,a){var i=NaN;t.stacked&&(i=r.get(r.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=t.valueStart);var n=t.baseDataOffset,o=[];return o[n]=r.get(t.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function eL(t,e){var r=[];return e.diff(t).add(function(a){r.push({cmd:"+",idx:a})}).update(function(a,i){r.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){r.push({cmd:"-",idx:a})}).execute(),r}var rL=function(t,e,r,a,i,n,o,s){for(var l=eL(t,e),u=[],h=[],f=[],c=[],v=[],d=[],g=[],p=Ov(i,e,o),m=Ov(n,t,s),y=0;y=i||c<0)break;if(Zr(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]);else if(l>0){var g=e[f],p=u==="y"?1:0,m=(d[p]-g[p])*l;yu(Ze,g),Ze[p]=g[p]+m,yu(Ye,d),Ye[p]=d[p]-m,t.bezierCurveTo(Ze[0],Ze[1],Ye[0],Ye[1],d[0],d[1])}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function iL(t,e,r,a,i,n,o,s,l,u,h){for(var f=0,c=r,v=0;v=i||c<0)break;if(Zr(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]),yu(Ze,d);else if(l>0){var g=c+n,y=e[g];if(h)for(;y&&Zr(e[g]);)g+=n,y=e[g];var p=.5,m=e[f],y=e[g];if(!y||Zr(y))yu(Ye,d);else{Zr(y)&&!h&&(y=d),Er(Bv,y,m);var _,x;if(u==="x"||u==="y"){var w=u==="x"?0:1;_=Math.abs(d[w]-m[w]),x=Math.abs(d[w]-y[w])}else _=Rr(d,m),x=Rr(d,y);p=x/(x+_),J_(Ye,d,Bv,-l*(1-p))}K_(Ze,Ze,s),Q_(Ze,Ze,o),K_(Ye,Ye,s),Q_(Ye,Ye,o),t.bezierCurveTo(Ze[0],Ze[1],Ye[0],Ye[1],d[0],d[1]),J_(Ze,d,Bv,l*p)}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function Gv(t,e){var r=[1/0,1/0],a=[-1/0,-1/0];if(e)for(var i=0;ia[0]&&(a[0]=n[0]),n[1]>a[1]&&(a[1]=n[1])}return{min:e?r:a,max:e?a:r}}var nL=st.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:pc(st.prototype.brush),buildPath:function(t,e){var r=e.points,a=0,i=r.length,n=Gv(r,e.smoothConstraint);if(e.connectNulls){for(;i>0&&Zr(r[i-1]);i--);for(;a0&&Zr(r[n-1]);n--);for(;i=0;n--){var o=r[n].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if(a=l&&l.coordDim,a==="x"||a==="y"){i=r[n];break}}if(!i){z&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(a),h=E(i.stops,function(y){return{coord:u.toGlobalCoord(u.dataToCoord(y.value)),color:y.color}}),f=h.length,c=i.outerColors.slice();f&&h[0].coord>h[f-1].coord&&(h.reverse(),c.reverse());var v=10,d=h[0].coord-v,g=h[f-1].coord+v,p=g-d;if(p<.001)return"transparent";T(h,function(y){y.offset=(y.coord-d)/p}),h.push({offset:f?h[f-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:f?h[0].offset:.5,color:c[0]||"transparent"});var m=new qa(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}function lL(t,e,r){var a=t.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=r.getAxesByScale("ordinal")[0];if(!!n&&!(i&&uL(n,e))){var o=e.mapDimension(n.dim),s={};return T(n.getViewLabels(),function(l){s[l.tickValue]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function uL(t,e){var r=t.getExtent(),a=Math.abs(r[1]-r[0])/t.scale.count();isNaN(a)&&(a=0);for(var i=e.count(),n=Math.max(1,Math.round(i/5)),o=0;oa)return!1;return!0}function n1(t,e,r){if(t.type==="cartesian2d"){var a=t.getBaseAxis().isHorizontal(),i=t1(t,e,r);if(!r.get("clip",!0)){var n=i.shape,o=Math.max(n.width,n.height);a?(n.y-=o,n.height+=o*2):(n.x-=o,n.width+=o*2)}return i}else return e1(t,e,r)}Yt.extend({type:"line",init:function(){var t=new G,e=new gn;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,r){var a=t.coordinateSystem,i=this.group,n=t.getData(),o=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=n.mapArray(n.getItemLayout),u=a.type==="polar",h=this._coordSys,f=this._symbolDraw,c=this._polyline,v=this._polygon,d=this._lineGroup,g=t.get("animation"),p=!s.isEmpty(),m=s.get("origin"),y=Ov(a,n,m),_=oL(a,n,y),x=t.get("showSymbol"),w=x&&!u&&lL(t,n,a),S=this._data;S&&S.eachItemGraphicEl(function(M,B){M.__temp&&(i.remove(M),S.setItemGraphicEl(B,null))}),x||f.remove(),i.add(d);var b=!u&&t.get("step"),A;a&&a.getArea&&t.get("clip",!0)&&(A=a.getArea(),A.width!=null?(A.x-=.1,A.y-=.1,A.width+=.2,A.height+=.2):A.r0&&(A.r0-=.5,A.r1+=.5)),this._clipShapeForSymbol=A,c&&h.type===a.type&&b===this._step?(p&&!v?v=this._newPolygon(l,_,a,g):v&&!p&&(d.remove(v),v=this._polygon=null),d.setClipPath(n1(a,!1,t)),x&&f.updateData(n,{isIgnore:w,clipShape:A}),n.eachItemGraphicEl(function(M){M.stopAnimation(!0)}),(!r1(this._stackedOnPoints,_)||!r1(this._points,l))&&(g?this._updateAnimation(n,_,a,r,b,m):(b&&(l=ba(l,a,b),_=ba(_,a,b)),c.setShape({points:l}),v&&v.setShape({points:l,stackedOnPoints:_})))):(x&&f.updateData(n,{isIgnore:w,clipShape:A}),b&&(l=ba(l,a,b),_=ba(_,a,b)),c=this._newPolyline(l,a,g),p&&(v=this._newPolygon(l,_,a,g)),d.setClipPath(n1(a,!0,t)));var C=sL(n,a)||n.getVisual("color");c.useStyle(U(o.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"}));var D=t.get("smooth");if(D=i1(t.get("smooth")),c.setShape({smooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var I=n.getCalculationInfo("stackedOnSeries"),L=0;v.useStyle(U(s.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel"})),I&&(L=i1(I.get("smooth"))),v.setShape({smooth:D,stackedOnSmooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n,this._coordSys=a,this._stackedOnPoints=_,this._points=l,this._step=b,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,a){var i=t.getData(),n=cl(i,a);if(!(n instanceof Array)&&n!=null&&n>=0){var o=i.getItemGraphicEl(n);if(!o){var s=i.getItemLayout(n);if(!s||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;o=new wa(i,n),o.position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,i.setItemGraphicEl(n,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Yt.prototype.highlight.call(this,t,e,r,a)},downplay:function(t,e,r,a){var i=t.getData(),n=cl(i,a);if(n!=null&&n>=0){var o=i.getItemGraphicEl(n);o&&(o.__temp?(i.setItemGraphicEl(n,null),this.group.remove(o)):o.downplay())}else Yt.prototype.downplay.call(this,t,e,r,a)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new nL({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new j_({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(r),this._polygon=r,r},_updateAnimation:function(t,e,r,a,i,n){var o=this._polyline,s=this._polygon,l=t.hostModel,u=rL(this._data,t,this._stackedOnPoints,e,this._coordSys,r,this._valueOrigin,n),h=u.current,f=u.stackedOnCurrent,c=u.next,v=u.stackedOnNext;if(i&&(h=ba(u.current,r,i),f=ba(u.stackedOnCurrent,r,i),c=ba(u.next,r,i),v=ba(u.stackedOnNext,r,i)),a1(h,c)>3e3||s&&a1(f,v)>3e3){o.setShape({points:c}),s&&s.setShape({points:c,stackedOnPoints:v});return}o.shape.__points=u.current,o.shape.points=h,tt(o,{shape:{points:c}},l),s&&(s.setShape({points:h,stackedOnPoints:f}),tt(s,{shape:{points:c,stackedOnPoints:v}},l));for(var d=[],g=u.status,p=0;pe&&(e=t[r]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,r=0;r1){var c;typeof n=="string"?c=hL[n]:typeof n=="function"&&(c=n),c&&e.setData(i.downSample(i.mapDimension(l.dim),1/f,c,fL))}}}}};function vL(t){return this._axes[t]}var xu=function(t){this._axes={},this._dimList=[],this.name=t||""};xu.prototype={constructor:xu,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return E(this._dimList,vL,this)},getAxesByScale:function(t){return t=t.toLowerCase(),Ht(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var r=this._dimList,a=t instanceof Array?[]:{},i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},yt(wu,Vt);var o1={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Sa={};Sa.categoryAxis=J({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},o1),Sa.valueAxis=J({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},o1),Sa.timeAxis=U({scale:!0,min:"dataMin",max:"dataMax"},Sa.valueAxis),Sa.logAxis=U({scale:!0,logBase:10},Sa.valueAxis);var dL=["value","category","time","log"],mn=function(t,e,r,a){T(dL,function(i){e.extend({type:t+"Axis."+i,mergeDefaultAndTheme:function(n,o){var s=this.layoutMode,l=s?rn(n):{},u=o.getTheme();J(n,u.get(i+"Axis")),J(n,this.getDefaultOption()),n.type=r(t,n),s&&ga(n,l,s)},optionUpdated:function(){var n=this.option;n.type==="category"&&(this.__ordinalMeta=$o.createByAxisModel(this))},getCategories:function(n){var o=this.option;if(o.type==="category")return n?o.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:Yn([{},Sa[i+"Axis"],a],!0)})}),ct.registerSubTypeDefaulter(t+"Axis",K(r,t))},yn=ct.extend({type:"cartesian2dAxis",axis:null,init:function(){yn.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){yn.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){yn.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function s1(t,e){return e.type||(e.data?"category":"value")}J(yn.prototype,oi);var l1={offset:0};mn("x",yn,s1,l1),mn("y",yn,s1,l1),ct.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});function Hv(t,e,r){return t.getCoordSysModel()===e}function _n(t,e,r){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,r),this.model=t}var ue=_n.prototype;ue.type="grid",ue.axisPointerEnabled=!0,ue.getRect=function(){return this._rect},ue.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model),T(r.x,function(i){xa(i.scale,i.model)}),T(r.y,function(i){xa(i.scale,i.model)});var a={};T(r.x,function(i){u1(r,"y",i,a)}),T(r.y,function(i){u1(r,"x",i,a)}),this.resize(this.model,e)};function u1(t,e,r,a){r.getAxesOnZeroOf=function(){return n?[n]:[]};var i=t[e],n,o=r.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(!s)return;if(l!=null)h1(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&h1(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function h1(t){return t&&t.type!=="category"&&t.type!=="time"&&_2(t)}ue.resize=function(t,e,r){var a=Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n(),!r&&t.get("containLabel")&&(T(i,function(o){if(!o.model.get("axisLabel.inside")){var s=x2(o);if(s){var l=o.isHorizontal()?"height":"width",u=o.model.get("axisLabel.margin");a[l]-=s[l]+u,o.position==="top"?a.y+=s.height+u:o.position==="left"&&(a.x+=s.width+u)}}}),n());function n(){T(i,function(o){var s=o.isHorizontal(),l=s?[0,a.width]:[0,a.height],u=o.inverse?1:0;o.setExtent(l[u],l[1-u]),gL(o,s?a.x:a.y)})}},ue.getAxis=function(t,e){var r=this._axesMap[t];if(r!=null){if(e==null){for(var a in r)if(r.hasOwnProperty(a))return r[a]}return r[e]}},ue.getAxes=function(){return this._axesList.slice()},ue.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}Q(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;as[1]?-1:1,u=[a==="start"?s[0]-l*o:a==="end"?s[1]+l*o:(s[0]+s[1])/2,y1(a)?t.labelOffset+i*o:0],h,f=e.get("nameRotate");f!=null&&(f=f*Aa/180);var c;y1(a)?h=g1(t.rotation,f??t.rotation,i):(h=mL(t,a,f||0,s),c=t.axisNameAvailableWidth,c!=null&&(c=Math.abs(c/Math.sin(h.rotation)),!isFinite(c)&&(c=null)));var v=n.getFont(),d=e.get("nameTruncate",!0)||{},g=d.ellipsis,p=Et(t.nameTruncateMaxWidth,d.maxWidth,c),m=g!=null&&p!=null?K0(r,p,v,g,{minChar:2,placeholder:d.placeholder}):r,y=e.get("tooltip",!0),_=e.mainType,x={componentType:_,name:r,$vars:["name"]};x[_+"Index"]=e.componentIndex;var w=new nt({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:p1(e),z2:1,tooltip:y&&y.show?Z({content:r,formatter:function(){return r},formatterParams:x},y):null});Rt(w.style,n,{text:m,textFont:v,textFill:n.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.get("align")||h.textAlign,textVerticalAlign:n.get("verticalAlign")||h.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=d1(e),w.eventData.targetType="axisName",w.eventData.name=r),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},d1=xe.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},g1=xe.innerTextLayout=function(t,e,r){var a=Mc(e-t),i,n;return So(a)?(n=r>0?"top":"bottom",i="center"):So(a-Aa)?(n=r>0?"bottom":"top",i="center"):(n="middle",a>0&&a0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:n}};function mL(t,e,r,a){var i=Mc(r-t.rotation),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return So(i-Aa/2)?(o=l?"bottom":"top",n="center"):So(i-Aa*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iAa/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}var p1=xe.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function yL(t,e,r){if(!N_(t.axis)){var a=t.get("axisLabel.showMinLabel"),i=t.get("axisLabel.showMaxLabel");e=e||[],r=r||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=r[0],h=r[1],f=r[r.length-1],c=r[r.length-2];a===!1?(Xe(n),Xe(u)):m1(n,o)&&(a?(Xe(o),Xe(h)):(Xe(n),Xe(u))),i===!1?(Xe(s),Xe(f)):m1(l,s)&&(i?(Xe(l),Xe(c)):(Xe(s),Xe(f)))}}function Xe(t){t&&(t.ignore=!0)}function m1(t,e,r){var a=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!a||!i)){var n=Hi([]);return Or(n,n,-t.rotation),a.applyTransform(ea([],n,t.getLocalTransform())),i.applyTransform(ea([],n,e.getLocalTransform())),a.intersect(i)}}function y1(t){return t==="middle"||t==="center"}function _1(t,e,r,a,i){for(var n=[],o=[],s=[],l=0;l=0||t===e}function DL(t){var e=Uv(t);if(!!e){var r=e.axisPointerModel,a=e.axis.scale,i=r.option,n=r.get("status"),o=r.get("value");o!=null&&(o=a.parse(o));var s=$v(r);n==null&&(i.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),ot&&(t=e),t},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}}});function T1(t,e,r,a,i,n,o){var s=r.getModel("label"),l=r.getModel("emphasis.label");Te(t,e,s,l,{labelFetcher:i,labelDataIndex:n,defaultText:mu(i.getData(),n),isRectText:!0,autoColor:a}),C1(t),C1(e)}function C1(t,e){t.textPosition==="outside"&&(t.textPosition=e)}var PL=qi([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),EL={getBarItemStyle:function(t){var e=PL(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}},RL=Ge({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:Math.PI*2,clockwise:!0},buildPath:function(t,e){var r=e.cx,a=e.cy,i=Math.max(e.r0||0,0),n=Math.max(e.r,0),o=(n-i)*.5,s=i+o,l=e.startAngle,u=e.endAngle,h=e.clockwise,f=Math.cos(l),c=Math.sin(l),v=Math.cos(u),d=Math.sin(u),g=h?u-l0?1:-1,o=a.height>0?1:-1;return{x:a.x+n*i/2,y:a.y+o*i/2,width:a.width-n*i,height:a.height-o*i}},polar:function(t,e,r){var a=t.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle}}};function qv(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function R1(t,e,r,a,i,n,o,s){var l=e.getItemVisual(r,"color"),u=e.getItemVisual(r,"opacity"),h=e.getVisual("borderColor"),f=a.getModel("itemStyle"),c=a.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",f.get("barBorderRadius")||0),t.useStyle(U({stroke:qv(i)?"none":h,fill:qv(i)?"none":l,opacity:u},f.getBarItemStyle()));var v=a.getShallow("cursor");v&&t.attr("cursor",v);var d=o?i.height>0?"bottom":"top":i.width>0?"left":"right";s||T1(t.style,c,a,l,n,r,d),qv(i)&&(c.fill=c.stroke="none"),St(t,c)}function OL(t,e){var r=t.get(kL)||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,a,i)}var k1=st.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var r=e.points,a=this.__startPoint,i=this.__baseDimIdx,n=0;n=0?r:null},30,!1);function zL(t,e,r){var a=t.__baseDimIdx,i=1-a,n=t.shape.points,o=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[i];bu[0]=e,bu[1]=r;for(var u=bu[a],h=bu[1-a],f=u-s,c=u+s,v=0,d=n.length/2;v=f&&p<=c&&(l<=m?h>=l&&h<=m:h>=m&&h<=l))return o[v]}return-1}function BL(t,e,r){var a=r.getVisual("borderColor")||r.getVisual("color"),i=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function VL(t,e,r){var a=e.get("borderColor")||e.get("color"),i=e.getItemStyle(["color","borderColor"]);t.useStyle(i),t.style.fill=null,t.style.stroke=a,t.style.lineWidth=r.getLayout("barWidth")}function z1(t,e,r){var a,i=r.type==="polar";return i?a=r.getArea():a=r.grid.getRect(),i?{cx:a.cx,cy:a.cy,r0:t?a.r0:e.r0,r:t?a.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:Math.PI*2}:{x:t?e.x:a.x,y:t?a.y:e.y,width:t?e.width:a.width,height:t?a.height:e.height}}function GL(t,e,r){var a=t.type==="polar"?ir:ft;return new a({shape:z1(e,r,t),silent:!0,z2:0})}It(br.VISUAL.LAYOUT,K(I_,"bar")),It(br.VISUAL.PROGRESSIVE_LAYOUT,f2),bt({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var wn=function(t,e,r){e=P(e)&&{coordDimensions:e}||Z({},e);var a=t.getSource(),i=un(a,e),n=new qt(i,t);return n.initData(a,r),n},Kv={updateSelectedMap:function(t){this._targetList=P(t)?t.slice():[],this._selectTargetMap=ki(t||[],function(e,r){return e.set(r.name,r),e},j())},select:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t),a=this.get("selectedMode");a==="single"&&this._selectTargetMap.each(function(i){i.selected=!1}),r&&(r.selected=!0)},unSelect:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);r&&(r.selected=!1)},toggleSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);if(r!=null)return this[r.selected?"unSelect":"select"](t,e),r.selected},isSelected:function(t,e){var r=e!=null?this._targetList[e]:this._selectTargetMap.get(t);return r&&r.selected}};function ts(t,e){this.getAllNames=function(){var r=e();return r.mapArray(r.getName)},this.containName=function(r){var a=e();return a.indexOfName(r)>=0},this.indexOfName=function(r){var a=t();return a.indexOfName(r)},this.getItemVisual=function(r,a){var i=t();return i.getItemVisual(r,a)}}var Au=su({type:"series.pie",init:function(t){Au.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Au.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return wn(this,{coordDimensions:["value"],encodeDefaulter:K(Gc,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),r=[],a=0,i=t.count();a0&&(l?u!=="scale":h!=="transition")){for(var v=i.getItemLayout(0),d=1;isNaN(v.startAngle)&&d=a.r0}}}),G1=function(t,e){T(e,function(r){r.update="updateView",lt(r,function(a,i){var n={};return i.eachComponent({mainType:"series",subType:t,query:a},function(o){o[r.method]&&o[r.method](a.name,a.dataIndex);var s=o.getData();s.each(function(l){var u=s.getName(l);n[u]=o.isSelected(u)||!1})}),{name:a.name,selected:n,seriesId:a.seriesId}})})},Tu=function(t){return{getTargetSeries:function(e){var r={},a=j();return e.eachSeriesByType(t,function(i){i.__paletteScope=r,a.set(i.uid,i)}),a},reset:function(e,r){var a=e.getRawData(),i={},n=e.getData();n.each(function(o){var s=n.getRawIndex(o);i[s]=o}),a.each(function(o){var s=i[o],l=s!=null&&n.getItemVisual(s,"color",!0),u=s!=null&&n.getItemVisual(s,"borderColor",!0),h;if((!l||!u)&&(h=a.getItemModel(o)),!l){var f=h.get("itemStyle.color")||e.getColorFromPalette(a.getName(o)||o+"",e.__paletteScope,a.count());s!=null&&n.setItemVisual(s,"color",f)}if(!u){var c=h.get("itemStyle.borderColor");s!=null&&n.setItemVisual(s,"borderColor",c)}})}}},FL=Math.PI/180;function H1(t,e,r,a,i,n,o,s,l,u){t.sort(function(x,w){return x.y-w.y});function h(x,w,S,b){for(var A=x;Al+o);A++)if(t[A].y+=S,A>x&&A+1t[A].y+t[A].height){f(A,S/2);return}f(w-1,S/2)}function f(x,w){for(var S=x;S>=0&&!(t[S].y-w0&&t[S].y>t[S-1].y+t[S-1].height));S--);}function c(x,w,S,b,A,C){for(var D=(C>0,w?Number.MAX_VALUE:0),I=0,L=x.length;I=D&&(O=D-10),!w&&O<=D&&(O=D+10),x[I].x=S+O*C,D=O}}for(var v=0,d,g=t.length,p=[],m=[],y=0;y=r?m.push(t[y]):p.push(t[y]);c(p,!1,e,r,a,i),c(m,!0,e,r,a,i)}function WL(t,e,r,a,i,n,o,s){for(var l=[],u=[],h=Number.MAX_VALUE,f=-Number.MAX_VALUE,c=0;c0?"right":"left":D>0?"left":"right"}var wt,Ut=g.get("rotate");typeof Ut=="number"?wt=Ut*(Math.PI/180):wt=Ut?D<0?-C+Math.PI:-C:0,h=!!wt,v.label={x:L,y:M,position:p,height:V.height,len:b,len2:A,linePoints:B,textAlign:k,verticalAlign:"middle",rotation:wt,inside:H,labelDistance:m,labelAlignTo:y,labelMargin:_,bleedMargin:x,textRect:V,text:O,font:w},H||s.push(v.label)}}),!h&&t.get("avoidLabelOverlap")&&WL(s,l,u,e,r,a,i,n)},Cu=Math.PI*2,W1=Math.PI/180;function $L(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}var ZL=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.getData(),o=n.mapDimension("value"),s=$L(i,r),l=i.get("center"),u=i.get("radius");P(u)||(u=[0,u]),P(l)||(l=[l,l]);var h=R(s.width,r.getWidth()),f=R(s.height,r.getHeight()),c=Math.min(h,f),v=R(l[0],h)+s.x,d=R(l[1],f)+s.y,g=R(u[0],c/2),p=R(u[1],c/2),m=-i.get("startAngle")*W1,y=i.get("minAngle")*W1,_=0;n.each(o,function(k){!isNaN(k)&&_++});var x=n.getSum(o),w=Math.PI/(x||_)*2,S=i.get("clockwise"),b=i.get("roseType"),A=i.get("stillShowZeroSum"),C=n.getDataExtent(o);C[0]=0;var D=Cu,I=0,L=m,M=S?1:-1;if(n.each(o,function(k,O){var V;if(isNaN(k)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:v,cy:d,r0:g,r:b?NaN:p,viewRect:s});return}b!=="area"?V=x===0&&A?w:k*w:V=Cu/_,V=0;s--){var l=s*2,u=a[l]-n/2,h=a[l+1]-o/2;if(t>=u&&e>=h&&t<=u+n&&e<=h+o)return s}return-1}});function U1(){this.group=new G}var Ta=U1.prototype;Ta.isPersistent=function(){return!this._incremental},Ta.updateData=function(t,e){this.group.removeAll();var r=new jv({rectHover:!0,cursor:"default"});r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!1,e),this.group.add(r),this._incremental=null},Ta.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(r){if(r.startIndex!=null){var a=(r.endIndex-r.startIndex)*2,i=r.startIndex*4*2;e=new Float32Array(e.buffer,i,a)}r.setShape("points",e)})}},Ta.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Ae({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ta.incrementalUpdate=function(t,e,r){var a;this._incremental?(a=new jv,this._incremental.addDisplayable(a,!0)):(a=new jv({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),a.incremental=!0,this.group.add(a)),a.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(a,e,!!this._incremental,r)},Ta._setCommon=function(t,e,r,a){var i=e.hostModel;a=a||{};var n=e.getVisual("symbolSize");t.setShape("size",n instanceof Array?n:[n,n]),t.softClipShape=a.clipShape||null,t.symbolProxy=Le(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]=0&&(t.dataIndex=u+(t.startIndex||0))}))},Ta.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ta._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},_e({type:"scatter",render:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,r){var a=t.getData(),i=this._updateSymbolDraw(a,t);i.incrementalPrepareUpdate(a),this._finished=!1},incrementalRender:function(t,e,r){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,r){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=Qo().reset(t);i.progress&&i.progress({start:0,end:a.count()},a),this._symbolDraw.updateLayout(a)},_getClipShape:function(t){var e=t.coordinateSystem,r=e&&e.getArea&&e.getArea();return t.get("clip",!0)?r:null},_updateSymbolDraw:function(t,e){var r=this._symbolDraw,a=e.pipelineContext,i=a.large;return(!r||i!==this._isLargeDraw)&&(r&&r.remove(),r=this._symbolDraw=i?new U1:new gn,this._isLargeDraw=i,this.group.removeAll()),this.group.add(r.group),r},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),bt(li("scatter","circle")),It(Qo("scatter"));function $1(t,e,r){Vt.call(this,t,e,r),this.type="value",this.angle=0,this.name="",this.model}yt($1,Vt);function Tr(t,e,r){this._model=t,this.dimensions=[],this._indicatorAxes=E(t.getIndicatorModels(),function(a,i){var n="indicator_"+i,o=new $1(n,a.get("axisType")==="log"?new gu:new Sr);return o.name=a.get("name"),o.model=a,a.axis=o,this.dimensions.push(n),o},this),this.resize(t,r),this.cx,this.cy,this.r,this.r0,this.startAngle}Tr.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Tr.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)},Tr.prototype.coordToPoint=function(t,e){var r=this._indicatorAxes[e],a=r.angle,i=this.cx+t*Math.cos(a),n=this.cy-t*Math.sin(a);return[i,n]},Tr.prototype.pointToData=function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=Math.sqrt(e*e+r*r);e/=a,r/=a;for(var i=Math.atan2(-r,e),n=1/0,o,s=-1,l=0;ll[0]&&isFinite(g)&&isFinite(l[0]))}else{var p=h.getTicks().length-1;p>i&&(v=n(v));var d=Math.ceil(l[1]/v)*v,g=Ft(d-v*i);h.setExtent(g,d),h.setInterval(v)}})},Tr.dimensions=[],Tr.create=function(t,e){var r=[];return t.eachComponent("radar",function(a){var i=new Tr(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeriesByType("radar",function(a){a.get("coordinateSystem")==="radar"&&(a.coordinateSystem=r[a.get("radarIndex")||0])}),r},re.register("radar",Tr);var rs=Sa.valueAxis;function Du(t,e){return U({show:e},t)}var jB=Me({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),r=this.get("scale"),a=this.get("axisLine"),i=this.get("axisTick"),n=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),h=this.get("nameGap"),f=this.get("triggerEvent"),c=E(this.get("indicator")||[],function(v){v.max!=null&&v.max>0&&!v.min?v.min=0:v.min!=null&&v.min<0&&!v.max&&(v.max=0);var d=s;if(v.color!=null&&(d=U({color:v.color},s)),v=J(Y(v),{boundaryGap:t,splitNumber:e,scale:r,axisLine:a,axisTick:i,axisType:n,axisLabel:o,name:v.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:f},!1),l||(v.name=""),typeof u=="string"){var g=v.name;v.name=u.replace("{value}",g??"")}else typeof u=="function"&&(v.name=u(v.name,v));var p=Z(new ht(v,null,this.ecModel),oi);return p.mainType="radar",p.componentIndex=this.componentIndex,p},this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:J({lineStyle:{color:"#bbb"}},rs.axisLine),axisLabel:Du(rs.axisLabel,!1),axisTick:Du(rs.axisTick,!1),axisType:"interval",splitLine:Du(rs.splitLine,!0),splitArea:Du(rs.splitArea,!0),indicator:[]}}),YL=["axisLine","axisTickLabel","axisName"];Xt({type:"radar",render:function(t,e,r){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes(),a=E(r,function(i){var n=new xe(i.model,{position:[e.cx,e.cy],rotation:i.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});T(a,function(i){T(YL,i.add,i),this.group.add(i.getGroup())},this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,r=e.getIndicatorAxes();if(!r.length)return;var a=t.get("shape"),i=t.getModel("splitLine"),n=t.getModel("splitArea"),o=i.getModel("lineStyle"),s=n.getModel("areaStyle"),l=i.get("show"),u=n.get("show"),h=o.get("color"),f=s.get("color");h=P(h)?h:[h],f=P(f)?f:[f];var c=[],v=[];function d(I,L,M){var B=M%L.length;return I[B]=I[B]||[],B}if(a==="circle")for(var g=r[0].getTicksCoords(),p=e.cx,m=e.cy,y=0;y"+E(a,function(n,o){var s=e.get(e.mapDimension(n.dim),t);return Tt(n.name+" : "+s)}).join("
")},getTooltipPosition:function(t){if(t!=null){for(var e=this.getData(),r=this.coordinateSystem,a=e.getValues(E(r.dimensions,function(s){return e.mapDimension(s)}),t,!0),i=0,n=a.length;i"+Tt(a+" : "+r)},getTooltipPosition:function(t){if(t!=null){var e=this.getData().getName(t),r=this.coordinateSystem,a=r.getRegion(e);return a&&r.dataToPoint(a.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}},nameProperty:"name"}});pt(uP,Kv);var j1="\0_ec_interaction_mutex";function hP(t,e,r){var a=ed(t);a[e]=r}function fP(t,e,r){var a=ed(t),i=a[e];i===r&&(a[e]=null)}function tx(t,e){return!!ed(t)[e]}function ed(t){return t[j1]||(t[j1]={})}lt({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function An(t){this.pointerChecker,this._zr=t,this._opt={};var e=X,r=e(cP,this),a=e(vP,this),i=e(dP,this),n=e(gP,this),o=e(pP,this);Zt.call(this),this.setPointerChecker=function(s){this.pointerChecker=s},this.enable=function(s,l){this.disable(),this._opt=U(Y(l)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),s==null&&(s=!0),(s===!0||s==="move"||s==="pan")&&(t.on("mousedown",r),t.on("mousemove",a),t.on("mouseup",i)),(s===!0||s==="scale"||s==="zoom")&&(t.on("mousewheel",n),t.on("pinch",o))},this.disable=function(){t.off("mousedown",r),t.off("mousemove",a),t.off("mouseup",i),t.off("mousewheel",n),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}pt(An,Zt);function cP(t){if(!(Yp(t)||t.target&&t.target.draggable)){var e=t.offsetX,r=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,r)&&(this._x=e,this._y=r,this._dragging=!0)}}function vP(t){if(!(!this._dragging||!Iu("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||tx(this._zr,"globalPan"))){var e=t.offsetX,r=t.offsetY,a=this._x,i=this._y,n=e-a,o=r-i;this._x=e,this._y=r,this._opt.preventDefaultMouseMove&&Va(t.event),ex(this,"pan","moveOnMouseMove",t,{dx:n,dy:o,oldX:a,oldY:i,newX:e,newY:r})}}function dP(t){Yp(t)||(this._dragging=!1)}function gP(t){var e=Iu("zoomOnMouseWheel",t,this._opt),r=Iu("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,i=Math.abs(a),n=t.offsetX,o=t.offsetY;if(!(a===0||!e&&!r)){if(e){var s=i>3?1.4:i>1?1.2:1.1,l=a>0?s:1/s;rd(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:n,originY:o})}if(r){var u=Math.abs(a),h=(a>0?1:-1)*(u>3?.4:u>1?.15:.05);rd(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:n,originY:o})}}}function pP(t){if(!tx(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;rd(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function rd(t,e,r,a,i){t.pointerChecker&&t.pointerChecker(a,i.originX,i.originY)&&(Va(a.event),ex(t,e,r,a,i))}function ex(t,e,r,a,i){i.isAvailableBehavior=X(Iu,null,r,a),t.trigger(e,i)}function Iu(t,e,r){var a=r[t];return!t||a&&(!_t(a)||e.event[a+"Key"])}function ad(t,e,r){var a=t.target,i=a.position;i[0]+=e,i[1]+=r,a.dirty()}function id(t,e,r,a){var i=t.target,n=t.zoomLimit,o=i.position,s=i.scale,l=t.zoom=t.zoom||1;if(l*=e,n){var u=n.min||0,h=n.max||1/0;l=Math.max(Math.min(h,l),u)}var f=l/t.zoom;t.zoom=l,o[0]-=(r-o[0])*(f-1),o[1]-=(a-o[1])*(f-1),s[0]*=f,s[1]*=f,i.dirty()}var mP={axisPointer:1,tooltip:1,brush:1};function Mu(t,e,r){var a=e.getComponentByElement(t.topTarget),i=a&&a.coordinateSystem;return a&&a!==r&&!mP[a.mainType]&&i&&i.model!==r}function rx(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function yP(t,e,r,a,i){r.off("click"),r.off("mousedown"),e.get("selectedMode")&&(r.on("mousedown",function(){t._mouseDownFlag=!0}),r.on("click",function(n){if(!!t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=n.target;!o.__regions;)o=o.parent;if(!!o){var s={type:(e.mainType==="geo"?"geo":"map")+"ToggleSelect",batch:E(o.__regions,function(l){return{name:l.name,from:i.uid}})};s[e.mainType+"Id"]=e.id,a.dispatchAction(s),ax(e,r)}}}))}function ax(t,e){e.eachChild(function(r){T(r.__regions,function(a){r.trigger(t.isSelected(a.name)?"emphasis":"normal")})})}function Lu(t,e){var r=new G;this.uid=bo("ec_map_draw"),this._controller=new An(t.getZr()),this._controllerHost={target:e?r:null},this.group=r,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,r.add(this._regionsGroup=new G),r.add(this._backgroundGroup=new G)}Lu.prototype={constructor:Lu,draw:function(t,e,r,a,i){var n=t.mainType==="geo",o=t.getData&&t.getData();n&&e.eachComponent({mainType:"series",subType:"map"},function(S){!o&&S.getHostGeoModel()===t&&(o=S.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.getTransformInfo(),f=!l.childAt(0)||i,c;if(f)u.transform=h.roamTransform,u.decomposeTransform(),u.dirty();else{var v=new je;v.transform=h.roamTransform,v.decomposeTransform();var d={scale:v.scale,position:v.position};c=v.scale,tt(u,d,t)}var g=h.rawScale,p=h.rawPosition;l.removeAll();var m=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],x=["emphasis","label"],w=j();T(s.regions,function(S){var b=w.get(S.name)||w.set(S.name,new G),A=new x0({segmentIgnoreThreshold:1,shape:{paths:[]}});b.add(A);var C=t.getRegionModel(S.name)||t,D=C.getModel(m),I=C.getModel(y),L=rx(D),M=rx(I),B=C.getModel(_),k=C.getModel(x),O;if(o){O=o.indexOfName(S.name);var V=o.getItemVisual(O,"color",!0);V&&(L.fill=V)}var H=function(qe){return[qe[0]*g[0]+p[0],qe[1]*g[1]+p[1]]};T(S.geometries,function(qe){if(qe.type==="polygon"){for(var Gs=[],Ei=0;Ei=0)&&(vt=t);var wt=new nt({position:H(S.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});if(Te(wt.style,wt.hoverStyle={},B,k,{labelFetcher:vt,labelDataIndex:et,defaultText:S.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!f){var Ut=[1/c[0],1/c[1]];tt(wt,{scale:Ut},t)}b.add(wt)}if(o)o.setItemGraphicEl(O,b);else{var C=t.getRegionModel(S.name);A.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:S.name,region:C&&C.option||{}}}var Vs=b.__regions||(b.__regions=[]);Vs.push(S),b.highDownSilentOnTouch=!!t.get("selectedMode"),St(b,M),l.add(b)}),this._updateController(t,e,r),yP(this,t,l,r,a),ax(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&as.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&T(as.makeGraphic(e,this.uid),function(r){this._backgroundGroup.add(r)},this),this._mapName=e},_updateController:function(t,e,r){var a=t.coordinateSystem,i=this._controller,n=this._controllerHost;n.zoomLimit=t.get("scaleLimit"),n.zoom=a.getZoom(),i.enable(t.get("roam")||!1);var o=t.mainType;function s(){var l={type:"geoRoam",componentType:o};return l[o+"Id"]=t.id,l}i.off("pan").on("pan",function(l){this._mouseDownFlag=!1,ad(n,l.dx,l.dy),r.dispatchAction(Z(s(),{dx:l.dx,dy:l.dy}))},this),i.off("zoom").on("zoom",function(l){if(this._mouseDownFlag=!1,id(n,l.scale,l.originX,l.originY),r.dispatchAction(Z(s(),{zoom:l.scale,originX:l.originX,originY:l.originY})),this._updateGroup){var u=this.group.scale;this._regionsGroup.traverse(function(h){h.type==="text"&&h.attr("scale",[1/u[0],1/u[1]])})}},this),i.setPointerChecker(function(l,u,h){return a.getViewRectAfterRoam().contain(u,h)&&!Mu(l,r,t)})}};var nd="__seriesMapHighDown",ix="__seriesMapCallKey";_e({type:"map",render:function(t,e,r,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var i=this.group;if(i.removeAll(),!t.getHostGeoModel()){if(a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var n=this._mapDraw;n&&i.add(n.group)}else if(t.needsDrawMap){var n=this._mapDraw||new Lu(r,!0);i.add(n.group),n.draw(t,e,r,this,a),this._mapDraw=n}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,r)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,r){var a=t.originalData,i=this.group;a.each(a.mapDimension("value"),function(n,o){if(!isNaN(n)){var s=a.getItemLayout(o);if(!(!s||!s.point)){var l=s.point,u=s.offset,h=new mr({style:{fill:t.getData().getVisual("color")},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:go+1)});if(!u){var f=t.mainSeries.getData(),c=a.getName(o),v=f.indexOfName(c),d=a.getItemModel(o),g=d.getModel("label"),p=d.getModel("emphasis.label"),m=f.getItemGraphicEl(v),y=Nt(t.getFormattedLabel(v,"normal"),c),_=Nt(t.getFormattedLabel(v,"emphasis"),y),x=m[nd],w=Math.random();if(!x){x=m[nd]={};var S=K(nx,!0),b=K(nx,!1);m.on("mouseover",S).on("mouseout",b).on("emphasis",S).on("normal",b)}m[ix]=w,Z(x,{recordVersion:w,circle:h,labelModel:g,hoverLabelModel:p,emphasisText:_,normalText:y}),ox(x,!1)}i.add(h)}}})}});function nx(t){var e=this[nd];e&&e.recordVersion===this[ix]&&ox(e,t)}function ox(t,e){var r=t.circle,a=t.labelModel,i=t.hoverLabelModel,n=t.emphasisText,o=t.normalText;e?(r.style.extendFrom(Rt({},i,{text:i.get("show")?n:null},{isRectText:!0,useInsideStyle:!1},!0)),r.__mapOriginalZ2=r.z2,r.z2+=go):(Rt(r.style,a,{text:a.get("show")?o:null,textPosition:a.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),r.dirty(!1),r.__mapOriginalZ2!=null&&(r.z2=r.__mapOriginalZ2,r.__mapOriginalZ2=null))}function od(t,e,r){var a=t.getZoom(),i=t.getCenter(),n=e.zoom,o=t.dataToPoint(i);if(e.dx!=null&&e.dy!=null){o[0]-=e.dx,o[1]-=e.dy;var i=t.pointToData(o);t.setCenter(i)}if(n!=null){if(r){var s=r.min||0,l=r.max||1/0;n=Math.max(Math.min(a*n,l),s)/a}t.scale[0]*=n,t.scale[1]*=n;var u=t.position,h=(e.originX-u[0])*(n-1),f=(e.originY-u[1])*(n-1);u[0]-=h,u[1]-=f,t.updateTransform();var i=t.pointToData(o);t.setCenter(i),t.setZoom(n*a)}return{center:t.getCenter(),zoom:t.getZoom()}}lt({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var r=t.componentType||"series";e.eachComponent({mainType:r,query:t},function(a){var i=a.coordinateSystem;if(i.type==="geo"){var n=od(i,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(n.center),a.setZoom&&a.setZoom(n.zoom),r==="series"&&T(a.seriesGroup,function(o){o.setCenter(n.center),o.setZoom(n.zoom)})}})});var sx=xt;function sd(){je.call(this)}pt(sd,je);function Ca(t){this.name=t,this.zoomLimit,je.call(this),this._roamTransformable=new sd,this._rawTransformable=new sd,this._center,this._zoom}Ca.prototype={constructor:Ca,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,a){return this._rect=new it(t,e,r,a),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,r,a){this.transformTo(t,e,r,a),this._viewRect=new it(t,e,r,a)},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._rawTransformable;n.transform=i.calculateTransform(new it(t,e,r,a)),n.decomposeTransform(),this._updateTransform()},setCenter:function(t){!t||(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(e.max!=null&&(t=Math.min(e.max,t)),e.min!=null&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,r=t.y+t.height/2;return[e,r]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,r=this.getDefaultCenter(),a=this.getCenter(),i=this.getZoom();a=xt([],a,t),r=xt([],r,t),e.origin=a,e.position=[r[0]-a[0],r[1]-a[1]],e.scale=[i,i],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Jn(this.transform||(this.transform=[]),e.transform||ce()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],$s(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?Oi(t):ce(),rawScale:Oi(e.scale),rawPosition:Oi(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,r){var a=e?this._rawTransform:this.transform;return r=r||[],a?sx(r,t,a):Jt(r,t)},pointToData:function(t){var e=this.invTransform;return e?sx([],t,e):[t[0],t[1]]},convertToPixel:K(lx,"dataToPoint"),convertFromPixel:K(lx,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},pt(Ca,je);function lx(t,e,r,a){var i=r.seriesModel,n=i?i.coordinateSystem:null;return n===this?n[t](a):null}function Tn(t,e,r,a){Ca.call(this,t),this.map=e;var i=as.load(e,r);this._nameCoordMap=i.nameCoordMap,this._regionsMap=i.regionsMap,this._invertLongitute=a??!0,this.regions=i.regions,this._rect=i.boundingRect}Tn.prototype={constructor:Tn,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,r=0;r1?(v.width=l,v.height=l/f):(v.height=l,v.width=l*f),v.y=s[1]-v.height/2,v.x=s[0]-v.width/2}else o=t.getBoxLayoutParams(),o.aspect=f,v=Ot(o,{width:u,height:h});this.setViewRect(v.x,v.y,v.width,v.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function fx(t,e){T(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var cx={dimensions:Tn.prototype.dimensions,create:function(t,e){var r=[];t.eachComponent("geo",function(i,n){var o=i.get("map"),s=i.get("aspectScale"),l=!0,u=tu.retrieveMap(o);u&&u[0]&&u[0].type==="svg"?(s==null&&(s=1),l=!1):s==null&&(s=.75);var h=new Tn(o+n,o,i.get("nameMap"),l);h.aspectScale=s,h.zoomLimit=i.get("scaleLimit"),r.push(h),fx(h,i),i.coordinateSystem=h,h.model=i,h.resize=hx,h.resize(i,e)}),t.eachSeries(function(i){var n=i.get("coordinateSystem");if(n==="geo"){var o=i.get("geoIndex")||0;i.coordinateSystem=r[o]}});var a={};return t.eachSeriesByType("map",function(i){if(!i.getHostGeoModel()){var n=i.getMapType();a[n]=a[n]||[],a[n].push(i)}}),T(a,function(i,n){var o=E(i,function(l){return l.get("nameMap")}),s=new Tn(n,n,Yn(o));s.zoomLimit=Et.apply(null,E(i,function(l){return l.get("scaleLimit")})),r.push(s),s.resize=hx,s.aspectScale=i[0].get("aspectScale"),s.resize(i[0],e),T(i,function(l){l.coordinateSystem=s,fx(s,l)})}),r},getFilledRegions:function(t,e,r){for(var a=(t||[]).slice(),i=j(),n=0;ne&&(e=a.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,r=this.children,a=r.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,r=e.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a?r.getModel(t,a.getModel(t)):r.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}};function fi(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=E(e||[],function(r){return new ht(r,t,t.ecModel)})}fi.prototype={constructor:fi,type:"tree",eachNode:function(t,e,r){this.root.eachNode(t,e,r)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,r=0,a=e.length;ro&&(o=u.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return i.root.eachNode("preorder",function(u){var h=u.hostTree.data.getRawDataItem(u.dataIndex);u.isExpand=h&&h.collapsed!=null?!h.collapsed:u.depth<=l}),i.data},getOrient:function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,r=e.root.children[0],a=e.getNodeByDataIndex(t),i=a.getValue(),n=a.name;a&&a!==r;)n=a.parentNode.name+"."+n,a=a.parentNode;return Tt(n+(isNaN(i)||i==null?"":" : "+i))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function LP(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e=[t],r,a;r=e.pop();)if(a=r.children,r.isExpand&&a.length)for(var i=a.length,n=i-1;n>=0;n--){var o=a[n];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:n,thread:null},e.push(o)}}function PP(t,e){var r=t.isExpand?t.children:[],a=t.parentNode.children,i=t.hierNode.i?a[t.hierNode.i-1]:null;if(r.length){kP(t);var n=(r[0].hierNode.prelim+r[r.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=NP(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function EP(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function gx(t){return arguments.length?t:BP}function os(t,e){var r={};return t-=Math.PI/2,r.x=e*Math.cos(t),r.y=e*Math.sin(t),r}function RP(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function kP(t){for(var e=t.children,r=e.length,a=0,i=0;--r>=0;){var n=e[r];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function NP(t,e,r,a){if(e){for(var i=t,n=t,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,h=o.hierNode.modifier,f=s.hierNode.modifier;s=hd(s),n=fd(n),s&&n;){i=hd(i),o=fd(o),i.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);c>0&&(zP(OP(s,t,r),t,c),u+=c,l+=c),f+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,h+=o.hierNode.modifier}s&&!hd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!fd(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,r=t)}return r}function hd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function fd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function OP(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function zP(t,e,r){var a=r/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=r,e.hierNode.modifier+=r,e.hierNode.prelim+=r,t.hierNode.change+=a}function BP(t,e){return t.parentNode===e.parentNode?1:2}var VP=Ge({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.childPoints,a=r.length,i=e.parentPoint,n=r[0],o=r[a-1];if(a===1){t.moveTo(i[0],i[1]),t.lineTo(n[0],n[1]);return}var s=e.orient,l=s==="TB"||s==="BT"?0:1,u=1-l,h=R(e.forkPosition,1),f=[];f[l]=i[l],f[u]=i[u]+(o[u]-i[u])*h,t.moveTo(i[0],i[1]),t.lineTo(f[0],f[1]),t.moveTo(n[0],n[1]),f[l]=n[l],t.lineTo(f[0],f[1]),f[l]=o[l],t.lineTo(f[0],f[1]),t.lineTo(o[0],o[1]);for(var c=1;cy.x,w||(x=x-Math.PI));var b=w?"left":"right",A=u.labelModel.get("rotate"),C=A*(Math.PI/180);p.setStyle({textPosition:u.labelModel.get("position")||b,textRotation:A==null?-x:C,textOrigin:"center",verticalAlign:"middle"})}GP(i,s,h,r,d,v,g,a,u)}function GP(t,e,r,a,i,n,o,s,l){var u=l.edgeShape,h=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==r&&(h||(h=a.__edge=new Dl({shape:cd(l,i,i),style:U({opacity:0,strokeNoScale:!0},l.lineStyle)})),tt(h,{shape:cd(l,n,o),style:{opacity:1}},t));else if(u==="polyline"){if(l.layout==="orthogonal"){if(e!==r&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var f=e.children,c=[],v=0;v=0;n--)r.push(i[n])}}var FP=function(t,e){t.eachSeriesByType("tree",function(r){WP(r,e)})};function WP(t,e){var r=RP(t,e);t.layoutInfo=r;var a=t.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(r.height,r.width)/2,o=gx(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(i=r.width,n=r.height,o=gx());var s=t.getData().tree.root,l=s.children[0];if(l){LP(s),HP(l,PP,o),s.hierNode.modifier=-l.hierNode.prelim,ss(l,EP);var u=l,h=l,f=l;ss(l,function(_){var x=_.getLayout().x;xh.getLayout().x&&(h=_),_.depth>f.depth&&(f=_)});var c=u===h?1:o(u,h)/2,v=c-u.getLayout().x,d=0,g=0,p=0,m=0;if(a==="radial")d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),ss(l,function(_){p=(_.getLayout().x+v)*d,m=(_.depth-1)*g;var x=os(p,m);_.setLayout({x:x.x,y:x.y,rawX:p,rawY:m},!0)});else{var y=t.getOrient();y==="RL"||y==="LR"?(g=n/(h.getLayout().x+c+v),d=i/(f.depth-1||1),ss(l,function(_){m=(_.getLayout().x+v)*g,p=y==="LR"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:p,y:m},!0)})):(y==="TB"||y==="BT")&&(d=i/(h.getLayout().x+c+v),g=n/(f.depth-1||1),ss(l,function(_){p=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*g:n-(_.depth-1)*g,_.setLayout({x:p,y:m},!0)}))}}}bt(li("tree","circle")),It(FP);function ls(t,e,r){if(t&&ut(e,t.type)>=0){var a=r.getData().tree.root,i=t.targetNode;if(typeof i=="string"&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=t.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function xx(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function vd(t,e){var r=xx(t);return ut(r,e)>=0}function dd(t,e){for(var r=[];t;){var a=t.dataIndex;r.push({name:t.name,dataIndex:a,value:e.getRawValue(a)}),t=t.parentNode}return r.reverse(),r}Dt.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var r={name:t.name,children:t.data};bx(r);var a=t.levels||[];a=t.levels=UP(a,e);var i=E(a||[],function(s){return new ht(s,this,e)},this),n=fi.createTree(r,this,null,o);function o(s){s.wrapMethod("getItemModel",function(l,u){var h=n.getNodeByDataIndex(u),f=i[h.depth];return f&&(l.parentModel=f),l})}return n.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),r=this.getRawValue(t),a=P(r)?da(r[0]):da(r),i=e.getName(t);return Tt(i+": "+a)},getDataParams:function(t){var e=Dt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=dd(r,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},Z(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=j(),this._idIndexMapCount=0);var r=e.get(t);return r==null&&e.set(t,r=this._idIndexMapCount++),r},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});function bx(t){var e=0;T(t.children,function(a){bx(a);var i=a.value;P(i)&&(i=i[0]),e+=i});var r=t.value;P(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),P(t.value)?t.value[0]=r:t.value=r}function UP(t,e){var r=e.get("color");if(!!r){t=t||[];var a;if(T(t,function(n){var o=new ht(n),s=o.get("color");(o.get("itemStyle.color")||s&&s!=="none")&&(a=!0)}),!a){var i=t[0]||(t[0]={});i.color=r.slice()}return t}}var $P=8,Sx=8,gd=5;function pd(t){this.group=new G,t.add(this.group)}pd.prototype={constructor:pd,render:function(t,e,r,a){var i=t.getModel("breadcrumb"),n=this.group;if(n.removeAll(),!(!i.get("show")||!r)){var o=i.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(r,l,s),this._renderContent(t,l,o,s,a),Fl(n,l.pos,l.box)}},_prepare:function(t,e,r){for(var a=t;a;a=a.parentNode){var i=a.getModel().get("name"),n=r.getTextRect(i),o=Math.max(n.width+$P*2,e.emptyItemWidth);e.totalWidth+=o+Sx,e.renderList.push({node:a,text:i,width:o})}},_renderContent:function(t,e,r,a,i){for(var n=0,o=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=QD(e.pos,e.box),u=e.totalWidth,h=e.renderList,f=h.length-1;f>=0;f--){var c=h[f],v=c.node,d=c.width,g=c.text;u>l.width&&(u-=d-o,d=o,g=null);var p=new Se({shape:{points:ZP(n,0,d,s,f===h.length-1,f===0)},style:U(r.getItemStyle(),{lineJoin:"bevel",text:g,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:K(i,v)});this.group.add(p),YP(p,t,v),n+=d+Sx}},remove:function(){this.group.removeAll()}};function ZP(t,e,r,a,i,n){var o=[[i?t:t-gd,e],[t+r,e],[t+r,e+a],[i?t:t-gd,e+a]];return!n&&o.splice(2,0,[t+r+gd,e+a/2]),!i&&o.push([t,e+a/2]),o}function YP(t,e,r){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&dd(r,e)}}function XP(){var t=[],e={},r;return{add:function(a,i,n,o,s){return _t(o)&&(s=o,o=0),e[a.id]?!1:(e[a.id]=1,t.push({el:a,target:i,time:n,delay:o,easing:s}),!0)},done:function(a){return r=a,this},start:function(){for(var a=t.length,i=0,n=t.length;iCx||Math.abs(t.dy)>Cx)){var e=this.seriesModel.getData().tree.root;if(!e)return;var r=e.getLayout();if(!r)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x+t.dx,y:r.y+t.dy,width:r.width,height:r.height}})}},_onZoom:function(t){var e=t.originX,r=t.originY;if(this._state!=="animating"){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;var n=new it(i.x,i.y,i.width,i.height),o=this.seriesModel.layoutInfo;e-=o.x,r-=o.y;var s=ce();Je(s,s,[-e,-r]),jn(s,s,[t.scale,t.scale]),Je(s,s,[e,r]),n.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x,y:n.y,width:n.width,height:n.height}})}},_initEvents:function(t){t.on("click",function(e){if(this._state==="ready"){var r=this.seriesModel.get("nodeClick",!0);if(!!r){var a=this.findTarget(e.offsetX,e.offsetY);if(!!a){var i=a.node;if(i.getLayout().isLeafRoot)this._rootToNode(a);else if(r==="zoomToNode")this._zoomToNode(a);else if(r==="link"){var n=i.hostTree.data.getItemModel(i.dataIndex),o=n.get("link",!0),s=n.get("target",!0)||"blank";o&&To(o,s)}}}}},this)},_renderBreadcrumb:function(t,e,r){r||(r=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),r||(r={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new pd(this.group))).render(t,e,r.node,Eu(a,this));function a(i){this._state!=="animating"&&(vd(t.getViewRoot(),i)?this._rootToNode({node:i}):this._zoomToNode({node:i}))}},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=us(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var r,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(i){var n=this._storage.background[i.getRawIndex()];if(n){var o=n.transformCoordToLocal(t,e),s=n.shape;if(s.x<=o[0]&&o[0]<=s.x+s.width&&s.y<=o[1]&&o[1]<=s.y+s.height)r={node:i,offsetX:o[0],offsetY:o[1]};else return!1}},this),r}});function us(){return{nodeGroup:[],background:[],content:[]}}function rE(t,e,r,a,i,n,o,s,l,u){if(!o)return;var h=o.getLayout(),f=t.getData();if(f.setItemGraphicEl(o.dataIndex,null),!h||!h.isInView)return;var c=h.width,v=h.height,d=h.borderWidth,g=h.invisible,p=o.getRawIndex(),m=s&&s.getRawIndex(),y=o.viewChildren,_=h.upperHeight,x=y&&y.length,w=o.getModel("itemStyle"),S=o.getModel("emphasis.itemStyle"),b=O("nodeGroup",Ax);if(!b)return;if(l.add(b),b.attr("position",[h.x||0,h.y||0]),b.__tmNodeWidth=c,b.__tmNodeHeight=v,h.isAboveViewRoot)return b;var A=o.getModel(),C=O("background",Tx,u,tE);if(C&&I(b,C,x&&h.upperLabelHeight),x)Rl(b)&&Ka(b,!1),C&&(Ka(C,!0),f.setItemGraphicEl(o.dataIndex,C));else{var D=O("content",Tx,u,eE);D&&L(b,D),C&&Rl(C)&&Ka(C,!1),Ka(b,!0),f.setItemGraphicEl(o.dataIndex,b)}return b;function I(W,F,N){if(F.dataIndex=o.dataIndex,F.seriesIndex=t.seriesIndex,F.setShape({x:0,y:0,width:c,height:v}),g)M(F);else{F.invisible=!1;var $=o.getVisual("borderColor",!0),et=S.get("borderColor"),vt=Dx(w);vt.fill=$;var wt=md(S);if(wt.fill=et,N){var Ut=c-2*d;B(vt,wt,$,Ut,_,{x:d,y:0,width:Ut,height:_})}else vt.text=wt.text=null;F.setStyle(vt),yo(F,wt)}W.add(F)}function L(W,F){F.dataIndex=o.dataIndex,F.seriesIndex=t.seriesIndex;var N=Math.max(c-2*d,0),$=Math.max(v-2*d,0);if(F.culling=!0,F.setShape({x:d,y:d,width:N,height:$}),g)M(F);else{F.invisible=!1;var et=o.getVisual("color",!0),vt=Dx(w);vt.fill=et;var wt=md(S);B(vt,wt,et,N,$),F.setStyle(vt),yo(F,wt)}W.add(F)}function M(W){!W.invisible&&n.push(W)}function B(W,F,N,$,et,vt){var wt=A.get("name"),Ut=A.getModel(vt?QP:qP),Vs=A.getModel(vt?JP:KP),qe=Ut.getShallow("show");Te(W,F,Ut,Vs,{defaultText:qe?wt:null,autoColor:N,isRectText:!0,labelFetcher:t,labelDataIndex:o.dataIndex,labelProp:vt?"upperLabel":"label"}),k(W,vt,h),k(F,vt,h),vt&&(W.textRect=Y(vt)),W.truncate=qe&&Ut.get("ellipsis")?{outerWidth:$,outerHeight:et,minChar:2}:null}function k(W,F,N){var $=W.text;if(!F&&N.isLeafRoot&&$!=null){var et=t.get("drillDownIcon",!0);W.text=et?et+" "+$:$}}function O(W,F,N,$){var et=m!=null&&r[W][m],vt=i[W];return et?(r[W][m]=null,V(vt,et,W)):g||(et=new F({z:aE(N,$)}),et.__tmDepth=N,et.__tmStorageName=W,H(vt,et,W)),e[W][p]=et}function V(W,F,N){var $=W[p]={};$.old=N==="nodeGroup"?F.position.slice():Z({},F.shape)}function H(W,F,N){var $=W[p]={},et=o.parentNode;if(et&&(!a||a.direction==="drillDown")){var vt=0,wt=0,Ut=i.background[et.getRawIndex()];!a&&Ut&&Ut.old&&(vt=Ut.old.width,wt=Ut.old.height),$.old=N==="nodeGroup"?[0,wt]:{x:vt,y:wt,width:0,height:0}}$.fadein=N!=="nodeGroup"}}function aE(t,e){var r=t*jP+e;return(r-1)/r}for(var iE=function(){},Ix=["treemapZoomToNode","treemapRender","treemapMove"],yd=0;yd=0;n--)r[n]==null&&(delete a[e[n]],e.pop())}function _d(t,e){var r=t.visual,a=[];Q(r)?hs(r,function(n){a.push(n)}):r!=null&&a.push(r);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(t.type)&&(a[1]=a[0]),Px(t,a)}function ku(t){return{applyVisual:function(e,r,a){e=this.mapValueToVisual(e),a("color",t(r("color"),e))},_doMap:xd([0,1])}}function Lx(t){var e=this.option.visual;return e[Math.round(At(t,[0,1],[0,e.length-1],!0))]||{}}function Nu(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function Ou(t){var e=this.option.visual;return e[this.option.loop&&t!==Ru?t%e.length:t]}function ci(){return this.option.visual[0]}function xd(t){return{linear:function(e){return At(e,t,this.option.visual,!0)},category:Ou,piecewise:function(e,r){var a=wd.call(this,r);return a==null&&(a=At(e,t,this.option.visual,!0)),a},fixed:ci}}function wd(t){var e=this.option,r=e.pieceList;if(e.hasSpecialVisual){var a=mt.findPieceIndex(t,r),i=r[a];if(i&&i.visual)return i.visual[this.type]}}function Px(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=E(e,function(r){return be(r)})),e}var sE={linear:function(t){return At(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,r=mt.findPieceIndex(t,e,!0);if(r!=null)return At(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??Ru},fixed:Kt};mt.listVisualTypes=function(){var t=[];return T(fs,function(e,r){t.push(r)}),t},mt.addVisualHandler=function(t,e){fs[t]=e},mt.isValidType=function(t){return fs.hasOwnProperty(t)},mt.eachVisual=function(t,e,r){Q(t)?T(t,e,r):e.call(r,t)},mt.mapVisual=function(t,e,r){var a,i=P(t)?[]:Q(t)?{}:(a=!0,null);return mt.eachVisual(t,function(n,o){var s=e.call(r,n,o);a?i=s:i[o]=s}),i},mt.retrieveVisuals=function(t){var e={},r;return t&&hs(fs,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],r=!0)}),r?e:null},mt.prepareVisualTypes=function(t){if(Mx(t)){var e=[];hs(t,function(r,a){e.push(a)}),t=e}else if(P(t))t=t.slice();else return[];return t.sort(function(r,a){return a==="color"&&r!=="color"&&r.indexOf("color")===0?1:-1}),t},mt.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},mt.findPieceIndex=function(t,e,r){for(var a,i=1/0,n=0,o=e.length;n=i.length||p===i[p.depth]){var y=vE(o,h,p,m,g,n);Ex(p,y,r,a,i,n)}})}}}function hE(t,e,r,a){var i=Z({},e);return T(["color","colorAlpha","colorSaturation"],function(n){var o=t.get(n,!0);o==null&&r&&(o=r[n]),o==null&&(o=e[n]),o==null&&(o=a.get(n)),o!=null&&(i[n]=o)}),i}function Rx(t){var e=Sd(t,"color");if(e){var r=Sd(t,"colorAlpha"),a=Sd(t,"colorSaturation");return a&&(e=$i(e,null,null,a)),r&&(e=Xs(e,r)),e}}function fE(t,e){return e!=null?$i(e,null,null,t):null}function Sd(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function cE(t,e,r,a,i,n){if(!(!n||!n.length)){var o=Ad(e,"color")||i.color!=null&&i.color!=="none"&&(Ad(e,"colorAlpha")||Ad(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=r.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(h==="index"||h==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var c=new mt(f);return c.__drColorMappingBy=h,c}}}function Ad(t,e){var r=t.get(e);return lE(r)&&r.length?{name:e,range:r}:null}function vE(t,e,r,a,i,n){var o=Z({},e);if(i){var s=i.type,l=s==="color"&&i.__drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(r.getId()):r.getValue(t.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var cs=Math.max,Bu=Math.min,kx=Et,Td=T,Nx=["itemStyle","borderWidth"],dE=["itemStyle","gapWidth"],gE=["upperLabel","show"],pE=["upperLabel","height"],mE={seriesType:"treemap",reset:function(t,e,r,a){var i=r.getWidth(),n=r.getHeight(),o=t.option,s=Ot(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=R(kx(s.width,l[0]),i),h=R(kx(s.height,l[1]),n),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=ls(a,c,t),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,g=t.getViewRoot(),p=xx(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?SE(t,v,g,u,h):d?[d.width,d.height]:[u,h],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(x),Ox(g,_,!1,0);var x=g.getLayout();Td(p,function(S,b){var A=(p[b+1]||g).getValue();S.setLayout(Z({dataExtent:[A,A],borderWidth:0,upperHeight:0},x))})}var w=t.getData().tree.root;w.setLayout(AE(s,d,v),!0),t.setLayoutInfo(s),Bx(w,new it(-s.x,-s.y,i,n),p,g,0)}};function Ox(t,e,r,a){var i,n;if(!t.isRemoved()){var o=t.getLayout();i=o.width,n=o.height;var v=t.getModel(),s=v.get(Nx),l=v.get(dE)/2,u=Vx(v),h=Math.max(s,u),f=s-l,c=h-l,v=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0),i=cs(i-2*f,0),n=cs(n-f-c,0);var d=i*n,g=yE(t,v,d,e,r,a);if(!!g.length){var p={x:f,y:c,width:i,height:n},m=Bu(i,n),y=1/0,_=[];_.area=0;for(var x=0,w=g.length;x=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/r*es[1]&&(s[1]=h)})}return{sum:a,dataExtent:s}}function bE(t,e,r){for(var a=0,i=1/0,n=0,o,s=t.length;na&&(a=o));var l=t.area*t.area,u=e*e*r;return l?cs(u*a/l,l/(u*i)):1/0}function zx(t,e,r,a,i){var n=e===r.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=r[s[n]],h=e?t.area/e:0;(i||h>r[l[o]])&&(h=r[l[o]]);for(var f=0,c=t.length;fIc&&(u=Ic),n=s}u=0&&t.call(e,r[i],i)},Ee.eachEdge=function(t,e){for(var r=this.edges,a=r.length,i=0;i=0&&r[i].node1.dataIndex>=0&&r[i].node2.dataIndex>=0&&t.call(e,r[i],i)},Ee.breadthFirstTraverse=function(t,e,r,a){if(lr.isInstance(e)||(e=this._nodesMap[Cn(e)]),!!e){for(var i=r==="out"?"outEdges":r==="in"?"inEdges":"edges",n=0;n=0&&s.node2.dataIndex>=0});for(var i=0,n=a.length;i=0&&this[t][e].setItemVisual(this.dataIndex,r,a)},getVisual:function(r,a){return this[t][e].getItemVisual(this.dataIndex,r,a)},setLayout:function(r,a){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,r,a)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};pt(lr,Gx("hostGraph","data")),pt(ds,Gx("hostGraph","edgeData")),vs.Node=lr,vs.Edge=ds,dl(lr),dl(ds);var Hx=function(t,e,r,a,i){for(var n=new vs(a),o=0;o "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=$r(t,r);else{var g=re.get(v),p=g&&g.type!=="view"?g.dimensions||[]:[];ut(p,"value")<0&&p.concat(["value"]);var m=un(t,{coordDimensions:p});d=new qt(m,r),d.initData(t)}var y=new qt(["value"],r);return y.initData(l,s),i&&i(d,y),vx({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n},gs=su({type:"series.graph",init:function(t){gs.superApply(this,"init",arguments);var e=this;function r(){return e._categoriesData}this.legendVisualProvider=new ts(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){gs.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){gs.superApply(this,"mergeDefaultAndTheme",arguments),Ua(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var r=t.edges||t.links||[],a=t.data||t.nodes||[],i=this;if(a&&r)return Hx(a,r,this,!0,n).data;function n(o,s){o.wrapMethod("getItemModel",function(v){var d=i._categoriesModels,g=v.getShallow("category"),p=d[g];return p&&(p.parentModel=v.parentModel,v.parentModel=p),v});var l=i.getModel("edgeLabel"),u=new ht({label:l.option},l.parentModel,e),h=i.getModel("emphasis.edgeLabel"),f=new ht({emphasis:{label:h.option}},h.parentModel,e);s.wrapMethod("getItemModel",function(v){return v.customizeGetParent(c),v});function c(v){return v=this.parsePath(v),v&&v[0]==="label"?u:v&&v[0]==="emphasis"&&v[1]==="label"?f:this.parentModel}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getData(),i=this.getDataParams(t,r),n=a.graph.getEdgeByIndex(t),o=a.getName(n.node1.dataIndex),s=a.getName(n.node2.dataIndex),l=[];return o!=null&&l.push(o),s!=null&&l.push(s),l=Tt(l.join(" > ")),i.value&&(l+=" : "+Tt(i.value)),l}else return gs.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=E(this.option.categories||[],function(r){return r.value!=null?r:Z({value:0},r)}),e=new qt(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(r){return e.getItemModel(r,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return gs.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),Fx=ee.prototype,Cd=Dl.prototype;function Dd(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var TE=Ge({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Dd(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:Fx.buildPath,_buildPathCurve:Cd.buildPath,pointAt:function(t){return this[Dd(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:Fx.pointAt,_pointAtCurve:Cd.pointAt,tangentAt:function(t){var e=this.shape,r=Dd(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return Bi(r,r)},_tangentAtCurve:Cd.tangentAt}),Id=["fromSymbol","toSymbol"];function Wx(t){return"_"+t+"Type"}function Ux(t,e,r){var a=e.getItemVisual(r,"color"),i=e.getItemVisual(r,t),n=e.getItemVisual(r,t+"Size");if(!(!i||i==="none")){P(n)||(n=[n,n]);var o=Le(i,-n[0]/2,-n[1]/2,n[0],n[1],a);return o.name=t,o}}function CE(t){var e=new TE({name:"line",subPixelOptimize:!0});return Md(e.shape,t),e}function Md(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var r=e[2];r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}function DE(){var t=this,e=t.childOfName("fromSymbol"),r=t.childOfName("toSymbol"),a=t.childOfName("label");if(!(!e&&!r&&a.ignore)){for(var i=1,n=this.parent;n;)n.scale&&(i/=n.scale[0]),n=n.parent;var o=t.childOfName("line");if(!(!this.__dirty&&!o.__dirty)){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),h=Er([],u,l);if(Bi(h,h),e){e.attr("position",l);var f=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0])),e.attr("scale",[i*s,i*s])}if(r){r.attr("position",u);var f=o.tangentAt(1);r.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0])),r.attr("scale",[i*s,i*s])}if(!a.ignore){a.attr("position",u);var c,v,d,g,p=a.__labelDistance,m=p[0]*i,y=p[1]*i,_=s/2,f=o.tangentAt(_),x=[f[1],-f[0]],w=o.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var S=f[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var b=-Math.atan2(f[1],f[0]);u[0].8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":c=[-h[0]*m+l[0],-h[1]*y+l[1]],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*S+l[0],l[1]+A],v=f[0]<0?"right":"left",g=[-m*S,-A];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[w[0],w[1]+A],v="center",g=[0,-A];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*S+u[0],u[1]+A],v=f[0]>=0?"right":"left",g=[m*S,-A];break}a.attr({style:{textVerticalAlign:a.__verticalAlign||d,textAlign:a.__textAlign||v},position:c,scale:[i,i],origin:g})}}}}function ps(t,e,r){G.call(this),this._createLine(t,e,r)}var Da=ps.prototype;Da.beforeUpdate=DE,Da._createLine=function(t,e,r){var a=t.hostModel,i=t.getItemLayout(e),n=CE(i);n.shape.percent=0,oe(n,{shape:{percent:1}},a,e),this.add(n);var o=new nt({name:"label",lineLabelOriginalOpacity:1});this.add(o),T(Id,function(s){var l=Ux(s,t,e);this.add(l),this[Wx(s)]=t.getItemVisual(e,s)},this),this._updateCommonStl(t,e,r)},Da.updateData=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=t.getItemLayout(e),o={shape:{}};Md(o.shape,n),tt(i,o,a,e),T(Id,function(s){var l=t.getItemVisual(e,s),u=Wx(s);if(this[u]!==l){this.remove(this.childOfName(s));var h=Ux(s,t,e);this.add(h)}this[u]=l},this),this._updateCommonStl(t,e,r)},Da._updateCommonStl=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=r&&r.lineStyle,o=r&&r.hoverLineStyle,s=r&&r.labelModel,l=r&&r.hoverLabelModel;if(!r||t.hasItemOption){var u=t.getItemModel(e);n=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),f=Ba(t.getItemVisual(e,"opacity"),n.opacity,1);i.useStyle(U({strokeNoScale:!0,fill:"none",stroke:h,opacity:f},n)),i.hoverStyle=o,T(Id,function(S){var b=this.childOfName(S);b&&(b.setColor(h),b.setStyle({opacity:f}))},this);var c=s.getShallow("show"),v=l.getShallow("show"),d=this.childOfName("label"),g,p;if((c||v)&&(g=h||"#000",p=a.getFormattedLabel(e,"normal",t.dataType),p==null)){var m=a.getRawValue(e);p=m==null?t.getName(e):isFinite(m)?Ft(m):m}var y=c?p:null,_=v?Nt(a.getFormattedLabel(e,"emphasis",t.dataType),p):null,x=d.style;if(y!=null||_!=null){Rt(d.style,s,{text:y},{autoColor:g}),d.__textAlign=x.textAlign,d.__verticalAlign=x.textVerticalAlign,d.__position=s.get("position")||"middle";var w=s.get("distance");P(w)||(w=[w,w]),d.__labelDistance=w}_!=null?d.hoverStyle={text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:d.hoverStyle={text:null},d.ignore=!c&&!v,St(this)},Da.highlight=function(){this.trigger("emphasis")},Da.downplay=function(){this.trigger("normal")},Da.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Da.setLinePoints=function(t){var e=this.childOfName("line");Md(e.shape,t),e.dirty()},yt(ps,G);function Vu(t){this._ctor=t||ps,this.group=new G}var vi=Vu.prototype;vi.isPersistent=function(){return!0},vi.updateData=function(t){var e=this,r=e.group,a=e._lineData;e._lineData=t,a||r.removeAll();var i=$x(t);t.diff(a).add(function(n){IE(e,t,n,i)}).update(function(n,o){ME(e,a,t,o,n,i)}).remove(function(n){r.remove(a.getItemGraphicEl(n))}).execute()};function IE(t,e,r,a){var i=e.getItemLayout(r);if(!!Ld(i)){var n=new t._ctor(e,r,a);e.setItemGraphicEl(r,n),t.group.add(n)}}function ME(t,e,r,a,i,n){var o=e.getItemGraphicEl(a);if(!Ld(r.getItemLayout(i))){t.group.remove(o);return}o?o.updateData(r,i,n):o=new t._ctor(r,i,n),r.setItemGraphicEl(i,o),t.group.add(o)}vi.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,r){e.updateLayout(t,r)},this)},vi.incrementalPrepareUpdate=function(t){this._seriesScope=$x(t),this._lineData=null,this.group.removeAll()};function LE(t){return t.animators&&t.animators.length>0}vi.incrementalUpdate=function(t,e){function r(o){!o.isGroup&&!LE(o)&&(o.incremental=o.useHoverLayer=!0)}for(var a=t.start;a=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}var Nd=function(t,e){var r=[],a=uc,i=[[],[],[]],n=[[],[]],o=[];e/=2,t.eachEdge(function(s,l){var u=s.getLayout(),h=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Qe(u[0]),Qe(u[1])],u[2]&&u.__original.push(Qe(u[2])));var c=u.__original;if(u[2]!=null){if(Jt(i[0],c[0]),Jt(i[1],c[2]),Jt(i[2],c[1]),h&&h!=="none"){var v=ys(s.node1),d=Xx(i,c[0],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[0][0]=r[3],i[1][0]=r[4],a(i[0][1],i[1][1],i[2][1],d,r),i[0][1]=r[3],i[1][1]=r[4]}if(f&&f!=="none"){var v=ys(s.node2),d=Xx(i,c[1],v*e);a(i[0][0],i[1][0],i[2][0],d,r),i[1][0]=r[1],i[2][0]=r[2],a(i[0][1],i[1][1],i[2][1],d,r),i[1][1]=r[1],i[2][1]=r[2]}Jt(u[0],i[0]),Jt(u[1],i[2]),Jt(u[2],i[1])}else{if(Jt(n[0],c[0]),Jt(n[1],c[1]),Er(o,n[1],n[0]),Bi(o,o),h&&h!=="none"){var v=ys(s.node1);qn(n[0],n[0],o,v*e)}if(f&&f!=="none"){var v=ys(s.node2);qn(n[1],n[1],o,-v*e)}Jt(u[0],n[0]),Jt(u[1],n[1])}})},In="__focusNodeAdjacency",Mn="__unfocusNodeAdjacency",di=["itemStyle","opacity"],Gu=["lineStyle","opacity"];function qx(t,e){var r=t.getVisual("opacity");return r??t.getModel().get(e)}function Hu(t,e,r){var a=t.getGraphicEl(),i=qx(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){if(!n.isGroup){var o=n.lineLabelOriginalOpacity;(o==null||r!=null)&&(o=i),n.setStyle("opacity",o)}})}function gi(t,e){var r=qx(t,e),a=t.getGraphicEl();a.traverse(function(i){!i.isGroup&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}_e({type:"graph",init:function(t,e){var r=new gn,a=new Vu,i=this.group;this._controller=new An(e.getZr()),this._controllerHost={target:i},i.add(r.group),i.add(a.group),this._symbolDraw=r,this._lineDraw=a,this._firstRender=!0},render:function(t,e,r){var a=this,i=t.coordinateSystem;this._model=t;var n=this._symbolDraw,o=this._lineDraw,s=this.group;if(i.type==="view"){var l={position:i.position,scale:i.scale};this._firstRender?s.attr(l):tt(s,l,t)}Nd(t.getGraph(),ms(t));var u=t.getData();n.updateData(u);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,r),clearTimeout(this._layoutTimeout);var f=t.forceLayout,c=t.get("force.layoutAnimation");f&&this._startForceLayoutIteration(f,c),u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m);p.off("drag").off("dragend");var _=y.get("draggable");_&&p.on("drag",function(){f&&(f.warmUp(),!this._layouting&&this._startForceLayoutIteration(f,c),f.setFixed(m),u.setItemLayout(m,p.position))},this).on("dragend",function(){f&&f.setUnfixed(m)},this),p.setDraggable(_&&f),p[In]&&p.off("mouseover",p[In]),p[Mn]&&p.off("mouseout",p[Mn]),y.get("focusNodeAdjacency")&&(p.on("mouseover",p[In]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:p.dataIndex})}),p.on("mouseout",p[Mn]=function(){a._dispatchUnfocus(r)}))},this),u.graph.eachEdge(function(p){var m=p.getGraphicEl();m[In]&&m.off("mouseover",m[In]),m[Mn]&&m.off("mouseout",m[Mn]),p.getModel().get("focusNodeAdjacency")&&(m.on("mouseover",m[In]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:p.dataIndex})}),m.on("mouseout",m[Mn]=function(){a._dispatchUnfocus(r)}))});var v=t.get("layout")==="circular"&&t.get("circular.rotateLabel"),d=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(p,m){var y=u.getItemModel(m),_=y.get("label.rotate")||0,x=p.getSymbolPath();if(v){var w=u.getItemLayout(m),S=Math.atan2(w[1]-g,w[0]-d);S<0&&(S=Math.PI*2+S);var b=w[0]=i/3?1:2),l=e.y-a(o)*n*(n>=i/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+r(o)*n,e.y+a(o)*n),t.lineTo(e.x+r(e.angle)*i,e.y+a(e.angle)*i),t.lineTo(e.x-r(o)*n,e.y-a(o)*n),t.lineTo(s,l)}});function WE(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=R(r[0],e.getWidth()),s=R(r[1],e.getHeight()),l=R(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function tw(t,e){return e&&(typeof e=="string"?t=e.replace("{value}",t??""):typeof e=="function"&&(t=e(t))),t}var UE=Math.PI*2,e5=Yt.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var a=t.get("axisLine.lineStyle.color"),i=WE(t,r);this._renderMain(t,e,r,a,i)},dispose:function(){},_renderMain:function(t,e,r,a,i){for(var n=this.group,o=t.getModel("axisLine"),s=o.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,f=(h-u)%UE,c=u,v=s.get("width"),d=o.get("show"),g=0;d&&g=x&&(w===0?0:a[w-1][0]).4?"bottom":"middle",textAlign:I<-.4?"left":I>.4?"right":"center"},{autoColor:O}),silent:!0}))}if(g.get("show")&&D!==m){for(var V=0;V<=y;V++){var I=Math.cos(w),L=Math.sin(w),H=new ee({shape:{x1:I*f+u,y1:L*f+h,x2:I*(f-x)+u,y2:L*(f-x)+h},silent:!0,style:C});C.stroke==="auto"&&H.setStyle({stroke:a((D+V/y)/m)}),l.add(H),w+=b}w-=b}else w+=S}},_renderPointer:function(t,e,r,a,i,n,o,s){var l=this.group,u=this._data;if(!t.get("pointer.show")){u&&u.eachItemGraphicEl(function(d){l.remove(d)});return}var h=[+t.get("min"),+t.get("max")],f=[n,o],c=t.getData(),v=c.mapDimension("value");c.diff(u).add(function(d){var g=new FE({shape:{angle:n}});oe(g,{shape:{angle:At(c.get(v,d),h,f,!0)}},t),l.add(g),c.setItemGraphicEl(d,g)}).update(function(d,g){var p=u.getItemGraphicEl(g);tt(p,{shape:{angle:At(c.get(v,d),h,f,!0)}},t),l.add(p),c.setItemGraphicEl(d,p)}).remove(function(d){var g=u.getItemGraphicEl(d);l.remove(g)}).execute(),c.eachItemGraphicEl(function(d,g){var p=c.getItemModel(g),m=p.getModel("pointer");d.setShape({x:i.cx,y:i.cy,width:R(m.get("width"),i.r),r:R(m.get("length"),i.r)}),d.useStyle(p.getModel("itemStyle").getItemStyle()),d.style.fill==="auto"&&d.setStyle("fill",a(At(c.get(v,g),h,[0,1],!0))),St(d,p.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,r,a,i){var n=t.getData(),o=n.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=i.cx+R(l[0],i.r),h=i.cy+R(l[1],i.r),f=+t.get("min"),c=+t.get("max"),v=t.getData().get(o,0),d=a(At(v,[f,c],[0,1],!0));this.group.add(new nt({silent:!0,style:Rt({},s,{x:u,y:h,text:n.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,r,a,i){var n=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(n.get("show")){var l=n.get("offsetCenter"),u=i.cx+R(l[0],i.r),h=i.cy+R(l[1],i.r),f=R(n.get("width"),i.r),c=R(n.get("height"),i.r),v=t.getData(),d=v.get(v.mapDimension("value"),0),g=a(At(d,[o,s],[0,1],!0));this.group.add(new nt({silent:!0,style:Rt({},n,{x:u,y:h,text:tw(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),ew=su({type:"series.funnel",init:function(t){ew.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return wn(this,{coordDimensions:["value"],encodeDefaulter:K(Gc,this)})},_defaultLabelLine:function(t){Ua(t,"labelLine",["show"]);var e=t.labelLine,r=t.emphasis.labelLine;e.show=e.show&&t.label.show,r.show=r.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),r=ew.superCall(this,"getDataParams",t),a=e.mapDimension("value"),i=e.getSum(a);return r.percent=i?+(e.get(a,t)/i*100).toFixed(2):0,r.$vars.push("percent"),r},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function zd(t,e){G.call(this);var r=new Se,a=new Ve,i=new nt;this.add(r),this.add(a),this.add(i),this.highDownOnUpdate=function(n,o){o==="emphasis"?(a.ignore=a.hoverIgnore,i.ignore=i.hoverIgnore):(a.ignore=a.normalIgnore,i.ignore=i.normalIgnore)},this.updateData(t,e,!0)}var rw=zd.prototype,$E=["itemStyle","opacity"];rw.updateData=function(t,e,r){var a=this.childAt(0),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get($E);s=s??1,a.useStyle({}),r?(a.setShape({points:o.points}),a.setStyle({opacity:0}),oe(a,{style:{opacity:s}},i,e)):tt(a,{style:{opacity:s},shape:{points:o.points}},i,e);var l=n.getModel("itemStyle"),u=t.getItemVisual(e,"color");a.setStyle(U({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),a.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),St(this)},rw._updateLabel=function(t,e){var r=this.childAt(1),a=this.childAt(2),i=t.hostModel,n=t.getItemModel(e),o=t.getItemLayout(e),s=o.label,c=t.getItemVisual(e,"color");tt(r,{shape:{points:s.linePoints||s.linePoints}},i,e),tt(a,{style:{x:s.x,y:s.y}},i,e),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var l=n.getModel("label"),u=n.getModel("emphasis.label"),h=n.getModel("labelLine"),f=n.getModel("emphasis.labelLine"),c=t.getItemVisual(e,"color");Te(a.style,a.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:c,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),a.ignore=a.normalIgnore=!l.get("show"),a.hoverIgnore=!u.get("show"),r.ignore=r.normalIgnore=!h.get("show"),r.hoverIgnore=!f.get("show"),r.setStyle({stroke:c}),r.setStyle(h.getModel("lineStyle").getLineStyle()),r.hoverStyle=f.getModel("lineStyle").getLineStyle()},yt(zd,G);var r5=Yt.extend({type:"funnel",render:function(t,e,r){var a=t.getData(),i=this._data,n=this.group;a.diff(i).add(function(o){var s=new zd(a,o);a.setItemGraphicEl(o,s),n.add(s)}).update(function(o,s){var l=i.getItemGraphicEl(s);l.updateData(a,o),n.add(l),a.setItemGraphicEl(o,l)}).remove(function(o){var s=i.getItemGraphicEl(o);n.remove(s)}).execute(),this._data=a},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function ZE(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function YE(t,e){for(var r=t.mapDimension("value"),a=t.mapArray(r,function(l){return l}),i=[],n=e==="ascending",o=0,s=t.count();on&&(e[1-a]=e[a]+f.sign*n),e};function Bd(t,e){var r=t[e]-t[1-e];return{span:Math.abs(r),sign:r>0?-1:r<0?1:e?-1:1}}function Pn(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var Vd=T,aw=Math.min,iw=Math.max,nw=Math.floor,jE=Math.ceil,ow=Ft,tR=Math.PI;function Gd(t,e,r){this._axesMap=j(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,r)}Gd.prototype={type:"parallel",constructor:Gd,_init:function(t,e,r){var a=t.dimensions,i=t.parallelAxisIndex;Vd(a,function(n,o){var s=i[o],l=e.getComponent("parallelAxis",s),u=this._axesMap.set(n,new Wu(n,dn(l),[0,0],l.get("type"),s)),h=u.type==="category";u.onBand=h&&l.get("boundaryGap"),u.inverse=l.get("inverse"),l.axis=u,u.model=l,u.coordinateSystem=l.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),r=e.axisBase,a=e.layoutBase,i=e.pixelDimIndex,n=t[1-i],o=t[i];return n>=r&&n<=r+e.axisLength&&o>=a&&o<=a+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(r){if(!!t.contains(r,e)){var a=r.getData();Vd(this.dimensions,function(i){var n=this._axesMap.get(i);n.scale.unionExtentFromData(a,a.mapDimension(i)),xa(n.scale,n.model)},this)}},this)},resize:function(t,e){this._rect=Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t=this._model,e=this._rect,r=["x","y"],a=["width","height"],i=t.get("layout"),n=i==="horizontal"?0:1,o=e[a[n]],s=[0,o],l=this.dimensions.length,u=Uu(t.get("axisExpandWidth"),s),h=Uu(t.get("axisExpandCount")||0,[0,l]),f=t.get("axisExpandable")&&l>3&&l>h&&h>1&&u>0&&o>0,c=t.get("axisExpandWindow"),v;if(c)v=Uu(c[1]-c[0],s),c[1]=c[0]+v;else{v=Uu(u*(h-1),s);var d=t.get("axisExpandCenter")||nw(l/2);c=[u*d-v/2],c[1]=c[0]+v}var g=(o-v)/(l-h);g<3&&(g=0);var p=[nw(ow(c[0]/u,1))+1,jE(ow(c[1]/u,1))-1],m=g/u*c[0];return{layout:i,pixelDimIndex:n,layoutBase:e[r[n]],layoutLength:o,axisBase:e[r[1-n]],axisLength:e[a[1-n]],axisExpandable:f,axisExpandWidth:u,axisCollapseWidth:g,axisExpandWindow:c,axisCount:l,winInnerIndices:p,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,r=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;e.each(function(n){var o=[0,a.axisLength],s=n.inverse?1:0;n.setExtent(o[s],o[1-s])}),Vd(r,function(n,o){var s=(a.axisExpandable?rR:eR)(o,a),l={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},u={horizontal:tR/2,vertical:0},h=[l[i].x+t.x,l[i].y+t.y],f=u[i],c=ce();Or(c,c,f),Je(c,c,h),this._axesLayout[n]={position:h,rotation:f,transform:c,axisNameAvailableWidth:s.axisNameAvailableWidth,axisLabelShow:s.axisLabelShow,nameTruncateMaxWidth:s.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,r,a){r==null&&(r=0),a==null&&(a=t.count());var i=this._axesMap,n=this.dimensions,o=[],s=[];T(n,function(g){o.push(t.mapDimension(g)),s.push(i.get(g).model)});for(var l=this.hasAxisBrushed(),u=r;ui*(1-h[0])?(l="jump",s=o-i*(1-h[2])):(s=o-i*h[1])>=0&&(s=o-i*(1-h[1]))<=0&&(s=0),s*=e.axisExpandWidth/u,s?pi(s,a,n,"all"):l="none";else{var i=a[1]-a[0],c=n[1]*o/i;a=[iw(0,c-i/2)],a[1]=aw(n[1],a[0]+i),a[0]=a[1]-i}return{axisExpandWindow:a,behavior:l}}};function Uu(t,e){return aw(iw(t,e[0]),e[1])}function eR(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function rR(t,e){var r=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,h;return t=0;r--)Ja(e[r])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(t==null||isNaN(t))return"inactive";if(e.length===1){var r=e[0];if(r[0]<=t&&t<=r[1])return"active"}else for(var a=0,i=e.length;ahR}function gw(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function pw(t,e,r,a){var i=new G;return i.add(new ft({name:"main",style:Zd(r),silent:!0,draggable:!0,cursor:"move",drift:Ia(t,e,i,"nswe"),ondragend:Ia(mi,e,{isEnd:!0})})),Dr(a,function(n){i.add(new ft({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ia(t,e,i,n),ondragend:Ia(mi,e,{isEnd:!0})}))}),i}function mw(t,e,r,a){var i=a.brushStyle.lineWidth||0,n=En(i,fR),o=r[0][0],s=r[1][0],l=o-i/2,u=s-i/2,h=r[0][1],f=r[1][1],c=h-n+i/2,v=f-n+i/2,d=h-o,g=f-s,p=d+i,m=g+i;Yr(t,e,"main",o,s,d,g),a.transformable&&(Yr(t,e,"w",l,u,n,m),Yr(t,e,"e",c,u,n,m),Yr(t,e,"n",l,u,p,n),Yr(t,e,"s",l,v,p,n),Yr(t,e,"nw",l,u,n,n),Yr(t,e,"ne",c,u,n,n),Yr(t,e,"sw",l,v,n,n),Yr(t,e,"se",c,v,n,n))}function $d(t,e){var r=e.__brushOption,a=r.transformable,i=e.childAt(0);i.useStyle(Zd(r)),i.attr({silent:!a,cursor:a?"move":"default"}),Dr(["w","e","n","s","se","sw","ne","nw"],function(n){var o=e.childOfName(n),s=Yd(t,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?vR[s]+"-resize":null})})}function Yr(t,e,r,a,i,n,o){var s=e.childOfName(r);s&&s.setShape(bR(Xd(t,e,[[a,i],[a+n,i+o]])))}function Zd(t){return U({strokeNoScale:!0},t.brushStyle)}function yw(t,e,r,a){var i=[_s(t,r),_s(e,a)],n=[En(t,r),En(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function xR(t){return Qa(t.group)}function Yd(t,e){if(e.length>1){e=e.split("");var r=[Yd(t,e[0]),Yd(t,e[1])];return(r[0]==="e"||r[0]==="w")&&r.reverse(),r.join("")}else{var a={w:"left",e:"right",n:"top",s:"bottom"},i={left:"w",right:"e",top:"n",bottom:"s"},r=Ac(a[e],xR(t));return i[r]}}function _w(t,e,r,a,i,n,o,s){var l=a.__brushOption,u=t(l.range),h=xw(r,n,o);Dr(i.split(""),function(f){var c=cR[f];u[c[0]][c[1]]+=h[c[0]]}),l.range=e(yw(u[0][0],u[1][0],u[0][1],u[1][1])),Hd(r,a),mi(r,{isEnd:!1})}function wR(t,e,r,a,i){var n=e.__brushOption.range,o=xw(t,r,a);Dr(n,function(s){s[0]+=o[0],s[1]+=o[1]}),Hd(t,e),mi(t,{isEnd:!1})}function xw(t,e,r){var a=t.group,i=a.transformCoordToLocal(e,r),n=a.transformCoordToLocal(0,0);return[i[0]-n[0],i[1]-n[1]]}function Xd(t,e,r){var a=dw(t,e);return a&&a!==!0?a.clipPath(r,t._transform):Y(r)}function bR(t){var e=_s(t[0][0],t[1][0]),r=_s(t[0][1],t[1][1]),a=En(t[0][0],t[1][0]),i=En(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:i-r}}function SR(t,e,r){if(!(!t._brushType||TR(t,e))){var a=t._zr,i=t._covers,n=Wd(t,e,r);if(!t._dragging)for(var o=0;oa.getWidth()||r<0||r>a.getHeight()}var $u={lineX:Aw(0),lineY:Aw(1),rect:{createCover:function(t,e){return pw(Ia(_w,function(r){return r},function(r){return r}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=gw(t);return yw(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){mw(t,e,r,a)},updateCommon:$d,contain:Kd},polygon:{createCover:function(t,e){var r=new G;return r.add(new Ve({name:"main",style:Zd(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Se({name:"main",draggable:!0,drift:Ia(wR,t,e),ondragend:Ia(mi,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:Xd(t,e,r)})},updateCommon:$d,contain:Kd}};function Aw(t){return{createCover:function(e,r){return pw(Ia(_w,function(a){var i=[a,[0,100]];return t&&i.reverse(),i},function(a){return a[t]}),e,r,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var r=gw(e),a=_s(r[0][t],r[1][t]),i=En(r[0][t],r[1][t]);return[a,i]},updateCoverShape:function(e,r,a,i){var n,o=dw(e,r);if(o!==!0&&o.getLinearBrushOtherExtent)n=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;n=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[a,n];t&&l.reverse(),mw(e,r,l,i)},updateCommon:$d,contain:Kd}}function Tw(t){return t=Qd(t),function(e,r){return B0(e,t)}}function Cw(t,e){return t=Qd(t),function(r){var a=e??r,i=a?t.width:t.height,n=a?t.x:t.y;return[n,n+(i||0)]}}function Dw(t,e,r){return t=Qd(t),function(a,i,n){return t.contain(i[0],i[1])&&!Mu(a,e,r)}}function Qd(t){return it.create(t)}var CR=["axisLine","axisTickLabel","axisName"],DR=Xt({type:"parallelAxis",init:function(t,e){DR.superApply(this,"init",arguments),(this._brushController=new Rn(e.getZr())).on("brush",X(this._onBrush,this))},render:function(t,e,r,a){if(!IR(t,e,a)){this.axisModel=t,this.api=r,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new G,this.group.add(this._axisGroup),!!t.get("show")){var n=LR(t,e),o=n.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=o.getAxisLayout(u),f=Z({strokeContainThreshold:l},h),c=new xe(t,f);T(CR,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(f,s,t,n,l,r);var v=a&&a.animation===!1?null:t;Ol(i,this._axisGroup,v)}}},_refreshBrushController:function(t,e,r,a,i,n){var o=r.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,Math.abs(s)*.1),u=it.create({x:o[0],y:-i/2,width:s,height:i});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Tw(u),isTargetByCursor:Dw(u,n,a),getLinearBrushOtherExtent:Cw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(MR(r))},_onBrush:function(t,e){var r=this.axisModel,a=r.axis,i=E(t,function(n){return[a.coordToData(n.range[0],!0),a.coordToData(n.range[1],!0)]});(!r.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:r.id,intervals:i})},dispose:function(){this._brushController.dispose()}});function IR(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function MR(t){var e=t.axis;return E(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function LR(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var PR=5;Xt({type:"parallel",render:function(t,e,r){this._model=t,this._api=r,this._handlers||(this._handlers={},T(ER,function(a,i){r.getZr().on(i,this._handlers[i]=X(a,this))},this)),ko(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){T(this._handlers,function(r,a){e.getZr().off(a,r)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(Z({type:"parallelAxisExpand"},t))}});var ER={mousedown:function(t){Jd(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Jd(this,"click")&&e){var r=[t.offsetX,t.offsetY],a=Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2);if(a>PR)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!(this._mouseDownPoint||!Jd(this,"mousemove"))){var e=this._model,r=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),a=r.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:r.axisExpandWindow,animation:a==="jump"?null:!1})}}};function Jd(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}ie(KE),Dt.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var r=this.getSource();return RR(r,this),$r(r,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,r=this.getData(),a=[];return e.eachActiveState(r,function(i,n){t===i&&a.push(r.getRawIndex(n))}),a},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function RR(t,e){if(!t.encodeDefine){var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!!r){var a=t.encodeDefine=j();T(r.dimensions,function(i){var n=kR(i);a.set(i,n)})}}}function kR(t){return+t.replace("dim","")}var Iw=.3,a5=Yt.extend({type:"parallel",init:function(){this._dataGroup=new G,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,r,a){var i=this._dataGroup,n=t.getData(),o=this._data,s=t.coordinateSystem,l=s.dimensions,u=Pw(t);n.diff(o).add(h).update(f).remove(c).execute();function h(d){var g=Lw(n,i,d,l,s);jd(g,n,d,u)}function f(d,g){var p=o.getItemGraphicEl(g),m=Mw(n,d,l,s);n.setItemGraphicEl(d,p);var y=a&&a.animation===!1?null:t;tt(p,{shape:{points:m}},y,d),jd(p,n,d,u)}function c(d){var g=o.getItemGraphicEl(d);i.remove(g)}if(!this._initialized){this._initialized=!0;var v=NR(s,t,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(v)}this._data=n},incrementalPrepareRender:function(t,e,r){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,r){for(var a=e.getData(),i=e.coordinateSystem,n=i.dimensions,o=Pw(e),s=t.start;s=0)n[i[o].depth]=new ht(i[o],this,e);else if(z)throw new Error("levels[i].depth is mandatory and should be natural number");if(a&&r){var s=Hx(a,r,this,!0,l);return s.data}function l(u,h){u.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getData().getItemLayout(c).depth,p=d.levelModels[g];return p||this.parentModel}),f}),h.wrapMethod("getItemModel",function(f,c){return f.customizeGetParent(function(v){var d=this.parentModel,g=d.getGraph().getEdgeByIndex(c),p=g.node1.getLayout().depth,m=d.levelModels[p];return m||this.parentModel}),f})}},setNodePosition:function(t,e){var r=this.option.data[t];r.localX=e[0],r.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,r){if(r==="edge"){var a=this.getDataParams(t,r),i=a.data,n=i.source+" -- "+i.target;return a.value&&(n+=" : "+a.value),Tt(n)}else if(r==="node"){var o=this.getGraph().getNodeByIndex(t),s=o.getLayout().value,l=this.getDataParams(t,r).data.name;if(s)var n=l+" : "+s;return Tt(n)}return Ew.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var r=Ew.superCall(this,"getDataParams",t,e);if(r.value==null&&e==="node"){var a=this.getGraph().getNodeByIndex(t),i=a.getLayout().value;r.value=i}return r},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),Rw=["itemStyle","opacity"],yi=["emphasis","itemStyle","opacity"],kw=["lineStyle","opacity"],Zu=["emphasis","lineStyle","opacity"];function Nw(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Yu(t,e,r){var a=t.getGraphicEl(),i=Nw(t,e);r!=null&&(i==null&&(i=1),i*=r),a.downplay&&a.downplay(),a.traverse(function(n){n.type!=="group"&&n.setStyle("opacity",i)})}function ur(t,e){var r=Nw(t,e),a=t.getGraphicEl();a.traverse(function(i){i.type!=="group"&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}var VR=Ge({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var r=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),e.orient==="vertical"?(t.lineTo(e.x2+r,e.y2),t.bezierCurveTo(e.cpx2+r,e.cpy2,e.cpx1+r,e.cpy1,e.x1+r,e.y1)):(t.lineTo(e.x2,e.y2+r),t.bezierCurveTo(e.cpx2,e.cpy2+r,e.cpx1,e.cpy1+r,e.x1,e.y1+r)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});_e({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,r){var a=this,i=t.getGraph(),n=this.group,o=t.layoutInfo,s=o.width,l=o.height,u=t.getData(),h=t.getData("edge"),f=t.get("orient");this._model=t,n.removeAll(),n.attr("position",[o.x,o.y]),i.eachEdge(function(c){var v=new VR;v.dataIndex=c.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var d=c.getModel("lineStyle"),g=d.get("curveness"),p=c.node1.getLayout(),m=c.node1.getModel(),y=m.get("localX"),_=m.get("localY"),x=c.node2.getLayout(),w=c.node2.getModel(),S=w.get("localX"),b=w.get("localY"),A=c.getLayout(),C,D,I,L,M,B,k,O;switch(v.shape.extent=Math.max(1,A.dy),v.shape.orient=f,f==="vertical"?(C=(y!=null?y*s:p.x)+A.sy,D=(_!=null?_*l:p.y)+p.dy,I=(S!=null?S*s:x.x)+A.ty,L=b!=null?b*l:x.y,M=C,B=D*(1-g)+L*g,k=I,O=D*g+L*(1-g)):(C=(y!=null?y*s:p.x)+p.dx,D=(_!=null?_*l:p.y)+A.sy,I=S!=null?S*s:x.x,L=(b!=null?b*l:x.y)+A.ty,M=C*(1-g)+I*g,B=D,k=C*g+I*(1-g),O=L),v.setShape({x1:C,y1:D,x2:I,y2:L,cpx1:M,cpy1:B,cpx2:k,cpy2:O}),v.setStyle(d.getItemStyle()),v.style.fill){case"source":v.style.fill=c.node1.getVisual("color");break;case"target":v.style.fill=c.node2.getVisual("color");break}St(v,c.getModel("emphasis.lineStyle").getItemStyle()),n.add(v),h.setItemGraphicEl(c.dataIndex,v)}),i.eachNode(function(c){var v=c.getLayout(),d=c.getModel(),g=d.get("localX"),p=d.get("localY"),m=d.getModel("label"),y=d.getModel("emphasis.label"),_=new ft({shape:{x:g!=null?g*s:v.x,y:p!=null?p*l:v.y,width:v.dx,height:v.dy},style:d.getModel("itemStyle").getItemStyle()}),x=c.getModel("emphasis.itemStyle").getItemStyle();Te(_.style,x,m,y,{labelFetcher:t,labelDataIndex:c.dataIndex,defaultText:c.id,isRectText:!0}),_.setStyle("fill",c.getVisual("color")),St(_,x),n.add(_),u.setItemGraphicEl(c.dataIndex,_),_.dataType="node"}),u.eachItemGraphicEl(function(c,v){var d=u.getItemModel(v);d.get("draggable")&&(c.drift=function(g,p){a._focusAdjacencyDisabled=!0,this.shape.x+=g,this.shape.y+=p,this.dirty(),r.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(v),localX:this.shape.x/s,localY:this.shape.y/l})},c.ondragend=function(){a._focusAdjacencyDisabled=!1},c.draggable=!0,c.cursor="move"),c.highlight=function(){this.trigger("emphasis")},c.downplay=function(){this.trigger("normal")},c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),h.eachItemGraphicEl(function(c,v){var d=h.getItemModel(v);c.focusNodeAdjHandler&&c.off("mouseover",c.focusNodeAdjHandler),c.unfocusNodeAdjHandler&&c.off("mouseout",c.unfocusNodeAdjHandler),d.get("focusNodeAdjacency")&&(c.on("mouseover",c.focusNodeAdjHandler=function(){a._focusAdjacencyDisabled||(a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:c.dataIndex}))}),c.on("mouseout",c.unfocusNodeAdjHandler=function(){a._focusAdjacencyDisabled||a._dispatchUnfocus(r)}))}),!this._data&&t.get("animation")&&n.setClipPath(GR(n.getBoundingRect(),t,function(){n.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,r,a){var i=t.getData(),n=i.graph,o=a.dataIndex,s=i.getItemModel(o),l=a.edgeDataIndex;if(!(o==null&&l==null)){var u=n.getNodeByIndex(o),h=n.getEdgeByIndex(l);if(n.eachNode(function(c){Yu(c,Rw,.1)}),n.eachEdge(function(c){Yu(c,kw,.1)}),u){ur(u,yi);var f=s.get("focusNodeAdjacency");f==="outEdges"?T(u.outEdges,function(c){c.dataIndex<0||(ur(c,Zu),ur(c.node2,yi))}):f==="inEdges"?T(u.inEdges,function(c){c.dataIndex<0||(ur(c,Zu),ur(c.node1,yi))}):f==="allEdges"&&T(u.edges,function(c){c.dataIndex<0||(ur(c,Zu),c.node1!==u&&ur(c.node1,yi),c.node2!==u&&ur(c.node2,yi))})}h&&(ur(h,Zu),ur(h.node1,yi),ur(h.node2,yi))}},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getGraph();i.eachNode(function(n){Yu(n,Rw)}),i.eachEdge(function(n){Yu(n,kw)})}});function GR(t,e,r){var a=new ft({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return oe(a,{shape:{width:t.width+20}},e,r),a}lt({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(r){r.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var HR=function(t,e,r){t.eachSeriesByType("sankey",function(a){var i=a.get("nodeWidth"),n=a.get("nodeGap"),o=FR(a,e);a.layoutInfo=o;var s=o.width,l=o.height,u=a.getGraph(),h=u.nodes,f=u.edges;UR(h);var c=Ht(h,function(p){return p.getLayout().value===0}),v=c.length!==0?0:a.get("layoutIterations"),d=a.get("orient"),g=a.get("nodeAlign");WR(h,f,i,n,s,l,v,d,g)})};function FR(t,e){return Ot(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function WR(t,e,r,a,i,n,o,s,l){$R(t,e,r,i,n,s,l),qR(t,e,n,i,a,o,s),ik(t,s)}function UR(t){T(t,function(e){var r=La(e.outEdges,Xu),a=La(e.inEdges,Xu),i=e.getValue()||0,n=Math.max(r,a,i);e.setLayout({value:n},!0)})}function $R(t,e,r,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,A=0,c=0;c=0;m&&p.depth>v&&(v=p.depth),g.setLayout({depth:m?p.depth:f},!0),n==="vertical"?g.setLayout({dy:r},!0):g.setLayout({dx:r},!0);for(var y=0;yf-1?v:f-1;o&&o!=="left"&&ZR(t,o,n,b);var A=n==="vertical"?(i-r)/b:(a-r)/b;XR(t,A,n)}function Ow(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function ZR(t,e,r,a){if(e==="right"){for(var i=[],n=t,o=0;n.length;){for(var s=0;s0;n--)l*=.99,JR(s,l,o),tg(s,i,r,a,o),ak(s,l,o),tg(s,i,r,a,o)}function KR(t,e){var r=[],a=e==="vertical"?"y":"x",i=sc(t,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),T(i.keys,function(n){r.push(i.buckets.get(n))}),r}function QR(t,e,r,a,i,n){var o=1/0;T(t,function(s){var l=s.length,u=0;T(s,function(f){u+=f.getLayout().value});var h=n==="vertical"?(a-(l-1)*i)/u:(r-(l-1)*i)/u;h0&&(s=l.getLayout()[n]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]+l.getLayout()[c]+e;var d=i==="vertical"?a:r;if(u=h-e-d,u>0)for(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),h=s,v=f-2;v>=0;--v)l=o[v],u=l.getLayout()[n]+l.getLayout()[c]+e-h,u>0&&(s=l.getLayout()[n]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),h=l.getLayout()[n]})}function JR(t,e,r){T(t.slice().reverse(),function(a){T(a,function(i){if(i.outEdges.length){var n=La(i.outEdges,jR,r)/La(i.outEdges,Xu,r);if(isNaN(n)){var o=i.outEdges.length;n=o?La(i.outEdges,tk,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-Ma(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-Ma(i,r))*e;i.setLayout({y:l},!0)}}})})}function jR(t,e){return Ma(t.node2,e)*t.getValue()}function tk(t,e){return Ma(t.node2,e)}function ek(t,e){return Ma(t.node1,e)*t.getValue()}function rk(t,e){return Ma(t.node1,e)}function Ma(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Xu(t){return t.getValue()}function La(t,e,r){for(var a=0,i=t.length,n=-1;++no&&(o=l)}),T(i,function(s){var l=new mt({type:"color",mappingMethod:"linear",dataExtent:[n,o],visual:r.get("color")}),u=l.mapValueToVisual(s.getLayout().value),h=s.getModel().get("itemStyle.color");h!=null?s.setVisual("color",h):s.setVisual("color",u)})}})};It(HR),bt(nk);var zw={_baseAxisDim:null,getInitialData:function(t,e){var r,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),n=a.get("type"),o=i.get("type"),s;n==="category"?(t.layout="horizontal",r=a.getOrdinalMeta(),s=!0):o==="category"?(t.layout="vertical",r=i.getOrdinalMeta(),s=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u=t.layout==="horizontal"?0:1,h=this._baseAxisDim=l[u],f=l[1-u],c=[a,i],v=c[u].get("type"),d=c[1-u].get("type"),g=t.data;if(g&&s){var p=[];T(g,function(_,x){var w;_.value&&P(_.value)?(w=_.value.slice(),_.value.unshift(x)):P(_)?(w=_.slice(),_.unshift(x)):w=_,p.push(w)}),t.data=p}var m=this.defaultValueDimensions,y=[{name:h,type:lu(v),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:lu(d),dimsDef:m.slice()}];return wn(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:K(ny,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},ok=Dt.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});pt(ok,zw,!0);var sk=["itemStyle"],lk=["emphasis","itemStyle"],i5=Yt.extend({type:"boxplot",render:function(t,e,r){var a=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var o=t.get("layout")==="horizontal"?1:0;a.diff(n).add(function(s){if(a.hasValue(s)){var l=a.getItemLayout(s),u=Bw(l,a,s,o,!0);a.setItemGraphicEl(s,u),i.add(u)}}).update(function(s,l){var u=n.getItemGraphicEl(l);if(!a.hasValue(s)){i.remove(u);return}var h=a.getItemLayout(s);u?Vw(h,u,a,s):u=Bw(h,a,s,o),i.add(u),a.setItemGraphicEl(s,u)}).remove(function(s){var l=n.getItemGraphicEl(s);l&&i.remove(l)}).execute(),this._data=a},remove:function(t){var e=this.group,r=this._data;this._data=null,r&&r.eachItemGraphicEl(function(a){a&&e.remove(a)})},dispose:Kt}),uk=st.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var r=e.points,a=0;for(t.moveTo(r[a][0],r[a][1]),a++;a<4;a++)t.lineTo(r[a][0],r[a][1]);for(t.closePath();a0?"P":"N",n=a.getVisual("borderColor"+i)||a.getVisual("color"+i),o=r.getModel(Hw).getItemStyle(Fw);e.useStyle(o),e.style.fill=null,e.style.stroke=n}var xk=function(t){!t||!P(t.series)||T(t.series,function(e){Q(e)&&e.type==="k"&&(e.type="candlestick")})},wk=["itemStyle","borderColor"],bk=["itemStyle","borderColor0"],Sk=["itemStyle","color"],Ak=["itemStyle","color0"],Tk={seriesType:"candlestick",plan:nn(),performRawSeries:!0,reset:function(t,e){var r=t.getData();if(r.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:o(1,t),borderColorN:o(-1,t)}),e.isSeriesFiltered(t))return;var a=t.pipelineContext.large;return!a&&{progress:i};function i(s,l){for(var u;(u=s.next())!=null;){var h=l.getItemModel(u),f=l.getItemLayout(u).sign;l.setItemVisual(u,{color:n(f,h),borderColor:o(f,h)})}}function n(s,l){return l.get(s>0?Sk:Ak)}function o(s,l){return l.get(s>0?wk:bk)}}},Ck=typeof Float32Array<"u"?Float32Array:Array,Dk={seriesType:"candlestick",plan:nn(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=Ik(t,r),i=0,n=1,o=["x","y"],s=r.mapDimension(o[i]),l=r.mapDimension(o[n],!0),u=l[0],h=l[1],f=l[2],c=l[3];if(r.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s==null||l.length<4)return;return{progress:t.pipelineContext.large?d:v};function v(g,p){for(var m;(m=g.next())!=null;){var y=p.get(s,m),_=p.get(u,m),x=p.get(h,m),w=p.get(f,m),S=p.get(c,m),b=Math.min(_,x),A=Math.max(_,x),C=B(b,y),D=B(A,y),I=B(w,y),L=B(S,y),M=[];k(M,D,0),k(M,C,1),M.push(V(L),V(D),V(I),V(C)),p.setItemLayout(m,{sign:Yw(p,m,_,x,h),initBaseline:_>x?D[n]:C[n],ends:M,brushRect:O(w,S,y)})}function B(H,W){var F=[];return F[i]=W,F[n]=H,isNaN(W)||isNaN(H)?[NaN,NaN]:e.dataToPoint(F)}function k(H,W,F){var N=W.slice(),$=W.slice();N[i]=El(N[i]+a/2,1,!1),$[i]=El($[i]-a/2,1,!0),F?H.push(N,$):H.push($,N)}function O(H,W,F){var N=B(H,F),$=B(W,F);return N[i]-=a/2,$[i]-=a/2,{x:N[0],y:N[1],width:n?a:$[0]-N[0],height:n?$[1]-N[1]:a}}function V(H){return H[i]=El(H[i],1),H}}function d(g,p){for(var m=new Ck(g.count*4),y=0,_,x=[],w=[],S;(S=g.next())!=null;){var b=p.get(s,S),A=p.get(u,S),C=p.get(h,S),D=p.get(f,S),I=p.get(c,S);if(isNaN(b)||isNaN(D)||isNaN(I)){m[y++]=NaN,y+=3;continue}m[y++]=Yw(p,S,A,C,h),x[i]=b,x[n]=D,_=e.dataToPoint(x,null,w),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[n]=I,_=e.dataToPoint(x,null,w),m[y++]=_?_[1]:NaN}p.setLayout("largePoints",m)}}};function Yw(t,e,r,a,i){var n;return r>a?n=-1:r0?t.get(i,e-1)<=a?1:-1:1,n}function Ik(t,e){var r=t.getBaseAxis(),a,i=r.type==="category"?r.getBandWidth():(a=r.getExtent(),Math.abs(a[1]-a[0])/e.count()),n=R(Nt(t.get("barMaxWidth"),i),i),o=R(Nt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?R(s,i):Math.max(Math.min(i/2,n),o)}ie(xk),bt(Tk),It(Dk),Dt.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return $r(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Xw=3;function Mk(t){return P(t)||(t=[+t,+t]),t}function qw(t,e){var r=e.rippleEffectColor||e.color;t.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?r:null,fill:e.brushType==="fill"?r:null}})})}function ag(t,e){G.call(this);var r=new wa(t,e),a=new G;this.add(r),this.add(a),a.beforeUpdate=function(){this.attr(r.getScale())},this.updateData(t,e)}var _i=ag.prototype;_i.stopEffectAnimation=function(){this.childAt(1).removeAll()},_i.startEffectAnimation=function(t){for(var e=t.symbolType,r=t.color,a=this.childAt(1),i=0;i"u"?Array:Uint32Array,Pk=typeof Float64Array>"u"?Array:Float64Array;function Kw(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(z&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=E(e,function(r){var a=[r[0].coord,r[1].coord],i={coords:a};return r[0].name&&(i.fromName=r[0].name),r[1].name&&(i.toName=r[1].name),Yn([i,r[0],r[1]])}))}var Qw=Dt.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],Kw(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),Qw.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],Kw(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}Qw.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Gh(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Gh(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t),r=e.option instanceof Array?e.option:e.getShallow("coords");if(z&&!(r instanceof Array&&r.length>0&&r[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(r)+". Lines must have 2d coords array in data item.");return r},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var r=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],i=0;ir&&z)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t,e){if(z){var r=re.get(t.coordinateSystem);if(!r)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var a=new qt(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(i,n,o,s){if(i instanceof Array)return NaN;a.hasItemOption=!0;var l=i.value;if(l!=null)return l instanceof Array?l[s]:l}),a},formatTooltip:function(t){var e=this.getData(),r=e.getItemModel(t),a=r.get("name");if(a)return a;var i=r.get("fromName"),n=r.get("toName"),o=[];return i!=null&&o.push(i),n!=null&&o.push(n),Tt(o.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function ws(t,e,r){G.call(this),this.add(this.createLine(t,e,r)),this._updateEffectSymbol(t,e)}var Pa=ws.prototype;Pa.createLine=function(t,e,r){return new ps(t,e,r)},Pa._updateEffectSymbol=function(t,e){var r=t.getItemModel(e),a=r.getModel("effect"),i=a.get("symbolSize"),n=a.get("symbol");P(i)||(i=[i,i]);var o=a.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==n&&(this.remove(s),s=Le(n,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",o),s.setStyle(a.getItemStyle(["color"])),s.attr("scale",i),s.setColor(o),s.attr("scale",i),this._symbolType=n,this._symbolScale=i,this._updateEffectAnimation(t,a,e))},Pa._updateEffectAnimation=function(t,e,r){var a=this.childAt(1);if(!!a){var i=this,n=t.getItemLayout(r),o=e.get("period")*1e3,s=e.get("loop"),l=e.get("constantSpeed"),u=Et(e.get("delay"),function(v){return v/t.count()*o/3}),h=typeof u=="function";if(a.ignore=!0,this.updateAnimationPoints(a,n),l>0&&(o=this.getLineLength(a)/l*1e3),o!==this._period||s!==this._loop){a.stopAnimation();var f=u;h&&(f=u(r)),a.__t>0&&(f=-o*a.__t),a.__t=0;var c=a.animate("",s).when(o,{__t:1}).delay(f).during(function(){i.updateSymbolPosition(a)});s||c.done(function(){i.remove(a)}),c.start()}this._period=o,this._loop=s}},Pa.getLineLength=function(t){return Rr(t.__p1,t.__cp1)+Rr(t.__cp1,t.__p2)},Pa.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},Pa.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r),this._updateEffectSymbol(t,e)},Pa.updateSymbolPosition=function(t){var e=t.__p1,r=t.__p2,a=t.__cp1,i=t.__t,n=t.position,o=[n[0],n[1]],s=ne,l=lc;n[0]=s(e[0],a[0],r[0],i),n[1]=s(e[1],a[1],r[1],i);var u=l(e[0],a[0],r[0],i),h=l(e[1],a[1],r[1],i);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")if(t.__lastT!==void 0&&t.__lastT=0&&!(a[o]<=e);o--);o=Math.min(o,i-2)}else{for(var o=n;oe);o++);o=Math.min(o-1,i-2)}Gp(t.position,r[o],r[o+1],(e-a[o])/(a[o+1]-a[o]));var l=r[o+1][0]-r[o][0],u=r[o+1][1]-r[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},yt(ig,ws);var Jw=Ge({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var r=e.segs,a=e.curveness;if(e.polyline)for(var i=0;i0){t.moveTo(r[i++],r[i++]);for(var o=1;o0){var f=(s+u)/2-(l-h)*a,c=(l+h)/2-(u-s)*a;t.quadraticCurveTo(f,c,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var r=this.shape,a=r.segs,i=r.curveness;if(r.polyline)for(var n=0,o=0;o0)for(var l=a[o++],u=a[o++],h=1;h0){var v=(l+f)/2-(u-c)*i,d=(u+c)/2-(f-l)*i;if(n0(l,u,v,d,f,c))return n}else if(ha(l,u,f,c))return n;n++}return-1}});function jw(){this.group=new G}var xi=jw.prototype;xi.isPersistent=function(){return!this._incremental},xi.updateData=function(t){this.group.removeAll();var e=new Jw({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},xi.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Ae({silent:!0})),this.group.add(this._incremental)):this._incremental=null},xi.incrementalUpdate=function(t,e){var r=new Jw;r.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(r,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(r,!0):(r.rectHover=!0,r.cursor="default",r.__startIndex=t.start,this.group.add(r))},xi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},xi._setCommon=function(t,e,r){var a=e.hostModel;t.setShape({polyline:a.get("polyline"),curveness:a.get("lineStyle.curveness")}),t.useStyle(a.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var i=e.getVisual("color");i&&t.setStyle("stroke",i),t.setStyle("fill"),r||(t.seriesIndex=a.seriesIndex,t.on("mousemove",function(n){t.dataIndex=null;var o=t.findDataIndex(n.offsetX,n.offsetY);o>0&&(t.dataIndex=o+t.__startIndex)}))},xi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var tb={seriesType:"lines",plan:nn(),reset:function(t){var e=t.coordinateSystem,r=t.get("polyline"),a=t.pipelineContext.large;function i(n,o){var s=[];if(a){var l,u=n.end-n.start;if(r){for(var h=0,f=n.start;f0){var I=n(y)?s:l;y>0&&(y=y*C+b),x[w++]=I[D],x[w++]=I[D+1],x[w++]=I[D+2],x[w++]=I[D+3]*y*256}else w+=4}return f.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=Ri()),e=this.pointSize+this.blurSize,r=e*2;t.width=r,t.height=r;var a=t.getContext("2d");return a.clearRect(0,0,r,r),a.shadowOffsetX=r,a.shadowBlur=this.blurSize,a.shadowColor="#000",a.beginPath(),a.arc(-e,e,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),t},_getGradient:function(t,e,r){for(var a=this._gradientPixels,i=a[r]||(a[r]=new Uint8ClampedArray(256*4)),n=[0,0,0,0],o=0,s=0;s<256;s++)e[r](s/255,!0,n),i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],i[o++]=n[3];return i}};function kk(t,e,r){var a=t[1]-t[0];e=E(e,function(o){return{interval:[(o.interval[0]-t[0])/a,(o.interval[1]-t[0])/a]}});var i=e.length,n=0;return function(o){for(var s=n;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){n=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function Ok(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}_e({type:"heatmap",render:function(t,e,r){var a;if(e.eachComponent("visualMap",function(n){n.eachTargetSeries(function(o){o===t&&(a=n)})}),z&&!a)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;var i=t.coordinateSystem;i.type==="cartesian2d"||i.type==="calendar"?this._renderOnCartesianAndCalendar(t,r,0,t.getData().count()):Ok(i)&&this._renderOnGeo(i,t,a,r)},incrementalPrepareRender:function(t,e,r){this.group.removeAll()},incrementalRender:function(t,e,r,a){var i=e.coordinateSystem;i&&this._renderOnCartesianAndCalendar(e,a,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,r,a,i){var n=t.coordinateSystem,o,s;if(n.type==="cartesian2d"){var l=n.getAxis("x"),u=n.getAxis("y");if(z){if(!(l.type==="category"&&u.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(l.onBand&&u.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}o=l.getBandWidth(),s=u.getBandWidth()}for(var h=this.group,f=t.getData(),c="itemStyle",v="emphasis.itemStyle",d="label",g="emphasis.label",p=t.getModel(c).getItemStyle(["color"]),m=t.getModel(v).getItemStyle(),y=t.getModel(d),_=t.getModel(g),x=n.type,w=x==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],S=r;S0?1:h<0?-1:0}function og(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Gk(t,e,r,a,i,n,o,s,l,u){var h=l.valueDim,f=l.categoryDim,c=Math.abs(r[f.wh]),v=t.getItemVisual(e,"symbolSize");P(v)?v=v.slice():(v==null&&(v="100%"),v=[v,v]),v[f.index]=R(v[f.index],c),v[h.index]=R(v[h.index],a?c:Math.abs(n)),u.symbolSize=v;var d=u.symbolScale=[v[0]/s,v[1]/s];d[h.index]*=(l.isHorizontal?-1:1)*o}function Hk(t,e,r,a,i){var n=t.get(Bk)||0;n&&(ng.attr({scale:e.slice(),rotation:r}),ng.updateTransform(),n/=ng.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n}function Fk(t,e,r,a,i,n,o,s,l,u,h,f){var c=h.categoryDim,v=h.valueDim,d=f.pxSign,g=Math.max(e[v.index]+s,0),p=g;if(a){var m=Math.abs(l),y=Et(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=R(y,e[v.index]);var x=Math.max(g+y*2,0),w=_?0:y*2,S=Z0(a),b=S?a:gb((m+w)/x),A=m-b*g;y=A/2/(_?b:b-1),x=g+y*2,w=_?0:y*2,!S&&a!=="fixed"&&(b=u?gb((Math.abs(u)+w)/x):0),p=b*x-w,f.repeatTimes=b,f.symbolMargin=y}var C=d*(p/2),D=f.pathPosition=[];D[c.index]=r[c.wh]/2,D[v.index]=o==="start"?C:o==="end"?l-C:l/2,n&&(D[0]+=n[0],D[1]+=n[1]);var I=f.bundlePosition=[];I[c.index]=r[c.xy],I[v.index]=r[v.xy];var L=f.barRectShape=Z({},r);L[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(D[v.index]+C)),L[c.wh]=r[c.wh];var M=f.clipShape={};M[c.xy]=-r[c.xy],M[c.wh]=h.ecSize[c.wh],M[v.xy]=0,M[v.wh]=r[v.wh]}function nb(t){var e=t.symbolPatternSize,r=Le(t.symbolType,-e/2,-e/2,e,e,t.color);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function ob(t,e,r,a){var i=t.__pictorialBundle,n=r.symbolSize,o=r.valueLineWidth,s=r.pathPosition,l=e.valueDim,u=r.repeatTimes||0,h=0,f=n[e.valueDim.index]+o+r.symbolMargin*2;for(bs(t,function(m){m.__pictorialAnimationIndex=h,m.__pictorialRepeatTimes=u,h0:_<0)&&(x=u-1-m),y[l.index]=f*(x-u/2+.5)+s[l.index],{position:y,scale:r.symbolScale.slice(),rotation:r.rotation}}function g(){bs(t,function(m){m.trigger("emphasis")})}function p(){bs(t,function(m){m.trigger("normal")})}}function sb(t,e,r,a){var i=t.__pictorialBundle,n=t.__pictorialMainPath;n?kn(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,a):(n=t.__pictorialMainPath=nb(r),i.add(n),kn(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,a),n.on("mouseover",o).on("mouseout",s)),sg(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function lb(t,e,r){var a=Z({},e.barRectShape),i=t.__pictorialBarRect;i?kn(i,null,{shape:a},e,r):(i=t.__pictorialBarRect=new ft({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(i))}function ub(t,e,r,a){if(r.symbolClip){var i=t.__pictorialClipPath,n=Z({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)tt(i,{shape:n},s,l);else{n[o.wh]=0,i=new ft({shape:n}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],Gr[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function hb(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=Wk,r.isAnimationEnabled=Uk,r}function Wk(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Uk(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sg(t,e){t.off("emphasis").off("normal");var r=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[r[0]*1.1,r[1]*1.1]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:r.slice()},400,"elasticOut")})}function fb(t,e,r,a){var i=new G,n=new G;return i.add(n),i.__pictorialBundle=n,n.attr("position",r.bundlePosition.slice()),r.symbolRepeat?ob(i,e,r):sb(i,e,r),lb(i,r,a),ub(i,e,r,a),i.__pictorialShapeStr=vb(t,r),i.__pictorialSymbolMeta=r,i}function $k(t,e,r){var a=r.animationModel,i=r.dataIndex,n=t.__pictorialBundle;tt(n,{position:r.bundlePosition.slice()},a,i),r.symbolRepeat?ob(t,e,r,!0):sb(t,e,r,!0),lb(t,r,!0),ub(t,e,r,!0)}function cb(t,e,r,a){var i=a.__pictorialBarRect;i&&(i.style.text=null);var n=[];bs(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),T(n,function(o){tt(o,{scale:[0,0]},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function vb(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function bs(t,e,r){T(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function kn(t,e,r,a,i,n){e&&t.attr(e),a.symbolClip&&!i?r&&t.attr(r):r&&Gr[i?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,n)}function db(t,e,r){var a=r.color,i=r.dataIndex,n=r.itemModel,o=n.getModel("itemStyle").getItemStyle(["color"]),s=n.getModel("emphasis.itemStyle").getItemStyle(),l=n.getShallow("cursor");bs(t,function(c){c.setColor(a),c.setStyle(U({fill:a,opacity:r.opacity},o)),St(c,s),l&&(c.cursor=l),c.z2=r.z2});var u={},h=e.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;T1(f.style,u,n,a,e.seriesModel,i,h),St(f,u)}function gb(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}It(K(I_,"pictorialBar")),bt(li("pictorialBar","roundRect"));var ju=function(t,e,r,a,i){Vt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom",this.orient=null};ju.prototype={constructor:ju,model:null,isHorizontal:function(){var t=this.position;return t==="top"||t==="bottom"},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},yt(ju,Vt);function th(t,e,r){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,r),this.model=t}th.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:th,_init:function(t,e,r){var a=this.dimension,i=new ju(a,dn(t),[0,0],t.get("type"),t.get("position")),n=i.type==="category";i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t,e){t.eachSeries(function(r){if(r.coordinateSystem===this){var a=r.getData();T(a.mapDimension(this.dimension,!0),function(i){this._axis.scale.unionExtentFromData(a,i)},this),xa(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=Ot({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,r=e.isHorizontal(),a=r?[0,t.width]:[0,t.height],i=e.reverse?1:0;e.setExtent(a[i],a[1-i]),this._updateAxisTransform(e,r?t.x:t.y)},_updateAxisTransform:function(t,e){var r=t.getExtent(),a=r[0]+r[1],i=t.isHorizontal();t.toGlobalCoord=i?function(n){return n+e}:function(n){return a-n+e},t.toLocalCoord=i?function(n){return n-e}:function(n){return a-n+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),r=this.getAxis(),a=r.orient;return a==="horizontal"?r.contain(r.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:r.contain(r.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t[e.orient==="horizontal"?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),r=this.getRect(),a=[],i=e.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[i]=e.toGlobalCoord(e.dataToCoord(+t)),a[1-i]=i===0?r.y+r.height/2:r.x+r.width/2,a}};function Zk(t,e){var r=[];return t.eachComponent("singleAxis",function(a,i){var n=new th(a,t,e);n.name="single_"+i,n.resize(a,e),a.coordinateSystem=n,r.push(n)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var i=t.queryComponents({mainType:"singleAxis",index:a.get("singleAxisIndex"),id:a.get("singleAxisId")})[0];a.coordinateSystem=i&&i.coordinateSystem}}),r}re.register("single",{create:Zk,dimensions:th.prototype.dimensions});function lg(t,e){e=e||{};var r=t.coordinateSystem,a=t.axis,i={},n=a.position,o=a.orient,s=r.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[n]:l[0],o==="horizontal"?u.horizontal[n]:l[3]];var h={horizontal:0,vertical:1};i.rotation=Math.PI/2*h[o];var f={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=f[n],t.get("axisTick.inside")&&(i.tickDirection=-i.tickDirection),Et(e.labelInside,t.get("axisLabel.inside"))&&(i.labelDirection=-i.labelDirection);var c=e.rotate;return c==null&&(c=t.get("axisLabel.rotate")),i.labelRotation=n==="top"?-c:c,i.z2=1,i}var Yk=["axisLine","axisTickLabel","axisName"],Xk=["splitArea","splitLine"],qk=Pe.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,a){var i=this.group;i.removeAll();var n=this._axisGroup;this._axisGroup=new G;var o=lg(t),s=new xe(t,o);T(Yk,s.add,s),i.add(this._axisGroup),i.add(s.getGroup()),T(Xk,function(l){t.get(l+".show")&&this["_"+l](t)},this),Ol(n,this._axisGroup,t),qk.superCall(this,"render",t,e,r,a)},remove:function(){S1(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var r=t.getModel("splitLine"),a=r.getModel("lineStyle"),i=a.get("width"),n=a.get("color");n=n instanceof Array?n:[n];for(var o=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:r}),f=[],c=[],v=0;v=0&&s<0)&&(o=g,s=d,i=f,n.length=0),Ir(c,function(p){n.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:n,snapToValue:i}}function tN(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function eN(t,e,r,a){var i=r.payloadBatch,n=e.axis,o=n.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=jo(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:n.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:i.slice()})}}function rN(t,e,r){var a=r.axesInfo=[];Ir(e,function(i,n){var o=i.axisPointerModel.option,s=t[n];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function aN(t,e,r,a){if(eh(e)||!t.list.length){a({type:"hideTip"});return}var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:r.tooltipOption,position:r.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}function iN(t,e,r){var a=r.getZr(),i="axisPointerLastHighlights",n=_b(a)[i]||{},o=_b(a)[i]={};Ir(t,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&Ir(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];T(n,function(u,h){!o[h]&&l.push(u)}),T(o,function(u,h){!n[h]&&s.push(u)}),l.length&&r.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&r.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function nN(t,e){for(var r=0;r<(t||[]).length;r++){var a=t[r];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function wb(t){var e=t.axis.model,r={},a=r.axisDim=t.axis.dim;return r.axisIndex=r[a+"AxisIndex"]=e.componentIndex,r.axisName=r[a+"AxisName"]=e.name,r.axisId=r[a+"AxisId"]=e.id,r}function eh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var s5=Me({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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}}}),Xr=de(),oN=T;function bb(t,e,r){if(!at.node){var a=e.getZr();Xr(a).records||(Xr(a).records={}),sN(a,e);var i=Xr(a).records[t]||(Xr(a).records[t]={});i.handler=r}}function sN(t,e){if(Xr(t).initialized)return;Xr(t).initialized=!0,r("click",K(Sb,"click")),r("mousemove",K(Sb,"mousemove")),r("globalout",uN);function r(a,i){t.on(a,function(n){var o=hN(e);oN(Xr(t).records,function(s){s&&i(s,n,o.dispatchAction)}),lN(o.pendings,e)})}}function lN(t,e){var r=t.showTip.length,a=t.hideTip.length,i;r?i=t.showTip[r-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function uN(t,e,r){t.handler("leave",null,r)}function Sb(t,e,r,a){e.handler(t,r,a)}function hN(t){var e={showTip:[],hideTip:[]},r=function(a){var i=e[a.type];i?i.push(a):(a.dispatchAction=r,t.dispatchAction(a))};return{dispatchAction:r,pendings:e}}function ug(t,e){if(!at.node){var r=e.getZr(),a=(Xr(r).records||{})[t];a&&(Xr(r).records[t]=null)}}var Ab=Xt({type:"axisPointer",render:function(t,e,r){var a=e.getComponent("tooltip"),i=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";bb("axisPointer",r,function(n,o,s){i!=="none"&&(n==="leave"||i.indexOf(n)>=0)&&s({type:"updateAxisPointer",currTrigger:n,x:o&&o.offsetX,y:o&&o.offsetY})})},remove:function(t,e){ug(e.getZr(),"axisPointer"),Ab.superApply(this._model,"remove",arguments)},dispose:function(t,e){ug("axisPointer",e),Ab.superApply(this._model,"dispose",arguments)}}),wi=de(),Tb=Y,hg=X;function bi(){}bi.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,r,a){var i=e.get("value"),n=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=r,!(!a&&this._lastValue===i&&this._lastStatus===n)){this._lastValue=i,this._lastStatus=n;var o=this._group,s=this._handle;if(!n||n==="hide"){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var l={};this.makeElOption(l,i,t,e,r);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(!o)o=this._group=new G,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),r.getZr().add(o);else{var f=K(Cb,e,h);this.updatePointerEl(o,l,f,e),this.updateLabelEl(o,l,f,e)}Mb(o,e,!0),this._renderHandle(i)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var r=e.get("animation"),a=t.axis,i=a.type==="category",n=e.get("snap");if(!n&&!i)return!1;if(r==="auto"||r==null){var o=this.animationThreshold;if(i&&a.getBandWidth()>o)return!0;if(n){var s=Uv(t).seriesDataCount,l=a.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return r===!0},makeElOption:function(t,e,r,a,i){},createPointerEl:function(t,e,r,a){var i=e.pointer;if(i){var n=wi(t).pointerEl=new Gr[i.type](Tb(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,a){if(e.label){var i=wi(t).labelEl=new ft(Tb(e.label));t.add(i),Ib(i,a)}},updatePointerEl:function(t,e,r){var a=wi(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),r(a,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,r,a){var i=wi(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{shape:e.label.shape,position:e.label.position}),Ib(i,a))},_renderHandle:function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,r=this._api.getZr(),a=this._handle,i=e.getModel("handle"),n=e.get("status");if(!i.get("show")||!n||n==="hide"){a&&r.remove(a),this._handle=null;return}var o;this._handle||(o=!0,a=this._handle=xo(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Va(u.event)},onmousedown:hg(this._onHandleDragMove,this,0,0),drift:hg(this._onHandleDragMove,this),ondragend:hg(this._onHandleDragEnd,this)}),r.add(a)),Mb(a,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];a.setStyle(i.getItemStyle(null,s));var l=i.get("size");P(l)||(l=[l,l]),a.attr("scale",[l[0]/2,l[1]/2]),ko(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){Cb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!!r){this._dragging=!0;var a=this.updateHandleTransform(fg(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(fg(a)),wi(r).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(!!t){var e=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},_onHandleDragEnd:function(t){this._dragging=!1;var e=this._handle;if(!!e){var r=this._axisPointerModel.get("value");this._moveHandleToValue(r),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),r=this._group,a=this._handle;e&&r&&(this._lastGraphicKey=null,r&&e.remove(r),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}},bi.prototype.constructor=bi;function Cb(t,e,r,a){Db(wi(r).lastProp,a)||(wi(r).lastProp=a,e?tt(r,a,t):(r.stopAnimation(),r.attr(a)))}function Db(t,e){if(Q(t)&&Q(e)){var r=!0;return T(e,function(a,i){r=r&&Db(t[i],a)}),!!r}else return t===e}function Ib(t,e){t[e.get("label.show")?"show":"hide"]()}function fg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Mb(t,e,r){var a=e.get("z"),i=e.get("zlevel");t&&t.traverse(function(n){n.type!=="group"&&(a!=null&&(n.z=a),i!=null&&(n.zlevel=i),n.silent=r)})}lo(bi);function cg(t){var e=t.get("type"),r=t.getModel(e+"Style"),a;return e==="line"?(a=r.getLineStyle(),a.fill=null):e==="shadow"&&(a=r.getAreaStyle(),a.stroke=null),a}function Lb(t,e,r,a,i){var n=r.get("value"),o=Pb(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),s=r.getModel("label"),l=ja(s.get("padding")||0),u=s.getFont(),h=cr(o,u),f=i.position,c=h.width+l[1]+l[3],v=h.height+l[0]+l[2],d=i.align;d==="right"&&(f[0]-=c),d==="center"&&(f[0]-=c/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=v),g==="middle"&&(f[1]-=v/2),fN(f,c,v,a);var p=s.get("backgroundColor");(!p||p==="auto")&&(p=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:v,r:s.get("borderRadius")},position:f.slice(),style:{text:o,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:p,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function fN(t,e,r,a){var i=a.getWidth(),n=a.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+r,n)-r,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Pb(t,e,r,a,i){t=e.scale.parse(t);var n=e.scale.getLabel(t,{precision:i.precision}),o=i.formatter;if(o){var s={value:Lv(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};T(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),_t(o)?n=o.replace("{value}",n):$t(o)&&(n=o(s))}return n}function vg(t,e,r){var a=ce();return Or(a,a,r.rotation),Je(a,a,r.position),xr([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function Eb(t,e,r,a,i,n){var o=xe.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get("label.margin"),Lb(e,a,i,n,{position:vg(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function dg(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function Rb(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function kb(t,e,r,a,i,n){return{cx:t,cy:e,r0:r,r:a,startAngle:i,endAngle:n,clockwise:!0}}var cN=bi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.grid,s=a.get("type"),l=Nb(o,n).getOtherAxis(n).getGlobalExtent(),u=n.toGlobalCoord(n.dataToCoord(e,!0));if(s&&s!=="none"){var h=cg(a),f=vN[s](n,u,l);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=Yv(o.model,r);Eb(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=Yv(e.axis.grid.model,e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:vg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.grid,o=i.getGlobalExtent(!0),s=Nb(n,i).getOtherAxis(i).getGlobalExtent(),l=i.dim==="x"?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var h=(s[1]+s[0])/2,f=[h,h];f[l]=u[l];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:f,tooltipOption:c[l]}}});function Nb(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var vN={line:function(t,e,r){var a=dg([e,r[0]],[e,r[1]],Ob(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=Math.max(1,t.getBandWidth()),i=r[1]-r[0];return{type:"Rect",shape:Rb([e-a/2,r[0]],[a,i],Ob(t))}}};function Ob(t){return t.dim==="x"?0:1}Pe.registerAxisPointerClass("CartesianAxisPointer",cN),ie(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!P(e)&&(t.axisPointer.link=[e])}}),Ie(br.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=bL(t,e)}),lt({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Jk);var zb=["x","y"],dN=["width","height"],gN=bi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.coordinateSystem,s=gg(o,1-rh(n)),l=o.dataToPoint(e)[0],u=a.get("type");if(u&&u!=="none"){var h=cg(a),f=pN[u](n,l,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=lg(r);Eb(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=lg(e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:vg(e.axis,t,a),rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,r,a){var i=r.axis,n=i.coordinateSystem,o=rh(i),s=gg(n,o),l=t.position;l[o]+=e[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=gg(n,1-o),h=(u[1]+u[0])/2,f=[h,h];return f[o]=l[o],{position:l,rotation:t.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}}}),pN={line:function(t,e,r){var a=dg([e,r[0]],[e,r[1]],rh(t));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(t,e,r){var a=t.getBandWidth(),i=r[1]-r[0];return{type:"Rect",shape:Rb([e-a/2,r[0]],[a,i],rh(t))}}};function rh(t){return t.isHorizontal()?0:1}function gg(t,e){var r=t.getRect();return[r[zb[e]],r[zb[e]]+r[dN[e]]]}Pe.registerAxisPointerClass("SingleAxisPointer",gN),Xt({type:"single"});var pg=2,mN=Dt.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){mN.superApply(this,"init",arguments),this.legendVisualProvider=new ts(X(this.getData,this),X(this.getRawData,this))},fixData:function(t){var e=t.length,r=sc(t,function(m){return m[2]}),a=[];r.buckets.each(function(m,y){a.push({name:y,dataList:m})});for(var i=a.length,n=-1,o=-1,s=0;sn&&(n=l,o=s)}for(var u=0;un&&(n=o),a.push(o)}for(var h=0;hn&&(n=c)}return s.y0=i,s.max=n,s}var wN=function(t){t.eachSeriesByType("themeRiver",function(e){var r=e.getData(),a=e.getRawData(),i=e.get("color"),n=j();r.each(function(o){n.set(r.getRawIndex(o),o)}),a.each(function(o){var s=a.getName(o),l=i[(e.nameMap.get(s)-1)%i.length];a.setItemVisual(o,"color",l);var u=n.get(o);u!=null&&r.setItemVisual(u,"color",l)})})};It(_N),bt(wN),Ie(es("themeRiver")),Dt.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};Vb(r);var a=t.levels||[],i={};return i.levels=a,fi.createTree(r,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Dt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=dd(r,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});function Vb(t){var e=0;T(t.children,function(a){Vb(a);var i=a.value;P(i)&&(i=i[0]),e+=i});var r=t.value;P(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),P(t.value)?t.value[0]=r:t.value=r}var ah={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},bN=2,SN=4;function ih(t,e,r){G.call(this);var a=new ir({z2:bN});a.seriesIndex=e.seriesIndex;var i=new nt({z2:SN,silent:t.getModel("label").get("silent")});this.add(a),this.add(i),this.updateData(!0,t,"normal",e,r);function n(){i.ignore=i.hoverIgnore}function o(){i.ignore=i.normalIgnore}this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}var Si=ih.prototype;Si.updateData=function(t,e,r,a,i){this.node=e,e.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var n=this.childAt(0);n.dataIndex=e.dataIndex;var o=e.getModel(),s=e.getLayout(),l=Z({},s);l.label=null;var u=AN(e,a,i);DN(e,a,u);var h=o.getModel("itemStyle").getItemStyle(),f;if(r==="normal")f=h;else{var c=o.getModel(r+".itemStyle").getItemStyle();f=J(c,h)}f=U({lineJoin:"bevel",fill:f.fill||u},f),t?(n.setShape(l),n.shape.r=s.r0,tt(n,{shape:{r:s.r}},a,e.dataIndex),n.useStyle(f)):typeof f.fill=="object"&&f.fill.type||typeof n.style.fill=="object"&&n.style.fill.type?(tt(n,{shape:l},a),n.useStyle(f)):tt(n,{shape:l,style:f},a),this._updateLabel(a,u,r);var v=o.getShallow("cursor");if(v&&n.attr("cursor",v),t){var d=a.getShallow("highlightPolicy");this._initEvents(n,e,a,d)}this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel,St(this)},Si.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(r){r.piece&&(e.node===r?r.piece.updateData(!1,r,"emphasis"):CN(r,e.node,t)?r.piece.childAt(0).trigger("highlight"):t!==ah.NONE&&r.piece.childAt(0).trigger("downplay"))})},Si.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},Si.onHighlight=function(){this.updateData(!1,this.node,"highlight")},Si.onDownplay=function(){this.updateData(!1,this.node,"downplay")},Si._updateLabel=function(t,e,r){var a=this.node.getModel(),i=a.getModel("label"),n=r==="normal"||r==="emphasis"?i:a.getModel(r+".label"),o=a.getModel("emphasis.label"),s=Et(t.getFormattedLabel(this.node.dataIndex,r,null,null,"label"),this.node.name);b("show")===!1&&(s="");var l=this.node.getLayout(),u=n.get("minAngle");u==null&&(u=i.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;u!=null&&Math.abs(h)Math.PI/2?"right":"left"):!y||y==="center"?(g=(l.r+l.r0)/2,y="center"):y==="left"?(g=l.r0+m,c>Math.PI/2&&(y="right")):y==="right"&&(g=l.r-m,c>Math.PI/2&&(y="left")),f.attr("style",{text:s,textAlign:y,textVerticalAlign:b("verticalAlign")||"middle",opacity:b("opacity")});var _=g*v+l.cx,x=g*d+l.cy;f.attr("position",[_,x]);var w=b("rotate"),S=0;w==="radial"?(S=-c,S<-Math.PI/2&&(S+=Math.PI)):w==="tangential"?(S=Math.PI/2-c,S>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI)):typeof w=="number"&&(S=w*Math.PI/180),f.attr("rotation",S);function b(A){var C=n.get(A);return C??i.get(A)}},Si._initEvents=function(t,e,r,a){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var i=this,n=function(){i.onEmphasis(a)},o=function(){i.onNormal()},s=function(){i.onDownplay()},l=function(){i.onHighlight()};r.isAnimationEnabled()&&t.on("mouseover",n).on("mouseout",o).on("emphasis",n).on("normal",o).on("downplay",s).on("highlight",l)},yt(ih,G);function AN(t,e,r){var a=t.getVisual("color"),i=t.getVisual("visualMeta");(!i||i.length===0)&&(a=null);var n=t.getModel("itemStyle").get("color");if(n)return n;if(a)return a;if(t.depth===0)return r.option.color[0];var o=r.option.color.length;return n=r.option.color[TN(t)%o],n}function TN(t){for(var e=t;e.depth>1;)e=e.parentNode;var r=t.getAncestors()[0];return ut(r.children,e)}function CN(t,e,r){return r===ah.NONE?!1:r===ah.SELF?t===e:r===ah.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function DN(t,e,r){var a=e.getData();a.setItemVisual(t.dataIndex,"color",r)}var IN="sunburstRootToNode",l5=Yt.extend({type:"sunburst",init:function(){},render:function(t,e,r,a){var i=this;this.seriesModel=t,this.api=r,this.ecModel=e;var n=t.getData(),o=n.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode(function(y){h.push(y)});var f=this._oldChildren||[];if(d(h,f),m(o,s),a&&a.highlight&&a.highlight.piece){var c=t.getShallow("highlightPolicy");a.highlight.piece.onEmphasis(c)}else if(a&&a.unhighlight){var v=this.virtualPiece;!v&&o.children.length&&(v=o.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=h;function d(y,_){if(y.length===0&&_.length===0)return;new Wr(_,y,x,x).add(w).update(w).remove(K(w,null)).execute();function x(S){return S.getId()}function w(S,b){var A=S==null?null:y[S],C=b==null?null:_[b];g(A,C)}}function g(y,_){if(!u&&y&&!y.getValue()&&(y=null),y!==o&&_!==o){if(_&&_.piece)y?(_.piece.updateData(!1,y,"normal",t,e),n.setItemGraphicEl(y.dataIndex,_.piece)):p(_);else if(y){var x=new ih(y,t,e);l.add(x),n.setItemGraphicEl(y.dataIndex,x)}}}function p(y){!y||y.piece&&(l.remove(y.piece),y.piece=null)}function m(y,_){if(_.depth>0){i.virtualPiece?i.virtualPiece.updateData(!1,y,"normal",t,e):(i.virtualPiece=new ih(y,t,e),l.add(i.virtualPiece)),_.piece._onclickEvent&&_.piece.off("click",_.piece._onclickEvent);var x=function(w){i._rootToNode(_.parentNode)};_.piece._onclickEvent=x,i.virtualPiece.on("click",x)}else i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}},dispose:function(){},_initEvents:function(){var t=this,e=function(r){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(n){if(!a&&n.piece&&n.piece.childAt(0)===r.target){var o=n.getModel().get("nodeClick");if(o==="rootToNode")t._rootToNode(n);else if(o==="link"){var s=n.getModel(),l=s.get("link");if(l){var u=s.get("target",!0)||"_blank";To(l,u)}}a=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:IN,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var r=e.getData(),a=r.getItemLayout(0);if(a){var i=t[0]-a.cx,n=t[1]-a.cy,o=Math.sqrt(i*i+n*n);return o<=a.r&&o>=a.r0}}}),Gb="sunburstRootToNode";lt({type:Gb,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=ls(t,[Gb],a);if(n){var o=a.getViewRoot();o&&(t.direction=vd(o,n.node)?"rollUp":"drillDown"),a.resetViewRoot(n.node)}}});var Hb="sunburstHighlight";lt({type:Hb,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=ls(t,[Hb],a);n&&(t.highlight=n.node)}});var MN="sunburstUnhighlight";lt({type:MN,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){t.unhighlight=!0}});var Fb=Math.PI/180,LN=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.get("center"),o=i.get("radius");P(o)||(o=[0,o]),P(n)||(n=[n,n]);var s=r.getWidth(),l=r.getHeight(),u=Math.min(s,l),h=R(n[0],s),f=R(n[1],l),c=R(o[0],u/2),v=R(o[1],u/2),d=-i.get("startAngle")*Fb,g=i.get("minAngle")*Fb,p=i.getData().tree.root,m=i.getViewRoot(),y=m.depth,_=i.get("sort");_!=null&&Wb(m,_);var x=0;T(m.children,function(V){!isNaN(V.getValue())&&x++});var w=m.getValue(),S=Math.PI/(w||x)*2,b=m.depth>0,A=m.height-(b?-1:1),C=(v-c)/(A||1),D=i.get("clockwise"),I=i.get("stillShowZeroSum"),L=D?1:-1,M=function(V,H){if(!!V){var W=H;if(V!==p){var F=V.getValue(),N=w===0&&I?S:F*S;Na[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:X(function(i){var n=e.dataToRadius(i[0]),o=r.dataToAngle(i[1]),s=t.coordToPoint([n,o]);return s.push(n,o*Math.PI/180),s}),size:X(BN,t)}}},GN=function(t){var e=t.getRect(),r=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:r.start,end:r.end,weeks:r.weeks,dayCount:r.allDay}},api:{coord:function(a,i){return t.dataToPoint(a,i)}}}},Ub=w0,HN=["itemStyle"],FN=["emphasis","itemStyle"],WN=["label"],UN=["emphasis","label"],$N="e\0\0",$b={cartesian2d:RN,geo:NN,singleAxis:zN,polar:VN,calendar:GN};Dt.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return $r(this.getSource(),this)},getDataParams:function(t,e,r){var a=Dt.prototype.getDataParams.apply(this,arguments);return r&&(a.info=r.info),a}}),Yt.extend({type:"custom",_data:null,render:function(t,e,r,a){var i=this._data,n=t.getData(),o=this.group,s=Yb(t,n,e,r);n.diff(i).add(function(u){mg(null,u,s(u,a),t,o,n)}).update(function(u,h){var f=i.getItemGraphicEl(h);mg(f,u,s(u,a),t,o,n)}).remove(function(u){var h=i.getItemGraphicEl(u);h&&o.remove(h)}).execute();var l=t.get("clip",!0)?_u(t.coordinateSystem,!1,t):null;l?o.setClipPath(l):o.removeClipPath(),this._data=n},incrementalPrepareRender:function(t,e,r){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,r,a,i){var n=e.getData(),o=Yb(e,n,r,a);function s(h){h.isGroup||(h.incremental=!0,h.useHoverLayer=!0)}for(var l=t.start;l=0?"p":"n",M=b;w&&(a[h][I]||(a[h][I]={p:b,n:b}),M=a[h][I][L]);var B,k,O,V;if(d.dim==="radius"){var H=d.dataToRadius(D)-b,W=l.dataToAngle(I);Math.abs(H)f?f=v:(c.lastTickCount=i,c.lastAutoInterval=f),f}},yt(oh,Vt);var sh=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new nh,this._angleAxis=new oh,this._radiusAxis.polar=this._angleAxis.polar=this};sh.prototype={type:"polar",axisPointerEnabled:!0,constructor:sh,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],r=this._angleAxis,a=this._radiusAxis;return r.scale.type===t&&e.push(r),a.scale.type===t&&e.push(a),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var r=this.pointToCoord(t);return[this._radiusAxis.radiusToData(r[0],e),this._angleAxis.angleToData(r[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,r=t[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),n=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);a.inverse?n=o-360:o=n+360;var s=Math.sqrt(e*e+r*r);e/=s,r/=s;for(var l=Math.atan2(-r,e)/Math.PI*180,u=lo;)l+=u*360;return[s,l]},coordToPoint:function(t){var e=t[0],r=t[1]/180*Math.PI,a=Math.cos(r)*e+this.cx,i=-Math.sin(r)*e+this.cy;return[a,i]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),r=e.getExtent().slice();r[0]>r[1]&&r.reverse();var a=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:r[0],r:r[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:t.inverse,contain:function(n,o){var s=n-this.cx,l=o-this.cy,u=s*s+l*l,h=this.r,f=this.r0;return u<=h*h&&u>=f*f}}}};var _g=ct.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});J(_g.prototype,oi);var rS={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function aS(t,e){return e.type||(e.data?"category":"value")}mn("angle",_g,aS,rS.angle),mn("radius",_g,aS,rS.radius),Me({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,r=this.ecModel;return r.eachComponent(t,function(a){a.getCoordSysModel()===this&&(e=a)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});function rO(t,e,r){var a=e.get("center"),i=r.getWidth(),n=r.getHeight();t.cx=R(a[0],i),t.cy=R(a[1],n);var o=t.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:P(l)||(l=[0,l]),l=[R(l[0],s),R(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function aO(t,e){var r=this,a=r.getAngleAxis(),i=r.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries(function(s){if(s.coordinateSystem===r){var l=s.getData();T(l.mapDimension("radius",!0),function(u){i.scale.unionExtentFromData(l,Uo(l,u))}),T(l.mapDimension("angle",!0),function(u){a.scale.unionExtentFromData(l,Uo(l,u))})}}),xa(a.scale,a.model),xa(i.scale,i.model),a.type==="category"&&!a.onBand){var n=a.getExtent(),o=360/a.scale.count();a.inverse?n[1]+=o:n[1]-=o,a.setExtent(n[0],n[1])}}function iS(t,e){if(t.type=e.get("type"),t.scale=dn(e),t.onBand=e.get("boundaryGap")&&t.type==="category",t.inverse=e.get("inverse"),e.mainType==="angleAxis"){t.inverse^=e.get("clockwise");var r=e.get("startAngle");t.setExtent(r,r+(t.inverse?-360:360))}e.axis=t,t.model=e}var iO={dimensions:sh.prototype.dimensions,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,i){var n=new sh(i);n.update=aO;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");iS(o,l),iS(s,u),rO(n,a,e),r.push(n),a.coordinateSystem=n,n.model=a}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var i=t.queryComponents({mainType:"polar",index:a.get("polarIndex"),id:a.get("polarId")})[0];if(z&&!i)throw new Error('Polar "'+Et(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),r}};re.register("polar",iO);var nO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function lh(t,e,r){e[1]>e[0]&&(e=e.slice().reverse());var a=t.coordToPoint([e[0],r]),i=t.coordToPoint([e[1],r]);return{x1:a[0],y1:a[1],x2:i[0],y2:i[1]}}function uh(t){var e=t.getRadiusAxis();return e.inverse?0:1}function nS(t){var e=t[0],r=t[t.length-1];e&&r&&Math.abs(Math.abs(e.coord-r.coord)-360)<1e-4&&t.pop()}Pe.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),!!t.get("show")){var r=t.axis,a=r.polar,i=a.getRadiusAxis().getExtent(),n=r.getTicksCoords(),o=r.getMinorTicksCoords(),s=E(r.getViewLabels(),function(u){var u=Y(u);return u.coord=r.dataToCoord(u.tickValue),u});nS(s),nS(n),T(nO,function(l){t.get(l+".show")&&(!r.scale.isBlank()||l==="axisLine")&&this["_"+l](t,a,n,o,i,s)},this)}},_axisLine:function(t,e,r,a,i){var n=t.getModel("axisLine.lineStyle"),o=uh(e),s=o?0:1,l;i[s]===0?l=new mr({shape:{cx:e.cx,cy:e.cy,r:i[o]},style:n.getLineStyle(),z2:1,silent:!0}):l=new Cl({shape:{cx:e.cx,cy:e.cy,r:i[o],r0:i[s]},style:n.getLineStyle(),z2:1,silent:!0}),l.style.fill=null,this.group.add(l)},_axisTick:function(t,e,r,a,i){var n=t.getModel("axisTick"),o=(n.get("inside")?-1:1)*n.get("length"),s=i[uh(e)],l=E(r,function(u){return new ee({shape:lh(e,[s,s+o],u.coord)})});this.group.add(He(l,{style:U(n.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,r,a,i){if(!!a.length){for(var n=t.getModel("axisTick"),o=t.getModel("minorTick"),s=(n.get("inside")?-1:1)*o.get("length"),l=i[uh(e)],u=[],h=0;hp?"left":"right",_=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";o&&o[v]&&o[v].textStyle&&(c=new ht(o[v].textStyle,s,s.ecModel));var x=new nt({silent:xe.isLabelSilent(t)});this.group.add(x),Rt(x.style,c,{x:g[0],y:g[1],textFill:c.getTextColor()||t.get("axisLine.lineStyle.color"),text:h.formattedLabel,textAlign:y,textVerticalAlign:_}),u&&(x.eventData=xe.makeAxisEventDataBase(t),x.eventData.targetType="axisLabel",x.eventData.value=h.rawLabel)},this)},_splitLine:function(t,e,r,a,i){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),s=o.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;hp?"left":"right",f=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:h,verticalAlign:f}}var fO={line:function(t,e,r,a,i){return t.dim==="angle"?{type:"Line",shape:dg(e.coordToPoint([a[0],r]),e.coordToPoint([a[1],r]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r}}},shadow:function(t,e,r,a,i){var n=Math.max(1,t.getBandWidth()),o=Math.PI/180;return t.dim==="angle"?{type:"Sector",shape:kb(e.cx,e.cy,a[0],a[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:kb(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};Pe.registerAxisPointerClass("PolarAxisPointer",uO),It(K(jN,"bar")),Xt({type:"polar"});var cO=ct.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){ct.prototype.init.apply(this,arguments),Ua(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=cx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=ki(t.regions||[],function(r,a){return a.name&&r.set(a.name,new ht(a,e)),r},j()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,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",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new ht(null,this,this.ecModel)},getFormattedLabel:function(t,e){var r=this.getRegionModel(t),a=r.get("label"+(e==="normal"?".":e+".")+"formatter"),i={name:t};if(typeof a=="function")return i.status=e,a(i);if(typeof a=="string")return a.replace("{a}",t??"")},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});pt(cO,Kv),Xt({type:"geo",init:function(t,e){var r=new Lu(e,!0);this._mapDraw=r,this.group.add(r.group)},render:function(t,e,r,a){if(!(a&&a.type==="geoToggleSelect"&&a.from===this.uid)){var i=this._mapDraw;t.get("show")?i.draw(t,e,r,this,a):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function xg(t,e){e.update="updateView",lt(e,function(r,a){var i={};return a.eachComponent({mainType:"geo",query:r},function(n){n[t](r.name);var o=n.coordinateSystem;T(o.regions,function(s){i[s.name]=n.isSelected(s.name)||!1})}),{selected:i,name:r.name}})}xg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),xg("select",{type:"geoSelect",event:"geoselected"}),xg("unSelect",{type:"geoUnSelect",event:"geounselected"});var wg=864e5;function qr(t,e,r){this._model=t}qr.prototype={constructor:qr,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){t=Ao(t);var e=t.getFullYear(),r=t.getMonth()+1;r=r<10?"0"+r:r;var a=t.getDate();a=a<10?"0"+a:a;var i=t.getDay();return i=Math.abs((i+7-this.getFirstDayOfWeek())%7),{y:e,m:r,d:a,day:i,time:t.getTime(),formatedDate:e+"-"+r+"-"+a,date:t}},getNextNDay:function(t,e){return e=e||0,e===0?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var r=this._rangeInfo.weeks||1,a=["width","height"],i=this._model.get("cellSize").slice(),n=this._model.getBoxLayoutParams(),o=this._orient==="horizontal"?[r,7]:[7,r];T([0,1],function(h){u(i,h)&&(n[a[h]]=i[h]*o[h])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=Ot(n,s);T([0,1],function(h){u(i,h)||(i[h]=l[a[h]]/o[h])});function u(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=i[0],this._sh=i[1]},dataToPoint:function(t,e){P(t)&&(t=t[0]),e==null&&(e=!0);var r=this.getDateInfo(t),a=this._rangeInfo,i=r.formatedDate;if(e&&!(r.time>=a.start.time&&r.timen.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var r=Math.floor(t[1].time/wg)-Math.floor(t[0].time/wg)+1,a=new Date(t[0].time),i=a.getDate(),n=t[1].date.getDate();a.setDate(i+r-1);var o=a.getDate();if(o!==n)for(var s=a.getTime()-t[1].time>0?1:-1;(o=a.getDate())!==n&&(a.getTime()-t[1].time)*s>0;)r-=s,a.setDate(o-s);var l=Math.floor((r+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,r){var a=this._getRangeInfo(r);if(t>a.weeks||t===0&&ea.lweek)return!1;var i=(t-1)*7-a.fweek+e,n=new Date(a.start.time);return n.setDate(a.start.d+i),this.getDateInfo(n)}},qr.dimensions=qr.prototype.dimensions,qr.getDimensionsInfo=qr.prototype.getDimensionsInfo,qr.create=function(t,e){var r=[];return t.eachComponent("calendar",function(a){var i=new qr(a,t,e);r.push(i),a.coordinateSystem=i}),t.eachSeries(function(a){a.get("coordinateSystem")==="calendar"&&(a.coordinateSystem=r[a.get("calendarIndex")||0])}),r};function oS(t,e,r,a){var i=r.calendarModel,n=r.seriesModel,o=i?i.coordinateSystem:n?n.coordinateSystem:null;return o===this?o[t](a):null}re.register("calendar",qr);var sS=ct.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,r,a){var i=rn(t);sS.superApply(this,"init",arguments),lS(t,i)},mergeOption:function(t,e){sS.superApply(this,"mergeOption",arguments),lS(this.option,t)}});function lS(t,e){var r=t.cellSize;P(r)?r.length===1&&(r[1]=r[0]):r=t.cellSize=[r,r];var a=E([0,1],function(i){return JD(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});ga(t,e,{type:"box",ignoreSize:a})}var vO={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\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"]},dO={EN:["S","M","T","W","T","F","S"],CN:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]};Xt({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,r){var a=this.group;a.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),o=i.getOrient();this._renderDayRect(t,n,a),this._renderLines(t,n,o,a),this._renderYearText(t,n,o,a),this._renderMonthText(t,o,a),this._renderWeekText(t,n,o,a)},_renderDayRect:function(t,e,r){for(var a=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),n=a.getCellWidth(),o=a.getCellHeight(),s=e.start.time;s<=e.end.time;s=a.getNextNDay(s,1).time){var l=a.dataToRect([s],!1).tl,u=new ft({shape:{x:l[0],y:l[1],width:n,height:o},cursor:"default",style:i});r.add(u)}},_renderLines:function(t,e,r,a){var i=this,n=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){c(u.formatedDate),h===0&&(u=n.getDateInfo(e.start.y+"-"+e.start.m));var f=u.date;f.setMonth(f.getMonth()+1),u=n.getDateInfo(f)}c(n.getNextNDay(e.end.time,1).formatedDate);function c(v){i._firstDayOfMonth.push(n.getDateInfo(v)),i._firstDayPoints.push(n.dataToRect([v],!1).tl);var d=i._getLinePointsOfOneWeek(t,v,r);i._tlpoints.push(d[0]),i._blpoints.push(d[d.length-1]),s&&i._drawSplitline(d,o,a)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,r),o,a),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,r),o,a)},_getEdgesPoints:function(t,e,r){var a=[t[0].slice(),t[t.length-1].slice()],i=r==="horizontal"?0:1;return a[0][i]=a[0][i]-e/2,a[1][i]=a[1][i]+e/2,a},_drawSplitline:function(t,e,r){var a=new Ve({z2:20,shape:{points:t},style:e});r.add(a)},_getLinePointsOfOneWeek:function(t,e,r){var a=t.coordinateSystem;e=a.getDateInfo(e);for(var i=[],n=0;n<7;n++){var o=a.getNextNDay(e.time,n),s=a.dataToRect([o.time],!1);i[2*o.day]=s.tl,i[2*o.day+1]=s[r==="horizontal"?"bl":"tr"]}return i},_formatterLabel:function(t,e){return typeof t=="string"&&t?q0(t,e):typeof t=="function"?t(e):e.nameMap},_yearTextPositionControl:function(t,e,r,a,i){e=e.slice();var n=["center","bottom"];a==="bottom"?(e[1]+=i,n=["center","top"]):a==="left"?e[0]-=i:a==="right"?(e[0]+=i,n=["center","top"]):e[1]-=i;var o=0;return(a==="left"||a==="right")&&(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:n[0],textVerticalAlign:n[1]}}},_renderYearText:function(t,e,r,a){var i=t.getModel("yearLabel");if(!!i.get("show")){var n=i.get("margin"),o=i.get("position");o||(o=r!=="horizontal"?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h=r==="horizontal"?0:1,f={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},c=e.start.y;+e.end.y>+e.start.y&&(c=c+"-"+e.end.y);var v=i.get("formatter"),d={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(v,d),p=new nt({z2:30});Rt(p.style,i,{text:g}),p.attr(this._yearTextPositionControl(p,f[o],r,o,n)),a.add(p)}},_monthTextPositionControl:function(t,e,r,a,i){var n="left",o="top",s=t[0],l=t[1];return r==="horizontal"?(l=l+i,e&&(n="center"),a==="start"&&(o="bottom")):(s=s+i,e&&(o="middle"),a==="start"&&(n="right")),{x:s,y:l,textAlign:n,textVerticalAlign:o}},_renderMonthText:function(t,e,r){var a=t.getModel("monthLabel");if(!!a.get("show")){var i=a.get("nameMap"),n=a.get("margin"),o=a.get("position"),s=a.get("align"),l=[this._tlpoints,this._blpoints];_t(i)&&(i=vO[i.toUpperCase()]||[]);var u=o==="start"?0:1,h=e==="horizontal"?0:1;n=o==="start"?-n:n;for(var f=s==="center",c=0;c=0;l--)i[l]==null?i.splice(l,1):delete i[l].$action},_flatten:function(t,e,r){T(t,function(a){if(!!a){r&&(a.parentOption=r),e.push(a);var i=a.children;a.type==="group"&&i&&this._flatten(i,e,a),delete a.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Xt({type:"graphic",init:function(t,e){this._elMap=j(),this._lastGraphicModel},render:function(t,e,r){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,r)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(!!e){var r=this._elMap,a=this.group;T(e,function(i){var n=i.$action,o=i.id,s=r.get(o),l=i.parentId,u=l!=null?r.get(l):a,h=i.style;i.type==="text"&&h&&(i.hv&&i.hv[1]&&(h.textVerticalAlign=h.textBaseline=null),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke));var f=pO(i);z&&s&&ot(u===s.parent,"Changing parent is not supported."),!n||n==="merge"?s?s.attr(f):hS(o,u,f,r):n==="replace"?(hh(s,r),hS(o,u,f,r)):n==="remove"&&hh(s,r);var c=r.get(o);c&&(c.__ecGraphicWidthOption=i.width,c.__ecGraphicHeightOption=i.height,xO(c,t,i))})}},_relocate:function(t,e){for(var r=t.option.elements,a=this.group,i=this._elMap,n=e.getWidth(),o=e.getHeight(),s=0;s=0;s--){var l=r[s],u=i.get(l.id);if(!!u){var h=u.parent,c=h===a?{width:n,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Fl(u,l,c,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){hh(e,t)}),this._elMap=j()},dispose:function(){this._clear()}});function hS(t,e,r,a){var i=r.type;z&&ot(i,"graphic type MUST be set");var n=uS.hasOwnProperty(i)?uS[i]:_c(i);z&&ot(n,"graphic type can not be found");var o=new n(r);e.add(o),a.set(t,o),o.__ecGraphicId=t}function hh(t,e){var r=t&&t.parent;r&&(t.type==="group"&&t.traverse(function(a){hh(a,e)}),e.removeKey(t.__ecGraphicId),r.remove(t))}function pO(t){return t=Z({},t),T(["id","parentId","$action","hv","bounding"].concat(Q0),function(e){delete t[e]}),t}function fS(t,e){var r;return T(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function mO(t,e){var r=t.exist;if(e.id=t.keyInfo.id,!e.type&&r&&(e.type=r.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:r&&(e.parentId=r.parentId)}e.parentOption=null}function yO(t,e,r){var a=Z({},r),i=t[e],n=r.$action||"merge";if(n==="merge")if(i){if(z){var o=r.type;ot(!o||i.type===o,'Please set $action: "replace" to change `type`')}J(i,a,!0),ga(i,a,{ignoreSize:!0}),J0(r,i)}else t[e]=a;else n==="replace"?t[e]=a:n==="remove"&&i&&(t[e]=null)}function _O(t,e){!t||(t.hv=e.hv=[fS(e,["left","right"]),fS(e,["top","bottom"])],t.type==="group"&&(t.width==null&&(t.width=e.width=0),t.height==null&&(t.height=e.height=0)))}function xO(t,e,r){var a=t.eventData;!t.silent&&!t.ignore&&!a&&(a=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),a&&(a.info=t.info)}var cS={};function Nn(t,e){cS[t]=e}function vS(t){return cS[t]}var wO=Me({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){wO.superApply(this,"optionUpdated",arguments),T(this.option.feature,function(t,e){var r=vS(e);r&&J(t,r.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,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}}});function bO(t,e,r){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:r.getWidth(),height:r.getHeight()},o=Ot(a,n,i);ei(e.get("orient"),t,e.get("itemGap"),o.width,o.height),Fl(t,a,n,i)}function dS(i,e){var r=ja(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new ft({shape:{x:i.x-r[3],y:i.y-r[0],width:i.width+r[1]+r[3],height:i.height+r[0]+r[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return i}Xt({type:"toolbox",render:function(t,e,r,a){var i=this.group;if(i.removeAll(),!t.get("show"))return;var n=+t.get("itemSize"),o=t.get("feature")||{},s=this._features||(this._features={}),l=[];T(o,function(f,c){l.push(c)}),new Wr(this._featureNames||[],l).add(u).update(u).remove(K(u,null)).execute(),this._featureNames=l;function u(f,c){var v=l[f],d=l[c],g=o[v],p=new ht(g,t,t.ecModel),m;if(a&&a.newTitle!=null&&a.featureName===v&&(g.title=a.newTitle),v&&!d){if(SO(v))m={model:p,onclick:p.option.onclick,featureName:v};else{var y=vS(v);if(!y)return;m=new y(p,e,r)}s[v]=m}else{if(m=s[d],!m)return;m.model=p,m.ecModel=e,m.api=r}if(!v&&d){m.dispose&&m.dispose(e,r);return}if(!p.get("show")||m.unusable){m.remove&&m.remove(e,r);return}h(p,m,v),p.setIconStatus=function(_,x){var w=this.option,S=this.iconPaths;w.iconStatus=w.iconStatus||{},w.iconStatus[_]=x,S[_]&&S[_].trigger(x)},m.render&&m.render(p,e,r,a)}function h(f,c,v){var d=f.getModel("iconStyle"),g=f.getModel("emphasis.iconStyle"),p=c.getIcons?c.getIcons():f.get("icon"),m=f.get("title")||{};if(typeof p=="string"){var y=p,_=m;p={},m={},p[v]=y,m[v]=_}var x=f.iconPaths={};T(p,function(w,S){var b=xo(w,{},{x:-n/2,y:-n/2,width:n,height:n});b.setStyle(d.getItemStyle()),b.hoverStyle=g.getItemStyle(),b.setStyle({text:m[S],textAlign:g.get("textAlign"),textBorderRadius:g.get("textBorderRadius"),textPadding:g.get("textPadding"),textFill:null});var A=t.getModel("tooltip");A&&A.get("show")&&b.attr("tooltip",Z({content:m[S],formatter:A.get("formatter",!0)||function(){return m[S]},formatterParams:{componentType:"toolbox",name:S,title:m[S],$vars:["name","title"]},position:A.get("position",!0)||"bottom"},A.option)),St(b),t.get("showTitle")&&(b.__title=m[S],b.on("mouseover",function(){var C=g.getItemStyle(),D=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";b.setStyle({textFill:g.get("textFill")||C.fill||C.stroke||"#000",textBackgroundColor:g.get("textBackgroundColor"),textPosition:g.get("textPosition")||D})}).on("mouseout",function(){b.setStyle({textFill:null,textBackgroundColor:null})})),b.trigger(f.get("iconStatus."+S)||"normal"),i.add(b),b.on("click",X(c.onclick,c,e,r,S)),x[S]=b})}bO(i,t,r),i.add(dS(i.getBoundingRect(),t)),i.eachChild(function(f){var c=f.__title,v=f.hoverStyle;if(v&&c){var d=cr(c,Tm(v)),g=f.position[0]+i.position[0],p=f.position[1]+i.position[1]+n,m=!1;p+d.height>r.getHeight()&&(v.textPosition="top",m=!0);var y=m?-5-d.height:n+8;g+d.width/2>r.getWidth()?(v.textPosition=["100%",y],v.textAlign="right"):g-d.width/2<0&&(v.textPosition=[0,y],v.textAlign="left")}})},updateView:function(t,e,r,a){T(this._features,function(i){i.updateView&&i.updateView(i.model,e,r,a)})},remove:function(t,e){T(this._features,function(r){r.remove&&r.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){T(this._features,function(r){r.dispose&&r.dispose(t,e)})}});function SO(t){return t.indexOf("my")===0}var gS=Fr.toolbox.saveAsImage;function fh(t){this.model=t}fh.defaultOption={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:gS.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:gS.lang.slice()},fh.prototype.unusable=!at.canvasSupported;var AO=fh.prototype;AO.onclick=function(t,e){var r=this.model,a=r.get("name")||t.get("title.0.text")||"echarts",i=e.getZr().painter.getType()==="svg",n=i?"svg":r.get("type",!0)||"png",o=e.getConnectedDataURL({type:n,backgroundColor:r.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")});if(typeof MouseEvent=="function"&&!at.browser.ie&&!at.browser.edge){var s=document.createElement("a");s.download=a+"."+n,s.target="_blank",s.href=o;var l=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});s.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob){for(var u=atob(o.split(",")[1]),h=u.length,f=new Uint8Array(h);h--;)f[h]=u.charCodeAt(h);var c=new Blob([f]);window.navigator.msSaveOrOpenBlob(c,a+"."+n)}else{var v=r.get("lang"),d='',g=window.open();g.document.write(d)}},Nn("saveAsImage",fh);var ch=Fr.toolbox.magicType,bg="__ec_magicType_stack__";function Sg(t){this.model=t}Sg.defaultOption={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:Y(ch.title),option:{},seriesIndex:{}};var pS=Sg.prototype;pS.getIcons=function(){var t=this.model,e=t.get("icon"),r={};return T(t.get("type"),function(a){e[a]&&(r[a]=e[a])}),r};var mS={line:function(t,e,r,a){if(t==="bar")return J({id:e,type:"line",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.line")||{},!0)},bar:function(t,e,r,a){if(t==="line")return J({id:e,type:"bar",data:r.get("data"),stack:r.get("stack"),markPoint:r.get("markPoint"),markLine:r.get("markLine")},a.get("option.bar")||{},!0)},stack:function(t,e,r,a){var i=r.get("stack")===bg;if(t==="line"||t==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),J({id:e,stack:i?"":bg},a.get("option.stack")||{},!0)}},TO=[["line","bar"],["stack"]];pS.onclick=function(t,e,r){var a=this.model,i=a.get("seriesIndex."+r);if(!!mS[r]){var n={series:[]},o=function(u){var h=u.subType,f=u.id,c=mS[r](h,f,u,a);c&&(U(c,u.option),n.series.push(c));var v=u.coordinateSystem;if(v&&v.type==="cartesian2d"&&(r==="line"||r==="bar")){var d=v.getAxesByScale("ordinal")[0];if(d){var g=d.dim,p=g+"Axis",m=t.queryComponents({mainType:p,index:u.get(name+"Index"),id:u.get(name+"Id")})[0],y=m.componentIndex;n[p]=n[p]||[];for(var _=0;_<=y;_++)n[p][y]=n[p][y]||{};n[p][y].boundaryGap=r==="bar"}}};T(TO,function(u){ut(u,r)>=0&&T(u,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(r,"emphasis"),t.eachComponent({mainType:"series",query:i==null?null:{seriesIndex:i}},o);var s;if(r==="stack"){var l=n.series&&n.series[0]&&n.series[0].stack===bg;s=l?J({stack:ch.title.tiled},ch.title):Y(ch.title)}e.dispatchAction({type:"changeMagicType",currentType:r,newOption:n,newTitle:s,featureName:"magicType"})}},lt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Nn("magicType",Sg);var yS=Fr.toolbox.dataView,vh=new Array(60).join("-"),On=" ";function CO(t){var e={},r=[],a=[];return t.eachRawSeries(function(i){var n=i.coordinateSystem;if(n&&(n.type==="cartesian2d"||n.type==="polar")){var o=n.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:n.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else r.push(i)}else r.push(i)}),{seriesGroupByCategoryAxis:e,other:r,meta:a}}function DO(t){var e=[];return T(t,function(r,a){var i=r.categoryAxis,n=r.valueAxis,o=n.dim,s=[" "].concat(E(r.series,function(v){return v.name})),l=[i.model.getCategories()];T(r.series,function(v){l.push(v.getRawData().mapArray(o,function(d){return d}))});for(var u=[s.join(On)],h=0;h=0)return!0}var Ag=new RegExp("["+On+"]+","g");function PO(t){for(var e=t.split(/\n+/g),r=dh(e.shift()).split(Ag),a=[],i=E(r,function(l){return{name:l,data:[]}}),n=0;n=0)&&o(n,a,i)})}var zn=mh.prototype;zn.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(r,a,i){if((r.coordRanges||(r.coordRanges=[])).push(a),!r.coordRange){r.coordRange=a;var n=Dg[r.brushType](0,i,a);r.__rangeOffset={offset:SS[r.brushType](n.values,r.range,[1,1]),xyMinMax:n.xyMinMax}}})},zn.matchOutputRanges=function(t,e,r){Ea(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&T(i.coordSyses,function(n){var o=Dg[a.brushType](1,n,a.range);r(a,o.values,n,e)})},this)},zn.setInputRanges=function(t,e){Ea(t,function(r){var a=this.findTargetInfo(r,e);if(z&&(ot(!a||a===!0||r.coordRange,"coordRange must be specified when coord index specified."),ot(!a||a!==!0||r.range,"range must be specified in global brush.")),r.range=r.range||[],a&&a!==!0){r.panelId=a.panelId;var i=Dg[r.brushType](0,a.coordSys,r.coordRange),n=r.__rangeOffset;r.range=n?SS[r.brushType](i.values,n.offset,zO(i.xyMinMax,n.xyMinMax)):i.values}},this)},zn.makePanelOpts=function(t,e){return E(this._targetInfoList,function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:e&&e(r),clipPath:Tw(a),isTargetByCursor:Dw(a,t,r.coordSysModel),getLinearBrushOtherExtent:Cw(a)}})},zn.controlSeries=function(t,e,r){var a=this.findTargetInfo(t,r);return a===!0||a&&gh(a.coordSyses,e.coordinateSystem)>=0},zn.findTargetInfo=function(t,e){for(var r=this._targetInfoList,a=_S(e,t),i=0;it[1]&&t.reverse(),t}function _S(t,e){return vl(t,e,{includeMainTypes:NO})}var OO={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,i=t.gridModels,n=j(),o={},s={};!r&&!a&&!i||(Ea(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),Ea(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),Ea(i,function(l){n.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),n.each(function(l){var u=l.coordinateSystem,h=[];Ea(u.getCartesians(),function(f,c){(gh(r,f.getAxis("x").model)>=0||gh(a,f.getAxis("y").model)>=0)&&h.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:h[0],coordSyses:h,getPanelRect:wS.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){Ea(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:wS.geo})})}},xS=[function(t,e){var r=t.xAxisModel,a=t.yAxisModel,i=t.gridModel;return!i&&r&&(i=r.axis.grid.model),!i&&a&&(i=a.axis.grid.model),i&&i===e.gridModel},function(t,e){var r=t.geoModel;return r&&r===e.geoModel}],wS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Qa(t)),e}},Dg={lineX:ph(bS,0),lineY:ph(bS,1),rect:function(t,e,r){var a=e[Tg[t]]([r[0][0],r[1][0]]),i=e[Tg[t]]([r[0][1],r[1][1]]),n=[Cg([a[0],i[0]]),Cg([a[1],i[1]])];return{values:n,xyMinMax:n}},polygon:function(t,e,r){var a=[[1/0,-1/0],[1/0,-1/0]],i=E(r,function(n){var o=e[Tg[t]](n);return a[0][0]=Math.min(a[0][0],o[0]),a[1][0]=Math.min(a[1][0],o[1]),a[0][1]=Math.max(a[0][1],o[0]),a[1][1]=Math.max(a[1][1],o[1]),o});return{values:i,xyMinMax:a}}};function bS(t,e,r,a){z&&ot(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][t]),n=Cg(E([0,1],function(s){return e?i.coordToData(i.toLocalCoord(a[s])):i.toGlobalCoord(i.dataToCoord(a[s]))})),o=[];return o[t]=n,o[1-t]=[NaN,NaN],{values:n,xyMinMax:o}}var SS={lineX:ph(AS,0),lineY:ph(AS,1),rect:function(t,e,r){return[[t[0][0]-r[0]*e[0][0],t[0][1]-r[0]*e[0][1]],[t[1][0]-r[1]*e[1][0],t[1][1]-r[1]*e[1][1]]]},polygon:function(t,e,r){return E(t,function(a,i){return[a[0]-r[0]*e[i][0],a[1]-r[1]*e[i][1]]})}};function AS(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function zO(t,e){var r=TS(t),a=TS(e),i=[r[0]/a[0],r[1]/a[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function TS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var CS=T,Ig="\0_ec_hist_store";function BO(t,e){var r=Mg(t);CS(e,function(a,i){for(var n=r.length-1;n>=0;n--){var o=r[n];if(o[i])break}if(n<0){var s=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();r[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),r.push(e)}function VO(t){var e=Mg(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return CS(r,function(i,n){for(var o=e.length-1;o>=0;o--){var i=e[o][n];if(i){a[n]=i;break}}}),a}function GO(t){t[Ig]=null}function HO(t){return Mg(t).length}function Mg(t){var e=t[Ig];return e||(e=t[Ig]=[{}]),e}ct.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var FO=["x","y","z","radius","angle","single"],WO=["cartesian2d","polar","singleAxis"];function UO(t){return ut(WO,t)>=0}function $O(t,e){t=t.slice();var r=E(t,Gl);e=(e||[]).slice();var a=E(e,Gl);return function(i,n){T(t,function(o,s){for(var l={name:o,capital:r[s]},u=0;u=0}function i(o,s){var l=!1;return e(function(u){T(r(o,u)||[],function(h){s.records[u.name][h]&&(l=!0)})}),l}function n(o,s){s.nodes.push(o),e(function(l){T(r(o,l)||[],function(u){s.records[l.name][u]=!0})})}}var Ai=T,IS=Ja,Lg=function(t,e,r,a){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=a,this._dataZoomModel=r};Lg.prototype={constructor:Lg,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(r){if(UO(r.get("coordinateSystem"))){var a=this._dimName,i=e.queryComponents({mainType:a+"Axis",index:r.get(a+"AxisIndex"),id:r.get(a+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&t.push(r)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t=this._dimName,e=this.ecModel,r=this.getAxisModel(),a=t==="x"||t==="y",i,n;a?(n="gridIndex",i=t==="x"?"y":"x"):(n="polarIndex",i=t==="angle"?"radius":"angle");var o;return e.eachComponent(i+"Axis",function(s){(s.get(n)||0)===(r.get(n)||0)&&(o=s)}),o},getMinMaxSpan:function(){return Y(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,r=this.getAxisModel(),a=r.axis.scale,i=this._dataZoomModel.getRangePropMode(),n=[0,100],o=[],s=[],l;Ai(["start","end"],function(f,c){var v=t[f],d=t[f+"Value"];i[c]==="percent"?(v==null&&(v=n[c]),d=a.parse(At(v,n,e))):(l=!0,d=d==null?e[c]:a.parse(d),v=At(d,e,n)),s[c]=d,o[c]=v}),IS(s),IS(o);var u=this._minMaxSpan;l?h(s,o,e,n,!1):h(o,s,n,e,!0);function h(f,c,v,d,g){var p=g?"Span":"ValueSpan";pi(0,f,v,"all",u["min"+p],u["max"+p]);for(var m=0;m<2;m++)c[m]=At(f[m],v,d,!0),g&&(c[m]=a.parse(c[m]))}return{valueWindow:s,percentWindow:o}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=YO(this,this._dimName,e),qO(this);var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,MS(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,MS(this,!0))},filterData:function(t,e){if(t!==this._dataZoomModel)return;var r=this._dimName,a=this.getTargetSeriesModels(),i=t.get("filterMode"),n=this._valueWindow;if(i==="none")return;Ai(a,function(s){var l=s.getData(),u=l.mapDimension(r,!0);!u.length||(i==="weakFilter"?l.filterSelf(function(h){for(var f,c,v,d=0;dn[1];if(p&&!m&&!y)return!0;p&&(v=!0),m&&(f=!0),y&&(c=!0)}return v&&f&&c}):Ai(u,function(h){if(i==="empty")s.setData(l=l.map(h,function(c){return o(c)?c:NaN}));else{var f={};f[h]=n,l.selectRange(f)}}),Ai(u,function(h){l.setApproximateExtent(n,h)}))});function o(s){return s>=n[0]&&s<=n[1]}}};function YO(t,e,r){var a=[1/0,-1/0];return Ai(r,function(i){var n=i.getData();n&&Ai(n.mapDimension(e,!0),function(o){var s=n.getApproximateExtent(o);s[0]a[1]&&(a[1]=s[1])})}),a[1]0?0:NaN);var o=r.getMax(!0);return o!=null&&o!=="dataMax"&&typeof o!="function"?e[1]=o:i&&(e[1]=n>0?n-1:NaN),r.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function MS(t,e){var r=t.getAxisModel(),a=t._percentWindow,i=t._valueWindow;if(!!a){var n=Dc(i,[0,500]);n=Math.min(n,20);var o=e||a[0]===0&&a[1]===100;r.setRange(o?null:+i[0].toFixed(n),o?null:+i[1].toFixed(n))}}function qO(t){var e=t._minMaxSpan={},r=t._dataZoomModel,a=t._dataExtent;Ai(["min","max"],function(i){var n=r.get(i+"Span"),o=r.get(i+"ValueSpan");o!=null&&(o=t.getAxisModel().axis.scale.parse(o)),o!=null?n=At(a[0]+o,a,[0,100],!0):n!=null&&(o=At(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o})}var Ti=T,Ci=DS,Pg=Me({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,r){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var a=LS(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this.doInit(a)},mergeOption:function(t){var e=LS(t);J(this.option,t,!0),J(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;at.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),PS(this,t);var r=this.settledOption;Ti([["start","startValue"],["end","endValue"]],function(a,i){this._rangePropMode[i]==="value"&&(e[a[0]]=r[a[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,r,a,i){var n=this.dependentModels[e.axis][r],o=n.__dzAxisProxy||(n.__dzAxisProxy=new Lg(e.name,r,this,i));t[e.name+"_"+r]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Ci(function(r){var a=r.axisIndex;t[a]=te(t[a])},this),e==="axisIndex"?this._autoSetAxisIndex():e==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Ci(function(a){t[a.axisIndex]!=null&&(e=!0)},this);var r=t.orient;if(r==null&&e)return"orient";if(!e)return r==null&&(t.orient="horizontal"),"axisIndex"},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),r=this.option,a=this.dependentModels;if(t){var i=e==="vertical"?"y":"x";a[i+"Axis"].length?(r[i+"AxisIndex"]=[0],t=!1):Ti(a.singleAxis,function(n){t&&n.get("orient",!0)===e&&(r.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Ci(function(n){if(!!t){var o=[],s=this.dependentModels[n.axis];if(s.length&&!o.length)for(var l=0,u=s.length;l0?100:20}},getFirstTargetAxisModel:function(){var t;return Ci(function(e){if(t==null){var r=this.get(e.axisIndex);r.length&&(t=this.dependentModels[e.axis][r[0]])}},this),t},eachTargetAxis:function(t,e){var r=this.ecModel;Ci(function(a){Ti(this.get(a.axisIndex),function(i){t.call(e,a,i,this,r)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var r=this.getAxisProxy(t,e);return r&&r.getAxisModel()},setRawRange:function(t){var e=this.option,r=this.settledOption;Ti([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(e[a[0]]=r[a[0]]=t[a[0]],e[a[1]]=r[a[1]]=t[a[1]])},this),PS(this,t)},setCalculatedRange:function(t){var e=this.option;Ti(["start","startValue","end","endValue"],function(r){e[r]=t[r]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(t==null&&e==null){var r=this.findRepresentativeAxisProxy();if(r)return r.getDataValueWindow()}else return this.getAxisProxy(t,e).getDataValueWindow()},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var r in e)if(e.hasOwnProperty(r)&&e[r].hostedBy(this))return e[r];for(var r in e)if(e.hasOwnProperty(r)&&!e[r].hostedBy(this))return e[r]},getRangePropMode:function(){return this._rangePropMode.slice()}});function LS(t){var e={};return Ti(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}function PS(t,e){var r=t._rangePropMode,a=t.get("rangeMode");Ti([["start","startValue"],["end","endValue"]],function(i,n){var o=e[i[0]]!=null,s=e[i[1]]!=null;o&&!s?r[n]="percent":!o&&s?r[n]="value":a?r[n]=a[n]:o&&(r[n]="percent")})}var Eg=wr.extend({type:"dataZoom",render:function(t,e,r,a){this.dataZoomModel=t,this.ecModel=e,this.api=r},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,r={};t.eachTargetAxis(function(i,n){var o=e.getComponent(i.axis,n);if(o){var s=o.getCoordSysModel();s&&a(s,o,r[s.mainType]||(r[s.mainType]=[]),s.componentIndex)}},this);function a(i,n,o,s){for(var l,u=0;u1?"emphasis":"normal")}function tz(t,e,r,a,i){var n=r._isZoomActive;a&&a.type==="takeGlobalCursor"&&(n=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),r._isZoomActive=n,t.setIconStatus("zoom",n?"emphasis":"normal");var o=new mh(RS(t.option),e,{include:["grid"]});r._brushController.setPanels(o.makePanelOpts(i,function(s){return s.xAxisDeclared&&!s.yAxisDeclared?"lineX":!s.xAxisDeclared&&s.yAxisDeclared?"lineY":"rect"})).enableBrush(n?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}Nn("dataZoom",Rg),ie(function(t){if(!t)return;var e=t.dataZoom||(t.dataZoom=[]);P(e)||(t.dataZoom=e=[e]);var r=t.toolbox;if(r&&(P(r)&&(r=r[0]),r&&r.feature)){var a=r.feature.dataZoom;i("xAxis",a),i("yAxis",a)}function i(o,s){if(!!s){var l=o+"Index",u=s[l];u!=null&&u!=="all"&&!P(u)&&(u=u===!1||u==="none"?[]:[u]),n(o,function(h,f){if(!(u!=null&&u!=="all"&&ut(u,f)===-1)){var c={type:"select",$fromToolbox:!0,filterMode:s.filterMode||"filter",id:QO+o+f};c[l]=f,e.push(c)}})}}function n(o,s){var l=t[o];P(l)||(l=l?[l]:[]),ES(l,s)}});var ez=Fr.toolbox.restore;function kg(t){this.model=t}kg.defaultOption={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:ez.title};var rz=kg.prototype;rz.onclick=function(t,e,r){GO(t),e.dispatchAction({type:"restore",from:this.uid})},Nn("restore",kg),lt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Me({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var kS=T,az=Y0,iz=["","-webkit-","-moz-","-o-"],nz="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function oz(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",r="left "+t+"s "+e+",top "+t+"s "+e;return E(iz,function(a){return a+"transition:"+r}).join(";")}function sz(t){var e=[],r=t.get("fontSize"),a=t.getTextColor();return a&&e.push("color:"+a),e.push("font:"+t.getFont()),r&&e.push("line-height:"+Math.round(r*3/2)+"px"),kS(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function lz(t){var e=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),i=t.getModel("textStyle"),n=t.get("padding");return r&&e.push(oz(r)),a&&(at.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+uf(a)),e.push("filter:alpha(opacity=70)"))),kS(["width","color","radius"],function(o){var s="border-"+o,l=az(s),u=t.get(l);u!=null&&e.push(s+":"+u+(o==="color"?"":"px"))}),e.push(sz(i)),n!=null&&e.push("padding:"+ja(n).join("px ")+"px"),e.join(";")+";"}function NS(t,e,r,a,i){var n=e&&e.painter;if(r){var o=n&&n.getViewportRoot();o&&CT(t,o,document.body,a,i)}else{t[0]=a,t[1]=i;var s=n&&n.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function Ng(t,e,r){if(at.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var i=this._zr=e.getZr(),n=this._appendToBody=r&&r.appendToBody;this._styleCoord=[0,0],NS(this._styleCoord,i,n,e.getWidth()/2,e.getHeight()/2),n?document.body.appendChild(a):t.appendChild(a),this._container=t,this._show=!1,this._hideTimeout;var o=this;a.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},a.onmousemove=function(s){if(s=s||window.event,!o._enterable){var l=i.handler,u=i.painter.getViewportRoot();fr(u,s,!0),l.dispatch("mousemove",s)}},a.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}Ng.prototype={constructor:Ng,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),r=t.style;r.position!=="absolute"&&e.position!=="absolute"&&(r.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,r=this._styleCoord;e.style.cssText=nz+lz(t)+";left:"+r[0]+"px;top:"+r[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=t??""},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var r=this._styleCoord;NS(r,this._zr,this._appendToBody,t,e);var a=this.el.style;a.left=r[0]+"px",a.top=r[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var r=document.defaultView.getComputedStyle(this.el);r&&(t+=parseInt(r.borderLeftWidth,10)+parseInt(r.borderRightWidth,10),e+=parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10))}return{width:t,height:e}}};function Og(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}Og.prototype={constructor:Og,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,r){this.el&&this._zr.remove(this.el);for(var a={},i=t,n="{marker",o="|}",s=i.indexOf(n);s>=0;){var l=i.indexOf(o),u=i.substr(s+n.length,l-s-n.length);u.indexOf("sub")>-1?a["marker"+u]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:a["marker"+u]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},i=i.substr(l+1),s=i.indexOf("{marker")}this.el=new nt({style:{rich:a,text:t,textLineHeight:20,textBackgroundColor:r.get("backgroundColor"),textBorderRadius:r.get("borderRadius"),textFill:r.get("textStyle.color"),textPadding:r.get("padding")},z:r.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){this._show&&!(this._inContent&&this._enterable)&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(X(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var OS=X,As=T,zS=R,uz=new ft({shape:{x:-1,y:-1,width:2,height:2}});Xt({type:"tooltip",init:function(t,e){if(!at.node){var r=t.getComponent("tooltip"),a=r.get("renderMode");this._renderMode=Zm(a);var i;this._renderMode==="html"?(i=new Ng(e.getDom(),e,{appendToBody:r.get("appendToBody",!0)}),this._newLine="
"):(i=new Og(e),this._newLine=` `),this._tooltipContent=i}},render:function(t,e,r){if(!at.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=r,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var a=this._tooltipContent;a.update(),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");bb("itemTooltip",this._api,OS(function(r,a,i){e!=="none"&&(e.indexOf(r)>=0?this._tryShow(a,i):r==="leave"&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,r=this._api;if(this._lastX!=null&&this._lastY!=null&&t.get("triggerOn")!=="none"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&a.manuallyShowTip(t,e,r,{x:a._lastX,y:a._lastY})})}},manuallyShowTip:function(t,e,r,a){if(!(a.from===this.uid||at.node)){var i=BS(a,r);this._ticket="";var n=a.dataByCoordSys;if(a.tooltip&&a.x!=null&&a.y!=null){var o=uz;o.position=[a.x,a.y],o.update(),o.tooltip=a.tooltip,this._tryShow({offsetX:a.x,offsetY:a.y,target:o},i)}else if(n)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:a.dataByCoordSys,tooltipOption:a.tooltipOption},i);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,e,r,a))return;var s=mb(a,e),l=s.point[0],u=s.point[1];l!=null&&u!=null&&this._tryShow({offsetX:l,offsetY:u,position:a.position,target:s.el},i)}else a.x!=null&&a.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:r.getZr().findHover(a.x,a.y).target},i))}},manuallyHideTip:function(t,e,r,a){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,a.from!==this.uid&&this._hide(BS(a,r))},_manuallyAxisShowTip:function(u,e,r,a){var i=a.seriesIndex,n=a.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(!(i==null||n==null||o==null)){var s=e.getSeriesByIndex(i);if(!!s){var l=s.getData(),u=zg([l.getItemModel(n),s,(s.coordinateSystem||{}).model,u]);if(u.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:n,position:a.position}),!0}}},_tryShow:function(t,e){var r=t.target,a=this._tooltipModel;if(!!a){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):r&&r.dataIndex!=null?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,r,e)):r&&r.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,r,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var r=t.get("showDelay");e=X(e,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(e,r):e()},_showAxisTooltip:function(t,e){var r=this._ecModel,a=this._tooltipModel,i=[e.offsetX,e.offsetY],n=[],o=[],s=zg([e.tooltipOption,a]),l=this._renderMode,u=this._newLine,h={};As(t,function(c){As(c.dataByAxis,function(v){var d=r.getComponent(v.axisDim+"Axis",v.axisIndex),g=v.value,p=[];if(!(!d||g==null)){var m=Pb(g,d.axis,r,v.seriesDataIndices,v.valueLabelOpt);T(v.seriesDataIndices,function(_){var x=r.getSeriesByIndex(_.seriesIndex),w=_.dataIndexInside,S=x&&x.getDataParams(w);if(S.axisDim=v.axisDim,S.axisIndex=v.axisIndex,S.axisType=v.axisType,S.axisId=v.axisId,S.axisValue=Lv(d.axis,g),S.axisValueLabel=m,S){o.push(S);var b=x.formatTooltip(w,!0,null,l),A;if(Q(b)){A=b.html;var C=b.markers;J(h,C)}else A=b;p.push(A)}});var y=m;l!=="html"?n.push(p.join(u)):n.push((y?Tt(y)+u:"")+p.join(u))}})},this),n.reverse(),n=n.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,f,i[0],i[1],this._tooltipContent,o):this._showTooltipContent(s,n,o,Math.random(),i[0],i[1],f,void 0,h)})},_showSeriesItemTooltip:function(t,e,r){var a=this._ecModel,i=e.seriesIndex,n=a.getSeriesByIndex(i),o=e.dataModel||n,s=e.dataIndex,l=e.dataType,u=o.getData(l),h=zg([u.getItemModel(s),o,n&&(n.coordinateSystem||{}).model,this._tooltipModel]),f=h.get("trigger");if(!(f!=null&&f!=="item")){var c=o.getDataParams(s,l),v=o.formatTooltip(s,!1,l,this._renderMode),d,g;Q(v)?(d=v.html,g=v.markers):(d=v,g=null);var p="item_"+o.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,c,p,t.offsetX,t.offsetY,t.position,t.target,g)}),r({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:i,from:this.uid})}},_showComponentItemTooltip:function(t,e,r){var a=e.tooltip;if(typeof a=="string"){var i=a;a={content:i,formatter:i}}var n=new ht(a,this._tooltipModel,this._ecModel),o=n.get("content"),s=Math.random();this._showOrMove(n,function(){this._showTooltipContent(n,o,n.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),r({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,r,a,i,n,o,s,l){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var u=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var f=e;if(h&&typeof h=="string")f=kc(h,r,!0);else if(typeof h=="function"){var c=OS(function(v,d){v===this._ticket&&(u.setContent(d,l,t),this._updatePosition(t,o,i,n,u,r,s))},this);this._ticket=a,f=h(r,a,c)}u.setContent(f,l,t),u.show(t),this._updatePosition(t,o,i,n,u,r,s)}},_updatePosition:function(t,e,r,a,i,n,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=i.getSize(),h=t.get("align"),f=t.get("verticalAlign"),c=o&&o.getBoundingRect().clone();if(o&&c.applyTransform(o.transform),typeof e=="function"&&(e=e([r,a],n,i.el,c,{viewSize:[s,l],contentSize:u.slice()})),P(e))r=zS(e[0],s),a=zS(e[1],l);else if(Q(e)){e.width=u[0],e.height=u[1];var v=Ot(e,{width:s,height:l});r=v.x,a=v.y,h=null,f=null}else if(typeof e=="string"&&o){var d=cz(e,c,u);r=d[0],a=d[1]}else{var d=hz(r,a,i,s,l,h?null:20,f?null:20);r=d[0],a=d[1]}if(h&&(r-=VS(h)?u[0]/2:h==="right"?u[0]:0),f&&(a-=VS(f)?u[1]/2:f==="bottom"?u[1]:0),t.get("confine")){var d=fz(r,a,i,s,l);r=d[0],a=d[1]}i.moveTo(r,a)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,r=!!e&&e.length===t.length;return r&&As(e,function(a,i){var n=a.dataByAxis||{},o=t[i]||{},s=o.dataByAxis||[];r&=n.length===s.length,r&&As(n,function(l,u){var h=s[u]||{},f=l.seriesDataIndices||[],c=h.seriesDataIndices||[];r&=l.value===h.value&&l.axisType===h.axisType&&l.axisId===h.axisId&&f.length===c.length,r&&As(f,function(v,d){var g=c[d];r&=v.seriesIndex===g.seriesIndex&&v.dataIndex===g.dataIndex})})}),this._lastDataByCoordSys=t,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){at.node||(this._tooltipContent.dispose(),ug("itemTooltip",e))}});function zg(t){for(var e=t.pop();t.length;){var r=t.pop();r&&(ht.isInstance(r)&&(r=r.get("tooltip",!0)),typeof r=="string"&&(r={formatter:r}),e=new ht(r,e,e.ecModel))}return e}function BS(t,e){return t.dispatchAction||X(e.dispatchAction,e)}function hz(t,e,r,a,i,n,o){var s=r.getOuterSize(),l=s.width,u=s.height;return n!=null&&(t+l+n>a?t-=l+n:t+=n),o!=null&&(e+u+o>i?e-=u+o:e+=o),[t,e]}function fz(t,e,r,a,i){var n=r.getOuterSize(),o=n.width,s=n.height;return t=Math.min(t+o,a)-o,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function cz(t,e,r){var a=r[0],i=r[1],n=5,o=0,s=0,l=e.width,u=e.height;switch(t){case"inside":o=e.x+l/2-a/2,s=e.y+u/2-i/2;break;case"top":o=e.x+l/2-a/2,s=e.y-i-n;break;case"bottom":o=e.x+l/2-a/2,s=e.y+u+n;break;case"left":o=e.x-a-n,s=e.y+u/2-i/2;break;case"right":o=e.x+l+n,s=e.y+u/2-i/2}return[o,s]}function VS(t){return t==="center"||t==="middle"}lt({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),lt({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var vz=["rect","polygon","keep","clear"],dz=function(t,e){var r=t&&t.brush;if(P(r)||(r=r?[r]:[]),!!r.length){var a=[];T(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=t&&t.toolbox;P(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var n=i.feature||(i.feature={}),o=n.brush||(n.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),gz(s),e&&!s.length&&s.push.apply(s,vz)}};function gz(t){var e={};T(t,function(r){e[r]=1}),t.length=0,T(e,function(r,a){t.push(a)})}var GS=T;function HS(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function Bg(t,e,r){var a={};return GS(e,function(n){var o=a[n]=i();GS(t[n],function(s,l){if(!!mt.isValidType(l)){var u={type:l,visual:s};r&&r(u,n),o[l]=new mt(u),l==="opacity"&&(u=Y(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new mt(u))}})}),a;function i(){var n=function(){};n.prototype.__hidden=n.prototype;var o=new n;return o}}function FS(t,e,r){var a;T(r,function(i){e.hasOwnProperty(i)&&HS(e[i])&&(a=!0)}),a&&T(r,function(i){e.hasOwnProperty(i)&&HS(e[i])?t[i]=Y(e[i]):delete t[i]})}function pz(t,e,r,a,i,n){var o={};T(t,function(f){var c=mt.prepareVisualTypes(e[f]);o[f]=c});var s;function l(f){return r.getItemVisual(s,f)}function u(f,c){r.setItemVisual(s,f,c)}n==null?r.each(h):r.each([n],h);function h(f,c){s=n==null?f:c;var v=r.getRawDataItem(s);if(!(v&&v.visualMap===!1))for(var d=a.call(i,f),g=e[d],p=o[d],m=0,y=p.length;me[0][1]&&(e[0][1]=n[0]),n[1]e[1][1]&&(e[1][1]=n[1])}return e&&qS(e)}};function qS(t){return new it(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var Sz=["#ddd"],u5=Me({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var r=this.option;!e&&FS(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:Sz},a.hasOwnProperty("liftZ")||(a.liftZ=5)},setAreas:function(t){z&&(ot(P(t)),T(t,function(e){ot(e.brushType,"Illegal areas")})),t&&(this.areas=E(t,function(e){return KS(this.option,e)},this))},setBrushOption:function(t){this.brushOption=KS(this.option,t),this.brushType=this.brushOption.brushType}});function KS(t,e){return J({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ht(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}Xt({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Rn(e.getZr())).on("brush",X(this._onBrush,this)).mount()},render:function(t){return this.model=t,Fg.apply(this,arguments)},updateTransform:function(t,e){return ZS(e),Fg.apply(this,arguments)},updateView:Fg,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var r=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:r,areas:Y(t),$from:r}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:Y(t),$from:r})}});function Fg(t,e,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}lt({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(r){r.setAreas(t.areas)})}),lt({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),lt({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var Az=Fr.toolbox.brush;function Wg(t,e,r){this.model=t,this.ecModel=e,this.api=r,this._brushType,this._brushMode}Wg.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:Y(Az.title)};var yh=Wg.prototype;yh.render=yh.updateView=function(t,e,r){var a,i,n;e.eachComponent({mainType:"brush"},function(o){a=o.brushType,i=o.brushOption.brushMode||"single",n|=o.areas.length}),this._brushType=a,this._brushMode=i,T(t.get("type",!0),function(o){t.setIconStatus(o,(o==="keep"?i==="multiple":o==="clear"?n:o===a)?"emphasis":"normal")})},yh.getIcons=function(){var t=this.model,e=t.get("icon",!0),r={};return T(t.get("type",!0),function(a){e[a]&&(r[a]=e[a])}),r},yh.onclick=function(t,e,r){var a=this._brushType,i=this._brushMode;r==="clear"?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:r==="keep"?a:a===r?!1:r,brushMode:r==="keep"?i==="multiple"?"single":"multiple":i}})},Nn("brush",Wg),ie(dz),Me({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Xt({type:"title",render:function(t,e,r){if(this.group.removeAll(),!!t.get("show")){var a=this.group,i=t.getModel("textStyle"),n=t.getModel("subtextStyle"),o=t.get("textAlign"),s=Nt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new nt({style:Rt({},i,{text:t.get("text"),textFill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),f=new nt({style:Rt({},n,{text:h,textFill:n.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),c=t.get("link"),v=t.get("sublink"),d=t.get("triggerEvent",!0);l.silent=!c&&!d,f.silent=!v&&!d,c&&l.on("click",function(){To(c,"_"+t.get("target"))}),v&&f.on("click",function(){To(c,"_"+t.get("subtarget"))}),l.eventData=f.eventData=d?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(l),h&&a.add(f);var g=a.getBoundingRect(),p=t.getBoxLayoutParams();p.width=g.width,p.height=g.height;var m=Ot(p,{width:r.getWidth(),height:r.getHeight()},t.get("padding"));o||(o=t.get("left")||t.get("right"),o==="middle"&&(o="center"),o==="right"?m.x+=m.width:o==="center"&&(m.x+=m.width/2)),s||(s=t.get("top")||t.get("bottom"),s==="center"&&(s="middle"),s==="bottom"?m.y+=m.height:s==="middle"&&(m.y+=m.height/2),s=s||"top"),a.attr("position",[m.x,m.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),f.setStyle(y),g=a.getBoundingRect();var _=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new ft({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});a.add(w)}}});var Tz=function(t){var e=t&&t.timeline;P(e)||(e=e?[e]:[]),T(e,function(r){!r||Cz(r)})};function Cz(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),QS(t),Di(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});Di(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!Di(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}T(t.data||[],function(i){Q(i)&&!P(i)&&(!Di(i,"value")&&Di(i,"name")&&(i.value=i.name),QS(i))})}function QS(t){var e=t.itemStyle||(t.itemStyle={}),r=e.emphasis||(e.emphasis={}),a=t.label||t.label||{},i=a.normal||(a.normal={}),n={normal:1,emphasis:1};T(a,function(o,s){!n[s]&&!Di(i,s)&&(i[s]=o)}),r.label&&!Di(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function Di(t,e){return t.hasOwnProperty(e)}ct.registerSubTypeDefaulter("timeline",function(){return"slider"}),lt({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var r=e.getComponent("timeline");return r&&t.currentIndex!=null&&(r.setCurrentIndex(t.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.setPlayState(!1)),e.resetOption("timeline"),U({currentIndex:r.option.currentIndex},t)}),lt({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");r&&t.playState!=null&&r.setPlayState(t.playState)});var JS=ct.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,r){this._data,this._names,this.mergeDefaultAndTheme(t,r),this._initData()},mergeOption:function(t){JS.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){t==null&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],r=t.axisType,a=this._names=[];if(r==="category"){var i=[];T(e,function(s,l){var u=so(s),h;Q(s)?(h=Y(s),h.value=l):h=l,i.push(h),!_t(u)&&(u==null||isNaN(u))&&(u=""),a.push(u+"")}),e=i}var n={category:"ordinal",time:"time"}[r]||"number",o=this._data=new qt([{name:"value",type:n}],this);o.initData(e,a)},getData:function(){return this._data},getCategories:function(){if(this.get("axisType")==="category")return this._names.slice()}}),Dz=JS.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});pt(Dz,Jc);var Iz=wr.extend({type:"timeline"}),_h=function(t,e,r,a){Vt.call(this,t,e,r),this.type=a||"value",this.model=null};_h.prototype={constructor:_h,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},yt(_h,Vt);var Ra=X,Ug=T,$g=Math.PI;Iz.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,r,a){if(this.model=t,this.api=r,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,r),n=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(i,t);t.formatTooltip=function(l){return Tt(s.scale.getLabel(l))},Ug(["AxisLine","AxisTick","Control","CurrentPointer"],function(l){this["_render"+l](i,n,s,t)},this),this._renderAxisLabel(i,o,s,t),this._position(i,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var r=t.get("label.position"),a=t.get("orient"),i=Mz(t,e);r==null||r==="auto"?r=a==="horizontal"?i.y+i.height/2=0||r==="+"?"left":"right"},o={horizontal:r>=0||r==="+"?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:$g/2},l=a==="vertical"?i.height:i.width,u=t.getModel("controlStyle"),h=u.get("show",!0),f=h?u.get("itemSize"):0,c=h?u.get("itemGap"):0,v=f+c,d=t.get("label.rotate")||0;d=d*$g/180;var g,p,m,y,_=u.get("position",!0),x=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),S=h&&u.get("showNextBtn",!0),b=0,A=l;return _==="left"||_==="bottom"?(x&&(g=[0,0],b+=v),w&&(p=[b,0],b+=v),S&&(m=[A-f,0],A-=v)):(x&&(g=[A-f,0],A-=v),w&&(p=[0,0],b+=v),S&&(m=[A-f,0],A-=v)),y=[b,A],t.get("inverse")&&y.reverse(),{viewRect:i,mainLength:l,orient:a,rotation:s[a],labelRotation:d,labelPosOpt:r,labelAlign:t.get("label.align")||n[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||o[a],playPosition:g,prevBtnPosition:p,nextBtnPosition:m,axisExtent:y,controlSize:f,controlGap:c}},_position:function(t,e){var r=this._mainGroup,a=this._labelGroup,i=t.viewRect;if(t.orient==="vertical"){var n=ce(),o=i.x,s=i.y+i.height;Je(n,n,[-o,-s]),Or(n,n,-$g/2),Je(n,n,[o,s]),i=i.clone(),i.applyTransform(n)}var l=p(i),u=p(r.getBoundingRect()),h=p(a.getBoundingRect()),f=r.position,c=a.position;c[0]=f[0]=l[0][0];var v=t.labelPosOpt;if(isNaN(v)){var d=v==="+"?0:1;m(f,u,l,1,d),m(c,h,l,1,1-d)}else{var d=v>=0?0:1;m(f,u,l,1,d),c[1]=f[1]+v}r.attr("position",f),a.attr("position",c),r.rotation=a.rotation=t.rotation,g(r),g(a);function g(y){var _=y.position;y.origin=[l[0][0]-_[0],l[1][0]-_[1]]}function p(y){return[[y.x,y.x+y.width],[y.y,y.y+y.height]]}function m(y,_,x,w,S){y[w]+=x[w][S]-_[w][S]}},_createAxis:function(t,e){var r=e.getData(),a=e.get("axisType"),i=dn(e,a);i.getTicks=function(){return r.mapArray(["value"],function(s){return s})};var n=r.getDataExtent("value");i.setExtent(n[0],n[1]),i.niceTicks();var o=new _h("value",i,t.axisExtent,a);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new G;return this.group.add(e),e},_renderAxisLine:function(t,e,r,a){var i=r.getExtent();!a.get("lineStyle.show")||e.add(new ee({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:Z({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,r,a){var i=a.getData(),n=r.scale.getTicks();Ug(n,function(o){var s=r.dataToCoord(o),l=i.getItemModel(o),u=l.getModel("itemStyle"),h=l.getModel("emphasis.itemStyle"),f={position:[s,0],onclick:Ra(this._changeTimeline,this,o)},c=jS(l,u,e,f);St(c,h.getItemStyle()),l.get("tooltip")?(c.dataIndex=o,c.dataModel=a):c.dataIndex=c.dataModel=null},this)},_renderAxisLabel:function(t,e,r,a){var i=r.getLabelModel();if(!!i.get("show")){var n=a.getData(),o=r.getViewLabels();Ug(o,function(s){var l=s.tickValue,u=n.getItemModel(l),h=u.getModel("label"),f=u.getModel("emphasis.label"),c=r.dataToCoord(s.tickValue),v=new nt({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:Ra(this._changeTimeline,this,l),silent:!1});Rt(v.style,h,{text:s.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(v),St(v,Rt({},f))},this)}},_renderControl:function(t,e,r,a){var i=t.controlSize,n=t.rotation,o=a.getModel("controlStyle").getItemStyle(),s=a.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-i/2,i,i],u=a.getPlayState(),h=a.get("inverse",!0);f(t.nextBtnPosition,"controlStyle.nextIcon",Ra(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",Ra(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),Ra(this._handlePlayClick,this,!u),!0);function f(c,v,d,g){if(!!c){var p={position:c,origin:[i/2,0],rotation:g?-n:0,rectHover:!0,style:o,onclick:d},m=Lz(a,v,l,p);e.add(m),St(m,s)}}},_renderCurrentPointer:function(t,e,r,a){var i=a.getData(),n=a.getCurrentIndex(),o=i.getItemModel(n).getModel("checkpointStyle"),s=this,l={onCreate:function(u){u.draggable=!0,u.drift=Ra(s._handlePointerDrag,s),u.ondragend=Ra(s._handlePointerDragend,s),tA(u,n,r,a,!0)},onUpdate:function(u){tA(u,n,r,a)}};this._currentPointer=jS(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,r){this._clearTimer(),this._pointerChangeTimeline([r.offsetX,r.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var r=this._toAxisCoord(t)[0],a=this._axis,i=Ja(a.getExtent().slice());r>i[1]&&(r=i[1]),r"),i&&(n+=Zg(i),r!=null&&(n+=" : ")),r!=null&&(n+=Zg(a)),n},getData:function(){return this._data},setData:function(t){this._data=t}});pt(wh,Jc),wh.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var rA=ut;function Pz(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Ez(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Yg(t,e,r,a,i,n){var o=[],s=Ur(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=Kg(e,l,t),h=e.indicesOfNearest(l,u)[0];o[i]=e.get(r,h),o[n]=e.get(l,h);var f=e.get(a,h),c=W0(e.get(a,h));return c=Math.min(c,20),c>=0&&(o[n]=+o[n].toFixed(c)),[o,f]}var Xg=K,qg={min:Xg(Yg,"min"),max:Xg(Yg,"max"),average:Xg(Yg,"average")};function Cs(t,e){var r=t.getData(),a=t.coordinateSystem;if(e&&!Ez(e)&&!P(e.coord)&&a){var i=a.dimensions,n=aA(e,r,a,t);if(e=Y(e),e.type&&qg[e.type]&&n.baseAxis&&n.valueAxis){var o=rA(i,n.baseAxis.dim),s=rA(i,n.valueAxis.dim),l=qg[e.type](r,n.baseDataDim,n.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else{for(var u=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis],h=0;h<2;h++)qg[u[h]]&&(u[h]=Kg(r,r.mapDimension(i[h]),u[h]));e.coord=u}}return e}function aA(t,e,r,a){var i={};return t.valueIndex!=null||t.valueDim!=null?(i.valueDataDim=t.valueIndex!=null?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=r.getAxis(Rz(a,i.valueDataDim)),i.baseAxis=r.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=a.getBaseAxis(),i.valueAxis=r.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function Rz(t,e){var r=t.getData(),a=r.dimensions;e=r.getDimension(e);for(var i=0;i=0&&typeof s=="number"&&(s=+s.toFixed(Math.min(d,20))),c.coord[h]=v.coord[h]=s,a=[c,v,{type:n,valueIndex:a.valueIndex,value:s}]}return a=[Cs(t,a[0]),Cs(t,a[1]),Z({},a[2])],a[2].type=a[2].type||"",J(a[2],a[0]),J(a[2],a[1]),a};function bh(t){return!isNaN(t)&&!isFinite(t)}function oA(t,e,r,a){var i=1-t,n=a.dimensions[t];return bh(e[i])&&bh(r[i])&&e[t]===r[t]&&a.getAxis(n).containData(e[t])}function Oz(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(oA(1,r,a,t)||oA(0,r,a,t)))return!0}return Ds(t,e[0])&&Ds(t,e[1])}function Jg(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=R(o.get("x"),i.getWidth()),u=R(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=n.dimensions,f=t.get(h[0],e),c=t.get(h[1],e);s=n.dataToPoint([f,c])}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=n.dimensions;bh(t.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):bh(t.get(h[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[r?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}t.setItemLayout(e,s)}Qg.extend({type:"markLine",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markLineModel;if(i){var n=i.getData(),o=i.__from,s=i.__to;o.each(function(l){Jg(o,l,!0,a,r),Jg(s,l,!1,a,r)}),n.each(function(l){n.setItemLayout(l,[o.getItemLayout(l),s.getItemLayout(l)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new Vu);this.group.add(l.group);var u=zz(i,t,e),h=u.from,f=u.to,c=u.line;e.__from=h,e.__to=f,e.setData(c);var v=e.get("symbol"),d=e.get("symbolSize");P(v)||(v=[v,v]),typeof d=="number"&&(d=[d,d]),u.from.each(function(p){g(h,p,!0),g(f,p,!1)}),c.each(function(p){var m=c.getItemModel(p).get("lineStyle.color");c.setItemVisual(p,{color:m||h.getItemVisual(p,"color")}),c.setItemLayout(p,[h.getItemLayout(p),f.getItemLayout(p)]),c.setItemVisual(p,{fromSymbolSize:h.getItemVisual(p,"symbolSize"),fromSymbol:h.getItemVisual(p,"symbol"),toSymbolSize:f.getItemVisual(p,"symbolSize"),toSymbol:f.getItemVisual(p,"symbol")})}),l.updateData(c),u.line.eachItemGraphicEl(function(p,m){p.traverse(function(y){y.dataModel=e})});function g(p,m,y){var _=p.getItemModel(m);Jg(p,m,y,t,a),p.setItemVisual(m,{symbolSize:_.get("symbolSize")||d[y?0:1],symbol:_.get("symbol",!0)||v[y?0:1],color:_.get("itemStyle.color")||o.getVisual("color")})}l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}});function zz(t,e,r){var a;t?a=E(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return U({name:u},h)}):a=[{name:"value",type:"float"}];var i=new qt(a,r),n=new qt(a,r),o=new qt([],r),s=E(r.get("data"),K(Nz,e,t,r));t&&(s=Ht(s,K(Oz,t)));var l=t?iA:function(u){return u.value};return i.initData(E(s,function(u){return u[0]}),null,l),n.initData(E(s,function(u){return u[1]}),null,l),o.initData(E(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}ie(function(t){t.markLine=t.markLine||{}}),wh.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var Bz=function(t,e,r,a){var i=Cs(t,a[0]),n=Cs(t,a[1]),o=Et,s=i.coord,l=n.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=Yn([{},i,n]);return u.coord=[i.coord,n.coord],u.x0=i.x,u.y0=i.y,u.x1=n.x,u.y1=n.y,u};function Sh(t){return!isNaN(t)&&!isFinite(t)}function sA(t,e,r,a){var i=1-t;return Sh(e[i])&&Sh(r[i])}function Vz(t,e){var r=e.coord[0],a=e.coord[1];return t.type==="cartesian2d"&&r&&a&&(sA(1,r,a,t)||sA(0,r,a,t))?!0:Ds(t,{coord:r,x:e.x0,y:e.y0})||Ds(t,{coord:a,x:e.x1,y:e.y1})}function lA(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=R(o.get(r[0]),i.getWidth()),u=R(o.get(r[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(t.getValues(r,e));else{var h=t.get(r[0],e),f=t.get(r[1],e),c=[h,f];n.clampData&&n.clampData(c,c),s=n.dataToPoint(c,!0)}if(n.type==="cartesian2d"){var v=n.getAxis("x"),d=n.getAxis("y"),h=t.get(r[0],e),f=t.get(r[1],e);Sh(h)?s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1]):Sh(f)&&(s[1]=d.toGlobalCoord(d.getExtent()[r[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var uA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];Qg.extend({type:"markArea",updateTransform:function(t,e,r){e.eachSeries(function(a){var i=a.markAreaModel;if(i){var n=i.getData();n.each(function(o){var s=E(uA,function(u){return lA(n,o,u,a,r)});n.setItemLayout(o,s);var l=n.getItemGraphicEl(o);l.setShape("points",s)})}},this)},renderSeries:function(t,e,r,a){var i=t.coordinateSystem,n=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,{group:new G});this.group.add(l.group),l.__keep=!0;var u=Gz(i,t,e);e.setData(u),u.each(function(h){u.setItemLayout(h,E(uA,function(f){return lA(u,h,f,t,a)})),u.setItemVisual(h,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(h){var f=new Se({shape:{points:u.getItemLayout(h)}});u.setItemGraphicEl(h,f),l.group.add(f)}).update(function(h,f){var c=l.__data.getItemGraphicEl(f);tt(c,{shape:{points:u.getItemLayout(h)}},e,h),l.group.add(c),u.setItemGraphicEl(h,c)}).remove(function(h){var f=l.__data.getItemGraphicEl(h);l.group.remove(f)}).execute(),u.eachItemGraphicEl(function(h,f){var c=u.getItemModel(f),v=c.getModel("label"),d=c.getModel("emphasis.label"),g=u.getItemVisual(f,"color");h.useStyle(U(c.getModel("itemStyle").getItemStyle(),{fill:Xs(g,.4),stroke:g})),h.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle(),Te(h.style,h.hoverStyle,v,d,{labelFetcher:e,labelDataIndex:f,defaultText:u.getName(f)||"",isRectText:!0,autoColor:g}),St(h,{}),h.dataModel=e}),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}});function Gz(t,e,r){var a,i,n=["x0","y0","x1","y1"];t?(a=E(t&&t.dimensions,function(l){var u=e.getData(),h=u.getDimensionInfo(u.mapDimension(l))||{};return U({name:l},h)}),i=new qt(E(n,function(l,u){return{name:l,type:a[u%2].type}}),r)):(a=[{name:"value",type:"float"}],i=new qt(a,r));var o=E(r.get("data"),K(Bz,e,t,r));t&&(o=Ht(o,K(Vz,t)));var s=t?function(l,u,h,f){return l.coord[Math.floor(f/2)][f%2]}:function(l){return l.value};return i.initData(o,null,s),i.hasItemOption=!0,i}ie(function(t){t.markArea=t.markArea||{}});var hA=Fr.legend.selector,Hz={all:{type:"all",title:Y(hA.all)},inverse:{type:"inverse",title:Y(hA.inverse)}},fA=Me({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,r){this.mergeDefaultAndTheme(t,r),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){fA.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),P(e)&&T(e,function(r,a){_t(r)&&(r={type:r}),e[a]=J(r,Hz[r.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var e=!1,r=0;r=0},getOrient:function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});function Is(t,e,r){var a={},i=t==="toggleSelected",n;return r.eachComponent("legend",function(o){i&&n!=null?o[n?"select":"unSelect"](e.name):t==="allSelect"||t==="inverseSelect"?o[t]():(o[t](e.name),n=o.isSelected(e.name));var s=o.getData();T(s,function(l){var u=l.get("name");if(!(u===` `||u==="")){var h=o.isSelected(u);a.hasOwnProperty(u)?a[u]=a[u]&&h:a[u]=h}})}),t==="allSelect"||t==="inverseSelect"?{selected:a}:{name:e.name,selected:a}}lt("legendToggleSelect","legendselectchanged",K(Is,"toggleSelected")),lt("legendAllSelect","legendselectall",K(Is,"allSelect")),lt("legendInverseSelect","legendinverseselect",K(Is,"inverseSelect")),lt("legendSelect","legendselected",K(Is,"select")),lt("legendUnSelect","legendunselected",K(Is,"unSelect"));var Vn=K,cA=T,Ah=G,Fz=Xt({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Ah),this._backgroundEl,this.group.add(this._selectorGroup=new Ah),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,r){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var i=t.get("align"),n=t.get("orient");(!i||i==="auto")&&(i=t.get("left")==="right"&&n==="vertical"?"right":"left");var o=t.get("selector",!0),s=t.get("selectorPosition",!0);o&&(!s||s==="auto")&&(s=n==="horizontal"?"end":"start"),this.renderInner(i,t,e,r,o,n,s);var l=t.getBoxLayoutParams(),u={width:r.getWidth(),height:r.getHeight()},h=t.get("padding"),f=Ot(l,u,h),c=this.layoutInner(t,i,f,a,o,s),v=Ot(U({width:c.width,height:c.height},l),u,h);this.group.attr("position",[v.x-c.x,v.y-c.y]),this.group.add(this._backgroundEl=dS(c,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,r,a,i,n,o){var s=this.getContentGroup(),l=j(),u=e.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),cA(e.getData(),function(f,c){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===` `)){s.add(new Ah({newline:!0}));return}var d=r.getSeriesByName(v)[0];if(!l.get(v)){if(d){var g=d.getData(),p=g.getVisual("color"),m=g.getVisual("borderColor");typeof p=="function"&&(p=p(d.getDataParams(0))),typeof m=="function"&&(m=m(d.getDataParams(0)));var y=g.getVisual("legendSymbol")||"roundRect",_=g.getVisual("symbol"),x=this._createItem(v,c,f,e,y,_,t,p,m,u);x.on("click",Vn(dA,v,null,a,h)).on("mouseover",Vn(jg,d.name,null,a,h)).on("mouseout",Vn(tp,d.name,null,a,h)),l.set(v,!0)}else r.eachRawSeries(function(w){if(!l.get(v)&&w.legendVisualProvider){var S=w.legendVisualProvider;if(!S.containName(v))return;var b=S.indexOfName(v),A=S.getItemVisual(b,"color"),C=S.getItemVisual(b,"borderColor"),D="roundRect",I=this._createItem(v,c,f,e,D,null,t,A,C,u);I.on("click",Vn(dA,null,v,a,h)).on("mouseover",Vn(jg,null,v,a,h)).on("mouseout",Vn(tp,null,v,a,h)),l.set(v,!0)}},this);z&&(l.get(v)||console.warn(v+" series not exists. Legend data should be same with series name or data name."))}},this),i&&this._createSelector(i,e,a,n,o)},_createSelector:function(t,e,r,a,i){var n=this.getSelectorGroup();cA(t,function(s){o(s)});function o(s){var l=s.type,u=new nt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:l==="all"?"legendAllSelect":"legendInverseSelect"})}});n.add(u);var h=e.getModel("selectorLabel"),f=e.getModel("emphasis.selectorLabel");Te(u.style,u.hoverStyle={},h,f,{defaultText:s.title,isRectText:!1}),St(u)}},_createItem:function(t,e,r,a,i,n,o,s,l,u){var h=a.get("itemWidth"),f=a.get("itemHeight"),c=a.get("inactiveColor"),v=a.get("inactiveBorderColor"),d=a.get("symbolKeepAspect"),g=a.getModel("itemStyle"),p=a.isSelected(t),m=new Ah,y=r.getModel("textStyle"),_=r.get("icon"),x=r.getModel("tooltip"),w=x.parentModel;i=_||i;var S=Le(i,0,0,h,f,p?s:c,d??!0);if(m.add(vA(S,i,g,l,v,p)),!_&&n&&(n!==i||n==="none")){var b=f*.8;n==="none"&&(n="circle");var A=Le(n,(h-b)/2,(f-b)/2,b,b,p?s:c,d??!0);m.add(vA(A,n,g,l,v,p))}var C=o==="left"?h+5:-5,D=o,I=a.get("formatter"),L=t;typeof I=="string"&&I?L=I.replace("{name}",t??""):typeof I=="function"&&(L=I(t)),m.add(new nt({style:Rt({},y,{text:L,x:C,y:f/2,textFill:p?y.getTextColor():c,textAlign:D,textVerticalAlign:"middle"})}));var M=new ft({shape:m.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Z({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},x.option):null});return m.add(M),m.eachChild(function(B){B.silent=!0}),M.silent=!u,this.getContentGroup().add(m),St(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,r,a,i,n){var o=this.getContentGroup(),s=this.getSelectorGroup();ei(t.get("orient"),o,t.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(i){ei("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),f=[-h.x,-h.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=v===0?"width":"height",g=v===0?"height":"width",p=v===0?"y":"x";n==="end"?f[v]+=l[d]+c:u[v]+=h[d]+c,f[1-v]+=l[g]/2-h[g]/2,s.attr("position",f),o.attr("position",u);var m={x:0,y:0};return m[d]=l[d]+c+h[d],m[g]=Math.max(l[g],h[g]),m[p]=Math.min(0,h[p]+f[1-v]),m}else return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function vA(t,e,r,a,i,n){var o;return e!=="line"&&e.indexOf("empty")<0?(o=r.getItemStyle(),t.style.stroke=a,n||(o.stroke=i)):o=r.getItemStyle(["borderWidth","borderColor"]),t.setStyle(o)}function dA(t,e,r,a){tp(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),jg(t,e,r,a)}function jg(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:a})}function tp(t,e,r,a){var i=r.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||r.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:a})}var Wz=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(r){for(var a=0;ar[i],v=[-h.x,-h.y];e||(v[a]=s.position[a]);var d=[0,0],g=[-f.x,-f.y],p=Nt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(c){var m=t.get("pageButtonPosition",!0);m==="end"?g[a]+=r[i]-f[i]:d[a]+=f[i]+p}g[1-a]+=h[n]/2-f[n]/2,s.attr("position",v),l.attr("position",d),u.attr("position",g);var y={x:0,y:0};if(y[i]=c?r[i]:h[i],y[n]=Math.max(h[n],f[n]),y[o]=Math.min(0,f[o]+g[1-a]),l.__rectSize=r[i],c){var _={x:0,y:0};_[i]=Math.max(r[i]-f[i]-p,0),_[n]=y[n],l.setClipPath(new ft({shape:_})),l.__rectSize=_[i]}else u.eachChild(function(w){w.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return x.pageIndex!=null&&tt(s,{position:x.contentPosition},c?t:!1),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,r){var a=this._getPageInfo(e)[t];a!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:e.id})},_updatePageInfoView:function(t,e){var r=this._controllerGroup;T(["pagePrev","pageNext"],function(l){var u=e[l+"DataIndex"]!=null,h=r.childOfName(l);h&&(h.setStyle("fill",u?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=u?"pointer":"default")});var a=r.childOfName("pageText"),i=t.get("pageFormatter"),n=e.pageIndex,o=n!=null?n+1:0,s=e.pageCount;a&&i&&a.setStyle("text",_t(i)?i.replace("{current}",o).replace("{total}",s):i({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),r=this.getContentGroup(),a=this._containerGroup.__rectSize,i=t.getOrient().index,n=ep[i],o=rp[i],s=this._findTargetItemIndex(e),l=r.children(),u=l[s],h=l.length,f=h?1:0,c={contentPosition:r.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return c;var v=y(u);c.contentPosition[i]=-v.s;for(var d=s+1,g=v,p=v,m=null;d<=h;++d)m=y(l[d]),(!m&&p.e>g.s+a||m&&!_(m,g.s))&&(p.i>g.i?g=p:g=m,g&&(c.pageNextDataIndex==null&&(c.pageNextDataIndex=g.i),++c.pageCount)),p=m;for(var d=s-1,g=v,p=v,m=null;d>=-1;--d)m=y(l[d]),(!m||!_(p,m.s))&&g.i=w&&x.s<=w+a}},_findTargetItemIndex:function(t){if(!this._showController)return 0;var e,r=this.getContentGroup(),a;return r.eachChild(function(i,n){var o=i.__legendDataIndex;a==null&&o!=null&&(a=n),o===t&&(e=n)}),e??a}});lt("legendScroll","legendscroll",function(t,e){var r=t.scrollDataIndex;r!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(r)})});var h5=Pg.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),Th=ft,Ii=At,ip=Ja,Kr=X,np=T,yA=7,Uz=1,op=30,Ms="horizontal",_A="vertical",$z=5,Zz=["line","bar","candlestick","scatter"],sp=Eg.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,r,a){if(sp.superApply(this,"render",arguments),ko(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1){this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},remove:function(){sp.superApply(this,"remove",arguments),My(this,"_dispatchZoomAction")},dispose:function(){sp.superApply(this,"dispose",arguments),My(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new G;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,r=this._findCoordRect(),a={width:e.getWidth(),height:e.getHeight()},i=this._orient===Ms?{right:a.width-r.x-r.width,top:a.height-op-yA,width:r.width,height:op}:{right:yA,top:r.y,width:op,height:r.height},n=rn(t.option);T(["right","top","width","height"],function(s){n[s]==="ph"&&(n[s]=i[s])});var o=Ot(n,a,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===_A&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,r=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),i=a&&a.get("inverse"),n=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;n.attr(r===Ms&&!i?{scale:o?[1,1]:[1,-1]}:r===Ms&&i?{scale:o?[-1,1]:[-1,-1]}:r===_A&&!i?{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2});var s=t.getBoundingRect([n]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,r=this._displayables.barGroup;r.add(new Th({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),r.add(new Th({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:X(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(!!t){var e=this._size,r=t.series,a=r.getRawData(),i=r.getShadowDim?r.getShadowDim():t.otherDim;if(i!=null){var n=a.getDataExtent(i),o=(n[1]-n[0])*.3;n=[n[0]-o,n[1]+o];var s=[0,e[1]],l=[0,e[0]],u=[[e[0],0],[0,0]],h=[],f=l[1]/(a.count()-1),c=0,v=Math.round(a.count()/e[0]),d;a.each([i],function(p,m){if(v>0&&m%v){c+=f;return}var y=p==null||isNaN(p)||p==="",_=y?0:Ii(p,n,s,!0);y&&!d&&m?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!y&&d&&(u.push([c,0]),h.push([c,0])),u.push([c,_]),h.push([c,_]),c+=f,d=y});var g=this.dataZoomModel;this._displayables.barGroup.add(new Se({shape:{points:u},style:U({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Ve({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var r,a=this.ecModel;return t.eachTargetAxis(function(i,n){var o=t.getAxisProxy(i.name,n).getTargetSeriesModels();T(o,function(s){if(!r&&!(e!==!0&&ut(Zz,s.get("type"))<0)){var l=a.getComponent(i.axis,n).axis,u=Yz(i.name),h,f=s.coordinateSystem;u!=null&&f.getOtherAxis&&(h=f.getOtherAxis(l).inverse),u=s.getData().mapDimension(u),r={thisAxis:l,series:s,thisDim:i.name,otherDim:u,otherAxisInverse:h}}},this)},this),r}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],r=t.handleLabels=[],a=this._displayables.barGroup,i=this._size,n=this.dataZoomModel;a.add(t.filler=new Th({draggable:!0,cursor:xA(this._orient),drift:Kr(this._onDragMove,this,"all"),ondragstart:Kr(this._showDataInfo,this,!0),ondragend:Kr(this._onDragEnd,this),onmouseover:Kr(this._showDataInfo,this,!0),onmouseout:Kr(this._showDataInfo,this,!1),style:{fill:n.get("fillerColor"),textPosition:"inside"}})),a.add(new Th({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{stroke:n.get("dataBackgroundColor")||n.get("borderColor"),lineWidth:Uz,fill:"rgba(0,0,0,0)"}})),np([0,1],function(o){var s=xo(n.get("handleIcon"),{cursor:xA(this._orient),draggable:!0,drift:Kr(this._onDragMove,this,o),ondragend:Kr(this._onDragEnd,this),onmouseover:Kr(this._showDataInfo,this,!0),onmouseout:Kr(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=s.getBoundingRect();this._handleHeight=R(n.get("handleSize"),this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(n.getModel("handleStyle").getItemStyle());var u=n.get("handleColor");u!=null&&(s.style.fill=u),a.add(e[o]=s);var h=n.textStyleModel;this.group.add(r[o]=new nt({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:h.getTextColor(),textFont:h.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Ii(t[0],[0,100],e,!0),Ii(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var r=this.dataZoomModel,a=this._handleEnds,i=this._getViewExtent(),n=r.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];pi(e,a,i,r.get("zoomLock")?"all":t,n.minSpan!=null?Ii(n.minSpan,o,i,!0):null,n.maxSpan!=null?Ii(n.maxSpan,o,i,!0):null);var s=this._range,l=this._range=ip([Ii(a[0],i,o,!0),Ii(a[1],i,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,r=this._handleEnds,a=ip(r.slice()),i=this._size;np([0,1],function(n){var o=e.handles[n],s=this._handleHeight;o.attr({scale:[s/2,s/2],position:[r[n],i[1]/2-s/2]})},this),e.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:i[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,r=this._displayables,a=r.handleLabels,i=this._orient,n=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();n=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var h=ip(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(c){var v=Qa(r.handles[c].parent,this.group),d=Ac(c===0?"right":"left",v),g=this._handleWidth/2+$z,p=xr([h[c]+(c===0?-g:g),this._size[1]/2],v);a[c].setStyle({x:p[0],y:p[1],textVerticalAlign:i===Ms?"middle":d,textAlign:i===Ms?d:"center",text:n[c]})}},_formatLabel:function(t,e){var r=this.dataZoomModel,a=r.get("labelFormatter"),i=r.get("labelPrecision");(i==null||i==="auto")&&(i=e.getPixelPrecision());var n=t==null||isNaN(t)?"":e.type==="category"||e.type==="time"?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(i,20));return $t(a)?a(t,n):_t(a)?a.replace("{value}",n):n},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,r,a){this._dragging=!0,Va(a.event);var i=this._displayables.barGroup.getLocalTransform(),n=xr([e,r],i,!0),o=this._updateInterval(t,n[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,r=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(r[0]<0||r[0]>e[0]||r[1]<0||r[1]>e[1])){var a=this._handleEnds,i=(a[0]+a[1])/2,n=this._updateInterval("all",r[0]-i);this._updateView(),n&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(np(this.getTargetCoordInfo(),function(a){if(!t&&a.length){var i=a[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),r=this.api.getHeight();t={x:e*.2,y:r*.2,width:e*.6,height:r*.6}}return t}});function Yz(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function xA(t){return t==="vertical"?"ns-resize":"ew-resize"}Pg.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var wA="\0_ec_dataZoom_roams";function Xz(t,e){var r=SA(t),a=e.dataZoomId,i=e.coordId;T(r,function(s,l){var u=s.dataZoomInfos;u[a]&&ut(e.allCoordIds,i)<0&&(delete u[a],s.count--)}),AA(r);var n=r[i];n||(n=r[i]={coordId:i,dataZoomInfos:{},count:0},n.controller=Kz(t,n),n.dispatchAction=K(Qz,t)),!n.dataZoomInfos[a]&&n.count++,n.dataZoomInfos[a]=e;var o=Jz(n.dataZoomInfos);n.controller.enable(o.controlType,o.opt),n.controller.setPointerChecker(e.containsPoint),ko(n,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function qz(t,e){var r=SA(t);T(r,function(a){a.controller.dispose();var i=a.dataZoomInfos;i[e]&&(delete i[e],a.count--)}),AA(r)}function bA(t){return t.type+"\0_"+t.id}function SA(t){var e=t.getZr();return e[wA]||(e[wA]={})}function Kz(t,e){var r=new An(t.getZr());return T(["pan","zoom","scrollMove"],function(a){r.on(a,function(i){var n=[];T(e.dataZoomInfos,function(o){if(!!i.isAvailableBehavior(o.dataZoomModel.option)){var s=(o.getRange||{})[a],l=s&&s(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&l&&n.push({dataZoomId:o.dataZoomId,start:l[0],end:l[1]})}}),n.length&&e.dispatchAction(n)})}),r}function AA(t){T(t,function(e,r){e.count||(e.controller.dispose(),delete t[r])})}function Qz(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Jz(t){var e,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return T(t,function(n){var o=n.dataZoomModel,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;a[r+s]>a[r+e]&&(e=s),i&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}var jz=X,TA=Eg.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,r,a){TA.superApply(this,"render",arguments),this._range=t.getPercentRange(),T(this.getTargetCoordInfo(),function(i,n){var o=E(i,function(s){return bA(s.model)});T(i,function(s){var l=s.model,u={};T(["pan","zoom","scrollMove"],function(h){u[h]=jz(tB[h],this,s,n)},this),Xz(r,{coordId:bA(l),allCoordIds:o,containsPoint:function(h,f,c){return l.coordinateSystem.containPoint([f,c])},dataZoomId:t.id,dataZoomModel:t,getRange:u})},this)},this)},dispose:function(){qz(this.api,this.dataZoomModel.id),TA.superApply(this,"dispose",arguments),this._range=null}}),tB={zoom:function(t,e,r,a){var i=this._range,n=i.slice(),o=t.axisModels[0];if(!!o){var s=lp[e](null,[a.originX,a.originY],o,r,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(n[1]-n[0])+n[0],u=Math.max(1/a.scale,0);n[0]=(n[0]-l)*u+l,n[1]=(n[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(pi(0,n,[0,100],0,h.minSpan,h.maxSpan),this._range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:CA(function(t,e,r,a,i,n){var o=lp[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:CA(function(t,e,r,a,i,n){var o=lp[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*n.scrollDelta})};function CA(t){return function(e,r,a,i){var n=this._range,o=n.slice(),s=e.axisModels[0];if(!!s){var l=t(o,s,e,r,a,i);if(pi(l,o,[0,100],"all"),this._range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var lp={grid:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],n.dim==="x"?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=n.inverse?-1:1),o},polar:function(t,e,r,a,i){var n=r.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),r.mainType==="radiusAxis"?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=n.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=n.inverse?-1:1),o},singleAxis:function(t,e,r,a,i){var n=r.axis,o=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],n.orient==="horizontal"?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=n.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=n.inverse?-1:1),s}},DA=T,IA=function(t){var e=t&&t.visualMap;P(e)||(e=e?[e]:[]),DA(e,function(r){if(!!r){Gn(r,"splitList")&&!Gn(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&P(a)&&DA(a,function(i){Q(i)&&(Gn(i,"start")&&!Gn(i,"min")&&(i.min=i.start),Gn(i,"end")&&!Gn(i,"max")&&(i.max=i.end))})}})};function Gn(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}ct.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var MA=br.VISUAL.COMPONENT;bt(MA,{createOnAllSeries:!0,reset:function(t,e){var r=[];return e.eachComponent("visualMap",function(a){var i=t.pipelineContext;!a.isTargetSeries(t)||i&&i.large||r.push(mz(a.stateList,a.targetVisuals,X(a.getValueState,a),a.getDataDimension(t.getData())))}),r}}),bt(MA,{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var n=i.getVisualMeta(X(eB,null,t,i))||{stops:[],outerColors:[]},o=i.getDataDimension(r),s=r.getDimensionInfo(o);s!=null&&(n.dimension=s.index,a.push(n))}}),t.getData().setVisual("visualMeta",a)}});function eB(t,e,r,a){for(var i=e.targetVisuals[a],n=mt.prepareVisualTypes(i),o={color:t.getData().getVisual("color")},s=0,l=n.length;s"],P(t)&&(t=t.slice(),s=!0),l=e?t:s?[u(t[0]),u(t[1])]:u(t),_t(o))return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l);if($t(o))return s?o(t[0],t[1]):o(t);if(s)return t[0]===n[0]?r[0]+" "+l[1]:t[1]===n[1]?r[1]+" "+l[0]:l[0]+" - "+l[1];return l;function u(h){return h===n[0]?"min":h===n[1]?"max":(+h).toFixed(Math.min(i,20))}},resetExtent:function(){var t=this.option,e=nB([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,r=t.dimensions;if(!(e==null&&!r.length)){if(e!=null)return t.getDimension(e);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var n=a[i],o=t.getDimensionInfo(n);if(!o.isCalculationCoord)return n}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,r={inRange:e.inRange,outOfRange:e.outOfRange},a=e.target||(e.target={}),i=e.controller||(e.controller={});J(a,r),J(i,r);var n=this.isCategory();o.call(this,a),o.call(this,i),s.call(this,a,"inRange","outOfRange"),l.call(this,i);function o(u){iB(e.color)&&!u.inRange&&(u.inRange={color:e.color.slice().reverse()}),u.inRange=u.inRange||{color:t.get("gradientColor")},hp(this.stateList,function(h){var f=u[h];if(_t(f)){var c=up.get(f,"active",n);c?(u[h]={},u[h][f]=c):delete u[h]}},this)}function s(u,h,f){var c=u[h],v=u[f];c&&!v&&(v=u[f]={},hp(c,function(d,g){if(!!mt.isValidType(g)){var p=up.get(g,"inactive",n);p!=null&&(v[g]=p,g==="color"&&!v.hasOwnProperty("opacity")&&!v.hasOwnProperty("colorAlpha")&&(v.opacity=[0,0]))}}))}function l(u){var h=(u.inRange||{}).symbol||(u.outOfRange||{}).symbol,f=(u.inRange||{}).symbolSize||(u.outOfRange||{}).symbolSize,c=this.get("inactiveColor");hp(this.stateList,function(v){var d=this.itemSize,g=u[v];g||(g=u[v]={color:n?c:[c]}),g.symbol==null&&(g.symbol=h&&Y(h)||(n?"roundRect":["roundRect"])),g.symbolSize==null&&(g.symbolSize=f&&Y(f)||(n?d[0]:[d[0],d[0]])),g.symbol=LA(g.symbol,function(y){return y==="none"||y==="square"?"roundRect":y});var p=g.symbolSize;if(p!=null){var m=-1/0;aB(p,function(y){y>m&&(m=y)}),g.symbolSize=LA(p,function(y){return oB(y,[0,m],[0,d[0]],!0)})}},this)}},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:fp,getValueState:fp,getVisualMeta:fp}),PA=[20,140],EA=Ch.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){EA.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){EA.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse(),(t[0]==null||isNaN(t[0]))&&(t[0]=PA[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=PA[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):P(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){Ch.prototype.completeVisualOption.apply(this,arguments),T(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Ja((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=r[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){t[0]<=n&&n<=t[1]&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getVisualMeta:function(t){var e=RA(this,"outOfRange",this.getExtent()),r=RA(this,"inRange",this.option.range.slice()),a=[];function i(f,c){a.push({value:f,color:t(f,c)})}for(var n=0,o=0,s=r.length,l=e.length;ot[1])break;a.push({color:this.getControllerVisual(o,"color",e),offset:n/r})}return a.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),a},_createBarPoints:function(t,e){var r=this.visualMapModel.itemSize;return[[r[0]-e[0],t[0]],[r[0],t[0]],[r[0],t[1]],[r[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,r=this.visualMapModel.get("inverse");return new G(e==="horizontal"&&!r?{scale:t==="bottom"?[1,1]:[-1,1],rotation:Math.PI/2}:e==="horizontal"&&r?{scale:t==="bottom"?[-1,1]:[1,1],rotation:-Math.PI/2}:e==="vertical"&&!r?{scale:t==="left"?[1,-1]:[-1,-1]}:{scale:t==="left"?[1,1]:[-1,1]})},_updateHandle:function(t,e){if(!!this._useHandle){var r=this._shapes,a=this.visualMapModel,i=r.handleThumbs,n=r.handleLabels;sB([0,1],function(o){var s=i[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=xr(r.handleLabelPoints[o],Qa(s,this.group));n[o].setStyle({x:l[0],y:l[1],text:a.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform(this._orient==="horizontal"?o===0?"bottom":"top":"left",r.barGroup)})},this)}},_showIndicator:function(t,e,r,a){var i=this.visualMapModel,n=i.getExtent(),o=i.itemSize,s=[0,o[1]],l=Qr(t,n,s,!0),u=this._shapes,h=u.indicator;if(!!h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",fB(!!r,a,l,o[1]));var f={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=xr(u.indicatorLabelPoint,Qa(h,this.group)),d=u.indicatorLabel;d.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),p=this._orient;d.setStyle({text:(r||"")+i.formatValueText(e),textVerticalAlign:p==="horizontal"?g:"middle",textAlign:p==="horizontal"?"center":g,x:v[0],y:v[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var r=t.visualMapModel.itemSize,a=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);a[1]=Ih(Ls(0,a[1]),r[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=r[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var r=this.visualMapModel,a=r.itemSize;if(!!r.option.hoverLink){var i=[0,a[1]],n=r.getExtent();t=Ih(Ls(i[0],t),i[1]);var o=cB(r,n,i),s=[t-o,t+o],l=Qr(t,i,n,!0),u=[Qr(s[0],i,n,!0),Qr(s[1],i,n,!0)];s[0]i[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"\u2248 ",o));var h=this._hoverLinkDataIndices,f=[];(e||zA(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(u));var c=NC(h,f);this._dispatchHighDown("downplay",Dh(c[0],r)),this._dispatchHighDown("highlight",Dh(c[1],r))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,r=this.visualMapModel;if(!(!e||e.dataIndex==null)){var a=this.ecModel.getSeriesByIndex(e.seriesIndex);if(!!r.isTargetSeries(a)){var i=a.getData(e.dataType),n=i.get(r.getDataDimension(i),e.dataIndex,!0);isNaN(n)||this._showIndicator(n,n)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Dh(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,r,a){var i=Qa(e,a?null:this.group);return Gr[P(t)?"applyTransform":"transformDirection"](t,i,r)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function Mh(t,e,r,a){return new Se({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){Va(i.event)},ondragend:a})}function hB(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function fB(t,e,r,a){return t?[[0,-Ih(e,Ls(r,0))],[OA,0],[0,Ih(e,Ls(a-r,0))]]:[[0,0],[5,-5],[5,5]]}function cB(t,e,r){var a=lB/2,i=t.get("hoverLinkDataSize");return i&&(a=Qr(i,e,r,!0)/2),a}function zA(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function BA(t){return t==="vertical"?"ns-resize":"ew-resize"}var vB={type:"selectDataRange",event:"dataRangeSelected",update:"update"};lt(vB,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})}),ie(IA);var dB=Ch.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){dB.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var r=this._mode=this._determineMode();gB[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(i,n){r==="categories"?(i.mappingMethod="category",i.categories=Y(a)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=E(this._pieceList,function(s){var s=Y(s);return n!=="inRange"&&(s.visual=null),s}))})},completeVisualOption:function(){var t=this.option,e={},r=mt.listVisualTypes(),a=this.isCategory();T(t.pieces,function(n){T(r,function(o){n.hasOwnProperty(o)&&(e[o]=1)})}),T(e,function(n,o){var s=0;T(this.stateList,function(l){s|=i(t,l,o)||i(t.target,l,o)},this),!s&&T(this.stateList,function(l){(t[l]||(t[l]={}))[o]=up.get(o,l==="inRange"?"active":"inactive",a)})},this);function i(n,o,s){return n&&n[o]&&(Q(n[o])?n[o].hasOwnProperty(s):n[o]===s)}Ch.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var r=this.option,a=this._pieceList,i=(e?r:t).selected||{};if(r.selected=i,T(a,function(o,s){var l=this.getSelectedMapKey(o);i.hasOwnProperty(l)||(i[l]=!0)},this),r.selectedMode==="single"){var n=!1;T(a,function(o,s){var l=this.getSelectedMapKey(o);i[l]&&(n?i[l]=!1:n=!0)},this)}},getSelectedMapKey:function(t){return this._mode==="categories"?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=Y(t)},getValueState:function(t){var e=mt.findPieceIndex(t,this._pieceList);return e!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(r){var a=[],i=r.getData();i.each(this.getDataDimension(i),function(n,o){var s=mt.findPieceIndex(n,this._pieceList);s===t&&a.push(o)},this),e.push({seriesId:r.id,dataIndex:a})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(t.value!=null)e=t.value;else{var r=t.interval||[];e=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return e},getVisualMeta:function(t){if(this.isCategory())return;var e=[],r=[],a=this;function i(l,u){var h=a.getRepresentValue({interval:l});u||(u=a.getValueState(h));var f=t(h,u);l[0]===-1/0?r[0]=f:l[1]===1/0?r[1]=f:e.push({value:l[0],color:f},{value:l[1],color:f})}var n=this._pieceList.slice();if(!n.length)n.push({interval:[-1/0,1/0]});else{var o=n[0].interval[0];o!==-1/0&&n.unshift({interval:[-1/0,o]}),o=n[n.length-1].interval[1],o!==1/0&&n.push({interval:[o,1/0]})}var s=-1/0;return T(n,function(l){var u=l.interval;u&&(u[0]>s&&i([s,u[0]],"outOfRange"),i(u.slice()),s=u[1])},this),{stops:e,outerColors:r}}}),gB={splitNumber:function(){var t=this.option,e=this._pieceList,r=Math.min(t.precision,20),a=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var n=(a[1]-a[0])/i;+n.toFixed(r)!==n&&r<5;)r++;t.precision=r,n=+n.toFixed(r),t.minOpen&&e.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];oo[1]&&console.warn("Piece "+a+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=mt.retrieveVisuals(r),e.push(i)},this),VA(t,e),Ec(e),T(e,function(r){var a=r.close,i=[["<","\u2264"][a[1]],[">","\u2265"][a[0]]];r.text=r.text||this.formatValueText(r.value!=null?r.value:r.interval,!1,i)},this)}};function VA(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var f5=kA.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,r=e.get("textGap"),a=e.textStyleModel,i=a.getFont(),n=a.getTextColor(),o=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Et(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,o),T(l.viewPieceList,f,this),u&&this._renderEndsText(t,u[1],s,h,o),ei(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t);function f(c){var v=c.piece,d=new G;d.onclick=X(this._onItemClick,this,v),this._enableHoverLink(d,c.indexInModelPieceList);var g=e.getRepresentValue(v);if(this._createItemSymbol(d,g,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(g);d.add(new nt({style:{x:o==="right"?-r:s[0]+r,y:s[1]/2,text:v.text,textVerticalAlign:"middle",textAlign:o,textFont:i,textFill:n,opacity:p==="outOfRange"?.5:1}}))}t.add(d)}},_enableHoverLink:function(t,e){t.on("mouseover",X(r,this,"highlight")).on("mouseout",X(r,this,"downplay"));function r(a){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:a,batch:Dh(i.findTargetDataIndices(e),i)})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if(e.orient==="vertical")return NA(t,this.api,t.itemSize);var r=e.align;return(!r||r==="auto")&&(r="left"),r},_renderEndsText:function(t,e,r,a,i){if(!!e){var n=new G,o=this.visualMapModel.textStyleModel;n.add(new nt({style:{x:a?i==="right"?r[0]:0:r[0]/2,y:r[1]/2,textVerticalAlign:"middle",textAlign:a?i:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(n)}},_getViewData:function(){var t=this.visualMapModel,e=E(t.getPieceList(),function(n,o){return{piece:n,indexInModelPieceList:o}}),r=t.get("text"),a=t.get("orient"),i=t.get("inverse");return(a==="horizontal"?i:!i)?e.reverse():r&&(r=r.slice().reverse()),{viewPieceList:e,endsText:r}},_createItemSymbol:function(t,e,r){t.add(Le(this.getControllerVisual(e,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,r=e.option,a=Y(r.selected),i=e.getSelectedMapKey(t);r.selectedMode==="single"?(a[i]=!0,T(a,function(n,o){a[o]=o===i})):a[i]=!a[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}});ie(IA);var GA="urn:schemas-microsoft-com:vml",HA=typeof window>"u"?null:window,FA=!1,Re=HA&&HA.document;function cp(t){return vp(t)}var vp;if(Re&&!at.canvasSupported)try{!Re.namespaces.zrvml&&Re.namespaces.add("zrvml",GA),vp=function(t){return Re.createElement("')}}catch{vp=function(e){return Re.createElement("<"+e+' xmlns="'+GA+'" class="zrvml">')}}function pB(){if(!(FA||!Re)){FA=!0;var t=Re.styleSheets;t.length<31?Re.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var Mi=me.CMD,gt=Math.round,Ps=Math.sqrt,mB=Math.abs,WA=Math.cos,UA=Math.sin,dp=Math.max;if(!at.canvasSupported){var Gt=",",gp="progid:DXImageTransform.Microsoft",Lt=21600,we=Lt/2,yB=1e5,_B=1e3,pp=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Lt+","+Lt,t.coordorigin="0,0"},xB=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},$A=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},Mr=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Es=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},mp=function(t,e,r){return(parseFloat(t)||0)*yB+(parseFloat(e)||0)*_B+r},ZA=Vf,YA=function(t,e,r){var a=be(e);r=+r,isNaN(r)&&(r=1),a&&(t.color=$A(a[0],a[1],a[2]),t.opacity=r*a[3])},wB=function(t){var e=be(t);return[$A(e[0],e[1],e[2]),e[3]]},bB=function(t,e,r){var a=e.fill;if(a!=null)if(a instanceof yr){var i,n=0,o=[0,0],s=0,l=1,u=r.getBoundingRect(),h=u.width,f=u.height;if(a.type==="linear"){i="gradient";var c=r.transform,v=[a.x*h,a.y*f],d=[a.x2*h,a.y2*f];c&&(xt(v,v,c),xt(d,d,c));var g=d[0]-v[0],p=d[1]-v[1];n=Math.atan2(g,p)*180/Math.PI,n<0&&(n+=360),n<1e-6&&(n=0)}else{i="gradientradial";var v=[a.x*h,a.y*f],c=r.transform,m=r.scale,y=h,_=f;o=[(v[0]-u.x)/y,(v[1]-u.y)/_],c&&xt(v,v,c),y/=m[0]*Lt,_/=m[1]*Lt;var x=dp(y,_);s=2*0/x,l=2*a.r/x-s}var w=a.colorStops.slice();w.sort(function(O,V){return O.offset-V.offset});for(var S=w.length,b=[],A=[],C=0;C=2){var L=b[0][0],M=b[1][0],B=b[0][1]*e.opacity,k=b[1][1]*e.opacity;t.type=i,t.method="none",t.focus="100%",t.angle=n,t.color=L,t.color2=M,t.colors=A.join(","),t.opacity=k,t.opacity2=B}i==="radial"&&(t.focusposition=o.join(","))}else YA(t,a,e.opacity)},SB=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),e.stroke!=null&&!(e.stroke instanceof yr)&&YA(t,e.stroke,e.opacity)},Lh=function(t,e,r,a){var i=e==="fill",n=t.getElementsByTagName(e)[0];r[e]!=null&&r[e]!=="none"&&(i||!i&&r.lineWidth)?(t[i?"filled":"stroked"]="true",r[e]instanceof yr&&Es(t,n),n||(n=cp(e)),i?bB(n,r,a):SB(n,r),Mr(t,n)):(t[i?"filled":"stroked"]="false",Es(t,n))},ke=[[],[],[]],AB=function(t,e){var r=Mi.M,a=Mi.C,i=Mi.L,n=Mi.A,o=Mi.Q,s=[],l,u,h,f,c,v,d=t.data,g=t.len();for(f=0;f.01?k&&(O+=270/Lt):Math.abs(V-D)<1e-4?k&&OC?W-=270/Lt:W+=270/Lt:k&&VD?H+=270/Lt:H-=270/Lt),s.push(F,gt(((C-I)*S+x)*Lt-we),Gt,gt(((D-L)*b+w)*Lt-we),Gt,gt(((C+I)*S+x)*Lt-we),Gt,gt(((D+L)*b+w)*Lt-we),Gt,gt((O*S+x)*Lt-we),Gt,gt((V*b+w)*Lt-we),Gt,gt((H*S+x)*Lt-we),Gt,gt((W*b+w)*Lt-we)),c=H,v=W;break;case Mi.R:var N=ke[0],$=ke[1];N[0]=d[f++],N[1]=d[f++],$[0]=N[0]+d[f++],$[1]=N[1]+d[f++],e&&(xt(N,N,e),xt($,$,e)),N[0]=gt(N[0]*Lt-we),$[0]=gt($[0]*Lt-we),N[1]=gt(N[1]*Lt-we),$[1]=gt($[1]*Lt-we),s.push(" m ",N[0],Gt,N[1]," l ",$[0],Gt,N[1]," l ",$[0],Gt,$[1]," l ",N[0],Gt,$[1]);break;case Mi.Z:s.push(" x ")}if(l>0){s.push(u);for(var et=0;etCB&&(xp=0,_p={});var r=DB.style,a;try{r.font=t,a=r.fontFamily.split(",")[0]}catch{}e={style:r.fontStyle||yp,variant:r.fontVariant||yp,weight:r.fontWeight||yp,size:parseFloat(r.fontSize||12)|0,family:a||"Microsoft YaHei"},_p[t]=e,xp++}return e},ka;oC("measureText",function(t,e){var r=Re;ka||(ka=r.createElement("div"),ka.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Re.body.appendChild(ka));try{ka.style.font=e}catch{}return ka.innerHTML="",ka.appendChild(r.createTextNode(t)),{width:ka.offsetWidth}});for(var wp=new it,MB=function(t,e,r,a){var i=this.style;this.__dirty&&oo(i,!0);var n=i.text;if(n!=null&&(n+=""),!!n){if(i.rich){var o=Pf(n,i);n=[];for(var s=0;s-JA}function OB(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==Fn}function zB(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==Fn}function Tp(t,e){e&&Pt(t,"transform","matrix("+kB.call(e,",")+")")}function Pt(t,e,r){(!r||r.type!=="linear"&&r.type!=="radial")&&t.setAttribute(e,r)}function BB(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function tT(t,e,r,a){if(OB(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?Fn:i,Pt(t,"fill",i),Pt(t,"fill-opacity",e.fillOpacity!=null?e.fillOpacity*e.opacity:e.opacity)}else Pt(t,"fill",Fn);if(zB(e,r)){var n=r?e.textStroke:e.stroke;n=n==="transparent"?Fn:n,Pt(t,"stroke",n);var o=r?e.textStrokeWidth:e.lineWidth,s=!r&&e.strokeNoScale?a.getLineScale():1;Pt(t,"stroke-width",o/s),Pt(t,"paint-order",r?"stroke":"fill"),Pt(t,"stroke-opacity",e.strokeOpacity!=null?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Pt(t,"stroke-dasharray",e.lineDash.join(",")),Pt(t,"stroke-dashoffset",Ap(e.lineDashOffset||0))):Pt(t,"stroke-dasharray",""),e.lineCap&&Pt(t,"stroke-linecap",e.lineCap),e.lineJoin&&Pt(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Pt(t,"stroke-miterlimit",e.miterLimit)}else Pt(t,"stroke",Fn)}function VB(t){for(var e=[],r=t.data,a=t.len(),i=0;i=Na:-v>=Na),y=v>0?v%Na:v%Na+Na,_=!1;m?_=!0:jA(p)?_=!1:_=y>=QA==!!g;var x=hr(l+h*KA(c)),w=hr(u+f*qA(c));m&&(g?v=Na-1e-4:v=-Na+1e-4,_=!0,i===9&&e.push("M",x,w));var S=hr(l+h*KA(c+v)),b=hr(u+f*qA(c+v));e.push("A",hr(h),hr(f),Ap(d*NB),+_,+g,S,b);break;case Li.Z:o="Z";break;case Li.R:var S=hr(r[i++]),b=hr(r[i++]),A=hr(r[i++]),C=hr(r[i++]);e.push("M",S,b,"L",S+A,b,"L",S+A,b+C,"L",S,b+C,"L",S,b);break}o&&e.push(o);for(var D=0;DI){for(;C=i&&u+1>=n){for(var h=[],f=0;f=i&&y+1>=n)return WB(a,g.components,e,t);l[d]=g}o++}for(;o<=s;){var v=c();if(v)return v}},pushComponent:function(t,e,r){var a=t[t.length-1];a&&a.added===e&&a.removed===r?t[t.length-1]={count:a.count+1,added:e,removed:r}:t.push({count:1,added:e,removed:r})},extractCommon:function(t,e,r,a){for(var i=e.length,n=r.length,o=t.newPos,s=o-a,l=0;o+1=0;--n)if(i[n]===a)return!0;return!1}),r):null:r[0]},Ct.prototype.update=function(t,e){if(!!t){var r=this.getDefs(!1);if(t[this._domName]&&r.contains(t[this._domName]))typeof e=="function"&&e(t);else{var a=this.add(t);a&&(t[this._domName]=a)}}},Ct.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},Ct.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Ct.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return T(this._tagNames,function(r){var a=t.getElementsByTagName(r);e=e.concat([].slice.call(a))}),e},Ct.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;T(t,function(r){r[e._markLabel]=YB})},Ct.prototype.markUsed=function(t){t&&(t[this._markLabel]=aT)},Ct.prototype.removeUnused=function(){var t=this.getDefs(!1);if(!!t){var e=this.getDoms(),r=this;T(e,function(a){a[r._markLabel]!==aT&&t.removeChild(a)})}},Ct.prototype.getSvgProxy=function(t){return t instanceof st?Rs:t instanceof Qt?Cp:t instanceof nt?Eh:Rs},Ct.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Ct.prototype.getSvgElement=function(t){return t.__svgEl};function Pi(t,e){Ct.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}yt(Pi,Ct),Pi.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var r=this;T(["fill","stroke"],function(a){if(e.style[a]&&(e.style[a].type==="linear"||e.style[a].type==="radial")){var i=e.style[a],n=r.getDefs(!0),o;i._dom?(o=i._dom,n.contains(i._dom)||r.addDom(o)):o=r.add(i),r.markUsed(e);var s=o.getAttribute("id");t.setAttribute(a,"url(#"+s+")")}})}},Pi.prototype.add=function(t){var e;if(t.type==="linear")e=this.createElement("linearGradient");else if(t.type==="radial")e=this.createElement("radialGradient");else return aa("Illegal gradient type."),null;return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Pi.prototype.update=function(t){var e=this;Ct.prototype.update.call(this,t,function(){var r=t.type,a=t._dom.tagName;r==="linear"&&a==="linearGradient"||r==="radial"&&a==="radialGradient"?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},Pi.prototype.updateDom=function(t,e){if(t.type==="linear")e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else if(t.type==="radial")e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r);else{aa("Illegal gradient type.");return}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var r=t.colorStops,a=0,i=r.length;a-1)){var s=be(o)[3],l=uf(o);n.setAttribute("stop-color","#"+l),n.setAttribute("stop-opacity",s)}else n.setAttribute("stop-color",r[a].color);e.appendChild(n)}t._dom=e},Pi.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Ct.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&Ct.prototype.markUsed.call(this,e._dom)}};function Ns(t,e){Ct.call(this,t,e,"clipPath","__clippath_in_use__")}yt(Ns,Ct),Ns.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var r=this.getTextSvgElement(t);r&&this.updateDom(r,t.__clipPaths,!0),this.markUsed(t)},Ns.prototype.updateDom=function(t,e,r){if(e&&e.length>0){var a=this.getDefs(!0),i=e[0],n,o,s=r?"_textDom":"_dom";i[s]?(o=i[s].getAttribute("id"),n=i[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",o),a.appendChild(n),i[s]=n);var l=this.getSvgProxy(i);if(i.transform&&i.parent.invTransform&&!r){var u=Array.prototype.slice.call(i.transform);ea(i.transform,i.parent.invTransform,i.transform),l.brush(i),i.transform=u}else l.brush(i);var h=this.getSvgElement(i);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),r)}else t&&t.setAttribute("clip-path","none")},Ns.prototype.markUsed=function(t){var e=this;t.__clipPaths&&T(t.__clipPaths,function(r){r._dom&&Ct.prototype.markUsed.call(e,r._dom),r._textDom&&Ct.prototype.markUsed.call(e,r._textDom)})};function Oa(t,e){Ct.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}yt(Oa,Ct),Oa.prototype.addWithoutUpdate=function(t,e){if(e&&iT(e.style)){var r;if(e._shadowDom){r=e._shadowDom;var a=this.getDefs(!0);a.contains(e._shadowDom)||this.addDom(r)}else r=this.add(e);this.markUsed(e);var i=r.getAttribute("id");t.style.filter="url(#"+i+")"}},Oa.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Oa.prototype.update=function(t,e){var r=e.style;if(iT(r)){var a=this;Ct.prototype.update.call(this,e,function(){a.updateDom(e,e._shadowDom)})}else this.remove(t,e)},Oa.prototype.remove=function(t,e){e._shadowDomId!=null&&(this.removeDom(t),t.style.filter="")},Oa.prototype.updateDom=function(t,e){var r=e.getElementsByTagName("feDropShadow");r.length===0?r=this.createElement("feDropShadow"):r=r[0];var a=t.style,i=t.scale&&t.scale[0]||1,n=t.scale&&t.scale[1]||1,o,s,l,u;if(a.shadowBlur||a.shadowOffsetX||a.shadowOffsetY)o=a.shadowOffsetX||0,s=a.shadowOffsetY||0,l=a.shadowBlur,u=a.shadowColor;else if(a.textShadowBlur)o=a.textShadowOffsetX||0,s=a.textShadowOffsetY||0,l=a.textShadowBlur,u=a.textShadowColor;else{this.removeDom(e,a);return}r.setAttribute("dx",o/i),r.setAttribute("dy",s/n),r.setAttribute("flood-color",u);var h=l/2/i,f=l/2/n,c=h+" "+f;r.setAttribute("stdDeviation",c),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(l/2*200)+"%"),e.setAttribute("height",Math.ceil(l/2*200)+"%"),e.appendChild(r),t._shadowDom=e},Oa.prototype.markUsed=function(t){t._shadowDom&&Ct.prototype.markUsed.call(this,t._shadowDom)};function iT(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function kh(t){return parseInt(t,10)}function XB(t){return t instanceof st?Rs:t instanceof Qt?Cp:t instanceof nt?Eh:Rs}function nT(t,e){return e&&t&&e.parentNode!==t}function Os(t,e,r){if(nT(t,e)&&r){var a=r.nextSibling;a?t.insertBefore(e,a):t.appendChild(e)}}function oT(t,e){if(nT(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function sT(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function zs(t){return t.__textSvgEl}function Bs(t){return t.__svgEl}var Nh=function(t,e,r,a){this.root=t,this.storage=e,this._opts=r=Z({},r||{});var i=Lr("svg");i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style.cssText="user-select:none;position:absolute;left:0;top:0;";var n=Lr("g");i.appendChild(n);var o=Lr("g");i.appendChild(o),this.gradientManager=new Pi(a,o),this.clipPathManager=new Ns(a,o),this.shadowManager=new Oa(a,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=i,this._svgRoot=o,this._backgroundRoot=n,this._viewport=s,t.appendChild(s),s.appendChild(i),this.resize(r.width,r.height),this._visibleList=[]};Nh.prototype={constructor:Nh,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=Lr("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e=this._svgRoot,r=this._visibleList,a=t.length,i=[],n;for(n=0;n=0;--o)if(n[o]===i)return!0;return!1}),r}else return null;else return r[0]},resize:function(t,e){var r=this._viewport;r.style.display="none";var a=this._opts;if(t!=null&&(a.width=t),e!=null&&(a.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var i=r.style;i.width=t+"px",i.height=e+"px";var n=this._svgDom;n.setAttribute("width",t),n.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,r=["width","height"][t],a=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],n=["paddingRight","paddingBottom"][t];if(e[r]!=null&&e[r]!=="auto")return parseFloat(e[r]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[a]||kh(s[r])||kh(o.style[r]))-(kh(s[i])||0)-(kh(s[n])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){this.refresh();var t=encodeURIComponent(this._svgDom.outerHTML.replace(/> \r<`));return"data:image/svg+xml;charset=UTF-8,"+t}};function qB(t){return function(){aa('In SVG mode painter not support method "'+t+'"')}}T(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){Nh.prototype[t]=qB(t)}),rc("svg",Nh),rt.version=Wy,rt.dependencies=nv,rt.PRIORITY=br,rt.init=EM,rt.connect=RM,rt.disConnect=n_,rt.disconnect=kM,rt.dispose=NM,rt.getInstanceByDom=vv,rt.getInstanceById=OM,rt.registerTheme=dv,rt.registerPreprocessor=ie,rt.registerProcessor=Ie,rt.registerPostUpdate=zM,rt.registerAction=lt,rt.registerCoordinateSystem=gv,rt.getCoordinateSystemDimensions=BM,rt.registerLayout=It,rt.registerVisual=bt,rt.registerLoading=o_,rt.extendComponentModel=Me,rt.extendComponentView=Xt,rt.extendSeriesModel=su,rt.extendChartView=_e,rt.setCanvasCreator=VM,rt.registerMap=GM,rt.getMap=HM,rt.dataTool=FM,rt.zrender=EC,rt.number=$D,rt.format=KD,rt.throttle=Yl,rt.helper=k2,rt.matrix=zT,rt.vector=ST,rt.color=FT,rt.parseGeoJSON=Rv,rt.parseGeoJson=Z2,rt.util=Z_,rt.graphic=Y_,rt.List=qt,rt.Model=ht,rt.Axis=Vt,rt.env=at});var c5=uT.echarts;})();