>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=n,i=s,n=l,a.push([s/t,l/t])}return a}function TV(r,e){return r=bV(r),G(It(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,i=t.geometry,n=[];switch(i.type){case"Polygon":var o=i.coordinates;n.push(new C_(o[0],o.slice(1)));break;case"MultiPolygon":A(i.coordinates,function(l){l[0]&&n.push(new C_(l[0],l.slice(1)))});break;case"LineString":n.push(new A_([i.coordinates]));break;case"MultiLineString":n.push(new A_(i.coordinates))}var s=new BA(a[e||"name"],n,a.cp);return s.properties=a,s})}var Hs=bt();function CV(r){return r.type==="category"?MV(r):LV(r)}function AV(r,e){return r.type==="category"?DV(r,e):{ticks:G(r.scale.getTicks(),function(t){return t.value})}}function MV(r){var e=r.getLabelModel(),t=GA(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function GA(r,e){var t=FA(r,"labels"),a=Hg(e),i=HA(t,a);if(i)return i;var n,o;return K(a)?n=UA(r,a):(o=a==="auto"?IV(r):a,n=$A(r,o)),WA(t,a,{labels:n,labelCategoryInterval:o})}function DV(r,e){var t=FA(r,"ticks"),a=Hg(e),i=HA(t,a);if(i)return i;var n,o;if((!e.get("show")||r.scale.isBlank())&&(n=[]),K(a))n=UA(r,a,!0);else if(a==="auto"){var s=GA(r,r.getLabelModel());o=s.labelCategoryInterval,n=G(s.labels,function(l){return l.tickValue})}else o=a,n=$A(r,o,!0);return WA(t,a,{ticks:n,tickCategoryInterval:o})}function LV(r){var e=r.scale.getTicks(),t=vl(r);return{labels:G(e,function(a,i){return{level:a.level,formattedLabel:t(a,i),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function FA(r,e){return Hs(r)[e]||(Hs(r)[e]=[])}function HA(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=n[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),v=0,c=0;l<=n[1];l+=s){var p=0,d=0,g=rl(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),c=Math.max(c,d,7)}var y=v/f,m=c/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=Hs(r.model),w=r.getExtent(),x=S.lastAutoInterval,b=S.lastTickCount;return x!=null&&b!=null&&Math.abs(x-_)<=1&&Math.abs(b-o)<=1&&x>_&&S.axisExtent0===w[0]&&S.axisExtent1===w[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=w[0],S.axisExtent1=w[1]),_}function RV(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function $A(r,e,t){var a=vl(r),i=r.scale,n=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=n[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=NA(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==n[0]&&d(n[0]);for(var p=u;p<=n[1];p+=l)d(p);c&&p-l!==n[1]&&d(n[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:i.getLabel(y),tickValue:g})}return s}function UA(r,e,t){var a=r.scale,i=vl(r),n=[];return A(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&n.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),n}var M_=[0,1],EV=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=a&&e<=i},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return Mb(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(a=a.slice(),D_(a,i.count())),Lt(e,M_,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(a=a.slice(),D_(a,i.count()));var n=Lt(e,a,M_,t);return this.scale.scale(n)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=AV(this,t),i=a.ticks,n=G(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return kV(this,n,o,e.clamp),n},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),i=G(a,function(n){return G(n,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return CV(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/a},r.prototype.calculateCategoryInterval=function(){return PV(this)},r}();function D_(r,e){var t=r[1]-r[0],a=e,i=t/a/2;r[0]+=i,r[1]-=i}function kV(r,e,t,a){var i=e.length;if(!r.onBand||t||!i)return;var n=r.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;A(e,function(c){c.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var h=n[0]>n[1];v(e[0].coord,n[0])&&(a?e[0].coord=n[0]:e.shift()),a&&v(n[0],e[0].coord)&&e.unshift({coord:n[0]}),v(n[1],o.coord)&&(a?o.coord=n[1]:e.pop()),a&&v(o.coord,n[1])&&e.push({coord:n[1]});function v(c,p){return c=$t(c),p=$t(p),h?c>p:ci&&(i+=Fo);var c=Math.atan2(s,o);if(c<0&&(c+=Fo),c>=a&&c<=i||c+Fo>=a&&c+Fo<=i)return l[0]=f,l[1]=h,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(i)+r,y=t*Math.sin(i)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Sf(r,e,t,a,i,n,o,s){var l=i-r,u=n-e,f=t-r,h=a-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,p=c/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-i)*(d-i)+(g-n)*(g-n))}function YA(r,e,t,a,i,n,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(i,r),s),f=o[1]=Math.min(Math.max(n,e),l);return Math.sqrt((u-i)*(u-i)+(f-n)*(f-n))}var cr=[];function BV(r,e,t){var a=YA(e.x,e.y,e.width,e.height,r.x,r.y,cr);return t.set(cr[0],cr[1]),a}function zV(r,e,t){for(var a=0,i=0,n=0,o=0,s,l,u=1/0,f=e.data,h=r.x,v=r.y,c=0;c0){e=e/180*Math.PI,dr.fromArray(r[0]),kt.fromArray(r[1]),Yt.fromArray(r[2]),ot.sub(Or,dr,kt),ot.sub(Pr,Yt,kt);var t=Or.len(),a=Pr.len();if(!(t<.001||a<.001)){Or.scale(1/t),Pr.scale(1/a);var i=Or.dot(Pr),n=Math.cos(e);if(n1&&ot.copy(we,Yt),we.toArray(r[1])}}}}function GV(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,dr.fromArray(r[0]),kt.fromArray(r[1]),Yt.fromArray(r[2]),ot.sub(Or,kt,dr),ot.sub(Pr,Yt,kt);var a=Or.len(),i=Pr.len();if(!(a<.001||i<.001)){Or.scale(1/a),Pr.scale(1/i);var n=Or.dot(e),o=Math.cos(t);if(n=l)ot.copy(we,Yt);else{we.scaleAndAdd(Pr,s/Math.tan(Math.PI/2-f));var h=Yt.x!==kt.x?(we.x-kt.x)/(Yt.x-kt.x):(we.y-kt.y)/(Yt.y-kt.y);if(isNaN(h))return;h<0?ot.copy(we,kt):h>1&&ot.copy(we,Yt)}we.toArray(r[1])}}}}function I_(r,e,t,a){var i=t==="normal",n=i?r:r.ensureState(t);n.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),n.shape=n.shape||{},o>0&&(n.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();i?r.useStyle(s):n.style=s}function FV(r,e){var t=e.smooth,a=e.points;if(!!a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var i=Da(a[0],a[1]),n=Da(a[1],a[2]);if(!i||!n){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(i,n)*t,s=Mu([],a[1],a[0],o/i),l=Mu([],a[1],a[2],o/n),u=Mu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0&&n&&w(-f/o,0,o);var d=r[0],g=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&b(-y),m<0&&b(m);function _(){y=d.rect[e]-a,m=i-g.rect[e]-g.rect[t]}function S(T,C,M){if(T<0){var D=Math.min(C,-T);if(D>0){w(D*M,0,o);var L=D+T;L<0&&x(-L*M,1)}else x(-T*M,1)}}function w(T,C,M){T!==0&&(u=!0);for(var D=C;D0)for(var L=0;L0;L--){var E=M[L-1]*R;w(-E,L,o)}}}function b(T){var C=T<0?-1:1;T=Math.abs(T);for(var M=Math.ceil(T/(o-1)),D=0;D0?w(M,0,D+1):w(-M,o-D-1,o),T-=M,T<=0)return}return u}function HV(r,e,t,a){return qA(r,"x","width",e,t,a)}function KA(r,e,t,a){return qA(r,"y","height",e,t,a)}function QA(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new ut(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var i=0;i=0&&a.attr(n.oldLayoutSelect),ht(v,"emphasis")>=0&&a.attr(n.oldLayoutEmphasis)),wt(a,u,t,l)}else if(a.attr(u),!ho(a).valueAnimation){var h=vt(a.style.opacity,1);a.style.opacity=0,Gt(a,{style:{opacity:h}},t,l)}if(n.oldLayout=u,a.states.select){var c=n.oldLayoutSelect={};ru(c,u,au),ru(c,a.states.select,au)}if(a.states.emphasis){var p=n.oldLayoutEmphasis={};ru(p,u,au),ru(p,a.states.emphasis,au)}VT(a,l,f,t,t)}if(i&&!i.ignore&&!i.invisible){var n=UV(i),o=n.oldLayout,d={points:i.shape.points};o?(i.attr({shape:o}),wt(i,{shape:d},t)):(i.setShape(d),i.style.strokePercent=0,Gt(i,{style:{strokePercent:1}},t)),n.oldLayout=d}},r}(),ZV=YV,zv=bt();function XV(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var i=zv(t).labelManager;i||(i=zv(t).labelManager=new ZV),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var i=zv(t).labelManager;a.updatedSeries.forEach(function(n){i.addLabelsOfSeries(t.getViewOfSeriesModel(n))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var Gv=Math.sin,Fv=Math.cos,JA=Math.PI,wi=Math.PI*2,qV=180/JA,KV=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,i,n,o){this._add("C",e,t,a,i,n,o)},r.prototype.quadraticCurveTo=function(e,t,a,i){this._add("Q",e,t,a,i)},r.prototype.arc=function(e,t,a,i,n,o){this.ellipse(e,t,a,a,0,i,n,o)},r.prototype.ellipse=function(e,t,a,i,n,o,s,l){var u=s-o,f=!l,h=Math.abs(u),v=Ea(h-wi)||(f?u>=wi:-u>=wi),c=u>0?u%wi:u%wi+wi,p=!1;v?p=!0:Ea(h)?p=!1:p=c>=JA==!!f;var d=e+a*Fv(o),g=t+i*Gv(o);this._start&&this._add("M",d,g);var y=Math.round(n*qV);if(v){var m=1/this._p,_=(f?1:-1)*(wi-m);this._add("A",a,i,y,1,+f,e+a*Fv(o+_),t+i*Gv(o+_)),m>.01&&this._add("A",a,i,y,0,+f,d,g)}else{var S=e+a*Fv(s),w=t+i*Gv(s);this._add("A",a,i,y,+p,+f,S,w)}},r.prototype.rect=function(e,t,a,i){this._add("M",e,t),this._add("l",a,0),this._add("l",0,i),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,i,n,o,s,l,u){for(var f=[],h=this._p,v=1;v"}function nB(r){return""+r+">"}function Ug(r,e){e=e||{};var t=e.newline?`
+`:"";function a(i){var n=i.children,o=i.tag,s=i.attrs;return iB(o,s)+(i.text||"")+(n?""+t+G(n,function(l){return a(l)}).join(t)+t:"")+nB(o)}return a(r)}function oB(r,e,t){t=t||{};var a=t.newline?`
+`:"",i=" {"+a,n=a+"}",o=G(yt(r),function(l){return l+i+G(yt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+n}).join(a),s=G(yt(e),function(l){return"@keyframes "+l+i+G(yt(e[l]),function(u){return u+i+G(yt(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(a)+n}).join(a)+n}).join(a);return!o&&!s?"":[""].join(a)}function Jp(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function R_(r,e,t,a){return ee("svg","root",{width:r,height:e,xmlns:tM,"xmlns:xlink":eM,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var E_={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Ai="transform-origin";function sB(r,e,t){var a=B({},r.shape);B(a,e),r.buildPath(t,a);var i=new jA;return i.reset(gb(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function lB(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Ai]=t+"px "+a+"px")}var uB={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function aM(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function fB(r,e,t){var a=r.shape.paths,i={},n,o;if(A(a,function(l){var u=Jp(t.zrId);u.animation=!0,Sh(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,v=yt(f),c=v.length;if(!!c){o=v[c-1];var p=f[o];for(var d in p){var g=p[d];i[d]=i[d]||{d:""},i[d].d+=g.d||""}for(var y in h){var m=h[y].animation;m.indexOf(o)>=0&&(n=m)}}}),!!n){e.d=!1;var s=aM(i,t);return n.replace(o,s)}}function k_(r){return $(r)?E_[r]?"cubic-bezier("+E_[r]+")":Yd(r)?r:"":""}function Sh(r,e,t,a){var i=r.animators,n=i.length,o=[];if(r instanceof fg){var s=fB(r,e,t);if(s)o.push(s);else if(!n)return}else if(!n)return;for(var l={},u=0;u0}).length){var pt=aM(b,t);return pt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+t.cssClassIdx++;t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}var Ws=Math.round;function iM(r){return r&&$(r.src)}function nM(r){return r&&K(r.toDataURL)}function Yg(r,e,t,a){eB(function(i,n){var o=i==="fill"||i==="stroke";o&&o2(n)?mB(e,r,i,a):o&&n2(n)?_B(t,r,i,a):r[i]=n},e,t,!1),yB(t,r,a)}function O_(r){return Ea(r[0]-1)&&Ea(r[1])&&Ea(r[2])&&Ea(r[3]-1)}function hB(r){return Ea(r[4])&&Ea(r[5])}function Zg(r,e,t){if(e&&!(hB(e)&&O_(e))){var a=t?10:1e4;r.transform=O_(e)?"translate("+Ws(e[4]*a)/a+" "+Ws(e[5]*a)/a+")":jI(e)}}function N_(r,e,t){for(var a=r.points,i=[],n=0;nn?(p=t[l+1]==null?null:t[l+1].elm,uM(r,p,t,i,l)):wf(r,e,a,n))}function On(r,e){var t=e.elm=r.elm,a=r.children,i=e.children;r!==e&&(Xg(r,e),jp(e.text)?Lr(a)&&Lr(i)?a!==i&&TB(t,a,i):Lr(i)?(Lr(r.text)&&Hv(t,""),uM(t,null,i,0,i.length-1)):Lr(a)?wf(t,a,0,a.length-1):Lr(r.text)&&Hv(t,""):r.text!==e.text&&(Lr(a)&&wf(t,a,0,a.length-1),Hv(t,e.text)))}function CB(r,e){if(ns(r,e))On(r,e);else{var t=r.elm,a=sM(t);$s(e),a!==null&&(Ei(a,e.elm,lM(t)),wf(a,[r],0,0))}return e}var AB=0,MB=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=W_(),this.configLayer=W_(),this.storage=t,this._opts=a=B({},a),this.root=e,this._id="zr"+AB++,this._oldVNode=R_(a.width,a.height),e&&!a.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var n=this._svgDom=this._oldVNode.elm=rM("svg");Xg(null,this._oldVNode),i.appendChild(n),e.appendChild(i)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",CB(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return B_(e,Jp(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._backgroundColor,i=this._width,n=this._height,o=Jp(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress;var s=[];if(a&&a!=="none"){var l=Kn(a),u=l.color,f=l.opacity;this._bgVNode=ee("rect","bg",{width:i,height:n,x:"0",y:"0",id:"0",fill:u,"fill-opacity":f}),s.push(this._bgVNode)}else this._bgVNode=null;var h=e.compress?null:this._mainVNode=ee("g","main",{},[]);this._paintList(t,o,h?h.children:s),h&&s.push(h);var v=G(yt(o.defs),function(d){return o.defs[d]});if(v.length&&s.push(ee("defs","defs",{},v)),e.animation){var c=oB(o.cssNodes,o.cssAnims,{newline:!0});if(c){var p=ee("style","stl",{},[],c);s.push(p)}}return R_(i,n,s,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},Ug(this.renderToVNode({animation:vt(e.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:vt(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e;var t=this._bgVNode;if(t&&t.elm){var a=Kn(e),i=a.color,n=a.opacity;t.elm.setAttribute("fill",i),n<1&&t.elm.setAttribute("fill-opacity",n)}},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var i=e.length,n=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=n[o-1];for(var y=d+1;y=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=c.dpr,D=0;D0&&e>i[0]){for(l=0;le);l++);s=a[i[l]]}if(i.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,i=0;i0?iu:0),this._needsManuallyCompositing),f.__builtin__||Fd("ZLevel "+u+" has been used by unkown layer "+f.id),f!==n&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),n=f),i.__dirty&Be&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,A(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?st(a[e],t,!0):a[e]=t;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Vt),BB=VB;function to(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var i=Qn(r,e,t[0]);return i!=null?i+"":null}else if(a){for(var n=[],o=0;o=0&&a.push(e[n])}return a.join(" ")}var zB=function(r){O(e,r);function e(t,a,i,n){var o=r.call(this)||this;return o.updateData(t,a,i,n),o}return e.prototype._createSymbol=function(t,a,i,n,o){this.removeAll();var s=Kt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),s.drift=GB,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){sa(this.childAt(0))},e.prototype.downplay=function(){la(this.childAt(0))},e.prototype.setZ=function(t,a){var i=this.childAt(0);i.zlevel=t,i.z=a},e.prototype.setDraggable=function(t,a){var i=this.childAt(0);i.draggable=t,i.cursor=!a&&t?"move":i.cursor},e.prototype.updateData=function(t,a,i,n){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,f=n&&n.disableAnimation;if(u){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,h)}else{var v=this.childAt(0);v.silent=!1;var c={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(c):wt(v,c,s,a),_r(v)}if(this._updateCommon(t,a,l,i,n),u){var v=this.childAt(0);if(!f){var c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Gt(v,c,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,i,n,o){var s=this.childAt(0),l=t.hostModel,u,f,h,v,c,p,d,g,y;if(n&&(u=n.emphasisItemStyle,f=n.blurItemStyle,h=n.selectItemStyle,v=n.focus,c=n.blurScope,d=n.labelStatesModels,g=n.hoverScale,y=n.cursorStyle,p=n.emphasisDisabled),!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=oe(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=So(t.getItemVisual(a,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),b=x.fill;if(s instanceof he){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(B({},x)):s.useStyle(x),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;me(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:b,defaultOpacity:x.opacity});function L(R){return D?t.getName(R):to(t,R)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var I=s.ensureState("emphasis");if(I.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f,g){var P=Math.max(xt(g)?g:1.1,3/this._sizeY);I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P}this.setSymbolScale(1),Ut(this,v,c,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,i){var n=this.childAt(0),o=at(this).dataIndex,s=i&&i.animation;if(this.silent=n.silent=!0,i&&i.fadeLabel){var l=n.getTextContent();l&&Ua(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){n.removeTextContent()}})}else n.removeTextContent();Ua(n,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return hl(t.getItemVisual(a,"symbolSize"))},e}(rt);function GB(r,e){this.parent.drift(r,e)}var pl=zB;function $v(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function Y_(r){return r!=null&&!J(r)&&(r={isIgnore:r}),r||{}}function Z_(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:oe(e),cursorStyle:e.get("cursor")}}var FB=function(){function r(e){this.group=new rt,this._SymbolCtor=e||pl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Y_(t);var a=this.group,i=e.hostModel,n=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Z_(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};n||a.removeAll(),e.diff(n).add(function(h){var v=f(h);if($v(e,v,h,t)){var c=new o(e,h,l,u);c.setPosition(v),e.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=n.getItemGraphicEl(v),p=f(h);if(!$v(e,p,h,t)){a.remove(c);return}var d=e.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,h,l,u),c.setPosition(p);else{c.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):wt(c,y,i)}a.add(c),e.setItemGraphicEl(h,c)}).remove(function(h){var v=n.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},i)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,i){var n=e._getSymbolPoint(i);a.setPosition(n),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Z_(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=Y_(a);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0?t=a[0]:a[1]<0&&(t=a[1]),t}function vM(r,e,t,a){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(i)&&(i=r.valueStart);var n=r.baseDataOffset,o=[];return o[n]=t.get(r.baseDim,a),o[1-n]=i,e.dataToPoint(o)}function WB(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,i){t.push({cmd:"=",idx:i,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function $B(r,e,t,a,i,n,o,s){for(var l=WB(r,e),u=[],f=[],h=[],v=[],c=[],p=[],d=[],g=hM(i,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=i||d<0)break;if(Xi(y,m)){if(l){d+=n;continue}break}if(d===t)r[n>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=n;continue}if(o>0){for(var w=d+n,x=e[w*2],b=e[w*2+1];x===y&&b===m&&g=a||Xi(x,b))c=y,p=m;else{M=x-u,D=b-f;var P=y-u,R=x-y,E=m-f,N=b-m,k=void 0,V=void 0;if(s==="x"){k=Math.abs(P),V=Math.abs(R);var F=M>0?1:-1;c=y-F*k*o,p=m,L=y+F*V*o,I=m}else if(s==="y"){k=Math.abs(E),V=Math.abs(N);var W=D>0?1:-1;c=y,p=m-W*k*o,L=y,I=m+W*V*o}else k=Math.sqrt(P*P+E*E),V=Math.sqrt(R*R+N*N),C=V/(V+k),c=y-M*o*(1-C),p=m-D*o*(1-C),L=y+M*o*C,I=m+D*o*C,L=xa(L,wa(x,y)),I=xa(I,wa(b,m)),L=wa(L,xa(x,y)),I=wa(I,xa(b,m)),M=L-y,D=I-m,c=y-M*k/V,p=m-D*k/V,c=xa(c,wa(u,y)),p=xa(p,wa(f,m)),c=wa(c,xa(u,y)),p=wa(p,xa(f,m)),M=y-c,D=m-p,L=y+M*V/k,I=m+D*V/k}r.bezierCurveTo(h,v,c,p,y,m),h=L,v=I}else r.lineTo(y,m)}u=y,f=m,d+=n}return g}var cM=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),UB=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new cM},e.prototype.buildPath=function(t,a){var i=a.points,n=0,o=i.length/2;if(a.connectNulls){for(;o>0&&Xi(i[o*2-2],i[o*2-1]);o--);for(;n=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[t,S]:[S,t]}s=c,l=p;break;case o.C:c=n[h++],p=n[h++],d=n[h++],g=n[h++],y=n[h++],m=n[h++];var w=u?qu(s,c,d,y,t,f):qu(l,p,g,m,t,f);if(w>0)for(var x=0;x=0){var S=u?te(l,p,g,m,b):te(s,c,d,y,b);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(dt),YB=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(cM),pM=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new YB},e.prototype.buildPath=function(t,a){var i=a.points,n=a.stackedOnPoints,o=0,s=i.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Xi(i[s*2-2],i[s*2-1]);s--);for(;oe){n?t.push(o(n,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),n=l}return t}function qB(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var i,n,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){n=a[o];break}}if(!!n){var l=e.getAxis(i),u=G(n.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=n.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=XB(u,i==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[c-1].coord+p,y=g-d;if(y<.001)return"transparent";A(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new nl(0,0,0,0,v,!0);return m[i]=d,m[i+"2"]=g,m}}}function KB(r,e,t){var a=r.get("showAllSymbol"),i=a==="auto";if(!(a&&!i)){var n=t.getAxesByScale("ordinal")[0];if(!!n&&!(i&&QB(n,e))){var o=e.mapDimension(n.dim),s={};return A(n.getViewLabels(),function(l){var u=n.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function QB(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.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 JB(r,e){return isNaN(r)||isNaN(e)}function jB(r){for(var e=r.length/2;e>0&&JB(r[e*2-2],r[e*2-1]);e--);return e-1}function J_(r,e){return[r[e*2],r[e*2+1]]}function tz(r,e,t){for(var a=r.length/2,i=t==="x"?0:1,n,o,s=0,l=-1,u=0;u=e||n>=e&&o<=e){l=u;break}s=u,n=o}return{range:[s,l],t:(e-n)/(o-n)}}function yM(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var F=d.getState("emphasis").style;F.lineWidth=+d.style.lineWidth+1}at(d).seriesIndex=t.seriesIndex,Ut(d,N,k,V);var W=Q_(t.get("smooth")),Z=t.get("smoothMonotone");if(d.setShape({smooth:W,smoothMonotone:Z,connectNulls:T}),g){var tt=l.getCalculationInfo("stackedOnSeries"),ft=0;g.useStyle(Q(f.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),tt&&(ft=Q_(tt.get("smooth"))),g.setShape({smooth:W,stackedOnSmooth:ft,smoothMonotone:Z,connectNulls:T}),fe(g,t,"areaStyle"),at(g).seriesIndex=t.seriesIndex,Ut(g,N,k,V)}var Dt=function(At){n._changePolyState(At)};l.eachItemGraphicEl(function(At){At&&(At.onHoverStateChange=Dt)}),this._polyline.onHoverStateChange=Dt,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=D,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,d),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,a){at(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,i,n){var o=t.getData(),s=Ji(o,n);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=t.get("zlevel"),c=t.get("z");u=new pl(o,s),u.x=f,u.y=h,u.setZ(v,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Rt.prototype.highlight.call(this,t,a,i,n)},e.prototype.downplay=function(t,a,i,n){var o=t.getData(),s=Ji(o,n);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Rt.prototype.downplay.call(this,t,a,i,n)},e.prototype._changePolyState=function(t){var a=this._polygon;af(this._polyline,t),a&&af(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new UB({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new pM({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,a,i){var n,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(n=s.isHorizontal(),o=!1):a.type==="polar"&&(n=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");K(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=K(h)?h(null):h;t.eachItemGraphicEl(function(c,p){var d=c;if(d){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(i)if(o){var S=i,w=a.pointToCoord(g);n?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var x=i;n?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var b=m===y?0:(_-y)/(m-y);l&&(b=1-b);var T=K(h)?h(p):f*b+v,C=d.getSymbolPath(),M=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,i){var n=t.getModel("endLabel");if(yM(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Tt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=jB(l);f>=0&&(me(s,oe(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?fM(o,c):to(o,h)},enableTextSetter:!0},ez(n,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,i,n,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&n.originalX==null&&(n.originalX=u.x,n.originalY=u.y);var h=i.getLayout("points"),v=i.hostModel,c=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,w=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),b=y?"x":"y",T=tz(h,S,b),C=T.range,M=C[1]-C[0],D=void 0;if(M>=1){if(M>1&&!c){var L=J_(h,C[0]);u.attr({x:L[0]+w,y:L[1]+x}),o&&(D=v.getRawValue(C[0]))}else{var L=f.getPointOn(S,b);L&&u.attr({x:L[0]+w,y:L[1]+x});var I=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(D=Bb(i,p,I,P,T.t))}n.lastFrameIndex=C[0]}else{var R=t===1||n.lastFrameIndex>0?C[0]:0,L=J_(h,R);o&&(D=v.getRawValue(R)),u.attr({x:L[0]+w,y:L[1]+x})}o&&ho(u).setLabelText(D)}},e.prototype._doUpdateAnimation=function(t,a,i,n,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,v=$B(this._data,t,this._stackedOnPoints,a,this._coordSys,i,this._valueOrigin),c=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(c=ba(v.current,i,o,l),p=ba(v.stackedOnCurrent,i,o,l),d=ba(v.next,i,o,l),g=ba(v.stackedOnNext,i,o,l)),K_(c,d)>3e3||f&&K_(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:d}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),wt(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),wt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var b=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&n){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){n==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/c));var p=void 0;$(n)?p=iz[n]:K(n)&&(p=n),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/c,p,nz))}}}}}function oz(r){r.registerChartView(az),r.registerSeriesModel(BB),r.registerLayout(gl("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,mM("line"))}var _M=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ca(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var a=this.coordinateSystem;if(a&&a.clampData){var i=a.dataToPoint(a.clampData(t)),n=this.getData(),o=n.getLayout("offset"),s=n.getLayout("size"),l=a.getBaseAxis().isHorizontal()?0:1;return i[l]+=o+s/2,i}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Vt);Vt.registerClass(_M);var bf=_M,sz=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return ca(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,i){return i.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ja(bf.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(bf),lz=sz,uz=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),fz=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new uz},e.prototype.buildPath=function(t,a){var i=a.cx,n=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,h=a.endAngle,v=a.clockwise,c=Math.PI*2,p=v?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var i=a.scale,n=i.getExtent(),o=Math.max(0,n[0]),s=Math.min(n[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,i,n){if(!!this._isOrderChangedWithinSameData(t,a,i)){var o=this._dataSort(t,i,a);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,i){var n=a.baseAxis,o=this._dataSort(t,n,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(n){ks(n,t,at(n).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Rt),j_={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,n=r.y+r.height,o=Yv(e.x,r.x),s=Zv(e.x+e.width,i),l=Yv(e.y,r.y),u=Zv(e.y+e.height,n),f=si?s:o,e.y=h&&l>n?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var i=Zv(e.r,r.r),n=Yv(e.r0,r.r0);e.r=i,e.r0=n;var o=i-n<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},t1={cartesian2d:function(r,e,t,a,i,n,o,s,l){var u=new _t({shape:B({},a),z2:1});if(u.__dataIndex=t,u.name="item",n){var f=u.shape,h=i?"height":"width";f[h]=0}return u},polar:function(r,e,t,a,i,n,o,s,l){var u=!i&&l?Tf:Re,f=new u({shape:a,z2:1});f.name="item";var h=SM(i);if(f.calculateTextPosition=hz(h,{isRoundCap:u===Tf}),n){var v=f.shape,c=i?"r":"endAngle",p={};v[c]=i?0:a.startAngle,p[c]=a[c],(s?wt:Gt)(f,{shape:p},n)}return f}};function dz(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function e1(r,e,t,a,i,n,o,s){var l,u;n?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?wt:Gt)(t,{shape:l},e,i,null);var f=e?r.baseAxis.model:null;(o?wt:Gt)(t,{shape:u},f,i)}function r1(r,e){for(var t=0;t0?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(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function mz(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function SM(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function i1(r,e,t,a,i,n,o,s){var l=e.getItemVisual(t,"style");s||r.setShape("r",a.get(["itemStyle","borderRadius"])||0),r.useStyle(l);var u=a.getShallow("cursor");u&&r.attr("cursor",u);var f=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",h=oe(a);me(r,h,{labelFetcher:n,labelDataIndex:t,defaultText:to(n.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var v=r.getTextContent();if(s&&v){var c=a.get(["label","position"]);r.textConfig.inside=c==="middle"?!0:null,vz(r,c==="outside"?f:c,SM(o),a.get(["label","rotate"]))}NT(v,h,n.getRawValue(t),function(d){return fM(e,d)});var p=a.getModel(["emphasis"]);Ut(r,p.get("focus"),p.get("blurScope"),p.get("disabled")),fe(r,a),mz(i)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(d){d.style&&(d.style.fill=d.style.stroke="none")}))}function _z(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),n=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,i,n)}var Sz=function(){function r(){}return r}(),n1=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new Sz},e.prototype.buildPath=function(t,a){for(var i=a.points,n=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function xz(r,e,t){for(var a=r.baseDimIdx,i=1-a,n=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=n.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function xM(r,e,t){if(un(t,"cartesian2d")){var a=e,i=t.getArea();return{x:r?a.x:i.x,y:r?i.y:a.y,width:r?a.width:i.width,height:r?i.height:a.height}}else{var i=t.getArea(),n=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:n.r0,r:r?i.r:n.r,startAngle:r?n.startAngle:0,endAngle:r?n.endAngle:Math.PI*2}}}function wz(r,e,t){var a=r.type==="polar"?Re:_t;return new a({shape:xM(e,t,r),silent:!0,z2:0})}var bz=pz;function Tz(r){r.registerChartView(bz),r.registerSeriesModel(lz),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,it(MA,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,DA("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,mM("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var lu=Math.PI*2,l1=Math.PI/180;function wM(r,e){return jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function bM(r,e){var t=wM(r,e),a=r.get("center"),i=r.get("radius");z(i)||(i=[0,i]),z(a)||(a=[a,a]);var n=H(t.width,e.getWidth()),o=H(t.height,e.getHeight()),s=Math.min(n,o),l=H(a[0],n)+t.x,u=H(a[1],o)+t.y,f=H(i[0],s/2),h=H(i[1],s/2);return{cx:l,cy:u,r0:f,r:h}}function Cz(r,e,t){e.eachSeriesByType(r,function(a){var i=a.getData(),n=i.mapDimension("value"),o=wM(a,t),s=bM(a,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,v=-a.get("startAngle")*l1,c=a.get("minAngle")*l1,p=0;i.each(n,function(M){!isNaN(M)&&p++});var d=i.getSum(n),g=Math.PI/(d||p)*2,y=a.get("clockwise"),m=a.get("roseType"),_=a.get("stillShowZeroSum"),S=i.getDataExtent(n);S[0]=0;var w=lu,x=0,b=v,T=y?1:-1;if(i.setLayout({viewRect:o,r:f}),i.each(n,function(M,D){var L;if(isNaN(M)){i.setItemLayout(D,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:l,cy:u,r0:h,r:m?NaN:f});return}m!=="area"?L=d===0&&_?g:M*g:L=lu/p,Lt?y:g,w=Math.abs(_.label.y-t);if(w>=S.maxY){var x=_.label.x-e-_.len2*i,b=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:c:null;a.setStyle("width",p)}var d=a.getBoundingRect();n.width=d.width;var g=(a.style.margin||0)+2.1;n.height=d.height+g,n.y-=(n.height-h)/2}}}function Xv(r){return r.position==="center"}function Dz(r){var e=r.getData(),t=[],a,i,n=!1,o=(r.get("minShowLabelAngle")||0)*Az,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var b in x.states)if(x.states[b].ignore===!1)return!0;return!1}e.each(function(x){var b=e.getItemGraphicEl(x),T=b.shape,C=b.getTextContent(),M=b.getTextGuideLine(),D=e.getItemModel(x),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=H(L.get("edgeDistance"),u),N=L.get("bleedMargin"),k=D.getModel("labelLine"),V=k.get("length");V=H(V,u);var F=k.get("length2");if(F=H(F,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":Z>0?"left":"right"}var Wt=Math.PI,Ft=0,ve=L.get("rotate");if(xt(ve))Ft=ve*(Wt/180);else if(I==="center")Ft=0;else if(ve==="radial"||ve===!0){var Ur=Z<0?-W+Wt:-W;Ft=Ur}else if(ve==="tangential"&&I!=="outside"&&I!=="outer"){var Ae=Math.atan2(Z,tt);Ae<0&&(Ae=Wt*2+Ae);var wl=tt>0;wl&&(Ae=Wt+Ae),Ft=Ae-Wt}if(n=!!Ft,C.x=ft,C.y=Dt,C.rotation=Ft,C.setStyle({verticalAlign:"middle"}),et){C.setStyle({align:pt});var Lh=C.states.select;Lh&&(Lh.x+=C.x,Lh.y+=C.y)}else{var da=C.getBoundingRect().clone();da.applyTransform(C.getComputedTransform());var $y=(C.style.margin||0)+2.1;da.y-=$y/2,da.height+=$y,t.push({label:C,labelLine:M,position:I,len:V,len2:F,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ot(Z,tt),linePoints:At,textAlign:pt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:da,unconstrainedWidth:da.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:et})}}),!n&&r.get("avoidLabelOverlap")&&Mz(t,a,i,l,u,v,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=n.r0}},e.type="pie",e}(Rt),Pz=Iz;function wo(r,e,t){e=z(e)&&{coordDimensions:e}||B({encodeDefine:r.getEncode()},e);var a=r.getSource(),i=xo(a,e).dimensions,n=new be(i,r);return n.initData(a,t),n}var Rz=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}(),ml=Rz,Ez=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ml(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return wo(this,{coordDimensions:["value"],encodeDefaulter:it(_g,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=[];return a.each(a.mapDimension("value"),function(o){n.push(o)}),i.percent=G2(n,t,a.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){Qi(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Vt),kz=Ez;function Oz(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(i){var n=a.mapDimension("value"),o=a.get(n,i);return!(xt(o)&&!isNaN(o)&&o<0)})}}}function Nz(r){r.registerChartView(Pz),r.registerSeriesModel(kz),$C("pie",r.registerAction),r.registerLayout(it(Cz,"pie")),r.registerProcessor(yl("pie")),r.registerProcessor(Oz("pie"))}var Vz=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return ca(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,a,i){return i.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Vt),Bz=Vz,CM=4,zz=function(){function r(){}return r}(),Gz=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new zz},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var i=a.points,n=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&n[0]=0;u--){var f=u*2,h=n[f]-s/2,v=n[f+1]-l/2;if(t>=h&&a>=v&&t<=h+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var i=this.transformCoordToLocal(t,a),n=this.getBoundingRect();if(t=i[0],a=i[1],n.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,i=a.points,n=a.size,o=n[0],s=n[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),Hz=Fz,Wz=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,i){var n=t.getData(),o=this._updateSymbolDraw(n,t);o.incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,i){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=gl("").reset(t,a,i);o.progress&&o.progress({start:0,end:n.count(),count:n.count()},n),this._symbolDraw.updateLayout(n)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var a=t.coordinateSystem,i=a&&a.getArea&&a.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,a){var i=this._symbolDraw,n=a.pipelineContext,o=n.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new Hz:new dl,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Rt),$z=Wz,Uz=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(St),Yz=Uz,ed=function(r){O(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Xt).models[0]},e.type="cartesian2dAxis",e}(St);Qt(ed,cl);var AM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Zz=st({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},AM),qg=st({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},AM),Xz=st({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},qg),qz=Q({logBase:10},qg),MM={category:Zz,value:qg,time:Xz,log:qz},Kz={value:1,category:1,time:1,log:1};function eo(r,e,t,a){A(Kz,function(i,n){var o=st(st({},MM[n],!0),a,!0),s=function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+n,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=Vs(this),c=v?po(f):{},p=h.getTheme();st(f,p.get(n+"Axis")),st(f,this.getDefaultOption()),f.type=f1(f),v&&Ya(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Xp.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+n,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",f1)}function f1(r){return r.type||(r.data?"category":"value")}var Qz=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),It(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),Jz=Qz,rd=["x","y"];function h1(r){return r.type==="interval"||r.type==="time"}var jz=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=rd,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!h1(t)||!h1(a))){var i=t.getExtent(),n=a.getExtent(),o=this.dataToPoint([i[0],n[0]]),s=this.dataToPoint([i[1],n[1]]),l=i[1]-i[0],u=n[1]-n[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-i[0]*f,c=o[1]-n[0]*h,p=this._transform=[f,0,0,h,v,c];this._invTransform=oo([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),i=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var i=this.dataToPoint(t),n=this.dataToPoint(a),o=this.getArea(),s=new ut(i[0],i[1],n[0]-i[0],n[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,i){i=i||[];var n=t[0],o=t[1];if(this._transform&&n!=null&&isFinite(n)&&o!=null&&isFinite(o))return le(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(n,a)),i[1]=l.toGlobalCoord(l.dataToCoord(o,a)),i},e.prototype.clampData=function(t,a){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),s=n.getExtent(),l=i.parse(t[0]),u=n.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var i=[];if(this._invTransform)return le(i,t,this._invTransform);var n=this.getAxis("x"),o=this.getAxis("y");return i[0]=n.coordToData(n.toLocalCoord(t[0]),a),i[1]=o.coordToData(o.toLocalCoord(t[1]),a),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(a[0],a[1]),o=Math.max(t[0],t[1])-i,s=Math.max(a[0],a[1])-n;return new ut(i,n,o,s)},e}(Jz),t5=function(r){O(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.index=0,s.type=n||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(xr),e5=t5;function ad(r,e,t){t=t||{};var a=r.coordinateSystem,i=e.axis,n={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=a.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,p=u==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}n.position=[u==="y"?p[v[l]]:h[0],u==="x"?p[v[l]]:h[3]],n.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};n.labelDirection=n.tickDirection=n.nameDirection=g[s],n.labelOffset=o?p[v[s]]-p[v.onZero]:0,e.get(["axisTick","inside"])&&(n.tickDirection=-n.tickDirection),ie(t.labelInside,e.get(["axisLabel","inside"]))&&(n.labelDirection=-n.labelDirection);var y=e.get(["axisLabel","rotate"]);return n.labelRotate=l==="top"?-y:y,n.z2=1,n}function v1(r){return r.get("coordinateSystem")==="cartesian2d"}function c1(r){var e={xAxisModel:null,yAxisModel:null};return A(e,function(t,a){var i=a.replace(/Model$/,""),n=r.getReferringComponents(i,Xt).models[0];e[a]=n}),e}var qv=Math.log;function DM(r,e,t){var a=Xa.prototype,i=a.getTicks.call(t),n=a.getTicks.call(t,!0),o=i.length-1,s=a.getInterval.call(t),l=OA(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var v=qv(r.base);u=[qv(u[0])/v,qv(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var c=a.getExtent.call(r);f&&(u[0]=c[0]),h&&(u[1]=c[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=Ov(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Ov(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=$t(g-m),d<0&&u[0]>=0?(d=0,g=$t(m)):g>0&&u[1]<=0&&(g=0,d=-$t(m))}var _=(i[0].value-n[0].value)/s,S=(i[o].value-n[o].value)/s;a.setExtent.call(r,d+p*_,g+p*S),a.setInterval.call(r,p),(_||S)&&a.setNiceExtent.call(r,d+p,g-p)}var r5=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=rd,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=yt(o),u=l.length;if(!!u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],p=c.model,d=c.scale;qp(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(jn(d,p),qp(d)&&(s=c))}f.length&&(s||(s=f.pop(),jn(s.scale,s.model)),A(f,function(g){DM(g.scale,g.model,s.scale)}))}}i(a.x),i(a.y);var n={};A(a.x,function(o){p1(a,"y",o,n)}),A(a.y,function(o){p1(a,"x",o,n)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var i=e.getBoxLayoutParams(),n=!a&&e.get("containLabel"),o=jt(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),n&&(A(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=gV(u);if(f){var h=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,u.position==="top"?o.y+=f.height+v:u.position==="left"&&(o.x+=f.width+v)}}}),l()),A(this._coordsList,function(u){u.calcAffineTransform()});function l(){A(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(h[v],h[1-v]),a5(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,n=this._coordsList;i0?"top":"bottom",n="center"):ef(i-Oa)?(o=a>0?"bottom":"top",n="center"):(o="middle",i>0&&i0?"right":"left":n=a>0?"left":"right"),{rotation:i,textAlign:n,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),g1={axisLine:function(r,e,t,a){var i=e.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var n=e.axis.getExtent(),o=a.transform,s=[n[0],0],l=[n[1],0];o&&(le(s,s,o),le(l,l,o));var u=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new ne({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var v=e.get(["axisLine","symbolSize"]);$(h)&&(h=[h,h]),($(v)||xt(v))&&(v=[v,v]);var c=So(e.get(["axisLine","symbolOffset"])||0,v),p=v[0],d=v[1];A([{rotate:r.rotation+Math.PI/2,offset:c[0],r:0},{rotate:r.rotation-Math.PI/2,offset:c[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(g,y){if(h[y]!=="none"&&h[y]!=null){var m=Kt(h[y],-p/2,-d/2,p,d,u.stroke,!0),_=g.r+g.offset;m.attr({rotation:g.rotate,x:s[0]+_*Math.cos(r.rotation),y:s[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(m)}})}}},axisTickLabel:function(r,e,t,a){var i=s5(t,a,e,r),n=u5(t,a,e,r);if(o5(e,n,i),l5(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=XA(G(n,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));QA(o)}},axisName:function(r,e,t,a){var i=ie(r.axisName,e.get("name"));if(!!i){var n=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[n==="start"?u[0]-f*l:n==="end"?u[1]+f*l:(u[0]+u[1])/2,m1(n)?r.labelOffset+o*l:0],v,c=e.get("nameRotate");c!=null&&(c=c*Oa/180);var p;m1(n)?v=qi.innerTextLayout(r.rotation,c!=null?c:r.rotation,o):(v=n5(r.rotation,n,c||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=ie(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Tt({x:h[0],y:h[1],rotation:v.rotation,silent:qi.isLabelSilent(e),style:Bt(s,{text:i,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(fo({el:_,componentModel:e,itemName:i}),_.__fullText=i,_.anid="name",e.get("triggerEvent")){var S=qi.makeAxisEventDataBase(e);S.targetType="axisName",S.name=i,at(_).eventData=S}a.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function n5(r,e,t,a){var i=Db(t-r),n,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return ef(i-Oa/2)?(o=l?"bottom":"top",n="center"):ef(i-Oa*1.5)?(o=l?"top":"bottom",n="center"):(o="middle",iOa/2?n=l?"left":"right":n=l?"right":"left"),{rotation:i,textAlign:n,textVerticalAlign:o}}function o5(r,e,t){if(!NA(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var n=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],v=t[t.length-2];a===!1?($e(n),$e(u)):y1(n,o)&&(a?($e(o),$e(f)):($e(n),$e(u))),i===!1?($e(s),$e(h)):y1(l,s)&&(i?($e(l),$e(v)):($e(s),$e(h)))}}function $e(r){r&&(r.ignore=!0)}function y1(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var i=Zf([]);return on(i,i,-r.rotation),t.applyTransform(ra([],i,r.getLocalTransform())),a.applyTransform(ra([],i,e.getLocalTransform())),t.intersect(a)}}function m1(r){return r==="middle"||r==="center"}function LM(r,e,t,a,i){for(var n=[],o=[],s=[],l=0;l=0||r===e}function d5(r){var e=Kg(r);if(!!e){var t=e.axisPointerModel,a=e.axis.scale,i=t.option,n=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=id(t);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]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=Q({color:p.color},l));var g=st(j(p),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:v},!1);if($(f)){var y=g.name;g.name=f.replace("{value}",y!=null?y:"")}else K(f)&&(g.name=f(g.name,g));var m=new Ot(g,null,this.ecModel);return Qt(m,cl.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:st({lineStyle:{color:"#bbb"}},Ho.axisLine),axisLabel:uu(Ho.axisLabel,!1),axisTick:uu(Ho.axisTick,!1),splitLine:uu(Ho.splitLine,!0),splitArea:uu(Ho.splitArea,!0),indicator:[]},e}(St),P5=I5,R5=["axisLine","axisTickLabel","axisName"],E5=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes(),n=G(i,function(o){var s=o.model.get("showName")?o.name:"",l=new fa(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});A(n,function(o){A(R5,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),p=z(v)?v:[v],d=z(c)?c:[c],g=[],y=[];function m(R,E,N){var k=N%E.length;return R[k]=R[k]||[],k}if(n==="circle")for(var _=i[0].getTicksCoords(),S=a.cx,w=a.cy,x=0;x<_.length;x++){if(f){var b=m(g,p,x);g[b].push(new Hr({shape:{cx:S,cy:w,r:_[x].coord}}))}if(h&&x<_.length-1){var b=m(y,d,x);y[b].push(new eh({shape:{cx:S,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=G(i,function(R,E){var N=R.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),G(N,function(k){return a.coordToPoint(k.coord,E)})}),M=[],x=0;x<=T;x++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,f=n>0?u:1/u;Jv(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(n),v=(n>0?1:-1)*(h>3?.4:h>1?.15:.05);Jv(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!T1(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;Jv(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(or);function Jv(r,e,t,a,i){r.pointerChecker&&r.pointerChecker(a,i.originX,i.originY)&&(na(a.event),OM(r,e,t,a,i))}function OM(r,e,t,a,i){i.isAvailableBehavior=U(Fu,null,t,a),r.trigger(e,i)}function Fu(r,e,t){var a=t[r];return!r||a&&(!$(a)||e.event[a+"Key"])}var _l=W5;function Jg(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function jg(r,e,t,a){var i=r.target,n=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(a-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var $5={axisPointer:1,tooltip:1,brush:1};function wh(r,e,t){var a=e.getComponentByElement(r.topTarget),i=a&&a.coordinateSystem;return a&&a!==t&&!$5.hasOwnProperty(a.mainType)&&i&&i.model!==t}function NM(r){if($(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var jv,Cf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},C1=yt(Cf),Af={"alignment-baseline":"textBaseline","stop-color":"stopColor"},A1=yt(Af),U5=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=NM(e);this._defsUsePending=[];var i=new rt;this._root=i;var n=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Ne(a,i,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,i,n,null,!1,!1),u=u.nextSibling;X5(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=bh(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(h=BM(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=i;i=new rt,i.add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new _t({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:n}},r.prototype._parseNode=function(e,t,a,i,n,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(n=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!n){var f=jv[s];if(f&&Y(jv,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else i&&a.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var c=M1[s];if(c&&Y(M1,s)){var p=c.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,n,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new Ps({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),Y5(a,t);var i=a.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,a.scaleX*=n/9,a.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){jv={g:function(e,t){var a=new rt;return Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new _t;return Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Hr;return Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new ne;return Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new lg;return Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),i;a&&(i=I1(a));var n=new Ee({shape:{points:i||[]},silent:!0});return Ue(t,n),Ne(e,n,this._defsUsePending,!1,!1),n},polyline:function(e,t){var a=e.getAttribute("points"),i;a&&(i=I1(a));var n=new ke({shape:{points:i||[]},silent:!0});return Ue(t,n),Ne(e,n,this._defsUsePending,!1,!1),n},image:function(e,t){var a=new he;return Ue(t,a),Ne(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var s=new rt;return Ue(t,s),Ne(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),i=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),i!=null&&(this._textY=parseFloat(i));var n=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new rt;return Ue(t,s),Ne(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",i=pT(a);return Ue(t,i),Ne(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),M1={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),n=new nl(e,t,a,i);return D1(r,n),L1(r,n),n},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),i=new MT(e,t,a);return D1(r,i),L1(r,i),i}};function D1(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function L1(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),i=void 0;a&&a.indexOf("%")>0?i=parseInt(a,10)/100:a?i=parseFloat(a):i=0;var n={};VM(t,n,n);var o=n.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Ue(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Q(e.__inheritedStyle,r.__inheritedStyle))}function I1(r){for(var e=bh(r),t=[],a=0;a0;n-=2){var o=a[n],s=a[n-1],l=bh(o);switch(i=i||ir(),s){case"translate":Br(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":qd(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":on(i,i,-parseFloat(l[0])*tc);break;case"skewX":var u=Math.tan(parseFloat(l[0])*tc);ra(i,[1,0,u,1,0,0],i);break;case"skewY":var f=Math.tan(parseFloat(l[0])*tc);ra(i,[1,f,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var R1=/([^\s:;]+)\s*:\s*([^:;]+)/g;function VM(r,e,t){var a=r.getAttribute("style");if(!!a){R1.lastIndex=0;for(var i;(i=R1.exec(a))!=null;){var n=i[1],o=Y(Cf,n)?Cf[n]:null;o&&(e[o]=i[2]);var s=Y(Af,n)?Af[n]:null;s&&(t[s]=i[2])}}}function J5(r,e,t){for(var a=0;a0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=q(),a=q(),i=this._regionsGroup,n=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,p){return p&&(c=p(c)),c&&[c[0]*n.scaleX+n.x,c[1]*n.scaleY+n.y]}function h(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=i);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;me(e,oe(a),{labelFetcher:v,labelDataIndex:h,defaultText:t},c);var p=e.getTextContent();if(p&&(zM(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function V1(r,e,t,a,i,n){r.data?r.data.setItemGraphicEl(n,e):at(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:a&&a.option||{}}}function B1(r,e,t,a,i){r.data||fo({el:e,componentModel:i,itemName:t,itemTooltipOption:a.get("tooltip")})}function z1(r,e,t,a,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var n=a.getModel("emphasis"),o=n.get("focus");return Ut(e,o,n.get("blurScope"),n.get("disabled")),r.isGeo&&gR(e,i,t),o}function G1(r,e,t){var a=[],i;function n(){i=[]}function o(){i.length&&(a.push(i),i=[])}var s=e({polygonStart:n,polygonEnd:o,lineStart:n,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Vt),SG=_G;function xG(r,e){var t={};return A(r,function(a){a.each(a.mapDimension("value"),function(i,n){var o="ec-"+a.getName(n);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(a,i){for(var n="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[n].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var w=r.getBoxLayoutParams();w.aspect=g,S=jt(w,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function AG(r,e){A(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var MG=function(){function r(){this.dimensions=FM}return r.prototype.create=function(e,t){var a=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new $1(l+s,l,B({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=U1,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var n={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();n[s]=n[s]||[],n[s].push(o)}}),A(n,function(o,s){var l=G(o,function(f){return f.get("nameMap")}),u=new $1(s,s,B({nameMap:Hd(l)},i(o[0])));u.zoomLimit=ie.apply(null,G(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=U1,u.resize(o[0],t),A(o,function(f){f.coordinateSystem=u,AG(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,i){for(var n=(e||[]).slice(),o=q(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function NG(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,i=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){zG(r);var n=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-n):r.hierNode.prelim=n}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=GG(r,i,r.parentNode.hierNode.defaultAncestor||a[0],e)}function VG(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Z1(r){return arguments.length?r:WG}function os(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function BG(r,e){return jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function zG(r){for(var e=r.children,t=e.length,a=0,i=0;--t>=0;){var n=e[t];n.hierNode.prelim+=a,n.hierNode.modifier+=a,i+=n.hierNode.change,a+=n.hierNode.shift+i}}function GG(r,e,t,a){if(e){for(var i=r,n=r,o=n.parentNode.children[0],s=e,l=i.hierNode.modifier,u=n.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=ec(s),n=rc(n),s&&n;){i=ec(i),o=rc(o),i.hierNode.ancestor=r;var v=s.hierNode.prelim+h-n.hierNode.prelim-u+a(s,n);v>0&&(HG(FG(s,r,t),r,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=n.hierNode.modifier,l+=i.hierNode.modifier,f+=o.hierNode.modifier}s&&!ec(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),n&&!rc(o)&&(o.hierNode.thread=n,o.hierNode.modifier+=u-f,t=r)}return t}function ec(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function rc(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function FG(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function HG(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function WG(r,e){return r.parentNode===e.parentNode?1:2}var $G=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),UG=function(r){O(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new $G},e.prototype.buildPath=function(t,a){var i=a.childPoints,n=i.length,o=a.parentPoint,s=i[0],l=i[n-1];if(n===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,v=H(a.forkPosition,1),c=[];c[f]=o[f],c[h]=o[h]+(l[h]-o[h])*v,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[f]=s[f],t.lineTo(c[0],c[1]),c[f]=l[f],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,w||(S=S-Math.PI));var b=w?"left":"right",T=s.getModel("label"),C=T.get("rotate"),M=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||b,rotation:C==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?Zu(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(at(t).focus=I),ZG(i,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===il||af(t.__edge,P)}})}function ZG(r,e,t,a,i,n,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),v=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new rh({shape:sd(f,h,v,i,i)})),wt(d,{shape:sd(f,h,v,n,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,i=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,i=r.targetNode;if($(i)&&(i=a.getNodeById(i)),i&&a.contains(i))return{node:i};var n=r.targetNodeId;if(n!=null&&(i=a.getNodeById(n)))return{node:i}}}function XM(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function iy(r,e){var t=XM(r);return ht(t,e)>=0}function Th(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var iF=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},i=t.leaves||{},n=new Ot(i,this,this.ecModel),o=ay.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(v,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(v.parentModel=n),v})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,i){for(var n=this.getData().tree,o=n.root.children[0],s=n.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return re("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Th(i,this),a.collapsed=!i.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.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",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Vt),nF=iF;function oF(r,e,t){for(var a=[r],i=[],n;n=a.pop();)if(i.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;n--)t.push(i[n])}}function sF(r,e){r.eachSeriesByType("tree",function(t){lF(t,e)})}function lF(r,e){var t=BG(r,e);r.layoutInfo=t;var a=r.get("layout"),i=0,n=0,o=null;a==="radial"?(i=2*Math.PI,n=Math.min(t.height,t.width)/2,o=Z1(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(i=t.width,n=t.height,o=Z1());var s=r.getData().tree.root,l=s.children[0];if(l){OG(s),oF(l,NG,o),s.hierNode.modifier=-l.hierNode.prelim,$o(l,VG);var u=l,f=l,h=l;$o(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var v=u===f?1:o(u,f)/2,c=v-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=i/(f.getLayout().x+v+c),d=n/(h.depth-1||1),$o(l,function(_){g=(_.getLayout().x+c)*p,y=(_.depth-1)*d;var S=os(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=n/(f.getLayout().x+v+c),p=i/(h.depth-1||1),$o(l,function(_){y=(_.getLayout().x+c)*d,g=m==="LR"?(_.depth-1)*p:i-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=i/(f.getLayout().x+v+c),d=n/(h.depth-1||1),$o(l,function(_){g=(_.getLayout().x+c)*p,y=m==="TB"?(_.depth-1)*d:n-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function uF(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(i){var n=i.getModel(),o=n.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");B(s,o)})})}function fF(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=e.dataIndex,n=a.getData().tree,o=n.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var n=i.coordinateSystem,o=ey(n,e,void 0,a);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function hF(r){r.registerChartView(XG),r.registerSeriesModel(nF),r.registerLayout(sF),r.registerVisual(uF),fF(r)}var J1=["treemapZoomToNode","treemapRender","treemapMove"];function vF(r){for(var e=0;e1;)n=n.parentNode;var o=Np(r.ecModel,n.name||n.dataIndex+"",a);i.setVisual("decal",o)})}var cF=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var i={name:t.name,children:t.data};KM(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},s=new Ot({itemStyle:o},this,a);n=t.levels=pF(n,a);var l=G(n||[],function(h){return new Ot(h,s,a)},this),u=ay.createTree(i,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,i){var n=this.getData(),o=this.getRawValue(t),s=n.getName(t);return re("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Th(i,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=q(),this._idIndexMapCount=0);var i=a.get(t);return i==null&&a.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){qM(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.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)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Vt);function KM(r){var e=0;A(r.children,function(a){KM(a);var i=a.value;z(i)&&(i=i[0]),e+=i});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function pF(r,e){var t=Pt(e.get("color")),a=Pt(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var i,n;A(r,function(s){var l=new Ot(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(n=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!n&&a&&(o.decal=a.slice()),r}}var dF=cF,gF=8,j1=8,ac=5,yF=function(){function r(e){this.group=new rt,e.add(this.group)}return r.prototype.render=function(e,t,a,i){var n=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!n.get("show")||!a)){var s=n.getModel("itemStyle"),l=s.getModel("textStyle"),u={pos:{left:n.get("left"),right:n.get("right"),top:n.get("top"),bottom:n.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:n.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,u,l),this._renderContent(e,u,s,l,i),hh(o,u.pos,u.box)}},r.prototype._prepare=function(e,t,a){for(var i=e;i;i=i.parentNode){var n=Jt(i.getModel().get("name"),""),o=a.getTextRect(n),s=Math.max(o.width+gF*2,t.emptyItemWidth);t.totalWidth+=s+j1,t.renderList.push({node:i,text:n,width:s})}},r.prototype._renderContent=function(e,t,a,i,n){for(var o=0,s=t.emptyItemWidth,l=e.get(["breadcrumb","height"]),u=DE(t.pos,t.box),f=t.totalWidth,h=t.renderList,v=h.length-1;v>=0;v--){var c=h[v],p=c.node,d=c.width,g=c.text;f>u.width&&(f-=d-s,d=s,g=null);var y=new Ee({shape:{points:mF(o,0,d,l,v===h.length-1,v===0)},style:Q(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Tt({style:{text:g,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:lo*1e4,onclick:it(n,p)});y.disableLabelAnimation=!0,this.group.add(y),_F(y,e,p),o+=d+j1}},r.prototype.remove=function(){this.group.removeAll()},r}();function mF(r,e,t,a,i,n){var o=[[i?r:r-ac,e],[r+t,e],[r+t,e+a],[i?r:r-ac,e+a]];return!n&&o.splice(2,0,[r+t+ac,e+a/2]),!i&&o.push([r,e+a/2]),o}function _F(r,e,t){at(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Th(t,e)}}var SF=yF,xF=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,i,n){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:i,easing:n}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,n=this._storage.length;ieS||Math.abs(t.dy)>eS)){var a=this.seriesModel.getData().tree.root;if(!a)return;var i=a.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var a=t.originX,i=t.originY;if(this._state!=="animating"){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var s=new ut(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo;a-=l.x,i-=l.y;var u=ir();Br(u,u,[-a,-i]),qd(u,u,[t.scale,t.scale]),Br(u,u,[a,i]),s.applyTransform(u),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(i){if(a._state==="ready"){var n=a.seriesModel.get("nodeClick",!0);if(!!n){var o=a.findTarget(i.offsetX,i.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(n==="zoomToNode")a._zoomToNode(o);else if(n==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&ff(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,i){var n=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new SF(this.group))).render(t,a,i.node,function(o){n._state!=="animating"&&(iy(t.getViewRoot(),o)?n._rootToNode({node:o}):n._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Uo(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(Rt);function Uo(){return{nodeGroup:[],background:[],content:[]}}function MF(r,e,t,a,i,n,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,w=_&&_.length,x=v.getModel("itemStyle"),b=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,D=ft("nodeGroup",ld);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),Mf(D).nodeWidth=c,Mf(D).nodeHeight=p,f.isAboveViewRoot)return D;var L=ft("background",tS,u,TF);L&&V(D,L,w&&f.upperLabelHeight);var I=v.getModel("emphasis"),P=I.get("focus"),R=I.get("blurScope"),E=I.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(w)Es(D)&&Bi(D,!1),L&&(Bi(L,!E),h.setItemGraphicEl(o.dataIndex,L),Dp(L,N,R));else{var k=ft("content",tS,u,CF);k&&F(D,k),L.disableMorphing=!0,L&&Es(L)&&Bi(L,!1),Bi(D,!E),h.setItemGraphicEl(o.dataIndex,D),Dp(D,N,R)}return D;function V(pt,et,gt){var lt=at(et);if(lt.dataIndex=o.dataIndex,lt.seriesIndex=r.seriesIndex,et.setShape({x:0,y:0,width:c,height:p,r:M}),g)W(et);else{et.invisible=!1;var X=o.getVisual("style"),nt=X.stroke,zt=iS(x);zt.fill=nt;var mt=Di(b);mt.fill=b.get("borderColor");var Wt=Di(T);Wt.fill=T.get("borderColor");var Ft=Di(C);if(Ft.fill=C.get("borderColor"),gt){var ve=c-2*d;Z(et,nt,X.opacity,{x:d,y:0,width:ve,height:S})}else et.removeTextContent();et.setStyle(zt),et.ensureState("emphasis").style=mt,et.ensureState("blur").style=Wt,et.ensureState("select").style=Ft,tn(et)}pt.add(et)}function F(pt,et){var gt=at(et);gt.dataIndex=o.dataIndex,gt.seriesIndex=r.seriesIndex;var lt=Math.max(c-2*d,0),X=Math.max(p-2*d,0);if(et.culling=!0,et.setShape({x:d,y:d,width:lt,height:X,r:M}),g)W(et);else{et.invisible=!1;var nt=o.getVisual("style"),zt=nt.fill,mt=iS(x);mt.fill=zt,mt.decal=nt.decal;var Wt=Di(b),Ft=Di(T),ve=Di(C);Z(et,zt,nt.opacity,null),et.setStyle(mt),et.ensureState("emphasis").style=Wt,et.ensureState("blur").style=Ft,et.ensureState("select").style=ve,tn(et)}pt.add(et)}function W(pt){!pt.invisible&&n.push(pt)}function Z(pt,et,gt,lt){var X=v.getModel(lt?aS:rS),nt=Jt(v.get("name"),null),zt=X.getShallow("show");me(pt,oe(v,lt?aS:rS),{defaultText:zt?nt:null,inheritColor:et,defaultOpacity:gt,labelFetcher:r,labelDataIndex:o.dataIndex});var mt=pt.getTextContent();if(!!mt){var Wt=mt.style,Ft=$d(Wt.padding||0);lt&&(pt.setTextConfig({layoutRect:lt}),mt.disableLabelLayout=!0),mt.beforeUpdate=function(){var Ur=Math.max((lt?lt.width:pt.shape.width)-Ft[1]-Ft[3],0),Ae=Math.max((lt?lt.height:pt.shape.height)-Ft[0]-Ft[2],0);(Wt.width!==Ur||Wt.height!==Ae)&&mt.setStyle({width:Ur,height:Ae})},Wt.truncateMinChar=2,Wt.lineOverflow="truncate",tt(Wt,lt,f);var ve=mt.getState("emphasis");tt(ve?ve.style:null,lt,f)}}function tt(pt,et,gt){var lt=pt?pt.text:null;if(!et&>.isLeafRoot&<!=null){var X=r.get("drillDownIcon",!0);pt.text=X?X+" "+lt:lt}}function ft(pt,et,gt,lt){var X=m!=null&&t[pt][m],nt=i[pt];return X?(t[pt][m]=null,Dt(nt,X)):g||(X=new et,X instanceof nr&&(X.z2=DF(gt,lt)),At(nt,X)),e[pt][y]=X}function Dt(pt,et){var gt=pt[y]={};et instanceof ld?(gt.oldX=et.x,gt.oldY=et.y):gt.oldShape=B({},et.shape)}function At(pt,et){var gt=pt[y]={},lt=o.parentNode,X=et instanceof rt;if(lt&&(!a||a.direction==="drillDown")){var nt=0,zt=0,mt=i.background[lt.getRawIndex()];!a&&mt&&mt.oldShape&&(nt=mt.oldShape.width,zt=mt.oldShape.height),X?(gt.oldX=0,gt.oldY=zt):gt.oldShape={x:nt,y:zt,width:0,height:0}}gt.fadein=!X}}function DF(r,e){return r*bF+e}var LF=AF,Zs=A,IF=J,Df=-1,ny=function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=j(e);this.type=a,this.mappingMethod=t,this._normalizeData=EF[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(ic(i),PF(i)):t==="category"?i.categories?RF(i):ic(i,!0):(Te(t!=="linear"||i.dataExtent),ic(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return U(this._normalizeData,this)},r.listVisualTypes=function(){return yt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){J(e)?A(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=z(e)?[]:J(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);i?n=l:n[s]=l}),n},r.retrieveVisuals=function(e){var t={},a;return e&&Zs(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(IF(e)){var t=[];Zs(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function ic(r,e){var t=r.visual,a=[];J(t)?Zs(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),QM(r,a)}function hu(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:ud([0,1])}}function nS(r){var e=this.option.visual;return e[Math.round(Lt(r,[0,1],[0,e.length-1],!0))]||{}}function Yo(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function ss(r){var e=this.option.visual;return e[this.option.loop&&r!==Df?r%e.length:r]}function Li(){return this.option.visual[0]}function ud(r){return{linear:function(e){return Lt(e,r,this.option.visual,!0)},category:ss,piecewise:function(e,t){var a=fd.call(this,t);return a==null&&(a=Lt(e,r,this.option.visual,!0)),a},fixed:Li}}function fd(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=ny.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function QM(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var a=ze(t);return a||[0,0,0,1]})),e}var EF={linear:function(r){return Lt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=ny.findPieceIndex(r,e,!0);if(t!=null)return Lt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Df:e},fixed:qt};function vu(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=zF(i,l,d,g,p,a);jM(d,y,t,a)}})}}}function NF(r,e,t){var a=B({},e),i=t.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(n){i[n]=e[n];var o=r.get(n);i[n]=null,o!=null&&(a[n]=o)}),a}function oS(r){var e=nc(r,"color");if(e){var t=nc(r,"colorAlpha"),a=nc(r,"colorSaturation");return a&&(e=hs(e,null,null,a)),t&&(e=Ku(e,t)),e}}function VF(r,e){return e!=null?hs(e,null,null,r):null}function nc(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function BF(r,e,t,a,i,n){if(!(!n||!n.length)){var o=oc(e,"color")||i.color!=null&&i.color!=="none"&&(oc(e,"colorAlpha")||oc(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new ue(h);return JM(v).drColorMappingBy=f,v}}}function oc(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function zF(r,e,t,a,i,n){var o=B({},e);if(i){var s=i.type,l=s==="color"&&JM(i).drColorMappingBy,u=l==="index"?a:l==="id"?n.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var Xs=Math.max,Lf=Math.min,sS=ie,oy=A,tD=["itemStyle","borderWidth"],GF=["itemStyle","gapWidth"],FF=["upperLabel","show"],HF=["upperLabel","height"],WF={seriesType:"treemap",reset:function(r,e,t,a){var i=t.getWidth(),n=t.getHeight(),o=r.option,s=jt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=H(sS(s.width,l[0]),i),f=H(sS(s.height,l[1]),n),h=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],c=Ys(a,v,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=XM(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?qF(r,c,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),eD(d,_,!1,0),S=d.getLayout(),oy(g,function(x,b){var T=(g[b+1]||d).getValue();x.setLayout(B({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var w=r.getData().tree.root;w.setLayout(KF(s,p,c),!0),r.setLayoutInfo(s),rD(w,new ut(-s.x,-s.y,i,n),g,d,0)}};function eD(r,e,t,a){var i,n;if(!r.isRemoved()){var o=r.getLayout();i=o.width,n=o.height;var s=r.getModel(),l=s.get(tD),u=s.get(GF)/2,f=aD(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),i=Xs(i-2*v,0),n=Xs(n-v-c,0);var p=i*n,d=$F(r,s,p,e,t,a);if(!!d.length){var g={x:v,y:c,width:i,height:n},y=Lf(i,n),m=1/0,_=[];_.area=0;for(var S=0,w=d.length;S=0;l--){var u=i[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function XF(r,e,t){for(var a=0,i=1/0,n=0,o=void 0,s=r.length;na&&(a=o));var l=r.area*r.area,u=e*e*t;return l?Xs(u*a/l,l/(u*i)):1/0}function lS(r,e,t,a,i){var n=e===t.width?0:1,o=1-n,s=["x","y"],l=["width","height"],u=t[s[n]],f=e?r.area/e:0;(i||f>t[l[o]])&&(f=t[l[o]]);for(var h=0,v=r.length;h_m&&(u=_m),n=s}ua&&(a=e);var n=a%2?a+2:a+3;i=[];for(var o=0;o0&&(w[0]=-w[0],w[1]=-w[1]);var b=S[0]<0?-1:1;if(n.__position!=="start"&&n.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":n.x=-v[0]*y+f[0],n.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=y*b+f[0],n.y=f[1]+C,p=S[0]<0?"right":"left",n.originX=-y*b,n.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=x[0],n.y=x[1]+C,p="center",n.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-y*b+h[0],n.y=h[1]+C,p=S[0]>=0?"right":"left",n.originX=y*b,n.originY=-C;break}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||p})}},e}(rt),ly=d3,g3=function(){function r(e){this.group=new rt,this._LineCtor=e||ly}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,i=a.group,n=a._lineData;a._lineData=e,n||i.removeAll();var o=cS(e);e.diff(n).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(n,e,l,s,o)}).remove(function(s){i.remove(n.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=cS(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!y3(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function cS(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:oe(e)}}function pS(r){return isNaN(r[0])||isNaN(r[1])}function hc(r){return r&&!pS(r[0])&&!pS(r[1])}var uy=g3,vc=[],cc=[],pc=[],An=ae,dc=Hi,dS=Math.abs;function gS(r,e,t){for(var a=r[0],i=r[1],n=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){vc[0]=An(a[0],i[0],n[0],f),vc[1]=An(a[1],i[1],n[1],f);var h=dS(dc(vc,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function gc(r,e){var t=[],a=Ds,i=[[],[],[]],n=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[ta(u[0]),ta(u[1])],u[2]&&u.__original.push(ta(u[2])));var v=u.__original;if(u[2]!=null){if(Se(i[0],v[0]),Se(i[1],v[2]),Se(i[2],v[1]),f&&f!=="none"){var c=us(s.node1),p=gS(i,v[0],c*e);a(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],a(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(h&&h!=="none"){var c=us(s.node2),p=gS(i,v[1],c*e);a(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],a(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}Se(u[0],i[0]),Se(u[1],i[2]),Se(u[2],i[1])}else{if(Se(n[0],v[0]),Se(n[1],v[1]),Ni(o,n[1],n[0]),tl(o,o),f&&f!=="none"){var c=us(s.node1);tp(n[0],n[0],o,c*e)}if(h&&h!=="none"){var c=us(s.node2);tp(n[1],n[1],o,-c*e)}Se(u[0],n[0]),Se(u[1],n[1])}})}function yS(r){return r.type==="view"}var m3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var i=new dl,n=new uy,o=this.group;this._controller=new _l(a.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},e.prototype.render=function(t,a,i){var n=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(yS(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):wt(u,f,t)}gc(t.getGraph(),ls(t));var h=t.getData();s.updateData(h);var v=t.getEdgeData();l.updateData(v),this._updateNodeAndLinkScale(),this._updateController(t,a,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p),h.graph.eachNode(function(m){var _=m.dataIndex,S=m.getGraphicEl(),w=m.getModel();if(!!S){S.off("drag").off("dragend");var x=w.get("draggable");x&&S.on("drag",function(){c&&(c.warmUp(),!n._layouting&&n._startForceLayoutIteration(c,p),c.setFixed(_),h.setItemLayout(_,[S.x,S.y]))}).on("dragend",function(){c&&c.setUnfixed(_)}),S.setDraggable(x&&!!c,!!w.get("cursor"));var b=w.get(["emphasis","focus"]);b==="adjacency"&&(at(S).focus=m.getAdjacentDataIndices())}}),h.graph.eachEdge(function(m){var _=m.getGraphicEl(),S=m.getModel().get(["emphasis","focus"]);!_||S==="adjacency"&&(at(_).focus={edge:[m.dataIndex],node:[m.node1.dataIndex,m.node2.dataIndex]})});var d=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),g=h.getLayout("cx"),y=h.getLayout("cy");h.eachItemGraphicEl(function(m,_){var S=h.getItemModel(_),w=S.get(["label","rotate"])||0,x=m.getSymbolPath();if(d){var b=h.getItemLayout(_),T=Math.atan2(b[1]-y,b[0]-g);T<0&&(T=Math.PI*2+T);var C=b[0]=0&&e.call(t,a[n],n)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,i=a.length,n=0;n=0&&a[n].node1.dataIndex>=0&&a[n].node2.dataIndex>=0&&e.call(t,a[n],n)},r.prototype.breadthFirstTraverse=function(e,t,a,i){if(t instanceof Ii||(t=this._nodesMap[Mn(t)]),!!t){for(var n=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var n=0,o=i.length;n=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}Qt(Ii,hD("hostGraph","data"));Qt(fD,hD("hostGraph","edgeData"));var x3=S3;function vD(r,e,t,a,i){for(var n=new x3(a),o=0;o "+v)),u++)}var c=t.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar")p=ca(r,t);else{var d=ul.get(c),g=d?d.dimensions||[]:[];ht(g,"value")<0&&g.concat(["value"]);var y=xo(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new be(y,t),p.initData(r)}var m=new be(["value"],t);return m.initData(l,s),i&&i(p,m),YM({mainData:p,struct:n,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),n.update(),n}var w3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function i(){return a._categoriesData}this.legendVisualProvider=new ml(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Qi(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i){a3(this);var s=vD(n,i,this,!0,l);return A(s.edges,function(u){i3(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=Ot.prototype.getModel;function v(p,d){var g=h.call(this,p,d);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=c,p.getModel=v,p});function c(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,i){if(i==="edge"){var n=this.getData(),o=this.getDataParams(t,i),s=n.graph.getEdgeByIndex(t),l=n.getName(s.node1.dataIndex),u=n.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),re("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=kC({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(i){return i.value!=null?i:B({value:0},i)}),a=new be(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(i){return a.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.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,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Vt),b3=w3,T3={type:"graphRoam",event:"graphRoam",update:"none"};function C3(r){r.registerChartView(_3),r.registerSeriesModel(b3),r.registerProcessor(JF),r.registerVisual(jF),r.registerVisual(t3),r.registerLayout(n3),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,s3),r.registerLayout(u3),r.registerCoordinateSystem("graphView",{dimensions:Sl.dimensions,create:h3}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},qt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},qt),r.registerAction(T3,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(i){var n=i.coordinateSystem,o=ey(n,e,void 0,a);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var A3=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),M3=function(r){O(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new A3},e.prototype.buildPath=function(t,a){var i=Math.cos,n=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-i(l)*s*(s>=o/3?1:2),f=a.y-n(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(a.x+i(l)*s,a.y+n(l)*s),t.lineTo(a.x+i(a.angle)*o,a.y+n(a.angle)*o),t.lineTo(a.x-i(l)*s,a.y-n(l)*s),t.lineTo(u,f)},e}(dt),D3=M3;function L3(r,e){var t=r.get("center"),a=e.getWidth(),i=e.getHeight(),n=Math.min(a,i),o=H(t[0],e.getWidth()),s=H(t[1],e.getHeight()),l=H(r.get("radius"),n/2);return{cx:o,cy:s,r:l}}function pu(r,e){var t=r==null?"":r+"";return e&&($(e)?t=e.replace("{value}",t):K(e)&&(t=e(r))),t}var I3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=L3(t,i);this._renderMain(t,a,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,i,n,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),v=h.get("roundCap"),c=v?Tf:Re,p=h.get("show"),d=h.getModel("lineStyle"),g=d.get("width"),y=[u,f];$b(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=0;p&&S=T&&(C===0?0:n[C-1][0]).8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:F}),silent:!0}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+f:f;for(var W=0;W<=w;W++){P=Math.cos(T),R=Math.sin(T);var Z=new ne({shape:{x1:P*(p-N)+v,y1:R*(p-N)+c,x2:P*(p-b-N)+v,y2:R*(p-b-N)+c},silent:!0,style:L});L.stroke==="auto"&&Z.setStyle({stroke:n((E+W/w)/S)}),h.add(Z),T+=M}T-=M}else T+=C}},e.prototype._renderPointer=function(t,a,i,n,o,s,l,u,f){var h=this.group,v=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),w=+t.get("max"),x=[S,w],b=[s,l];function T(M,D){var L=m.getItemModel(M),I=L.getModel("pointer"),P=H(I.get("width"),o.r),R=H(I.get("length"),o.r),E=t.get(["pointer","icon"]),N=I.get("offsetCenter"),k=H(N[0],o.r),V=H(N[1],o.r),F=I.get("keepAspect"),W;return E?W=Kt(E,k-P/2,V-R,P,R,null,F):W=new D3({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:V}}),W.rotation=-(D+Math.PI/2),W.x=o.cx,W.y=o.cy,W}function C(M,D){var L=g.get("roundCap"),I=L?Tf:Re,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(M+1)*R,N=P?o.r:o.r-M*R,k=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(k.z2=w-m.get(_,M)%w),k}(y||d)&&(m.diff(v).add(function(M){var D=m.get(_,M);if(d){var L=T(M,s);Gt(L,{rotation:-((isNaN(+D)?b[0]:Lt(D,x,b,!0))+Math.PI/2)},t),h.add(L),m.setItemGraphicEl(M,L)}if(y){var I=C(M,s),P=g.get("clip");Gt(I,{shape:{endAngle:Lt(D,x,b,P)}},t),h.add(I),Cp(t.seriesIndex,m.dataType,M,I),p[M]=I}}).update(function(M,D){var L=m.get(_,M);if(d){var I=v.getItemGraphicEl(D),P=I?I.rotation:s,R=T(M,P);R.rotation=P,wt(R,{rotation:-((isNaN(+L)?b[0]:Lt(L,x,b,!0))+Math.PI/2)},t),h.add(R),m.setItemGraphicEl(M,R)}if(y){var E=c[D],N=E?E.shape.endAngle:s,k=C(M,N),V=g.get("clip");wt(k,{shape:{endAngle:Lt(L,x,b,V)}},t),h.add(k),Cp(t.seriesIndex,m.dataType,M,k),p[M]=k}}).execute(),m.each(function(M){var D=m.getItemModel(M),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(d){var E=m.getItemGraphicEl(M),N=m.getItemVisual(M,"style"),k=N.fill;if(E instanceof he){var V=E.style;E.useStyle(B({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(k);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",n(Lt(m.get(_,M),x,[0,1],!0))),E.z2EmphasisLift=0,fe(E,D),Ut(E,I,P,R)}if(y){var F=p[M];F.useStyle(m.getItemVisual(M,"style")),F.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,fe(F,D),Ut(F,I,P,R)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var i=t.getModel("anchor"),n=i.get("show");if(n){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),f=Kt(s,a.cx-o/2+H(l[0],a.r),a.cy-o/2+H(l[1],a.r),o,o,null,u);f.z2=i.get("showAbove")?1:0,f.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,a,i,n,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),v=new rt,c=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Tt({silent:!0}),p[y]=new Tt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new rt,w=n(Lt(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var b=x.get("offsetCenter"),T=o.cx+H(b[0],o.r),C=o.cy+H(b[1],o.r),M=c[y];M.attr({z2:g?0:2,style:Bt(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+H(L[0],o.r),P=o.cy+H(L[1],o.r),R=H(D.get("width"),o.r),E=H(D.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,M=p[y],k=D.get("formatter");M.attr({z2:g?0:2,style:Bt(D,{x:I,y:P,text:pu(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),NT(M,{normal:D},_,function(F){return pu(F,k)}),d&&VT(M,y,l,t,{getFormattedLabel:function(F,W,Z,tt,ft,Dt){return pu(Dt?Dt.interpolatedValue:_,k)}}),S.add(M)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Rt),P3=I3,R3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return wo(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Vt),E3=R3;function k3(r){r.registerChartView(P3),r.registerSeriesModel(E3)}var O3=["itemStyle","opacity"],N3=function(r){O(e,r);function e(t,a){var i=r.call(this)||this,n=i,o=new ke,s=new Tt;return n.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,a,!0),i}return e.prototype.updateData=function(t,a,i){var n=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(O3);f=f==null?1:f,i||_r(n),n.useStyle(t.getItemVisual(a,"style")),n.style.lineJoin="round",i?(n.setShape({points:l.points}),n.style.opacity=0,Gt(n,{style:{opacity:f}},o,a)):wt(n,{style:{opacity:f},shape:{points:l.points}},o,a),fe(n,s),this._updateLabel(t,a),Ut(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),f=u.label,h=t.getItemVisual(a,"style"),v=h.fill;me(o,oe(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),i.setTextConfig({local:!0,inside:!!f.inside,insideStroke:v,outsideFill:v});var c=f.linePoints;n.setShape({points:c}),i.textGuideLineConfig={anchor:c?new ot(c[0][0],c[0][1]):null},wt(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),Wg(i,$g(l),{stroke:v})},e}(Ee),V3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,i){var n=t.getData(),o=this._data,s=this.group;n.diff(o).add(function(l){var u=new N3(n,l);n.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,l),s.add(f),n.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);ks(u,t,l)}).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Rt),B3=V3,z3=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new ml(U(this.getData,this),U(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return wo(this,{coordDimensions:["value"],encodeDefaulter:it(_g,this)})},e.prototype._defaultLabelLine=function(t){Qi(t,"labelLine",["show"]);var a=t.labelLine,i=t.emphasis.labelLine;a.show=a.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),i=r.prototype.getDataParams.call(this,t),n=a.mapDimension("value"),o=a.getSum(n);return i.percent=o?+(a.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Vt),G3=z3;function F3(r,e){return jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function H3(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),i=[],n=e==="ascending",o=0,s=r.count();osH)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!mc(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function mc(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var fH=lH,hH=function(r){O(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&st(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var i=t.get("parallelIndex");return i!=null&&a.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],i=It(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(n){return(n.get("parallelIndex")||0)===this.componentIndex},this);A(i,function(n){t.push("dim"+n.get("dim")),a.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(St),vH=hH,cH=function(r){O(e,r);function e(t,a,i,n,o){var s=r.call(this,t,a,i)||this;return s.type=n||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(xr),pH=cH;function hn(r,e,t,a,i,n){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=Dn(i,[0,o])),n!=null&&(n=Math.max(n,i!=null?i:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Dn(s,[0,o]),i=n=Dn(s,[i,n]),a=0}e[0]=Dn(e[0],t),e[1]=Dn(e[1],t);var l=_c(e,a);e[a]+=r;var u=i||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=Dn(e[a],f);var h;return h=_c(e,a),i!=null&&(h.sign!==l.sign||h.spann&&(e[1-a]=e[a]+h.sign*n),e}function _c(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Dn(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var Sc=A,pD=Math.min,dD=Math.max,SS=Math.floor,dH=Math.ceil,xS=$t,gH=Math.PI,yH=function(){function r(e,t,a){this.type="parallel",this._axesMap=q(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var i=e.dimensions,n=e.parallelAxisIndex;Sc(i,function(o,s){var l=n[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new pH(o,_h(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,i=t.layoutBase,n=t.pixelDimIndex,o=e[1-n],s=e[n];return o>=a&&o<=a+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(!!e.contains(a,t)){var i=a.getData();Sc(this.dimensions,function(n){var o=this._axesMap.get(n);o.scale.unionExtentFromData(i,i.mapDimension(n)),jn(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=jt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],i=["width","height"],n=e.get("layout"),o=n==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,f=du(e.get("axisExpandWidth"),l),h=du(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=e.get("axisExpandWindow"),p;if(c)p=du(c[1]-c[0],l),c[1]=c[0]+p;else{p=du(f*(h-1),l);var d=e.get("axisExpandCenter")||SS(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[SS(xS(c[0]/f,1))+1,dH(xS(c[1]/f,1))-1],m=g/f*c[0];return{layout:n,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[i[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,i=this._makeLayoutInfo(),n=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),Sc(a,function(o,s){var l=(i.axisExpandable?_H:mH)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},f={horizontal:gH/2,vertical:0},h=[u[n].x+e.x,u[n].y+e.y],v=f[n],c=ir();on(c,c,v),Br(c,c,h),this._axesLayout[o]={position:h,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,i){a==null&&(a=0),i==null&&(i=e.count());var n=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(e.mapDimension(g)),l.push(n.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fn*(1-h[0])?(u="jump",l=s-n*(1-h[2])):(l=s-n*h[1])>=0&&(l=s-n*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?hn(l,i,o,"all"):u="none";else{var c=i[1]-i[0],p=o[1]*s/c;i=[dD(0,p-c/2)],i[1]=pD(o[1],i[0]+c),i[0]=i[1]-c}return{axisExpandWindow:i,behavior:u}},r}();function du(r,e){return pD(dD(r,e[0]),e[1])}function mH(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function _H(r,e){var t=e.layoutLength,a=e.axisExpandWidth,i=e.axisCount,n=e.axisCollapseWidth,o=e.winInnerIndices,s,l=n,u=!1,f;return r