(()=>{var M5=Object.create;var kT=Object.defineProperty;var I5=Object.getOwnPropertyDescriptor;var L5=Object.getOwnPropertyNames;var P5=Object.getPrototypeOf,E5=Object.prototype.hasOwnProperty;var R5=(x,C)=>()=>(C||x((C={exports:{}}).exports,C),C.exports);var O5=(x,C,T,N)=>{if(C&&typeof C=="object"||typeof C=="function")for(let k of L5(C))!E5.call(x,k)&&k!==T&&kT(x,k,{get:()=>C[k],enumerable:!(N=I5(C,k))||N.enumerable});return x};var N5=(x,C,T)=>(T=x!=null?M5(P5(x)):{},O5(C||!x||!x.__esModule?kT(T,"default",{value:x,enumerable:!0}):T,x));var VT=R5((n3,BT)=>{var xa=function(x){x==null&&(x=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,x.constructor==Array?this.init_by_array(x,x.length):this.init_seed(x)};xa.prototype.init_seed=function(x){for(this.mt[0]=x>>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(((x&4294901760)>>>16)*1812433253<<16)+(x&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};xa.prototype.init_by_array=function(x,C){var T,N,k;for(this.init_seed(19650218),T=1,N=0,k=this.N>C?this.N:C;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1664525<<16)+(F&65535)*1664525)+x[N]+N,this.mt[T]>>>=0,T++,N++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1),N>=C&&(N=0)}for(k=this.N-1;k;k--){var F=this.mt[T-1]^this.mt[T-1]>>>30;this.mt[T]=(this.mt[T]^(((F&4294901760)>>>16)*1566083941<<16)+(F&65535)*1566083941)-T,this.mt[T]>>>=0,T++,T>=this.N&&(this.mt[0]=this.mt[this.N-1],T=1)}this.mt[0]=2147483648};xa.prototype.random_int=function(){var x,C=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var T;for(this.mti==this.N+1&&this.init_seed(5489),T=0;T>>1^C[x&1];for(;T>>1^C[x&1];x=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^x>>>1^C[x&1],this.mti=0}return x=this.mt[this.mti++],x^=x>>>11,x^=x<<7&2636928640,x^=x<<15&4022730752,x^=x>>>18,x>>>0};xa.prototype.random_int31=function(){return this.random_int()>>>1};xa.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};xa.prototype.random=function(){return this.random_int()*(1/4294967296)};xa.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};xa.prototype.random_long=function(){var x=this.random_int()>>>5,C=this.random_int()>>>6;return(x*67108864+C)*(1/9007199254740992)};BT.exports=xa});var zT={};(function(x,C){C(x.echarts={})})(zT,function(x){"use strict";var C;typeof window<"u"?C=window.__DEV__:typeof global<"u"&&(C=global.__DEV__),typeof C>"u"&&(C=!0);var T=C,N=2311,k=function(){return N++},F={};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?F={browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:typeof document>"u"&&typeof self<"u"?F={browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:typeof navigator>"u"?F={browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:F=St(navigator.userAgent);var G=F;function St(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 Ct={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},te={"[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},de=Object.prototype.toString,Yt=Array.prototype,gr=Yt.forEach,en=Yt.filter,Pr=Yt.slice,ZT=Yt.map,YT=Yt.reduce,hf={};function om(t,e){t==="createCanvas"&&(ll=null),hf[t]=e}function rt(t){if(t==null||typeof t!="object")return t;var e=t,r=de.call(t);if(r==="[object Array]"){if(!sn(t)){e=[];for(var a=0,i=t.length;a"u"?Array:Float32Array;function wa(t,e){var r=new hm(2);return t==null&&(t=0),e==null&&(e=0),r[0]=t,r[1]=e,r}function ge(t,e){return t[0]=e[0],t[1]=e[1],t}function mr(t){var e=new hm(2);return e[0]=t[0],e[1]=t[1],e}function fm(t,e,r){return t[0]=e,t[1]=r,t}function gf(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function mo(t,e,r,a){return t[0]=e[0]+r[0]*a,t[1]=e[1]+r[1]*a,t}function Jr(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function yo(t){return Math.sqrt(pf(t))}var qT=yo;function pf(t){return t[0]*t[0]+t[1]*t[1]}var KT=pf;function jT(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function QT(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function JT(t,e){return t[0]*e[0]+t[1]*e[1]}function hl(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function ln(t,e){var r=yo(e);return r===0?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function _o(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ta=_o;function cm(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ba=cm;function tC(t,e){return t[0]=-e[0],t[1]=-e[1],t}function vm(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 Pt(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 ea(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function ra(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var eC=(Object.freeze||Object)({create:wa,copy:ge,clone:mr,set:fm,add:gf,scaleAndAdd:mo,sub:Jr,len:yo,length:qT,lenSquare:pf,lengthSquare:KT,mul:jT,div:QT,dot:JT,scale:hl,normalize:ln,distance:_o,dist:ta,distanceSquare:cm,distSquare:ba,negate:tC,lerp:vm,applyTransform:Pt,min:ea,max:ra});function fl(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}fl.prototype={constructor:fl,_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(un(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(un(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(un(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(un(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(un(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(un(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function un(t,e){return{target:t,topTarget:e&&e.topTarget}}var dm=Array.prototype.slice,le=function(t){this._$handlers={},this._$eventProcessor=t};le.prototype={constructor:le,one:function(t,e,r,a){return gm(this,t,e,r,a,!0)},on:function(t,e,r,a){return gm(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=dm.call(a,1));for(var n=e.length,o=0;o4&&(a=dm.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 oC(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?pm(l,s):pm(s,l))}function ym(t){return t.nodeName.toUpperCase()==="CANVAS"}var xf=typeof window<"u"&&!!window.addEventListener,sC=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wf=[];function bf(t,e,r,a){return r=r||{},a||!G.canvasSupported?_m(t,e,r):G.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):_m(t,e,r),r}function _m(t,e,r){if(G.domSupported&&t.getBoundingClientRect){var a=e.clientX,i=e.clientY;if(ym(t)){var n=t.getBoundingClientRect();r.zrX=a-n.left,r.zrY=i-n.top;return}else if(_f(wf,t,a,i)){r.zrX=wf[0],r.zrY=wf[1];return}}r.zrX=r.zrY=0}function Sf(t){return t||window.event}function Er(t,e,r){if(e=Sf(e),e.zrX!=null)return e;var a=e.type,i=a&&a.indexOf("touch")>=0;if(!i)bf(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&&bf(t,n,e,r)}var o=e.button;return e.which==null&&o!==void 0&&sC.test(e.type)&&(e.which=o&1?1:o&2?3:o&4?2:0),e}function Af(t,e,r,a){xf?t.addEventListener(e,r,a):t.attachEvent("on"+e,r)}function lC(t,e,r,a){xf?t.removeEventListener(e,r,a):t.detachEvent("on"+e,r)}var oi=xf?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function xm(t){return t.which===2||t.which===3}var Tf=function(){this._track=[]};Tf.prototype={constructor:Tf,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=wm(a)/wm(i);!isFinite(n)&&(n=1),e.pinchScale=n;var o=uC(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},bm="silent";function hC(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:fC}}function fC(){oi(this.event)}function Sm(){}Sm.prototype.dispose=function(){};var cC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],hn=function(t,e,r,a){le.call(this),this.storage=t,this.painter=e,this.painterRoot=a,r=r||new Sm,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,fl.call(this),this.setHandlerProxy(r)};hn.prototype={constructor:hn,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(M(cC,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=Am(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=hC(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=vC(a[n],t,e))&&(!i.topTarget&&(i.topTarget=a[n]),o!==bm)){i.target=a[n];break}}return i},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Tf);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)}}},M(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){hn.prototype[t]=function(e){var r=e.zrX,a=e.zrY,i=Am(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||ta(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function vC(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?bm:!0}return!1}function Am(t,e,r){var a=t.painter;return e<0||e>a.getWidth()||r<0||r>a.getHeight()}Dt(hn,le),Dt(hn,fl);var dC=typeof Float32Array>"u"?Array:Float32Array;function Ie(){var t=new dC(6);return fn(t),t}function fn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function xo(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 Sa(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 yr(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 aa(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 wo(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 cl(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 Tm(t){var e=Ie();return xo(e,t),e}var gC=(Object.freeze||Object)({create:Ie,identity:fn,copy:xo,mul:Sa,translate:yr,rotate:aa,scale:wo,invert:cl,clone:Tm}),Df=fn,Cm=5e-5;function si(t){return t>Cm||t<-Cm}var _r=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},xr=_r.prototype;xr.transform=null,xr.needLocalTransform=function(){return si(this.rotation)||si(this.position[0])||si(this.position[1])||si(this.scale[0]-1)||si(this.scale[1]-1)};var li=[];xr.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),a=this.transform;if(!(r||e)){a&&Df(a);return}a=a||Ie(),r?this.getLocalTransform(a):Df(a),e&&(r?Sa(a,t.transform,a):xo(a,t.transform)),this.transform=a;var i=this.globalScaleRatio;if(i!=null&&i!==1){this.getGlobalScale(li);var n=li[0]<0?-1:1,o=li[1]<0?-1:1,s=((li[0]-n)*i+n)/li[0]||0,l=((li[1]-o)*i+o)/li[1]||0;a[0]*=s,a[1]*=s,a[2]*=l,a[3]*=l}this.invTransform=this.invTransform||Ie(),cl(this.invTransform,a)},xr.getLocalTransform=function(t){return _r.getLocalTransform(this,t)},xr.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)},xr.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var cn=[],Mf=Ie();xr.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;si(e-1)&&(e=Math.sqrt(e)),si(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)}},xr.decomposeTransform=function(){if(!!this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Sa(cn,t.invTransform,e),e=cn);var r=this.origin;r&&(r[0]||r[1])&&(Mf[4]=r[0],Mf[5]=r[1],Sa(cn,e,Mf),cn[4]-=r[0],cn[5]-=r[1],e=cn),this.setLocalTransform(e)}},xr.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)},xr.transformCoordToLocal=function(t,e){var r=[t,e],a=this.invTransform;return a&&Pt(r,r,a),r},xr.transformCoordToGlobal=function(t,e){var r=[t,e],a=this.transform;return a&&Pt(r,r,a),r},_r.getLocalTransform=function(t,e){e=e||[],Df(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]),wo(e,e,a),i&&aa(e,e,i),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=n[0],e[5]+=n[1],e};var vl={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-vl.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?vl.bounceIn(t*2)*.5:vl.bounceOut(t*2-1)*.5+.5}};function If(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}If.prototype={constructor:If,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"?vl[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 Dm=function(){this.head=null,this.tail=null,this._len=0},bo=Dm.prototype;bo.insert=function(t){var e=new Mm(t);return this.insertEntry(e),e},bo.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++},bo.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--},bo.len=function(){return this._len},bo.clear=function(){this.head=this.tail=null,this._len=0};var Mm=function(t){this.value=t,this.next,this.prev},Lf=function(t){this._list=new Dm,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Pf=Lf.prototype;Pf.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 Mm(e),o.key=t,r.insertEntry(o),a[t]=o}return i},Pf.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},Pf.clear=function(){this._list.clear(),this._map={}};var Im={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 wr(t){return t=Math.round(t),t<0?0:t>255?255:t}function pC(t){return t=Math.round(t),t<0?0:t>360?360:t}function So(t){return t<0?0:t>1?1:t}function Ef(t){return t.length&&t.charAt(t.length-1)==="%"?wr(parseFloat(t)/100*255):wr(parseInt(t,10))}function vn(t){return t.length&&t.charAt(t.length-1)==="%"?So(parseFloat(t)/100):So(parseFloat(t))}function Rf(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 Aa(t,e,r){return t+(e-t)*r}function br(t,e,r,a,i){return t[0]=e,t[1]=r,t[2]=a,t[3]=i,t}function Of(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Lm=new Lf(20),dl=null;function dn(t,e){dl&&Of(dl,e),dl=Lm.put(t,dl||e.slice())}function Ve(t,e){if(!!t){e=e||[];var r=Lm.get(t);if(r)return Of(e,r);t=t+"";var a=t.replace(/ /g,"").toLowerCase();if(a in Im)return Of(e,Im[a]),dn(t,e),e;if(a.charAt(0)==="#"){if(a.length===4){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=4095)){br(e,0,0,0,1);return}return br(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,1),dn(t,e),e}else if(a.length===7){var i=parseInt(a.substr(1),16);if(!(i>=0&&i<=16777215)){br(e,0,0,0,1);return}return br(e,(i&16711680)>>16,(i&65280)>>8,i&255,1),dn(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){br(e,0,0,0,1);return}u=vn(l.pop());case"rgb":if(l.length!==3){br(e,0,0,0,1);return}return br(e,Ef(l[0]),Ef(l[1]),Ef(l[2]),u),dn(t,e),e;case"hsla":if(l.length!==4){br(e,0,0,0,1);return}return l[3]=vn(l[3]),Nf(l,e),dn(t,e),e;case"hsl":if(l.length!==3){br(e,0,0,0,1);return}return Nf(l,e),dn(t,e),e;default:return}}br(e,0,0,0,1)}}function Nf(t,e){var r=(parseFloat(t[0])%360+360)%360/360,a=vn(t[1]),i=vn(t[2]),n=i<=.5?i*(a+1):i+a-i*a,o=i*2-n;return e=e||[],br(e,wr(Rf(o,n,r+1/3)*255),wr(Rf(o,n,r)*255),wr(Rf(o,n,r-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function mC(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 Pm(t,e){var r=Ve(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 ia(r,r.length===4?"rgba":"rgb")}}function kf(t){var e=Ve(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ao(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]=wr(Aa(o[0],s[0],l)),r[1]=wr(Aa(o[1],s[1],l)),r[2]=wr(Aa(o[2],s[2],l)),r[3]=So(Aa(o[3],s[3],l)),r}}var yC=Ao;function Em(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=Ve(e[i]),s=Ve(e[n]),l=a-i,u=ia([wr(Aa(o[0],s[0],l)),wr(Aa(o[1],s[1],l)),wr(Aa(o[2],s[2],l)),So(Aa(o[3],s[3],l))],"rgba");return r?{color:u,leftIndex:i,rightIndex:n,value:a}:u}}var _C=Em;function gn(t,e,r,a){if(t=Ve(t),t)return t=mC(t),e!=null&&(t[0]=pC(e)),r!=null&&(t[1]=vn(r)),a!=null&&(t[2]=vn(a)),ia(Nf(t),"rgba")}function gl(t,e){if(t=Ve(t),t&&e!=null)return t[3]=So(e),ia(t,"rgba")}function ia(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 xC=(Object.freeze||Object)({parse:Ve,lift:Pm,toHex:kf,fastLerp:Ao,fastMapToColor:yC,lerp:Em,mapToColor:_C,modifyHSL:gn,modifyAlpha:gl,stringify:ia}),zf=Array.prototype.slice;function wC(t,e){return t[e]}function bC(t,e,r){t[e]=r}function Bf(t,e,r){return(e-t)*r+t}function Rm(t,e,r){return r>.5?e:t}function Om(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[U]<=j);U--);U=Math.min(U,u-2)}else{for(U=D;Uj);U++);U=Math.min(U-1,u-2)}D=U,I=j;var tt=p[U+1]-p[U];if(tt!==0)if(P=(j-p[U])/tt,l)if(E=m[U],R=m[U===0?U:U-1],Z=m[U>u-2?u-1:U+1],W=m[U>u-3?u-1:U+2],f)km(R,E,Z,W,P,P*P,P*P*P,o(Q,i),d);else{var ct;if(c)ct=km(R,E,Z,W,P,P*P,P*P*P,$,1),ct=zm($);else{if(v)return Rm(E,Z,P);ct=Vf(R,E,Z,W,P,P*P,P*P*P)}s(Q,i,ct)}else if(f)Om(m[U],m[U+1],P,o(Q,i),d);else{var ct;if(c)Om(m[U],m[U+1],P,$,1),ct=zm($);else{if(v)return Rm(m[U],m[U+1],P);ct=Bf(m[U],m[U+1],P)}s(Q,i,ct)}},K=new If({target:t._target,life:g,loop:t._loop,delay:t._delay,onframe:X,ondestroy:r});return e&&e!=="spline"&&(K.easing=e),K}}}var Gf=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||wC,this._setter=a||bC,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Gf.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:AC(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 Fm(t,e,r,a){if(!e)t.attr(r,a);else{var i={};i[e]={},i[e][r]=a,t.attr(i)}}var na=function(t){_r.call(this,t),le.call(this,t),ml.call(this,t),this.id=t.id||k()};na.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(lt(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 vt(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}}},vt.create=function(t){return new vt(t.x,t.y,t.width,t.height)};var q=function(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};q.prototype={constructor:q,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 q&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,a=this._children,i=yt(a,t);return i<0?this:(a.splice(i,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof q&&t.delChildrenFromStorage(r)),e&&e.refresh(),this)},removeAll:function(){var t=this._children,e=this.__storage,r,a;for(a=0;a=Wm;)e|=t&1,t>>=1;return t+e}function Um(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 IC(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 Hf(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 Ff(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 LC(t,e){var r=To,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]=To||S>=To);if(D)break;b<0&&(b=0),b+=2}if(r=b,r<1&&(r=1),d===1){for(m=0;m=0;m--)t[A+m]=t[b+m];t[w]=o[_];return}for(var S=r;;){var D=0,I=0,L=!1;do if(e(o[_],t[y])<0){if(t[w--]=t[y--],D++,I=0,--d===0){L=!0;break}}else if(t[w--]=o[_--],I++,D=0,--p===1){L=!0;break}while((D|I)=0;m--)t[A+m]=t[b+m];if(d===0){L=!0;break}}if(t[w--]=o[_--],--p===1){L=!0;break}if(I=p-Hf(t[y],o,0,p,p-1,e),I!==0){for(w-=I,_-=I,p-=I,A=w+1,b=_+1,m=0;m=To||I>=To);if(L)break;S<0&&(S=0),S+=2}if(r=S,r<1&&(r=1),p===1){for(w-=d,y-=d,A=w+1,b=y+1,m=d-1;m>=0;m--)t[A+m]=t[b+m];t[w]=o[_]}else{if(p===0)throw new Error;for(b=w-(p-1),m=0;ms&&(l=s),$m(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 Zm(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Wf=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Wf.prototype={constructor:Wf,traverse:function(t,e){for(var r=0;r=0&&(this.delFromStorage(t),this._roots.splice(i,1),t instanceof q&&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:Zm};var PC={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Uf=function(t,e,r){return PC.hasOwnProperty(e)?r*=t.dpr:r},Ca={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},$f=9,bl=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Da=function(t){this.extendFrom(t,!1)};function EC(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 RC(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}Da.prototype={constructor:Da,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!==Ca.STYLE_BIND;t.__attrCachedBy=Ca.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"?RC:EC,i=a(t,e,r),n=e.colorStops,o=0;ozC&&(Qf=0,Al={}),Qf++,Al[r]=i,i}function Rr(t,e,r,a,i,n,o,s){return o?GC(t,e,r,a,i,n,o,s):VC(t,e,r,a,i,n,s)}function VC(t,e,r,a,i,n,o){var s=ac(t,e,i,n,o),l=er(t,e);i&&(l+=i[1]+i[3]);var u=s.outerHeight,h=Do(0,l,r),f=pn(0,u,a),c=new vt(h,f,l,u);return c.lineHeight=s.lineHeight,c}function GC(t,e,r,a,i,n,o,s){var l=ic(t,{rich:o,truncate:s,font:e,textAlign:r,textPadding:i,textLineHeight:n}),u=l.outerWidth,h=l.outerHeight,f=Do(0,u,r),c=pn(0,h,a);return new vt(f,c,u,h)}function Do(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function pn(t,e,r){return r==="middle"?t-=e/2:r==="bottom"&&(t-=e),t}function ec(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 rc(t,e,r,a,i){if(!e)return"";var n=(t+"").split(` `);i=qm(e,r,a,i);for(var o=0,s=n.length;o=o;l++)s-=o;var u=er(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 Km(t,e){var r=e.containerWidth,a=e.font,i=e.contentWidth;if(!r)return"";var n=er(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?HC(t,i,e.ascCharWidth,e.cnCharWidth):n>0?Math.floor(t.length*i/n):0;t=t.substr(0,s),n=er(t,a)}return t===""&&(t=e.placeholder),t}function HC(t,e,r,a){for(var i=0,n=0,o=t.length;nh)t="",o=[];else if(f!=null)for(var c=qm(f-(r?r[1]+r[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),v=0,d=o.length;va&&nc(r,t.substring(a,n)),nc(r,i[2],i[1]),a=Jf.lastIndex}av)return{lines:[],width:0,height:0};_.textWidth=er(_.text,A);var D=w.textWidth,I=D==null||D==="auto";if(typeof D=="string"&&D.charAt(D.length-1)==="%")_.percentWidth=D,u.push(_),D=0;else{if(I){D=_.textWidth;var L=w.textBackgroundColor,P=L&&L.image;P&&(P=NC(P),Sl(P)&&(D=Math.max(D,P.width*S/P.height)))}var R=b?b[1]+b[3]:0;D+=R;var E=c!=null?c-m:null;E!=null&&Ei&&(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 oc=Tl,WC={left:1,right:1,center:1},UC={top:1,bottom:1,middle:1},t0=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],e0={},r0={};function Mo(t){return a0(t),M(t.rich,a0),t}function a0(t){if(t){t.font=Qm(t);var e=t.textAlign;e==="middle"&&(e="center"),t.textAlign=e==null||WC[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;r==="center"&&(r="middle"),t.textVerticalAlign=r==null||UC[r]?r:"top";var a=t.textPadding;a&&(t.textPadding=cf(t.textPadding))}}function i0(t,e,r,a,i,n){a.rich?ZC(t,e,r,a,i,n):$C(t,e,r,a,i,n)}function $C(t,e,r,a,i,n){"use strict";var o=lc(a),s,l=!1,u=e.__attrCachedBy===Ca.PLAIN_TEXT;n!==$f?(n&&(s=n.style,l=!o&&u&&s),e.__attrCachedBy=o?Ca.NONE:Ca.PLAIN_TEXT):u&&(e.__attrCachedBy=Ca.NONE);var h=a.font||oc;(!l||h!==(s.font||oc))&&(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=ac(r,f,c,v,a.truncate));var g=d.outerHeight,p=d.lines,m=d.lineHeight,y=hc(r0,t,a,i),_=y.baseX,w=y.baseY,b=y.textAlign||"left",A=y.textVerticalAlign;n0(e,a,i,_,w);var S=pn(w,g,A),D=_,I=S;if(o||c){var L=er(r,f),P=L;c&&(P+=c[1]+c[3]);var R=Do(_,P,b);o&&uc(t,e,a,R,S,P,g),c&&(D=s0(_,b,c),I+=c[0])}e.textAlign=b,e.textBaseline="middle",e.globalAlpha=a.opacity||1;for(var E=0;E=0&&(E=b[R],E.textAlign==="right");)sc(t,e,E,a,S,m,P,"right"),D-=E.width,P-=E.width,R--;for(L+=(n-(L-p)-(y-P)-D)/2;I<=R;)E=b[I],sc(t,e,E,a,S,m,L+E.width/2,"center"),L+=E.width,I++;m+=S}}function n0(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 sc(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&&lc(l)&&uc(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=s0(o,s,f),h-=r.height/2-f[2]-r.textHeight/2),pe(e,"shadowBlur",ni(l.textShadowBlur,a.textShadowBlur,0)),pe(e,"shadowColor",l.textShadowColor||a.textShadowColor||"transparent"),pe(e,"shadowOffsetX",ni(l.textShadowOffsetX,a.textShadowOffsetX,0)),pe(e,"shadowOffsetY",ni(l.textShadowOffsetY,a.textShadowOffsetY,0)),pe(e,"textAlign",s),pe(e,"textBaseline","middle"),pe(e,"font",r.font||oc);var c=fc(l.textStroke||a.textStroke,d),v=o0(l.textFill||a.textFill),d=Xt(l.textStrokeWidth,a.textStrokeWidth);c&&(pe(e,"lineWidth",d),pe(e,"strokeStyle",c),e.strokeText(r.text,o,h)),v&&(pe(e,"fillStyle",v),e.fillText(r.text,o,h))}function lc(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function uc(t,e,r,a,i,n,o){var s=r.textBackgroundColor,l=r.textBorderWidth,u=r.textBorderColor,h=Lt(s);if(pe(e,"shadowBlur",r.textBoxShadowBlur||0),pe(e,"shadowColor",r.textBoxShadowColor||"transparent"),pe(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),pe(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var f=r.textBorderRadius;f?Jm(e,{x:a,y:i,width:n,height:o,r:f}):e.rect(a,i,n,o),e.closePath()}if(h)if(pe(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(lt(s)){var v=s.image;v=Xm(v,null,t,XC,s),v&&Sl(v)&&e.drawImage(v,a,i,n,o)}if(l&&u)if(pe(e,"lineWidth",l),pe(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 XC(t,e){e.image=t}function hc(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+cc(l[0],a.width),n=a.y+cc(l[1],a.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(e0,r,a):ec(e0,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 pe(t,e,r){return t[e]=Uf(t,e,r),t[e]}function fc(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function o0(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function cc(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function s0(t,e,r){return e==="right"?t-r[1]:e==="center"?t+r[3]/2-r[1]/2:t+r[3]}function vc(t,e){return t!=null&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var dc=new vt,Cl=function(){};Cl.prototype={constructor:Cl,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&Mo(r,!0);var a=r.text;if(a!=null&&(a+=""),!!vc(a,r)){t.save();var i=this.transform;r.transformText?this.setTransform(t):i&&(dc.copy(e),dc.applyTransform(i),e=dc),i0(this,t,a,r,e,$f),t.restore()}}};function Le(t){t=t||{},na.call(this,t);for(var e in t)t.hasOwnProperty(e)&&e!=="style"&&(this[e]=t[e]);this.style=new Da(t.style,this),this._rect=null,this.__clipPaths=null}Le.prototype={constructor:Le,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"?na.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 Da(t,this),this.dirty(!1),this},calculateTextPosition:null},It(Le,na),Dt(Le,Cl);function ve(t){Le.call(this,t)}ve.prototype={constructor:ve,type:"image",brush:function(t,e){var r=this.style,a=r.image;r.bind(t,this,e);var i=this._image=Xm(a,this._image,this,this.onload);if(!(!i||!Sl(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 vt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},It(ve,Le);var l0=1e5,ui=314159,Dl=.01,qC=.001;function Ml(t){return parseInt(t,10)}function KC(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}var gc=new vt(0,0,0,0),pc=new vt(0,0,0,0);function jC(t,e,r){return gc.copy(t.getBoundingRect()),t.transform&&gc.applyTransform(t.transform),pc.width=e,pc.height=r,!gc.intersect(pc)}function QC(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?Dl:0),this._needsManuallyCompositing),l.__builtin__||Ta("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]?ut(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 m0(t){var e=ht();mn(t,function(r,a){var i=r.exist;i&&e.set(i.id,r)}),mn(t,function(r,a){var i=r.option;gt(!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={})}),mn(t,function(r,a){var i=r.exist,n=r.option,o=r.keyInfo;if(!!yn(n)){if(o.name=n.name!=null?n.name+"":i?i.name:g0+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 Ec(t){var e=t.name;return!!(e&&e.indexOf(g0))}function El(t){return yn(t)&&t.id&&(t.id+"").indexOf("\0_ec_\0")===0}function vD(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&&yt(i,s)<0)){var l=r.getShallow(s);l!=null&&(n[t[o][0]]=l)}}return n}},wD=_n([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),bD={getLineStyle:function(t){var e=wD(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]}},SD=_n([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),AD={getAreaStyle:function(t,e){return SD(this,t,e)}},zl=Math.pow,Ia=Math.sqrt,Bl=1e-8,x0=1e-4,w0=Ia(3),Vl=1/3,Or=wa(),rr=wa(),xn=wa();function La(t){return t>-Bl&&tBl||t<-Bl}function De(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 S0(t,e,r,a,i){var n=1-i;return 3*(((e-t)*n+2*(r-e)*i)*n+(a-r)*i*i)}function TD(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=Ia(g),_=h*s+1.5*o*(-f+y),w=h*s+1.5*o*(-f-y);_<0?_=-zl(-_,Vl):_=zl(_,Vl),w<0?w=-zl(-w,Vl):w=zl(w,Vl);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(n[v++]=d)}else{var b=(2*h*s-3*o*f)/(2*Ia(h*h*h)),A=Math.acos(b)/3,S=Ia(h),D=Math.cos(A),d=(-s-2*S*D)/(3*o),m=(-s+S*(D+w0*Math.sin(A)))/(3*o),I=(-s+S*(D-w0*Math.sin(A)))/(3*o);d>=0&&d<=1&&(n[v++]=d),m>=0&&m<=1&&(n[v++]=m),I>=0&&I<=1&&(n[v++]=I)}}return v}function A0(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(b0(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=Ia(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 T0(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 CD(t,e,r,a,i,n,o,s,l,u,h){var f,c=.005,v=1/0,d,g,p,m;Or[0]=l,Or[1]=u;for(var y=0;y<1;y+=.05)rr[0]=De(t,r,i,o,y),rr[1]=De(e,a,n,s,y),p=ba(Or,rr),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=Ia(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 C0(t,e,r){var a=t+r-2*e;return a===0?.5:(t-e)/a}function kc(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 MD(t,e,r,a,i,n,o,s,l){var u,h=.005,f=1/0;Or[0]=o,Or[1]=s;for(var c=0;c<1;c+=.05){rr[0]=be(t,r,i,c),rr[1]=be(e,a,n,c);var v=ba(Or,rr);v=0&&v1e-4){s[0]=t-r,s[1]=e-a,l[0]=t+r,l[1]=e+a;return}if(Gl[0]=Bc(i)*r+t,Gl[1]=zc(i)*a+e,Hl[0]=Bc(n)*r+t,Hl[1]=zc(n)*a+e,u(s,Gl,Hl),h(l,Gl,Hl),i=i%vi,i<0&&(i=i+vi),n=n%vi,n<0&&(n=n+vi),i>n&&!o?n+=vi:ii&&(Fl[0]=Bc(v)*r+t,Fl[1]=zc(v)*a+e,u(s,Fl,s),h(l,Fl,l))}var Zt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Nr=[],Pa=[],kr=[],zr=[],L0=Math.min,P0=Math.max,Eo=Math.cos,Ro=Math.sin,Wl=Math.sqrt,wn=Math.abs,Vc=typeof Float32Array<"u",Oe=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Oe.prototype={constructor:Oe,_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=wn(r/pl/t)||0,this._uy=wn(r/pl/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(Zt.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=wn(t-this._xi)>this._ux||wn(e-this._yi)>this._uy||this._len<5;return this.addData(Zt.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(Zt.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(Zt.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(Zt.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=Eo(i)*r+t,this._yi=Ro(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(Zt.R,t,e,r,a),this},closePath:function(){this.addData(Zt.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?L0(f,t):P0(f,t),u>=0?L0(c,e):P0(c,e));l=f-t,u=c-e,this._dashOffset=-Wl(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=De,p=0,m=this._dashIdx,y=l.length,_,w,b=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+=Wl(v*v+d*d);for(;ms));m++);for(c=(b-s)/p;c<=1;)_=g(h,t,r,i,c),w=g(f,e,a,n,c),m%2?u.moveTo(_,w):u.lineTo(_,w),c+=l[m]/p,m=(m+1)%y;m%2!==0&&u.lineTo(i,n),v=i-_,d=n-w,this._dashOffset=-Wl(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,Vc&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Nr[0]=Nr[1]=kr[0]=kr[1]=Number.MAX_VALUE,Pa[0]=Pa[1]=zr[0]=zr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,a=0,i=0,n=0;nl||wn(s-n)>u||f===h-1)&&(t.lineTo(o,s),i=o,n=s);break;case Zt.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 Zt.Q:t.quadraticCurveTo(e[f++],e[f++],e[f++],e[f++]),i=e[f-2],n=e[f-1];break;case Zt.A:var v=e[f++],d=e[f++],g=e[f++],p=e[f++],m=e[f++],y=e[f++],_=e[f++],w=e[f++],b=g>p?g:p,A=g>p?1:g/p,S=g>p?p/g:1,D=Math.abs(g-p)>.001,I=m+y;D?(t.translate(v,d),t.rotate(_),t.scale(A,S),t.arc(0,0,b,m,I,1-w),t.scale(1/A,1/S),t.rotate(-_),t.translate(-v,-d)):t.arc(v,d,b,m,I,1-w),f===1&&(r=Eo(m)*g+v,a=Ro(m)*p+d),i=Eo(I)*g+v,n=Ro(I)*p+d;break;case Zt.R:r=i=e[f],a=n=e[f+1],t.rect(e[f++],e[f++],e[f++],e[f++]);break;case Zt.Z:t.closePath(),i=r,n=a}}}},Oe.CMD=Zt;function Ea(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+=Oo);var c=Math.atan2(l,s);return c<0&&(c+=Oo),c>=a&&c<=i||c+Oo>=a&&c+Oo<=i}function oa(t,e,r,a,i,n){if(n>e&&n>a||ni?o:0}var Oa=Oe.CMD,bn=Math.PI*2,OD=1e-4;function ND(t,e){return Math.abs(t-e)e&&u>a&&u>n&&u>s||u1&&kD(),v=De(e,a,n,s,ar[0]),c>1&&(d=De(e,a,n,s,ar[1]))),c===2?pe&&s>a&&s>n||s=0&&u<=1){for(var h=0,f=be(e,a,n,u),c=0;cr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);Me[0]=-l,Me[1]=l;var u=Math.abs(a-i);if(u<1e-4)return 0;if(u%bn<1e-4){a=0,i=bn;var h=n?1:-1;return o>=Me[0]+t&&o<=Me[1]+t?h:0}if(n){var l=a;a=Ra(i),i=Ra(l)}else a=Ra(a),i=Ra(i);a>i&&(i+=bn);for(var f=0,c=0;c<2;c++){var v=Me[c];if(v+t>o){var d=Math.atan2(s,v),h=n?1:-1;d<0&&(d=bn+d),(d>=a&&d<=i||d+bn>=a&&d+bn<=i)&&(d>Math.PI/2&&d1&&(r||(n+=oa(o,s,l,u,a,i))),h===1&&(o=t[h],s=t[h+1],l=o,u=s),f){case Oa.M:l=t[h++],u=t[h++],o=l,s=u;break;case Oa.L:if(r){if(Ea(o,s,t[h],t[h+1],e,a,i))return!0}else n+=oa(o,s,t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.C:if(r){if(ED(o,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=zD(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 Oa.Q:if(r){if(E0(o,s,t[h++],t[h++],t[h],t[h+1],e,a,i))return!0}else n+=BD(o,s,t[h++],t[h++],t[h],t[h+1],a,i)||0;o=t[h++],s=t[h++];break;case Oa.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++],A=Math.cos(p)*d+c,S=Math.sin(p)*g+v;h>1?n+=oa(o,s,A,S,a,i):(l=A,u=S);var _=(a-c)*g/d+c;if(r){if(RD(c,v,g,p,p+m,y,e,_,i))return!0}else n+=VD(c,v,g,p,p+m,y,_,i);o=Math.cos(p+m)*d+c,s=Math.sin(p+m)*g+v;break;case Oa.R:l=o=t[h++],u=s=t[h++];var w=t[h++],b=t[h++],A=l+w,S=u+b;if(r){if(Ea(l,u,A,u,e,a,i)||Ea(A,u,A,S,e,a,i)||Ea(A,S,l,S,e,a,i)||Ea(l,S,l,u,e,a,i))return!0}else n+=oa(A,u,A,S,a,i),n+=oa(l,S,l,u,a,i);break;case Oa.Z:if(r){if(Ea(o,s,l,u,e,a,i))return!0}else n+=oa(o,s,l,u,a,i);o=l,s=u;break}}return!r&&!ND(s,u)&&(n+=oa(o,s,l,u,a,i)||0),n!==0}function GD(t,e,r){return O0(t,0,!1,e,r)}function HD(t,e,r,a){return O0(t,e,!0,r,a)}var N0=qf.prototype.getCanvasPattern,Gc=Math.abs,FD=new Oe(!0);function pt(t){Le.call(this,t),this.path=null}pt.prototype={constructor:pt,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var r=this.style,a=this.path||FD,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=N0.call(o,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=N0.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 Oe},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var a=this.path;a||(a=this.path=new Oe),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)),HD(n,o/s,t,e)))return!0}if(i.hasFill())return GD(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):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(lt(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&&Gc(t[0]-1)>1e-10&&Gc(t[3]-1)>1e-10?Math.sqrt(Gc(t[0]*t[3]-t[2]*t[1])):1}},pt.extend=function(t){var e=function(a){pt.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)};It(e,pt);for(var r in t)r!=="style"&&r!=="shape"&&(e.prototype[r]=t[r]);return e},It(pt,Le);var Sn=Oe.CMD,WD=[[],[],[]],k0=Math.sqrt,UD=Math.atan2,$D=function(t,e){var r=t.data,a,i,n,o,s,l,u=Sn.M,h=Sn.C,f=Sn.L,c=Sn.R,v=Sn.A,d=Sn.Q;for(n=0,o=0;n1&&(o*=Hc(d),s*=Hc(d));var g=(i===n?-1:1)*Hc((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+$l(f)*p-Ul(f)*m,_=(e+a)/2+Ul(f)*p+$l(f)*m,w=B0([1,0],[(c-p)/o,(v-m)/s]),b=[(c-p)/o,(v-m)/s],A=[(-1*c-p)/o,(-1*v-m)/s],S=B0(b,A);Fc(b,A)<=-1&&(S=Zl),Fc(b,A)>=1&&(S=0),n===0&&S>0&&(S=S-2*Zl),n===1&&S<0&&(S=S+2*Zl),h.addData(u,y,_,o,s,w,S,f,n)}var ZD=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,YD=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function XD(t){if(!t)return new Oe;for(var e=0,r=0,a=e,i=r,n,o=new Oe,s=Oe.CMD,l=t.match(ZD),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([F0(h[0],f[0],c[0],v[0],u,d,g),F0(h[1],f[1],c[1],v[1],u,d,g)])}return a},QD=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=QD(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=jD(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 ru(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Kc(t,e){var r=e&&e.getModel("textStyle");return tr([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 hy(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 ft(t,e,r,a,i){hy(!0,t,e,r,a,i)}function Se(t,e,r,a,i){hy(!1,t,e,r,a,i)}function yi(t,e){for(var r=fn([]);t&&t!==e;)Sa(r,t.getLocalTransform(),r),t=t.parent;return r}function Hr(t,e,r){return e&&!Qr(e)&&(e=_r.getLocalTransform(e)),r&&(e=cl([],e)),Pt([],t,e)}function jc(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=Hr(n,e,r),Math.abs(n[0])>Math.abs(n[1])?n[0]>0?"right":"left":n[1]>0?"bottom":"top"}function au(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:mr(s.position),rotation:s.rotation};return s.shape&&(l.shape=et({},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)),ft(s,u,r,s.dataIndex)}}})}function fy(t,e){return V(t,function(r){var a=r[0];a=Kl(a,e.x),a=jl(a,e.x+e.width);var i=r[1];return i=Kl(i,e.y),i=jl(i,e.y+e.height),[a,i]})}function fM(t,e){var r=Kl(t.x,e.x),a=jl(t.x+t.width,e.x+e.width),i=Kl(t.y,e.y),n=jl(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 Ho(t,e,r){e=et({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),J(a,r),new ve(e)):zo(t.replace("path://",""),e,r,"center")}function Fo(t,e,r,a,i){for(var n=0,o=i[i.length-1];n1)return!1;var p=Qc(v,d,h,f)/c;return!(p<0||p>1)}function Qc(t,e,r,a){return t*a-r*e}function cM(t){return t<=1e-6&&t>=-1e-6}Gr("circle",Br),Gr("sector",Ar),Gr("ring",Yl),Gr("polygon",Ge),Gr("polyline",ir),Gr("rect",xt),Gr("line",ye),Gr("bezierCurve",Xl),Gr("arc",Uc);var sa=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:ko,CACHED_LABEL_STYLE_PROPERTIES:X0,extendShape:nr,extendPath:tM,registerShape:Gr,getShapeClass:Zc,makePath:zo,makeImage:J0,mergePath:or,resizePath:ey,subPixelOptimizeLine:eM,subPixelOptimizeRect:rM,subPixelOptimize:Jl,setElementHoverStyle:Vo,setHoverStyle:Ot,setAsHighDownDispatcher:mi,isHighDownDispatcher:tu,getHighlightDigit:sy,setLabelStyle:Fe,modifyLabelStyle:qc,setTextStyle:$t,setText:uM,getFont:Kc,updateProps:ft,initProps:Se,getTransform:yi,applyTransform:Hr,transformDirection:jc,groupTransition:au,clipPointsByRect:fy,clipRectByRect:fM,createIcon:Ho,linePolygonIntersect:Fo,lineLineIntersect:cy,Group:q,Image:ve,Text:dt,Circle:Br,Sector:Ar,Ring:Yl,Polygon:Ge,Polyline:ir,Rect:xt,Line:ye,BezierCurve:Xl,Arc:Uc,IncrementalDisplayable:He,CompoundPath:Y0,LinearGradient:pi,RadialGradient:ql,BoundingRect:vt}),vM=["textStyle","color"],dM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(vM):null)},getFont:function(){return Kc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Rr(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},gM=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),pM={getItemStyle:function(t,e){var r=gM(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]}},iu=Dt,vy=Pe();function _t(t,e,r){this.parentModel=e,this.ecModel=r,this.option=t}_t.prototype={constructor:_t,init:null,mergeOption:function(t){ut(this.option,t,!0)},get:function(t,e){return t==null?this.option:dy(this.option,this.parsePath(t),!e&&Jc(this,t))},getShallow:function(t,e){var r=this.option,a=r==null?r:r[t],i=!e&&Jc(this,t);return a==null&&i&&(a=i.getShallow(t)),a},getModel:function(t,e){var r=t==null?this.option:dy(this.option,t=this.parsePath(t)),a;return e=e||(a=Jc(this,t))&&a.getModel(t),new _t(r,e,this.ecModel)},isEmpty:function(){return this.option==null},restoreData:function(){},clone:function(){var t=this.constructor;return new t(rt(this.option))},setReadOnly:function(t){},parsePath:function(t){return typeof t=="string"&&(t=t.split(".")),t},customizeGetParent:function(t){vy(this).getParent=t},isAnimationEnabled:function(){if(!G.node){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}};function dy(t,e,r){for(var a=0;a=0&&s.push(l)}),s}}var gy=1e-4;function xM(t){return t.replace(/^\s+|\s+$/g,"")}function Nt(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 H(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"?xM(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):t==null?NaN:+t}function re(t,e,r){return e==null&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t}function _i(t){return t.sort(function(e,r){return e-r}),t}function py(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 nu(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 tv(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 my(t,e,r){if(!t[e])return 0;var a=an(t,function(d,g){return d+(isNaN(g)?0:g)},0);if(a===0)return 0;for(var i=Math.pow(10,r),n=V(t,function(d){return(isNaN(d)?0:d)/a*i*100}),o=i*100,s=V(n,function(d){return Math.floor(d)}),l=an(s,function(d,g){return d+g},0),u=V(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 ev=9007199254740991;function rv(t){var e=Math.PI*2;return(t%e+e)%e}function Uo(t){return t>-gy&&t=10&&e++,e}function iv(t,e){var r=av(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 bM(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 nv(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 SM=(Object.freeze||Object)({linearMap:Nt,parsePercent:H,round:re,asc:_i,getPrecision:py,getPrecisionSafe:nu,getPixelPrecision:tv,getPercentWithPrecision:my,MAX_SAFE_INTEGER:ev,remRadian:rv,isRadianAroundZero:Uo,parseDate:$o,quantity:yy,quantityExponent:av,nice:iv,quantile:bM,reformIntervals:nv,isNumeric:_y});function ka(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function xy(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 xi=cf,AM=/([&<>"'])/g,TM={"&":"&","<":"<",">":">",'"':""","'":"'"};function kt(t){return t==null?"":(t+"").replace(AM,function(e,r){return TM[r]})}var wy=["a","b","c","d","e","f","g"],ov=function(t,e){return"{"+t+(e??"")+"}"};function sv(t,e,r){z(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 Tn(t,e){return t+="","0000".substr(0,e-t.length)+t}function lv(t,e,r){(t==="week"||t==="month"||t==="quarter"||t==="half-year"||t==="year")&&(t=`MM-dd yyyy`);var a=$o(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",Tn(o,2)).replace("M",o).replace("yyyy",n).replace("yy",n%100).replace("dd",Tn(s,2)).replace("d",s).replace("hh",Tn(l,2)).replace("h",l).replace("mm",Tn(u,2)).replace("m",u).replace("ss",Tn(h,2)).replace("s",h).replace("SSS",Tn(f,3)),t}function su(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)}var Sy=rc;function CM(t){return Rr(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function DM(t,e,r,a,i,n,o,s){return Rr(t,e,r,a,i,s,n,o)}function Zo(t,e){if(e==="_blank"||e==="blank"){var r=window.open();r.opener=null,r.location=t}else window.open(t,e)}var MM=(Object.freeze||Object)({addCommas:ka,toCamelCase:xy,normalizeCssArray:xi,encodeHTML:kt,formatTpl:sv,formatTplSimple:by,getTooltipMarker:ou,formatTime:lv,capitalFirst:su,truncateText:Sy,getTextBoundingRect:CM,getTextRect:DM,windowOpen:Zo}),lu=M,Ay=["left","right","top","bottom","width","height"],wi=[["width","left","right"],["height","top","bottom"]];function uv(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 bi=uv,H5=ot(uv,"vertical"),F5=ot(uv,"horizontal");function IM(t,e,r){var a=e.width,i=e.height,n=H(t.x,a),o=H(t.y,i),s=H(t.x2,a),l=H(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=xi(r||0),{width:Math.max(s-n-r[1]-r[3],0),height:Math.max(l-o-r[0]-r[2],0)}}function qt(t,e,r){r=xi(r||0);var a=e.width,i=e.height,n=H(t.left,a),o=H(t.top,i),s=H(t.right,a),l=H(t.bottom,i),u=H(t.width,a),h=H(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 vt(n+r[3],o+r[0],u,h);return d.margin=r,d}function uu(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 vt(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=qt(J({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 LM(t,e){return t[wi[e][0]]!=null||t[wi[e][1]]!=null&&t[wi[e][2]]!=null}function za(t,e,r){!lt(r)&&(r={});var a=r.ignoreSize;!z(a)&&(a=[a,a]);var i=o(wi[0],0),n=o(wi[1],1);u(wi[0],t,i),u(wi[1],t,n);function o(h,f){var c={},v=0,d={},g=0,p=2;if(lu(h,function(_){d[_]=t[_]}),lu(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=ut(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)})}});kl(wt,{registerWhenExtend:!0}),yM(wt),_M(wt,RM);function RM(t){var e=[];return M(wt.getClassesByMainType(t),function(r){e=e.concat(r.prototype.dependencies||[])}),e=V(e,function(r){return Ma(r).main}),t!=="dataset"&&yt(e,"dataset")<=0&&e.unshift("dataset"),e}Dt(wt,PM);var Cy="";typeof navigator<"u"&&(Cy=navigator.platform||"");var OM={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Cy.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},hv=Pe();function NM(t,e){for(var r=t.length,a=0;ae)return t[a];return t[r-1]}var fv={clearColorPalette:function(){hv(this).colorIdx=0,hv(this).colorNameMap={}},getColorFromPalette:function(t,e,r){e=e||this;var a=hv(e),i=a.colorIdx||0,n=a.colorNameMap=a.colorNameMap||{};if(n.hasOwnProperty(t))return n[t];var o=me(this.get("color",!0)),s=this.get("colorLayer",!0),l=r==null||!s?o:NM(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}}},Si="original",Yo="arrayRows",Xo="objectRows",qo="keyedColumns",Dy="unknown",Ko="typedArray",My="column",cv="row";function Tr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===qo?{}:[]),this.sourceFormat=t.sourceFormat||Dy,this.seriesLayoutBy=t.seriesLayoutBy||My,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&ht(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Tr.seriesDataToSource=function(t){return new Tr({data:t,sourceFormat:pr(t)?Ko:Si,fromDataset:!1})},Nl(Tr);var Ae={Must:1,Might:2,Not:3},Dn=Pe();function kM(t){var e=t.option.source,r=Dy;if(pr(e))r=Ko;else if(z(e)){e.length===0&&(r=Yo);for(var a=0,i=e.length;a=0;a--)El(e[a])&&e.splice(a,1);t[r]=e}}),delete t[gv],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)z(r)||(r=[r]),o=ee(V(r,function(u){return n[u]}),function(u){return!!u});else if(a!=null){var s=z(a);o=ee(n,function(u){return s&&yt(a,u.id)>=0||!s&&u.id===a})}else if(i!=null){var l=z(i);o=ee(n,function(u){return l&&yt(i,u.name)>=0||!l&&u.name===i})}else o=n.slice();return Oy(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(Oy(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?ee(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){M(n,function(s,l){e.call(r,o,s,l)})});else if(Lt(t))M(a.get(t),e,r);else if(lt(t)){var i=this.findComponents(t);M(i,e,r)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ee(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 ee(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){hu(this),M(this._seriesIndices,function(r){var a=this._componentsMap.get("series")[r];t.call(e,a,r)},this)},eachRawSeries:function(t,e){M(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,r){hu(this),M(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 M(this.getSeriesByType(t),e,r)},isSeriesFiltered:function(t){return hu(this),this._seriesIndicesMap.get(t.componentIndex)==null},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){hu(this);var r=ee(this._componentsMap.get("series"),t,e);mv(this,r)},restoreData:function(t){var e=this._componentsMap;mv(this,e.get("series"));var r=[];e.each(function(a,i){r.push(i)}),wt.topologicalTravel(r,wt.getAllClassMainTypes(),function(a,i){M(e.get(a),function(n){(a!=="series"||!FM(n,t))&&n.restoreData()})})}});function FM(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 WM(t,e){var r=t.color&&!t.colorLayer;M(e,function(a,i){i==="colorLayer"&&r||wt.hasClass(i)||(typeof a=="object"?t[i]=t[i]?ut(t[i],a,!1):rt(a):t[i]==null&&(t[i]=a))})}function UM(t){t=t,this.option={},this.option[gv]=1,this._componentsMap=ht({series:[]}),this._seriesIndices,this._seriesIndicesMap,WM(t,this._theme.option),ut(t,OM,!1),this.mergeOption(t)}function $M(t,e){z(e)||(e=e?[e]:[]);var r={};return M(e,function(a){r[a]=(t.get(a)||[]).slice()}),r}function ZM(t,e,r){var a=e.type?e.type:r?r.subType:wt.determineSubType(t,e);return a}function mv(t,e){t._seriesIndicesMap=ht(t._seriesIndices=V(e,function(r){return r.componentIndex})||[])}function Oy(t,e){return e.hasOwnProperty("subType")?ee(t,function(r){return r.subType===e.subType}):t}function hu(t){if(T&&!t._seriesIndices)throw new Error("Option should contains series.")}Dt(pv,fv);var YM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Ny(t){M(YM,function(e){this[e]=it(t[e],t)},this)}var yv={};function _e(){this._coordinateSystems=[]}_e.prototype={constructor:_e,create:function(t,e){var r=[];M(yv,function(a,i){var n=a.create(t,e);r=r.concat(n||[])}),this._coordinateSystems=r},update:function(t,e){M(this._coordinateSystems,function(r){r.update&&r.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},_e.register=function(t,e){yv[t]=e},_e.get=function(t){return yv[t]};var fu=M,Ai=rt,cu=V,ky=ut,XM=/^(min|max)?(.+)$/;function _v(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}_v.prototype={constructor:_v,setOption:function(t,e){t&&M(me(t.series),function(i){i&&i.data&&pr(i.data)&&vf(i.data)}),t=Ai(t);var r=this._optionBackup,a=qM.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(JM(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=cu(e.timelineOptions,Ai),this._mediaList=cu(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 QM(t,e){return t.join(",")===e.join(",")}function JM(t,e){e=e||{},fu(e,function(r,a){if(r!=null){var i=t[a];if(!wt.hasClass(a))t[a]=ky(i,r,!0);else{r=me(r),i=me(i);var n=Pc(i,r);t[a]=cu(n,function(o){return o.option&&o.exist?ky(o.exist,o.option,!0):o.exist||o.option})}}})}var Cr=M,jo=lt,zy=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xv(t){var e=t&&t.itemStyle;if(!!e)for(var r=0,a=zy.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 Hy(t,e){Tr.isInstance(t)||(t=Tr.seriesDataToSource(t)),this._source=t;var r=this._data=t.data,a=t.sourceFormat;if(a===Ko){if(T&&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===Yo?a+"_"+t.seriesLayoutBy:a];T&>(i,"Invalide sourceFormat: "+a),et(this,i)}var wv=Hy.prototype;wv.pure=!1,wv.persistent=!0,wv.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:bv},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=fI(this,r)),this._modBy=s,this._modDataCount=l;var f=t&&t.step;if(e?(T&>(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(T&>(!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 Xy=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(I){var L=an(I,function(W,$,X){var K=f.getDimensionInfo(X);return W|=K&&K.tooltip!==!1&&K.displayName!=null},0),P=[];c.length?M(c,function(W){R(Ti(f,t,W),W)}):M(I,R);function R(W,$){var X=f.getDimensionInfo($);if(!(!X||X.otherDims.tooltip===!1)){var K=X.type,Q="sub"+i.seriesIndex+"at"+l,j=ou({color:p,type:"subItem",renderMode:a,markerId:Q}),U=typeof j=="string"?j:j.content,tt=(L?U+kt(X.displayName||"-")+": ":"")+kt(K==="ordinal"?W+"":K==="time"?e?"":lv("yyyy/MM/dd hh:mm:ss",W):ka(W));tt&&P.push(tt),o&&(s[Q]=p,++l)}}var E=L?o?` `:"
":"",Z=E+P.join(E||", ");return{renderMode:a,content:Z,style:s}}function h(I){return{renderMode:a,content:kt(ka(I)),style:s}}var f=this.getData(),c=f.mapDimension("defaultedTooltip",!0),v=c.length,d=this.getRawValue(t),g=z(d),p=f.getItemVisual(t,"color");lt(p)&&p.colorStops&&(p=(p.colorStops[0]||{}).color),p=p||"transparent";var m=v>1||g&&!v?u(d):h(v?Ti(f,t,c[0]):g?d[0]:d),y=m.content,_=i.seriesIndex+"at"+l,w=ou({color:p,type:"item",renderMode:a,markerId:_});s[_]=p,++l;var b=f.getName(t),A=this.name;Ec(this)||(A=""),A=A?kt(A)+(e?": ":n):"";var S=typeof w=="string"?w:w.content,D=e?S+A+y:A+S+(b?kt(b)+": "+y:y);return{html:D,markers:s}},isAnimationEnabled:function(){if(G.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=fv.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});Dt(Vt,Tv),Dt(Vt,fv);function Ky(t){var e=t.name;Ec(t)||(t.name=cI(t)||e)}function cI(t){var e=t.getRawData(),r=e.mapDimension("seriesName",!0),a=[];return M(r,function(i){var n=e.getDimensionInfo(i);n.displayName&&a.push(n.displayName)}),a.join(" ")}function vI(t){return t.model.getRawData().count()}function dI(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),gI}function gI(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function jy(t,e){M(t.CHANGABLE_METHODS,function(r){t.wrapMethod(r,ot(pI,e))})}function pI(t){var e=Cv(t);e&&e.setOutputEnd(this.count())}function Cv(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 Fr=function(){this.group=new q,this.uid=Wo("viewComponent")};Fr.prototype={constructor:Fr,init:function(t,e){},render:function(t,e,r,a){},dispose:function(){},filterForExposedEvent:null};var Dv=Fr.prototype;Dv.updateView=Dv.updateLayout=Dv.updateVisual=function(t,e,r,a){},Lo(Fr),kl(Fr,{registerWhenExtend:!0});var Mn=function(){var t=Pe();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"}},Qy=Pe(),mI=Mn();function ue(){this.group=new q,this.uid=Wo("viewChart"),this.renderTask=Jo({plan:yI,reset:_I}),this.renderTask.context={view:this}}ue.prototype={type:"chart",init:function(t,e){},render:function(t,e,r,a){},highlight:function(t,e,r,a){Jy(t.getData(),a,"emphasis")},downplay:function(t,e,r,a){Jy(t.getData(),a,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Mv=ue.prototype;Mv.updateView=Mv.updateLayout=Mv.updateVisual=function(t,e,r,a){this.render(t,e,r,a)};function Iv(t,e,r){if(t&&(t.trigger(e,r),t.isGroup&&!tu(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 es(t,e,r,a){var i=t[e];if(!!i){var n=i[vu]||i,o=i[e_],s=i[t_];if(s!==r||o!==a){if(r==null||!a)return t[e]=n;i=t[e]=du(n,r,a==="debounce"),i[vu]=n,i[e_]=a,i[t_]=r}return i}}function r_(t,e){var r=t[e];r&&r[vu]&&(t[e]=r[vu])}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=se(i)&&!(i instanceof Vr)?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}}}},ua={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:""}}}},bI=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 w=g.getData();window.data=w,w.count()>i?m+=f(c("data.partialData"),{displayCnt:i}):m+=c("data.allData");for(var b=[],A=0;Ar.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}}},lr.getPipeline=function(t){return this._pipelineMap.get(t)},lr.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}},lr.restorePipelines=function(t){var e=this,r=e._pipelineMap=ht();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}),mu(e,a,a.dataTask)})},lr.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),r=this.api;M(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,[]);a.reset&&AI(this,a,i,e,r),a.overallReset&&TI(this,a,i,e,r)},this)},lr.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,mu(this,e,i)},lr.performDataProcessorTasks=function(t,e){a_(this,this._dataProcessorHandlers,t,e,{block:!0})},lr.performVisualTasks=function(t,e,r){a_(this,this._visualHandlers,t,e,r)};function a_(t,e,r,a,i){i=i||{};var n;M(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(),i_(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),i_(g,a),n|=g.perform(m)})}});function o(s,l){return s.setDirty&&(!s.dirtyMap||s.dirtyMap.get(l.__pipeline.id))}t.unfinished|=n}lr.performSeriesTasks=function(t){var e;t.eachSeries(function(r){e|=r.dataTask.perform()}),this.unfinished|=e},lr.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 i_=lr.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)};function AI(t,e,r,a,i){var n=r.seriesTaskMap||(r.seriesTaskMap=ht()),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,Jo({plan:LI,reset:PI,count:RI}));c.context={model:h,ecModel:a,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},mu(t,h,c)}var u=t._pipelineMap;n.each(function(h,f){u.get(f)||(h.dispose(),n.removeKey(f))})}function TI(t,e,r,a,i){var n=r.overallTask=r.overallTask||Jo({reset:CI});n.context={ecModel:a,api:i,overallReset:e.overallReset,scheduler:t};var o=n.agentStubMap=n.agentStubMap||ht(),s=e.seriesType,l=e.getTargetSeries,u=!0,h=e.modifyOutputEnd;s?a.eachRawSeriesByType(s,f):l?l(a,i).each(f):(u=!1,M(a.getSeries(),f));function f(v){var d=v.uid,g=o.get(d);g||(g=o.set(d,Jo({reset:DI,onDirty:II})),n.dirty()),g.context={model:v,overallProgress:u,modifyOutputEnd:h},g.agent=n,g.__block=u,mu(t,v,g)}var c=t._pipelineMap;o.each(function(v,d){c.get(d)||(v.dispose(),n.dirty(),o.removeKey(d))})}function CI(t){t.overallReset(t.ecModel,t.api,t.payload)}function DI(t,e){return t.overallProgress&&MI}function MI(){this.agent.dirty(),this.getDownstream().dirty()}function II(){this.agent&&this.agent.dirty()}function LI(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function PI(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=me(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?V(e,function(r,a){return n_(a)}):EI}var EI=n_(0);function n_(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=d_(l,n,o),!e.ignoreViewBox)){var f=a;a=new q,a.add(f),f.scale=u.scale.slice(),f.position=u.position.slice()}return!e.ignoreRootClip&&n!=null&&o!=null&&a.setClipPath(new xt({shape:{x:0,y:0,width:n,height:o}})),{root:a,width:n,height:o,viewBoxRect:l,viewBoxTransform:u}},xu.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=BI[r];if(i){var n=i.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=n)}}else{var i=zI[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)},xu.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 dt({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});ur(e,i),We(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 zI={g:function(t,e){var r=new q;return ur(e,r),We(t,r,this._defs),r},rect:function(t,e){var r=new xt;return ur(e,r),We(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 Br;return ur(e,r),We(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 ye;return ur(e,r),We(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 kI;return ur(e,r),We(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=f_(r));var a=new Ge({shape:{points:r||[]}});return ur(e,a),We(t,a,this._defs),a},polyline:function(t,e){var r=new pt;ur(e,r),We(t,r,this._defs);var a=t.getAttribute("points");a&&(a=f_(a));var i=new ir({shape:{points:a||[]}});return i},image:function(t,e){var r=new ve;return ur(e,r),We(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 q;return ur(e,o),We(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 q;return ur(e,o),We(t,o,this._defs),this._textX+=i,this._textY+=n,o},path:function(t,e){var r=t.getAttribute("d")||"",a=H0(r);return ur(e,a),We(t,a,this._defs),a}},BI={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 pi(e,r,a,i);return VI(t,n),n},radialgradient:function(t){}};function VI(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 ur(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),J(e.__inheritedStyle,t.__inheritedStyle))}function f_(t){for(var e=tr(t).split(Va),r=[],a=0;a0;n-=2){var o=i[n],s=i[n-1];switch(a=a||Ie(),s){case"translate":o=tr(o).split(Va),yr(a,a,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=tr(o).split(Va),wo(a,a,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=tr(o).split(Va),aa(a,a,parseFloat(o[0]));break;case"skew":o=tr(o).split(Va),console.warn("Skew transform is not supported yet");break;case"matrix":var o=tr(o).split(Va);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 v_=/([^\s:;]+)\s*:\s*([^:;]+)/g;function WI(t){var e=t.getAttribute("style"),r={};if(!e)return r;var a={};v_.lastIndex=0;for(var i;(i=v_.exec(e))!=null;)a[i[1]]=i[2];for(var n in In)In.hasOwnProperty(n)&&a[n]!=null&&(r[In[n]]=a[n]);return r}function d_(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 UI(t,e){var r=new xu;return r.parse(t,e)}var g_=ht(),wu={registerMap:function(t,e,r){var a;return z(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}]),M(a,function(i){var n=i.type;n==="geoJson"&&(n=i.type="geoJSON");var o=$I[n];T&>(o,"Illegal map type: "+n),o(i)}),g_.set(t,a)},retrieveMap:function(t){return g_.get(t)}},$I={geoJSON:function(t){var e=t.source;t.geoJSON=Lt(e)?typeof JSON<"u"&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=h_(t.source)}},Ln=gt,ae=M,ZI=se,as=lt,Pv=wt.parseClassType,p_="4.8.0",Ev={zrender:"4.3.1"},YI=1,m_=1e3,XI=800,qI=900,KI=5e3,y_=1e3,jI=1100,__=2e3,x_=3e3,QI=3500,JI=4e3,t2=5e3,Wr={PROCESSOR:{FILTER:m_,SERIES_FILTER:XI,STATISTIC:KI},VISUAL:{LAYOUT:y_,PROGRESSIVE_LAYOUT:jI,GLOBAL:__,CHART:x_,POST_CHART_LAYOUT:QI,COMPONENT:JI,BRUSH:t2}},hr="__flagInMainProcess",Ga="__optionUpdated",w_=/^[a-zA-Z0-9_]+$/;function Pn(t,e){return function(r,a,i){if(!e&&this._disposed){Ue(this.id);return}r=r&&r.toLowerCase(),le.prototype[t].call(this,r,a,i)}}function is(){le.call(this)}is.prototype.on=Pn("on",!0),is.prototype.off=Pn("off",!0),is.prototype.one=Pn("one",!0),Dt(is,le);function ns(t,n,r){r=r||{},typeof n=="string"&&(n=P_[n]),this.id,this.group,this._dom=t;var a="canvas";T&&(a=(typeof window>"u"?global:window).__ECHARTS__DEFAULT__RENDERER__||a);var i=this._zr=Mc(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height});this._throttledZrFlush=du(it(i.flush,i),17);var n=rt(n);n&&Gy(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new _e;var o=this._api=o2(this);function s(l,u){return l.__prio-u.__prio}wl(Cu,s),wl(zv,s),this._scheduler=new pu(this,o,zv,Cu),le.call(this,this._ecEventProcessor=new kv),this._messageCenter=new is,this._initEvents(),this.resize=it(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),e2(i,this),vf(this)}var At=ns.prototype;At._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Ga]){var e=this[Ga].silent;this[hr]=!0,os(this),Ha.update.call(this),this[hr]=!1,this[Ga]=!1,bu.call(this,e),Su.call(this,e)}else if(t.unfinished){var r=YI,a=this._model,i=this._api;t.unfinished=!1;do{var n=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),A_(this,a),t.performVisualTasks(a),Ov(this,this._model,i,"remain"),r-=+new Date-n}while(r>0&&t.unfinished);t.unfinished||this._zr.flush()}}},At.getDom=function(){return this._dom},At.getZr=function(){return this._zr},At.setOption=function(t,e,r){if(T&&Ln(!this[hr],"`setOption` should not be called during main process."),this._disposed){Ue(this.id);return}var a;if(as(e)&&(r=e.lazyUpdate,a=e.silent,e=e.notMerge),this[hr]=!0,!this._model||e){var i=new _v(this._api),n=this._theme,o=this._model=new pv;o.scheduler=this._scheduler,o.init(null,null,n,i)}this._model.setOption(t,I_),r?(this[Ga]={silent:a},this[hr]=!1):(os(this),Ha.update.call(this),this._zr.flush(),this[Ga]=!1,this[hr]=!1,bu.call(this,a),Su.call(this,a))},At.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},At.getModel=function(){return this._model},At.getOption=function(){return this._model&&this._model.getOption()},At.getWidth=function(){return this._zr.getWidth()},At.getHeight=function(){return this._zr.getHeight()},At.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},At.getRenderedCanvas=function(t){if(!!G.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)}},At.getSvgDataURL=function(){if(!!G.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return M(e,function(r){r.stopAnimation(!0)}),t.painter.toDataURL()}},At.getDataURL=function(t){if(this._disposed){Ue(this.id);return}t=t||{};var e=t.excludeComponents,r=this._model,a=[],i=this;ae(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 ae(a,function(o){o.group.ignore=!1}),n},At.getConnectedDataURL=function(t){if(this._disposed){Ue(this.id);return}if(!!G.canvasSupported){var e=t.type==="svg",r=this.group,a=Math.min,i=Math.max,n=1/0;if(Du[r]){var o=n,s=n,l=-n,u=-n,h=[],f=t&&t.pixelRatio||1;M(Ci,function(m,y){if(m.group===r){var _=e?m.getZr().painter.getSvgDom().innerHTML:m.getRenderedCanvas(rt(t)),w=m.getDom().getBoundingClientRect();o=a(w.left,o),s=a(w.top,s),l=i(w.right,l),u=i(w.bottom,u),h.push({dom:_,left:w.left,top:w.top})}}),o*=f,s*=f,l*=f,u*=f;var c=l-o,v=u-s,d=rn(),g=Mc(d,{renderer:e?"svg":"canvas"});if(g.resize({width:c,height:v}),e){var p="";return ae(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 xt({shape:{x:0,y:0,width:c,height:v},style:{fill:t.connectedBackgroundColor}})),ae(h,function(m){var y=new ve({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)}},At.convertToPixel=ot(b_,"convertToPixel"),At.convertFromPixel=ot(b_,"convertFromPixel");function b_(t,e,r){if(this._disposed){Ue(this.id);return}var a=this._model,i=this._coordSysMgr.getCoordinateSystems(),n;e=Ol(a,e);for(var o=0;o=0&&M(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):T&&console.warn(n+": "+(l?"The found component do not support containPoint.":"No view mapping to the found component."))}else T&&console.warn(n+": containPoint is not supported")},this)},this),!!a},At.getVisual=function(t,e){var r=this._model;t=Ol(r,t,{defaultMainType:"series"});var a=t.seriesModel;T&&(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)},At.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},At.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Ha={prepareAndUpdate:function(t){os(this),Ha.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),A_(this,e),i.update(e,r),Rv(e),n.performVisualTasks(e,t),D_(this,e,r,t);var o=e.get("backgroundColor")||"transparent";if(G.canvasSupported)a.setBackgroundColor(o);else{var s=Ve(o);o=ia(s,"rgb"),s[3]===0&&(o="transparent")}Nv(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=ht();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)}),Rv(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:n}),Ov(r,e,a,t,n),Nv(e,this._api)}},updateView:function(t){var e=this._model;!e||(ue.markUpdateMethod(t,"updateView"),Rv(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),D_(this,this._model,this._api,t),Nv(e,this._api))},updateVisual:function(t){Ha.update.call(this,t)},updateLayout:function(t){Ha.update.call(this,t)}};function os(t){var e=t._model,r=t._scheduler;r.restorePipelines(e),r.prepareStageTasks(),C_(t,"component",e,r),C_(t,"chart",e,r),r.plan()}function S_(t,e,r,a,i){var n=t._model;if(!a){ae(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=ht(me(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)}}At.resize=function(t){if(T&&Ln(!this[hr],"`resize` should not be called during main process."),this._disposed){Ue(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[hr]=!0,r&&os(this),Ha.update.call(this),this[hr]=!1,bu.call(this,a),Su.call(this,a)}};function A_(t,e){var r=t._chartsMap,a=t._scheduler;e.eachSeries(function(i){a.updateStreamModes(i,r[i.__viewId])})}At.showLoading=function(t,e){if(this._disposed){Ue(this.id);return}if(as(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!Bv[t]){T&&console.warn("Loading effects "+t+" not exists.");return}var r=Bv[t](this._api,e),a=this._zr;this._loadingFX=r,a.add(r)},At.hideLoading=function(){if(this._disposed){Ue(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},At.makeActionFromEvent=function(t){var e=et({},t);return e.type=Tu[t.type],e},At.dispatchAction=function(t,e){if(this._disposed){Ue(this.id);return}if(as(e)||(e={silent:!!e}),!!Au[t.type]&&!!this._model){if(this[hr]){this._pendingActions.push(t);return}T_.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&G.browser.weChat&&this._throttledZrFlush(),bu.call(this,e.silent),Su.call(this,e.silent)}};function T_(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&&Pv(o[0]),this[hr]=!0;var l=[t],u=!1;t.batch&&(u=!0,l=V(t.batch,function(v){return v=J(et({},v),t),v.batch=null,v}));var h=[],f,c=r==="highlight"||r==="downplay";ae(l,function(v){f=i.action(v,this._model,this._api),f=f||et({},v),f.type=n.event||f.type,h.push(f),c?S_(this,s,v,"series"):o&&S_(this,s,v,o.main,o.sub)},this),s!=="none"&&!c&&!o&&(this[Ga]?(os(this),Ha.update.call(this,t),this[Ga]=!1):Ha[s].call(this,t)),u?f={type:n.event||r,escapeConnect:a,batch:h}:f=h[0],this[hr]=!1,!e&&this._messageCenter.trigger(f.type,f)}function bu(t){for(var e=this._pendingActions;e.length;){var r=e.shift();T_.call(this,r,t)}}function Su(t){!t&&this.trigger("updated")}function e2(t,e){t.on("rendered",function(){e.trigger("rendered"),t.animation.isFinished()&&!e[Ga]&&!e._scheduler.unfinished&&!e._pendingActions.length&&e.trigger("finished")})}At.appendData=function(t){if(this._disposed){Ue(this.id);return}var e=t.seriesIndex,r=this.getModel(),a=r.getSeriesByIndex(e);T&&Ln(t.data&&a),a.appendData(t),this._scheduler.unfinished=!0},At.on=Pn("on",!1),At.off=Pn("off",!1),At.one=Pn("one",!1);function C_(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")&&!G.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 n2(t,e){var r=t.get("blendMode")||null;T&&!G.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 M_(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 o2(t){var e=t._coordSysMgr;return et(new Ny(t),{getCoordinateSystems:it(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 kv(){this.eventInfo}kv.prototype={constructor:kv,normalizeQuery:function(t){var e={},r={},a={};if(Lt(t)){var i=Pv(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var n=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};M(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={},Tu={},zv=[],I_=[],L_=[],Cu=[],P_={},Bv={},Ci={},Du={},s2=new Date-0,l2=new Date-0,Vv="_echarts_instance_";function u2(t){var e=0,r=1,a=2,i="__connectUpdateStatus";function n(o,s){for(var l=0;l65535?T2:D2}function M2(t){var e=t.constructor;return e===Array?t.slice():new e(t)}var I2=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],L2=["_extent","_approximateExtent","_rawExtent"];function z_(t,e){M(I2.concat(e.__wrappedMethods||[]),function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t.__wrappedMethods=e.__wrappedMethods,M(L2,function(r){t[r]=rt(e[r])}),t._calculationInfo=et(e._calculationInfo)}var fe=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={},V_(this)},nt._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;dD[1]&&(D[1]=S)}if(!a.pure){var I=l[y];if(m&&I==null){if(m.name!=null)l[y]=I=m.name;else if(c!=null){var L=n[c],P=i[L][_];if(P){I=P[w];var R=s[L].ordinalMeta;R&&R.categories.length&&(I=R.categories[I])}}}var E=m==null?null:m.id;E==null&&I!=null&&(f[I]=f[I]||0,E=I,f[I]>0&&(E+="__ec__"+f[I]),f[I]++),E!=null&&(u[y]=E)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},V_(this)}};function B_(t,e,r,a,i){var n=A2[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},nt.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},nt.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},nt.getCalculationInfo=function(t){return this._calculationInfo[t]},nt.setCalculationInfo=function(t,e){Lu(t)?et(this._calculationInfo,t):this._calculationInfo[t]=e},nt.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},nt.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},nt.getRawIndex=us;function us(t){return t}function hs(t){return t=0?this._indices[t]:-1}nt.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]],w=t[e[1]][0],b=t[e[1]][1],d=0;d=u&&y<=h||isNaN(y))&&(S>=w&&S<=b||isNaN(S))&&(o[s++]=c),c++}f=!0}}if(!f)if(a===1)for(var m=0;m=u&&y<=h||isNaN(y))&&(o[s++]=D)}else for(var m=0;mt[L][1])&&(I=!1)}I&&(o[s++]=this.getRawIndex(m))}return s=0?(i[s]=P2(n[s]),a._rawExtent[s]=Ru(),a._extent[s]=null):i[s]=n[s])}return a}function P2(t){for(var e=new Array(t.length),r=0;rb[1]&&(b[1]=w)}}}return i},nt.downSample=function(t,e,r,a){for(var i=H_(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(Pu(this))(u),v=0,d=0;du-d&&(s=u-d,o.length=s);for(var g=0;gf[1]&&(f[1]=_),c[v++]=w}return i._count=v,i._indices=c,i.getRawIndex=hs,i},nt.getItemModel=function(t){var e=this.hostModel;return new _t(this.getRawDataItem(t),e,e&&e.ecModel)},nt.diff=function(t){var e=this;return new ha(t?t.getIndices():[],this.getIndices(),function(r){return Zv(t,r)},function(r){return Zv(e,r)})},nt.getVisual=function(t){var e=this._visual;return e&&e[t]},nt.setVisual=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setVisual(r,t[r]);return}this._visual=this._visual||{},this._visual[t]=e},nt.setLayout=function(t,e){if(Lu(t)){for(var r in t)t.hasOwnProperty(r)&&this.setLayout(r,t[r]);return}this._layout[t]=e},nt.getLayout=function(t){return this._layout[t]},nt.getItemLayout=function(t){return this._itemLayouts[t]},nt.setItemLayout=function(t,e,r){this._itemLayouts[t]=r?et(this._itemLayouts[t]||{},e):e},nt.clearItemLayouts=function(){this._itemLayouts.length=0},nt.getItemVisual=function(t,e,r){var a=this._itemVisuals[t],i=a&&a[e];return i==null&&!r?this.getVisual(e):i},nt.setItemVisual=function(t,e,r){var a=this._itemVisuals[t]||{},i=this.hasItemVisual;if(this._itemVisuals[t]=a,Lu(e)){for(var n in e)e.hasOwnProperty(n)&&(a[n]=e[n],i[n]=!0);return}a[e]=r,i[e]=!0},nt.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var E2=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};nt.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(E2,e)),this._graphicEls[t]=e},nt.getItemGraphicEl=function(t){return this._graphicEls[t]},nt.eachItemGraphicEl=function(t,e){M(this._graphicEls,function(r,a){r&&t&&t.call(e,r,a)})},nt.cloneShallow=function(t){if(!t){var e=V(this.dimensions,this.getDimensionInfo,this);t=new fe(e,this.hostModel)}if(t._storage=this._storage,z_(t,this),this._indices){var r=this._indices.constructor;t._indices=new r(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?hs:us,t},nt.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(on(arguments)))})},nt.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],nt.CHANGABLE_METHODS=["filterSelf","selectRange"];function F_(t,e,r){Tr.isInstance(e)||(e=Tr.seriesDataToSource(e)),r=r||{},t=(t||[]).slice();for(var a=(r.dimsDef||[]).slice(),i=ht(),n=ht(),o=[],s=R2(e,t,a,r.dimCount),l=0;l=e[0]&&t<=e[1]},jt.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},jt.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},jt.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},jt.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},jt.prototype.getExtent=function(){return this._extent.slice()},jt.prototype.setExtent=function(t,e){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(e)||(r[1]=e)},jt.prototype.isBlank=function(){return this._isBlank},jt.prototype.setBlank=function(t){this._isBlank=t},jt.prototype.getLabel=null,Lo(jt),kl(jt,{registerWhenExtend:!0});function cs(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}cs.createByAxisModel=function(t){var e=t.option,r=e.data,a=r&&V(r,V2);return new cs({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})};var $_=cs.prototype;$_.getOrdinal=function(t){return Z_(this).get(t)},$_.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=Z_(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 Z_(t){return t._map||(t._map=ht(t.categories))}function V2(t){return lt(t)&&t.value!=null?t.value:t+""}var Xv=jt.prototype,qv=jt.extend({type:"ordinal",init:function(t,e){(!t||z(t))&&(t=new cs({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),Xv.contain.call(this,t)&&this._ordinalMeta.categories[t]!=null},normalize:function(t){return Xv.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Xv.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:ce,niceExtent:ce});qv.create=function(){return new qv};var Y_=re;function G2(t,e,r,a){var i={},n=t[1]-t[0],o=i.interval=iv(n/e,!0);r!=null&&oa&&(o=i.interval=a);var s=i.intervalPrecision=X_(o),l=i.niceTickExtent=[Y_(Math.ceil(t[0]/o)*o,s),Y_(Math.floor(t[1]/o)*o,s)];return K_(l,t),i}function X_(t){return nu(t)+2}function q_(t,e,r){t[e]=Math.max(Math.min(t[e],r[1]),r[0])}function K_(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),q_(t,0,e),q_(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var On=re,Ur=jt.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]),Ur.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=X_(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(On(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 td(t){var e=F2(t),r=[];return M(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=H(a.get("barWidth"),s),g=H(a.get("barMaxWidth"),s),p=H(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:Jv(n),stackId:Qv(a)})}),J_(r)}function J_(t){var e={};M(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 M(e,function(a,i){r[i]={};var n=a.stacks,o=a.bandWidth,s=H(a.categoryGap,o),l=H(a.gap,1),u=a.remainedWidth,h=a.autoWidthCount,f=(u-s)/(h+(h-1)*l);f=Math.max(f,0),M(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;M(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;M(n,function(g,p){r[i][p]=r[i][p]||{bandWidth:o,offset:d,width:g.width},d+=g.width*(1+l)})}),r}function t1(t,e,r){if(t&&e){var a=t[Jv(e)];return a!=null&&r!=null&&(a=a[Qv(r)]),a}}function e1(t,e){var r=Q_(t,e),a=td(r),i={};M(r,function(n){var o=n.getData(),s=n.coordinateSystem,l=s.getBaseAxis(),u=Qv(n),h=a[Jv(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=fa(o,g),y=v.isHorizontal(),_=i1(l,v,m),w=0,b=o.count();w=0?"p":"n",I=_;m&&(i[u][S]||(i[u][S]={p:_,n:_}),I=i[u][S][D]);var L,P,R,E;if(y){var Z=s.dataToPoint([A,S]);L=I,P=Z[1]+f,R=Z[0]-_,E=c,Math.abs(R)j_||(h=j_),{progress:f};function f(c,v){for(var d=c.count,g=new jv(d*2),p=new jv(d*2),m=new jv(d),y,_=[],w=[],b=0,A=0;(y=c.next())!=null;)w[u]=v.get(o,y),w[1-u]=v.get(s,y),_=r.dataToPoint(w,null,_),p[b]=l?a.x+a.width:_[0],g[b++]=_[0],p[b]=l?_[1]:a.y+a.height,g[b++]=_[1],m[A++]=y;v.setLayout({largePoints:g,largeDataIndices:m,largeBackgroundPoints:p,barWidth:h,valueAxisStart:i1(i,n,!1),backgroundStart:l?a.x:a.y,valueAxisHorizontal:l})}}};function r1(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function a1(t){return t.pipelineContext&&t.pipelineContext.large}function i1(t,e,r){return e.toGlobalCoord(e.dataToCoord(e.type==="log"?1:0))}var U2=Ur.prototype,n1=Math.ceil,o1=Math.floor,Nn=1e3,kn=Nn*60,vs=kn*60,Ht=vs*24,$2=function(t,e,r,a){for(;r>>1;t[i][1]r&&(n=r);var o=rd.length,s=$2(rd,n,0,o),l=rd[Math.min(s,o-1)],u=l[1];if(l[0]==="year"){var h=i/u,f=iv(h/t,!0);u*=f}var c=this.getSetting("useUTC")?0:new Date(+a[0]||+a[1]).getTimezoneOffset()*60*1e3,v=[Math.round(n1((a[0]-c)/u)*u+c),Math.round(o1((a[1]-c)/u)*u+c)];K_(v,a),this._stepLvl=l,this._interval=u,this._niceExtent=v},parse:function(t){return+$o(t)}});M(["contain","normalize"],function(t){ed.prototype[t]=function(e){return U2[t].call(this,this.parse(e))}});var rd=[["hh:mm:ss",Nn],["hh:mm:ss",Nn*5],["hh:mm:ss",Nn*10],["hh:mm:ss",Nn*15],["hh:mm:ss",Nn*30],[`hh:mm MM-dd`,kn],[`hh:mm MM-dd`,kn*5],[`hh:mm MM-dd`,kn*10],[`hh:mm MM-dd`,kn*15],[`hh:mm MM-dd`,kn*30],[`hh:mm MM-dd`,vs],[`hh:mm MM-dd`,vs*2],[`hh:mm MM-dd`,vs*6],[`hh:mm MM-dd`,vs*12],[`MM-dd yyyy`,Ht],[`MM-dd yyyy`,Ht*2],[`MM-dd yyyy`,Ht*3],[`MM-dd yyyy`,Ht*4],[`MM-dd yyyy`,Ht*5],[`MM-dd yyyy`,Ht*6],["week",Ht*7],[`MM-dd yyyy`,Ht*10],["week",Ht*14],["week",Ht*21],["month",Ht*31],["week",Ht*42],["month",Ht*62],["week",Ht*70],["quarter",Ht*95],["month",Ht*31*4],["month",Ht*31*5],["half-year",Ht*380/2],["month",Ht*31*8],["month",Ht*31*10],["year",Ht*380]];ed.create=function(t){return new ed({useUTC:t.ecModel.get("useUTC")})};var Ou=jt.prototype,ds=Ur.prototype,Z2=nu,Y2=re,X2=Math.floor,q2=Math.ceil,Nu=Math.pow,$r=Math.log,ku=jt.extend({type:"log",base:10,$constructor:function(){jt.apply(this,arguments),this._originalScale=new Ur},getTicks:function(t){var e=this._originalScale,r=this._extent,a=e.getExtent();return V(ds.getTicks.call(this,t),function(i){var n=re(Nu(this.base,i));return n=i===r[0]&&e.__fixMin?zu(n,a[0]):n,n=i===r[1]&&e.__fixMax?zu(n,a[1]):n,n},this)},getMinorTicks:ds.getMinorTicks,getLabel:ds.getLabel,scale:function(t){return t=Ou.scale.call(this,t),Nu(this.base,t)},setExtent:function(t,e){var r=this.base;t=$r(t)/$r(r),e=$r(e)/$r(r),ds.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Ou.getExtent.call(this);e[0]=Nu(t,e[0]),e[1]=Nu(t,e[1]);var r=this._originalScale,a=r.getExtent();return r.__fixMin&&(e[0]=zu(e[0],a[0])),r.__fixMax&&(e[1]=zu(e[1],a[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=$r(t[0])/$r(e),t[1]=$r(t[1])/$r(e),Ou.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=yy(r),i=t/r*a;for(i<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var n=[re(q2(e[0]/a)*a),re(X2(e[1]/a)*a)];this._interval=a,this._niceExtent=n}},niceExtent:function(t){ds.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});M(["contain","normalize"],function(t){ku.prototype[t]=function(e){return e=$r(e)/$r(this.base),Ou[t].call(this,e)}}),ku.create=function(){return new ku};function zu(t,e){return Y2(t,Z2(e))}function s1(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"),z(s)||(s=[s||0,s||0]),typeof s[0]=="boolean"&&(T&&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]=H(s[0],1),s[1]=H(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(po(a)||po(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=Q_("bar",f),v;if(M(c,function(p){v|=p.getBaseAxis()===e.axis}),v){var d=td(c),g=K2(a,i,e,d);a=g.min,i=g.max}}return{extent:[a,i],fixMin:u,fixMax:h}}function K2(t,e,r,a){var i=r.axis.getExtent(),n=i[1]-i[0],o=t1(a,r.axis);if(o===void 0)return{min:t,max:e};var s=1/0;M(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;M(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 Fa(t,e){var r=s1(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 zn(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new qv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ur;default:return(jt.getClass(e)||Ur).create(t)}}function j2(t){var e=t.scale.getExtent(),r=e[0],a=e[1];return!(r>0&&a>0||r<0&&a<0)}function gs(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(ad(t,a),i)}:function(a){return t.scale.getLabel(a)}}function ad(t,e){return t.type==="category"?t.scale.getLabel(e):e}function Q2(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=gs(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 od=function(t,e){return dL(t),V(ee(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"&&M(n,function(l){l[0]&&o.push({type:"polygon",exterior:l[0],interiors:l.slice(1)})});var s=new ps(a[e||"name"],o,a.cp);return s.properties=a,s})},ms=Pe();function gL(t){return t.type==="category"?mL(t):_L(t)}function pL(t,e){return t.type==="category"?yL(t,e):{ticks:t.scale.getTicks()}}function mL(t){var e=t.getLabelModel(),r=f1(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r}function f1(t,e){var r=c1(t,"labels"),a=id(e),i=v1(r,a);if(i)return i;var n,o;return se(a)?n=p1(t,a):(o=a==="auto"?xL(t):a,n=g1(t,o)),d1(r,a,{labels:n,labelCategoryInterval:o})}function yL(t,e){var r=c1(t,"ticks"),a=id(e),i=v1(r,a);if(i)return i;var n,o;if((!e.get("show")||t.scale.isBlank())&&(n=[]),se(a))n=p1(t,a,!0);else if(a==="auto"){var s=f1(t,t.getLabelModel());o=s.labelCategoryInterval,n=V(s.labels,function(l){return l.tickValue})}else o=a,n=g1(t,o,!0);return d1(r,a,{ticks:n,tickCategoryInterval:o})}function _L(t){var e=t.scale.getTicks(),r=gs(t);return{labels:V(e,function(a,i){return{formattedLabel:r(a,i),rawLabel:t.scale.getLabel(a),tickValue:a}})}}function c1(t,e){return ms(t)[e]||(ms(t)[e]=[])}function v1(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=Rr(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))),w=ms(t.model),b=t.getExtent(),A=w.lastAutoInterval,S=w.lastTickCount;return A!=null&&S!=null&&Math.abs(A-_)<=1&&Math.abs(S-o)<=1&&A>_&&w.axisExtend0===b[0]&&w.axisExtend1===b[1]?_=A:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtend0=b[0],w.axisExtend1=b[1]),_}function bL(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 g1(t,e,r){var a=gs(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=l1(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 p1(t,e,r){var a=t.scale,i=gs(t),n=[];return M(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 m1=[0,1],Qt=function(t,e,r){this.dim=t,this.scale=e,this._extent=r||[0,0],this.inverse=!1,this.onBand=!1};Qt.prototype={constructor:Qt,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 tv(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(),y1(r,a.count())),Nt(t,m1,r,e)},coordToData:function(t,e){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),y1(r,a.count()));var i=Nt(t,r,m1,e);return this.scale.scale(i)},pointToData:function(t,e){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),r=pL(this,e),a=r.ticks,i=V(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this),n=e.get("alignWithLabel");return SL(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=V(r,function(i){return V(i,function(n){return{coord:this.dataToCoord(n),tickValue:n}},this)},this);return a},getViewLabels:function(){return gL(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 wL(this)}};function y1(t,e){var r=t[1]-t[0],a=e,i=r/a/2;t[0]+=i,t[1]-=i}function SL(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;M(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=re(v),d=re(d),f?v>d:v0?r=a[0]:a[1]<0&&(r=a[1]),r}function hd(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 RL(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 OL=function(t,e,r,a,i,n,o,s){for(var l=RL(t,e),u=[],h=[],f=[],c=[],v=[],d=[],g=[],p=ud(i,e,o),m=ud(n,t,s),y=0;y=i||c<0)break;if(va(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;Vu(fr,g),fr[p]=g[p]+m,Vu(cr,d),cr[p]=d[p]-m,t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1])}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function kL(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(va(d)){if(h){c+=n;continue}break}if(c===r)t[n>0?"moveTo":"lineTo"](d[0],d[1]),Vu(fr,d);else if(l>0){var g=c+n,y=e[g];if(h)for(;y&&va(e[g]);)g+=n,y=e[g];var p=.5,m=e[f],y=e[g];if(!y||va(y))Vu(cr,d);else{va(y)&&!h&&(y=d),Jr(fd,y,m);var _,w;if(u==="x"||u==="y"){var b=u==="x"?0:1;_=Math.abs(d[b]-m[b]),w=Math.abs(d[b]-y[b])}else _=ta(d,m),w=ta(d,y);p=w/(w+_),T1(cr,d,fd,-l*(1-p))}S1(fr,fr,s),A1(fr,fr,o),S1(cr,cr,s),A1(cr,cr,o),t.bezierCurveTo(fr[0],fr[1],cr[0],cr[1],d[0],d[1]),T1(fr,d,fd,l*p)}else t.lineTo(d[0],d[1]);f=c,c+=n}return v}function vd(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 zL=pt.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Wc(pt.prototype.brush),buildPath:function(t,e){var r=e.points,a=0,i=r.length,n=vd(r,e.smoothConstraint);if(e.connectNulls){for(;i>0&&va(r[i-1]);i--);for(;a0&&va(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){T&&console.warn("Visual map on line style only support x or y dimension.");return}var u=e.getAxis(a),h=V(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";M(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 pi(0,0,0,0,h,!0);return m[a]=d,m[a+"2"]=g,m}}function GL(t,e,r){var a=t.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=r.getAxesByScale("ordinal")[0];if(!!n&&!(i&&HL(n,e))){var o=e.mapDimension(n.dim),s={};return M(n.getViewLabels(),function(l){s[l.tickValue]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function HL(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 E1(t,e,r){if(t.type==="cartesian2d"){var a=t.getBaseAxis().isHorizontal(),i=D1(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 M1(t,e,r)}ue.extend({type:"line",init:function(){var t=new q,e=new Bn;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=ud(a,n,m),_=BL(a,n,y),w=t.get("showSymbol"),b=w&&!u&&GL(t,n,a),A=this._data;A&&A.eachItemGraphicEl(function(E,Z){E.__temp&&(i.remove(E),A.setItemGraphicEl(Z,null))}),w||f.remove(),i.add(d);var S=!u&&t.get("step"),D;a&&a.getArea&&t.get("clip",!0)&&(D=a.getArea(),D.width!=null?(D.x-=.1,D.y-=.1,D.width+=.2,D.height+=.2):D.r0&&(D.r0-=.5,D.r1+=.5)),this._clipShapeForSymbol=D,c&&h.type===a.type&&S===this._step?(p&&!v?v=this._newPolygon(l,_,a,g):v&&!p&&(d.remove(v),v=this._polygon=null),d.setClipPath(E1(a,!1,t)),w&&f.updateData(n,{isIgnore:b,clipShape:D}),n.eachItemGraphicEl(function(E){E.stopAnimation(!0)}),(!I1(this._stackedOnPoints,_)||!I1(this._points,l))&&(g?this._updateAnimation(n,_,a,r,S,m):(S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c.setShape({points:l}),v&&v.setShape({points:l,stackedOnPoints:_})))):(w&&f.updateData(n,{isIgnore:b,clipShape:D}),S&&(l=Ua(l,a,S),_=Ua(_,a,S)),c=this._newPolyline(l,a,g),p&&(v=this._newPolygon(l,_,a,g)),d.setClipPath(E1(a,!0,t)));var I=VL(n,a)||n.getVisual("color");c.useStyle(J(o.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"}));var L=t.get("smooth");if(L=P1(t.get("smooth")),c.setShape({smooth:L,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),v){var P=n.getCalculationInfo("stackedOnSeries"),R=0;v.useStyle(J(s.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel"})),P&&(R=P1(P.get("smooth"))),v.setShape({smooth:L,stackedOnSmooth:R,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=n,this._coordSys=a,this._stackedOnPoints=_,this._points=l,this._step=S,this._valueOrigin=m},dispose:function(){},highlight:function(t,e,r,a){var i=t.getData(),n=Rl(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 ue.prototype.highlight.call(this,t,e,r,a)},downplay:function(t,e,r,a){var i=t.getData(),n=Rl(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 ue.prototype.downplay.call(this,t,e,r,a)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new zL({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 C1({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=OL(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=Ua(u.current,r,i),f=Ua(u.stackedOnCurrent,r,i),c=Ua(u.next,r,i),v=Ua(u.stackedOnNext,r,i)),L1(h,c)>3e3||s&&L1(f,v)>3e3){o.setShape({points:c}),s&&s.setShape({points:c,stackedOnPoints:v});return}o.shape.__points=u.current,o.shape.points=h,ft(o,{shape:{points:c}},l),s&&(s.setShape({points:h,stackedOnPoints:f}),ft(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=FL[n]:typeof n=="function"&&(c=n),c&&e.setData(i.downSample(i.mapDimension(l.dim),1/f,c,WL))}}}}};function $L(t){return this._axes[t]}var Hu=function(t){this._axes={},this._dimList=[],this.name=t||""};Hu.prototype={constructor:Hu,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return V(this._dimList,$L,this)},getAxesByScale:function(t){return t=t.toLowerCase(),ee(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},It(Fu,Qt);var R1={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)"]}}},$a={};$a.categoryAxis=ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},R1),$a.valueAxis=ut({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},R1),$a.timeAxis=J({scale:!0,min:"dataMin",max:"dataMax"},$a.valueAxis),$a.logAxis=J({scale:!0,logBase:10},$a.valueAxis);var ZL=["value","category","time","log"],Gn=function(t,e,r,a){M(ZL,function(i){e.extend({type:t+"Axis."+i,mergeDefaultAndTheme:function(n,o){var s=this.layoutMode,l=s?Cn(n):{},u=o.getTheme();ut(n,u.get(i+"Axis")),ut(n,this.getDefaultOption()),n.type=r(t,n),s&&za(n,l,s)},optionUpdated:function(){var n=this.option;n.type==="category"&&(this.__ordinalMeta=cs.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:go([{},$a[i+"Axis"],a],!0)})}),wt.registerSubTypeDefaulter(t+"Axis",ot(r,t))},Hn=wt.extend({type:"cartesian2dAxis",axis:null,init:function(){Hn.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Hn.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Hn.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function O1(t,e){return e.type||(e.data?"category":"value")}ut(Hn.prototype,Di);var N1={offset:0};Gn("x",Hn,O1,N1),Gn("y",Hn,O1,N1),wt.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 dd(t,e,r){return t.getCoordSysModel()===e}function Fn(t,e,r){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,r),this.model=t}var Ce=Fn.prototype;Ce.type="grid",Ce.axisPointerEnabled=!0,Ce.getRect=function(){return this._rect},Ce.update=function(t,e){var r=this._axesMap;this._updateScale(t,this.model),M(r.x,function(i){Fa(i.scale,i.model)}),M(r.y,function(i){Fa(i.scale,i.model)});var a={};M(r.x,function(i){k1(r,"y",i,a)}),M(r.y,function(i){k1(r,"x",i,a)}),this.resize(this.model,e)};function k1(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)z1(i[l])&&(n=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&z1(i[u])&&!a[h(i[u])]){n=i[u];break}n&&(a[h(n)]=!0);function h(f){return f.dim+"_"+f.index}}function z1(t){return t&&t.type!=="category"&&t.type!=="time"&&j2(t)}Ce.resize=function(t,e,r){var a=qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var i=this._axesList;n(),!r&&t.get("containLabel")&&(M(i,function(o){if(!o.model.get("axisLabel.inside")){var s=Q2(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(){M(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]),YL(o,s?a.x:a.y)})}},Ce.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]}},Ce.getAxes=function(){return this._axesList.slice()},Ce.getCartesian=function(t,e){if(t!=null&&e!=null){var r="x"+t+"y"+e;return this._coordsMap[r]}lt(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,$1(a)?t.labelOffset+i*o:0],h,f=e.get("nameRotate");f!=null&&(f=f*Za/180);var c;$1(a)?h=F1(t.rotation,f??t.rotation,i):(h=qL(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=Ut(t.nameTruncateMaxWidth,d.maxWidth,c),m=g!=null&&p!=null?Sy(r,p,v,g,{minChar:2,placeholder:d.placeholder}):r,y=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:r,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new dt({anid:"name",__fullText:r,__truncatedText:m,position:u,rotation:h.rotation,silent:W1(e),z2:1,tooltip:y&&y.show?et({content:r,formatter:function(){return r},formatterParams:w},y):null});$t(b.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")&&(b.eventData=H1(e),b.eventData.targetType="axisName",b.eventData.name=r),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},H1=ze.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},F1=ze.innerTextLayout=function(t,e,r){var a=rv(e-t),i,n;return Uo(a)?(n=r>0?"top":"bottom",i="center"):Uo(a-Za)?(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 qL(t,e,r,a){var i=rv(r-t.rotation),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Uo(i-Za/2)?(o=l?"bottom":"top",n="center"):Uo(i-Za*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iZa/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}var W1=ze.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function KL(t,e,r){if(!l1(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?(vr(n),vr(u)):U1(n,o)&&(a?(vr(o),vr(h)):(vr(n),vr(u))),i===!1?(vr(s),vr(f)):U1(l,s)&&(i?(vr(l),vr(c)):(vr(s),vr(f)))}}function vr(t){t&&(t.ignore=!0)}function U1(t,e,r){var a=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(!(!a||!i)){var n=fn([]);return aa(n,n,-t.rotation),a.applyTransform(Sa([],n,t.getLocalTransform())),i.applyTransform(Sa([],n,e.getLocalTransform())),a.intersect(i)}}function $1(t){return t==="middle"||t==="center"}function Z1(t,e,r,a,i){for(var n=[],o=[],s=[],l=0;l=0||t===e}function nP(t){var e=md(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=yd(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 Q1(t,e,r,a,i,n,o){var s=r.getModel("label"),l=r.getModel("emphasis.label");Fe(t,e,s,l,{labelFetcher:i,labelDataIndex:n,defaultText:Bu(i.getData(),n),isRectText:!0,autoColor:a}),J1(t),J1(e)}function J1(t,e){t.textPosition==="outside"&&(t.textPosition=e)}var uP=_n([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),hP={getBarItemStyle:function(t){var e=uP(this,t);if(this.getBorderLineDash){var r=this.getBorderLineDash();r&&(e.lineDash=r)}return e}},fP=nr({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 bd(t){return t.startAngle!=null&&t.endAngle!=null&&t.startAngle===t.endAngle}function ox(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(J({stroke:bd(i)?"none":h,fill:bd(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||Q1(t.style,c,a,l,n,r,d),bd(i)&&(c.fill=c.stroke="none"),Ot(t,c)}function dP(t,e){var r=t.get(cP)||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 sx=pt.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 gP(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];Wu[0]=e,Wu[1]=r;for(var u=Wu[a],h=Wu[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 pP(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 mP(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 hx(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 yP(t,e,r){var a=t.type==="polar"?Ar:xt;return new a({shape:hx(e,r,t),silent:!0,z2:0})}Gt(Wr.VISUAL.LAYOUT,ot(e1,"bar")),Gt(Wr.VISUAL.PROGRESSIVE_LAYOUT,W2),Rt({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var Un=function(t,e,r){e=z(e)&&{coordDimensions:e}||et({},e);var a=t.getSource(),i=En(a,e),n=new fe(i,t);return n.initData(a,r),n},Sd={updateSelectedMap:function(t){this._targetList=z(t)?t.slice():[],this._selectTargetMap=an(t||[],function(e,r){return e.set(r.name,r),e},ht())},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 ws(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 $u=Mu({type:"series.pie",init:function(t){$u.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){$u.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(vv,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}}}),vx=function(t,e){M(e,function(r){r.update="updateView",mt(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}})})},Zu=function(t){return{getTargetSeries:function(e){var r={},a=ht();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)}})}}},xP=Math.PI/180;function dx(t,e,r,a,i,n,o,s,l,u){t.sort(function(w,b){return w.y-b.y});function h(w,b,A,S){for(var D=w;Dl+o);D++)if(t[D].y+=A,D>w&&D+1t[D].y+t[D].height){f(D,A/2);return}f(b-1,A/2)}function f(w,b){for(var A=w;A>=0&&!(t[A].y-b0&&t[A].y>t[A-1].y+t[A-1].height));A--);}function c(w,b,A,S,D,I){for(var L=(I>0,b?Number.MAX_VALUE:0),P=0,R=w.length;P=L&&($=L-10),!b&&$<=L&&($=L+10),w[P].x=A+$*I,L=$}}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 wP(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":L>0?"left":"right"}var Et,ie=g.get("rotate");typeof ie=="number"?Et=ie*(Math.PI/180):Et=ie?L<0?-I+Math.PI:-I:0,h=!!Et,v.label={x:R,y:E,position:p,height:X.height,len:S,len2:D,linePoints:Z,textAlign:W,verticalAlign:"middle",rotation:Et,inside:K,labelDistance:m,labelAlignTo:y,labelMargin:_,bleedMargin:w,textRect:X,text:$,font:b},K||s.push(v.label)}}),!h&&t.get("avoidLabelOverlap")&&wP(s,l,u,e,r,a,i,n)},Yu=Math.PI*2,px=Math.PI/180;function SP(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}var AP=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.getData(),o=n.mapDimension("value"),s=SP(i,r),l=i.get("center"),u=i.get("radius");z(u)||(u=[0,u]),z(l)||(l=[l,l]);var h=H(s.width,r.getWidth()),f=H(s.height,r.getHeight()),c=Math.min(h,f),v=H(l[0],h)+s.x,d=H(l[1],f)+s.y,g=H(u[0],c/2),p=H(u[1],c/2),m=-i.get("startAngle")*px,y=i.get("minAngle")*px,_=0;n.each(o,function(W){!isNaN(W)&&_++});var w=n.getSum(o),b=Math.PI/(w||_)*2,A=i.get("clockwise"),S=i.get("roseType"),D=i.get("stillShowZeroSum"),I=n.getDataExtent(o);I[0]=0;var L=Yu,P=0,R=m,E=A?1:-1;if(n.each(o,function(W,$){var X;if(isNaN(W)){n.setItemLayout($,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:A,cx:v,cy:d,r0:g,r:S?NaN:p,viewRect:s});return}S!=="area"?X=w===0&&D?b:W*b:X=Yu/_,X=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 mx(){this.group=new q}var Ya=mx.prototype;Ya.isPersistent=function(){return!this._incremental},Ya.updateData=function(t,e){this.group.removeAll();var r=new Cd({rectHover:!0,cursor:"default"});r.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(r,t,!1,e),this.group.add(r),this._incremental=null},Ya.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)})}},Ya.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ya.incrementalUpdate=function(t,e,r){var a;this._incremental?(a=new Cd,this._incremental.addDisplayable(a,!0)):(a=new Cd({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)},Ya._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=Ye(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))}))},Ya.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ya._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},ke({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=ys().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 mx:new Bn,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(){}}),Rt(Ii("scatter","circle")),Gt(ys("scatter"));function yx(t,e,r){Qt.call(this,t,e,r),this.type="value",this.angle=0,this.name="",this.model}It(yx,Qt);function Zr(t,e,r){this._model=t,this.dimensions=[],this._indicatorAxes=V(t.getIndicatorModels(),function(a,i){var n="indicator_"+i,o=new yx(n,a.get("axisType")==="log"?new ku:new Ur);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}Zr.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Zr.prototype.dataToPoint=function(t,e){var r=this._indicatorAxes[e];return this.coordToPoint(r.dataToCoord(t),e)},Zr.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]},Zr.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=re(d-v*i);h.setExtent(g,d),h.setInterval(v)}})},Zr.dimensions=[],Zr.create=function(t,e){var r=[];return t.eachComponent("radar",function(a){var i=new Zr(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},_e.register("radar",Zr);var Ss=$a.valueAxis;function Xu(t,e){return J({show:e},t)}var U5=Ze({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=V(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=J({color:v.color},s)),v=ut(rt(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=et(new _t(v,null,this.ecModel),Di);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:ut({lineStyle:{color:"#bbb"}},Ss.axisLine),axisLabel:Xu(Ss.axisLabel,!1),axisTick:Xu(Ss.axisTick,!1),axisType:"interval",splitLine:Xu(Ss.splitLine,!0),splitArea:Xu(Ss.splitArea,!0),indicator:[]}}),TP=["axisLine","axisTickLabel","axisName"];he({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=V(r,function(i){var n=new ze(i.model,{position:[e.cx,e.cy],rotation:i.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return n});M(a,function(i){M(TP,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=z(h)?h:[h],f=z(f)?f:[f];var c=[],v=[];function d(P,R,E){var Z=E%R.length;return P[Z]=P[Z]||[],Z}if(a==="circle")for(var g=r[0].getTicksCoords(),p=e.cx,m=e.cy,y=0;y"+V(a,function(n,o){var s=e.get(e.mapDimension(n.dim),t);return kt(n.name+" : "+s)}).join("
")},getTooltipPosition:function(t){if(t!=null){for(var e=this.getData(),r=this.coordinateSystem,a=e.getValues(V(r.dimensions,function(s){return e.mapDimension(s)}),t,!0),i=0,n=a.length;i"+kt(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"}});Dt(HP,Sd);var Dx="\0_ec_interaction_mutex";function FP(t,e,r){var a=Md(t);a[e]=r}function WP(t,e,r){var a=Md(t),i=a[e];i===r&&(a[e]=null)}function Mx(t,e){return!!Md(t)[e]}function Md(t){return t[Dx]||(t[Dx]={})}mt({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});function Yn(t){this.pointerChecker,this._zr=t,this._opt={};var e=it,r=e(UP,this),a=e($P,this),i=e(ZP,this),n=e(YP,this),o=e(XP,this);le.call(this),this.setPointerChecker=function(s){this.pointerChecker=s},this.enable=function(s,l){this.disable(),this._opt=J(rt(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}}Dt(Yn,le);function UP(t){if(!(xm(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 $P(t){if(!(!this._dragging||!qu("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||Mx(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&&oi(t.event),Ix(this,"pan","moveOnMouseMove",t,{dx:n,dy:o,oldX:a,oldY:i,newX:e,newY:r})}}function ZP(t){xm(t)||(this._dragging=!1)}function YP(t){var e=qu("zoomOnMouseWheel",t,this._opt),r=qu("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;Id(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);Id(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:n,originY:o})}}}function XP(t){if(!Mx(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Id(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function Id(t,e,r,a,i){t.pointerChecker&&t.pointerChecker(a,i.originX,i.originY)&&(oi(a.event),Ix(t,e,r,a,i))}function Ix(t,e,r,a,i){i.isAvailableBehavior=it(qu,null,r,a),t.trigger(e,i)}function qu(t,e,r){var a=r[t];return!t||a&&(!Lt(a)||e.event[a+"Key"])}function Ld(t,e,r){var a=t.target,i=a.position;i[0]+=e,i[1]+=r,a.dirty()}function Pd(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 qP={axisPointer:1,tooltip:1,brush:1};function Ku(t,e,r){var a=e.getComponentByElement(t.topTarget),i=a&&a.coordinateSystem;return a&&a!==r&&!qP[a.mainType]&&i&&i.model!==r}function Lx(t){var e=t.getItemStyle(),r=t.get("areaColor");return r!=null&&(e.fill=r),e}function KP(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:V(o.__regions,function(l){return{name:l.name,from:i.uid}})};s[e.mainType+"Id"]=e.id,a.dispatchAction(s),Px(e,r)}}}))}function Px(t,e){e.eachChild(function(r){M(r.__regions,function(a){r.trigger(t.isSelected(a.name)?"emphasis":"normal")})})}function ju(t,e){var r=new q;this.uid=Wo("ec_map_draw"),this._controller=new Yn(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 q),r.add(this._backgroundGroup=new q)}ju.prototype={constructor:ju,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(A){!o&&A.getHostGeoModel()===t&&(o=A.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 _r;v.transform=h.roamTransform,v.decomposeTransform();var d={scale:v.scale,position:v.position};c=v.scale,ft(u,d,t)}var g=h.rawScale,p=h.rawPosition;l.removeAll();var m=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],w=["emphasis","label"],b=ht();M(s.regions,function(A){var S=b.get(A.name)||b.set(A.name,new q),D=new Y0({segmentIgnoreThreshold:1,shape:{paths:[]}});S.add(D);var I=t.getRegionModel(A.name)||t,L=I.getModel(m),P=I.getModel(y),R=Lx(L),E=Lx(P),Z=I.getModel(_),W=I.getModel(w),$;if(o){$=o.indexOfName(A.name);var X=o.getItemVisual($,"color",!0);X&&(R.fill=X)}var K=function(dr){return[dr[0]*g[0]+p[0],dr[1]*g[1]+p[1]]};M(A.geometries,function(dr){if(dr.type==="polygon"){for(var sl=[],Ji=0;Ji=0)&&(bt=t);var Et=new dt({position:K(A.center.slice()),scale:[1/u.scale[0],1/u.scale[1]],z2:10,silent:!0});if(Fe(Et.style,Et.hoverStyle={},Z,W,{labelFetcher:bt,labelDataIndex:ct,defaultText:A.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!f){var ie=[1/c[0],1/c[1]];ft(Et,{scale:ie},t)}S.add(Et)}if(o)o.setItemGraphicEl($,S);else{var I=t.getRegionModel(A.name);D.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:A.name,region:I&&I.option||{}}}var ol=S.__regions||(S.__regions=[]);ol.push(A),S.highDownSilentOnTouch=!!t.get("selectedMode"),Ot(S,E),l.add(S)}),this._updateController(t,e,r),KP(this,t,l,r,a),Px(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&&M(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,Ld(n,l.dx,l.dy),r.dispatchAction(et(s(),{dx:l.dx,dy:l.dy}))},this),i.off("zoom").on("zoom",function(l){if(this._mouseDownFlag=!1,Pd(n,l.scale,l.originX,l.originY),r.dispatchAction(et(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)&&!Ku(l,r,t)})}};var Ed="__seriesMapHighDown",Ex="__seriesMapCallKey";ke({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 ju(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 Br({style:{fill:t.getData().getVisual("color")},shape:{cx:l[0]+u*9,cy:l[1],r:3},silent:!0,z2:8+(u?0:ko+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=Xt(t.getFormattedLabel(v,"normal"),c),_=Xt(t.getFormattedLabel(v,"emphasis"),y),w=m[Ed],b=Math.random();if(!w){w=m[Ed]={};var A=ot(Rx,!0),S=ot(Rx,!1);m.on("mouseover",A).on("mouseout",S).on("emphasis",A).on("normal",S)}m[Ex]=b,et(w,{recordVersion:b,circle:h,labelModel:g,hoverLabelModel:p,emphasisText:_,normalText:y}),Ox(w,!1)}i.add(h)}}})}});function Rx(t){var e=this[Ed];e&&e.recordVersion===this[Ex]&&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($t({},i,{text:i.get("show")?n:null},{isRectText:!0,useInsideStyle:!1},!0)),r.__mapOriginalZ2=r.z2,r.z2+=ko):($t(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 Rd(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()}}mt({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=Rd(i,t,a.get("scaleLimit"));a.setCenter&&a.setCenter(n.center),a.setZoom&&a.setZoom(n.zoom),r==="series"&&M(a.seriesGroup,function(o){o.setCenter(n.center),o.setZoom(n.zoom)})}})});var Nx=Pt;function Od(){_r.call(this)}Dt(Od,_r);function Xa(t){this.name=t,this.zoomLimit,_r.call(this),this._roamTransformable=new Od,this._rawTransformable=new Od,this._center,this._zoom}Xa.prototype={constructor:Xa,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,r,a){return this._rect=new vt(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 vt(t,e,r,a)},transformTo:function(t,e,r,a){var i=this.getBoundingRect(),n=this._rawTransformable;n.transform=i.calculateTransform(new vt(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=Pt([],a,t),r=Pt([],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(),xo(this.transform||(this.transform=[]),e.transform||Ie()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],cl(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?on(t):Ie(),rawScale:on(e.scale),rawPosition:on(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?Nx(r,t,a):ge(r,t)},pointToData:function(t){var e=this.invTransform;return e?Nx([],t,e):[t[0],t[1]]},convertToPixel:ot(kx,"dataToPoint"),convertFromPixel:ot(kx,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},Dt(Xa,_r);function kx(t,e,r,a){var i=r.seriesModel,n=i?i.coordinateSystem:null;return n===this?n[t](a):null}function Xn(t,e,r,a){Xa.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}Xn.prototype={constructor:Xn,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=qt(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 Vx(t,e){M(e.get("geoCoord"),function(r,a){t.addGeoCoord(a,r)})}var Gx={dimensions:Xn.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=wu.retrieveMap(o);u&&u[0]&&u[0].type==="svg"?(s==null&&(s=1),l=!1):s==null&&(s=.75);var h=new Xn(o+n,o,i.get("nameMap"),l);h.aspectScale=s,h.zoomLimit=i.get("scaleLimit"),r.push(h),Vx(h,i),i.coordinateSystem=h,h.model=i,h.resize=Bx,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)}}),M(a,function(i,n){var o=V(i,function(l){return l.get("nameMap")}),s=new Xn(n,n,go(o));s.zoomLimit=Ut.apply(null,V(i,function(l){return l.get("scaleLimit")})),r.push(s),s.resize=Bx,s.aspectScale=i[0].get("aspectScale"),s.resize(i[0],e),M(i,function(l){l.coordinateSystem=s,Vx(s,l)})}),r},getFilledRegions:function(t,e,r){for(var a=(t||[]).slice(),i=ht(),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 Ei(t,e){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=V(e||[],function(r){return new _t(r,t,t.ecModel)})}Ei.prototype={constructor:Ei,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 kt(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 lE(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 uE(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){cE(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=vE(t,i,t.parentNode.hierNode.defaultAncestor||a[0],e)}function hE(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Wx(t){return arguments.length?t:pE}function Ds(t,e){var r={};return t-=Math.PI/2,r.x=e*Math.cos(t),r.y=e*Math.sin(t),r}function fE(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function cE(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 vE(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=zd(s),n=Bd(n),s&&n;){i=zd(i),o=Bd(o),i.hierNode.ancestor=t;var c=s.hierNode.prelim+f-n.hierNode.prelim-u+a(s,n);c>0&&(gE(dE(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&&!zd(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),n&&!Bd(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-h,r=t)}return r}function zd(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Bd(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function dE(t,e,r){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:r}function gE(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 pE(t,e){return t.parentNode===e.parentNode?1:2}var mE=nr({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=H(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,b||(w=w-Math.PI));var S=b?"left":"right",D=u.labelModel.get("rotate"),I=D*(Math.PI/180);p.setStyle({textPosition:u.labelModel.get("position")||S,textRotation:D==null?-w:I,textOrigin:"center",verticalAlign:"middle"})}yE(i,s,h,r,d,v,g,a,u)}function yE(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 Xl({shape:Vd(l,i,i),style:J({opacity:0,strokeNoScale:!0},l.lineStyle)})),ft(h,{shape:Vd(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 xE=function(t,e){t.eachSeriesByType("tree",function(r){wE(r,e)})};function wE(t,e){var r=fE(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=Wx(function(_,w){return(_.parentNode===w.parentNode?1:2)/_.depth})):(i=r.width,n=r.height,o=Wx());var s=t.getData().tree.root,l=s.children[0];if(l){lE(s),_E(l,uE,o),s.hierNode.modifier=-l.hierNode.prelim,Ms(l,hE);var u=l,h=l,f=l;Ms(l,function(_){var w=_.getLayout().x;wh.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),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=(_.depth-1)*g;var w=Ds(p,m);_.setLayout({x:w.x,y:w.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),Ms(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),Ms(l,function(_){p=(_.getLayout().x+v)*d,m=y==="TB"?(_.depth-1)*g:n-(_.depth-1)*g,_.setLayout({x:p,y:m},!0)}))}}}Rt(Ii("tree","circle")),Gt(xE);function Is(t,e,r){if(t&&yt(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 Gd(t,e){var r=Xx(t);return yt(r,e)>=0}function Hd(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}Vt.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};qx(r);var a=t.levels||[];a=t.levels=bE(a,e);var i=V(a||[],function(s){return new _t(s,this,e)},this),n=Ei.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=z(r)?ka(r[0]):ka(r),i=e.getName(t);return kt(i+": "+a)},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Hd(r,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},et(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),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 qx(t){var e=0;M(t.children,function(a){qx(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}function bE(t,e){var r=e.get("color");if(!!r){t=t||[];var a;if(M(t,function(n){var o=new _t(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 SE=8,Kx=8,Fd=5;function Wd(t){this.group=new q,t.add(this.group)}Wd.prototype={constructor:Wd,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),uu(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+SE*2,e.emptyItemWidth);e.totalWidth+=o+Kx,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=IM(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 Ge({shape:{points:AE(n,0,d,s,f===h.length-1,f===0)},style:J(r.getItemStyle(),{lineJoin:"bevel",text:g,textFill:a.getTextColor(),textFont:a.getFont()}),z:10,onclick:ot(i,v)});this.group.add(p),TE(p,t,v),n+=d+Kx}},remove:function(){this.group.removeAll()}};function AE(t,e,r,a,i,n){var o=[[i?t:t-Fd,e],[t+r,e],[t+r,e+a],[i?t:t-Fd,e+a]];return!n&&o.splice(2,0,[t+r+Fd,e+a/2]),!i&&o.push([t,e+a/2]),o}function TE(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&&Hd(r,e)}}function CE(){var t=[],e={},r;return{add:function(a,i,n,o,s){return Lt(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;iJx||Math.abs(t.dy)>Jx)){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 vt(i.x,i.y,i.width,i.height),o=this.seriesModel.layoutInfo;e-=o.x,r-=o.y;var s=Ie();yr(s,s,[-e,-r]),wo(s,s,[t.scale,t.scale]),yr(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&&Zo(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 Wd(this.group))).render(t,e,r.node,Ju(a,this));function a(i){this._state!=="animating"&&(Gd(t.getViewRoot(),i)?this._rootToNode({node:i}):this._zoomToNode({node:i}))}},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ls(),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 Ls(){return{nodeGroup:[],background:[],content:[]}}function OE(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,w=y&&y.length,b=o.getModel("itemStyle"),A=o.getModel("emphasis.itemStyle"),S=$("nodeGroup",jx);if(!S)return;if(l.add(S),S.attr("position",[h.x||0,h.y||0]),S.__tmNodeWidth=c,S.__tmNodeHeight=v,h.isAboveViewRoot)return S;var D=o.getModel(),I=$("background",Qx,u,EE);if(I&&P(S,I,w&&h.upperLabelHeight),w)tu(S)&&mi(S,!1),I&&(mi(I,!0),f.setItemGraphicEl(o.dataIndex,I));else{var L=$("content",Qx,u,RE);L&&R(S,L),I&&tu(I)&&mi(I,!1),mi(S,!0),f.setItemGraphicEl(o.dataIndex,S)}return S;function P(Q,j,U){if(j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex,j.setShape({x:0,y:0,width:c,height:v}),g)E(j);else{j.invisible=!1;var tt=o.getVisual("borderColor",!0),ct=A.get("borderColor"),bt=tw(b);bt.fill=tt;var Et=Ud(A);if(Et.fill=ct,U){var ie=c-2*d;Z(bt,Et,tt,ie,_,{x:d,y:0,width:ie,height:_})}else bt.text=Et.text=null;j.setStyle(bt),Vo(j,Et)}Q.add(j)}function R(Q,j){j.dataIndex=o.dataIndex,j.seriesIndex=t.seriesIndex;var U=Math.max(c-2*d,0),tt=Math.max(v-2*d,0);if(j.culling=!0,j.setShape({x:d,y:d,width:U,height:tt}),g)E(j);else{j.invisible=!1;var ct=o.getVisual("color",!0),bt=tw(b);bt.fill=ct;var Et=Ud(A);Z(bt,Et,ct,U,tt),j.setStyle(bt),Vo(j,Et)}Q.add(j)}function E(Q){!Q.invisible&&n.push(Q)}function Z(Q,j,U,tt,ct,bt){var Et=D.get("name"),ie=D.getModel(bt?IE:DE),ol=D.getModel(bt?LE:ME),dr=ie.getShallow("show");Fe(Q,j,ie,ol,{defaultText:dr?Et:null,autoColor:U,isRectText:!0,labelFetcher:t,labelDataIndex:o.dataIndex,labelProp:bt?"upperLabel":"label"}),W(Q,bt,h),W(j,bt,h),bt&&(Q.textRect=rt(bt)),Q.truncate=dr&&ie.get("ellipsis")?{outerWidth:tt,outerHeight:ct,minChar:2}:null}function W(Q,j,U){var tt=Q.text;if(!j&&U.isLeafRoot&&tt!=null){var ct=t.get("drillDownIcon",!0);Q.text=ct?ct+" "+tt:tt}}function $(Q,j,U,tt){var ct=m!=null&&r[Q][m],bt=i[Q];return ct?(r[Q][m]=null,X(bt,ct,Q)):g||(ct=new j({z:NE(U,tt)}),ct.__tmDepth=U,ct.__tmStorageName=Q,K(bt,ct,Q)),e[Q][p]=ct}function X(Q,j,U){var tt=Q[p]={};tt.old=U==="nodeGroup"?j.position.slice():et({},j.shape)}function K(Q,j,U){var tt=Q[p]={},ct=o.parentNode;if(ct&&(!a||a.direction==="drillDown")){var bt=0,Et=0,ie=i.background[ct.getRawIndex()];!a&&ie&&ie.old&&(bt=ie.old.width,Et=ie.old.height),tt.old=U==="nodeGroup"?[0,Et]:{x:bt,y:Et,width:0,height:0}}tt.fadein=U!=="nodeGroup"}}function NE(t,e){var r=t*PE+e;return(r-1)/r}for(var kE=function(){},ew=["treemapZoomToNode","treemapRender","treemapMove"],$d=0;$d=0;n--)r[n]==null&&(delete a[e[n]],e.pop())}function Zd(t,e){var r=t.visual,a=[];lt(r)?Ps(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]),iw(t,a)}function eh(t){return{applyVisual:function(e,r,a){e=this.mapValueToVisual(e),a("color",t(r("color"),e))},_doMap:Yd([0,1])}}function aw(t){var e=this.option.visual;return e[Math.round(Nt(t,[0,1],[0,e.length-1],!0))]||{}}function rh(t){return function(e,r,a){a(t,this.mapValueToVisual(e))}}function ah(t){var e=this.option.visual;return e[this.option.loop&&t!==th?t%e.length:t]}function Ri(){return this.option.visual[0]}function Yd(t){return{linear:function(e){return Nt(e,t,this.option.visual,!0)},category:ah,piecewise:function(e,r){var a=Xd.call(this,r);return a==null&&(a=Nt(e,t,this.option.visual,!0)),a},fixed:Ri}}function Xd(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 iw(t,e){return t.visual=e,t.type==="color"&&(t.parsedVisual=V(e,function(r){return Ve(r)})),e}var VE={linear:function(t){return Nt(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 Nt(r,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return e??th},fixed:ce};Mt.listVisualTypes=function(){var t=[];return M(Es,function(e,r){t.push(r)}),t},Mt.addVisualHandler=function(t,e){Es[t]=e},Mt.isValidType=function(t){return Es.hasOwnProperty(t)},Mt.eachVisual=function(t,e,r){lt(t)?M(t,e,r):e.call(r,t)},Mt.mapVisual=function(t,e,r){var a,i=z(t)?[]:lt(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&&Ps(Es,function(a,i){t.hasOwnProperty(i)&&(e[i]=t[i],r=!0)}),r?e:null},Mt.prepareVisualTypes=function(t){if(rw(t)){var e=[];Ps(t,function(r,a){e.push(a)}),t=e}else if(z(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=$E(o,h,p,m,g,n);nw(p,y,r,a,i,n)}})}}}function FE(t,e,r,a){var i=et({},e);return M(["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 ow(t){var e=Kd(t,"color");if(e){var r=Kd(t,"colorAlpha"),a=Kd(t,"colorSaturation");return a&&(e=gn(e,null,null,a)),r&&(e=gl(e,r)),e}}function WE(t,e){return e!=null?gn(e,null,null,t):null}function Kd(t,e){var r=t[e];if(r!=null&&r!=="none")return r}function UE(t,e,r,a,i,n){if(!(!n||!n.length)){var o=jd(e,"color")||i.color!=null&&i.color!=="none"&&(jd(e,"colorAlpha")||jd(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 jd(t,e){var r=t.get(e);return GE(r)&&r.length?{name:e,range:r}:null}function $E(t,e,r,a,i,n){var o=et({},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 Rs=Math.max,nh=Math.min,sw=Ut,Qd=M,lw=["itemStyle","borderWidth"],ZE=["itemStyle","gapWidth"],YE=["upperLabel","show"],XE=["upperLabel","height"],qE={seriesType:"treemap",reset:function(t,e,r,a){var i=r.getWidth(),n=r.getHeight(),o=t.option,s=qt(t.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()}),l=o.size||[],u=H(sw(s.width,l[0]),i),h=H(sw(s.height,l[1]),n),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=Is(a,c,t),d=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,g=t.getViewRoot(),p=Xx(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?eR(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 w={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(w),uw(g,_,!1,0);var w=g.getLayout();Qd(p,function(A,S){var D=(p[S+1]||g).getValue();A.setLayout(et({dataExtent:[D,D],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(rR(s,d,v),!0),t.setLayoutInfo(s),fw(b,new vt(-s.x,-s.y,i,n),p,g,0)}};function uw(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(lw),l=v.get(ZE)/2,u=cw(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=Rs(i-2*f,0),n=Rs(n-f-c,0);var d=i*n,g=KE(t,v,d,e,r,a);if(!!g.length){var p={x:f,y:c,width:i,height:n},m=nh(i,n),y=1/0,_=[];_.area=0;for(var w=0,b=g.length;w=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 tR(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?Rs(u*a/l,l/(u*i)):1/0}function hw(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;fev&&(u=ev),n=s}u=0&&t.call(e,r[i],i)},qe.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)},qe.breadthFirstTraverse=function(t,e,r,a){if(Mr.isInstance(e)||(e=this._nodesMap[qn(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)}}};Dt(Mr,vw("hostGraph","data")),Dt(Ns,vw("hostGraph","edgeData")),Os.Node=Mr,Os.Edge=Ns,Nl(Mr),Nl(Ns);var dw=function(t,e,r,a,i){for(var n=new Os(a),o=0;o "+c)),u++)}var v=r.get("coordinateSystem"),d;if(v==="cartesian2d"||v==="polar")d=ca(t,r);else{var g=_e.get(v),p=g&&g.type!=="view"?g.dimensions||[]:[];yt(p,"value")<0&&p.concat(["value"]);var m=En(t,{coordDimensions:p});d=new fe(m,r),d.initData(t)}var y=new fe(["value"],r);return y.initData(l,s),i&&i(d,y),Hx({mainData:d,struct:n,structAttr:"graph",datas:{node:d,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n},ks=Mu({type:"series.graph",init:function(t){ks.superApply(this,"init",arguments);var e=this;function r(){return e._categoriesData}this.legendVisualProvider=new ws(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ks.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ks.superApply(this,"mergeDefaultAndTheme",arguments),fi(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var r=t.edges||t.links||[],a=t.data||t.nodes||[],i=this;if(a&&r)return dw(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 _t({label:l.option},l.parentModel,e),h=i.getModel("emphasis.edgeLabel"),f=new _t({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=kt(l.join(" > ")),i.value&&(l+=" : "+kt(i.value)),l}else return ks.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=V(this.option.categories||[],function(r){return r.value!=null?r:et({value:0},r)}),e=new fe(["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 ks.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}}}}),gw=ye.prototype,Jd=Xl.prototype;function tg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var aR=nr({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[tg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:gw.buildPath,_buildPathCurve:Jd.buildPath,pointAt:function(t){return this[tg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:gw.pointAt,_pointAtCurve:Jd.pointAt,tangentAt:function(t){var e=this.shape,r=tg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return ln(r,r)},_tangentAtCurve:Jd.tangentAt}),eg=["fromSymbol","toSymbol"];function pw(t){return"_"+t+"Type"}function mw(t,e,r){var a=e.getItemVisual(r,"color"),i=e.getItemVisual(r,t),n=e.getItemVisual(r,t+"Size");if(!(!i||i==="none")){z(n)||(n=[n,n]);var o=Ye(i,-n[0]/2,-n[1]/2,n[0],n[1],a);return o.name=t,o}}function iR(t){var e=new aR({name:"line",subPixelOptimize:!0});return rg(e.shape,t),e}function rg(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 nR(){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=Jr([],u,l);if(ln(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(_),w=[f[1],-f[0]],b=o.pointAt(_);w[1]>0&&(w[0]=-w[0],w[1]=-w[1]);var A=f[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var S=-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*A+l[0],l[1]+D],v=f[0]<0?"right":"left",g=[-m*A,-D];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[b[0],b[1]+D],v="center",g=[0,-D];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*A+u[0],u[1]+D],v=f[0]>=0?"right":"left",g=[m*A,-D];break}a.attr({style:{textVerticalAlign:a.__verticalAlign||d,textAlign:a.__textAlign||v},position:c,scale:[i,i],origin:g})}}}}function zs(t,e,r){q.call(this),this._createLine(t,e,r)}var qa=zs.prototype;qa.beforeUpdate=nR,qa._createLine=function(t,e,r){var a=t.hostModel,i=t.getItemLayout(e),n=iR(i);n.shape.percent=0,Se(n,{shape:{percent:1}},a,e),this.add(n);var o=new dt({name:"label",lineLabelOriginalOpacity:1});this.add(o),M(eg,function(s){var l=mw(s,t,e);this.add(l),this[pw(s)]=t.getItemVisual(e,s)},this),this._updateCommonStl(t,e,r)},qa.updateData=function(t,e,r){var a=t.hostModel,i=this.childOfName("line"),n=t.getItemLayout(e),o={shape:{}};rg(o.shape,n),ft(i,o,a,e),M(eg,function(s){var l=t.getItemVisual(e,s),u=pw(s);if(this[u]!==l){this.remove(this.childOfName(s));var h=mw(s,t,e);this.add(h)}this[u]=l},this),this._updateCommonStl(t,e,r)},qa._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=ni(t.getItemVisual(e,"opacity"),n.opacity,1);i.useStyle(J({strokeNoScale:!0,fill:"none",stroke:h,opacity:f},n)),i.hoverStyle=o,M(eg,function(A){var S=this.childOfName(A);S&&(S.setColor(h),S.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)?re(m):m}var y=c?p:null,_=v?Xt(a.getFormattedLabel(e,"emphasis",t.dataType),p):null,w=d.style;if(y!=null||_!=null){$t(d.style,s,{text:y},{autoColor:g}),d.__textAlign=w.textAlign,d.__verticalAlign=w.textVerticalAlign,d.__position=s.get("position")||"middle";var b=s.get("distance");z(b)||(b=[b,b]),d.__labelDistance=b}_!=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,Ot(this)},qa.highlight=function(){this.trigger("emphasis")},qa.downplay=function(){this.trigger("normal")},qa.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},qa.setLinePoints=function(t){var e=this.childOfName("line");rg(e.shape,t),e.dirty()},It(zs,q);function oh(t){this._ctor=t||zs,this.group=new q}var Oi=oh.prototype;Oi.isPersistent=function(){return!0},Oi.updateData=function(t){var e=this,r=e.group,a=e._lineData;e._lineData=t,a||r.removeAll();var i=yw(t);t.diff(a).add(function(n){oR(e,t,n,i)}).update(function(n,o){sR(e,a,t,o,n,i)}).remove(function(n){r.remove(a.getItemGraphicEl(n))}).execute()};function oR(t,e,r,a){var i=e.getItemLayout(r);if(!!ag(i)){var n=new t._ctor(e,r,a);e.setItemGraphicEl(r,n),t.group.add(n)}}function sR(t,e,r,a,i,n){var o=e.getItemGraphicEl(a);if(!ag(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)}Oi.updateLayout=function(){var t=this._lineData;!t||t.eachItemGraphicEl(function(e,r){e.updateLayout(t,r)},this)},Oi.incrementalPrepareUpdate=function(t){this._seriesScope=yw(t),this._lineData=null,this.group.removeAll()};function lR(t){return t.animators&&t.animators.length>0}Oi.incrementalUpdate=function(t,e){function r(o){!o.isGroup&&!lR(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 lg=function(t,e){var r=[],a=kc,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=[mr(u[0]),mr(u[1])],u[2]&&u.__original.push(mr(u[2])));var c=u.__original;if(u[2]!=null){if(ge(i[0],c[0]),ge(i[1],c[2]),ge(i[2],c[1]),h&&h!=="none"){var v=Vs(s.node1),d=ww(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=Vs(s.node2),d=ww(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]}ge(u[0],i[0]),ge(u[1],i[2]),ge(u[2],i[1])}else{if(ge(n[0],c[0]),ge(n[1],c[1]),Jr(o,n[1],n[0]),ln(o,o),h&&h!=="none"){var v=Vs(s.node1);mo(n[0],n[0],o,v*e)}if(f&&f!=="none"){var v=Vs(s.node2);mo(n[1],n[1],o,-v*e)}ge(u[0],n[0]),ge(u[1],n[1])}})},jn="__focusNodeAdjacency",Qn="__unfocusNodeAdjacency",Ni=["itemStyle","opacity"],sh=["lineStyle","opacity"];function bw(t,e){var r=t.getVisual("opacity");return r??t.getModel().get(e)}function lh(t,e,r){var a=t.getGraphicEl(),i=bw(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 ki(t,e){var r=bw(t,e),a=t.getGraphicEl();a.traverse(function(i){!i.isGroup&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}ke({type:"graph",init:function(t,e){var r=new Bn,a=new oh,i=this.group;this._controller=new Yn(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):ft(s,l,t)}lg(t.getGraph(),Bs(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[jn]&&p.off("mouseover",p[jn]),p[Qn]&&p.off("mouseout",p[Qn]),y.get("focusNodeAdjacency")&&(p.on("mouseover",p[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:p.dataIndex})}),p.on("mouseout",p[Qn]=function(){a._dispatchUnfocus(r)}))},this),u.graph.eachEdge(function(p){var m=p.getGraphicEl();m[jn]&&m.off("mouseover",m[jn]),m[Qn]&&m.off("mouseout",m[Qn]),p.getModel().get("focusNodeAdjacency")&&(m.on("mouseover",m[jn]=function(){a._clearTimer(),r.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:p.dataIndex})}),m.on("mouseout",m[Qn]=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,w=p.getSymbolPath();if(v){var b=u.getItemLayout(m),A=Math.atan2(b[1]-g,b[0]-d);A<0&&(A=Math.PI*2+A);var S=b[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 wR(t,e){var r=t.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=H(r[0],e.getWidth()),s=H(r[1],e.getHeight()),l=H(t.get("radius"),n/2);return{cx:o,cy:s,r:l}}function Dw(t,e){return e&&(typeof e=="string"?t=e.replace("{value}",t??""):typeof e=="function"&&(t=e(t))),t}var bR=Math.PI*2,Z5=ue.extend({type:"gauge",render:function(t,e,r){this.group.removeAll();var a=t.get("axisLine.lineStyle.color"),i=wR(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)%bR,c=u,v=s.get("width"),d=o.get("show"),g=0;d&&g=w&&(b===0?0:a[b-1][0]).4?"bottom":"middle",textAlign:P<-.4?"left":P>.4?"right":"center"},{autoColor:$}),silent:!0}))}if(g.get("show")&&L!==m){for(var X=0;X<=y;X++){var P=Math.cos(b),R=Math.sin(b),K=new ye({shape:{x1:P*f+u,y1:R*f+h,x2:P*(f-w)+u,y2:R*(f-w)+h},silent:!0,style:I});I.stroke==="auto"&&K.setStyle({stroke:a((L+X/y)/m)}),l.add(K),b+=S}b-=S}else b+=A}},_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 xR({shape:{angle:n}});Se(g,{shape:{angle:Nt(c.get(v,d),h,f,!0)}},t),l.add(g),c.setItemGraphicEl(d,g)}).update(function(d,g){var p=u.getItemGraphicEl(g);ft(p,{shape:{angle:Nt(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:H(m.get("width"),i.r),r:H(m.get("length"),i.r)}),d.useStyle(p.getModel("itemStyle").getItemStyle()),d.style.fill==="auto"&&d.setStyle("fill",a(Nt(c.get(v,g),h,[0,1],!0))),Ot(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+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=+t.get("min"),c=+t.get("max"),v=t.getData().get(o,0),d=a(Nt(v,[f,c],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},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+H(l[0],i.r),h=i.cy+H(l[1],i.r),f=H(n.get("width"),i.r),c=H(n.get("height"),i.r),v=t.getData(),d=v.get(v.mapDimension("value"),0),g=a(Nt(d,[o,s],[0,1],!0));this.group.add(new dt({silent:!0,style:$t({},n,{x:u,y:h,text:Dw(d,n.get("formatter")),textWidth:isNaN(f)?null:f,textHeight:isNaN(c)?null:c,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Mw=Mu({type:"series.funnel",init:function(t){Mw.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Un(this,{coordDimensions:["value"],encodeDefaulter:ot(vv,this)})},_defaultLabelLine:function(t){fi(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=Mw.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 hg(t,e){q.call(this);var r=new Ge,a=new ir,i=new dt;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 Iw=hg.prototype,SR=["itemStyle","opacity"];Iw.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(SR);s=s??1,a.useStyle({}),r?(a.setShape({points:o.points}),a.setStyle({opacity:0}),Se(a,{style:{opacity:s}},i,e)):ft(a,{style:{opacity:s},shape:{points:o.points}},i,e);var l=n.getModel("itemStyle"),u=t.getItemVisual(e,"color");a.setStyle(J({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),a.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Ot(this)},Iw._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");ft(r,{shape:{points:s.linePoints||s.linePoints}},i,e),ft(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");Fe(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()},It(hg,q);var Y5=ue.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 hg(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 AR(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function TR(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 fg(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 to(t,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,t))}var cg=M,Lw=Math.min,Pw=Math.max,Ew=Math.floor,PR=Math.ceil,Rw=re,ER=Math.PI;function vg(t,e,r){this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,r)}vg.prototype={type:"parallel",constructor:vg,_init:function(t,e,r){var a=t.dimensions,i=t.parallelAxisIndex;cg(a,function(n,o){var s=i[o],l=e.getComponent("parallelAxis",s),u=this._axesMap.set(n,new hh(n,zn(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();cg(this.dimensions,function(i){var n=this._axesMap.get(i);n.scale.unionExtentFromData(a,a.mapDimension(i)),Fa(n.scale,n.model)},this)}},this)},resize:function(t,e){this._rect=qt(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=fh(t.get("axisExpandWidth"),s),h=fh(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=fh(c[1]-c[0],s),c[1]=c[0]+v;else{v=fh(u*(h-1),s);var d=t.get("axisExpandCenter")||Ew(l/2);c=[u*d-v/2],c[1]=c[0]+v}var g=(o-v)/(l-h);g<3&&(g=0);var p=[Ew(Rw(c[0]/u,1))+1,PR(Rw(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])}),cg(r,function(n,o){var s=(a.axisExpandable?OR:RR)(o,a),l={horizontal:{x:s.position,y:a.axisLength},vertical:{x:0,y:s.position}},u={horizontal:ER/2,vertical:0},h=[l[i].x+t.x,l[i].y+t.y],f=u[i],c=Ie();aa(c,c,f),yr(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=[];M(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?zi(s,a,n,"all"):l="none";else{var i=a[1]-a[0],c=n[1]*o/i;a=[Pw(0,c-i/2)],a[1]=Lw(n[1],a[0]+i),a[0]=a[1]-i}return{axisExpandWindow:a,behavior:l}}};function fh(t,e){return Lw(Pw(t,e[0]),e[1])}function RR(t,e){var r=e.layoutLength/(e.axisCount-1);return{position:r*t,axisNameAvailableWidth:r,axisLabelShow:!0}}function OR(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--)_i(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;aFR}function Fw(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Ww(t,e,r,a){var i=new q;return i.add(new xt({name:"main",style:_g(r),silent:!0,draggable:!0,cursor:"move",drift:Ka(t,e,i,"nswe"),ondragend:Ka(Bi,e,{isEnd:!0})})),Xr(a,function(n){i.add(new xt({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ka(t,e,i,n),ondragend:Ka(Bi,e,{isEnd:!0})}))}),i}function Uw(t,e,r,a){var i=a.brushStyle.lineWidth||0,n=eo(i,WR),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;da(t,e,"main",o,s,d,g),a.transformable&&(da(t,e,"w",l,u,n,m),da(t,e,"e",c,u,n,m),da(t,e,"n",l,u,p,n),da(t,e,"s",l,v,p,n),da(t,e,"nw",l,u,n,n),da(t,e,"ne",c,u,n,n),da(t,e,"sw",l,v,n,n),da(t,e,"se",c,v,n,n))}function yg(t,e){var r=e.__brushOption,a=r.transformable,i=e.childAt(0);i.useStyle(_g(r)),i.attr({silent:!a,cursor:a?"move":"default"}),Xr(["w","e","n","s","se","sw","ne","nw"],function(n){var o=e.childOfName(n),s=xg(t,n);o&&o.attr({silent:!a,invisible:!a,cursor:a?$R[s]+"-resize":null})})}function da(t,e,r,a,i,n,o){var s=e.childOfName(r);s&&s.setShape(tO(wg(t,e,[[a,i],[a+n,i+o]])))}function _g(t){return J({strokeNoScale:!0},t.brushStyle)}function $w(t,e,r,a){var i=[Gs(t,r),Gs(e,a)],n=[eo(t,r),eo(e,a)];return[[i[0],n[0]],[i[1],n[1]]]}function QR(t){return yi(t.group)}function xg(t,e){if(e.length>1){e=e.split("");var r=[xg(t,e[0]),xg(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=jc(a[e],QR(t));return i[r]}}function Zw(t,e,r,a,i,n,o,s){var l=a.__brushOption,u=t(l.range),h=Yw(r,n,o);Xr(i.split(""),function(f){var c=UR[f];u[c[0]][c[1]]+=h[c[0]]}),l.range=e($w(u[0][0],u[1][0],u[0][1],u[1][1])),dg(r,a),Bi(r,{isEnd:!1})}function JR(t,e,r,a,i){var n=e.__brushOption.range,o=Yw(t,r,a);Xr(n,function(s){s[0]+=o[0],s[1]+=o[1]}),dg(t,e),Bi(t,{isEnd:!1})}function Yw(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 wg(t,e,r){var a=Hw(t,e);return a&&a!==!0?a.clipPath(r,t._transform):rt(r)}function tO(t){var e=Gs(t[0][0],t[1][0]),r=Gs(t[0][1],t[1][1]),a=eo(t[0][0],t[1][0]),i=eo(t[0][1],t[1][1]);return{x:e,y:r,width:a-e,height:i-r}}function eO(t,e,r){if(!(!t._brushType||aO(t,e))){var a=t._zr,i=t._covers,n=pg(t,e,r);if(!t._dragging)for(var o=0;oa.getWidth()||r<0||r>a.getHeight()}var ch={lineX:jw(0),lineY:jw(1),rect:{createCover:function(t,e){return Ww(Ka(Zw,function(r){return r},function(r){return r}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Fw(t);return $w(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,r,a){Uw(t,e,r,a)},updateCommon:yg,contain:Sg},polygon:{createCover:function(t,e){var r=new q;return r.add(new ir({name:"main",style:_g(e),silent:!0})),r},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Ge({name:"main",draggable:!0,drift:Ka(JR,t,e),ondragend:Ka(Bi,t,{isEnd:!0})}))},updateCoverShape:function(t,e,r,a){e.childAt(0).setShape({points:wg(t,e,r)})},updateCommon:yg,contain:Sg}};function jw(t){return{createCover:function(e,r){return Ww(Ka(Zw,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=Fw(e),a=Gs(r[0][t],r[1][t]),i=eo(r[0][t],r[1][t]);return[a,i]},updateCoverShape:function(e,r,a,i){var n,o=Hw(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(),Uw(e,r,l,i)},updateCommon:yg,contain:Sg}}function Qw(t){return t=Ag(t),function(e,r){return fy(e,t)}}function Jw(t,e){return t=Ag(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 tb(t,e,r){return t=Ag(t),function(a,i,n){return t.contain(i[0],i[1])&&!Ku(a,e,r)}}function Ag(t){return vt.create(t)}var iO=["axisLine","axisTickLabel","axisName"],nO=he({type:"parallelAxis",init:function(t,e){nO.superApply(this,"init",arguments),(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this))},render:function(t,e,r,a){if(!oO(t,e,a)){this.axisModel=t,this.api=r,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!!t.get("show")){var n=lO(t,e),o=n.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=o.getAxisLayout(u),f=et({strokeContainThreshold:l},h),c=new ze(t,f);M(iO,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(f,s,t,n,l,r);var v=a&&a.animation===!1?null:t;au(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=vt.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:Qw(u),isTargetByCursor:tb(u,n,a),getLinearBrushOtherExtent:Jw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(sO(r))},_onBrush:function(t,e){var r=this.axisModel,a=r.axis,i=V(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 oO(t,e,r){return r&&r.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:r})[0]===t}function sO(t){var e=t.axis;return V(t.activeIntervals,function(r){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(r[0],!0),e.dataToCoord(r[1],!0)]}})}function lO(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}var uO=5;he({type:"parallel",render:function(t,e,r){this._model=t,this._api=r,this._handlers||(this._handlers={},M(hO,function(a,i){r.getZr().on(i,this._handlers[i]=it(a,this))},this)),es(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){M(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(et({type:"parallelAxisExpand"},t))}});var hO={mousedown:function(t){Tg(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Tg(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>uO)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||!Tg(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 Tg(t,e){var r=t._model;return r.get("axisExpandable")&&r.get("axisExpandTriggerOn")===e}we(MR),Vt.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var r=this.getSource();return fO(r,this),ca(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 fO(t,e){if(!t.encodeDefine){var r=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!!r){var a=t.encodeDefine=ht();M(r.dimensions,function(i){var n=cO(i);a.set(i,n)})}}}function cO(t){return+t.replace("dim","")}var eb=.3,X5=ue.extend({type:"parallel",init:function(){this._dataGroup=new q,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=ib(t);n.diff(o).add(h).update(f).remove(c).execute();function h(d){var g=ab(n,i,d,l,s);Cg(g,n,d,u)}function f(d,g){var p=o.getItemGraphicEl(g),m=rb(n,d,l,s);n.setItemGraphicEl(d,p);var y=a&&a.animation===!1?null:t;ft(p,{shape:{points:m}},y,d),Cg(p,n,d,u)}function c(d){var g=o.getItemGraphicEl(d);i.remove(g)}if(!this._initialized){this._initialized=!0;var v=vO(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=ib(e),s=t.start;s=0)n[i[o].depth]=new _t(i[o],this,e);else if(T)throw new Error("levels[i].depth is mandatory and should be natural number");if(a&&r){var s=dw(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),kt(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 kt(n)}return nb.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var r=nb.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}}),ob=["itemStyle","opacity"],Vi=["emphasis","itemStyle","opacity"],sb=["lineStyle","opacity"],vh=["emphasis","lineStyle","opacity"];function lb(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function dh(t,e,r){var a=t.getGraphicEl(),i=lb(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 Ir(t,e){var r=lb(t,e),a=t.getGraphicEl();a.traverse(function(i){i.type!=="group"&&i.setStyle("opacity",r)}),a.highlight&&a.highlight()}var mO=nr({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")}});ke({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 mO;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"),w=c.node2.getLayout(),b=c.node2.getModel(),A=b.get("localX"),S=b.get("localY"),D=c.getLayout(),I,L,P,R,E,Z,W,$;switch(v.shape.extent=Math.max(1,D.dy),v.shape.orient=f,f==="vertical"?(I=(y!=null?y*s:p.x)+D.sy,L=(_!=null?_*l:p.y)+p.dy,P=(A!=null?A*s:w.x)+D.ty,R=S!=null?S*l:w.y,E=I,Z=L*(1-g)+R*g,W=P,$=L*g+R*(1-g)):(I=(y!=null?y*s:p.x)+p.dx,L=(_!=null?_*l:p.y)+D.sy,P=A!=null?A*s:w.x,R=(S!=null?S*l:w.y)+D.ty,E=I*(1-g)+P*g,Z=L,W=I*g+P*(1-g),$=R),v.setShape({x1:I,y1:L,x2:P,y2:R,cpx1:E,cpy1:Z,cpx2:W,cpy2:$}),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}Ot(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 xt({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()}),w=c.getModel("emphasis.itemStyle").getItemStyle();Fe(_.style,w,m,y,{labelFetcher:t,labelDataIndex:c.dataIndex,defaultText:c.id,isRectText:!0}),_.setStyle("fill",c.getVisual("color")),Ot(_,w),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(yO(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){dh(c,ob,.1)}),n.eachEdge(function(c){dh(c,sb,.1)}),u){Ir(u,Vi);var f=s.get("focusNodeAdjacency");f==="outEdges"?M(u.outEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node2,Vi))}):f==="inEdges"?M(u.inEdges,function(c){c.dataIndex<0||(Ir(c,vh),Ir(c.node1,Vi))}):f==="allEdges"&&M(u.edges,function(c){c.dataIndex<0||(Ir(c,vh),c.node1!==u&&Ir(c.node1,Vi),c.node2!==u&&Ir(c.node2,Vi))})}h&&(Ir(h,vh),Ir(h.node1,Vi),Ir(h.node2,Vi))}},unfocusNodeAdjacency:function(t,e,r,a){var i=t.getGraph();i.eachNode(function(n){dh(n,ob)}),i.eachEdge(function(n){dh(n,sb)})}});function yO(t,e,r){var a=new xt({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return Se(a,{shape:{width:t.width+20}},e,r),a}mt({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 _O=function(t,e,r){t.eachSeriesByType("sankey",function(a){var i=a.get("nodeWidth"),n=a.get("nodeGap"),o=xO(a,e);a.layoutInfo=o;var s=o.width,l=o.height,u=a.getGraph(),h=u.nodes,f=u.edges;bO(h);var c=ee(h,function(p){return p.getLayout().value===0}),v=c.length!==0?0:a.get("layoutIterations"),d=a.get("orient"),g=a.get("nodeAlign");wO(h,f,i,n,s,l,v,d,g)})};function xO(t,e){return qt(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function wO(t,e,r,a,i,n,o,s,l){SO(t,e,r,i,n,s,l),DO(t,e,n,i,a,o,s),kO(t,s)}function bO(t){M(t,function(e){var r=Qa(e.outEdges,gh),a=Qa(e.inEdges,gh),i=e.getValue()||0,n=Math.max(r,a,i);e.setLayout({value:n},!0)})}function SO(t,e,r,a,i,n,o){for(var s=[],l=[],u=[],h=[],f=0,D=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"&&AO(t,o,n,S);var D=n==="vertical"?(i-r)/S:(a-r)/S;CO(t,D,n)}function ub(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return e.depth!=null&&e.depth>=0}function AO(t,e,r,a){if(e==="right"){for(var i=[],n=t,o=0;n.length;){for(var s=0;s0;n--)l*=.99,LO(s,l,o),Dg(s,i,r,a,o),NO(s,l,o),Dg(s,i,r,a,o)}function MO(t,e){var r=[],a=e==="vertical"?"y":"x",i=Oc(t,function(n){return n.getLayout()[a]});return i.keys.sort(function(n,o){return n-o}),M(i.keys,function(n){r.push(i.buckets.get(n))}),r}function IO(t,e,r,a,i,n){var o=1/0;M(t,function(s){var l=s.length,u=0;M(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 LO(t,e,r){M(t.slice().reverse(),function(a){M(a,function(i){if(i.outEdges.length){var n=Qa(i.outEdges,PO,r)/Qa(i.outEdges,gh,r);if(isNaN(n)){var o=i.outEdges.length;n=o?Qa(i.outEdges,EO,r)/o:0}if(r==="vertical"){var s=i.getLayout().x+(n-ja(i,r))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(n-ja(i,r))*e;i.setLayout({y:l},!0)}}})})}function PO(t,e){return ja(t.node2,e)*t.getValue()}function EO(t,e){return ja(t.node2,e)}function RO(t,e){return ja(t.node1,e)*t.getValue()}function OO(t,e){return ja(t.node1,e)}function ja(t,e){return e==="vertical"?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function gh(t){return t.getValue()}function Qa(t,e,r){for(var a=0,i=t.length,n=-1;++no&&(o=l)}),M(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)})}})};Gt(_O),Rt(zO);var hb={_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=[];M(g,function(_,w){var b;_.value&&z(_.value)?(b=_.value.slice(),_.value.unshift(w)):z(_)?(b=_.slice(),_.unshift(w)):b=_,p.push(b)}),t.data=p}var m=this.defaultValueDimensions,y=[{name:h,type:Iu(v),ordinalMeta:r,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Iu(d),dimsDef:m.slice()}];return Un(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:ot(Ey,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},BO=Vt.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}});Dt(BO,hb,!0);var VO=["itemStyle"],GO=["emphasis","itemStyle"],q5=ue.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=fb(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?cb(h,u,a,s):u=fb(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:ce}),HO=pt.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(db).getItemStyle(gb);e.useStyle(o),e.style.fill=null,e.style.stroke=n}var QO=function(t){!t||!z(t.series)||M(t.series,function(e){lt(e)&&e.type==="k"&&(e.type="candlestick")})},JO=["itemStyle","borderColor"],tN=["itemStyle","borderColor0"],eN=["itemStyle","color"],rN=["itemStyle","color0"],aN={seriesType:"candlestick",plan:Mn(),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?eN:rN)}function o(s,l){return l.get(s>0?JO:tN)}}},iN=typeof Float32Array<"u"?Float32Array:Array,nN={seriesType:"candlestick",plan:Mn(),reset:function(t){var e=t.coordinateSystem,r=t.getData(),a=oN(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),w=p.get(h,m),b=p.get(f,m),A=p.get(c,m),S=Math.min(_,w),D=Math.max(_,w),I=Z(S,y),L=Z(D,y),P=Z(b,y),R=Z(A,y),E=[];W(E,L,0),W(E,I,1),E.push(X(R),X(L),X(P),X(I)),p.setItemLayout(m,{sign:xb(p,m,_,w,h),initBaseline:_>w?L[n]:I[n],ends:E,brushRect:$(b,A,y)})}function Z(K,Q){var j=[];return j[i]=Q,j[n]=K,isNaN(Q)||isNaN(K)?[NaN,NaN]:e.dataToPoint(j)}function W(K,Q,j){var U=Q.slice(),tt=Q.slice();U[i]=Jl(U[i]+a/2,1,!1),tt[i]=Jl(tt[i]-a/2,1,!0),j?K.push(U,tt):K.push(tt,U)}function $(K,Q,j){var U=Z(K,j),tt=Z(Q,j);return U[i]-=a/2,tt[i]-=a/2,{x:U[0],y:U[1],width:n?a:tt[0]-U[0],height:n?tt[1]-U[1]:a}}function X(K){return K[i]=Jl(K[i],1),K}}function d(g,p){for(var m=new iN(g.count*4),y=0,_,w=[],b=[],A;(A=g.next())!=null;){var S=p.get(s,A),D=p.get(u,A),I=p.get(h,A),L=p.get(f,A),P=p.get(c,A);if(isNaN(S)||isNaN(L)||isNaN(P)){m[y++]=NaN,y+=3;continue}m[y++]=xb(p,A,D,I,h),w[i]=S,w[n]=L,_=e.dataToPoint(w,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[n]=P,_=e.dataToPoint(w,null,b),m[y++]=_?_[1]:NaN}p.setLayout("largePoints",m)}}};function xb(t,e,r,a,i){var n;return r>a?n=-1:r0?t.get(i,e-1)<=a?1:-1:1,n}function oN(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=H(Xt(t.get("barMaxWidth"),i),i),o=H(Xt(t.get("barMinWidth"),1),i),s=t.get("barWidth");return s!=null?H(s,i):Math.max(Math.min(i/2,n),o)}we(QO),Rt(aN),Gt(nN),Vt.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ca(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 wb=3;function sN(t){return z(t)||(t=[+t,+t]),t}function bb(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 Lg(t,e){q.call(this);var r=new Wa(t,e),a=new q;this.add(r),this.add(a),a.beforeUpdate=function(){this.attr(r.getScale())},this.updateData(t,e)}var Gi=Lg.prototype;Gi.stopEffectAnimation=function(){this.childAt(1).removeAll()},Gi.startEffectAnimation=function(t){for(var e=t.symbolType,r=t.color,a=this.childAt(1),i=0;i"u"?Array:Uint32Array,uN=typeof Float64Array>"u"?Array:Float64Array;function Sb(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(T&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=V(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),go([i,r[0],r[1]])}))}var Ab=Vt.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],Sb(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),Ab.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],Sb(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))}Ab.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=df(this._flatCoords,e.flatCoords),this._flatCoordsOffset=df(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(T&&!(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&&T)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(T){var r=_e.get(t.coordinateSystem);if(!r)throw new Error("Unkown coordinate system "+t.coordinateSystem)}var a=new fe(["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),kt(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 Fs(t,e,r){q.call(this),this.add(this.createLine(t,e,r)),this._updateEffectSymbol(t,e)}var Ja=Fs.prototype;Ja.createLine=function(t,e,r){return new zs(t,e,r)},Ja._updateEffectSymbol=function(t,e){var r=t.getItemModel(e),a=r.getModel("effect"),i=a.get("symbolSize"),n=a.get("symbol");z(i)||(i=[i,i]);var o=a.get("color")||t.getItemVisual(e,"color"),s=this.childAt(1);this._symbolType!==n&&(this.remove(s),s=Ye(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))},Ja._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=Ut(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}},Ja.getLineLength=function(t){return ta(t.__p1,t.__cp1)+ta(t.__cp1,t.__p2)},Ja.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]},Ja.updateData=function(t,e,r){this.childAt(0).updateData(t,e,r),this._updateEffectSymbol(t,e)},Ja.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=be,l=Nc;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)}vm(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}},It(Pg,Fs);var Tb=nr({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(E0(l,u,v,d,f,c))return n}else if(Ea(l,u,f,c))return n;n++}return-1}});function Cb(){this.group=new q}var Hi=Cb.prototype;Hi.isPersistent=function(){return!this._incremental},Hi.updateData=function(t){this.group.removeAll();var e=new Tb({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Hi.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new He({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Hi.incrementalUpdate=function(t,e){var r=new Tb;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))},Hi.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Hi._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)}))},Hi._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var Db={seriesType:"lines",plan:Mn(),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 P=n(y)?s:l;y>0&&(y=y*I+S),w[b++]=P[L],w[b++]=P[L+1],w[b++]=P[L+2],w[b++]=P[L+3]*y*256}else b+=4}return f.putImageData(_,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=rn()),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 cN(t,e,r){var a=t[1]-t[0];e=V(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 dN(t){var e=t.dimensions;return e[0]==="lng"&&e[1]==="lat"}ke({type:"heatmap",render:function(t,e,r){var a;if(e.eachComponent("visualMap",function(n){n.eachTargetSeries(function(o){o===t&&(a=n)})}),T&&!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()):dN(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(T){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),w=n.type,b=w==="cartesian2d"?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],A=r;A0?1:h<0?-1:0}function Rg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function yN(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");z(v)?v=v.slice():(v==null&&(v="100%"),v=[v,v]),v[f.index]=H(v[f.index],c),v[h.index]=H(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 _N(t,e,r,a,i){var n=t.get(pN)||0;n&&(Eg.attr({scale:e.slice(),rotation:r}),Eg.updateTransform(),n/=Eg.getLineScale(),n*=e[a.valueDim.index]),i.valueLineWidth=n}function xN(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=Ut(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=H(y,e[v.index]);var w=Math.max(g+y*2,0),b=_?0:y*2,A=_y(a),S=A?a:Fb((m+b)/w),D=m-S*g;y=D/2/(_?S:S-1),w=g+y*2,b=_?0:y*2,!A&&a!=="fixed"&&(S=u?Fb((Math.abs(u)+b)/w):0),p=S*w-b,f.repeatTimes=S,f.symbolMargin=y}var I=d*(p/2),L=f.pathPosition=[];L[c.index]=r[c.wh]/2,L[v.index]=o==="start"?I:o==="end"?l-I:l/2,n&&(L[0]+=n[0],L[1]+=n[1]);var P=f.bundlePosition=[];P[c.index]=r[c.xy],P[v.index]=r[v.xy];var R=f.barRectShape=et({},r);R[v.wh]=d*Math.max(Math.abs(r[v.wh]),Math.abs(L[v.index]+I)),R[c.wh]=r[c.wh];var E=f.clipShape={};E[c.xy]=-r[c.xy],E[c.wh]=h.ecSize[c.wh],E[v.xy]=0,E[v.wh]=r[v.wh]}function Eb(t){var e=t.symbolPatternSize,r=Ye(t.symbolType,-e/2,-e/2,e,e,t.color);return r.attr({culling:!0}),r.type!=="image"&&r.setStyle({strokeNoScale:!0}),r}function Rb(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(Ws(t,function(m){m.__pictorialAnimationIndex=h,m.__pictorialRepeatTimes=u,h0:_<0)&&(w=u-1-m),y[l.index]=f*(w-u/2+.5)+s[l.index],{position:y,scale:r.symbolScale.slice(),rotation:r.rotation}}function g(){Ws(t,function(m){m.trigger("emphasis")})}function p(){Ws(t,function(m){m.trigger("normal")})}}function Ob(t,e,r,a){var i=t.__pictorialBundle,n=t.__pictorialMainPath;n?ao(n,null,{position:r.pathPosition.slice(),scale:r.symbolScale.slice(),rotation:r.rotation},r,a):(n=t.__pictorialMainPath=Eb(r),i.add(n),ao(n,{position:r.pathPosition.slice(),scale:[0,0],rotation:r.rotation},{scale:r.symbolScale.slice()},r,a),n.on("mouseover",o).on("mouseout",s)),Og(n,r);function o(){this.trigger("emphasis")}function s(){this.trigger("normal")}}function Nb(t,e,r){var a=et({},e.barRectShape),i=t.__pictorialBarRect;i?ao(i,null,{shape:a},e,r):(i=t.__pictorialBarRect=new xt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(i))}function kb(t,e,r,a){if(r.symbolClip){var i=t.__pictorialClipPath,n=et({},r.clipShape),o=e.valueDim,s=r.animationModel,l=r.dataIndex;if(i)ft(i,{shape:n},s,l);else{n[o.wh]=0,i=new xt({shape:n}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[o.wh]=r.clipShape[o.wh],sa[a?"updateProps":"initProps"](i,{shape:u},s,l)}}}function zb(t,e){var r=t.getItemModel(e);return r.getAnimationDelayParams=wN,r.isAnimationEnabled=bN,r}function wN(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function bN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Og(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 Bb(t,e,r,a){var i=new q,n=new q;return i.add(n),i.__pictorialBundle=n,n.attr("position",r.bundlePosition.slice()),r.symbolRepeat?Rb(i,e,r):Ob(i,e,r),Nb(i,r,a),kb(i,e,r,a),i.__pictorialShapeStr=Gb(t,r),i.__pictorialSymbolMeta=r,i}function SN(t,e,r){var a=r.animationModel,i=r.dataIndex,n=t.__pictorialBundle;ft(n,{position:r.bundlePosition.slice()},a,i),r.symbolRepeat?Rb(t,e,r,!0):Ob(t,e,r,!0),Nb(t,r,!0),kb(t,e,r,!0)}function Vb(t,e,r,a){var i=a.__pictorialBarRect;i&&(i.style.text=null);var n=[];Ws(a,function(o){n.push(o)}),a.__pictorialMainPath&&n.push(a.__pictorialMainPath),a.__pictorialClipPath&&(r=null),M(n,function(o){ft(o,{scale:[0,0]},r,e,function(){a.parent&&a.parent.remove(a)})}),t.setItemGraphicEl(e,null)}function Gb(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ws(t,e,r){M(t.__pictorialBundle.children(),function(a){a!==t.__pictorialBarRect&&e.call(r,a)})}function ao(t,e,r,a,i,n){e&&t.attr(e),a.symbolClip&&!i?r&&t.attr(r):r&&sa[i?"updateProps":"initProps"](t,r,a.animationModel,a.dataIndex,n)}function Hb(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");Ws(t,function(c){c.setColor(a),c.setStyle(J({fill:a,opacity:r.opacity},o)),Ot(c,s),l&&(c.cursor=l),c.z2=r.z2});var u={},h=e.valueDim.posDesc[+(r.boundingLength>0)],f=t.__pictorialBarRect;Q1(f.style,u,n,a,e.seriesModel,i,h),Ot(f,u)}function Fb(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}Gt(ot(e1,"pictorialBar")),Rt(Ii("pictorialBar","roundRect"));var xh=function(t,e,r,a,i){Qt.call(this,t,e,r),this.type=a||"value",this.position=i||"bottom",this.orient=null};xh.prototype={constructor:xh,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},It(xh,Qt);function wh(t,e,r){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,r),this.model=t}wh.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:wh,_init:function(t,e,r){var a=this.dimension,i=new xh(a,zn(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();M(a.mapDimension(this.dimension,!0),function(i){this._axis.scale.unionExtentFromData(a,i)},this),Fa(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=qt({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 AN(t,e){var r=[];return t.eachComponent("singleAxis",function(a,i){var n=new wh(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}_e.register("single",{create:AN,dimensions:wh.prototype.dimensions});function Ng(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),Ut(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 TN=["axisLine","axisTickLabel","axisName"],CN=["splitArea","splitLine"],DN=Xe.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,r,a){var i=this.group;i.removeAll();var n=this._axisGroup;this._axisGroup=new q;var o=Ng(t),s=new ze(t,o);M(TN,s.add,s),i.add(this._axisGroup),i.add(s.getGroup()),M(CN,function(l){t.get(l+".show")&&this["_"+l](t)},this),au(n,this._axisGroup,t),DN.superCall(this,"render",t,e,r,a)},remove:function(){K1(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),qr(c,function(p){n.push({seriesIndex:l.seriesIndex,dataIndexInside:p,dataIndex:l.getData().getRawIndex(p)})}))}}),{payloadBatch:n,snapToValue:i}}function EN(t,e,r,a){t[e.key]={value:r,payloadBatch:a}}function RN(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=xs(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 ON(t,e,r){var a=r.axesInfo=[];qr(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 NN(t,e,r,a){if(bh(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 kN(t,e,r){var a=r.getZr(),i="axisPointerLastHighlights",n=Zb(a)[i]||{},o=Zb(a)[i]={};qr(t,function(u,h){var f=u.axisPointerModel.option;f.status==="show"&&qr(f.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];M(n,function(u,h){!o[h]&&l.push(u)}),M(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 zN(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 Xb(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 bh(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}var Q5=Ze({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}}}),ga=Pe(),BN=M;function qb(t,e,r){if(!G.node){var a=e.getZr();ga(a).records||(ga(a).records={}),VN(a,e);var i=ga(a).records[t]||(ga(a).records[t]={});i.handler=r}}function VN(t,e){if(ga(t).initialized)return;ga(t).initialized=!0,r("click",ot(Kb,"click")),r("mousemove",ot(Kb,"mousemove")),r("globalout",HN);function r(a,i){t.on(a,function(n){var o=FN(e);BN(ga(t).records,function(s){s&&i(s,n,o.dispatchAction)}),GN(o.pendings,e)})}}function GN(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 HN(t,e,r){t.handler("leave",null,r)}function Kb(t,e,r,a){e.handler(t,r,a)}function FN(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 kg(t,e){if(!G.node){var r=e.getZr(),a=(ga(r).records||{})[t];a&&(ga(r).records[t]=null)}}var jb=he({type:"axisPointer",render:function(t,e,r){var a=e.getComponent("tooltip"),i=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";qb("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){kg(e.getZr(),"axisPointer"),jb.superApply(this._model,"remove",arguments)},dispose:function(t,e){kg("axisPointer",e),jb.superApply(this._model,"dispose",arguments)}}),Fi=Pe(),Qb=rt,zg=it;function Wi(){}Wi.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 q,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),r.getZr().add(o);else{var f=ot(Jb,e,h);this.updatePointerEl(o,l,f,e),this.updateLabelEl(o,l,f,e)}rS(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=md(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=Fi(t).pointerEl=new sa[i.type](Qb(e.pointer));t.add(n)}},createLabelEl:function(t,e,r,a){if(e.label){var i=Fi(t).labelEl=new xt(Qb(e.label));t.add(i),eS(i,a)}},updatePointerEl:function(t,e,r){var a=Fi(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),r(a,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,r,a){var i=Fi(t).labelEl;i&&(i.setStyle(e.label.style),r(i,{shape:e.label.shape,position:e.label.position}),eS(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=Ho(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){oi(u.event)},onmousedown:zg(this._onHandleDragMove,this,0,0),drift:zg(this._onHandleDragMove,this),ondragend:zg(this._onHandleDragEnd,this)}),r.add(a)),rS(a,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];a.setStyle(i.getItemStyle(null,s));var l=i.get("size");z(l)||(l=[l,l]),a.attr("scale",[l[0]/2,l[1]/2]),es(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)}},_moveHandleToValue:function(t,e){Jb(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Bg(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var r=this._handle;if(!!r){this._dragging=!0;var a=this.updateHandleTransform(Bg(r),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(Bg(a)),Fi(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]}}},Wi.prototype.constructor=Wi;function Jb(t,e,r,a){tS(Fi(r).lastProp,a)||(Fi(r).lastProp=a,e?ft(r,a,t):(r.stopAnimation(),r.attr(a)))}function tS(t,e){if(lt(t)&<(e)){var r=!0;return M(e,function(a,i){r=r&&tS(t[i],a)}),!!r}else return t===e}function eS(t,e){t[e.get("label.show")?"show":"hide"]()}function Bg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function rS(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(Wi);function Vg(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 aS(t,e,r,a,i){var n=r.get("value"),o=iS(n,e.axis,e.ecModel,r.get("seriesDataIndices"),{precision:r.get("label.precision"),formatter:r.get("label.formatter")}),s=r.getModel("label"),l=xi(s.get("padding")||0),u=s.getFont(),h=Rr(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),WN(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 WN(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 iS(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:ad(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};M(a,function(l){var u=r.getSeriesByIndex(l.seriesIndex),h=l.dataIndexInside,f=u&&u.getDataParams(h);f&&s.seriesData.push(f)}),Lt(o)?n=o.replace("{value}",n):se(o)&&(n=o(s))}return n}function Gg(t,e,r){var a=Ie();return aa(a,a,r.rotation),yr(a,a,r.position),Hr([t.dataToCoord(e),(r.labelOffset||0)+(r.labelDirection||1)*(r.labelMargin||0)],a)}function nS(t,e,r,a,i,n){var o=ze.innerTextLayout(r.rotation,0,r.labelDirection);r.labelMargin=i.get("label.margin"),aS(e,a,i,n,{position:Gg(a.axis,t,r),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Hg(t,e,r){return r=r||0,{x1:t[r],y1:t[1-r],x2:e[r],y2:e[1-r]}}function oS(t,e,r){return r=r||0,{x:t[r],y:t[1-r],width:e[r],height:e[1-r]}}function sS(t,e,r,a,i,n){return{cx:t,cy:e,r0:r,r:a,startAngle:i,endAngle:n,clockwise:!0}}var UN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.grid,s=a.get("type"),l=lS(o,n).getOtherAxis(n).getGlobalExtent(),u=n.toGlobalCoord(n.dataToCoord(e,!0));if(s&&s!=="none"){var h=Vg(a),f=$N[s](n,u,l);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=xd(o.model,r);nS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=xd(e.axis.grid.model,e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Gg(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=lS(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 lS(t,e){var r={};return r[e.dim+"AxisIndex"]=e.index,t.getCartesian(r)}var $N={line:function(t,e,r){var a=Hg([e,r[0]],[e,r[1]],uS(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:oS([e-a/2,r[0]],[a,i],uS(t))}}};function uS(t){return t.dim==="x"?0:1}Xe.registerAxisPointerClass("CartesianAxisPointer",UN),we(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!z(e)&&(t.axisPointer.link=[e])}}),$e(Wr.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=tP(t,e)}),mt({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},LN);var hS=["x","y"],ZN=["width","height"],YN=Wi.extend({makeElOption:function(t,e,r,a,i){var n=r.axis,o=n.coordinateSystem,s=Fg(o,1-Sh(n)),l=o.dataToPoint(e)[0],u=a.get("type");if(u&&u!=="none"){var h=Vg(a),f=XN[u](n,l,s);f.style=h,t.graphicKey=f.type,t.pointer=f}var c=Ng(r);nS(e,t,c,r,a,i)},getHandleTransform:function(t,e,r){var a=Ng(e,{labelInside:!1});return a.labelMargin=r.get("handle.margin"),{position:Gg(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=Sh(i),s=Fg(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=Fg(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"}}}}),XN={line:function(t,e,r){var a=Hg([e,r[0]],[e,r[1]],Sh(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:oS([e-a/2,r[0]],[a,i],Sh(t))}}};function Sh(t){return t.isHorizontal()?0:1}function Fg(t,e){var r=t.getRect();return[r[hS[e]],r[hS[e]]+r[ZN[e]]]}Xe.registerAxisPointerClass("SingleAxisPointer",YN),he({type:"single"});var Wg=2,qN=Vt.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){qN.superApply(this,"init",arguments),this.legendVisualProvider=new ws(it(this.getData,this),it(this.getRawData,this))},fixData:function(t){var e=t.length,r=Oc(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 JN=function(t){t.eachSeriesByType("themeRiver",function(e){var r=e.getData(),a=e.getRawData(),i=e.get("color"),n=ht();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)})})};Gt(jN),Rt(JN),$e(bs("themeRiver")),Vt.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var r={name:t.name,children:t.data};cS(r);var a=t.levels||[],i={};return i.levels=a,Ei.createTree(r,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=Vt.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Hd(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 cS(t){var e=0;M(t.children,function(a){cS(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var r=t.value;z(r)&&(r=r[0]),(r==null||isNaN(r))&&(r=e),r<0&&(r=0),z(t.value)?t.value[0]=r:t.value=r}var Ah={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},tk=2,ek=4;function Th(t,e,r){q.call(this);var a=new Ar({z2:tk});a.seriesIndex=e.seriesIndex;var i=new dt({z2:ek,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 Ui=Th.prototype;Ui.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=et({},s);l.label=null;var u=rk(e,a,i);nk(e,a,u);var h=o.getModel("itemStyle").getItemStyle(),f;if(r==="normal")f=h;else{var c=o.getModel(r+".itemStyle").getItemStyle();f=ut(c,h)}f=J({lineJoin:"bevel",fill:f.fill||u},f),t?(n.setShape(l),n.shape.r=s.r0,ft(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?(ft(n,{shape:l},a),n.useStyle(f)):ft(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,Ot(this)},Ui.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(r){r.piece&&(e.node===r?r.piece.updateData(!1,r,"emphasis"):ik(r,e.node,t)?r.piece.childAt(0).trigger("highlight"):t!==Ah.NONE&&r.piece.childAt(0).trigger("downplay"))})},Ui.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},Ui.onHighlight=function(){this.updateData(!1,this.node,"highlight")},Ui.onDownplay=function(){this.updateData(!1,this.node,"downplay")},Ui._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=Ut(t.getFormattedLabel(this.node.dataIndex,r,null,null,"label"),this.node.name);S("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:S("verticalAlign")||"middle",opacity:S("opacity")});var _=g*v+l.cx,w=g*d+l.cy;f.attr("position",[_,w]);var b=S("rotate"),A=0;b==="radial"?(A=-c,A<-Math.PI/2&&(A+=Math.PI)):b==="tangential"?(A=Math.PI/2-c,A>Math.PI/2?A-=Math.PI:A<-Math.PI/2&&(A+=Math.PI)):typeof b=="number"&&(A=b*Math.PI/180),f.attr("rotation",A);function S(D){var I=n.get(D);return I??i.get(D)}},Ui._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)},It(Th,q);function rk(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[ak(t)%o],n}function ak(t){for(var e=t;e.depth>1;)e=e.parentNode;var r=t.getAncestors()[0];return yt(r.children,e)}function ik(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 nk(t,e,r){var a=e.getData();a.setItemVisual(t.dataIndex,"color",r)}var ok="sunburstRootToNode",J5=ue.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 ha(_,y,w,w).add(b).update(b).remove(ot(b,null)).execute();function w(A){return A.getId()}function b(A,S){var D=A==null?null:y[A],I=S==null?null:_[S];g(D,I)}}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 w=new Th(y,t,e);l.add(w),n.setItemGraphicEl(y.dataIndex,w)}}}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 Th(y,t,e),l.add(i.virtualPiece)),_.piece._onclickEvent&&_.piece.off("click",_.piece._onclickEvent);var w=function(b){i._rootToNode(_.parentNode)};_.piece._onclickEvent=w,i.virtualPiece.on("click",w)}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";Zo(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:ok,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}}}),vS="sunburstRootToNode";mt({type:vS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[vS],a);if(n){var o=a.getViewRoot();o&&(t.direction=Gd(o,n.node)?"rollUp":"drillDown"),a.resetViewRoot(n.node)}}});var dS="sunburstHighlight";mt({type:dS,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){var n=Is(t,[dS],a);n&&(t.highlight=n.node)}});var sk="sunburstUnhighlight";mt({type:sk,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},r);function r(a,i){t.unhighlight=!0}});var gS=Math.PI/180,lk=function(t,e,r,a){e.eachSeriesByType(t,function(i){var n=i.get("center"),o=i.get("radius");z(o)||(o=[0,o]),z(n)||(n=[n,n]);var s=r.getWidth(),l=r.getHeight(),u=Math.min(s,l),h=H(n[0],s),f=H(n[1],l),c=H(o[0],u/2),v=H(o[1],u/2),d=-i.get("startAngle")*gS,g=i.get("minAngle")*gS,p=i.getData().tree.root,m=i.getViewRoot(),y=m.depth,_=i.get("sort");_!=null&&pS(m,_);var w=0;M(m.children,function(X){!isNaN(X.getValue())&&w++});var b=m.getValue(),A=Math.PI/(b||w)*2,S=m.depth>0,D=m.height-(S?-1:1),I=(v-c)/(D||1),L=i.get("clockwise"),P=i.get("stillShowZeroSum"),R=L?1:-1,E=function(X,K){if(!!X){var Q=K;if(X!==p){var j=X.getValue(),U=b===0&&P?A:j*A;Ua[1]&&a.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:a[1],r0:a[0]},api:{coord:it(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:it(pk,t)}}},yk=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)}}}},mS=X0,_k=["itemStyle"],xk=["emphasis","itemStyle"],wk=["label"],bk=["emphasis","label"],Sk="e\0\0",yS={cartesian2d:fk,geo:vk,singleAxis:gk,polar:mk,calendar:yk};Vt.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 ca(this.getSource(),this)},getDataParams:function(t,e,r){var a=Vt.prototype.getDataParams.apply(this,arguments);return r&&(a.info=r.info),a}}),ue.extend({type:"custom",_data:null,render:function(t,e,r,a){var i=this._data,n=t.getData(),o=this.group,s=xS(t,n,e,r);n.diff(i).add(function(u){Ug(null,u,s(u,a),t,o,n)}).update(function(u,h){var f=i.getItemGraphicEl(h);Ug(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)?Gu(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=xS(e,n,r,a);function s(h){h.isGroup||(h.incremental=!0,h.useHoverLayer=!0)}for(var l=t.start;l=0?"p":"n",E=S;b&&(a[h][P]||(a[h][P]={p:S,n:S}),E=a[h][P][R]);var Z,W,$,X;if(d.dim==="radius"){var K=d.dataToRadius(L)-S,Q=l.dataToAngle(P);Math.abs(K)f?f=v:(c.lastTickCount=i,c.lastAutoInterval=f),f}},It(Dh,Qt);var Mh=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Ch,this._angleAxis=new Dh,this._radiusAxis.polar=this._angleAxis.polar=this};Mh.prototype={type:"polar",axisPointerEnabled:!0,constructor:Mh,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 Zg=wt.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});ut(Zg.prototype,Di);var IS={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};function LS(t,e){return e.type||(e.data?"category":"value")}Gn("angle",Zg,LS,IS.angle),Gn("radius",Zg,LS,IS.radius),Ze({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 Ok(t,e,r){var a=e.get("center"),i=r.getWidth(),n=r.getHeight();t.cx=H(a[0],i),t.cy=H(a[1],n);var o=t.getRadiusAxis(),s=Math.min(i,n)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]),l=[H(l[0],s),H(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}function Nk(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();M(l.mapDimension("radius",!0),function(u){i.scale.unionExtentFromData(l,fs(l,u))}),M(l.mapDimension("angle",!0),function(u){a.scale.unionExtentFromData(l,fs(l,u))})}}),Fa(a.scale,a.model),Fa(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 PS(t,e){if(t.type=e.get("type"),t.scale=zn(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 kk={dimensions:Mh.prototype.dimensions,create:function(t,e){var r=[];return t.eachComponent("polar",function(a,i){var n=new Mh(i);n.update=Nk;var o=n.getRadiusAxis(),s=n.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");PS(o,l),PS(s,u),Ok(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(T&&!i)throw new Error('Polar "'+Ut(a.get("polarIndex"),a.get("polarId"),0)+'" not found');a.coordinateSystem=i.coordinateSystem}}),r}};_e.register("polar",kk);var zk=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Ih(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 Lh(t){var e=t.getRadiusAxis();return e.inverse?0:1}function ES(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()}Xe.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=V(r.getViewLabels(),function(u){var u=rt(u);return u.coord=r.dataToCoord(u.tickValue),u});ES(s),ES(n),M(zk,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=Lh(e),s=o?0:1,l;i[s]===0?l=new Br({shape:{cx:e.cx,cy:e.cy,r:i[o]},style:n.getLineStyle(),z2:1,silent:!0}):l=new Yl({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[Lh(e)],l=V(r,function(u){return new ye({shape:Ih(e,[s,s+o],u.coord)})});this.group.add(or(l,{style:J(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[Lh(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 _t(o[v].textStyle,s,s.ecModel));var w=new dt({silent:ze.isLabelSilent(t)});this.group.add(w),$t(w.style,c,{x:g[0],y:g[1],textFill:c.getTextColor()||t.get("axisLine.lineStyle.color"),text:h.formattedLabel,textAlign:y,textVerticalAlign:_}),u&&(w.eventData=ze.makeAxisEventDataBase(t),w.eventData.targetType="axisLabel",w.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 Wk={line:function(t,e,r,a,i){return t.dim==="angle"?{type:"Line",shape:Hg(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:sS(e.cx,e.cy,a[0],a[1],(-r-n/2)*o,(-r+n/2)*o)}:{type:"Sector",shape:sS(e.cx,e.cy,r-n/2,r+n/2,0,Math.PI*2)}}};Xe.registerAxisPointerClass("PolarAxisPointer",Hk),Gt(ot(Pk,"bar")),he({type:"polar"});var Uk=wt.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){wt.prototype.init.apply(this,arguments),fi(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=Gx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=an(t.regions||[],function(r,a){return a.name&&r.set(a.name,new _t(a,e)),r},ht()),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 _t(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}});Dt(Uk,Sd),he({type:"geo",init:function(t,e){var r=new ju(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 Yg(t,e){e.update="updateView",mt(e,function(r,a){var i={};return a.eachComponent({mainType:"geo",query:r},function(n){n[t](r.name);var o=n.coordinateSystem;M(o.regions,function(s){i[s.name]=n.isSelected(s.name)||!1})}),{selected:i,name:r.name}})}Yg("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Yg("select",{type:"geoSelect",event:"geoselected"}),Yg("unSelect",{type:"geoUnSelect",event:"geounselected"});var Xg=864e5;function pa(t,e,r){this._model=t}pa.prototype={constructor:pa,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=$o(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];M([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=qt(n,s);M([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){z(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/Xg)-Math.floor(t[0].time/Xg)+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)}},pa.dimensions=pa.prototype.dimensions,pa.getDimensionsInfo=pa.prototype.getDimensionsInfo,pa.create=function(t,e){var r=[];return t.eachComponent("calendar",function(a){var i=new pa(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 RS(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}_e.register("calendar",pa);var OS=wt.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=Cn(t);OS.superApply(this,"init",arguments),NS(t,i)},mergeOption:function(t,e){OS.superApply(this,"mergeOption",arguments),NS(this.option,t)}});function NS(t,e){var r=t.cellSize;z(r)?r.length===1&&(r[1]=r[0]):r=t.cellSize=[r,r];var a=V([0,1],function(i){return LM(e,i)&&(r[i]="auto"),r[i]!=null&&r[i]!=="auto"});za(t,e,{type:"box",ignoreSize:a})}var $k={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"]},Zk={EN:["S","M","T","W","T","F","S"],CN:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]};he({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 xt({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 ir({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?by(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 dt({z2:30});$t(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];Lt(i)&&(i=$k[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){M(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}});he({type:"graphic",init:function(t,e){this._elMap=ht(),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;M(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=Xk(i);T&&s&>(u===s.parent,"Changing parent is not supported."),!n||n==="merge"?s?s.attr(f):zS(o,u,f,r):n==="replace"?(Ph(s,r),zS(o,u,f,r)):n==="remove"&&Ph(s,r);var c=r.get(o);c&&(c.__ecGraphicWidthOption=i.width,c.__ecGraphicHeightOption=i.height,Qk(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};uu(u,l,c,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Ph(e,t)}),this._elMap=ht()},dispose:function(){this._clear()}});function zS(t,e,r,a){var i=r.type;T&>(i,"graphic type MUST be set");var n=kS.hasOwnProperty(i)?kS[i]:Zc(i);T&>(n,"graphic type can not be found");var o=new n(r);e.add(o),a.set(t,o),o.__ecGraphicId=t}function Ph(t,e){var r=t&&t.parent;r&&(t.type==="group"&&t.traverse(function(a){Ph(a,e)}),e.removeKey(t.__ecGraphicId),r.remove(t))}function Xk(t){return t=et({},t),M(["id","parentId","$action","hv","bounding"].concat(Ay),function(e){delete t[e]}),t}function BS(t,e){var r;return M(e,function(a){t[a]!=null&&t[a]!=="auto"&&(r=!0)}),r}function qk(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 Kk(t,e,r){var a=et({},r),i=t[e],n=r.$action||"merge";if(n==="merge")if(i){if(T){var o=r.type;gt(!o||i.type===o,'Please set $action: "replace" to change `type`')}ut(i,a,!0),za(i,a,{ignoreSize:!0}),Ty(r,i)}else t[e]=a;else n==="replace"?t[e]=a:n==="remove"&&i&&(t[e]=null)}function jk(t,e){!t||(t.hv=e.hv=[BS(e,["left","right"]),BS(e,["top","bottom"])],t.type==="group"&&(t.width==null&&(t.width=e.width=0),t.height==null&&(t.height=e.height=0)))}function Qk(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 VS={};function io(t,e){VS[t]=e}function GS(t){return VS[t]}var Jk=Ze({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){Jk.superApply(this,"optionUpdated",arguments),M(this.option.feature,function(t,e){var r=GS(e);r&&ut(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 tz(t,e,r){var a=e.getBoxLayoutParams(),i=e.get("padding"),n={width:r.getWidth(),height:r.getHeight()},o=qt(a,n,i);bi(e.get("orient"),t,e.get("itemGap"),o.width,o.height),uu(t,a,n,i)}function HS(i,e){var r=xi(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var i=new xt({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}he({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=[];M(o,function(f,c){l.push(c)}),new ha(this._featureNames||[],l).add(u).update(u).remove(ot(u,null)).execute(),this._featureNames=l;function u(f,c){var v=l[f],d=l[c],g=o[v],p=new _t(g,t,t.ecModel),m;if(a&&a.newTitle!=null&&a.featureName===v&&(g.title=a.newTitle),v&&!d){if(ez(v))m={model:p,onclick:p.option.onclick,featureName:v};else{var y=GS(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(_,w){var b=this.option,A=this.iconPaths;b.iconStatus=b.iconStatus||{},b.iconStatus[_]=w,A[_]&&A[_].trigger(w)},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 w=f.iconPaths={};M(p,function(b,A){var S=Ho(b,{},{x:-n/2,y:-n/2,width:n,height:n});S.setStyle(d.getItemStyle()),S.hoverStyle=g.getItemStyle(),S.setStyle({text:m[A],textAlign:g.get("textAlign"),textBorderRadius:g.get("textBorderRadius"),textPadding:g.get("textPadding"),textFill:null});var D=t.getModel("tooltip");D&&D.get("show")&&S.attr("tooltip",et({content:m[A],formatter:D.get("formatter",!0)||function(){return m[A]},formatterParams:{componentType:"toolbox",name:A,title:m[A],$vars:["name","title"]},position:D.get("position",!0)||"bottom"},D.option)),Ot(S),t.get("showTitle")&&(S.__title=m[A],S.on("mouseover",function(){var I=g.getItemStyle(),L=t.get("orient")==="vertical"?t.get("right")==null?"right":"left":t.get("bottom")==null?"bottom":"top";S.setStyle({textFill:g.get("textFill")||I.fill||I.stroke||"#000",textBackgroundColor:g.get("textBackgroundColor"),textPosition:g.get("textPosition")||L})}).on("mouseout",function(){S.setStyle({textFill:null,textBackgroundColor:null})})),S.trigger(f.get("iconStatus."+A)||"normal"),i.add(S),S.on("click",it(c.onclick,c,e,r,A)),w[A]=S})}tz(i,t,r),i.add(HS(i.getBoundingRect(),t)),i.eachChild(function(f){var c=f.__title,v=f.hoverStyle;if(v&&c){var d=Rr(c,Qm(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){M(this._features,function(i){i.updateView&&i.updateView(i.model,e,r,a)})},remove:function(t,e){M(this._features,function(r){r.remove&&r.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){M(this._features,function(r){r.dispose&&r.dispose(t,e)})}});function ez(t){return t.indexOf("my")===0}var FS=ua.toolbox.saveAsImage;function Eh(t){this.model=t}Eh.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:FS.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:FS.lang.slice()},Eh.prototype.unusable=!G.canvasSupported;var rz=Eh.prototype;rz.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"&&!G.browser.ie&&!G.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)}},io("saveAsImage",Eh);var Rh=ua.toolbox.magicType,qg="__ec_magicType_stack__";function Kg(t){this.model=t}Kg.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:rt(Rh.title),option:{},seriesIndex:{}};var WS=Kg.prototype;WS.getIcons=function(){var t=this.model,e=t.get("icon"),r={};return M(t.get("type"),function(a){e[a]&&(r[a]=e[a])}),r};var US={line:function(t,e,r,a){if(t==="bar")return ut({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 ut({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")===qg;if(t==="line"||t==="bar")return a.setIconStatus("stack",i?"normal":"emphasis"),ut({id:e,stack:i?"":qg},a.get("option.stack")||{},!0)}},az=[["line","bar"],["stack"]];WS.onclick=function(t,e,r){var a=this.model,i=a.get("seriesIndex."+r);if(!!US[r]){var n={series:[]},o=function(u){var h=u.subType,f=u.id,c=US[r](h,f,u,a);c&&(J(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"}}};M(az,function(u){yt(u,r)>=0&&M(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===qg;s=l?ut({stack:Rh.title.tiled},Rh.title):rt(Rh.title)}e.dispatchAction({type:"changeMagicType",currentType:r,newOption:n,newTitle:s,featureName:"magicType"})}},mt({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),io("magicType",Kg);var $S=ua.toolbox.dataView,Oh=new Array(60).join("-"),no=" ";function iz(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 nz(t){var e=[];return M(t,function(r,a){var i=r.categoryAxis,n=r.valueAxis,o=n.dim,s=[" "].concat(V(r.series,function(v){return v.name})),l=[i.model.getCategories()];M(r.series,function(v){l.push(v.getRawData().mapArray(o,function(d){return d}))});for(var u=[s.join(no)],h=0;h=0)return!0}var jg=new RegExp("["+no+"]+","g");function uz(t){for(var e=t.split(/\n+/g),r=Nh(e.shift()).split(jg),a=[],i=V(r,function(l){return{name:l,data:[]}}),n=0;n=0)&&o(n,a,i)})}var oo=Bh.prototype;oo.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=tp[r.brushType](0,i,a);r.__rangeOffset={offset:KS[r.brushType](n.values,r.range,[1,1]),xyMinMax:n.xyMinMax}}})},oo.matchOutputRanges=function(t,e,r){ti(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&M(i.coordSyses,function(n){var o=tp[a.brushType](1,n,a.range);r(a,o.values,n,e)})},this)},oo.setInputRanges=function(t,e){ti(t,function(r){var a=this.findTargetInfo(r,e);if(T&&(gt(!a||a===!0||r.coordRange,"coordRange must be specified when coord index specified."),gt(!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=tp[r.brushType](0,a.coordSys,r.coordRange),n=r.__rangeOffset;r.range=n?KS[r.brushType](i.values,n.offset,gz(i.xyMinMax,n.xyMinMax)):i.values}},this)},oo.makePanelOpts=function(t,e){return V(this._targetInfoList,function(r){var a=r.getPanelRect();return{panelId:r.panelId,defaultBrushType:e&&e(r),clipPath:Qw(a),isTargetByCursor:tb(a,t,r.coordSysModel),getLinearBrushOtherExtent:Jw(a)}})},oo.controlSeries=function(t,e,r){var a=this.findTargetInfo(t,r);return a===!0||a&&kh(a.coordSyses,e.coordinateSystem)>=0},oo.findTargetInfo=function(t,e){for(var r=this._targetInfoList,a=ZS(e,t),i=0;it[1]&&t.reverse(),t}function ZS(t,e){return Ol(t,e,{includeMainTypes:vz})}var dz={grid:function(t,e){var r=t.xAxisModels,a=t.yAxisModels,i=t.gridModels,n=ht(),o={},s={};!r&&!a&&!i||(ti(r,function(l){var u=l.axis.grid.model;n.set(u.id,u),o[u.id]=!0}),ti(a,function(l){var u=l.axis.grid.model;n.set(u.id,u),s[u.id]=!0}),ti(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=[];ti(u.getCartesians(),function(f,c){(kh(r,f.getAxis("x").model)>=0||kh(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:XS.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(t,e){ti(t.geoModels,function(r){var a=r.coordinateSystem;e.push({panelId:"geo--"+r.id,geoModel:r,coordSysModel:r,coordSys:a,coordSyses:[a],getPanelRect:XS.geo})})}},YS=[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}],XS={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(yi(t)),e}},tp={lineX:zh(qS,0),lineY:zh(qS,1),rect:function(t,e,r){var a=e[Qg[t]]([r[0][0],r[1][0]]),i=e[Qg[t]]([r[0][1],r[1][1]]),n=[Jg([a[0],i[0]]),Jg([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=V(r,function(n){var o=e[Qg[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 qS(t,e,r,a){T&>(r.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var i=r.getAxis(["x","y"][t]),n=Jg(V([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 KS={lineX:zh(jS,0),lineY:zh(jS,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 V(t,function(a,i){return[a[0]-r[0]*e[i][0],a[1]-r[1]*e[i][1]]})}};function jS(t,e,r,a){return[e[0]-a[t]*r[0],e[1]-a[t]*r[1]]}function gz(t,e){var r=QS(t),a=QS(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 QS(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var JS=M,ep="\0_ec_hist_store";function pz(t,e){var r=rp(t);JS(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 mz(t){var e=rp(t),r=e[e.length-1];e.length>1&&e.pop();var a={};return JS(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 yz(t){t[ep]=null}function _z(t){return rp(t).length}function rp(t){var e=t[ep];return e||(e=t[ep]=[{}]),e}wt.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var xz=["x","y","z","radius","angle","single"],wz=["cartesian2d","polar","singleAxis"];function bz(t){return yt(wz,t)>=0}function Sz(t,e){t=t.slice();var r=V(t,su);e=(e||[]).slice();var a=V(e,su);return function(i,n){M(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){M(r(o,u)||[],function(h){s.records[u.name][h]&&(l=!0)})}),l}function n(o,s){s.nodes.push(o),e(function(l){M(r(o,l)||[],function(u){s.records[l.name][u]=!0})})}}var $i=M,eA=_i,ap=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};ap.prototype={constructor:ap,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(bz(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 rt(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;$i(["start","end"],function(f,c){var v=t[f],d=t[f+"Value"];i[c]==="percent"?(v==null&&(v=n[c]),d=a.parse(Nt(v,n,e))):(l=!0,d=d==null?e[c]:a.parse(d),v=Nt(d,e,n)),s[c]=d,o[c]=v}),eA(s),eA(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";zi(0,f,v,"all",u["min"+p],u["max"+p]);for(var m=0;m<2;m++)c[m]=Nt(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=Tz(this,this._dimName,e),Dz(this);var r=this.calculateDataWindow(t.settledOption);this._valueWindow=r.valueWindow,this._percentWindow=r.percentWindow,rA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,rA(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;$i(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}):$i(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)}}),$i(u,function(h){l.setApproximateExtent(n,h)}))});function o(s){return s>=n[0]&&s<=n[1]}}};function Tz(t,e,r){var a=[1/0,-1/0];return $i(r,function(i){var n=i.getData();n&&$i(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 rA(t,e){var r=t.getAxisModel(),a=t._percentWindow,i=t._valueWindow;if(!!a){var n=tv(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 Dz(t){var e=t._minMaxSpan={},r=t._dataZoomModel,a=t._dataExtent;$i(["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=Nt(a[0]+o,a,[0,100],!0):n!=null&&(o=Nt(n,[0,100],a,!0)-a[0]),e[i+"Span"]=n,e[i+"ValueSpan"]=o})}var Zi=M,Yi=tA,ip=Ze({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=aA(t);this.settledOption=a,this.mergeDefaultAndTheme(t,r),this.doInit(a)},mergeOption:function(t){var e=aA(t);ut(this.option,t,!0),ut(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;G.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),iA(this,t);var r=this.settledOption;Zi([["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 ap(e.name,r,this,i));t[e.name+"_"+r]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Yi(function(r){var a=r.axisIndex;t[a]=me(t[a])},this),e==="axisIndex"?this._autoSetAxisIndex():e==="orient"&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Yi(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):Zi(a.singleAxis,function(n){t&&n.get("orient",!0)===e&&(r.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Yi(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 Yi(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;Yi(function(a){Zi(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;Zi([["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),iA(this,t)},setCalculatedRange:function(t){var e=this.option;Zi(["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 aA(t){var e={};return Zi(["start","end","startValue","endValue","throttle"],function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}function iA(t,e){var r=t._rangePropMode,a=t.get("rangeMode");Zi([["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 np=Fr.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 Ez(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 Bh(oA(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)}io("dataZoom",op),we(function(t){if(!t)return;var e=t.dataZoom||(t.dataZoom=[]);z(e)||(t.dataZoom=e=[e]);var r=t.toolbox;if(r&&(z(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"&&!z(u)&&(u=u===!1||u==="none"?[]:[u]),n(o,function(h,f){if(!(u!=null&&u!=="all"&&yt(u,f)===-1)){var c={type:"select",$fromToolbox:!0,filterMode:s.filterMode||"filter",id:Iz+o+f};c[l]=f,e.push(c)}})}}function n(o,s){var l=t[o];z(l)||(l=l?[l]:[]),nA(l,s)}});var Rz=ua.toolbox.restore;function sp(t){this.model=t}sp.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:Rz.title};var Oz=sp.prototype;Oz.onclick=function(t,e,r){yz(t),e.dispatchAction({type:"restore",from:this.uid})},io("restore",sp),mt({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Ze({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 sA=M,Nz=xy,kz=["","-webkit-","-moz-","-o-"],zz="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";function Bz(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",r="left "+t+"s "+e+",top "+t+"s "+e;return V(kz,function(a){return a+"transition:"+r}).join(";")}function Vz(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"),sA(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Gz(t){var e=[],r=t.get("transitionDuration"),a=t.get("backgroundColor"),i=t.getModel("textStyle"),n=t.get("padding");return r&&e.push(Bz(r)),a&&(G.canvasSupported?e.push("background-Color:"+a):(e.push("background-Color:#"+kf(a)),e.push("filter:alpha(opacity=70)"))),sA(["width","color","radius"],function(o){var s="border-"+o,l=Nz(s),u=t.get(l);u!=null&&e.push(s+":"+u+(o==="color"?"":"px"))}),e.push(Vz(i)),n!=null&&e.push("padding:"+xi(n).join("px ")+"px"),e.join(";")+";"}function lA(t,e,r,a,i){var n=e&&e.painter;if(r){var o=n&&n.getViewportRoot();o&&iC(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 lp(t,e,r){if(G.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],lA(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();Er(u,s,!0),l.dispatch("mousemove",s)}},a.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}lp.prototype={constructor:lp,_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=zz+Gz(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;lA(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(it(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 up(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}up.prototype={constructor:up,_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 dt({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(it(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 uA=it,$s=M,hA=H,Hz=new xt({shape:{x:-1,y:-1,width:2,height:2}});he({type:"tooltip",init:function(t,e){if(!G.node){var r=t.getComponent("tooltip"),a=r.get("renderMode");this._renderMode=_0(a);var i;this._renderMode==="html"?(i=new lp(e.getDom(),e,{appendToBody:r.get("appendToBody",!0)}),this._newLine="
"):(i=new up(e),this._newLine=` `),this._tooltipContent=i}},render:function(t,e,r){if(!G.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");qb("itemTooltip",this._api,uA(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||G.node)){var i=fA(a,r);this._ticket="";var n=a.dataByCoordSys;if(a.tooltip&&a.x!=null&&a.y!=null){var o=Hz;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=Ub(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(fA(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=hp([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=it(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=hp([e.tooltipOption,a]),l=this._renderMode,u=this._newLine,h={};$s(t,function(c){$s(c.dataByAxis,function(v){var d=r.getComponent(v.axisDim+"Axis",v.axisIndex),g=v.value,p=[];if(!(!d||g==null)){var m=iS(g,d.axis,r,v.seriesDataIndices,v.valueLabelOpt);M(v.seriesDataIndices,function(_){var w=r.getSeriesByIndex(_.seriesIndex),b=_.dataIndexInside,A=w&&w.getDataParams(b);if(A.axisDim=v.axisDim,A.axisIndex=v.axisIndex,A.axisType=v.axisType,A.axisId=v.axisId,A.axisValue=ad(d.axis,g),A.axisValueLabel=m,A){o.push(A);var S=w.formatTooltip(b,!0,null,l),D;if(lt(S)){D=S.html;var I=S.markers;ut(h,I)}else D=S;p.push(D)}});var y=m;l!=="html"?n.push(p.join(u)):n.push((y?kt(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=hp([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;lt(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 _t(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=sv(h,r,!0);else if(typeof h=="function"){var c=uA(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()})),z(e))r=hA(e[0],s),a=hA(e[1],l);else if(lt(e)){e.width=u[0],e.height=u[1];var v=qt(e,{width:s,height:l});r=v.x,a=v.y,h=null,f=null}else if(typeof e=="string"&&o){var d=Uz(e,c,u);r=d[0],a=d[1]}else{var d=Fz(r,a,i,s,l,h?null:20,f?null:20);r=d[0],a=d[1]}if(h&&(r-=cA(h)?u[0]/2:h==="right"?u[0]:0),f&&(a-=cA(f)?u[1]/2:f==="bottom"?u[1]:0),t.get("confine")){var d=Wz(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&&$s(e,function(a,i){var n=a.dataByAxis||{},o=t[i]||{},s=o.dataByAxis||[];r&=n.length===s.length,r&&$s(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&&$s(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){G.node||(this._tooltipContent.dispose(),kg("itemTooltip",e))}});function hp(t){for(var e=t.pop();t.length;){var r=t.pop();r&&(_t.isInstance(r)&&(r=r.get("tooltip",!0)),typeof r=="string"&&(r={formatter:r}),e=new _t(r,e,e.ecModel))}return e}function fA(t,e){return t.dispatchAction||it(e.dispatchAction,e)}function Fz(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 Wz(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 Uz(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 cA(t){return t==="center"||t==="middle"}mt({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),mt({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var $z=["rect","polygon","keep","clear"],Zz=function(t,e){var r=t&&t.brush;if(z(r)||(r=r?[r]:[]),!!r.length){var a=[];M(r,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var i=t&&t.toolbox;z(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),Yz(s),e&&!s.length&&s.push.apply(s,$z)}};function Yz(t){var e={};M(t,function(r){e[r]=1}),t.length=0,M(e,function(r,a){t.push(a)})}var vA=M;function dA(t){if(t){for(var e in t)if(t.hasOwnProperty(e))return!0}}function fp(t,e,r){var a={};return vA(e,function(n){var o=a[n]=i();vA(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=rt(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 gA(t,e,r){var a;M(r,function(i){e.hasOwnProperty(i)&&dA(e[i])&&(a=!0)}),a&&M(r,function(i){e.hasOwnProperty(i)&&dA(e[i])?t[i]=rt(e[i]):delete t[i]})}function Xz(t,e,r,a,i,n){var o={};M(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&&bA(e)}};function bA(t){return new vt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var eB=["#ddd"],t3=Ze({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&&gA(r,t,["inBrush","outOfBrush"]);var a=r.inBrush=r.inBrush||{};r.outOfBrush=r.outOfBrush||{color:eB},a.hasOwnProperty("liftZ")||(a.liftZ=5)},setAreas:function(t){T&&(gt(z(t)),M(t,function(e){gt(e.brushType,"Illegal areas")})),t&&(this.areas=V(t,function(e){return SA(this.option,e)},this))},setBrushOption:function(t){this.brushOption=SA(this.option,t),this.brushType=this.brushOption.brushType}});function SA(t,e){return ut({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new _t(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}he({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new ro(e.getZr())).on("brush",it(this._onBrush,this)).mount()},render:function(t){return this.model=t,gp.apply(this,arguments)},updateTransform:function(t,e){return _A(e),gp.apply(this,arguments)},updateView:gp,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:rt(t),$from:r}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:r,areas:rt(t),$from:r})}});function gp(t,e,r,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(r)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}mt({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(r){r.setAreas(t.areas)})}),mt({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),mt({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var rB=ua.toolbox.brush;function pp(t,e,r){this.model=t,this.ecModel=e,this.api=r,this._brushType,this._brushMode}pp.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:rt(rB.title)};var Vh=pp.prototype;Vh.render=Vh.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,M(t.get("type",!0),function(o){t.setIconStatus(o,(o==="keep"?i==="multiple":o==="clear"?n:o===a)?"emphasis":"normal")})},Vh.getIcons=function(){var t=this.model,e=t.get("icon",!0),r={};return M(t.get("type",!0),function(a){e[a]&&(r[a]=e[a])}),r},Vh.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}})},io("brush",pp),we(Zz),Ze({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"}}}),he({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=Xt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new dt({style:$t({},i,{text:t.get("text"),textFill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),f=new dt({style:$t({},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(){Zo(c,"_"+t.get("target"))}),v&&f.on("click",function(){Zo(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=qt(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,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var b=new xt({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});a.add(b)}}});var aB=function(t){var e=t&&t.timeline;z(e)||(e=e?[e]:[]),M(e,function(r){!r||iB(r)})};function iB(t){var e=t.type,r={number:"value",time:"time"};if(r[e]&&(t.axisType=r[e],delete t.type),AA(t),Xi(t,"controlPosition")){var a=t.controlStyle||(t.controlStyle={});Xi(a,"position")||(a.position=t.controlPosition),a.position==="none"&&!Xi(a,"show")&&(a.show=!1,delete a.position),delete t.controlPosition}M(t.data||[],function(i){lt(i)&&!z(i)&&(!Xi(i,"value")&&Xi(i,"name")&&(i.value=i.name),AA(i))})}function AA(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};M(a,function(o,s){!n[s]&&!Xi(i,s)&&(i[s]=o)}),r.label&&!Xi(a,"emphasis")&&(a.emphasis=r.label,delete r.label)}function Xi(t,e){return t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("timeline",function(){return"slider"}),mt({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"),J({currentIndex:r.option.currentIndex},t)}),mt({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var r=e.getComponent("timeline");r&&t.playState!=null&&r.setPlayState(t.playState)});var TA=wt.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){TA.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=[];M(e,function(s,l){var u=Io(s),h;lt(s)?(h=rt(s),h.value=l):h=l,i.push(h),!Lt(u)&&(u==null||isNaN(u))&&(u=""),a.push(u+"")}),e=i}var n={category:"ordinal",time:"time"}[r]||"number",o=this._data=new fe([{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()}}),nB=TA.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:[]}});Dt(nB,Tv);var oB=Fr.extend({type:"timeline"}),Gh=function(t,e,r,a){Qt.call(this,t,e,r),this.type=a||"value",this.model=null};Gh.prototype={constructor:Gh,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return this.model.get("orient")==="horizontal"}},It(Gh,Qt);var ei=it,mp=M,yp=Math.PI;oB.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 kt(s.scale.getLabel(l))},mp(["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=sB(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:yp/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*yp/180;var g,p,m,y,_=u.get("position",!0),w=h&&u.get("showPlayBtn",!0),b=h&&u.get("showPrevBtn",!0),A=h&&u.get("showNextBtn",!0),S=0,D=l;return _==="left"||_==="bottom"?(w&&(g=[0,0],S+=v),b&&(p=[S,0],S+=v),A&&(m=[D-f,0],D-=v)):(w&&(g=[D-f,0],D-=v),b&&(p=[0,0],S+=v),A&&(m=[D-f,0],D-=v)),y=[S,D],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=Ie(),o=i.x,s=i.y+i.height;yr(n,n,[-o,-s]),aa(n,n,-yp/2),yr(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,_,w,b,A){y[b]+=w[b][A]-_[b][A]}},_createAxis:function(t,e){var r=e.getData(),a=e.get("axisType"),i=zn(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 Gh("value",i,t.axisExtent,a);return o.model=e,o},_createGroup:function(t){var e=this["_"+t]=new q;return this.group.add(e),e},_renderAxisLine:function(t,e,r,a){var i=r.getExtent();!a.get("lineStyle.show")||e.add(new ye({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:et({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,r,a){var i=a.getData(),n=r.scale.getTicks();mp(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:ei(this._changeTimeline,this,o)},c=CA(l,u,e,f);Ot(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();mp(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 dt({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:ei(this._changeTimeline,this,l),silent:!1});$t(v.style,h,{text:s.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(v),Ot(v,$t({},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",ei(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"controlStyle.prevIcon",ei(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),ei(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=lB(a,v,l,p);e.add(m),Ot(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=ei(s._handlePointerDrag,s),u.ondragend=ei(s._handlePointerDragend,s),DA(u,n,r,a,!0)},onUpdate:function(u){DA(u,n,r,a)}};this._currentPointer=CA(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=_i(a.getExtent().slice());r>i[1]&&(r=i[1]),r"),i&&(n+=_p(i),r!=null&&(n+=" : ")),r!=null&&(n+=_p(a)),n},getData:function(){return this._data},setData:function(t){this._data=t}});Dt(Fh,Tv),Fh.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 IA=yt;function uB(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function hB(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function xp(t,e,r,a,i,n){var o=[],s=fa(e,a),l=s?e.getCalculationInfo("stackResultDimension"):a,u=Sp(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=py(e.get(a,h));return c=Math.min(c,20),c>=0&&(o[n]=+o[n].toFixed(c)),[o,f]}var wp=ot,bp={min:wp(xp,"min"),max:wp(xp,"max"),average:wp(xp,"average")};function Ys(t,e){var r=t.getData(),a=t.coordinateSystem;if(e&&!hB(e)&&!z(e.coord)&&a){var i=a.dimensions,n=LA(e,r,a,t);if(e=rt(e),e.type&&bp[e.type]&&n.baseAxis&&n.valueAxis){var o=IA(i,n.baseAxis.dim),s=IA(i,n.valueAxis.dim),l=bp[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++)bp[u[h]]&&(u[h]=Sp(r,r.mapDimension(i[h]),u[h]));e.coord=u}}return e}function LA(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(fB(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 fB(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=[Ys(t,a[0]),Ys(t,a[1]),et({},a[2])],a[2].type=a[2].type||"",ut(a[2],a[0]),ut(a[2],a[1]),a};function Wh(t){return!isNaN(t)&&!isFinite(t)}function RA(t,e,r,a){var i=1-t,n=a.dimensions[t];return Wh(e[i])&&Wh(r[i])&&e[t]===r[t]&&a.getAxis(n).containData(e[t])}function dB(t,e){if(t.type==="cartesian2d"){var r=e[0].coord,a=e[1].coord;if(r&&a&&(RA(1,r,a,t)||RA(0,r,a,t)))return!0}return Xs(t,e[0])&&Xs(t,e[1])}function Tp(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get("x"),i.getWidth()),u=H(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;Wh(t.get(h[0],e))?s[0]=v.toGlobalCoord(v.getExtent()[r?0:1]):Wh(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)}Ap.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){Tp(o,l,!0,a,r),Tp(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 oh);this.group.add(l.group);var u=gB(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");z(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);Tp(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 gB(t,e,r){var a;t?a=V(t&&t.dimensions,function(u){var h=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return J({name:u},h)}):a=[{name:"value",type:"float"}];var i=new fe(a,r),n=new fe(a,r),o=new fe([],r),s=V(r.get("data"),ot(vB,e,t,r));t&&(s=ee(s,ot(dB,t)));var l=t?PA:function(u){return u.value};return i.initData(V(s,function(u){return u[0]}),null,l),n.initData(V(s,function(u){return u[1]}),null,l),o.initData(V(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:n,line:o}}we(function(t){t.markLine=t.markLine||{}}),Fh.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 pB=function(t,e,r,a){var i=Ys(t,a[0]),n=Ys(t,a[1]),o=Ut,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=go([{},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 Uh(t){return!isNaN(t)&&!isFinite(t)}function OA(t,e,r,a){var i=1-t;return Uh(e[i])&&Uh(r[i])}function mB(t,e){var r=e.coord[0],a=e.coord[1];return t.type==="cartesian2d"&&r&&a&&(OA(1,r,a,t)||OA(0,r,a,t))?!0:Xs(t,{coord:r,x:e.x0,y:e.y0})||Xs(t,{coord:a,x:e.x1,y:e.y1})}function NA(t,e,r,a,i){var n=a.coordinateSystem,o=t.getItemModel(e),s,l=H(o.get(r[0]),i.getWidth()),u=H(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);Uh(h)?s[0]=v.toGlobalCoord(v.getExtent()[r[0]==="x0"?0:1]):Uh(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 kA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];Ap.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=V(kA,function(u){return NA(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 q});this.group.add(l.group),l.__keep=!0;var u=yB(i,t,e);e.setData(u),u.each(function(h){u.setItemLayout(h,V(kA,function(f){return NA(u,h,f,t,a)})),u.setItemVisual(h,{color:o.getVisual("color")})}),u.diff(l.__data).add(function(h){var f=new Ge({shape:{points:u.getItemLayout(h)}});u.setItemGraphicEl(h,f),l.group.add(f)}).update(function(h,f){var c=l.__data.getItemGraphicEl(f);ft(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(J(c.getModel("itemStyle").getItemStyle(),{fill:gl(g,.4),stroke:g})),h.hoverStyle=c.getModel("emphasis.itemStyle").getItemStyle(),Fe(h.style,h.hoverStyle,v,d,{labelFetcher:e,labelDataIndex:f,defaultText:u.getName(f)||"",isRectText:!0,autoColor:g}),Ot(h,{}),h.dataModel=e}),l.__data=u,l.group.silent=e.get("silent")||t.get("silent")}});function yB(t,e,r){var a,i,n=["x0","y0","x1","y1"];t?(a=V(t&&t.dimensions,function(l){var u=e.getData(),h=u.getDimensionInfo(u.mapDimension(l))||{};return J({name:l},h)}),i=new fe(V(n,function(l,u){return{name:l,type:a[u%2].type}}),r)):(a=[{name:"value",type:"float"}],i=new fe(a,r));var o=V(r.get("data"),ot(pB,e,t,r));t&&(o=ee(o,ot(mB,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}we(function(t){t.markArea=t.markArea||{}});var zA=ua.legend.selector,_B={all:{type:"all",title:rt(zA.all)},inverse:{type:"inverse",title:rt(zA.inverse)}},BA=Ze({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){BA.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),z(e)&&M(e,function(r,a){Lt(r)&&(r={type:r}),e[a]=ut(r,_B[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 qs(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();M(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}}mt("legendToggleSelect","legendselectchanged",ot(qs,"toggleSelected")),mt("legendAllSelect","legendselectall",ot(qs,"allSelect")),mt("legendInverseSelect","legendinverseselect",ot(qs,"inverseSelect")),mt("legendSelect","legendselected",ot(qs,"select")),mt("legendUnSelect","legendunselected",ot(qs,"unSelect"));var lo=ot,VA=M,$h=q,xB=he({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new $h),this._backgroundEl,this.group.add(this._selectorGroup=new $h),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=qt(l,u,h),c=this.layoutInner(t,i,f,a,o,s),v=qt(J({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=HS(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=ht(),u=e.get("selectedMode"),h=[];r.eachRawSeries(function(f){!f.get("legendHoverLink")&&h.push(f.id)}),VA(e.getData(),function(f,c){var v=f.get("name");if(!this.newlineDisabled&&(v===""||v===` `)){s.add(new $h({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"),w=this._createItem(v,c,f,e,y,_,t,p,m,u);w.on("click",lo(HA,v,null,a,h)).on("mouseover",lo(Cp,d.name,null,a,h)).on("mouseout",lo(Dp,d.name,null,a,h)),l.set(v,!0)}else r.eachRawSeries(function(b){if(!l.get(v)&&b.legendVisualProvider){var A=b.legendVisualProvider;if(!A.containName(v))return;var S=A.indexOfName(v),D=A.getItemVisual(S,"color"),I=A.getItemVisual(S,"borderColor"),L="roundRect",P=this._createItem(v,c,f,e,L,null,t,D,I,u);P.on("click",lo(HA,null,v,a,h)).on("mouseover",lo(Cp,null,v,a,h)).on("mouseout",lo(Dp,null,v,a,h)),l.set(v,!0)}},this);T&&(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();VA(t,function(s){o(s)});function o(s){var l=s.type,u=new dt({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");Fe(u.style,u.hoverStyle={},h,f,{defaultText:s.title,isRectText:!1}),Ot(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 $h,y=r.getModel("textStyle"),_=r.get("icon"),w=r.getModel("tooltip"),b=w.parentModel;i=_||i;var A=Ye(i,0,0,h,f,p?s:c,d??!0);if(m.add(GA(A,i,g,l,v,p)),!_&&n&&(n!==i||n==="none")){var S=f*.8;n==="none"&&(n="circle");var D=Ye(n,(h-S)/2,(f-S)/2,S,S,p?s:c,d??!0);m.add(GA(D,n,g,l,v,p))}var I=o==="left"?h+5:-5,L=o,P=a.get("formatter"),R=t;typeof P=="string"&&P?R=P.replace("{name}",t??""):typeof P=="function"&&(R=P(t)),m.add(new dt({style:$t({},y,{text:R,x:I,y:f/2,textFill:p?y.getTextColor():c,textAlign:L,textVerticalAlign:"middle"})}));var E=new xt({shape:m.getBoundingRect(),invisible:!0,tooltip:w.get("show")?et({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:a.componentIndex,name:t,$vars:["name"]}},w.option):null});return m.add(E),m.eachChild(function(Z){Z.silent=!0}),E.silent=!u,this.getContentGroup().add(m),Ot(m),m.__legendDataIndex=e,m},layoutInner:function(t,e,r,a,i,n){var o=this.getContentGroup(),s=this.getSelectorGroup();bi(t.get("orient"),o,t.get("itemGap"),r.width,r.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(i){bi("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 GA(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 HA(t,e,r,a){Dp(t,e,r,a),r.dispatchAction({type:"legendToggleSelect",name:t??e}),Cp(t,e,r,a)}function Cp(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 Dp(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 wB=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=Xt(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 xt({shape:_})),l.__rectSize=_[i]}else u.eachChild(function(b){b.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&ft(s,{position:w.contentPosition},c?t:!1),this._updatePageInfoView(t,w),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;M(["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",Lt(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=Mp[i],o=Ip[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=b&&w.s<=b+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}});mt("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 e3=ip.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"}}}),Zh=xt,qi=Nt,Pp=_i,ma=it,Ep=M,$A=7,bB=1,Rp=30,Ks="horizontal",ZA="vertical",SB=5,AB=["line","bar","candlestick","scatter"],Op=np.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(Op.superApply(this,"render",arguments),es(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(){Op.superApply(this,"remove",arguments),r_(this,"_dispatchZoomAction")},dispose:function(){Op.superApply(this,"dispose",arguments),r_(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new q;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===Ks?{right:a.width-r.x-r.width,top:a.height-Rp-$A,width:r.width,height:Rp}:{right:$A,top:r.y,width:Rp,height:r.height},n=Cn(t.option);M(["right","top","width","height"],function(s){n[s]==="ph"&&(n[s]=i[s])});var o=qt(n,a,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===ZA&&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===Ks&&!i?{scale:o?[1,1]:[1,-1]}:r===Ks&&i?{scale:o?[-1,1]:[-1,-1]}:r===ZA&&!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 Zh({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),r.add(new Zh({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:it(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:qi(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 Ge({shape:{points:u},style:J({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ir({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();M(o,function(s){if(!r&&!(e!==!0&&yt(AB,s.get("type"))<0)){var l=a.getComponent(i.axis,n).axis,u=TB(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 Zh({draggable:!0,cursor:YA(this._orient),drift:ma(this._onDragMove,this,"all"),ondragstart:ma(this._showDataInfo,this,!0),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1),style:{fill:n.get("fillerColor"),textPosition:"inside"}})),a.add(new Zh({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{stroke:n.get("dataBackgroundColor")||n.get("borderColor"),lineWidth:bB,fill:"rgba(0,0,0,0)"}})),Ep([0,1],function(o){var s=Ho(n.get("handleIcon"),{cursor:YA(this._orient),draggable:!0,drift:ma(this._onDragMove,this,o),ondragend:ma(this._onDragEnd,this),onmouseover:ma(this._showDataInfo,this,!0),onmouseout:ma(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),l=s.getBoundingRect();this._handleHeight=H(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 dt({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=[qi(t[0],[0,100],e,!0),qi(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];zi(e,a,i,r.get("zoomLock")?"all":t,n.minSpan!=null?qi(n.minSpan,o,i,!0):null,n.maxSpan!=null?qi(n.maxSpan,o,i,!0):null);var s=this._range,l=this._range=Pp([qi(a[0],i,o,!0),qi(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=Pp(r.slice()),i=this._size;Ep([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=Pp(this._handleEnds.slice());f.call(this,0),f.call(this,1);function f(c){var v=yi(r.handles[c].parent,this.group),d=jc(c===0?"right":"left",v),g=this._handleWidth/2+SB,p=Hr([h[c]+(c===0?-g:g),this._size[1]/2],v);a[c].setStyle({x:p[0],y:p[1],textVerticalAlign:i===Ks?"middle":d,textAlign:i===Ks?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 se(a)?a(t,n):Lt(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,oi(a.event);var i=this._displayables.barGroup.getLocalTransform(),n=Hr([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(Ep(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 TB(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function YA(t){return t==="vertical"?"ns-resize":"ew-resize"}ip.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var XA="\0_ec_dataZoom_roams";function CB(t,e){var r=KA(t),a=e.dataZoomId,i=e.coordId;M(r,function(s,l){var u=s.dataZoomInfos;u[a]&&yt(e.allCoordIds,i)<0&&(delete u[a],s.count--)}),jA(r);var n=r[i];n||(n=r[i]={coordId:i,dataZoomInfos:{},count:0},n.controller=MB(t,n),n.dispatchAction=ot(IB,t)),!n.dataZoomInfos[a]&&n.count++,n.dataZoomInfos[a]=e;var o=LB(n.dataZoomInfos);n.controller.enable(o.controlType,o.opt),n.controller.setPointerChecker(e.containsPoint),es(n,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function DB(t,e){var r=KA(t);M(r,function(a){a.controller.dispose();var i=a.dataZoomInfos;i[e]&&(delete i[e],a.count--)}),jA(r)}function qA(t){return t.type+"\0_"+t.id}function KA(t){var e=t.getZr();return e[XA]||(e[XA]={})}function MB(t,e){var r=new Yn(t.getZr());return M(["pan","zoom","scrollMove"],function(a){r.on(a,function(i){var n=[];M(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 jA(t){M(t,function(e,r){e.count||(e.controller.dispose(),delete t[r])})}function IB(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function LB(t){var e,r="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return M(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 PB=it,QA=np.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,r,a){QA.superApply(this,"render",arguments),this._range=t.getPercentRange(),M(this.getTargetCoordInfo(),function(i,n){var o=V(i,function(s){return qA(s.model)});M(i,function(s){var l=s.model,u={};M(["pan","zoom","scrollMove"],function(h){u[h]=PB(EB[h],this,s,n)},this),CB(r,{coordId:qA(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(){DB(this.api,this.dataZoomModel.id),QA.superApply(this,"dispose",arguments),this._range=null}}),EB={zoom:function(t,e,r,a){var i=this._range,n=i.slice(),o=t.axisModels[0];if(!!o){var s=Np[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(zi(0,n,[0,100],0,h.minSpan,h.maxSpan),this._range=n,i[0]!==n[0]||i[1]!==n[1])return n}},pan:JA(function(t,e,r,a,i,n){var o=Np[a]([n.oldX,n.oldY],[n.newX,n.newY],e,i,r);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:JA(function(t,e,r,a,i,n){var o=Np[a]([0,0],[n.scrollDelta,n.scrollDelta],e,i,r);return o.signal*(t[1]-t[0])*n.scrollDelta})};function JA(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(zi(l,o,[0,100],"all"),this._range=o,n[0]!==o[0]||n[1]!==o[1])return o}}}var Np={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}},tT=M,eT=function(t){var e=t&&t.visualMap;z(e)||(e=e?[e]:[]),tT(e,function(r){if(!!r){uo(r,"splitList")&&!uo(r,"pieces")&&(r.pieces=r.splitList,delete r.splitList);var a=r.pieces;a&&z(a)&&tT(a,function(i){lt(i)&&(uo(i,"start")&&!uo(i,"min")&&(i.min=i.start),uo(i,"end")&&!uo(i,"max")&&(i.max=i.end))})}})};function uo(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}wt.registerSubTypeDefaulter("visualMap",function(t){return!t.categories&&(!(t.pieces?t.pieces.length>0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"});var rT=Wr.VISUAL.COMPONENT;Rt(rT,{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(qz(a.stateList,a.targetVisuals,it(a.getValueState,a),a.getDataDimension(t.getData())))}),r}}),Rt(rT,{createOnAllSeries:!0,reset:function(t,e){var r=t.getData(),a=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(t)){var n=i.getVisualMeta(it(RB,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 RB(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"],z(t)&&(t=t.slice(),s=!0),l=e?t:s?[u(t[0]),u(t[1])]:u(t),Lt(o))return o.replace("{value}",s?l[0]:l).replace("{value2}",s?l[1]:l);if(se(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=zB([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={});ut(a,r),ut(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){kB(e.color)&&!u.inRange&&(u.inRange={color:e.color.slice().reverse()}),u.inRange=u.inRange||{color:t.get("gradientColor")},zp(this.stateList,function(h){var f=u[h];if(Lt(f)){var c=kp.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]={},zp(c,function(d,g){if(!!Mt.isValidType(g)){var p=kp.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");zp(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&&rt(h)||(n?"roundRect":["roundRect"])),g.symbolSize==null&&(g.symbolSize=f&&rt(f)||(n?d[0]:[d[0],d[0]])),g.symbol=aT(g.symbol,function(y){return y==="none"||y==="square"?"roundRect":y});var p=g.symbolSize;if(p!=null){var m=-1/0;NB(p,function(y){y>m&&(m=y)}),g.symbolSize=aT(p,function(y){return BB(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:Bp,getValueState:Bp,getVisualMeta:Bp}),iT=[20,140],nT=Yh.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){nT.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){nT.superApply(this,"resetItemSize",arguments);var t=this.itemSize;this._orient==="horizontal"&&t.reverse(),(t[0]==null||isNaN(t[0]))&&(t[0]=iT[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=iT[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):z(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(){Yh.prototype.completeVisualOption.apply(this,arguments),M(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=_i((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=oT(this,"outOfRange",this.getExtent()),r=oT(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 q(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;VB([0,1],function(o){var s=i[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=Hr(r.handleLabelPoints[o],yi(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=ya(t,n,s,!0),u=this._shapes,h=u.indicator;if(!!h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",WB(!!r,a,l,o[1]));var f={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",f);h.setStyle("fill",c);var v=Hr(u.indicatorLabelPoint,yi(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]=qh(js(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=qh(js(i[0],t),i[1]);var o=UB(r,n,i),s=[t-o,t+o],l=ya(t,i,n,!0),u=[ya(s[0],i,n,!0),ya(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||hT(r))&&(f=this._hoverLinkDataIndices=r.findTargetDataIndices(u));var c=vD(h,f);this._dispatchHighDown("downplay",Xh(c[0],r)),this._dispatchHighDown("highlight",Xh(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",Xh(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=yi(e,a?null:this.group);return sa[z(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 Kh(t,e,r,a){return new Ge({shape:{points:t},draggable:!!r,cursor:e,drift:r,onmousemove:function(i){oi(i.event)},ondragend:a})}function FB(t,e){return t===0?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function WB(t,e,r,a){return t?[[0,-qh(e,js(r,0))],[uT,0],[0,qh(e,js(a-r,0))]]:[[0,0],[5,-5],[5,5]]}function UB(t,e,r){var a=GB/2,i=t.get("hoverLinkDataSize");return i&&(a=ya(i,e,r,!0)/2),a}function hT(t){var e=t.get("hoverLinkOnHandle");return!!(e??t.get("realtime"))}function fT(t){return t==="vertical"?"ns-resize":"ew-resize"}var $B={type:"selectDataRange",event:"dataRangeSelected",update:"update"};mt($B,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(r){r.setSelected(t.selected)})}),we(eT);var ZB=Yh.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){ZB.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var r=this._mode=this._determineMode();YB[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=rt(a)):(i.dataExtent=this.getExtent(),i.mappingMethod="piecewise",i.pieceList=V(this._pieceList,function(s){var s=rt(s);return n!=="inRange"&&(s.visual=null),s}))})},completeVisualOption:function(){var t=this.option,e={},r=Mt.listVisualTypes(),a=this.isCategory();M(t.pieces,function(n){M(r,function(o){n.hasOwnProperty(o)&&(e[o]=1)})}),M(e,function(n,o){var s=0;M(this.stateList,function(l){s|=i(t,l,o)||i(t.target,l,o)},this),!s&&M(this.stateList,function(l){(t[l]||(t[l]={}))[o]=kp.get(o,l==="inRange"?"active":"inactive",a)})},this);function i(n,o,s){return n&&n[o]&&(lt(n[o])?n[o].hasOwnProperty(s):n[o]===s)}Yh.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,M(a,function(o,s){var l=this.getSelectedMapKey(o);i.hasOwnProperty(l)||(i[l]=!0)},this),r.selectedMode==="single"){var n=!1;M(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=rt(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 M(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}}}),YB={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),cT(t,e),nv(e),M(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 cT(t,e){var r=t.inverse;(t.orient==="vertical"?!r:r)&&e.reverse()}var r3=sT.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=Ut(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,o),M(l.viewPieceList,f,this),u&&this._renderEndsText(t,u[1],s,h,o),bi(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t);function f(c){var v=c.piece,d=new q;d.onclick=it(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 dt({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",it(r,this,"highlight")).on("mouseout",it(r,this,"downplay"));function r(a){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:a,batch:Xh(i.findTargetDataIndices(e),i)})}},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if(e.orient==="vertical")return lT(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 q,o=this.visualMapModel.textStyleModel;n.add(new dt({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=V(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(Ye(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=rt(r.selected),i=e.getSelectedMapKey(t);r.selectedMode==="single"?(a[i]=!0,M(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})}});we(eT);var vT="urn:schemas-microsoft-com:vml",dT=typeof window>"u"?null:window,gT=!1,Ke=dT&&dT.document;function Vp(t){return Gp(t)}var Gp;if(Ke&&!G.canvasSupported)try{!Ke.namespaces.zrvml&&Ke.namespaces.add("zrvml",vT),Gp=function(t){return Ke.createElement("')}}catch{Gp=function(e){return Ke.createElement("<"+e+' xmlns="'+vT+'" class="zrvml">')}}function XB(){if(!(gT||!Ke)){gT=!0;var t=Ke.styleSheets;t.length<31?Ke.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}var Ki=Oe.CMD,Tt=Math.round,Qs=Math.sqrt,qB=Math.abs,pT=Math.cos,mT=Math.sin,Hp=Math.max;if(!G.canvasSupported){var Jt=",",Fp="progid:DXImageTransform.Microsoft",Ft=21600,Be=Ft/2,KB=1e5,jB=1e3,Wp=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ft+","+Ft,t.coordorigin="0,0"},QB=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},yT=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},Kr=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Js=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Up=function(t,e,r){return(parseFloat(t)||0)*KB+(parseFloat(e)||0)*jB+r},_T=cc,xT=function(t,e,r){var a=Ve(e);r=+r,isNaN(r)&&(r=1),a&&(t.color=yT(a[0],a[1],a[2]),t.opacity=r*a[3])},JB=function(t){var e=Ve(t);return[yT(e[0],e[1],e[2]),e[3]]},t5=function(t,e,r){var a=e.fill;if(a!=null)if(a instanceof Vr){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&&(Pt(v,v,c),Pt(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&&Pt(v,v,c),y/=m[0]*Ft,_/=m[1]*Ft;var w=Hp(y,_);s=2*0/w,l=2*a.r/w-s}var b=a.colorStops.slice();b.sort(function($,X){return $.offset-X.offset});for(var A=b.length,S=[],D=[],I=0;I=2){var R=S[0][0],E=S[1][0],Z=S[0][1]*e.opacity,W=S[1][1]*e.opacity;t.type=i,t.method="none",t.focus="100%",t.angle=n,t.color=R,t.color2=E,t.colors=D.join(","),t.opacity=W,t.opacity2=Z}i==="radial"&&(t.focusposition=o.join(","))}else xT(t,a,e.opacity)},e5=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),e.stroke!=null&&!(e.stroke instanceof Vr)&&xT(t,e.stroke,e.opacity)},jh=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 Vr&&Js(t,n),n||(n=Vp(e)),i?t5(n,r,a):e5(n,r),Kr(t,n)):(t[i?"filled":"stroked"]="false",Js(t,n))},je=[[],[],[]],r5=function(t,e){var r=Ki.M,a=Ki.C,i=Ki.L,n=Ki.A,o=Ki.Q,s=[],l,u,h,f,c,v,d=t.data,g=t.len();for(f=0;f.01?W&&($+=270/Ft):Math.abs(X-L)<1e-4?W&&$I?Q-=270/Ft:Q+=270/Ft:W&&XL?K+=270/Ft:K-=270/Ft),s.push(j,Tt(((I-P)*A+w)*Ft-Be),Jt,Tt(((L-R)*S+b)*Ft-Be),Jt,Tt(((I+P)*A+w)*Ft-Be),Jt,Tt(((L+R)*S+b)*Ft-Be),Jt,Tt(($*A+w)*Ft-Be),Jt,Tt((X*S+b)*Ft-Be),Jt,Tt((K*A+w)*Ft-Be),Jt,Tt((Q*S+b)*Ft-Be)),c=K,v=Q;break;case Ki.R:var U=je[0],tt=je[1];U[0]=d[f++],U[1]=d[f++],tt[0]=U[0]+d[f++],tt[1]=U[1]+d[f++],e&&(Pt(U,U,e),Pt(tt,tt,e)),U[0]=Tt(U[0]*Ft-Be),tt[0]=Tt(tt[0]*Ft-Be),U[1]=Tt(U[1]*Ft-Be),tt[1]=Tt(tt[1]*Ft-Be),s.push(" m ",U[0],Jt,U[1]," l ",tt[0],Jt,U[1]," l ",tt[0],Jt,tt[1]," l ",U[0],Jt,tt[1]);break;case Ki.Z:s.push(" x ")}if(l>0){s.push(u);for(var ct=0;cti5&&(Yp=0,Zp={});var r=n5.style,a;try{r.font=t,a=r.fontFamily.split(",")[0]}catch{}e={style:r.fontStyle||$p,variant:r.fontVariant||$p,weight:r.fontWeight||$p,size:parseFloat(r.fontSize||12)|0,family:a||"Microsoft YaHei"},Zp[t]=e,Yp++}return e},ri;BC("measureText",function(t,e){var r=Ke;ri||(ri=r.createElement("div"),ri.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",Ke.body.appendChild(ri));try{ri.style.font=e}catch{}return ri.innerHTML="",ri.appendChild(r.createTextNode(t)),{width:ri.offsetWidth}});for(var Xp=new vt,s5=function(t,e,r,a){var i=this.style;this.__dirty&&Mo(i,!0);var n=i.text;if(n!=null&&(n+=""),!!n){if(i.rich){var o=ic(n,i);n=[];for(var s=0;s-TT}function d5(t,e){var r=e?t.textFill:t.fill;return r!=null&&r!==fo}function g5(t,e){var r=e?t.textStroke:t.stroke;return r!=null&&r!==fo}function Qp(t,e){e&&Wt(t,"transform","matrix("+c5.call(e,",")+")")}function Wt(t,e,r){(!r||r.type!=="linear"&&r.type!=="radial")&&t.setAttribute(e,r)}function p5(t,e,r){t.setAttributeNS("http://www.w3.org/1999/xlink",e,r)}function DT(t,e,r,a){if(d5(e,r)){var i=r?e.textFill:e.fill;i=i==="transparent"?fo:i,Wt(t,"fill",i),Wt(t,"fill-opacity",e.fillOpacity!=null?e.fillOpacity*e.opacity:e.opacity)}else Wt(t,"fill",fo);if(g5(e,r)){var n=r?e.textStroke:e.stroke;n=n==="transparent"?fo:n,Wt(t,"stroke",n);var o=r?e.textStrokeWidth:e.lineWidth,s=!r&&e.strokeNoScale?a.getLineScale():1;Wt(t,"stroke-width",o/s),Wt(t,"paint-order",r?"stroke":"fill"),Wt(t,"stroke-opacity",e.strokeOpacity!=null?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Wt(t,"stroke-dasharray",e.lineDash.join(",")),Wt(t,"stroke-dashoffset",jp(e.lineDashOffset||0))):Wt(t,"stroke-dasharray",""),e.lineCap&&Wt(t,"stroke-linecap",e.lineCap),e.lineJoin&&Wt(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Wt(t,"stroke-miterlimit",e.miterLimit)}else Wt(t,"stroke",fo)}function m5(t){for(var e=[],r=t.data,a=t.len(),i=0;i=ai:-v>=ai),y=v>0?v%ai:v%ai+ai,_=!1;m?_=!0:CT(p)?_=!1:_=y>=AT==!!g;var w=Lr(l+h*ST(c)),b=Lr(u+f*bT(c));m&&(g?v=ai-1e-4:v=-ai+1e-4,_=!0,i===9&&e.push("M",w,b));var A=Lr(l+h*ST(c+v)),S=Lr(u+f*bT(c+v));e.push("A",Lr(h),Lr(f),jp(d*v5),+_,+g,A,S);break;case ji.Z:o="Z";break;case ji.R:var A=Lr(r[i++]),S=Lr(r[i++]),D=Lr(r[i++]),I=Lr(r[i++]);e.push("M",A,S,"L",A+D,S,"L",A+D,S+I,"L",A,S+I,"L",A,S);break}o&&e.push(o);for(var L=0;LP){for(;I=i&&u+1>=n){for(var h=[],f=0;f=i&&y+1>=n)return w5(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]},zt.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)}}},zt.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},zt.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},zt.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return M(this._tagNames,function(r){var a=t.getElementsByTagName(r);e=e.concat([].slice.call(a))}),e},zt.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;M(t,function(r){r[e._markLabel]=T5})},zt.prototype.markUsed=function(t){t&&(t[this._markLabel]=LT)},zt.prototype.removeUnused=function(){var t=this.getDefs(!1);if(!!t){var e=this.getDoms(),r=this;M(e,function(a){a[r._markLabel]!==LT&&t.removeChild(a)})}},zt.prototype.getSvgProxy=function(t){return t instanceof pt?tl:t instanceof ve?Jp:t instanceof dt?Jh:tl},zt.prototype.getTextSvgElement=function(t){return t.__textSvgEl},zt.prototype.getSvgElement=function(t){return t.__svgEl};function Qi(t,e){zt.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}It(Qi,zt),Qi.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var r=this;M(["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+")")}})}},Qi.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 Ta("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},Qi.prototype.update=function(t){var e=this;zt.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))})},Qi.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{Ta("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=Ve(o)[3],l=kf(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},Qi.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&zt.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&zt.prototype.markUsed.call(this,e._dom)}};function rl(t,e){zt.call(this,t,e,"clipPath","__clippath_in_use__")}It(rl,zt),rl.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)},rl.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);Sa(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")},rl.prototype.markUsed=function(t){var e=this;t.__clipPaths&&M(t.__clipPaths,function(r){r._dom&&zt.prototype.markUsed.call(e,r._dom),r._textDom&&zt.prototype.markUsed.call(e,r._textDom)})};function ii(t,e){zt.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}It(ii,zt),ii.prototype.addWithoutUpdate=function(t,e){if(e&&PT(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+")"}},ii.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},ii.prototype.update=function(t,e){var r=e.style;if(PT(r)){var a=this;zt.prototype.update.call(this,e,function(){a.updateDom(e,e._shadowDom)})}else this.remove(t,e)},ii.prototype.remove=function(t,e){e._shadowDomId!=null&&(this.removeDom(t),t.style.filter="")},ii.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},ii.prototype.markUsed=function(t){t._shadowDom&&zt.prototype.markUsed.call(this,t._shadowDom)};function PT(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function ef(t){return parseInt(t,10)}function C5(t){return t instanceof pt?tl:t instanceof ve?Jp:t instanceof dt?Jh:tl}function ET(t,e){return e&&t&&e.parentNode!==t}function al(t,e,r){if(ET(t,e)&&r){var a=r.nextSibling;a?t.insertBefore(e,a):t.appendChild(e)}}function RT(t,e){if(ET(t,e)){var r=t.firstChild;r?t.insertBefore(e,r):t.appendChild(e)}}function OT(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function il(t){return t.__textSvgEl}function nl(t){return t.__svgEl}var rf=function(t,e,r,a){this.root=t,this.storage=e,this._opts=r=et({},r||{});var i=jr("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=jr("g");i.appendChild(n);var o=jr("g");i.appendChild(o),this.gradientManager=new Qi(a,o),this.clipPathManager=new rl(a,o),this.shadowManager=new ii(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=[]};rf.prototype={constructor:rf,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=jr("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]||ef(s[r])||ef(o.style[r]))-(ef(s[i])||0)-(ef(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 D5(t){return function(){Ta('In SVG mode painter not support method "'+t+'"')}}M(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){rf.prototype[t]=D5(t)}),Ic("svg",rf),x.version=p_,x.dependencies=Ev,x.PRIORITY=Wr,x.init=h2,x.connect=f2,x.disConnect=E_,x.disconnect=c2,x.dispose=v2,x.getInstanceByDom=Gv,x.getInstanceById=d2,x.registerTheme=Hv,x.registerPreprocessor=we,x.registerProcessor=$e,x.registerPostUpdate=g2,x.registerAction=mt,x.registerCoordinateSystem=Fv,x.getCoordinateSystemDimensions=p2,x.registerLayout=Gt,x.registerVisual=Rt,x.registerLoading=R_,x.extendComponentModel=Ze,x.extendComponentView=he,x.extendSeriesModel=Mu,x.extendChartView=ke,x.setCanvasCreator=m2,x.registerMap=y2,x.getMap=_2,x.dataTool=x2,x.zrender=hD,x.number=SM,x.format=MM,x.throttle=du,x.helper=cL,x.matrix=gC,x.vector=eC,x.color=xC,x.parseGeoJSON=od,x.parseGeoJson=AL,x.util=_1,x.graphic=x1,x.List=fe,x.Model=_t,x.Axis=Qt,x.env=G});var co=zT.echarts;var am=N5(VT(),1);function k5(x){return x!=null}var st=k5;function tn(x){this.name="DeveloperError",this.message=x;let C;try{throw new Error}catch(T){C=T.stack}this.stack=C}st(Object.create)&&(tn.prototype=Object.create(Error.prototype),tn.prototype.constructor=tn);tn.prototype.toString=function(){let x=`${this.name}: ${this.message}`;return st(this.stack)&&(x+=` ${this.stack.toString()}`),x};tn.throwInstantiationError=function(){throw new tn("This function defines an interface and should not be called directly.")};var at=tn;var ne={};ne.typeOf={};function z5(x){return`${x} is required, actual value was undefined`}function vo(x,C,T){return`Expected ${T} to be typeof ${C}, actual typeof was ${x}`}ne.defined=function(x,C){if(!st(C))throw new at(z5(x))};ne.typeOf.func=function(x,C){if(typeof C!="function")throw new at(vo(typeof C,"function",x))};ne.typeOf.string=function(x,C){if(typeof C!="string")throw new at(vo(typeof C,"string",x))};ne.typeOf.number=function(x,C){if(typeof C!="number")throw new at(vo(typeof C,"number",x))};ne.typeOf.number.lessThan=function(x,C,T){if(ne.typeOf.number(x,C),C>=T)throw new at(`Expected ${x} to be less than ${T}, actual value was ${C}`)};ne.typeOf.number.lessThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C>T)throw new at(`Expected ${x} to be less than or equal to ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThan=function(x,C,T){if(ne.typeOf.number(x,C),C<=T)throw new at(`Expected ${x} to be greater than ${T}, actual value was ${C}`)};ne.typeOf.number.greaterThanOrEquals=function(x,C,T){if(ne.typeOf.number(x,C),C0?1:-1});B.signNotZero=function(x){return x<0?-1:1};B.toSNorm=function(x,C){return C=oe(C,255),Math.round((B.clamp(x,-1,1)*.5+.5)*C)};B.fromSNorm=function(x,C){return C=oe(C,255),B.clamp(x,0,C)/C*2-1};B.normalize=function(x,C,T){return T=Math.max(T-C,0),T===0?0:B.clamp((x-C)/T,0,1)};B.sinh=oe(Math.sinh,function(C){return(Math.exp(C)-Math.exp(-C))/2});B.cosh=oe(Math.cosh,function(C){return(Math.exp(C)+Math.exp(-C))/2});B.lerp=function(x,C,T){return(1-T)*x+T*C};B.PI=Math.PI;B.ONE_OVER_PI=1/Math.PI;B.PI_OVER_TWO=Math.PI/2;B.PI_OVER_THREE=Math.PI/3;B.PI_OVER_FOUR=Math.PI/4;B.PI_OVER_SIX=Math.PI/6;B.THREE_PI_OVER_TWO=3*Math.PI/2;B.TWO_PI=2*Math.PI;B.ONE_OVER_TWO_PI=1/(2*Math.PI);B.RADIANS_PER_DEGREE=Math.PI/180;B.DEGREES_PER_RADIAN=180/Math.PI;B.RADIANS_PER_ARCSECOND=B.RADIANS_PER_DEGREE/3600;B.toRadians=function(x){if(!st(x))throw new at("degrees is required.");return x*B.RADIANS_PER_DEGREE};B.toDegrees=function(x){if(!st(x))throw new at("radians is required.");return x*B.DEGREES_PER_RADIAN};B.convertLongitudeRange=function(x){if(!st(x))throw new at("angle is required.");let C=B.TWO_PI,T=x-Math.floor(x/C)*C;return T<-Math.PI?T+C:T>=Math.PI?T-C:T};B.clampToLatitudeRange=function(x){if(!st(x))throw new at("angle is required.");return B.clamp(x,-1*B.PI_OVER_TWO,B.PI_OVER_TWO)};B.negativePiToPi=function(x){if(!st(x))throw new at("angle is required.");return x>=-B.PI&&x<=B.PI?x:B.zeroToTwoPi(x+B.PI)-B.PI};B.zeroToTwoPi=function(x){if(!st(x))throw new at("angle is required.");if(x>=0&&x<=B.TWO_PI)return x;let C=B.mod(x,B.TWO_PI);return Math.abs(C)B.EPSILON14?B.TWO_PI:C};B.mod=function(x,C){if(!st(x))throw new at("m is required.");if(!st(C))throw new at("n is required.");if(C===0)throw new at("divisor cannot be 0.");return B.sign(x)===B.sign(C)&&Math.abs(x)T};B.greaterThanOrEquals=function(x,C,T){if(!st(x))throw new at("first is required.");if(!st(C))throw new at("second is required.");if(!st(T))throw new at("absoluteEpsilon is required.");return x-C>-T};var af=[1];B.factorial=function(x){if(typeof x!="number"||x<0)throw new at("A number greater than or equal to 0 is required.");let C=af.length;if(x>=C){let T=af[C-1];for(let N=C;N<=x;N++){let k=T*N;af.push(k),T=k}}return af[x]};B.incrementWrap=function(x,C,T){if(T=oe(T,0),!st(x))throw new at("n is required.");if(C<=T)throw new at("maximumValue must be greater than minimumValue.");return++x,x>C&&(x=T),x};B.isPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x!==0&&(x&x-1)===0};B.nextPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>2147483648)throw new at("A number between 0 and 2^31 is required.");return--x,x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,++x,x};B.previousPowerOfTwo=function(x){if(typeof x!="number"||x<0||x>4294967295)throw new at("A number between 0 and (2^32)-1 is required.");return x|=x>>1,x|=x>>2,x|=x>>4,x|=x>>8,x|=x>>16,x|=x>>32,x=(x>>>0)-(x>>>1),x};B.clamp=function(x,C,T){return Y.typeOf.number("value",x),Y.typeOf.number("min",C),Y.typeOf.number("max",T),xT?T:x};var HT=new am.default;B.setRandomNumberSeed=function(x){if(!st(x))throw new at("seed is required.");HT=new am.default(x)};B.nextRandomNumber=function(){return HT.random()};B.randomBetween=function(x,C){return B.nextRandomNumber()*(C-x)+x};B.acosClamped=function(x){if(!st(x))throw new at("value is required.");return Math.acos(B.clamp(x,-1,1))};B.asinClamped=function(x){if(!st(x))throw new at("value is required.");return Math.asin(B.clamp(x,-1,1))};B.chordLength=function(x,C){if(!st(x))throw new at("angle is required.");if(!st(C))throw new at("radius is required.");return 2*C*Math.sin(x*.5)};B.logBase=function(x,C){if(!st(x))throw new at("number is required.");if(!st(C))throw new at("base is required.");return Math.log(x)/Math.log(C)};B.cbrt=oe(Math.cbrt,function(C){let T=Math.pow(Math.abs(C),.3333333333333333);return C<0?-T:T});B.log2=oe(Math.log2,function(C){return Math.log(C)*Math.LOG2E});B.fog=function(x,C){let T=x*C;return 1-Math.exp(-(T*T))};B.fastApproximateAtan=function(x){return Y.typeOf.number("x",x),x*(-.1784*Math.abs(x)-.0663*x*x+1.0301)};B.fastApproximateAtan2=function(x,C){Y.typeOf.number("x",x),Y.typeOf.number("y",C);let T,N=Math.abs(x);T=Math.abs(C);let k=Math.max(N,T);T=Math.min(N,T);let F=T/k;if(isNaN(F))throw new at("either x or y must be nonzero");return N=B.fastApproximateAtan(F),N=Math.abs(C)>Math.abs(x)?B.PI_OVER_TWO-N:N,N=x<0?B.PI-N:N,N=C<0?-N:N,N};var Qe=B;var nf={ellipsoidCoordinates:null,changeApproximateTerrainHeights:!1,minTerrainHeight:-2e4,maxTerrainHeight:2e4};nf.isMoon=function(){return nf.ellipsoidCoordinates==="MOON"||nf.ellipsoidCoordinates==="MOON2000"};var of=nf;function O(x,C,T){this.x=oe(x,0),this.y=oe(C,0),this.z=oe(T,0)}O.fromSpherical=function(x,C){Y.typeOf.object("spherical",x),st(C)||(C=new O);let T=x.clock,N=x.cone,k=oe(x.magnitude,1),F=k*Math.sin(N);return C.x=F*Math.cos(T),C.y=F*Math.sin(T),C.z=k*Math.cos(N),C};O.fromElements=function(x,C,T,N){return st(N)?(N.x=x,N.y=C,N.z=T,N):new O(x,C,T)};O.clone=function(x,C){if(!!st(x))return st(C)?(C.x=x.x,C.y=x.y,C.z=x.z,C):new O(x.x,x.y,x.z)};O.fromCartesian4=O.clone;O.packedLength=3;O.pack=function(x,C,T){return Y.typeOf.object("value",x),Y.defined("array",C),T=oe(T,0),C[T++]=x.x,C[T++]=x.y,C[T]=x.z,C};O.unpack=function(x,C,T){return Y.defined("array",x),C=oe(C,0),st(T)||(T=new O),T.x=x[C++],T.y=x[C++],T.z=x[C],T};O.packArray=function(x,C){Y.defined("array",x);let T=x.length,N=T*3;if(!st(C))C=new Array(N);else{if(!Array.isArray(C)&&C.length!==N)throw new at("If result is a typed array, it must have exactly array.length * 3 elements");C.length!==N&&(C.length=N)}for(let k=0;kde?!1:[en.x-this._mapOffset[0],en.y-this._mapOffset[1]]},Ct.prototype.pointToData=function(Yt){var de=this._mapOffset,Yt=this._bmap.project([Yt[0]+de[0],Yt[1]+de[1]]);return[Yt.lng,Yt.lat]},Ct.prototype.getViewRect=function(){var te=this._api;return new St.graphic.BoundingRect(0,0,te.getWidth(),te.getHeight())},Ct.prototype.getRoamTransform=function(){return St.matrix.create()},Ct.dimensions=Ct.prototype.dimensions,Ct.create=function(te,de){var Yt;te.eachComponent("GLMap",function(gr){var en=de.getZr().painter.getViewportRoot(),Pr=St.glMap;Yt=new Ct(Pr,de),Yt.setMapOffset(gr.__mapOffset||[0,0]),gr.coordinateSystem=Yt}),te.eachSeries(function(gr){gr.get("coordinateSystem")==="GLMap"&&(gr.coordinateSystem=Yt)})},Ct}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){T.exports=C},function(T,N,k){var F;F=function(G){return k(2).extendComponentModel({type:"GLMap",getBMap:function(){return this.__GLMap},defaultOption:{roam:!1}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N,k){var F;F=function(G){return k(2).extendComponentView({type:"GLMap",init:function(St,Ct){this.api=Ct,co.glMap.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.dispatchAction({type:"GLMapRoam"})},render:function(St,Ct,te){},dispose:function(St,Ct){co.glMap.postRender.removeEventListener(this.moveHandler,this)}})}.call(N,k,N,T),F!==void 0&&(T.exports=F)},function(T,N){function k(F,G){this._mapContainer=F,this._overlay=this._createChartOverlay(),this._overlay.setOption(G)}k.prototype._createChartOverlay=function(){var F=this._mapContainer.scene;F.canvas.setAttribute("tabIndex",0);var G=document.createElement("div");return G.style.position="absolute",G.style.top="0px",G.style.left="0px",G.style.width=F.canvas.width+"px",G.style.height=F.canvas.height+"px",G.style.pointerEvents="none",G.setAttribute("id","echarts"),G.setAttribute("class","echartMap"),this._mapContainer.container.appendChild(G),this._echartsContainer=G,co.glMap=F,co.init(G)},k.prototype.dispose=function(){this._echartsContainer&&(this._mapContainer.container.removeChild(this._echartsContainer),this._echartsContainer=null),this._overlay&&(this._overlay.dispose(),this._overlay=null)},k.prototype.destroy=function(){this.dispose()},k.prototype.updateOverlay=function(F){this._overlay&&this._overlay.setOption(F)},k.prototype.getMap=function(){return this._mapContainer},k.prototype.getOverlay=function(){return this._overlay},T.exports=k}])});var P3=$T.FlowEcharts;})();