!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,i){if(!t)return;if("string"==typeof t)return e(t,i);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,i)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);idiv{font-size:.26667rem;border-radius:.32rem;border:.02667rem solid;margin:0 .08rem;line-height:.48rem;width:1.06667rem;text-align:center}._headLabelWrap_17r04_50{display:flex;align-items:center;justify-content:center;padding:.26667rem;font-size:.32rem}._headLabelWrap_17r04_50 ._headLabel_17r04_50{margin:0 .16rem;display:flex;align-items:center}._headLabelWrap_17r04_50 ._headLabelDot_17r04_62{width:.10667rem;height:.10667rem;border-radius:50%;margin-right:.08rem}._content_17r04_68{display:flex;align-items:center;padding:.21333rem .05333rem}._echartsMain_17r04_73{margin:0 -.32rem;height:5.38667rem}._items_17r04_77{flex:1;display:flex;align-items:center;margin-left:.45333rem;justify-content:space-between}._items_17r04_77 ._item_17r04_77 ._itemNum_17r04_84{display:flex;justify-content:flex-end;align-items:center;font-weight:400;font-size:.58667rem;color:#333;margin-bottom:.08rem;white-space:nowrap}._items_17r04_77 ._item_17r04_77 ._itemNum_17r04_84 ._rect_17r04_94{width:.21333rem;height:.21333rem;background:#FF8057;border-radius:.05333rem;margin-right:.16rem}._items_17r04_77 ._item_17r04_77 ._itemTitle_17r04_101{font-size:.32rem;color:#777;white-space:nowrap}._items_17r04_77 ._line_17r04_106{padding:0 .26667rem;border-left:.02667rem solid;border-right:.02667rem solid;-o-border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1;border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1}._subjectWrap_17r04_112{padding:0}._listItem_17r04_115{position:relative;display:flex;align-items:center;padding:.26667rem .4rem .26667rem .72rem;border:.02667rem solid transparent}._listItem_17r04_115:not(:last-child){border-bottom:.02667rem dashed #EAEAEA}._listItem_17r04_115 ._itemLeft_17r04_125{border-right:.02667rem solid;-o-border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1;border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1}._listItem_17r04_115 ._itemLeft_17r04_125 ._subjectName_17r04_129{width:1.44rem;font-size:.34667rem;font-weight:600;color:#333;line-height:.48rem;margin-bottom:.08rem;white-space:nowrap}._listItem_17r04_115 ._itemLeft_17r04_125 ._subjectType_17r04_138{font-size:.26667rem;font-weight:400;color:#666;line-height:.37333rem}._listItem_17r04_115 ._dot_17r04_144{position:absolute;left:.4rem;top:.4rem;width:.10667rem;height:.10667rem;background:#AAAAAA;border-radius:50%}._listItemActive_17r04_153{background-color:rgba(255,128,87,.09);border:.02667rem solid #FF8057!important;border-radius:.26667rem}._listitems_17r04_158{flex:1;display:flex;align-items:center;margin-left:.45333rem;justify-content:space-between}._listitems_17r04_158 ._item_17r04_77 ._itemNum_17r04_84{display:flex;justify-content:flex-end;align-items:center;font-size:.42667rem;color:#333;margin-bottom:.08rem;white-space:nowrap}._listitems_17r04_158 ._item_17r04_77 ._itemTitle_17r04_101{font-size:.26667rem;color:#777;white-space:nowrap}._listitems_17r04_158 ._line_17r04_106{border-left:.02667rem solid;border-right:.02667rem solid;-o-border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1;border-image:linear-gradient(to bottom,#f9f9f9,#eaeaea,#f9f9f9) 1}._circle_1j0c8_1{transform:rotate(-90deg)}._circle-main-box_1j0c8_4{position:relative;display:block;margin:0 auto}._count-num_1j0c8_9{position:absolute;left:0;top:21Px;align-items:center;justify-content:center;display:flex;font-size:22Px;color:#333;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;text-align:center}._des_1j0c8_22{position:absolute;left:0;top:47Px;font-size:.32rem;color:#777;width:100%;text-align:center}\n",document.head.appendChild(r),System.register(["./index-legacy.5f9666b4.js","./universalTransition-legacy.490e7186.js"],(function(e){"use strict";var i,o,r,a,s,l,u,c,p,d,h,g,f,y,m,v,x,_,b,S,w,M,I,A,D,T,C,L,N,P,k,R,E,V,O,z,B,G,F,W,H,U,j,X,Y,Z,q,J,Q,K,$,tt,et,it,nt,ot,rt,at,st,lt,ut,ct,pt,dt,ht,gt,ft,yt,mt,vt,xt,_t,bt,St,wt,Mt,It,At,Dt,Tt,Ct,Lt,Nt,Pt,kt,Rt,Et,Vt,Ot,zt,Bt,Gt,Ft,Wt,Ht,Ut,jt,Xt,Yt,Zt,qt,Jt,Qt,Kt,$t,te,ee,ie,ne,oe,re,ae,se,le,ue,ce,pe,de,he,ge,fe,ye,me,ve,xe,_e,be,Se,we,Me,Ie,Ae,De,Te,Ce,Le,Ne,Pe,ke,Re,Ee,Ve,Oe,ze,Be,Ge,Fe,We,He,Ue,je,Xe,Ye,Ze,qe,Je,Qe,Ke,$e,ti,ei,ii,ni,oi,ri,ai,si,li,ui,ci,pi,di,hi,gi,fi,yi,mi,vi,xi,_i,bi,Si,wi,Mi,Ii,Ai,Di,Ti,Ci,Li,Ni,Pi,ki,Ri,Ei,Vi,Oi,zi,Bi,Gi,Fi,Wi,Hi,Ui,ji,Xi,Yi,Zi,qi,Ji,Qi,Ki,$i,tn,en,nn,on,rn,an,sn,ln,un,cn,pn,dn,hn,gn,fn,yn,mn,vn,xn,_n,bn,Sn,wn,Mn,In,An,Dn,Tn,Cn,Ln,Nn,Pn,kn,Rn,En,Vn,On,zn,Bn,Gn,Fn,Wn,Hn,Un,jn,Xn,Yn,Zn,qn,Jn,Qn,Kn,$n,to,eo,io,no,oo,ro,ao,so,lo,uo,co,po,ho,go,fo,yo,mo,vo,xo,_o,bo,So,wo,Mo,Io,Ao,Do,To,Co,Lo,No,Po,ko,Ro,Eo,Vo,Oo,zo,Bo,Go,Fo,Wo,Ho,Uo,jo,Xo,Yo,Zo,qo,Jo,Qo,Ko,$o,tr,er,ir,nr,or,rr,ar,sr,lr,ur,cr;return{setters:[function(t){i=t.d,o=t.c,r=t.q,a=t.r,s=t.D,l=t.$,u=t.bI,c=t.e,p=t.ab,d=t.bK},function(t){h=t.w,g=t._,f=t.p,y=t.B,m=t.q,v=t.r,x=t.s,_=t.t,b=t.v,S=t.x,w=t.y,M=t.z,I=t.A,A=t.Z,D=t.C,T=t.D,C=t.E,L=t.F,N=t.G,P=t.H,k=t.I,R=t.J,E=t.K,V=t.M,O=t.P,z=t.N,B=t.O,G=t.Q,F=t.T,W=t.R,H=t.S,U=t.U,j=t.V,X=t.W,Y=t.X,Z=t.Y,q=t.$,J=t.a0,Q=t.a1,K=t.a2,$=t.a3,tt=t.a4,et=t.a5,it=t.a6,nt=t.a7,ot=t.a8,rt=t.a9,at=t.aa,st=t.ab,lt=t.ac,ut=t.ad,ct=t.ae,pt=t.af,dt=t.ag,ht=t.ah,gt=t.ai,ft=t.aj,yt=t.ak,mt=t.al,vt=t.am,xt=t.an,_t=t.ao,bt=t.ap,St=t.aq,wt=t.u,Mt=t.ar,It=t.as,At=t.at,Dt=t.au,Tt=t.av,Ct=t.aw,Lt=t.ax,Nt=t.ay,Pt=t.az,kt=t.aA,Rt=t.aB,Et=t.aC,Vt=t.aD,Ot=t.aE,zt=t.aF,Bt=t.aG,Gt=t.aH,Ft=t.aI,Wt=t.aJ,Ht=t.aK,Ut=t.aL,jt=t.aM,Xt=t.aN,Yt=t.aO,Zt=t.aP,qt=t.aQ,Jt=t.aR,Qt=t.aS,Kt=t.aT,$t=t.aU,te=t.aV,ee=t.aW,ie=t.aX,ne=t.aY,oe=t.aZ,re=t.a_,ae=t.a$,se=t.b0,le=t.b1,ue=t.b2,ce=t.L,pe=t.b3,de=t.b4,he=t.b5,ge=t.b6,fe=t.b7,ye=t.b8,me=t.b9,ve=t.ba,xe=t.bb,_e=t.bc,be=t.bd,Se=t.be,we=t.bf,Me=t.bg,Ie=t.bh,Ae=t.bi,De=t.bj,Te=t.bk,Ce=t.bl,Le=t.bm,Ne=t.bn,Pe=t.bo,ke=t.bp,Re=t.bq,Ee=t.br,Ve=t.bs,Oe=t.bt,ze=t.bu,Be=t.bv,Ge=t.bw,Fe=t.bx,We=t.by,He=t.bz,Ue=t.bA,je=t.bB,Xe=t.bC,Ye=t.bD,Ze=t.bE,qe=t.bF,Je=t.bG,Qe=t.bH,Ke=t.bI,$e=t.bJ,ti=t.bK,ei=t.bL,ii=t.bM,ni=t.bN,oi=t.bO,ri=t.bP,ai=t.bQ,si=t.bR,li=t.bS,ui=t.bT,ci=t.bU,pi=t.bV,di=t.bW,hi=t.bX,gi=t.bY,fi=t.bZ,yi=t.b_,mi=t.b$,vi=t.c0,xi=t.c1,_i=t.c2,bi=t.c3,Si=t.c4,wi=t.c5,Mi=t.c6,Ii=t.c7,Ai=t.c8,Di=t.c9,Ti=t.ca,Ci=t.cb,Li=t.cc,Ni=t.cd,Pi=t.ce,ki=t.cf,Ri=t.cg,Ei=t.ch,Vi=t.ci,Oi=t.cj,zi=t.ck,Bi=t.cl,Gi=t.cm,Fi=t.cn,Wi=t.co,Hi=t.cp,Ui=t.cq,ji=t.cr,Xi=t.cs,Yi=t.ct,Zi=t.cu,qi=t.cv,Ji=t.cw,Qi=t.cx,Ki=t.cy,$i=t.cz,tn=t.cA,en=t.cB,nn=t.cC,on=t.cD,rn=t.cE,an=t.cF,sn=t.cG,ln=t.cH,un=t.cI,cn=t.cJ,pn=t.cK,dn=t.cL,hn=t.cM,gn=t.cN,fn=t.cO,yn=t.cP,mn=t.cQ,vn=t.cR,xn=t.cS,_n=t.cT,bn=t.cU,Sn=t.cV,wn=t.cW,Mn=t.cX,In=t.cY,An=t.cZ,Dn=t.c_,Tn=t.c$,Cn=t.d0,Ln=t.d1,Nn=t.d2,Pn=t.d3,kn=t.d4,Rn=t.d5,En=t.d6,Vn=t.d7,On=t.d8,zn=t.d9,Bn=t.da,Gn=t.db,Fn=t.dc,Wn=t.dd,Hn=t.de,Un=t.df,jn=t.dg,Xn=t.dh,Yn=t.di,Zn=t.dj,qn=t.dk,Jn=t.dl,Qn=t.dm,Kn=t.dn,$n=t.dp,to=t.dq,eo=t.dr,io=t.ds,no=t.dt,oo=t.du,ro=t.dv,ao=t.dw,so=t.dx,lo=t.dy,uo=t.dz,co=t.dA,po=t.dB,ho=t.dC,go=t.dD,fo=t.dE,yo=t.dF,mo=t.dG,vo=t.dH,xo=t.dI,_o=t.dJ,bo=t.dK,So=t.dL,wo=t.dM,Mo=t.dN,Io=t.dO,Ao=t.dP,Do=t.dQ,To=t.dR,Co=t.dS,Lo=t.dT,No=t.dU,Po=t.dV,ko=t.dW,Ro=t.dX,Eo=t.dY,Vo=t.dZ,Oo=t.d_,zo=t.d$,Bo=t.e0,Go=t.e1,Fo=t.e2,Wo=t.e3,Ho=t.e4,Uo=t.e5,jo=t.e6,Xo=t.e7,Yo=t.e8,Zo=t.j,qo=t.o,Jo=t.f,Qo=t.k,Ko=t.c,$o=t.l,tr=t.b,er=t.a,ir=t.m,nr=t.n,or=t.e9,rr=t.ea,ar=t.e,sr=t.d,lr=t.h,ur=t.g,cr=t.i}],execute:function(){var pr={subjectEcharts:"_subjectEcharts_17r04_1",container:"_container_17r04_5",emtry:"_emtry_17r04_12",head:"_head_17r04_20",headLeft:"_headLeft_17r04_26",icon:"_icon_17r04_30",headRight:"_headRight_17r04_36",headLabelWrap:"_headLabelWrap_17r04_50",headLabel:"_headLabel_17r04_50",headLabelDot:"_headLabelDot_17r04_62",content:"_content_17r04_68",echartsMain:"_echartsMain_17r04_73",items:"_items_17r04_77",item:"_item_17r04_77",itemNum:"_itemNum_17r04_84",rect:"_rect_17r04_94",itemTitle:"_itemTitle_17r04_101",line:"_line_17r04_106",subjectWrap:"_subjectWrap_17r04_112",listItem:"_listItem_17r04_115",itemLeft:"_itemLeft_17r04_125",subjectName:"_subjectName_17r04_129",subjectType:"_subjectType_17r04_138",dot:"_dot_17r04_144",listItemActive:"_listItemActive_17r04_153",listitems:"_listitems_17r04_158"},dr={circle:"_circle_1j0c8_1","circle-main-box":"_circle-main-box_1j0c8_4","count-num":"_count-num_1j0c8_9",des:"_des_1j0c8_22"},hr=i({name:"CircleProgress",data:function(){return{now:0,timer:null}},props:{value:{type:Number,default:0},size:{type:Number,default:120},strokeWidth:{type:Number,default:10},color:{type:String,default:"rgba(153,202,251,1)"},duration:{type:Number,default:1e3},des:{type:String,default:"总达标率"}},watch:{value:function(t){var e=this;this.now=0,this.$nextTick((function(){e.run()}))}},computed:{percentage:function(){return this.value},countDown:function(){return this.now},cx:function(){return this.size/2},cy:function(){return this.size/2},radius:function(){return(this.size-this.strokeWidth)/2},circumference:function(){return 2*Math.PI*this.radius},progress:function(){return(1-this.now/100)*this.circumference}},mounted:function(){this.run()},methods:{run:function(){var t=this;if(0!=this.value){var e=this.duration/this.value;this.timer=setInterval((function(){if(t.now>=t.value)return t.now=t.value,clearInterval(t.timer);t.now++}),e)}}},render:function(){return o("div",{class:dr["circle-main"]},[o("div",{class:dr["circle-main-box"],style:[{width:this.size+"px",height:this.size+"px"}]},[o("svg",{width:this.size,height:this.size,class:dr.circle},[o("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:"#FFE7DF","stroke-width":this.strokeWidth},null),o("circle",{r:this.radius,cx:this.cx,cy:this.cy,fill:"transparent",stroke:this.color,"stroke-width":this.strokeWidth,"stroke-linecap":"round","stroke-dasharray":this.circumference,"stroke-dashoffset":this.progress},null)]),o("span",{class:dr["count-num"]},[this.countDown,o("span",{class:dr.countType},[r("%")])]),o("span",{class:dr.des},[this.des])])])}});function gr(t,e){return Math.abs(t-e)<1e-8}function fr(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var r=1;ri&&(t=o,i=a)}if(t)return function(t){for(var e=0,i=0,n=0,o=t.length,r=t[o-1][0],a=t[o-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),o=s+=o,r=l+=r,n.push([s/i,l/i])}return n}function Ar(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,i=e.UTF8Scale;null==i&&(i=1024);var n=e.features;return f(n,(function(t){var e=t.geometry,n=e.encodeOffsets,o=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=Ir(o,n,i);break;case"Polygon":case"MultiLineString":Mr(o,n,i);break;case"MultiPolygon":f(o,(function(t,e){return Mr(t,n[e],i)}))}})),e.UTF8Encoding=!1,e}(t),w(M(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var i=t.properties,n=t.geometry,o=[];switch(n.type){case"Polygon":var r=n.coordinates;o.push(new _r(r[0],r.slice(1)));break;case"MultiPolygon":f(n.coordinates,(function(t){t[0]&&o.push(new _r(t[0],t.slice(1)))}));break;case"LineString":o.push(new br([n.coordinates]));break;case"MultiLineString":o.push(new br(n.coordinates))}var a=new Sr(i[e||"name"],o,i.cp);return a.properties=i,a}))}var Dr=Math.sin,Tr=Math.cos,Cr=Math.PI,Lr=2*Math.PI,Nr=180/Cr,Pr=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,i,n,o,r){this._add("C",t,e,i,n,o,r)},t.prototype.quadraticCurveTo=function(t,e,i,n){this._add("Q",t,e,i,n)},t.prototype.arc=function(t,e,i,n,o,r){this.ellipse(t,e,i,i,0,n,o,r)},t.prototype.ellipse=function(t,e,i,n,o,r,a,s){var l=a-r,u=!s,c=Math.abs(l),p=I(c-Lr)||(u?l>=Lr:-l>=Lr),d=l>0?l%Lr:l%Lr+Lr,h=!1;h=!!p||!I(c)&&d>=Cr==!!u;var g=t+i*Tr(r),f=e+n*Dr(r);this._start&&this._add("M",g,f);var y=Math.round(o*Nr);if(p){var m=1/this._p,v=(u?1:-1)*(Lr-m);this._add("A",i,n,y,1,+u,t+i*Tr(r+v),e+n*Dr(r+v)),m>.01&&this._add("A",i,n,y,0,+u,g,f)}else{var x=t+i*Tr(a),_=e+n*Dr(a);this._add("A",i,n,y,+h,+u,x,_)}},t.prototype.rect=function(t,e,i,n){this._add("M",t,e),this._add("l",i,0),this._add("l",0,n),this._add("l",-i,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,i,n,o,r,a,s,l){for(var u=[],c=this._p,p=1;p"}(o,e.attrs)+(e.text||"")+(n?""+i+w(n,(function(e){return t(e)})).join(i)+i:"")+("")}(t)}function Ur(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function jr(t,e,i,n){return Wr("svg","root",{width:t,height:e,xmlns:Br,"xmlns:xlink":Gr,version:"1.1",baseProfile:"full",viewBox:!!n&&"0 0 "+t+" "+e},i)}var Xr={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"},Yr="transform-origin";function Zr(t,e,i){var n=E({},t.shape);E(n,e),t.buildPath(i,n);var o=new kr;return o.reset(z(t)),i.rebuildPath(o,1),o.generateStr(),o.getStr()}function qr(t,e){var i=e.originX,n=e.originY;(i||n)&&(t[Yr]=i+"px "+n+"px")}var Jr={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Qr(t,e){var i=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[i]=t,i}function Kr(t){return P(t)?Xr[t]?"cubic-bezier("+Xr[t]+")":k(t)?t:"":""}function $r(t,e,i,n){var o=t.animators,r=o.length,a=[];if(t instanceof N){var s=function(t,e,i){var n,o,r=t.shape.paths,a={};if(f(r,(function(t){var e=Ur(i.zrId);e.animation=!0,$r(t,{},e,!0);var r=e.cssAnims,s=e.cssNodes,l=L(r),u=l.length;if(u){var c=r[o=l[u-1]];for(var p in c){var d=c[p];a[p]=a[p]||{d:""},a[p].d+=d.d||""}for(var h in s){var g=s[h].animation;g.indexOf(o)>=0&&(n=g)}}})),n){e.d=!1;var s=Qr(a,i);return n.replace(o,s)}}(t,e,i);if(s)a.push(s);else if(!r)return}else if(!r)return;for(var l={},u=0;u0})).length)return Qr(c,i)+" "+o[0]+" both"}for(var m in l){(s=y(l[m]))&&a.push(s)}if(a.length){var v=i.zrId+"-cls-"+i.cssClassIdx++;i.cssNodes["."+v]={animation:a.join(",")},e.class=v}}var ta=Math.round;function ea(t){return t&&P(t.src)}function ia(t){return t&&J(t.toDataURL)}function na(t,e,i,n){zr((function(o,r){var a="fill"===o||"stroke"===o;a&&Q(r)?function(t,e,i,n){var o,r=t[i],a={gradientUnits:r.global?"userSpaceOnUse":"objectBoundingBox"};if(it(r))o="linearGradient",a.x1=r.x,a.y1=r.y,a.x2=r.x2,a.y2=r.y2;else{if(!nt(r))return void rt("Illegal gradient type.");o="radialGradient",a.cx=ot(r.x,.5),a.cy=ot(r.y,.5),a.r=ot(r.r,.5)}for(var s=r.colorStops,l=[],u=0,c=s.length;ul?Da(t,null==i[p+1]?null:i[p+1].elm,i,s,p):Ta(t,e,a,l))}(i,n,o):wa(o)?(wa(t.text)&&_a(i,""),Da(i,null,o,0,o.length-1)):wa(n)?Ta(i,n,0,n.length-1):wa(t.text)&&_a(i,""):t.text!==e.text&&(wa(n)&&Ta(i,n,0,n.length-1),_a(i,e.text)))}var Na=0,Pa=function(){function t(t,e,i){if(this.type="svg",this.refreshHover=ka("refreshHover"),this.configLayer=ka("configLayer"),this.storage=e,this._opts=i=E({},i),this.root=t,this._id="zr"+Na++,this._oldVNode=jr(i.width,i.height),t&&!i.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=Fr("svg");Ca(null,this._oldVNode),n.appendChild(o),t.appendChild(n)}this.resize(i.width,i.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Ia(t,e))La(t,e);else{var i=t.elm,n=va(i);Aa(e),null!==n&&(fa(n,e.elm,xa(i)),Ta(n,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return da(t,Ur(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),i=this._backgroundColor,n=this._width,o=this._height,r=Ur(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress;var a=[];if(i&&"none"!==i){var s=D(i),l=s.color,u=s.opacity;this._bgVNode=Wr("rect","bg",{width:n,height:o,x:"0",y:"0",id:"0",fill:l,"fill-opacity":u}),a.push(this._bgVNode)}else this._bgVNode=null;var c=t.compress?null:this._mainVNode=Wr("g","main",{},[]);this._paintList(e,r,c?c.children:a),c&&a.push(c);var p=w(L(r.defs),(function(t){return r.defs[t]}));if(p.length&&a.push(Wr("defs","defs",{},p)),t.animation){var d=function(t,e,i){var n=(i=i||{}).newline?"\n":"",o=" {"+n,r=n+"}",a=w(L(t),(function(e){return e+o+w(L(t[e]),(function(i){return i+":"+t[e][i]+";"})).join(n)+r})).join(n),s=w(L(e),(function(t){return"@keyframes "+t+o+w(L(e[t]),(function(i){return i+o+w(L(e[t][i]),(function(n){var o=e[t][i][n];return"d"===n&&(o='path("'+o+'")'),n+":"+o+";"})).join(n)+r})).join(n)+r})).join(n);return a||s?[""].join(n):""}(r.cssNodes,r.cssAnims,{newline:!0});if(d){var h=Wr("style","stl",{},[],d);a.push(h)}}return jr(n,o,a,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},Hr(this.renderToVNode({animation:ot(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:ot(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e=this._bgVNode;if(e&&e.elm){var i=D(t),n=i.color,o=i.opacity;e.elm.setAttribute("fill",n),o<1&&e.elm.setAttribute("fill-opacity",o)}},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,i){for(var n,o,r=t.length,a=[],s=0,l=0,u=0;u=0&&(!p||!o||p[g]!==o[g]);g--);for(var f=h-1;f>g;f--)n=a[--s-1];for(var y=g+1;ythis.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}(yt),Va=Ea,Oa=function(){},za=function(t){function e(e){var i=t.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return g(e,t),e.prototype.getDefaultShape=function(){return new Oa},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var i,n=e.points,o=e.size,r=this.symbolProxy,a=r.shape,s=t.getContext?t.getContext():t,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,i=this._off;i=0;s--){var l=2*s,u=n[l]-r/2,c=n[l+1]-a/2;if(t>=u&&e>=c&&t<=u+r&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return t=i[0],e=i[1],n.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,i=e.points,n=e.size,o=n[0],r=n[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=i+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Ga=Ba,Fa=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4)return{update:!0};var o=_t("").reset(t,e,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 e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},e.prototype._updateSymbolDraw=function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Ga:new bt,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(St),Wa=Fa;function Ha(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){var o=n.getIndicatorAxes();f(o,(function(t,r){e.each(e.mapDimension(o[r].dim),(function(t,e){i[e]=i[e]||[];var o=n.dataToPoint(t,r);i[e][r]=Ua(o)?o:ja(n)}))})),e.each((function(t){var o=It(i[t],(function(t){return Ua(t)}))||ja(n);i[t].push(o.slice()),e.setItemLayout(t,i[t])}))}}))}function Ua(t){return!isNaN(t[0])&&!isNaN(t[1])}function ja(t){return[t.cx,t.cy]}function Xa(t){var e=t.polar;if(e){pt(e)||(e=[e]);var i=[];f(e,(function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],pt(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)})),t.polar=i}f(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))}var Ya=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){var n=t.coordinateSystem,o=this.group,r=t.getData(),a=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle";if("none"!==i){var n=Ot(t.getItemVisual(e,"symbolSize")),o=vt(i,-1,-1,2,2),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:n[0]/2,scaleY:n[1]/2,rotation:r*Math.PI/180||0}),o}}function l(e,i,n,o,r,a){n.removeAll();for(var l=0;l0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var d=a;null!=p.color&&(d=Nt({color:p.color},a));var h=Ht(ct(p),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:o,axisLabel:r,name:p.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:c},!1);if(P(l)){var g=h.name;h.name=l.replace("{value}",null!=g?g:"")}else J(l)&&(h.name=l(h.name,h));var f=new Ut(h,null,this.ecModel);return jt(f,Xt.prototype),f.mainType="radar",f.componentIndex=this.componentIndex,f}),this);this._indicatorModels=p},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:Ht({lineStyle:{color:"#bbb"}},Qa.axisLine),axisLabel:Ka(Qa.axisLabel,!1),axisTick:Ka(Qa.axisTick,!1),splitLine:Ka(Qa.splitLine,!0),splitArea:Ka(Qa.splitArea,!0),indicator:[]},e}(Yt),es=ts,is=["axisLine","axisTickLabel","axisName"],ns=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=w(i,(function(t){var i=t.model.get("showName")?t.name:"";return new qt(t.model,{axisName:i,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));f(n,(function(t){f(is,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),a=o.getModel("lineStyle"),s=r.getModel("areaStyle"),l=o.get("show"),u=r.get("show"),c=a.get("color"),p=s.get("color"),d=pt(c)?c:[c],h=pt(p)?p:[p],g=[],y=[];if("circle"===n)for(var m=i[0].getTicksCoords(),v=e.cx,x=e.cy,_=0;_=4&&(l={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(l&&null!=a&&null!=s&&(u=Ps(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=n;(n=new mt).add(d),d.scaleX=d.scaleY=u.scale,d.x=u.x,d.y=u.y}return e.ignoreRootClip||null==a||null==s||n.setClipPath(new re({shape:{x:0,y:0,width:a,height:s}})),{root:n,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:o}},t.prototype._parseNode=function(t,e,i,n,o,r){var a,s=t.nodeName.toLowerCase(),l=n;if("defs"===s&&(o=!0),"text"===s&&(r=!0),"defs"===s||"switch"===s)a=e;else{if(!o){var u=$a[s];if(u&&ae($a,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var p={name:c,namedFrom:null,svgNodeTagLower:s,el:a};i.push(p),"g"===s&&(l=p)}else n&&i.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:a});e.add(a)}}var d=vs[s];if(d&&ae(vs,s)){var h=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=h)}}if(a&&a.isGroup)for(var f=t.firstChild;f;)1===f.nodeType?this._parseNode(f,a,i,l,o,r):3===f.nodeType&&r&&this._parseText(f,a),f=f.nextSibling},t.prototype._parseText=function(t,e){var i=new F({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});bs(e,i),ws(t,i,this._defsUsePending,!1,!1),function(t,e){var i=e.__selfStyle;if(i){var n=i.textBaseline,o=n;n&&"auto"!==n?"baseline"===n?o="alphabetic":"before-edge"===n||"text-before-edge"===n?o="top":"after-edge"===n||"text-after-edge"===n?o="bottom":"central"!==n&&"mathematical"!==n||(o="middle"):o="alphabetic",t.style.textBaseline=o}var r=e.__inheritedStyle;if(r){var a=r.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(i,e);var n=i.style,o=n.fontSize;o&&o<9&&(n.fontSize=9,i.scaleX*=o/9,i.scaleY*=o/9);var r=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=r;var a=i.getBoundingRect();return this._textX+=a.width,e.add(i),i},t.internalField=void($a={g:function(t,e){var i=new mt;return bs(e,i),ws(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new re;return bs(e,i),ws(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new Jt;return bs(e,i),ws(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new se;return bs(e,i),ws(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new le;return bs(e,i),ws(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i,n=t.getAttribute("points");n&&(i=Ss(n));var o=new At({shape:{points:i||[]},silent:!0});return bs(e,o),ws(t,o,this._defsUsePending,!1,!1),o},polyline:function(t,e){var i,n=t.getAttribute("points");n&&(i=Ss(n));var o=new Dt({shape:{points:i||[]},silent:!0});return bs(e,o),ws(t,o,this._defsUsePending,!1,!1),o},image:function(t,e){var i=new A;return bs(e,i),ws(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(r);var a=new mt;return bs(e,a),ws(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0",a=new mt;return bs(e,a),ws(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(r),a},path:function(t,e){var i=t.getAttribute("d")||"",n=ue(i);return bs(e,n),ws(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),vs={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),i=parseInt(t.getAttribute("y1")||"0",10),n=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),r=new ce(e,i,n,o);return xs(t,r),_s(t,r),r},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),i=parseInt(t.getAttribute("cy")||"0",10),n=parseInt(t.getAttribute("r")||"0",10),o=new pe(e,i,n);return xs(t,o),_s(t,o),o}};function xs(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function _s(t,e){for(var i=t.firstChild;i;){if(1===i.nodeType&&"stop"===i.nodeName.toLocaleLowerCase()){var n=i.getAttribute("offset"),o=void 0;o=n&&n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r={};Ns(i,r,r);var a=r.stopColor||i.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:o,color:a})}i=i.nextSibling}}function bs(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Nt(e.__inheritedStyle,t.__inheritedStyle))}function Ss(t){for(var e=Ds(t),i=[],n=0;n0;r-=2){var a=n[r],s=n[r-1],l=Ds(a);switch(o=o||ye(),s){case"translate":fe(o,o,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ge(o,o,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":he(o,o,-parseFloat(l[0])*Cs);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Cs);v(o,[1,0,u,1,0,0],o);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Cs);v(o,[1,c,0,1,0,0],o);break;case"matrix":o[0]=parseFloat(l[0]),o[1]=parseFloat(l[1]),o[2]=parseFloat(l[2]),o[3]=parseFloat(l[3]),o[4]=parseFloat(l[4]),o[5]=parseFloat(l[5])}}e.setLocalTransform(o)}}(t,e),Ns(t,a,s),n||function(t,e,i){for(var n=0;n0,g={api:i,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:h,isGeo:r,transformInfoRaw:p};"geoJSON"===s.resourceType?this._buildGeoJSON(g):"geoSVG"===s.resourceType&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,l,i,n)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=me(),i=me(),n=this._regionsGroup,o=t.transformInfoRaw,r=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function c(t){for(var e=[],i=!l&&s&&s.project,n=0;n=0)&&(d=o);var h=a?{normal:{align:"center",verticalAlign:"middle"}}:null;kt(e,Rt(n),{labelFetcher:d,labelDataIndex:p,defaultText:i},h);var g=e.getTextContent();if(g&&($s(g).ignore=g.ignore,e.textConfig&&a)){var f=e.getBoundingRect().clone();e.textConfig.layoutRect=f,e.textConfig.position=[(a[0]-f.x)/f.width*100+"%",(a[1]-f.y)/f.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function rl(t,e,i,n,o,r){t.data?t.data.setItemGraphicEl(r,e):xt(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:i,region:n&&n.option||{}}}function al(t,e,i,n,o){t.data||Ie({el:e,componentModel:o,itemName:i,itemTooltipOption:n.get("tooltip")})}function sl(t,e,i,n,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=n.getModel("emphasis"),a=r.get("focus");return Et(e,a,r.get("blurScope"),r.get("disabled")),t.isGeo&&Ae(e,o,i),a}function ll(t,e,i){var n,o=[];function r(){n=[]}function a(){n.length&&(o.push(n),n=[])}var s=e({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&n.push([t,e])},sphere:function(){}});return!i&&s.polygonStart(),f(t,(function(t){s.lineStart();for(var e=0;e-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}(yt),hl=dl;function gl(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),f(e,(function(t,e){for(var i,n,o,r=(i=w(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),o={},f(i,(function(t){t.each(t.mapDimension("value"),(function(e,i){var n="ec-"+t.getName(i);o[n]=o[n]||[],isNaN(e)||o[n].push(e)}))})),i[0].map(i[0].mapDimension("value"),(function(t,e){for(var r="ec-"+i[0].getName(e),a=0,s=1/0,l=-1/0,u=o[r].length,c=0;c1?(h.width=d,h.height=d/x):(h.height=d,h.width=d*x),h.y=p[1]-h.height/2,h.x=p[0]-h.width/2;else{var w=t.getBoxLayoutParams();w.aspect=x,h=ze(w,{width:m,height:v})}this.setViewRect(h.x,h.y,h.width,h.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var Al=function(){function t(){this.dimensions=bl}return t.prototype.create=function(t,e){var i=[];function n(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,o){var r=t.get("map"),a=new Ml(r+o,r,E({nameMap:t.get("nameMap")},n(t)));a.zoomLimit=t.get("scaleLimit"),i.push(a),t.coordinateSystem=a,a.model=t,a.resize=Il,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var o={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();o[e]=o[e]||[],o[e].push(t)}})),f(o,(function(t,o){var r=w(t,(function(t){return t.get("nameMap")})),a=new Ml(o,o,E({nameMap:Ve(r)},n(t[0])));a.zoomLimit=Oe.apply(null,w(t,(function(t){return t.get("scaleLimit")}))),i.push(a),a.resize=Il,a.resize(t[0],e),f(t,(function(t){t.coordinateSystem=a,function(t,e){f(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}(a,t)}))})),i},t.prototype.getFilledRegions=function(t,e,i,n){for(var o=(t||[]).slice(),r=me(),a=0;a=0;){var r=e[i];r.hierNode.prelim+=n,r.hierNode.modifier+=n,o+=r.hierNode.change,n+=r.hierNode.shift+o}}(t);var r=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,p=s.hierNode.modifier;s=Gl(s),r=Fl(r),s&&r;){o=Gl(o),a=Fl(a),o.hierNode.ancestor=t;var d=s.hierNode.prelim+p-r.hierNode.prelim-u+n(s,r);d>0&&(Hl(Wl(s,t,i),t,d),u+=d,l+=d),p+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,c+=a.hierNode.modifier}s&&!Gl(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=p-l),r&&!Fl(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,i=t)}return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Ol(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function zl(t){return arguments.length?t:Ul}function Bl(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function Gl(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Fl(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Wl(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Hl(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Ul(t,e){return t.parentNode===e.parentNode?1:2}var jl=function(){this.parentPoint=[],this.childPoints=[]},Xl=function(t){function e(e){return t.call(this,e)||this}return g(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new jl},e.prototype.buildPath=function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,r=i[0],a=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=ee(e.forkPosition,1),p=[];p[l]=o[l],p[u]=o[u]+(a[u]-o[u])*c,t.moveTo(o[0],o[1]),t.lineTo(p[0],p[1]),t.moveTo(r[0],r[1]),p[l]=r[l],t.lineTo(p[0],p[1]),p[l]=a[l],t.lineTo(p[0],p[1]),t.lineTo(a[0],a[1]);for(var d=1;dv.x)||(_-=Math.PI);var w=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),A=I*(Math.PI/180),D=y.getTextContent();D&&(y.setTextConfig({position:M.get("position")||w,rotation:null==I?-_:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),C="relative"===T?je(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===T?a.getAncestorsIndices():"descendant"===T?a.getDescendantIndices():null;C&&(xt(i).focus=C),function(t,e,i,n,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),p=t.getOrient(),d=t.get(["lineStyle","curveness"]),h=t.get("edgeForkPosition"),g=l.getModel("lineStyle").getLineStyle(),f=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&(f||(f=n.__edge=new Ye({shape:$l(c,p,d,o,o)})),Lt(f,{shape:$l(c,p,d,r,a)},t));else if("polyline"===u){if("orthogonal"!==c)throw new Error("The polyline edgeShape can only be used in orthogonal layout");if(e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;ve&&(e=n.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var n=i.getData().tree.root,o=t.targetNode;if(P(o)&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var r=t.targetNodeId;if(null!=r&&(o=n.getNodeById(r)))return{node:o}}}function gu(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function fu(t,e){var i=gu(t);return Ke(i,e)>=0}function yu(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}var mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return g(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n=new Ut(i,this,this.ecModel),o=du.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=o.getNodeByDataIndex(e);return i&&i.children.length&&i.isExpand||(t.parentModel=n),t}))}));var r=0;o.eachNode("preorder",(function(t){t.depth>r&&(r=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(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,e,i){for(var n=this.getData().tree,o=n.root.children[0],r=n.getNodeByDataIndex(t),a=r.getValue(),s=r.name;r&&r!==o;)s=r.parentNode.name+"."+s,r=r.parentNode;return Wt("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=yu(n,this),i.collapsed=!n.isExpand,i},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}(yt),vu=mu;function xu(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var r=o.length-1;r>=0;r--)n.push(o[r])}}function _u(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var i=function(t,e){return ze(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,r=0,a=null;"radial"===n?(o=2*Math.PI,r=Math.min(i.height,i.width)/2,a=zl((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=i.width,r=i.height,a=zl());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var i,n,o=[e];i=o.pop();)if(n=i.children,i.isExpand&&n.length)for(var r=n.length-1;r>=0;r--){var a=n[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},o.push(a)}}(s),function(t,e,i){for(var n,o=[t],r=[];n=o.pop();)if(r.push(n),n.isExpand){var a=n.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=t),t.depth>p.depth&&(p=t)}));var d=u===c?1:a(u,c)/2,h=d-u.getLayout().x,g=0,f=0,y=0,m=0;if("radial"===n)g=o/(c.getLayout().x+d+h),f=r/(p.depth-1||1),xu(l,(function(t){y=(t.getLayout().x+h)*g,m=(t.depth-1)*f;var e=Bl(y,m);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:m},!0)}));else{var v=t.getOrient();"RL"===v||"LR"===v?(f=r/(c.getLayout().x+d+h),g=o/(p.depth-1||1),xu(l,(function(t){m=(t.getLayout().x+h)*f,y="LR"===v?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:m},!0)}))):"TB"!==v&&"BT"!==v||(g=o/(c.getLayout().x+d+h),f=r/(p.depth-1||1),xu(l,(function(t){y=(t.getLayout().x+h)*g,m="TB"===v?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:m},!0)})))}}}(t,e)}))}function bu(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var i=t.getModel().getModel("itemStyle").getItemStyle(),n=e.ensureUniqueItemVisual(t.dataIndex,"style");E(n,i)}))}))}var Su=["treemapZoomToNode","treemapRender","treemapMove"];function wu(t){var e=t.getData().tree,i={};e.eachNode((function(e){for(var n=e;n&&n.depth>1;)n=n.parentNode;var o=ti(t.ecModel,n.name||n.dataIndex+"",i);e.setVisual("decal",o)}))}var Mu=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.preventUsingHoverLayer=!0,i}return g(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};Iu(i);var n=t.levels||[],o=this.designatedVisualItemStyle={},r=new Ut({itemStyle:o},this,e);n=t.levels=function(t,e){var i,n,o=ei(e.get("color")),r=ei(e.get(["aria","decal","decals"]));if(!o)return;f(t=t||[],(function(t){var e=new Ut(t),o=e.get("color"),r=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(i=!0),(e.get(["itemStyle","decal"])||r&&"none"!==r)&&(n=!0)}));var a=t[0]||(t[0]={});i||(a.color=o.slice());!n&&r&&(a.decal=r.slice());return t}(n,e);var a=w(n||[],(function(t){return new Ut(t,r,e)}),this),s=du.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=s.getNodeByDataIndex(e),n=i?a[i.depth]:null;return t.parentModel=n||r,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,i){var n=this.getData(),o=this.getRawValue(t),r=n.getName(t);return Wt("nameValue",{name:r,value:o})},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treeAncestors=yu(n,this),i.treePathInfo=i.treeAncestors,i},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},E(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=me(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.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 e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){wu(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:"▶",zoomToNodeRatio:.1024,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}(yt);function Iu(t){var e=0;f(t.children,(function(t){Iu(t);var i=t.value;pt(i)&&(i=i[0]),e+=i}));var i=t.value;pt(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),pt(t.value)?t.value[0]=i:t.value=i}var Au=Mu,Du=function(){function t(t){this.group=new mt,t.add(this.group)}return t.prototype.render=function(t,e,i,n){var o=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),o.get("show")&&i){var a=o.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,a,s,n),ii(r,l.pos,l.box)}},t.prototype._prepare=function(t,e,i){for(var n=t;n;n=n.parentNode){var o=qe(n.getModel().get("name"),""),r=i.getTextRect(o),a=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:n,text:o,width:a})}},t.prototype._renderContent=function(t,e,i,n,o){for(var r=0,a=e.emptyItemWidth,s=t.get(["breadcrumb","height"]),l=ni(e.pos,e.box),u=e.totalWidth,c=e.renderList,p=c.length-1;p>=0;p--){var d=c[p],h=d.node,g=d.width,f=d.text;u>l.width&&(u-=g-a,g=a,f=null);var y=new At({shape:{points:Tu(r,0,g,s,p===c.length-1,0===p)},style:Nt(i.getItemStyle(),{lineJoin:"bevel"}),textContent:new oi({style:{text:f,fill:n.getTextColor(),font:n.getFont()}}),textConfig:{position:"inside"},z2:1e4*De,onclick:Ce(o,h)});y.disableLabelAnimation=!0,this.group.add(y),Cu(y,t,h),r+=g+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function Tu(t,e,i,n,o,r){var a=[[o?t:t-5,e],[t+i,e],[t+i,e+n],[o?t:t-5,e+n]];return!r&&a.splice(2,0,[t+i+5,e+n/2]),!o&&a.push([t,e+n/2]),a}function Cu(t,e,i){xt(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&yu(i,e)}}var Lu=Du,Nu=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,i,n,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:i,delay:n,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,i=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,o=this._storage.length;n3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.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 e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var r=new y(o.x,o.y,o.width,o.height),a=this.seriesModel.layoutInfo;e-=a.x,i-=a.y;var s=ye();fe(s,s,[-e,-i]),ge(s,s,[t.scale,t.scale]),fe(s,s,[e,i]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var i=e.seriesModel.get("nodeClick",!0);if(i){var n=e.findTarget(t.offsetX,t.offsetY);if(n){var o=n.node;if(o.getLayout().isLeafRoot)e._rootToNode(n);else if("zoomToNode"===i)e._zoomToNode(n);else if("link"===i){var r=o.hostTree.data.getItemModel(o.dataIndex),a=r.get("link",!0),s=r.get("target",!0)||"blank";a&&si(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,i){var n=this;i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Lu(this.group))).render(t,e,i.node,(function(e){"animating"!==n._state&&(fu(t.getViewRoot(),e)?n._rootToNode({node:e}):n._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},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,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var o=this._storage.background[n.getRawIndex()];if(o){var r=o.transformCoordToLocal(t,e),a=o.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;i={node:n,offsetX:r[0],offsetY:r[1]}}}),this),i},e.type="treemap",e}(St);var Hu=Wu,Uu=f,ju=dt,Xu=-1,Yu=function(){function t(e){var i=e.mappingMethod,n=e.type,o=this.option=ct(e);this.type=n,this.mappingMethod=i,this._normalizeData=nc[i];var r=t.visualHandlers[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._normalizedToVisual=r._normalizedToVisual[i],"piecewise"===i?(Zu(o),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(o)):"category"===i?o.categories?function(t){var e=t.categories,i=t.categoryMap={},n=t.visual;if(Uu(e,(function(t,e){i[t]=e})),!pt(n)){var o=[];dt(n)?Uu(n,(function(t,e){var n=i[e];o[null!=n?n:Xu]=t})):o[-1]=n,n=ic(t,o)}for(var r=e.length-1;r>=0;r--)null==n[r]&&(delete i[e[r]],e.pop())}(o):Zu(o,!0):(lt("linear"!==i||o.dataExtent),Zu(o))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return Bt(this._normalizeData,this)},t.listVisualTypes=function(){return L(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,i){dt(t)?f(t,e,i):e.call(i,t)},t.mapVisual=function(e,i,n){var o,r=pt(e)?[]:dt(e)?{}:(o=!0,null);return t.eachVisual(e,(function(t,e){var a=i.call(n,t,e);o?r=a:r[e]=a})),r},t.retrieveVisuals=function(e){var i,n={};return e&&Uu(t.visualHandlers,(function(t,o){e.hasOwnProperty(o)&&(n[o]=e[o],i=!0)})),i?n:null},t.prepareVisualTypes=function(t){if(pt(t))t=t.slice();else{if(!ju(t))return[];var e=[];Uu(t,(function(t,i){e.push(i)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,i){for(var n,o=1/0,r=0,a=e.length;ru[1]&&(u[1]=l);var c=e.get("colorMappingBy"),p={type:a.name,dataExtent:u,visual:a.range};"color"!==p.type||"index"!==c&&"id"!==c?p.mappingMethod="linear":(p.mappingMethod="category",p.loop=!0);var d=new rc(p);return ac(d).drColorMappingBy=c,d}(0,o,r,0,u,h);f(h,(function(t,e){if(t.depth>=i.length||t===i[t.depth]){var r=function(t,e,i,n,o,r){var a=E({},e);if(o){var s=o.type,l="color"===s&&ac(o).drColorMappingBy,u="index"===l?n:"id"===l?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));a[s]=o.mapValueToVisual(u)}return a}(o,u,t,e,g,n);lc(t,r,i,n)}}))}else s=uc(u),c.fill=s}}function uc(t){var e=cc(t,"color");if(e){var i=cc(t,"colorAlpha"),n=cc(t,"colorSaturation");return n&&(e=yi(e,null,null,n)),i&&(e=mi(e,i)),e}}function cc(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function pc(t,e){var i=t.get(e);return pt(i)&&i.length?{name:e,range:i}:null}var dc=Math.max,hc=Math.min,gc=Oe,fc=f,yc=["itemStyle","borderWidth"],mc=["itemStyle","gapWidth"],vc=["upperLabel","show"],xc=["upperLabel","height"],_c={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),r=i.getHeight(),a=t.option,s=ze(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=a.size||[],u=ee(gc(s.width,l[0]),o),c=ee(gc(s.height,l[1]),r),p=n&&n.type,d=hu(n,["treemapZoomToNode","treemapRootToNode"],t),h="treemapRender"===p||"treemapMove"===p?n.rootRect:null,g=t.getViewRoot(),f=gu(g);if("treemapMove"!==p){var m="treemapZoomToNode"===p?function(t,e,i,n,o){var r,a=(e||{}).node,s=[n,o];if(!a||a===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,p=r.children,d=0,h=p.length;dvi&&(u=vi),a=r}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:n,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var u=o["asc"===n?a-l-1:l].getValue();u/i*en&&(n=a));var l=t.area*t.area,u=e*e*i;return l?dc(u*n/l,l/(u*o)):1/0}function wc(t,e,i,n,o){var r=e===i.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=i[s[r]],c=e?t.area/e:0;(o||c>i[l[a]])&&(c=i[l[a]]);for(var p=0,d=t.length;pn&&(n=e);var r=n%2?n+2:n+3;o=[];for(var a=0;a0&&(v[0]=-v[0],v[1]=-v[1]);var _=m[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var b=-Math.atan2(m[1],m[0]);u[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":n.x=-c[0]*g+l[0],n.y=-c[1]*f+l[1],p=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=g*_+l[0],n.y=l[1]+S,p=m[0]<0?"right":"left",n.originX=-g*_,n.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=x[0],n.y=x[1]+S,p="center",n.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-g*_+u[0],n.y=u[1]+S,p=m[0]>=0?"right":"left",n.originX=g*_,n.originY=-S}n.scaleX=n.scaleY=o,n.setStyle({verticalAlign:n.__verticalAlign||d,align:n.__align||p})}}}function w(t,e){var i=t.__specifiedRotation;if(null==i){var n=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))}else t.attr("rotation",i)}},e}(mt),ap=rp;function sp(t){var e=t.hostModel,i=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:i.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:i.get("disabled"),blurScope:i.get("blurScope"),focus:i.get("focus"),labelStatesModels:Rt(e)}}function lp(t){return isNaN(t[0])||isNaN(t[1])}function up(t){return t&&!lp(t[0])&&!lp(t[1])}var cp=function(){function t(t){this.group=new mt,this._LineCtor=t||ap}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,o=i._lineData;i._lineData=t,o||n.removeAll();var r=sp(t);t.diff(o).add((function(i){e._doAdd(t,i,r)})).update((function(i,n){e._doUpdate(o,t,n,i,r)})).remove((function(t){n.remove(o.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=sp(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function i(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var n=t.start;n=0?n+=u:n-=u:g>=0?n-=u:n+=u}return n}function vp(t,e){var i=[],n=ki,o=[[],[],[]],r=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[_i(l[0]),_i(l[1])],l[2]&&l.__original.push(_i(l[2])));var p=l.__original;if(null!=l[2]){if(ke(o[0],p[0]),ke(o[1],p[2]),ke(o[2],p[1]),u&&"none"!==u){var d=Fc(t.node1),h=mp(o,p[0],d*e);n(o[0][0],o[1][0],o[2][0],h,i),o[0][0]=i[3],o[1][0]=i[4],n(o[0][1],o[1][1],o[2][1],h,i),o[0][1]=i[3],o[1][1]=i[4]}if(c&&"none"!==c){d=Fc(t.node2),h=mp(o,p[1],d*e);n(o[0][0],o[1][0],o[2][0],h,i),o[1][0]=i[1],o[2][0]=i[2],n(o[0][1],o[1][1],o[2][1],h,i),o[1][1]=i[1],o[2][1]=i[2]}ke(l[0],o[0]),ke(l[1],o[2]),ke(l[2],o[1])}else{if(ke(r[0],p[0]),ke(r[1],p[1]),Si(a,r[1],r[0]),Mi(a,a),u&&"none"!==u){d=Fc(t.node1);Ai(r[0],r[0],a,d*e)}if(c&&"none"!==c){d=Fc(t.node2);Ai(r[1],r[1],a,-d*e)}ke(l[0],r[0]),ke(l[1],r[1])}}))}function xp(t){return"view"===t.type}var _p=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(t,e){var i=new bt,n=new cp,o=this.group;this._controller=new _e(e.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,e,i){var n=this,o=t.coordinateSystem;this._model=t;var r=this._symbolDraw,a=this._lineDraw,s=this.group;if(xp(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):Lt(s,l,t)}vp(t.getGraph(),Gc(t));var u=t.getData();r.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var p=t.forceLayout,d=t.get(["force","layoutAnimation"]);p&&this._startForceLayoutIteration(p,d),u.graph.eachNode((function(t){var e=t.dataIndex,i=t.getGraphicEl(),o=t.getModel();if(i){i.off("drag").off("dragend");var r=o.get("draggable");r&&i.on("drag",(function(){p&&(p.warmUp(),!n._layouting&&n._startForceLayoutIteration(p,d),p.setFixed(e),u.setItemLayout(e,[i.x,i.y]))})).on("dragend",(function(){p&&p.setUnfixed(e)})),i.setDraggable(r&&!!p,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(xt(i).focus=t.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),i=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===i&&(xt(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var h="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),f=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var i=u.getItemModel(e).get(["label","rotate"])||0,n=t.getSymbolPath();if(h){var o=u.getItemLayout(e),r=Math.atan2(o[1]-f,o[0]-g);r<0&&(r=2*Math.PI+r);var a=o[0]=0&&t.call(e,i[o],o)},t.prototype.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},t.prototype.breadthFirstTraverse=function(t,e,i,n){if(e instanceof Mp||(e=this._nodesMap[Sp(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",r=0;r=0&&i.node2.dataIndex>=0}));for(o=0,r=n.length;o=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i){return this[t][e].getItemVisual(this.dataIndex,i)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}jt(Mp,Ap("hostGraph","data")),jt(Ip,Ap("hostGraph","edgeData"));var Dp=wp;function Tp(t,e,i,n,o){for(var r=new Dp(n),a=0;a "+d)),u++)}var h,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)h=ft(t,i);else{var f=Vi.get(g),y=f&&f.dimensions||[];Ke(y,"value")<0&&y.concat(["value"]);var m=Je(t,{coordDimensions:y,encodeDefine:i.getEncode()}).dimensions;(h=new Qe(m,i)).initData(t)}var v=new Qe(["value"],i);return v.initData(l,s),o&&o(h,v),iu({mainData:h,struct:r,structAttr:"graph",datas:{node:h,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}var Cp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i}return g(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var i=this;function n(){return i._categoriesData}this.legendVisualProvider=new zt(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Be(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var i,n=t.edges||t.links||[],o=t.data||t.nodes||[],r=this;if(o&&n){Nc(i=this)&&(i.__curvenessList=[],i.__edgeMap={},Pc(i));var a=Tp(o,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var i=Ut.prototype.getModel;function n(t,e){var n=i.call(this,t,e);return n.resolveParentPath=o,n}function o(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=o,t.getModel=n,t}))}));return f(a.edges,(function(t){!function(t,e,i,n){if(Nc(i)){var o=kc(t,e,i),r=i.__edgeMap,a=r[Rc(o)];r[o]&&!a?r[o].isForward=!0:a&&r[o]&&(a.isForward=!0,r[o].isForward=!1),r[o]=r[o]||[],r[o].push(n)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},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,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),r=n.graph.getEdgeByIndex(t),a=n.getName(r.node1.dataIndex),s=n.getName(r.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Wt("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return Oi({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=w(this.option.categories||[],(function(t){return null!=t.value?t:E({value:0},t)})),e=new Qe(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&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}(yt),Lp=Cp,Np={type:"graphRoam",event:"graphRoam",update:"none"};var Pp=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},kp=function(t){function e(e){var i=t.call(this,e)||this;return i.type="pointer",i}return g(e,t),e.prototype.getDefaultShape=function(){return new Pp},e.prototype.buildPath=function(t,e){var i=Math.cos,n=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-i(a)*r*(r>=o/3?1:2),l=e.y-n(a)*r*(r>=o/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(a)*r,e.y+n(a)*r),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(a)*r,e.y-n(a)*r),t.lineTo(s,l)},e}(G),Rp=kp;function Ep(t,e){var i=null==t?"":t+"";return e&&(P(e)?i=e.replace("{value}",i):J(e)&&(i=e(t))),i}var Vp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){this.group.removeAll();var n=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),r=Math.min(n,o);return{cx:ee(i[0],e.getWidth()),cy:ee(i[1],e.getHeight()),r:ee(t.get("radius"),r/2)}}(t,i);this._renderMain(t,e,i,n,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,i,n,o){var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),c=u.get("roundCap")?Hi:Ui,p=u.get("show"),d=u.getModel("lineStyle"),h=d.get("width"),g=[s,l];zi(g,!a);for(var f=(l=g[1])-(s=g[0]),y=s,m=0;p&&m=t&&(0===e?0:n[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(v.get("show")&&L!==_){P=(P=v.get("distance"))?P+l:l;for(var E=0;E<=b;E++){u=Math.cos(M),c=Math.sin(M);var V=new se({shape:{x1:u*(g-P)+d,y1:c*(g-P)+h,x2:u*(g-w-P)+d,y2:c*(g-w-P)+h},silent:!0,style:T});"auto"===T.stroke&&V.setStyle({stroke:n((L+E/b)/_)}),p.add(V),M+=A}M-=A}else M+=I}},e.prototype._renderPointer=function(t,e,i,n,o,r,a,s,l){var u=this.group,c=this._data,p=this._progressEls,d=[],h=t.get(["pointer","show"]),g=t.getModel("progress"),f=g.get("show"),y=t.getData(),m=y.mapDimension("value"),v=+t.get("min"),x=+t.get("max"),_=[v,x],b=[r,a];function S(e,i){var n,r=y.getItemModel(e).getModel("pointer"),a=ee(r.get("width"),o.r),s=ee(r.get("length"),o.r),l=t.get(["pointer","icon"]),u=r.get("offsetCenter"),c=ee(u[0],o.r),p=ee(u[1],o.r),d=r.get("keepAspect");return(n=l?vt(l,c-a/2,p-s,a,s,null,d):new Rp({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:p}})).rotation=-(i+Math.PI/2),n.x=o.cx,n.y=o.cy,n}function w(t,e){var i=g.get("roundCap")?Hi:Ui,n=g.get("overlap"),a=n?g.get("width"):l/y.count(),u=n?o.r-a:o.r-(t+1)*a,c=n?o.r:o.r-t*a,p=new i({shape:{startAngle:r,endAngle:e,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return n&&(p.z2=x-y.get(m,t)%x),p}(f||h)&&(y.diff(c).add((function(e){var i=y.get(m,e);if(h){var n=S(e,r);Tt(n,{rotation:-((isNaN(+i)?b[0]:gi(i,_,b,!0))+Math.PI/2)},t),u.add(n),y.setItemGraphicEl(e,n)}if(f){var o=w(e,r),a=g.get("clip");Tt(o,{shape:{endAngle:gi(i,_,b,a)}},t),u.add(o),Gi(t.seriesIndex,y.dataType,e,o),d[e]=o}})).update((function(e,i){var n=y.get(m,e);if(h){var o=c.getItemGraphicEl(i),a=o?o.rotation:r,s=S(e,a);s.rotation=a,Lt(s,{rotation:-((isNaN(+n)?b[0]:gi(n,_,b,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(f){var l=p[i],v=w(e,l?l.shape.endAngle:r),x=g.get("clip");Lt(v,{shape:{endAngle:gi(n,_,b,x)}},t),u.add(v),Gi(t.seriesIndex,y.dataType,e,v),d[e]=v}})).execute(),y.each((function(t){var e=y.getItemModel(t),i=e.getModel("emphasis"),o=i.get("focus"),r=i.get("blurScope"),a=i.get("disabled");if(h){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof A){var c=s.style;s.useStyle(E({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",n(gi(y.get(m,t),_,[0,1],!0))),s.z2EmphasisLift=0,Pt(s,e),Et(s,o,r,a)}if(f){var p=d[t];p.useStyle(y.getItemVisual(t,"style")),p.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),p.z2EmphasisLift=0,Pt(p,e),Et(p,o,r,a)}})),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var i=t.getModel("anchor");if(i.get("show")){var n=i.get("size"),o=i.get("icon"),r=i.get("offsetCenter"),a=i.get("keepAspect"),s=vt(o,e.cx-n/2+ee(r[0],e.r),e.cy-n/2+ee(r[1],e.r),n,n,null,a);s.z2=i.get("showAbove")?1:0,s.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,i,n,o){var r=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new mt,p=[],d=[],h=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){p[t]=new oi({silent:!0}),d[t]=new oi({silent:!0})})).update((function(t,e){p[t]=r._titleEls[e],d[t]=r._detailEls[e]})).execute(),a.each((function(e){var i=a.getItemModel(e),r=a.get(s,e),f=new mt,y=n(gi(r,[l,u],[0,1],!0)),m=i.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),x=o.cx+ee(v[0],o.r),_=o.cy+ee(v[1],o.r);(T=p[e]).attr({z2:g?0:2,style:Bi(m,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),f.add(T)}var b=i.getModel("detail");if(b.get("show")){var S=b.get("offsetCenter"),w=o.cx+ee(S[0],o.r),M=o.cy+ee(S[1],o.r),I=ee(b.get("width"),o.r),A=ee(b.get("height"),o.r),D=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,T=d[e],C=b.get("formatter");T.attr({z2:g?0:2,style:Bi(b,{x:w,y:M,text:Ep(r,C),width:isNaN(I)?null:I,height:isNaN(A)?null:A,align:"center",verticalAlign:"middle"},{inheritColor:D})}),Fi(T,{normal:b},r,(function(t){return Ep(t,C)})),h&&Wi(T,e,a,t,{getFormattedLabel:function(t,e,i,n,o,a){return Ep(a?a.interpolatedValue:r,C)}}),f.add(T)}c.add(f)})),this.group.add(c),this._titleEls=p,this._detailEls=d},e.type="gauge",e}(St),Op=Vp,zp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="itemStyle",i}return g(e,t),e.prototype.getInitialData=function(t,e){return Gt(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}(yt),Bp=zp;var Gp=["itemStyle","opacity"],Fp=function(t){function e(e,i){var n=t.call(this)||this,o=n,r=new Dt,a=new oi;return o.setTextContent(a),n.setTextGuideLine(r),n.updateData(e,i,!0),n}return g(e,t),e.prototype.updateData=function(t,e,i){var n=this,o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e),s=r.getModel("emphasis"),l=r.get(Gp);l=null==l?1:l,i||Ct(n),n.useStyle(t.getItemVisual(e,"style")),n.style.lineJoin="round",i?(n.setShape({points:a.points}),n.style.opacity=0,Tt(n,{style:{opacity:l}},o,e)):Lt(n,{style:{opacity:l},shape:{points:a.points}},o,e),Pt(n,r),this._updateLabel(t,e),Et(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var i=this,n=this.getTextGuideLine(),o=i.getTextContent(),r=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;kt(o,Rt(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),i.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;n.setShape({points:c}),i.textGuideLineConfig={anchor:c?new ji(c[0][0],c[0][1]):null},Lt(o,{style:{x:s.x,y:s.y}},r,e),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Xi(i,Yi(a),{stroke:u})},e}(At),Wp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.ignoreLabelLineUpdate=!0,i}return g(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this._data,r=this.group;n.diff(o).add((function(t){var e=new Fp(n,t);n.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),r.add(i),n.setItemGraphicEl(t,i)})).remove((function(e){var i=o.getItemGraphicEl(e);Zi(i,t,e)})).execute(),this._data=n},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(St),Hp=Wp,Up=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new zt(Bt(this.getData,this),Bt(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return Gt(this,{coordDimensions:["value"],encodeDefaulter:Ce(Le,this)})},e.prototype._defaultLabelLine=function(t){Be(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var i=this.getData(),n=t.prototype.getDataParams.call(this,e),o=i.mapDimension("value"),r=i.getSum(o);return n.percent=r?+(i.get(o,e)/r*100).toFixed(2):0,n.$vars.push("percent"),n},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}(yt),jp=Up;function Xp(t,e){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),r=function(t,e){return ze(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=r.width,l=r.height,u=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,(function(t){return t})),o=[],r="ascending"===e,a=0,s=t.count();a-1&&(l="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),"horizontal"===e&&["left","right"].indexOf(l)>-1&&(l="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right.")),"left"===l?(h=(p[3][0]+p[0][0])/2,g=(p[3][1]+p[0][1])/2,o=(f=h-m)-5,n="right"):"right"===l?(h=(p[1][0]+p[2][0])/2,g=(p[1][1]+p[2][1])/2,o=(f=h+m)+5,n="left"):"top"===l?(h=(p[3][0]+p[0][0])/2,r=(y=(g=(p[3][1]+p[0][1])/2)-m)-5,n="center"):"bottom"===l?(h=(p[1][0]+p[2][0])/2,r=(y=(g=(p[1][1]+p[2][1])/2)+m)+5,n="center"):"rightTop"===l?(h="horizontal"===e?p[3][0]:p[1][0],g="horizontal"===e?p[3][1]:p[1][1],"horizontal"===e?(r=(y=g-m)-5,n="center"):(o=(f=h+m)+5,n="top")):"rightBottom"===l?(h=p[2][0],g=p[2][1],"horizontal"===e?(r=(y=g+m)+5,n="center"):(o=(f=h+m)+5,n="bottom")):"leftTop"===l?(h=p[0][0],g="horizontal"===e?p[0][1]:p[1][1],"horizontal"===e?(r=(y=g-m)-5,n="center"):(o=(f=h-m)-5,n="right")):"leftBottom"===l?(h="horizontal"===e?p[1][0]:p[3][0],g="horizontal"===e?p[1][1]:p[2][1],"horizontal"===e?(r=(y=g+m)+5,n="center"):(o=(f=h-m)-5,n="right")):(h=(p[1][0]+p[2][0])/2,g=(p[1][1]+p[2][1])/2,"horizontal"===e?(r=(y=g+m)+5,n="center"):(o=(f=h+m)+5,n="left")),"horizontal"===e?o=f=h:r=y=g,a=[[h,g],[f,y]]}c.label={linePoints:a,x:o,y:r,verticalAlign:"middle",textAlign:n,inside:d}}))}(i)}))}var Yp=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._dataGroup=new mt,i._initialized=!1,i}return g(e,t),e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,e,i,n){this._progressiveEls=null;var o=this._dataGroup,r=t.getData(),a=this._data,s=t.coordinateSystem,l=s.dimensions,u=Jp(t);if(r.diff(a).add((function(t){Qp(qp(r,o,t,l,s),r,t,u)})).update((function(e,i){var n=a.getItemGraphicEl(i),o=Zp(r,e,l,s);r.setItemGraphicEl(e,n),Lt(n,{shape:{points:o}},t,e),Ct(n),Qp(n,r,e,u)})).remove((function(t){var e=a.getItemGraphicEl(t);o.remove(e)})).execute(),!this._initialized){this._initialized=!0;var c=function(t,e,i){var n=t.model,o=t.getRect(),r=new re({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),a="horizontal"===n.get("layout")?"width":"height";return r.setShape(a,0),Tt(r,{shape:{width:o.width,height:o.height}},e,i),r}(s,t,(function(){setTimeout((function(){o.removeClipPath()}))}));o.setClipPath(c)}this._data=r},e.prototype.incrementalPrepareRender=function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=Jp(e),s=this._progressiveEls=[],l=t.start;l5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&sd(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:{duration:0}})}}};function sd(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}var ld=rd,ud=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&Ht(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=M(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);f(i,(function(i){t.push("dim"+i.get("dim")),e.push(i.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}(Yt),cd=ud,pd=function(t){function e(e,i,n,o,r){var a=t.call(this,e,i,n)||this;return a.type=o||"value",a.axisIndex=r,a}return g(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(te),dd=pd,hd=f,gd=Math.min,fd=Math.max,yd=Math.floor,md=Math.ceil,vd=Ti,xd=Math.PI,_d=function(){function t(t,e,i){this.type="parallel",this._axesMap=me(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return t.prototype._init=function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;hd(n,(function(t,i){var n=o[i],r=e.getComponent("parallelAxis",n),a=this._axesMap.set(t,new dd(t,$i(r),[0,0],r.get("type"),n)),s="category"===a.type;a.onBand=s&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],a=t[o];return r>=i&&r<=i+e.axisLength&&a>=n&&a<=n+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();hd(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),tn(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=ze(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],r=e.get("layout"),a="horizontal"===r?0:1,s=i[o[a]],l=[0,s],u=this.dimensions.length,c=bd(e.get("axisExpandWidth"),l),p=bd(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>p&&p>1&&c>0&&s>0,h=e.get("axisExpandWindow");h?(t=bd(h[1]-h[0],l),h[1]=h[0]+t):(t=bd(c*(p-1),l),(h=[c*(e.get("axisExpandCenter")||yd(u/2))-t/2])[1]=h[0]+t);var g=(s-t)/(u-p);g<3&&(g=0);var f=[yd(vd(h[0]/c,1))+1,md(vd(h[1]/c,1))-1],y=g/c*h[0];return{layout:r,pixelDimIndex:a,layoutBase:i[n[a]],layoutLength:s,axisBase:i[n[1-a]],axisLength:i[o[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:f,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),hd(i,(function(e,i){var r=(n.axisExpandable?wd:Sd)(i,n),a={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},s={horizontal:xd/2,vertical:0},l=[a[o].x+t.x,a[o].y+t.y],u=s[o],c=ye();he(c,c,u),fe(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];f(r,(function(e){a.push(t.mapDimension(e)),s.push(o.get(e).model)}));for(var l=this.hasAxisBrushed(),u=i;uo*(1-c[0])?(l="jump",a=s-o*(1-c[2])):(a=s-o*c[1])>=0&&(a=s-o*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?nn(a,n,r,"all"):l="none";else{var d=n[1]-n[0];(n=[fd(0,r[1]*s/d-d/2)])[1]=gd(r[1],n[0]+d),n[0]=n[1]-d}return{axisExpandWindow:n,behavior:l}},t}();function bd(t,e){return gd(fd(t,e[0]),e[1])}function Sd(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function wd(t,e){var i,n,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t=0;i--)on(e[i])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n=0))throw new Error("levels[i].depth is mandatory and should be natural number");r[o[a].depth]=new Ut(o[a],this,e)}if(n&&i){var s=Tp(n,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var i=t.parentModel,n=i.getData().getItemLayout(e);if(n){var o=n.depth,r=i.levelModels[o];r&&(t.parentModel=r)}return t})),e.wrapMethod("getItemModel",(function(t,e){var i=t.parentModel,n=i.getGraph().getEdgeByIndex(e).node1.getLayout();if(n){var o=n.depth,r=i.levelModels[o];r&&(t.parentModel=r)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var i=(this.option.data||this.option.nodes)[t];i.localX=e[0],i.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,i){function n(t){return isNaN(t)||null==t}if("edge"===i){var o=this.getDataParams(t,i),r=o.data,a=o.value,s=r.source+" -- "+r.target;return Wt("nameValue",{name:s,value:a,noValue:n(a)})}var l=this.getGraph().getNodeByIndex(t).getLayout().value,u=this.getDataParams(t,i).data.name;return Wt("nameValue",{name:null!=u?u+"":null,value:l,noValue:n(l)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,i){var n=t.prototype.getDataParams.call(this,e,i);if(null==n.value&&"node"===i){var o=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(yt),Bd=zd;function Gd(t,e){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),o=function(t,e){return ze(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var r=o.width,a=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){f(t,(function(t){var e=Jd(t.outEdges,qd),i=Jd(t.inEdges,qd),n=t.getValue()||0,o=Math.max(e,i,n);t.setLayout({value:o},!0)}))}(l),function(t,e,i,n,o,r,a,s,l){(function(t,e,i,n,o,r,a){for(var s=[],l=[],u=[],c=[],p=0,d=0;d=0;v&&m.depth>h&&(h=m.depth),y.setLayout({depth:v?m.depth:p},!0),"vertical"===r?y.setLayout({dy:i},!0):y.setLayout({dx:i},!0);for(var x=0;xp-1?h:p-1;a&&"left"!==a&&function(t,e,i,n){if("right"===e){for(var o=[],r=t,a=0;r.length;){for(var s=0;s0;r--)Hd(s,l*=.99,a),Wd(s,o,i,n,a),Qd(s,l,a),Wd(s,o,i,n,a)}(t,e,r,o,n,a,s),function(t,e){var i="vertical"===e?"x":"y";f(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]}))})),f(t,(function(t){var e=0,i=0;f(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),f(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t,s)}(l,u,i,n,r,a,0!==M(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function Fd(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function Wd(t,e,i,n,o){var r="vertical"===o?"x":"y";f(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[r]-e.getLayout()[r]}));for(var u=0,c=t.length,p="vertical"===o?"dx":"dy",d=0;d0&&(a=s.getLayout()[r]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]+s.getLayout()[p]+e;if((l=u-e-("vertical"===o?n:i))>0){a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=c-2;d>=0;--d)(l=(s=t[d]).getLayout()[r]+s.getLayout()[p]+e-u)>0&&(a=s.getLayout()[r]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[r]}}))}function Hd(t,e,i){f(t.slice().reverse(),(function(t){f(t,(function(t){if(t.outEdges.length){var n=Jd(t.outEdges,Ud,i)/Jd(t.outEdges,qd);if(isNaN(n)){var o=t.outEdges.length;n=o?Jd(t.outEdges,jd,i)/o:0}if("vertical"===i){var r=t.getLayout().x+(n-Zd(t,i))*e;t.setLayout({x:r},!0)}else{var a=t.getLayout().y+(n-Zd(t,i))*e;t.setLayout({y:a},!0)}}}))}))}function Ud(t,e){return Zd(t.node2,e)*t.getValue()}function jd(t,e){return Zd(t.node2,e)}function Xd(t,e){return Zd(t.node1,e)*t.getValue()}function Yd(t,e){return Zd(t.node1,e)}function Zd(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function qd(t){return t.getValue()}function Jd(t,e,i){for(var n=0,o=t.length,r=-1;++rn&&(n=e)})),f(e,(function(e){var o=new rc({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),r=e.getModel().get(["itemStyle","color"]);null!=r?(e.setVisual("color",r),e.setVisual("style",{fill:r})):(e.setVisual("color",o),e.setVisual("style",{fill:o}))}))}}))}var $d=function(){function t(){}return t.prototype.getInitialData=function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=r.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],p=l[1-u],d=[o,r],h=d[u].get("type"),g=d[1-u].get("type"),y=t.data;if(y&&n){var m=[];f(y,(function(t,e){var i;pt(t)?(i=t.slice(),t.unshift(e)):pt(t.value)?((i=E({},t)).value=i.value.slice(),t.value.unshift(e)):i=t,m.push(i)})),t.data=m}var v=this.defaultValueDimensions,x=[{name:c,type:dn(h),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:p,type:dn(g),dimsDef:v.slice()}];return Gt(this,{coordDimensions:x,dimensionsCount:v.length+1,encodeDefaulter:Ce(hn,x,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),th=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],i.visualDrawType="stroke",i}return g(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(yt);jt(th,$d,!0);var eh=th,ih=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;n.diff(r).add((function(t){if(n.hasValue(t)){var e=rh(n.getItemLayout(t),n,t,a,!0);n.setItemGraphicEl(t,e),o.add(e)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?(Ct(i),ah(s,i,n,t)):i=rh(s,n,t,a),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=n},e.prototype.remove=function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(St),nh=function(){},oh=function(t){function e(e){var i=t.call(this,e)||this;return i.type="boxplotBoxPath",i}return g(e,t),e.prototype.getDefaultShape=function(){return new nh},e.prototype.buildPath=function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();nf){var _=[m,x];n.push(_)}}}return{boxData:i,outliers:n}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var hh=["color","borderColor"],gh=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,i,n){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){Pi(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),i=this._data,n=this.group,o=e.getLayout("isSimpleBox"),r=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||n.removeAll(),e.diff(i).add((function(i){if(e.hasValue(i)){var a=e.getItemLayout(i);if(r&&vh(s,a))return;var l=mh(a,i,!0);Tt(l,{shape:{points:a.ends}},t,i),xh(l,e,i,o),n.add(l),e.setItemGraphicEl(i,l)}})).update((function(a,l){var u=i.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);r&&vh(s,c)?n.remove(u):(u?(Lt(u,{shape:{points:c.ends}},t,a),Ct(u)):u=mh(c),xh(u,e,a,o),n.add(u),e.setItemGraphicEl(a,u))}else n.remove(u)})).remove((function(t){var e=i.getItemGraphicEl(t);e&&n.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),wh(t,this.group);var e=t.get("clip",!0)?vn(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var r=mh(n.getItemLayout(i));xh(r,n,i,o),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},e.prototype._incrementalRenderLarge=function(t,e){wh(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(St),fh=function(){},yh=function(t){function e(e){var i=t.call(this,e)||this;return i.type="normalCandlestickBox",i}return g(e,t),e.prototype.getDefaultShape=function(){return new fh},e.prototype.buildPath=function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(G);function mh(t,e,i){var n=t.ends;return new yh({shape:{points:i?_h(n,t):n},z2:100})}function vh(t,e){for(var i=!0,n=0;n0?"borderColor":"borderColor0"])||i.get(["itemStyle",t>0?"color":"color0"]),r=i.getModel("itemStyle").getItemStyle(hh);e.useStyle(r),e.style.fill=null,e.style.stroke=o}var Ih=gh,Ah=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],i}return g(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(yt);jt(Ah,$d,!0);var Dh=Ah;function Th(t){t&&pt(t.series)&&f(t.series,(function(t){dt(t)&&"k"===t.type&&(t.type="candlestick")}))}var Ch=["itemStyle","borderColor"],Lh=["itemStyle","borderColor0"],Nh=["itemStyle","color"],Ph=["itemStyle","color0"],kh={seriesType:"candlestick",plan:xn(),performRawSeries:!0,reset:function(t,e){function i(t,e){return e.get(t>0?Nh:Ph)}function n(t,e){return e.get(t>0?Ch:Lh)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var o;null!=(o=t.next());){var r=e.getItemModel(o),a=e.getItemLayout(o).sign,s=r.getItemStyle();s.fill=i(a,r),s.stroke=n(a,r)||s.fill;var l=e.ensureUniqueItemVisual(o,"style");E(l,s)}}}}},Rh={seriesType:"candlestick",plan:xn(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=function(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),r=ee(ot(t.get("barMaxWidth"),o),o),a=ee(ot(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?ee(s,o):Math.max(Math.min(o/2,r),a)}(t,i),o=["x","y"],r=i.getDimensionIndex(i.mapDimension(o[0])),a=w(i.mapDimensionsAll(o[1]),i.getDimensionIndex,i),s=a[0],l=a[1],u=a[2],c=a[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(r<0||a.length<4))return{progress:t.pipelineContext.large?function(t,i){var n,o,a=bn(4*t.count),p=0,d=[],h=[],g=i.getStore();for(;null!=(o=t.next());){var f=g.get(r,o),y=g.get(s,o),m=g.get(l,o),v=g.get(u,o),x=g.get(c,o);isNaN(f)||isNaN(v)||isNaN(x)?(a[p++]=NaN,p+=3):(a[p++]=Eh(g,o,y,m,l),d[0]=f,d[1]=v,n=e.dataToPoint(d,null,h),a[p++]=n?n[0]:NaN,a[p++]=n?n[1]:NaN,d[1]=x,n=e.dataToPoint(d,null,h),a[p++]=n?n[1]:NaN)}i.setLayout("largePoints",a)}:function(t,i){var o,a=i.getStore();for(;null!=(o=t.next());){var p=a.get(r,o),d=a.get(s,o),h=a.get(l,o),g=a.get(u,o),f=a.get(c,o),y=Math.min(d,h),m=Math.max(d,h),v=w(y,p),x=w(m,p),_=w(g,p),b=w(f,p),S=[];M(S,x,0),M(S,v,1),S.push(A(b),A(x),A(_),A(v)),i.setItemLayout(o,{sign:Eh(a,o,d,h,l),initBaseline:d>h?x[1]:v[1],ends:S,brushRect:I(g,f,p)})}function w(t,i){var n=[];return n[0]=i,n[1]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function M(t,e,i){var o=e.slice(),r=e.slice();o[0]=_n(o[0]+n/2,1,!1),r[0]=_n(r[0]-n/2,1,!0),i?t.push(o,r):t.push(r,o)}function I(t,e,i){var o=w(t,i),r=w(e,i);return o[0]-=n/2,r[0]-=n/2,{x:o[0],y:o[1],width:n,height:r[1]-o[1]}}function A(t){return t[0]=_n(t[0],1),t}}}}};function Eh(t,e,i,n,o){return i>n?-1:i0?t.get(o,e-1)<=n?1:-1:1}var Vh=Rh;function Oh(t,e){var i=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})}))}var zh=function(t){function e(e,i){var n=t.call(this)||this,o=new Ue(e,i),r=new mt;return n.add(o),n.add(r),n.updateData(e,i),n}return g(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=t.rippleNumber,o=this.childAt(1),r=0;r0&&(r=this._getLineLength(n)/s*1e3),r!==this._period||a!==this._loop){n.stopAnimation();var u=void 0;u=J(l)?l(i):l,n.__t>0&&(u=-r*n.__t),this._animateSymbol(n,r,u,a)}this._period=r,this._loop=a}},e.prototype._animateSymbol=function(t,e,i,n){if(e>0){t.__t=0;var o=this,r=t.animate("",n).when(e,{__t:1}).delay(i).during((function(){o._updateSymbolPosition(t)}));n||r.done((function(){o.remove(t)})),r.start()}},e.prototype._getLineLength=function(t){return wn(t.__p1,t.__cp1)+wn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,r=[t.x,t.y],a=r.slice(),s=Ri,l=Mn;r[0]=s(e[0],n[0],i[0],o),r[1]=s(e[1],n[1],i[1],o);var u=l(e[0],n[0],i[0],o),c=l(e[1],n[1],i[1],o);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(r=a;re);r++);r=Math.min(r-1,o-2)}var s=(e-n[r])/(n[r+1]-n[r]),l=i[r],u=i[r+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=u[0]-l[0],p=u[1]-l[1];t.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},e}(jh),qh=Zh,Jh=function(){this.polyline=!1,this.curveness=0,this.segs=[]},Qh=function(t){function e(e){var i=t.call(this,e)||this;return i._off=0,i.hoverDataIdx=-1,i}return g(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Jh},e.prototype.buildPath=function(t,e){var i,n=e.segs,o=e.curveness;if(e.polyline)for(i=this._off;i0){t.moveTo(n[i++],n[i++]);for(var a=1;a0){var p=(s+u)/2-(l-c)*o,d=(l+c)/2-(u-s)*o;t.quadraticCurveTo(p,d,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=i,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var i=this.shape,n=i.segs,o=i.curveness,r=this.style.lineWidth;if(i.polyline)for(var a=0,s=0;s0)for(var u=n[s++],c=n[s++],p=1;p0){if(An(u,c,(u+d)/2-(c-h)*o,(c+h)/2-(d-u)*o,d,h,r,t,e))return a}else if(In(u,c,d,h,r,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect();return t=i[0],e=i[1],n.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,i=1/0,n=1/0,o=-1/0,r=-1/0,a=0;a0&&(r.dataIndex=i+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),$h={seriesType:"lines",plan:xn(),reset:function(t){var e=t.coordinateSystem;if(e){var i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,r){var a=[];if(n){var s=void 0,l=o.end-o.start;if(i){for(var u=0,c=o.start;c0&&(l?console.warn("SVG render mode doesn't support lines with trail effect"):s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(n);var u=t.get("clip",!0)&&vn(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var r=tg.reset(t,e,i);r.progress&&r.progress({start:0,end:n.count(),count:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),r=e.pipelineContext.large;return n&&r&&console.warn("Large lines not support effect"),i&&n===this._hasEffet&&o===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new Kh:new cp(o?n?qh:Yh:n?jh:ap),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=r),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(St),ig=eg,ng="undefined"==typeof Uint32Array?Array:Uint32Array,og="undefined"==typeof Float64Array?Array:Float64Array;function rg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=w(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),Ve([e,t[0],t[1]])})))}var ag=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.visualStyleAccessPath="lineStyle",i.visualDrawType="stroke",i}return g(e,t),e.prototype.init=function(e){e.data=e.data||[],rg(e);var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(rg(e),e.data){var i=this._processFlatCoordsArray(e.data);this._flatCoords=i.flatCoords,this._flatCoordsOffset=i.flatCoordsOffset,i.flatCoords&&(e.data=new Float32Array(i.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=je(this._flatCoords,e.flatCoords),this._flatCoordsOffset=je(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t),i=e.option instanceof Array?e.option:e.getShallow("coords");if(!(i instanceof Array&&i.length>0&&i[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(i)+". Lines must have 2d coords array in data item.");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;oi)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,e){if(!Vi.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var i=new Qe(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,o){if(t instanceof Array)return NaN;i.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[o]:r:void 0})),i},e.prototype.formatTooltip=function(t,e,i){var n=this.getData().getItemModel(t),o=n.get("name");if(o)return o;var r=n.get("fromName"),a=n.get("toName"),s=[];return null!=r&&s.push(r),null!=a&&s.push(a),Wt("nameValue",{name:s.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(yt),sg=ag;function lg(t){return t instanceof Array||(t=[t,t]),t}var ug={seriesType:"lines",reset:function(t){var e=lg(t.get("symbol")),i=lg(t.get("symbolSize")),n=t.getData();return n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),{dataEach:n.hasItemOption?function(t,e){var i=t.getItemModel(e),n=lg(i.getShallow("symbol",!0)),o=lg(i.getShallow("symbolSize",!0));n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1])}:null}}};var cg=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=Tn.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,i,n,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,p=c.getContext("2d"),d=t.length;c.width=e,c.height=i;for(var h=0;h0){var I=r(m)?s:l;m>0&&(m=m*w+S),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*m*256}else _+=4}return p.putImageData(v,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Tn.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},t.prototype._getGradient=function(t,e){for(var i=this._gradientPixels,n=i[e]||(i[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),n[r++]=o[0],n[r++]=o[1],n[r++]=o[2],n[r++]=o[3];return n},t}(),pg=cg;function dg(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var hg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){var n;if(e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),!n)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):dg(o)&&this._renderOnGeo(o,t,n,i)},e.prototype.incrementalPrepareRender=function(t,e,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,i,n){var o=e.coordinateSystem;o&&(dg(o)?this.render(e,i,n):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Pi(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,i,n,o){var r,a,s,l,u=t.coordinateSystem,c=Cn(u,"cartesian2d");if(c){var p=u.getAxis("x"),d=u.getAxis("y");if("category"!==p.type||"category"!==d.type)throw new Error("Heatmap on cartesian must have two category axes");if(!p.onBand||!d.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");r=p.getBandWidth()+.5,a=d.getBandWidth()+.5,s=p.scale.getExtent(),l=d.scale.getExtent()}for(var h=this.group,g=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),v=t.get(["itemStyle","borderRadius"]),x=Rt(t),_=t.getModel("emphasis"),b=_.get("focus"),S=_.get("blurScope"),w=_.get("disabled"),M=c?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],I=i;Is[1]||Cl[1])continue;var L=u.dataToPoint([T,C]);A=new re({shape:{x:L[0]-r/2,y:L[1]-a/2,width:r,height:a},style:D})}else{if(isNaN(g.get(M[1],I)))continue;A=new re({z2:1,shape:u.dataToRect([g.get(M[0],I)]).contentShape,style:D})}if(g.hasItemOption){var N=g.getItemModel(I),P=N.getModel("emphasis");f=P.getModel("itemStyle").getItemStyle(),y=N.getModel(["blur","itemStyle"]).getItemStyle(),m=N.getModel(["select","itemStyle"]).getItemStyle(),v=N.get(["itemStyle","borderRadius"]),b=P.get("focus"),S=P.get("blurScope"),w=P.get("disabled"),x=Rt(N)}A.shape.r=v;var k=t.getRawValue(I),R="-";k&&null!=k[2]&&(R=k[2]+""),kt(A,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:D.opacity,defaultText:R}),A.ensureState("emphasis").style=f,A.ensureState("blur").style=y,A.ensureState("select").style=m,Et(A,b,S,w),A.incremental=o,o&&(A.states.emphasis.hoverLayer=!0),h.add(A),g.setItemGraphicEl(I,A),this._progressiveEls&&this._progressiveEls.push(A)}},e.prototype._renderOnGeo=function(t,e,i,n){var o=i.targetVisuals.inRange,r=i.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new pg;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),p=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),h=Math.min(l.height+l.y,n.getHeight()),g=d-c,f=h-p,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],m=a.mapArray(y,(function(e,i,n){var o=t.dataToPoint([e,i]);return o[0]-=c,o[1]-=p,o.push(n),o})),v=i.getExtent(),x="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(v,i.option.range):function(t,e,i){var n=t[1]-t[0],o=(e=w(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,r=0;return function(t){var n;for(n=r;n=0;n--){var a;if((a=e[n].interval)[0]<=t&&t<=a[1]){r=n;break}}return n>=0&&n0?1:-1}(i,r,o,n,p),function(t,e,i,n,o,r,a,s,l,u){var c,p=l.valueDim,d=l.categoryDim,h=Math.abs(i[d.wh]),g=t.getItemVisual(e,"symbolSize");c=pt(g)?g.slice():null==g?["100%","100%"]:[g,g];c[d.index]=ee(c[d.index],h),c[p.index]=ee(c[p.index],n?h:Math.abs(r)),u.symbolSize=c,(u.symbolScale=[c[0]/s,c[1]/s])[p.index]*=(l.isHorizontal?-1:1)*a}(t,e,o,r,0,p.boundingLength,p.pxSign,u,n,p),function(t,e,i,n,o){var r=t.get(mg)||0;r&&(xg.attr({scaleX:e[0],scaleY:e[1],rotation:i}),xg.updateTransform(),r/=xg.getLineScale(),r*=e[n.valueDim.index]);o.valueLineWidth=r||0}(i,p.symbolScale,l,n,p);var d=p.symbolSize,h=Ni(i.get("symbolOffset"),d);return function(t,e,i,n,o,r,a,s,l,u,c,p){var d=c.categoryDim,h=c.valueDim,g=p.pxSign,f=Math.max(e[h.index]+s,0),y=f;if(n){var m=Math.abs(l),v=Oe(t.get("symbolMargin"),"15%")+"",x=!1;v.lastIndexOf("!")===v.length-1&&(x=!0,v=v.slice(0,v.length-1));var _=ee(v,e[h.index]),b=Math.max(f+2*_,0),S=x?0:2*_,w=Ln(n),M=w?n:Og((m+S)/b);b=f+2*(_=(m-M*f)/2/(x?M:Math.max(M-1,1))),S=x?0:2*_,w||"fixed"===n||(M=u?Og((Math.abs(u)+S)/b):0),y=M*b-S,p.repeatTimes=M,p.symbolMargin=_}var I=g*(y/2),A=p.pathPosition=[];A[d.index]=i[d.wh]/2,A[h.index]="start"===a?I:"end"===a?l-I:l/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=p.bundlePosition=[];D[d.index]=i[d.xy],D[h.index]=i[h.xy];var T=p.barRectShape=E({},i);T[h.wh]=g*Math.max(Math.abs(i[h.wh]),Math.abs(A[h.index]+I)),T[d.wh]=i[d.wh];var C=p.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=c.ecSize[d.wh],C[h.xy]=0,C[h.wh]=i[h.wh]}(i,d,o,r,0,h,s,p.valueLineWidth,p.boundingLength,p.repeatCutLength,n,p),p}function Sg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function wg(t){var e=t.symbolPatternSize,i=vt(t.symbolType,-e/2,-e/2,e,e);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Mg(t,e,i,n){var o=t.__pictorialBundle,r=i.symbolSize,a=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,u=i.repeatTimes||0,c=0,p=r[e.valueDim.index]+a+2*i.symbolMargin;for(Rg(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c0:n<0)&&(o=u-1-t),e[l.index]=p*(o-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation}}}function Ig(t,e,i,n){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?Eg(r,null,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:i.symbolScale[0],scaleY:i.symbolScale[1],rotation:i.rotation},i,n):(r=t.__pictorialMainPath=wg(i),o.add(r),Eg(r,{x:i.pathPosition[0],y:i.pathPosition[1],scaleX:0,scaleY:0,rotation:i.rotation},{scaleX:i.symbolScale[0],scaleY:i.symbolScale[1]},i,n))}function Ag(t,e,i){var n=E({},e.barRectShape),o=t.__pictorialBarRect;o?Eg(o,null,{shape:n},e,i):((o=t.__pictorialBarRect=new re({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function Dg(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,r=E({},i.clipShape),a=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)Lt(o,{shape:r},s,l);else{r[a.wh]=0,o=new re({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[a.wh]=i.clipShape[a.wh],Vt[n?"updateProps":"initProps"](o,{shape:u},s,l)}}}function Tg(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Cg,i.isAnimationEnabled=Lg,i}function Cg(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Lg(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Ng(t,e,i,n){var o=new mt,r=new mt;return o.add(r),o.__pictorialBundle=r,r.x=i.bundlePosition[0],r.y=i.bundlePosition[1],i.symbolRepeat?Mg(o,e,i):Ig(o,0,i),Ag(o,i,n),Dg(o,e,i,n),o.__pictorialShapeStr=kg(t,i),o.__pictorialSymbolMeta=i,o}function Pg(t,e,i,n){var o=n.__pictorialBarRect;o&&o.removeTextContent();var r=[];Rg(n,(function(t){r.push(t)})),n.__pictorialMainPath&&r.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),f(r,(function(t){Ze(t,{scaleX:0,scaleY:0},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function kg(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Rg(t,e,i){f(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function Eg(t,e,i,n,o,r){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&Vt[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,r)}function Vg(t,e,i){var n=i.dataIndex,o=i.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),c=r.get("focus"),p=r.get("blurScope"),d=r.get("scale");Rg(t,(function(t){if(t instanceof A){var e=t.style;t.useStyle(E({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},i.style))}else t.useStyle(i.style);var n=t.ensureState("emphasis");n.style=a,d&&(n.scaleX=1.1*t.scaleX,n.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=i.z2}));var h=e.valueDim.posDesc[+(i.boundingLength>0)],g=t.__pictorialBarRect;kt(g,Rt(o),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:Nn(e.seriesModel.getData(),n),inheritColor:i.style.fill,defaultOpacity:i.style.opacity,defaultOutsidePosition:h}),Et(t,c,p,r.get("disabled"))}function Og(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var zg=_g,Bg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.hasSymbolVisual=!0,i.defaultSymbol="roundRect",i}return g(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Pn(kn.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(kn),Gg=Bg;var Fg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._layers=[],i}return g(e,t),e.prototype.render=function(t,e,i){var n=t.getData(),o=this,r=this.group,a=t.getLayerSeries(),s=n.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}r.x=0,r.y=l.y+u[0];var p=new ai(this._layersSeries||[],a,c,c),d=[];function h(e,i,s){var l=o._layers;if("remove"!==e){for(var u,c,p=[],h=[],g=a[i].indices,f=0;fr&&(r=s),n.push(s)}for(var u=0;ur&&(r=p)}return{y0:o,max:r}}(l),c=u.y0,p=i/u.max,d=r.length,h=r[0].indices.length,g=0;gMath.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(v=o.r0+S,a>Math.PI/2&&(w="right")):"right"===w&&(v=o.r-S,a>Math.PI/2&&(w="left")):(v=r===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,w="center"),f.style.align=w,f.style.verticalAlign=g(d,"verticalAlign")||"middle",f.x=v*s+o.cx,f.y=v*l+o.cy;var M=g(d,"rotate"),I=0;"radial"===M?(I=-a)<-Math.PI/2&&(I+=Math.PI):"tangential"===M?(I=Math.PI/2-a)>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI):B(M)&&(I=M*Math.PI/180),f.rotation=I})),c.dirtyStyle()},e}(Ui),Zg=Yg,qg="sunburstRootToNode",Jg="sunburstHighlight";var Qg=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i,n){var o=this;this.seriesModel=t,this.api=i,this.ecModel=e;var r=t.getData(),a=r.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),c=[];s.eachNode((function(t){c.push(t)}));var p=this._oldChildren||[];!function(n,o){if(0===n.length&&0===o.length)return;function s(t){return t.getId()}function c(s,c){!function(n,o){u||!n||n.getValue()||(n=null);if(n!==a&&o!==a)if(o&&o.piece)n?(o.piece.updateData(!1,n,t,e,i),r.setItemGraphicEl(n.dataIndex,o.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(o);else if(n){var s=new Zg(n,t,e,i);l.add(s),r.setItemGraphicEl(n.dataIndex,s)}}(null==s?null:n[s],null==c?null:o[c])}new ai(o,n,s,s).add(c).update(c).remove(Ce(c,null)).execute()}(c,p),function(n,r){r.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,n,t,e,i):(o.virtualPiece=new Zg(n,t,e,i),l.add(o.virtualPiece)),r.piece.off("click"),o.virtualPiece.on("click",(function(t){o._rootToNode(r.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var i=!1;t.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var r=n.getModel(),a=r.get("link");if(a){var s=r.get("target",!0)||"_blank";si(a,s)}}i=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:qg,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,r=Math.sqrt(n*n+o*o);return r<=i.r&&r>=i.r0}},e.type="sunburst",e}(St),Kg=Qg,$g=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.ignoreStyleOnData=!0,i}return g(e,t),e.prototype.getInitialData=function(t,e){var i={name:t.name,children:t.data};tf(i);var n=this._levelModels=w(t.levels||[],(function(t){return new Ut(t,this,e)}),this),o=du.createTree(i,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var i=o.getNodeByDataIndex(e),r=n[i.depth];return r&&(t.parentModel=r),t}))}));return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var i=t.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return i.treePathInfo=yu(n,this),i},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){wu(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(yt);function tf(t){var e=0;f(t.children,(function(t){tf(t);var i=t.value;pt(i)&&(i=i[0]),e+=i}));var i=t.value;pt(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),pt(t.value)?t.value[0]=i:t.value=i}var ef=$g,nf=Math.PI/180;function of(t,e,i){e.eachSeriesByType(t,(function(t){var e=t.get("center"),n=t.get("radius");pt(n)||(n=[0,n]),pt(e)||(e=[e,e]);var o=i.getWidth(),r=i.getHeight(),a=Math.min(o,r),s=ee(e[0],o),l=ee(e[1],r),u=ee(n[0],a/2),c=ee(n[1],a/2),p=-t.get("startAngle")*nf,d=t.get("minAngle")*nf,h=t.getData().tree.root,g=t.getViewRoot(),y=g.depth,m=t.get("sort");null!=m&&rf(g,m);var v=0;f(g.children,(function(t){!isNaN(t.getValue())&&v++}));var x=g.getValue(),_=Math.PI/(x||v)*2,b=g.depth>0,S=g.height-(b?-1:1),w=(c-u)/(S||1),M=t.get("clockwise"),I=t.get("stillShowZeroSum"),A=M?1:-1;if(b){var D=u,T=u+w,C=2*Math.PI;h.setLayout({angle:C,startAngle:p,endAngle:p+C,clockwise:M,cx:s,cy:l,r0:D,r:T})}!function e(i,n){if(i){var o=n;if(i!==h){var r=i.getValue(),c=0===x&&I?_:r*_;c1;)o=o.parentNode;var r=i.getColorFromPalette(o.name||o.dataIndex+"",e);return t.depth>1&&P(r)&&(r=Gn(r,(t.depth-1)/(n-1)*.5)),r}(o,t,n.root.height));var a=i.ensureUniqueItemVisual(o.dataIndex,"style");E(a,r)}))}))}var sf={color:"fill",borderColor:"stroke"},lf={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},uf=ve(),cf=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return ft(null,this)},e.prototype.getDataParams=function(e,i,n){var o=t.prototype.getDataParams.call(this,e,i);return n&&(o.info=uf(n).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(yt),pf=cf;function df(t,e){return e=e||[0,0],w(["x","y"],(function(i,n){var o=this.getAxis(i),r=e[n],a=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a))}),this)}function hf(t,e){return e=e||[0,0],w([0,1],(function(i){var n=e[i],o=t[i]/2,r=[],a=[];return r[i]=n-o,a[i]=n+o,r[1-i]=a[1-i]=e[1-i],Math.abs(this.dataToPoint(r)[i]-this.dataToPoint(a)[i])}),this)}function gf(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function ff(t,e){return e=e||[0,0],w(["Radius","Angle"],(function(i,n){var o=this["get"+i+"Axis"](),r=e[n],a=t[n]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(r-a)-o.dataToCoord(r+a));return"Angle"===i&&(s=s*Math.PI/180),s}),this)}var yf={};function mf(t,e,i,n){return t&&(t.legacy||!1!==t.legacy&&!i&&!n&&"tspan"!==e&&("text"===e||ae(t,"text")))}function vf(t,e,i){var n,o,r,a=t;if("text"===e)r=a;else{r={},ae(a,"text")&&(r.text=a.text),ae(a,"rich")&&(r.rich=a.rich),ae(a,"textFill")&&(r.fill=a.textFill),ae(a,"textStroke")&&(r.stroke=a.textStroke),ae(a,"fontFamily")&&(r.fontFamily=a.fontFamily),ae(a,"fontSize")&&(r.fontSize=a.fontSize),ae(a,"fontStyle")&&(r.fontStyle=a.fontStyle),ae(a,"fontWeight")&&(r.fontWeight=a.fontWeight),o={type:"text",style:r,silent:!0},n={};var s=ae(a,"textPosition");i?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),ae(a,"textPosition")&&(n.position=a.textPosition),ae(a,"textOffset")&&(n.offset=a.textOffset),ae(a,"textRotation")&&(n.rotation=a.textRotation),ae(a,"textDistance")&&(n.distance=a.textDistance)}return xf(r,t),f(r.rich,(function(t){xf(t,t)})),{textConfig:n,textContent:o}}function xf(t,e){e&&(e.font=e.textFont||e.font,ae(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),ae(e,"textAlign")&&(t.align=e.textAlign),ae(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),ae(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),ae(e,"textWidth")&&(t.width=e.textWidth),ae(e,"textHeight")&&(t.height=e.textHeight),ae(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),ae(e,"textPadding")&&(t.padding=e.textPadding),ae(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),ae(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),ae(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),ae(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),ae(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),ae(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),ae(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function _f(t,e,i){var n=t;n.textPosition=n.textPosition||i.position||"inside",null!=i.offset&&(n.textOffset=i.offset),null!=i.rotation&&(n.textRotation=i.rotation),null!=i.distance&&(n.textDistance=i.distance);var o=n.textPosition.indexOf("inside")>=0,r=t.fill||"#000";bf(n,e);var a=null==n.textFill;return o?a&&(n.textFill=i.insideFill||"#fff",!n.textStroke&&i.insideStroke&&(n.textStroke=i.insideStroke),!n.textStroke&&(n.textStroke=r),null==n.textStrokeWidth&&(n.textStrokeWidth=2)):(a&&(n.textFill=t.fill||i.outsideFill||"#000"),!n.textStroke&&i.outsideStroke&&(n.textStroke=i.outsideStroke)),n.text=e.text,n.rich=e.rich,f(e.rich,(function(t){bf(t,t)})),n}function bf(t,e){e&&(ae(e,"fill")&&(t.textFill=e.fill),ae(e,"stroke")&&(t.textStroke=e.fill),ae(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),ae(e,"font")&&(t.font=e.font),ae(e,"fontStyle")&&(t.fontStyle=e.fontStyle),ae(e,"fontWeight")&&(t.fontWeight=e.fontWeight),ae(e,"fontSize")&&(t.fontSize=e.fontSize),ae(e,"fontFamily")&&(t.fontFamily=e.fontFamily),ae(e,"align")&&(t.textAlign=e.align),ae(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),ae(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),ae(e,"width")&&(t.textWidth=e.width),ae(e,"height")&&(t.textHeight=e.height),ae(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),ae(e,"padding")&&(t.textPadding=e.padding),ae(e,"borderColor")&&(t.textBorderColor=e.borderColor),ae(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),ae(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),ae(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),ae(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),ae(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),ae(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),ae(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),ae(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),ae(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),ae(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}function Sf(t,e){var i=t+"^_^"+e;yf[i]||(console.warn('[ECharts] DEPRECATED: "'+t+'" has been deprecated. '+e),yf[i]=!0)}var wf={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Mf=L(wf),If=Ge(Fn,(function(t,e){return t[e]=1,t}),{}),Af=Fn.join(", "),Df=["","style","shape","extra"],Tf=ve();function Cf(t,e,i,n,o){var r=t+"Animation",a=Un(t,n,o)||{},s=Tf(e).userDuring;return a.duration>0&&(a.during=s?Bt(zf,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),E(a,i[r]),a}function Lf(t,e,i,n){var o=(n=n||{}).dataIndex,r=n.isInit,a=n.clearStyle,s=i.isAnimationEnabled(),l=Tf(t),u=e.style;l.userDuring=e.during;var c={},p={};if(function(t,e,i){for(var n=0;n=0)){var p=t.getAnimationStyleProps(),d=p?p.style:null;if(d){!o&&(o=n.style={});var h=L(i);for(u=0;u0&&t.animateFrom(d,h)}else!function(t,e,i,n,o){if(o){var r=Cf("update",t,e,n,i);r.duration>0&&t.animateFrom(o,r)}}(t,e,o||0,i,c);Nf(t,e),u?t.dirty():t.markRedraw()}function Nf(t,e){for(var i=Tf(t).leaveToProps,n=0;n=0){!r&&(r=n[t]={});var d=L(a);for(c=0;c=1&&(s=!0),u){var c=L(u);if(i||(c=M(c,(function(t){return Ke(Hf,t)<0}))),c.length){r||((r=t.animate(i,e.loop,!0)).scope="keyframe");for(var p=0;pn[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:function(n){var o=e.dataToRadius(n[0]),r=i.dataToAngle(n[1]),a=t.coordToPoint([o,r]);return a.push(o,r*Math.PI/180),a},size:Bt(ff,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};function iy(t){return t instanceof G}function ny(t){return t instanceof be}var oy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i,n){this._progressiveEls=null;var o=this._data,r=t.getData(),a=this.group,s=cy(t,r,e,i);o||a.removeAll(),r.diff(o).add((function(e){dy(i,null,e,s(e,n),t,a,r)})).remove((function(e){var i=o.getItemGraphicEl(e);Pf(i,uf(i).option,t)})).update((function(e,l){var u=o.getItemGraphicEl(l);dy(i,u,e,s(e,n),t,a,r)})).execute();var l=t.get("clip",!0)?vn(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=r},e.prototype.incrementalPrepareRender=function(t,e,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,i,n,o){var r=e.getData(),a=cy(e,r,i,n),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(o,i):void 0}var r=e.get(n.name,i),a=n&&n.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(i,n){Sf("api.styleEmphasis","Please write literal style directly instead."),null==n&&(n=s);var o=v(n,Xf).getItemStyle(),r=x(n,Xf),a=Bi(r,null,null,!0,!0);a.text=r.getShallow("show")?xi(t.getFormattedLabel(n,Xf),t.getFormattedLabel(n,Yf),Nn(e,n)):null;var l=jn(r,null,!0);return b(i,o),o=_f(o,a,l),i&&_(o,i),o.legacy=!0,o},visual:function(t,i){if(null==i&&(i=s),ae(sf,t)){var n=e.getItemVisual(i,"style");return n?n[sf[t]]:null}if(ae(lf,t))return e.getItemVisual(i,t)},barLayout:function(t){if("cartesian2d"===r.type){var e=r.getBaseAxis();return Xn(Nt({axis:e},t))}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return Yn(t,i)}},a.api||{}),c={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:a.coordSys,dataInsideLength:e.count(),encode:py(t.getData())},p={},d={},h={},g={},f=0;f=p;d--){Pf(e.childAt(d),uf(e).option,o)}}(t,p,i,n,o),a>=0?r.replaceAt(p,a):r.add(p),p}function gy(t,e,i){var n,o=uf(t),r=e.type,a=e.shape,s=e.style;return i.isUniversalTransitionEnabled()||null!=r&&r!==o.customGraphicType||"path"===r&&((n=a)&&(ae(n,"pathData")||ae(n,"d")))&&by(a)!==o.customPathData||"image"===r&&ae(s,"image")&&s.image!==o.customImagePath}function fy(t,e,i){var n=e?yy(t,e):t,o=e?my(t,n,Xf):t.style,r=t.type,a=n?n.textConfig:null,s=t.textContent,l=s?e?yy(s,e):s:null;if(o&&(i.isLegacy||mf(o,r,!!a,!!l))){i.isLegacy=!0;var u=vf(o,r,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text"),lt("text"===c.type,'textContent.type must be "text"')}var p=e?i[e]:i.normal;p.cfg=a,p.conOpt=l}function yy(t,e){return e?t?t[e]:null:t}function my(t,e,i){var n=e&&e.style;return null==n&&i===Xf&&t&&(n=t.styleEmphasis),n}function vy(t,e){var i=t&&t.name;return null!=i?i:"e\0\0"+e}function xy(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,o=null!=e?i.oldChildren[e]:null;hy(i.api,o,i.dataIndex,n,i.seriesModel,i.group)}function _y(t){var e=this.context,i=e.oldChildren[t];Pf(i,uf(i).option,e.seriesModel)}function by(t){return t&&(t.pathData||t.d)}var Sy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return g(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,s=a.getOtherAxis(r).getExtent(),l=r.dataToCoord(e),u=n.get("type");if(u&&"none"!==u){var c=Jn(n),p=wy[u](r,a,l,s);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=function(t,e,i,n,o){var r=e.axis,a=r.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,p=n.getRadiusAxis().getExtent();if("radius"===r.dim){var d=ye();he(d,d,s),fe(d,d,[n.cx,n.cy]),l=en([a,-o],d);var h=e.getModel("axisLabel").get("rotate")||0,g=qt.innerTextLayout(s,h*Math.PI/180,-1);u=g.textAlign,c=g.textVerticalAlign}else{var f=p[1];l=n.coordToPoint([f+o,a]);var y=n.cx,m=n.cy;u=Math.abs(l[0]-y)/f<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-m)/f<.3?"middle":l[1]>m?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,i,0,a,n.get(["label","margin"]));Qn(t,i,n,o,d)},e}(Kn);var wy={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:$n(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:to(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:to(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}},My=Sy,Iy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Yt),Ay=Iy,Dy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return g(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Ee).models[0]},e.type="polarAxis",e}(Yt);jt(Dy,Xt);var Ty=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.type="angleAxis",e}(Dy),Cy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.type="radiusAxis",e}(Dy),Ly=function(t){function e(e,i){return t.call(this,"radius",e,i)||this}return g(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(te);Ly.prototype.dataToRadius=te.prototype.dataToCoord,Ly.prototype.radiusToData=te.prototype.coordToData;var Ny=Ly,Py=ve(),ky=function(t){function e(e,i){return t.call(this,"angle",e,i||[0,360])||this}return g(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var r=n[0],a=t.dataToCoord(r+1)-t.dataToCoord(r),s=Math.abs(a),l=eo(null==r?"":r+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),p=Py(t.model),d=p.lastAutoInterval,h=p.lastTickCount;return null!=d&&null!=h&&Math.abs(d-c)<=1&&Math.abs(h-o)<=1&&d>c?c=d:(p.lastTickCount=o,p.lastAutoInterval=c),c},e}(te);ky.prototype.dataToAngle=te.prototype.dataToCoord,ky.prototype.angleToData=te.prototype.coordToData;var Ry=ky,Ey=["radius","angle"],Vy=function(){function t(t){this.dimensions=Ey,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Ny,this._angleAxis=new Ry,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),r=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);n.inverse?r=a-360:a=r+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n-1e-4,r=this.r,a=this.r0;return o<=r*r&&o>=a*a}}},t.prototype.convertToPixel=function(t,e,i){return Oy(e)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){return Oy(e)===this?this.pointToData(i):null},t}();function Oy(t){var e=t.seriesModel,i=t.polarModel;return i&&i.coordinateSystem||e&&e.coordinateSystem}var zy=Vy;function By(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();f(io(e,"radius"),(function(t){o.scale.unionExtentFromData(e,t)})),f(io(e,"angle"),(function(t){n.scale.unionExtentFromData(e,t)}))}})),tn(n.scale,n.model),tn(o.scale,o.model),"category"===n.type&&!n.onBand){var r=n.getExtent(),a=360/n.scale.count();n.inverse?r[1]+=a:r[1]-=a,n.setExtent(r[0],r[1])}}function Gy(t,e){if(t.type=e.get("type"),t.scale=$i(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var Fy={dimensions:Ey,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var o=new zy(n+"");o.update=By;var r=o.getRadiusAxis(),a=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Gy(r,s),Gy(a,l),function(t,e,i){var n=e.get("center"),o=i.getWidth(),r=i.getHeight();t.cx=ee(n[0],o),t.cy=ee(n[1],r);var a=t.getRadiusAxis(),s=Math.min(o,r)/2,l=e.get("radius");null==l?l=[0,"100%"]:pt(l)||(l=[0,l]);var u=[ee(l[0],s),ee(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Ee).models[0];if(!e)throw new Error('Polar "'+Oe(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}})),i}},Wy=Fy,Hy=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Uy(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function jy(t){return t.getRadiusAxis().inverse?0:1}function Xy(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}var Yy=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="PolarAxisPointer",i}return g(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),r=i.getTicksCoords(),a=i.getMinorTicksCoords(),s=w(i.getViewLabels(),(function(t){t=ct(t);var e=i.scale,n="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=i.dataToCoord(n),t}));Xy(s),Xy(r),f(Hy,(function(e){!t.get([e,"show"])||i.scale.isBlank()&&"axisLine"!==e||Zy[e](this.group,t,n,r,a,o,s)}),this)}},e.type="angleAxis",e}(no),Zy={axisLine:function(t,e,i,n,o,r){var a,s=e.getModel(["axisLine","lineStyle"]),l=jy(i),u=l?0:1;(a=0===r[u]?new Jt({shape:{cx:i.cx,cy:i.cy,r:r[l]},style:s.getLineStyle(),z2:1,silent:!0}):new Qt({shape:{cx:i.cx,cy:i.cy,r:r[l],r0:r[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,i,n,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[jy(i)],u=w(n,(function(t){return new se({shape:Uy(i,[l,l+s],t.coord)})}));t.add(Kt(u,{style:Nt(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,i,n,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[jy(i)],c=[],p=0;pg?"left":"right",m=Math.abs(h[1]-f)/d<.3?"middle":h[1]>f?"top":"bottom";if(s&&s[p]){var v=s[p];dt(v)&&v.textStyle&&(a=new Ut(v.textStyle,l,l.ecModel))}var x=new oi({silent:qt.isLabelSilent(e),style:Bi(a,{x:h[0],y:h[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:n.formattedLabel,align:y,verticalAlign:m})});if(t.add(x),c){var _=qt.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=n.rawLabel,xt(x).eventData=_}}),this)},splitLine:function(t,e,i,n,o,r){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",A=_;v&&(n[s][M]||(n[s][M]={p:_,n:_}),A=n[s][M][I]);var D=void 0,T=void 0,C=void 0,L=void 0;if("radius"===p.dim){var N=p.dataToCoord(w)-_,P=r.dataToCoord(M);Math.abs(N)=L})}}}))}var om={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},rm={splitNumber:5},am=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.type="polar",e}($t);function sm(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},r=n.position,a=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?u.vertical[r]:l[0],"horizontal"===a?u.horizontal[r]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Oe(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-c:c,o.z2=1,o}var lm=["axisLine","axisTickLabel","axisName"],um=["splitArea","splitLine"],cm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.axisPointerClass="SingleAxisPointer",i}return g(e,t),e.prototype.render=function(e,i,n,o){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new mt;var s=sm(e),l=new qt(e,s);f(lm,l.add,l),r.add(this._axisGroup),r.add(l.getGroup()),f(um,(function(t){e.get([t,"show"])&&pm[t](this,this.group,this._axisGroup,e)}),this),an(a,this._axisGroup,e),t.prototype.render.call(this,e,i,n,o)},e.prototype.remove=function(){ao(this)},e.type="singleAxis",e}(no),pm={splitLine:function(t,e,i,n){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitLine"),a=r.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=n.coordinateSystem.getRect(),u=o.isHorizontal(),c=[],p=0,d=o.getTicksCoords({tickModel:r}),h=[],g=[],f=0;f=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n},t.prototype.convertToPixel=function(t,e,i){return xm(e)===this?this.dataToPoint(i):null},t.prototype.convertFromPixel=function(t,e,i){return xm(e)===this?this.pointToData(i):null},t}();function xm(t){var e=t.seriesModel,i=t.singleAxisModel;return i&&i.coordinateSystem||e&&e.coordinateSystem}var _m={create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,o){var r=new vm(n,t,e);r.name="single_"+o,r.resize(n,e),n.coordinateSystem=r,i.push(r)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Ee).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),i},dimensions:mm},bm=["x","y"],Sm=["width","height"],wm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return g(e,t),e.prototype.makeElOption=function(t,e,i,n,o){var r=i.axis,a=r.coordinateSystem,s=Am(a,1-Im(r)),l=a.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var c=Jn(n),p=Mm[u](r,l,s);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=sm(i);lo(e,t,d,i,n,o)},e.prototype.getHandleTransform=function(t,e,i){var n=sm(e,{labelInside:!1});n.labelMargin=i.get(["handle","margin"]);var o=uo(e.axis,t,n);return{x:o[0],y:o[1],rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,i,n){var o=i.axis,r=o.coordinateSystem,a=Im(o),s=Am(r,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=Am(r,1-a),c=(u[1]+u[0])/2,p=[c,c];return p[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:p,tooltipOption:{verticalAlign:"middle"}}},e}(Kn),Mm={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:$n([e,i[0]],[e,i[1]],Im(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:co([e-n/2,i[0]],[n,o],Im(t))}}};function Im(t){return t.isHorizontal()?0:1}function Am(t,e){var i=t.getRect();return[i[bm[e]],i[bm[e]]+i[Sm[e]]]}var Dm=wm,Tm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.type="single",e}($t);var Cm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(e,i,n){var o=po(e);t.prototype.init.apply(this,arguments),Lm(e,o)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),Lm(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Yt);function Lm(t,e){var i,n=t.cellSize;1===(i=pt(n)?n:t.cellSize=[n,n]).length&&(i[1]=i[0]);var o=w([0,1],(function(t){return ho(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));go(t,e,{type:"box",ignoreSize:o})}var Nm=Cm,Pm=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.render=function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),a=o.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,r,n),this._renderLines(t,r,a,n),this._renderYearText(t,r,a,n),this._renderMonthText(t,s,a,n),this._renderWeekText(t,s,r,a,n)},e.prototype._renderDayRect=function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=n.getCellWidth(),a=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new re({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});i.add(u)}},e.prototype._renderLines=function(t,e,i,n){var o=this,r=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){d(u.formatedDate),0===c&&(u=r.getDateInfo(e.start.y+"-"+e.start.m));var p=u.date;p.setMonth(p.getMonth()+1),u=r.getDateInfo(p)}function d(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,n)}d(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,i),a,n),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,i),a,n)},e.prototype._getEdgesPoints=function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},e.prototype._drawSplitline=function(t,e,i){var n=new Dt({z2:20,shape:{points:t},style:e});i.add(n)},e.prototype._getLinePointsOfOneWeek=function(t,e,i){for(var n=t.coordinateSystem,o=n.getDateInfo(e),r=[],a=0;a<7;a++){var s=n.getNextNDay(o.time,a),l=n.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===i?"bl":"tr"]}return r},e.prototype._formatterLabel=function(t,e){return P(t)&&t?fo(t,e):J(t)?t(e):e.nameMap},e.prototype._yearTextPositionControl=function(t,e,i,n,o){var r=e[0],a=e[1],s=["center","bottom"];"bottom"===n?(a+=o,s=["center","top"]):"left"===n?r-=o:"right"===n?(r+=o,s=["center","top"]):a-=o;var l=0;return"left"!==n&&"right"!==n||(l=Math.PI/2),{rotation:l,x:r,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var r=o.get("margin"),a=o.get("position");a||(a="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===i?0:1,p={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var h=o.get("formatter"),g={start:e.start.y,end:e.end.y,nameMap:d},f=this._formatterLabel(h,g),y=new oi({z2:30,style:Bi(o,{text:f})});y.attr(this._yearTextPositionControl(y,p[a],i,a,r)),n.add(y)}},e.prototype._monthTextPositionControl=function(t,e,i,n,o){var r="left",a="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(r="center"),"start"===n&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===n&&(r="right")),{x:s,y:l,align:r,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,i,n){var o=t.getModel("monthLabel");if(o.get("show")){var r=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),l=o.get("align"),u=[this._tlpoints,this._blpoints];r&&!P(r)||(r&&(e=yo(r)||e),r=e.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,p="horizontal"===i?0:1;a="start"===s?-a:a;for(var d="center"===l,h=0;h=n.start.time&&i.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,i=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];i[0].time>i[1].time&&(e=!0,i.reverse());var n=Math.floor(i[1].time/Rm)-Math.floor(i[0].time/Rm)+1,o=new Date(i[0].time),r=o.getDate(),a=i[1].date.getDate();o.setDate(r+n-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-i[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-i[1].time)*l>0;)n-=l,o.setDate(s-l);var u=Math.floor((n+i[0].day+6)/7),c=e?1-u:u-1;return e&&i.reverse(),{range:[i[0].formatedDate,i[1].formatedDate],start:i[0],end:i[1],allDay:n,weeks:u,nthWeek:c,fweek:i[0].day,lweek:i[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return null;var o=7*(t-1)-n.fweek+e,r=new Date(n.start.time);return r.setDate(+n.start.d+o),this.getDateInfo(r)},t.create=function(e,i){var n=[];return e.eachComponent("calendar",(function(e){var i=new t(e);n.push(i),e.coordinateSystem=i})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])})),n},t.dimensions=["time","value"],t}();function Om(t,e){var i;return f(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}var zm=["transition","enterFrom","leaveTo"],Bm=zm.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Gm(t,e,i){if(i&&(!t[i]&&e[i]&&(t[i]={}),t=t[i],e=e[i]),t&&e)for(var n=i?zm:Bm,o=0;o=0;l--){var h,g;u=i[l];if(g=null!=(h=qe(u.id,null))?o.get(h):null){var f=g.parent,y=(d=Hm(f),f===n?{width:r,height:a}:{width:d.width,height:d.height}),m={},v=ii(g,u,y,null,{hv:u.hv,boundingMode:u.bounding},m);if(!Hm(g).isNew&&v){for(var x=u.transition,_={},b=0;b=0)?_[S]=w:g[S]=w}Lt(g,_,t,0)}else g.attr(m)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(i){Ym(i,Hm(i).option,e,t._lastGraphicModel)})),this._elMap=me()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}($t);function jm(t){lt(t,"graphic type MUST be set");var e=ae(Wm,t)?Wm[t]:qn(t);lt(e,"graphic type "+t+" can not be found");var i=new e({});return Hm(i).type=t,i}function Xm(t,e,i,n){var o=jm(i);return e.add(o),n.set(t,o),Hm(o).id=t,Hm(o).isNew=!0,o}function Ym(t,e,i,n){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Ym(t,e,i,n)})),Pf(t,e,n),i.removeKey(Hm(t).id))}function Zm(t,e,i,n){t.isGroup||f([["cursor",be.prototype.cursor],["zlevel",n||0],["z",i||0],["z2",0]],(function(i){var n=i[0];ae(e,n)?t[n]=ot(e[n],i[1]):null==t[n]&&(t[n]=i[1])})),f(L(e),(function(i){if(0===i.indexOf("on")){var n=e[i];t[i]=J(n)?n:null}})),ae(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var qm=["rect","polygon","keep","clear"];function Jm(t,e){var i=ei(t?t.brush:[]);if(i.length){var n=[];f(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var o=t&&t.toolbox;pt(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var r=o.feature||(o.feature={}),a=r.brush||(r.brush={}),s=a.type||(a.type=[]);s.push.apply(s,n),function(t){var e={};f(t,(function(t){e[t]=1})),t.length=0,f(e,(function(e,i){t.push(i)}))}(s),e&&!s.length&&s.push.apply(s,qm)}}var Qm=f;function Km(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function $m(t,e,i){var n={};return Qm(e,(function(e){var o,r=n[e]=((o=function(){}).prototype.__hidden=o.prototype,new o);Qm(t[e],(function(t,n){if(rc.isValidType(n)){var o={type:n,visual:t};i&&i(o,e),r[n]=new rc(o),"opacity"===n&&((o=ct(o)).type="colorAlpha",r.__hidden.__alphaForOpacity=new rc(o))}}))})),n}function tv(t,e,i){var n;f(i,(function(t){e.hasOwnProperty(t)&&Km(e[t])&&(n=!0)})),n&&f(i,(function(i){e.hasOwnProperty(i)&&Km(e[i])?t[i]=ct(e[i]):delete t[i]}))}var ev={lineX:iv(0),lineY:iv(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&fr(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,l=n[0];return!!(fr(n,o,r)||fr(n,o+a,r)||fr(n,o,r+s)||fr(n,o+a,r+s)||y.create(t).contain(l[0],l[1])||wo(o,r,o+a,r,n)||wo(o,r,o,r+s,n)||wo(o+a,r,o+a,r+s,n)||wo(o,r+s,o+a,r+s,n))||void 0}}};function iv(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var o=n.range;return nv(e[t],o)}},rect:function(n,o,r){if(n){var a=r.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]e[0][1]&&(e[0][1]=r[0]),r[1]e[1][1]&&(e[1][1]=r[1])}return e&&dv(e)}};function dv(t){return new y(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var hv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new rn(e.getZr())).on("brush",Bt(this._onBrush,this)).mount()},e.prototype.render=function(t,e,i,n){this.model=t,this._updateController(t,e,i,n)},e.prototype.updateTransform=function(t,e,i,n){sv(e),this._updateController(t,e,i,n)},e.prototype.updateVisual=function(t,e,i,n){this.updateTransform(t,e,i,n)},e.prototype.updateView=function(t,e,i,n){this._updateController(t,e,i,n)},e.prototype._updateController=function(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:ct(i),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:ct(i),$from:e})},e.type="brush",e}($t),gv=hv,fv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.areas=[],i.brushOption={},i}return g(e,t),e.prototype.optionUpdated=function(t,e){var i=this.option;!e&&tv(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:"#ddd"},n.hasOwnProperty("liftZ")||(n.liftZ=5)},e.prototype.setAreas=function(t){lt(pt(t)),f(t,(function(t){lt(t.brushType,"Illegal areas")})),t&&(this.areas=w(t,(function(t){return yv(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=yv(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Yt);function yv(t,e){return Ht({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Ut(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var mv=fv,vv=["rect","polygon","lineX","lineY","keep","clear"],xv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return g(e,t),e.prototype.render=function(t,e,i){var n,o,r;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length})),this._brushType=n,this._brushMode=o,f(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?r:e===n)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,i){this.render(t,e,i)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},e.prototype.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},e.getDefaultOption=function(t){return{show:!0,type:vv.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(Io),_v=xv;var bv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i.layoutMode="box",i}return g(e,t),e.prototype.init=function(t,e,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,i=e.data||[],n=e.axisType,o=this._names=[];"category"===n?(t=[],f(i,(function(e,i){var n,r=qe(Do(e),"");dt(e)?(n=ct(e)).value=i:n=i,t.push(n),o.push(r)}))):t=i;var r={category:"ordinal",time:"time",value:"number"}[n]||"number";(this._data=new Qe([{name:"value",type:r}],this)).initData(t,o)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Yt),Sv=bv,wv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.type="timeline.slider",e.defaultOption=Pn(Sv.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Sv);jt(wv,To.prototype);var Mv=wv,Iv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.type="timeline",e}($t),Av=Iv,Dv=function(t){function e(e,i,n,o){var r=t.call(this,e,i,n)||this;return r.type=o||"value",r}return g(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(te),Tv=Dv,Cv=Math.PI,Lv=ve(),Nv=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),o=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){var e=a.scale.getLabel({value:t});return Wt("nameValue",{noName:!0,value:e})},f(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](n,o,a,t)}),this),this._renderAxisLabel(n,r,a,t),this._position(n,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var i,n,o,r,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return ze(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(i=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===i?"left":"right"},c={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},p={horizontal:0,vertical:Cv/2},d="vertical"===s?l.height:l.width,h=t.getModel("controlStyle"),g=h.get("show",!0),f=g?h.get("itemSize"):0,y=g?h.get("itemGap"):0,m=f+y,v=t.get(["label","rotate"])||0;v=v*Cv/180;var x=h.get("position",!0),_=g&&h.get("showPlayBtn",!0),b=g&&h.get("showPrevBtn",!0),S=g&&h.get("showNextBtn",!0),w=0,M=d;"left"===x||"bottom"===x?(_&&(n=[0,0],w+=m),b&&(o=[w,0],w+=m),S&&(r=[M-f,0],M-=m)):(_&&(n=[M-f,0],M-=m),b&&(o=[0,0],w+=m),S&&(r=[M-f,0],M-=m));var I=[w,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:p[s],labelRotation:v,labelPosOpt:i,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||c[s],playPosition:n,prevBtnPosition:o,nextBtnPosition:r,axisExtent:I,controlSize:f,controlGap:y}},e.prototype._position=function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var r=ye(),a=o.x,s=o.y+o.height;fe(r,r,[-a,-s]),he(r,r,-Cv/2),fe(r,r,[a,s]),(o=o.clone()).applyTransform(r)}var l=y(o),u=y(i.getBoundingRect()),c=y(n.getBoundingRect()),p=[i.x,i.y],d=[n.x,n.y];d[0]=p[0]=l[0][0];var h,g=t.labelPosOpt;null==g||P(g)?(m(p,u,l,1,h="+"===g?0:1),m(d,c,l,1,1-h)):(m(p,u,l,1,h=g>=0?0:1),d[1]=p[1]+g);function f(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function m(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}i.setPosition(p),n.setPosition(d),i.rotation=n.rotation=t.rotation,f(i),f(n)},e.prototype._createAxis=function(t,e){var i=e.getData(),n=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Po({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new No({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new ie}}(e,n);o.getTicks=function(){return i.mapArray(["value"],(function(t){return{value:t}}))};var r=i.getDataExtent("value");o.setExtent(r[0],r[1]),o.calcNiceTicks();var a=new Tv("value",o,t.axisExtent,n);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new mt;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,i,n){var o=i.getExtent();if(n.get(["lineStyle","show"])){var r=new se({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:E({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(r);var a=this._progressLine=new se({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Nt({lineCap:"round",lineWidth:r.style.lineWidth},n.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,i,n){var o=this,r=n.getData(),a=i.scale.getTicks();this._tickSymbols=[],f(a,(function(t){var a=i.dataToCoord(t.value),s=r.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),p={x:a,y:0,onclick:Bt(o._changeTimeline,o,t.value)},d=Pv(s,l,e,p);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=c.getItemStyle(),Co(d);var h=xt(d);s.get("tooltip")?(h.dataIndex=t.value,h.dataModel=n):h.dataIndex=h.dataModel=null,o._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,i,n){var o=this;if(i.getLabelModel().get("show")){var r=n.getData(),a=i.getViewLabels();this._tickLabels=[],f(a,(function(n){var a=n.tickValue,s=r.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),p=i.dataToCoord(n.tickValue),d=new oi({x:p,y:0,rotation:t.labelRotation-t.rotation,onclick:Bt(o._changeTimeline,o,a),silent:!1,style:Bi(l,{text:n.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=Bi(u),d.ensureState("progress").style=Bi(c),e.add(d),Co(d),Lv(d).dataIndex=a,o._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,i,n){var o=t.controlSize,r=t.rotation,a=n.getModel("controlStyle").getItemStyle(),s=n.getModel(["emphasis","controlStyle"]).getItemStyle(),l=n.getPlayState(),u=n.get("inverse",!0);function c(t,i,l,u){if(t){var c=Lo(ot(n.get(["controlStyle",i+"BtnSize"]),o),o),p=function(t,e,i,n){var o=n.style,r=ko(t.get(["controlStyle",e]),n||{},new y(i[0],i[1],i[2],i[3]));o&&r.setStyle(o);return r}(n,i+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:l});p.ensureState("emphasis").style=s,e.add(p),Co(p)}}c(t.nextBtnPosition,"next",Bt(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",Bt(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",Bt(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,i,n){var o=n.getData(),r=n.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=Bt(s._handlePointerDrag,s),t.ondragend=Bt(s._handlePointerDragend,s),kv(t,s._progressLine,r,i,n,!0)},onUpdate:function(t){kv(t,s._progressLine,r,i,n)}};this._currentPointer=Pv(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,o=on(n.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(a[r]=+a[r].toFixed(p)),[a,c]}var Yv={min:Ce(Xv,"min"),max:Ce(Xv,"max"),average:Ce(Xv,"average"),median:Ce(Xv,"median")};function Zv(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!pt(e.coord)&&n){var o=n.dimensions,r=qv(e,i,n,t);if((e=ct(e)).type&&Yv[e.type]&&r.baseAxis&&r.valueAxis){var a=Ke(o,r.baseAxis.dim),s=Ke(o,r.valueAxis.dim),l=Yv[e.type](i,r.baseDataDim,r.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;c<2;c++)Yv[u[c]]&&(u[c]=Kv(i,i.mapDimension(o[c]),u[c]));e.coord=u}}return e}function qv(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData().getDimensionInfo(e);return i&&i.coordDim}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function Jv(t,e){return!(t&&t.containData&&e.coord&&!jv(e))||t.containData(e.coord)}function Qv(t,e){return t?function(t,i,n,o){var r=o<2?t.coord&&t.coord[o]:t.value;return Vo(r,e[o])}:function(t,i,n,o){return Vo(t.value,e[o])}}function Kv(t,e,i){if("average"===i){var n=0,o=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,o++)})),n/o}return"median"===i?t.getMedian(e):t.getDataExtent(e)["max"===i?1:0]}var $v=ve(),tx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.init=function(){this.markerGroupMap=me()},e.prototype.render=function(t,e,i){var n=this,o=this.markerGroupMap;o.each((function(t){$v(t).keep=!1})),e.eachSeries((function(t){var o=Wv.getMarkerModelFromSeries(t,n.type);o&&n.renderSeries(t,o,e,i)})),o.each((function(t){!$v(t).keep&&n.group.remove(t.group)}))},e.prototype.markKeep=function(t){$v(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var i=this;f(t,(function(t){var n=Wv.getMarkerModelFromSeries(t,i.type);n&&n.getData().eachItemGraphicEl((function(t){t&&(e?Oo(t):zo(t))}))}))},e.type="marker",e}($t),ex=tx;function ix(t,e,i){var n=e.coordinateSystem;t.each((function(o){var r,a=t.getItemModel(o),s=ee(a.get("x"),i.getWidth()),l=ee(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(n){var u=t.get(n.dimensions[0],o),c=t.get(n.dimensions[1],o);r=n.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(o,r)}))}var nx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=Wv.getMarkerModelFromSeries(t,"markPoint");e&&(ix(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new bt),u=function(t,e,i){var n;n=t?w(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return E(E({},i),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Qe(n,i),r=w(i.get("data"),Ce(Zv,e));t&&(r=M(r,Ce(Jv,t)));var a=Qv(!!t,n);return o.initData(r,null,a),o}(o,t,e);e.setData(u),ix(e.getData(),t,n),u.each((function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),o=i.getShallow("symbolSize"),r=i.getShallow("symbolRotate"),s=i.getShallow("symbolOffset"),l=i.getShallow("symbolKeepAspect");if(J(n)||J(o)||J(r)||J(s)){var c=e.getRawValue(t),p=e.getDataParams(t);J(n)&&(n=n(c,p)),J(o)&&(o=o(c,p)),J(r)&&(r=r(c,p)),J(s)&&(s=s(c,p))}var d=i.getModel("itemStyle").getItemStyle(),h=Bo(a,"color");d.fill||(d.fill=h),u.setItemVisual(t,{symbol:n,symbolSize:o,symbolRotate:r,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){xt(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(ex);var ox=nx;var rx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Wv),ax=rx,sx=ve(),lx=function(t,e,i,n){var o,r=t.getData();if(pt(n))o=n;else{var a=n.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis){var s=void 0,l=void 0;if(null!=n.yAxis||null!=n.xAxis)s=e.getAxis(null!=n.yAxis?"y":"x"),l=Oe(n.yAxis,n.xAxis);else{var u=qv(n,r,e,t);s=u.valueAxis,l=Kv(r,Go(r,u.valueDataDim),a)}var c="x"===s.dim?0:1,p=1-c,d=ct(n),h={coord:[]};d.type=null,d.coord=[],d.coord[p]=-1/0,h.coord[p]=1/0;var g=i.get("precision");g>=0&&B(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[c]=h.coord[c]=l,o=[d,h,{type:a,valueIndex:n.valueIndex,value:l}]}else rt("Invalid markLine data."),o=[]}var f=[Zv(t,o[0]),Zv(t,o[1]),E({},o[2])];return f[2].type=f[2].type||null,Ht(f[2],f[0]),Ht(f[2],f[1]),f};function ux(t){return!isNaN(t)&&!isFinite(t)}function cx(t,e,i,n){var o=1-t,r=n.dimensions[t];return ux(e[o])&&ux(i[o])&&e[t]===i[t]&&n.getAxis(r).containData(e[t])}function px(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(cx(1,i,n,t)||cx(0,i,n,t)))return!0}return Jv(t,e[0])&&Jv(t,e[1])}function dx(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=ee(s.get("x"),o.getWidth()),u=ee(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,p=t.get(c[0],e),d=t.get(c[1],e);r=a.dataToPoint([p,d])}if(Cn(a,"cartesian2d")){var h=a.getAxis("x"),g=a.getAxis("y");c=a.dimensions;ux(t.get(c[0],e))?r[0]=h.toGlobalCoord(h.getExtent()[i?0:1]):ux(t.get(c[1],e))&&(r[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];t.setItemLayout(e,r)}var hx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=Wv.getMarkerModelFromSeries(t,"markLine");if(e){var n=e.getData(),o=sx(e).from,r=sx(e).to;o.each((function(e){dx(o,e,!0,t,i),dx(r,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[o.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new cp);this.group.add(l.group);var u=function(t,e,i){var n;n=t?w(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return E(E({},i),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Qe(n,i),r=new Qe(n,i),a=new Qe([],i),s=w(i.get("data"),Ce(lx,e,t,i));t&&(s=M(s,Ce(px,t)));var l=Qv(!!t,n);return o.initData(w(s,(function(t){return t[0]})),null,l),r.initData(w(s,(function(t){return t[1]})),null,l),a.initData(w(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:o,to:r,line:a}}(o,t,e),c=u.from,p=u.to,d=u.line;sx(e).from=c,sx(e).to=p,e.setData(d);var h=e.get("symbol"),g=e.get("symbolSize"),f=e.get("symbolRotate"),y=e.get("symbolOffset");function m(e,i,o){var r=e.getItemModel(i);dx(e,i,o,t,n);var s=r.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Bo(a,"color")),e.setItemVisual(i,{symbolKeepAspect:r.get("symbolKeepAspect"),symbolOffset:ot(r.get("symbolOffset",!0),y[o?0:1]),symbolRotate:ot(r.get("symbolRotate",!0),f[o?0:1]),symbolSize:ot(r.get("symbolSize"),g[o?0:1]),symbol:ot(r.get("symbol",!0),h[o?0:1]),style:s})}pt(h)||(h=[h,h]),pt(g)||(g=[g,g]),pt(f)||(f=[f,f]),pt(y)||(y=[y,y]),u.from.each((function(t){m(c,t,!0),m(p,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[c.getItemLayout(t),p.getItemLayout(t)]),null==e.stroke&&(e.stroke=c.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(t,"symbolOffset"),fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolKeepAspect:p.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:p.getItemVisual(t,"symbolOffset"),toSymbolRotate:p.getItemVisual(t,"symbolRotate"),toSymbolSize:p.getItemVisual(t,"symbolSize"),toSymbol:p.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){xt(t).dataModel=e,t.traverse((function(t){xt(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(ex);var gx=hx;var fx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.createMarkerModelFromSeries=function(t,i,n){return new e(t,i,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Wv),yx=fx,mx=ve(),vx=function(t,e,i,n){var o=Zv(t,n[0]),r=Zv(t,n[1]),a=o.coord,s=r.coord;a[0]=Oe(a[0],-1/0),a[1]=Oe(a[1],-1/0),s[0]=Oe(s[0],1/0),s[1]=Oe(s[1],1/0);var l=Ve([{},o,r]);return l.coord=[o.coord,r.coord],l.x0=o.x,l.y0=o.y,l.x1=r.x,l.y1=r.y,l};function xx(t){return!isNaN(t)&&!isFinite(t)}function _x(t,e,i,n){var o=1-t;return xx(e[o])&&xx(i[o])}function bx(t,e){var i=e.coord[0],n=e.coord[1],o={coord:i,x:e.x0,y:e.y0},r={coord:n,x:e.x1,y:e.y1};return Cn(t,"cartesian2d")?!(!i||!n||!_x(1,i,n)&&!_x(0,i,n))||function(t,e,i){return!(t&&t.containZone&&e.coord&&i.coord&&!jv(e)&&!jv(i))||t.containZone(e.coord,i.coord)}(t,o,r):Jv(t,o)||Jv(t,r)}function Sx(t,e,i,n,o){var r,a=n.coordinateSystem,s=t.getItemModel(e),l=ee(s.get(i[0]),o.getWidth()),u=ee(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(i,e));else{var c=[h=t.get(i[0],e),g=t.get(i[1],e)];a.clampData&&a.clampData(c,c),r=a.dataToPoint(c,!0)}if(Cn(a,"cartesian2d")){var p=a.getAxis("x"),d=a.getAxis("y"),h=t.get(i[0],e),g=t.get(i[1],e);xx(h)?r[0]=p.toGlobalCoord(p.getExtent()["x0"===i[0]?0:1]):xx(g)&&(r[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var wx=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Mx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.updateTransform=function(t,e,i){e.eachSeries((function(t){var e=Wv.getMarkerModelFromSeries(t,"markArea");if(e){var n=e.getData();n.each((function(e){var o=w(wx,(function(o){return Sx(n,e,o,t,i)}));n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)}))}}),this)},e.prototype.renderSeries=function(t,e,i,n){var o=t.coordinateSystem,r=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new mt});this.group.add(l.group),this.markKeep(l);var u=function(t,e,i){var n,o,r=["x0","y0","x1","y1"];if(t){var a=w(t&&t.dimensions,(function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return E(E({},n),{name:t,ordinalMeta:null})}));o=w(r,(function(t,e){return{name:t,type:a[e%2].type}})),n=new Qe(o,i)}else n=new Qe(o=[{name:"value",type:"float"}],i);var s=w(i.get("data"),Ce(vx,e,t,i));t&&(s=M(s,Ce(bx,t)));var l=t?function(t,e,i,n){var r=t.coord[Math.floor(n/2)][n%2];return Vo(r,o[n])}:function(t,e,i,n){return Vo(t.value,o[n])};return n.initData(s,null,l),n.hasItemOption=!0,n}(o,t,e);e.setData(u),u.each((function(e){var i=w(wx,(function(i){return Sx(u,e,i,t,n)})),r=o.getAxis("x").scale,s=o.getAxis("y").scale,l=r.getExtent(),c=s.getExtent(),p=[r.parse(u.get("x0",e)),r.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];on(p),on(d);var h=!!(l[0]>p[1]||l[1]d[1]||c[1]"],pt(t)&&(t=t.slice(),n=!0);var l=e?t:n?[u(t[0]),u(t[1])]:u(t);return P(s)?s.replace("{value}",n?l[0]:l).replace("{value2}",n?l[1]:l):J(s)?n?s(t[0],t[1]):s(t):n?t[0]===a[0]?i[0]+" "+l[1]:t[1]===a[1]?i[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},e.prototype.resetExtent=function(){var t=this.option,e=kx([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var i=t.dimensions,n=i.length-1;n>=0;n--){var o=i[n],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return r.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});Ht(n,i),Ht(o,i);var r=this.isCategory();function a(i){Nx(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")}}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},Px(n,(function(t,e){if(rc.isValidType(e)){var i=Tx.get(e,"inactive",r);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";Px(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:r?n:[n]}),null==l.symbol&&(l.symbol=e&&ct(e)||(r?o:[o])),null==l.symbolSize&&(l.symbolSize=i&&ct(i)||(r?s[0]:[s[0],s[0]])),l.symbol=Cx(l.symbol,(function(t){return"none"===t?o:t}));var u=l.symbolSize;if(null!=u){var c=-1/0;Lx(u,(function(t){t>c&&(c=t)})),l.symbolSize=Cx(u,(function(t){return Rx(t,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Yt),Vx=Ex,Ox=[20,140],zx=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=Ox[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=Ox[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):pt(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),f(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=on((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),this),e.push({seriesId:i.id,dataIndex:n})}),this),e},e.prototype.getVisualMeta=function(t){var e=Bx(this,"outOfRange",this.getExtent()),i=Bx(this,"inRange",this.option.range.slice()),n=[];function o(e,i){n.push({value:e,color:t(e,i)})}for(var r=0,a=0,s=i.length,l=e.length;at[1])break;i.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},e.prototype._createBarPoints=function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new mt("horizontal"!==e||i?"horizontal"===e&&i?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||i?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,r=i.handleLabels,a=n.itemSize,s=n.getExtent();Yx([0,1],(function(l){var u=o[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=Xx(t[l],[0,a[1]],s,!0),p=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=p/a[0],u.x=a[0]-p/2;var d=en(i.handleLabelPoints[l],Ho(u,this.group));r[l].setStyle({x:d[0],y:d[1],text:n.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",i.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,i,n){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),p=this.getControllerVisual(t,"symbolSize"),d=Xx(t,r,s,!0),h=a[0]-p/2,g={x:u.x,y:u.y};u.y=d,u.x=h;var f=en(l.indicatorLabelPoint,Ho(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var m=this._applyTransform("left",l.mainGroup),v="horizontal"===this._orient;y.setStyle({text:(i||"")+o.formatValueText(e),verticalAlign:v?m:"middle",align:v?"center":m});var x={x:h,y:d,style:{fill:c}},_={style:{x:f[0],y:f[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=g.x,u.y=g.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var w=0;wo[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,p=[];(e||Kx(i))&&(p=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=Uo(c,p);this._dispatchHighDown("downplay",jx(d[0],i)),this._dispatchHighDown("highlight",jx(d[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=xt(e).dataIndex){var n=xt(e),o=this.ecModel.getSeriesByIndex(n.seriesIndex);if(i.isTargetSeries(o)){var r=o.getData(n.dataType),a=r.getStore().get(i.getDataDimensionIndex(r),n.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var i=0;i=0&&(o.dimension=r,n.push(o))}})),t.getData().setVisual("visualMeta",n)}}];function o_(t,e,i,n){for(var o=e.targetVisuals[n],r=rc.prepareVisualTypes(o),a={color:Bo(t.getData(),"color")},s=0,l=r.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(e_,i_),f(n_,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(a_))}function c_(t){t.registerComponentModel(Gx),t.registerComponentView(t_),u_(t)}var p_=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i._pieceList=[],i}return g(e,t),e.prototype.optionUpdated=function(e,i){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],d_[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var o=this.option.categories;this.resetVisual((function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=ct(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=w(this._pieceList,(function(t){return t=ct(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,i={},n=rc.listVisualTypes(),o=this.isCategory();function r(t,e,i){return t&&t[e]&&t[e].hasOwnProperty(i)}f(e.pieces,(function(t){f(n,(function(e){t.hasOwnProperty(e)&&(i[e]=1)}))})),f(i,(function(t,i){var n=!1;f(this.stateList,(function(t){n=n||r(e,t,i)||r(e.target,t,i)}),this),!n&&f(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=Tx.get(i,"inRange"===t?"active":"inactive",o)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,f(n,(function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)}),this),"single"===i.selectedMode){var r=!1;f(n,(function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(r?o[i]=!1:r=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=ct(t)},e.prototype.getValueState=function(t){var e=rc.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],i=this._pieceList;return this.eachTargetSeries((function(n){var o=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){rc.findPieceIndex(e,i)===t&&o.push(n)}),this),e.push({seriesId:n.id,dataIndex:o})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],i=["",""],n=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),(r=o[o.length-1].interval[1])!==1/0&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return f(o,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:i}}function s(o,r){var a=n.getRepresentValue({interval:o});r||(r=n.getValueState(a));var s=t(a,r);o[0]===-1/0?i[0]=s:o[1]===1/0?i[1]=s:e.push({value:o[0],color:s},{value:o[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Pn(Vx.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(Vx),d_={splitNumber:function(t){var e=this.option,i=Math.min(e.precision,20),n=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(n[1]-n[0])/o;+r.toFixed(i)!==r&&i<5;)i++;e.precision=i,r=+r.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var a=0,s=n[0];ar[1]&&console.warn("Piece "+i+"is illegal: "+r+" lower bound should not greater then uppper bound."),r[0]===r[1]&&a[0]&&a[1]&&(n.value=r[0])}n.visual=rc.retrieveVisuals(e),t.push(n)}),this),h_(e,t),Xo(t),f(t,(function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function h_(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var g_=p_,f_=function(t){function e(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=e.type,i}return g(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),r=n.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,c=Oe(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,c,a),f(l.viewPieceList,(function(n){var l=n.piece,u=new mt;u.onclick=Bt(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var p=e.getRepresentValue(l);if(this._createItemSymbol(u,p,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(p);u.add(new oi({style:{x:"right"===a?-i:s[0]+i,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:r,opacity:"outOfRange"===d?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,c,a),Yo(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var i=this;t.on("mouseover",(function(){return n("highlight")})).on("mouseout",(function(){return n("downplay")}));var n=function(t){var n=i.visualMapModel;n.option.hoverLink&&i.api.dispatchAction({type:t,batch:jx(n.findTargetDataIndices(e),n)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Ux(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},e.prototype._renderEndsText=function(t,e,i,n,o){if(e){var r=new mt,a=this.visualMapModel.textStyleModel;r.add(new oi({style:Bi(a,{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:n?o:"center",text:e})})),t.add(r)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=w(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},e.prototype._createItemSymbol=function(t,e,i){t.add(vt(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,i=e.option,n=i.selectedMode;if(n){var o=ct(i.selected),r=e.getSelectedMapKey(t);"single"===n||!0===n?(o[r]=!0,f(o,(function(t,e){o[e]=e===r}))):o[r]=!o[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(Wx),y_=f_;function m_(t){t.registerComponentModel(g_),t.registerComponentView(y_),u_(t)}var v_={label:{enabled:!0},decal:{show:!1}},x_=ve(),__={};function b_(t,e){var i=t.getModel("aria");if(i.get("enabled")){var n=ct(v_);Ht(n.label,t.getLocaleModel().get("aria"),!1),Ht(i.option,n,!1),function(){if(i.getModel("decal").get("show")){var e=me();t.eachSeries((function(t){if(!t.isColorBySeries()){var i=e.get(t.type);i||(i={},e.set(t.type,i)),x_(t).scope=i}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(J(e.enableAriaDecal))e.enableAriaDecal();else{var i=e.getData();if(e.isColorBySeries()){var n=ti(e.ecModel,e.name,__,t.getSeriesCount()),o=i.getVisual("decal");i.setVisual("decal",u(o,n))}else{var r=e.getRawData(),a={},s=x_(e).scope;i.each((function(t){var e=i.getRawIndex(t);a[e]=t}));var l=r.count();r.each((function(t){var n=a[t],o=r.getName(t)||t+"",c=ti(e.ecModel,o,s,l),p=i.getItemVisual(n,"decal");i.setItemVisual(n,"decal",u(p,c))}))}}function u(t,e){var i=t?E(E({},e),t):e;return i.dirty=!0,i}}))}}(),function(){var n=t.getLocaleModel().get("aria"),r=i.getModel("label");if(r.option=Nt(r.option,n),!r.get("enabled"))return;var a=e.getZr().dom;if(r.get("description"))return void a.setAttribute("aria-label",r.get("description"));var s,l=t.getSeriesCount(),u=r.get(["data","maxCount"])||10,c=r.get(["series","maxCount"])||10,p=Math.min(l,c);if(l<1)return;var d=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(d){var h=r.get(["general","withTitle"]);s=o(h,{title:d})}else s=r.get(["general","withoutTitle"]);var g=[],f=l>1?r.get(["series","multiple","prefix"]):r.get(["series","single","prefix"]);s+=o(f,{seriesCount:l}),t.eachSeries((function(e,i){if(i1?r.get(["series","multiple",a]):r.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,t.getLocaleModel().get(["series","typeNames"])[x]||"自定义图")});var s=e.getData();if(s.count()>u)n+=o(r.get(["data","partialData"]),{displayCnt:u});else n+=r.get(["data","allData"]);for(var c=r.get(["data","separator","middle"]),d=r.get(["data","separator","end"]),h=[],f=0;f