!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(np=null),tp[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=jf.call(t);if("[object Array]"===i){if(!z(t)){e=[];for(var r=0,o=t.length;rxp||t<-xp}function ft(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function pt(t){return(t=Math.round(t))<0?0:t>255?255:t}function gt(t){return(t=Math.round(t))<0?0:t>360?360:t}function mt(t){return t<0?0:t>1?1:t}function vt(t){return pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function yt(t){return mt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function xt(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function _t(t,e,n){return t+(e-t)*n}function wt(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function St(t,e){Pp&&bt(Pp,e),Pp=kp.put(t,Pp||e.slice())}function Mt(t,e){if(t){e=e||[];var n=kp.get(t);if(n)return bt(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Dp)return bt(e,Dp[i]),St(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),o=i.indexOf(")");if(-1!==r&&o+1===i.length){var a=i.substr(0,r),s=i.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void wt(e,0,0,0,1);l=yt(s.pop());case"rgb":return 3!==s.length?void wt(e,0,0,0,1):(wt(e,vt(s[0]),vt(s[1]),vt(s[2]),l),St(t,e),e);case"hsla":return 4!==s.length?void wt(e,0,0,0,1):(s[3]=yt(s[3]),It(s,e),St(t,e),e);case"hsl":return 3!==s.length?void wt(e,0,0,0,1):(It(s,e),St(t,e),e);default:return}}wt(e,0,0,0,1)}else{if(4===i.length)return(h=parseInt(i.substr(1),16))>=0&&h<=4095?(wt(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),St(t,e),e):void wt(e,0,0,0,1);if(7===i.length){var h=parseInt(i.substr(1),16);return h>=0&&h<=16777215?(wt(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),St(t,e),e):void wt(e,0,0,0,1)}}}}function It(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=yt(t[1]),r=yt(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return e=e||[],wt(e,pt(255*xt(a,o,n+1/3)),pt(255*xt(a,o,n)),pt(255*xt(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Tt(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,n=0;else{n=h<.5?l/(s+a):l/(2-s-a);var u=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,h];return null!=t[3]&&f.push(t[3]),f}}function Ct(t,e){var n=Mt(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0;return Lt(n,4===n.length?"rgba":"rgb")}}function At(t){var e=Mt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Dt(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=pt(_t(a[0],s[0],l)),n[1]=pt(_t(a[1],s[1],l)),n[2]=pt(_t(a[2],s[2],l)),n[3]=mt(_t(a[3],s[3],l)),n}}function kt(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=Mt(e[r]),s=Mt(e[o]),l=i-r,h=Lt([pt(_t(a[0],s[0],l)),pt(_t(a[1],s[1],l)),pt(_t(a[2],s[2],l)),mt(_t(a[3],s[3],l))],"rgba");return n?{color:h,leftIndex:r,rightIndex:o,value:i}:h}}function Pt(t,e){if((t=Mt(t))&&null!=e)return t[3]=mt(e),Lt(t,"rgba")}function Lt(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Ot(t,e){return t[e]}function zt(t,e,n){t[e]=n}function Et(t,e,n){return(e-t)*n+t}function Rt(t,e,n){return n>.5?e:t}function Nt(t,e,n,i,r){var o=t.length;if(1==r)for(s=0;sr)t.length=r;else for(a=i;a=0&&!(m[n]<=e);n--);n=Math.min(n,h-2)}else{for(n=k;ne);n++);n=Math.min(n-1,h-2)}k=n,P=e;var i=m[n+1]-m[n];if(0!==i)if(I=(e-m[n])/i,l)if(C=v[n],T=v[0===n?n:n-1],A=v[n>h-2?h-1:n+1],D=v[n>h-3?h-1:n+2],d)Ft(T,C,A,D,I,I*I,I*I*I,a(t,r),g);else{if(f)o=Ft(T,C,A,D,I,I*I,I*I*I,L,1),o=Wt(L);else{if(p)return Rt(C,A,I);o=Gt(T,C,A,D,I,I*I,I*I*I)}s(t,r,o)}else if(d)Nt(v[n],v[n+1],I,a(t,r),g);else{var o;if(f)Nt(v[n],v[n+1],I,L,1),o=Wt(L);else{if(p)return Rt(v[n],v[n+1],I);o=Et(v[n],v[n+1],I)}s(t,r,o)}},ondestroy:n});return e&&"spline"!==e&&(O.easing=e),O}}}function Xt(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function jt(t){for(var e=0;t>=jp;)e|=1&t,t>>=1;return t+e}function Yt(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function qt(t,e,n){for(n--;e>>1])<0?l=o:s=o+1;var h=i-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function Kt(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var h=a;a=r-l,l=r-h}for(a++;a>>1);o(t,e[n+u])>0?a=u+1:l=u}return l}function Qt(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+u])<0?l=u:a=u+1}return l}function Jt(t,e){function n(n){var s=o[n],h=a[n],u=o[n+1],c=a[n+1];a[n]=h+c,n===l-3&&(o[n+1]=o[n+2],a[n+1]=a[n+2]),l--;var d=Qt(t[u],t,s,h,0,e);s+=d,0!==(h-=d)&&0!==(c=Kt(t[s+h-1],t,u,c,c-1,e))&&(h<=c?i(s,h,u,c):r(s,h,u,c))}function i(n,i,r,o){var a=0;for(a=0;a=Yp||f>=Yp);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===i){for(a=0;a=0;a--)t[f+a]=t[d+a];if(0===i){v=!0;break}}if(t[c--]=h[u--],1==--o){v=!0;break}if(0!=(m=o-Kt(t[l],h,0,o,o-1,e))){for(o-=m,f=(c-=m)+1,d=(u-=m)+1,a=0;a=Yp||m>=Yp);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===o){for(f=(c-=i)+1,d=(l-=i)+1,a=i-1;a>=0;a--)t[f+a]=t[d+a];t[c]=h[u]}else{if(0===o)throw new Error;for(d=c-(o-1),a=0;a=0;a--)t[f+a]=t[d+a];t[c]=h[u]}else for(d=c-(o-1),a=0;a1;){var t=l-2;if(t>=1&&a[t-1]<=a[t]+a[t+1]||t>=2&&a[t-2]<=a[t]+a[t-1])a[t-1]a[t+1])break;n(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&a[t-1]s&&(l=s),$t(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}function ee(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function ne(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),t.createLinearGradient(i,o,r,a)}function ie(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*i+n.x,s=s*r+n.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}function re(){return!1}function oe(t,e,n){var i=ep(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}function ae(t){if("string"==typeof t){var e=ag.get(t);return e&&e.image}return t}function se(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=ag.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!he(e=o.image)&&o.pending.push(a):(!e&&(e=new Image),e.onload=le,ag.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function le(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;ehg&&(lg=0,sg={}),lg++,sg[n]=r,r}function ce(t,e,n,i,r,o,a){return o?fe(t,e,n,i,r,o,a):de(t,e,n,i,r,a)}function de(t,e,n,i,r,o){var a=Se(t,e,r,o),s=ue(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,h=new Xt(pe(0,s,n),ge(0,l,i),s,l);return h.lineHeight=a.lineHeight,h}function fe(t,e,n,i,r,o,a){var s=Me(t,{rich:o,truncate:a,font:e,textAlign:n,textPadding:r}),l=s.outerWidth,h=s.outerHeight;return new Xt(pe(0,l,n),ge(0,h,i),l,h)}function pe(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function ge(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function me(t,e,n){var i=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",h="top";switch(t){case"left":i-=n,r+=s,l="right",h="middle";break;case"right":i+=n+a,r+=s,h="middle";break;case"top":i+=a/2,r-=n,l="center",h="bottom";break;case"bottom":i+=a/2,r+=o+n,l="center";break;case"inside":i+=a/2,r+=s,l="center",h="middle";break;case"insideLeft":i+=n,r+=s,h="middle";break;case"insideRight":i+=a-n,r+=s,l="right",h="middle";break;case"insideTop":i+=a/2,r+=n,l="center";break;case"insideBottom":i+=a/2,r+=o-n,l="center",h="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=a-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=o-n,h="bottom";break;case"insideBottomRight":i+=a-n,r+=o-n,l="right",h="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:h}}function ve(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=ye(e,n,i,r);for(var a=0,s=o.length;a=a;l++)s-=a;var h=ue(n);return h>s&&(n="",h=0),s=t-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=t,i}function xe(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=ue(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?_e(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=ue(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function _e(t,e,n,i){for(var r=0,o=0,a=t.length;ol)t="",o=[];else if(null!=h)for(var u=ye(h-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=o.length;cr&&Ie(n,t.substring(r,o)),Ie(n,i[2],i[1]),r=ug.lastIndex}rf)return{lines:[],width:0,height:0};P.textWidth=ue(P.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))P.percentWidth=b,h.push(P),b=0;else{if(S){b=P.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&he(I=ae(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var D=null!=d?d-m:null;null!=D&&Dl&&(n*=l/(c=n+i),i*=l/c),r+o>l&&(r*=l/(c=r+o),o*=l/c),i+r>h&&(i*=h/(c=i+r),r*=h/c),n+o>h&&(n*=h/(c=n+o),o*=h/c),t.moveTo(a+n,s),t.lineTo(a+l-i,s),0!==i&&t.quadraticCurveTo(a+l,s,a+l,s+i),t.lineTo(a+l,s+h-r),0!==r&&t.quadraticCurveTo(a+l,s+h,a+l-r,s+h),t.lineTo(a+o,s+h),0!==o&&t.quadraticCurveTo(a,s+h,a,s+h-o),t.lineTo(a,s+n),0!==n&&t.quadraticCurveTo(a,s,a+n,s)}function Ae(t){return De(t),d(t.rich,De),t}function De(t){if(t){t.font=Te(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||fg[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||pg[n]?n:"top",t.textPadding&&(t.textPadding=k(t.textPadding))}}function ke(t,e,n,i,r){i.rich?Le(t,e,n,i,r):Pe(t,e,n,i,r)}function Pe(t,e,n,i,r){var o=Fe(e,"font",i.font||cg),a=i.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=Se(n,o,a,i.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Ve(l,i,r),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;ze(e,i,r,d,f);var m=ge(f,l,g),v=d,y=m,x=Re(i);if(x||a){var _=ue(n,o);a&&(_+=a[1]+a[3]);var w=pe(d,_,p);x&&Ne(t,e,i,w,m,_,l),a&&(v=Ze(d,p,a),y+=a[0])}Fe(e,"textAlign",p||"left"),Fe(e,"textBaseline","middle"),Fe(e,"shadowBlur",i.textShadowBlur||0),Fe(e,"shadowColor",i.textShadowColor||"transparent"),Fe(e,"shadowOffsetX",i.textShadowOffsetX||0),Fe(e,"shadowOffsetY",i.textShadowOffsetY||0),y+=u/2;var b=i.textStrokeWidth,S=Ge(i.textStroke,b),M=He(i.textFill);S&&(Fe(e,"lineWidth",b),Fe(e,"strokeStyle",S)),M&&Fe(e,"fillStyle",M);for(var I=0;I=0&&"right"===(_=b[D]).textAlign;)Ee(t,e,_,i,M,v,A,"right"),I-=_.width,A-=_.width,D--;for(C+=(o-(C-m)-(y-A)-I)/2;T<=D;)Ee(t,e,_=b[T],i,M,v,C+_.width/2,"center"),C+=_.width,T++;v+=M}}function ze(t,e,n,i,r){if(n&&e.textRotation){var o=e.textOrigin;"center"===o?(i=n.width/2+n.x,r=n.height/2+n.y):o&&(i=o[0]+n.x,r=o[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function Ee(t,e,n,i,r,o,a,s){var l=i.rich[n.styleName]||{},h=n.textVerticalAlign,u=o+r/2;"top"===h?u=o+n.height/2:"bottom"===h&&(u=o+r-n.height/2),!n.isLineHolder&&Re(l)&&Ne(t,e,l,"right"===s?a-n.width:"center"===s?a-n.width/2:a,u-n.height/2,n.width,n.height);var c=n.textPadding;c&&(a=Ze(a,s,c),u-=n.height/2-c[2]-n.textHeight/2),Fe(e,"shadowBlur",A(l.textShadowBlur,i.textShadowBlur,0)),Fe(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Fe(e,"shadowOffsetX",A(l.textShadowOffsetX,i.textShadowOffsetX,0)),Fe(e,"shadowOffsetY",A(l.textShadowOffsetY,i.textShadowOffsetY,0)),Fe(e,"textAlign",s),Fe(e,"textBaseline","middle"),Fe(e,"font",n.font||cg);var d=Ge(l.textStroke||i.textStroke,p),f=He(l.textFill||i.textFill),p=C(l.textStrokeWidth,i.textStrokeWidth);d&&(Fe(e,"lineWidth",p),Fe(e,"strokeStyle",d),e.strokeText(n.text,a,u)),f&&(Fe(e,"fillStyle",f),e.fillText(n.text,a,u))}function Re(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ne(t,e,n,i,r,o,a){var s=n.textBackgroundColor,l=n.textBorderWidth,h=n.textBorderColor,u=_(s);if(Fe(e,"shadowBlur",n.textBoxShadowBlur||0),Fe(e,"shadowColor",n.textBoxShadowColor||"transparent"),Fe(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Fe(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=n.textBorderRadius;c?Ce(e,{x:i,y:r,width:o,height:a,r:c}):e.rect(i,r,o,a),e.closePath()}if(u)Fe(e,"fillStyle",s),e.fill();else if(w(s)){var d=s.image;(d=se(d,null,t,Be,s))&&he(d)&&e.drawImage(d,i,r,o,a)}l&&h&&(Fe(e,"lineWidth",l),Fe(e,"strokeStyle",h),e.stroke())}function Be(t,e){e.image=t}function Ve(t,e,n){var i=e.x||0,r=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+We(s[0],n.width),r=n.y+We(s[1],n.height);else{var l=me(s,n,e.textDistance);i=l.x,r=l.y,o=o||l.textAlign,a=a||l.textVerticalAlign}var h=e.textOffset;h&&(i+=h[0],r+=h[1])}return{baseX:i,baseY:r,textAlign:o,textVerticalAlign:a}}function Fe(t,e,n){return t[e]=Kp(t,e,n),t[e]}function Ge(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function He(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function We(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Ze(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ue(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Xe(t){t=t||{},Hp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Jp(t.style,this),this._rect=null,this.__clipPaths=[]}function je(t){Xe.call(this,t)}function Ye(t){return parseInt(t,10)}function qe(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function $e(t,e,n){return vg.copy(t.getBoundingRect()),t.transform&&vg.applyTransform(t.transform),yg.width=e,yg.height=n,!vg.intersect(yg)}function Ke(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n=0){var r="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];r&&en(t,r,e,n)}else en(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&wg.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function on(t,e,n){_g?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function an(t,e,n){_g?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function sn(t){return t.which>1}function ln(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function hn(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function un(t){return"mousewheel"===t&&Zf.browser.firefox?"DOMMouseScroll":t}function cn(t,e,n){var i=t._gestureMgr;"start"===n&&i.clear();var r=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===n&&i.clear(),r){var o=r.type;e.gestureEvent=o,t.handler.dispatchToElement({target:r.target},o,r.event)}}function dn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function fn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function pn(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}d(Cg,function(e){t._handlers[e]=m(kg[e],t)}),d(Dg,function(e){t._handlers[e]=m(kg[e],t)}),d(Tg,function(n){t._handlers[n]=e(kg[n],t)})}function gn(t){function e(e,n){d(e,function(e){on(t,un(e),n._handlers[e])},n)}dp.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Mg,this._handlers={},pn(this),Zf.pointerEventsSupported?e(Dg,this):(Zf.touchEventsSupported&&e(Cg,this),e(Tg,this))}function mn(t,e){var n=new Eg(Hf(),t,e);return zg[n.id]=n,n}function vn(t,e){Og[t]=e}function yn(t){delete zg[t]}function xn(t){return t instanceof Array?t:null==t?[]:[t]}function _n(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i=n.length&&n.push({option:t})}}),n}function Mn(t){var e=R();Ng(t,function(t,n){var i=t.exist;i&&e.set(i.id,t)}),Ng(t,function(t,n){var i=t.option;P(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),Ng(t,function(t,n){var i=t.exist,r=t.option,o=t.keyInfo;if(Bg(r)){if(o.name=null!=r.name?r.name+"":i?i.name:Fg,i)o.id=i.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(e.get(o.id))}e.set(o.id,t)}})}function In(t){return Bg(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Tn(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?f(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?f(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function Cn(){var t="__\0ec_inner_"+Hg+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function An(t,e,n){if(_(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||Dn(e,r+"Index")||Dn(e,r+"Id")||Dn(e,r+"Name")||(e[r+"Index"]=0);var o={};return Ng(e,function(i,r){var i=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],h=(a[2]||"").toLowerCase();if(!(!s||!h||null==i||"index"===h&&"none"===i||n&&n.includeMainTypes&&l(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===h&&"all"===i||(u[h]=i);var c=t.queryComponents(u);o[s+"Models"]=c,o[s+"Model"]=c[0]}}else o[r]=i}),o}function Dn(t,e){return t&&t.hasOwnProperty(e)}function kn(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Pn(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function Ln(t){var e={main:"",sub:""};return t&&(t=t.split(Wg),e.main=t[0]||"",e.sub=t[1]||""),e}function On(t){P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function zn(t,e){t.$constructor=t,t.extend=function(t){var e=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(n.prototype,t),n.extend=this.extend,n.superCall=Rn,n.superApply=Nn,h(n,this),n.superClass=e,n}}function En(t){var e=["__\0is_clz",Ug++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Rn(t,e){var n=D(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Nn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Bn(t,e){function n(t){var e=i[t.main];return e&&e[Zg]||((e=i[t.main]={})[Zg]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(On(e),(e=Ln(e)).sub?e.sub!==Zg&&(n(e)[e.sub]=t):i[e.main]=t),t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Zg]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=Ln(t);var e=[],n=i[t.main];return n&&n[Zg]?d(n,function(t,n){n!==Zg&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=Ln(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=Ln(t);var e=i[t.main];return e&&e[Zg]},t.parseClassType=Ln,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var n=r.call(this,e);return t.registerClass(n,e.type)})}return t}function Vn(t){return t>-Jg&&tJg||t<-Jg}function Gn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Hn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Wn(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,f=0;if(Vn(u)&&Vn(c))Vn(s)?o[0]=0:(M=-l/s)>=0&&M<=1&&(o[f++]=M);else{var p=c*c-4*u*d;if(Vn(p)){var g=c/u,m=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m)}else if(p>0){var v=Qg(p),y=u*s+1.5*a*(-c+v),x=u*s+1.5*a*(-c-v);(M=(-s-((y=y<0?-Kg(-y,nm):Kg(y,nm))+(x=x<0?-Kg(-x,nm):Kg(x,nm))))/(3*a))>=0&&M<=1&&(o[f++]=M)}else{var _=(2*u*s-3*a*c)/(2*Qg(u*u*u)),w=Math.acos(_)/3,b=Qg(u),S=Math.cos(w),M=(-s-2*b*S)/(3*a),m=(-s+b*(S+em*Math.sin(w)))/(3*a),I=(-s+b*(S-em*Math.sin(w)))/(3*a);M>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m),I>=0&&I<=1&&(o[f++]=I)}}return f}function Zn(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Vn(a))Fn(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var h=o*o-4*a*s;if(Vn(h))r[0]=-o/(2*a);else if(h>0){var u=Qg(h),c=(-o+u)/(2*a),d=(-o-u)/(2*a);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function Un(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=i}function Xn(t,e,n,i,r,o,a,s,l,h,u){var c,d,f,p,g,m=.005,v=1/0;im[0]=l,im[1]=h;for(var y=0;y<1;y+=.05)rm[0]=Gn(t,n,r,a,y),rm[1]=Gn(e,i,o,s,y),(p=hp(im,rm))=0&&p=0&&c<=1&&(r[l++]=c);else{var h=a*a-4*o*s;if(Vn(h))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(h>0){var u=Qg(h),c=(-a+u)/(2*o),d=(-a-u)/(2*o);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function $n(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function Kn(t,e,n,i,r){var o=(e-t)*i+t,a=(n-e)*i+e,s=(a-o)*i+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function Qn(t,e,n,i,r,o,a,s,l){var h,u=.005,c=1/0;im[0]=a,im[1]=s;for(var d=0;d<1;d+=.05)rm[0]=jn(t,n,r,d),rm[1]=jn(e,i,o,d),(m=hp(im,rm))=0&&m1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(cm[0]=hm(r)*n+t,cm[1]=lm(r)*i+e,dm[0]=hm(o)*n+t,dm[1]=lm(o)*i+e,h(s,cm,dm),u(l,cm,dm),(r%=um)<0&&(r+=um),(o%=um)<0&&(o+=um),r>o&&!a?o+=um:rr&&(fm[0]=hm(f)*n+t,fm[1]=lm(f)*i+e,h(s,fm,s),u(l,fm,l))}function ri(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0,h=t;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&u>i+c&&u>o+c&&u>s+c||ut+c&&h>n+c&&h>r+c&&h>a+c||he+h&&l>i+h&&l>o+h||lt+h&&s>n+h&&s>r+h||sn||u+hr&&(r+=km);var d=Math.atan2(l,s);return d<0&&(d+=km),d>=i&&d<=r||d+km>=i&&d+km<=r}function hi(t,e,n,i,r,o){if(o>e&&o>i||or?a:0}function ui(t,e){return Math.abs(t-e)e&&h>i&&h>o&&h>s||h1&&ci(),c=Gn(e,i,o,s,Em[0]),p>1&&(d=Gn(e,i,o,s,Em[1]))),2==p?me&&s>i&&s>o||s=0&&h<=1){for(var u=0,c=jn(e,i,o,h),d=0;dn||s<-n)return 0;h=Math.sqrt(n*n-s*s);zm[0]=-h,zm[1]=h;var l=Math.abs(i-r);if(l<1e-4)return 0;if(l%Lm<1e-4){i=0,r=Lm;p=o?1:-1;return a>=zm[0]+t&&a<=zm[1]+t?p:0}if(o){var h=i;i=si(r),r=si(h)}else i=si(i),r=si(r);i>r&&(r+=Lm);for(var u=0,c=0;c<2;c++){var d=zm[c];if(d+t>a){var f=Math.atan2(s,d),p=o?1:-1;f<0&&(f=Lm+f),(f>=i&&f<=r||f+Lm>=i&&f+Lm<=r)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),u+=p)}}return u}function gi(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,h=0,u=0;u1&&(n||(o+=hi(a,s,l,h,i,r))),1==u&&(l=a=t[u],h=s=t[u+1]),c){case Pm.M:a=l=t[u++],s=h=t[u++];break;case Pm.L:if(n){if(ri(a,s,t[u],t[u+1],e,i,r))return!0}else o+=hi(a,s,t[u],t[u+1],i,r)||0;a=t[u++],s=t[u++];break;case Pm.C:if(n){if(oi(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else o+=di(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],i,r)||0;a=t[u++],s=t[u++];break;case Pm.Q:if(n){if(ai(a,s,t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else o+=fi(a,s,t[u++],t[u++],t[u],t[u+1],i,r)||0;a=t[u++],s=t[u++];break;case Pm.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;u>1?o+=hi(a,s,x,_,i,r):(l=x,h=_);var w=(i-d)*g/p+d;if(n){if(li(d,f,g,m,m+v,y,e,w,r))return!0}else o+=pi(d,f,g,m,m+v,y,w,r);a=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case Pm.R:l=a=t[u++],h=s=t[u++];var x=l+t[u++],_=h+t[u++];if(n){if(ri(l,h,x,h,e,i,r)||ri(x,h,x,_,e,i,r)||ri(x,_,l,_,e,i,r)||ri(l,_,l,h,e,i,r))return!0}else o+=hi(x,h,x,_,i,r),o+=hi(l,_,l,h,i,r);break;case Pm.Z:if(n){if(ri(a,s,l,h,e,i,r))return!0}else o+=hi(a,s,l,h,i,r);a=l,s=h}}return n||ui(s,h)||(o+=hi(a,s,l,h,i,r)||0),0!==o}function mi(t,e,n){return gi(t,0,!1,e,n)}function vi(t,e,n,i){return gi(t,e,!0,n,i)}function yi(t){Xe.call(this,t),this.path=null}function xi(t,e,n,i,r,o,a,s,l,h,u){var c=l*(Ym/180),d=jm(c)*(t-n)/2+Xm(c)*(e-i)/2,f=-1*Xm(c)*(t-n)/2+jm(c)*(e-i)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=Um(p),s*=Um(p));var g=(r===o?-1:1)*Um((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=g*-s*d/a,y=(t+n)/2+jm(c)*m-Xm(c)*v,x=(e+i)/2+Xm(c)*m+jm(c)*v,_=Km([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],b=[(-1*d-m)/a,(-1*f-v)/s],S=Km(w,b);$m(w,b)<=-1&&(S=Ym),$m(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*Ym),1===o&&S<0&&(S+=2*Ym),u.addData(h,y,x,a,s,_,S,c,o)}function _i(t){if(!t)return[];var e,n=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var p=0;p=2){if(r&&"spline"!==r){var o=ov(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],h=o[2*s+1],u=i[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(i=rv(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s=0)&&(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=n.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),i}function nr(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function ir(t,e){var n=e||e.getModel("textStyle");return L([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function rr(t,e,n,i,r,o){if("function"==typeof r&&(o=r,r=null),i&&i.isAnimationEnabled()){var a=t?"Update":"",s=i.getShallow("animationDuration"+a),l=i.getShallow("animationEasing"+a),h=i.getShallow("animationDelay"+a);"function"==typeof h&&(h=h(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(n,s,h||0,l,o,!!o):(e.stopAnimation(),e.attr(n),o&&o())}else e.stopAnimation(),e.attr(n),o&&o()}function or(t,e,n,i,r){rr(!0,t,e,n,i,r)}function ar(t,e,n,i,r){rr(!1,t,e,n,i,r)}function sr(t,e){for(var n=ot([]);t&&t!==e;)st(n,t.getLocalTransform(),n),t=t.parent;return n}function lr(t,e,n){return e&&!c(e)&&(e=_p.getLocalTransform(e)),n&&(e=ct([],e)),$([],t,e)}function hr(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return o=lr(o,e,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function ur(t,e,n,i){function r(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),or(t,i,n,t.dataIndex)}}})}}function cr(t,e){return f(t,function(t){var n=t[0];n=xv(n,e.x),n=_v(n,e.x+e.width);var i=t[1];return i=xv(i,e.y),i=_v(i,e.y+e.height),[n,i]})}function dr(t,e,n){var i=(e=o({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),a(i,n),new je(e)):Di(t.replace("path://",""),e,n,"center")}function fr(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function pr(t,e,n){for(var i=0;i0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function xr(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?vr(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function _r(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function wr(t){return t.sort(function(t,e){return t-e}),t}function br(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Sr(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Mr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Ir(t,e,n){if(!t[e])return 0;var i=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=f(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,s=f(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=f(o,function(t,e){return t-s[e]});lu&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function Tr(t){var e=2*Math.PI;return(t%e+e)%e}function Cr(t){return t>-kv&&t=-20?+t.toFixed(i<0?-i:0):t}function Lr(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Or(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function zr(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Er(t,e,n){y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':""}function Nr(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Ar(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),h=i["get"+r+"Minutes"](),u=i["get"+r+"Seconds"]();return t=t.replace("MM",Rv(a)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Rv(s)).replace("d",s).replace("hh",Rv(l)).replace("h",l).replace("mm",Rv(h)).replace("m",h).replace("ss",Rv(u)).replace("s",u)}function Br(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Vr(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(u=o+m)>i||l.newline?(o=0,u=m,a+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=a+v)>r||l.newline?(o+=s+n,a=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=u+n:a=c+n)})}function Fr(t,e,n){n=Ov(n||0);var i=e.width,r=e.height,o=xr(t.left,i),a=xr(t.top,r),s=xr(t.right,i),l=xr(t.bottom,r),h=xr(t.width,i),u=xr(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(h)&&(h=i-s-d-o),isNaN(u)&&(u=r-l-c-a),null!=f&&(isNaN(h)&&isNaN(u)&&(f>i/r?h=.8*i:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(o)&&(o=i-s-h-d),isNaN(a)&&(a=r-l-u-c),t.left||t.right){case"center":o=i/2-h/2-n[3];break;case"right":o=i-h-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-u/2-n[0];break;case"bottom":a=r-u-c}o=o||0,a=a||0,isNaN(h)&&(h=i-d-o-(s||0)),isNaN(u)&&(u=r-c-a-(l||0));var p=new Xt(o+n[3],a+n[0],h,u);return p.margin=n,p}function Gr(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||s){var h;if("raw"===l)h="group"===t.type?new Xt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(h=h.clone()).applyTransform(u)}e=Fr(a({width:h.width,height:h.height},e),n,i);var c=t.position,d=o?e.x-h.x:0,f=s?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Hr(t,e,n){function i(n,i){var a={},l=0,h={},u=0;if(Fv(n,function(e){h[e]=t[e]}),Fv(n,function(t){r(e,t)&&(a[t]=h[t]=e[t]),o(a,t)&&l++,o(h,t)&&u++}),s[i])return o(e,n[1])?h[n[2]]=null:o(e,n[2])&&(h[n[1]]=null),h;if(2!==u&&l){if(l>=2)return a;for(var c=0;ce)return t[i];return t[n-1]}function Xr(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:R(),categoryAxisMap:R()},i=Kv[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}function jr(t){return"category"===t.get("type")}function Yr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===ey?{}:[]),this.sourceFormat=t.sourceFormat||ny,this.seriesLayoutBy=t.seriesLayoutBy||ry,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&R(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function qr(t){var e=t.option.source,n=ny;if(S(e))n=iy;else if(y(e))for(var i=0,r=e.length;i=e:"max"===n?t<=e:t===e}function wo(t,e){return t.join(",")===e.join(",")}function bo(t,e){cy(e=e||{},function(e,n){if(null!=e){var i=t[n];if(Xv.hasClass(n)){e=xn(e);var r=Sn(i=xn(i),e);t[n]=fy(r,function(t){return t.option&&t.exist?py(t.exist,t.option,!0):t.exist||t.option})}else t[n]=py(i,e,!0)}})}function So(t){var e=t&&t.itemStyle;if(e)for(var n=0,r=yy.length;ne.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ko(t,e){d(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,v(Qo,e))})}function Qo(t){var e=Jo(t);e&&e.setOutputEnd(this.count())}function Jo(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}function ta(){this.group=new Xp,this.uid=mr("viewChart"),this.renderTask=Wo({plan:ia,reset:ra}),this.renderTask.context={view:this}}function ea(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n=0?i():c=setTimeout(i,-o),h=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function sa(t,e,n,i){var r=t[e];if(r){var o=r[By]||r,a=r[Fy];if(r[Vy]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=aa(o,n,"debounce"===i))[By]=o,r[Fy]=i,r[Vy]=n}return r}}function la(t,e){var n=t[e];n&&n[By]&&(t[e]=n[By])}function ha(t,e){this.ecInstance=t,this.api=e,this.unfinished,this._stageTaskMap=R()}function ua(t,e,n,i,r){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var a;d(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each(function(t){o(r,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),Xy(u,i);var f=t.getPerformArgs(u,r.block);d.each(function(t){t.perform(f)}),a|=u.perform(f)}else h&&h.each(function(s,l){o(r,s)&&s.dirty();var h=t.getPerformArgs(s,r.block);h.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),Xy(s,i),a|=s.perform(h)})}}),t.unfinished|=a}function ca(t,e,n,i,r){function o(n){var o=n.uid,s=a.get(o)||a.set(o,Wo({plan:va,reset:ya,count:_a}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},wa(t,n,s)}var a=n.seriesTaskMap||(n.seriesTaskMap=R()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(o):s?i.eachRawSeriesByType(s,o):l&&l(i,r).each(o);var h=t._pipelineMap;a.each(function(t,e){h.get(e)||(t.dispose(),a.removeKey(e))})}function da(t,e,n,i,r){function o(e){var n=e.uid,i=s.get(n)||s.set(n,Wo({reset:pa,onDirty:ma}));i.context={model:e,overallProgress:u,isOverallFilter:c},i.agent=a,i.__block=u,wa(t,e,i)}var a=n.overallTask=n.overallTask||Wo({reset:fa});a.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=a.agentStubMap=a.agentStubMap||R(),l=e.seriesType,h=e.getTargetSeries,u=!0,c=e.isOverallFilter;l?i.eachRawSeriesByType(l,o):h?h(i,r).each(o):(u=!1,d(i.getSeries(),o));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),s.removeKey(e))})}function fa(t){t.overallReset(t.ecModel,t.api,t.payload)}function pa(t,e){return t.overallProgress&&ga}function ga(){this.agent.dirty(),this.getDownstream().dirty()}function ma(){this.agent&&this.agent.dirty()}function va(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function ya(t){if(t.useClearVisual&&t.data.clearAllVisual(),(t.resetDefines=xn(t.reset(t.model,t.ecModel,t.api,t.payload))).length)return xa}function xa(t,e){for(var n=e.data,i=e.resetDefines,r=0;re.get("hoverLayerThreshold")&&!Zf.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function Wa(t,e){var n=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==n&&t.setStyle("blend",n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",n)})})}function Za(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Ua(t){var e=t._coordSysMgr;return o(new go(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}}})}function Xa(t){function e(t,e){for(var i=0;i65535?e:n}function ps(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function gs(t,e){d(Vx.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods}function ms(t){return t}function vs(t){return t=0?this._indices[t]:-1}function ys(t,e){var n=t._idList[e];return null==n&&(n=t._getIdFromStore(e)),null==n&&(n=Nx+e),n}function xs(t){return y(t)||(t=[t]),t}function _s(t,e){var n=t.dimensions,i=new Fx(f(n,t.getDimensionInfo,t),t.hostModel);gs(i,t);for(var r=i._storage={},o=t._storage,a=0;a=0?ws(o[s]):o[s])}return i}function ws(t){for(var e=new Array(t.length),n=0;ni&&(a=r.interval=i);var s=r.intervalPrecision=zs(a);return Rs(r.niceTickExtent=[jx(Math.ceil(t[0]/a)*a,s),jx(Math.floor(t[1]/a)*a,s)],t),r}function zs(t){return Sr(t)+2}function Es(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Rs(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Es(t,0,e),Es(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Ns(t,e,n,i){var r=[];if(!t)return r;e[0]1e4)return[];return e[1]>(r.length?r[r.length-1]:n[1])&&r.push(e[1]),r}function Bs(t){return t.get("stack")||$x+t.seriesIndex}function Vs(t){return t.dim+t.index}function Fs(t,e){return Gs(f(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),r="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count();return{bandWidth:r,barWidth:xr(t.get("barWidth"),r),barMaxWidth:xr(t.get("barMaxWidth"),r),barGap:t.get("barGap"),barCategoryGap:t.get("barCategoryGap"),axisKey:Vs(n),stackId:Bs(t)}}),e)}function Gs(t,e){var n={};d(t,function(t,e){var i=t.axisKey,r=t.bandWidth,o=n[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;n[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var h=t.barMaxWidth;h&&(a[s].maxWidth=h);var u=t.barGap;null!=u&&(o.gap=u);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var i={};return d(n,function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,o=xr(t.categoryGap,r),a=xr(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-o)/(l+(l-1)*a);h=Math.max(h,0),d(n,function(t,e){var n=t.maxWidth;n&&n0&&s>0&&!l&&(a=0),a<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c){var d=g(c.getSeriesByType("bar"),function(t){return t.getBaseAxis()===e.axis}).length>0;if(("time"===o||"interval"===o)&&d){var f=Zs(a,s,e);a=f.min,s=f.max}}return[a,s]}function Zs(t,e,n){var i=n.ecModel,r=n.axis.getExtent(),o=r[1]-r[0],a=Fs(g(i.getSeriesByType("bar"),function(t){return!i.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}))[n.axis.dim+n.axis.index];if(void 0===a)return{min:t,max:e};var s=1/0;d(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(a,function(t){l=Math.max(t.offset+t.width,l)});var h=Math.abs(s)+l,u=e-t,c=u/(1-(s+l)/o)-u;return e+=c*(l/h),t-=c*(s/h),{min:t,max:e}}function Us(t,e){var n=Ws(t,e),i=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:o,fixMin:i,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Xs(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Xx(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new qx;default:return(Ds.getClass(e)||qx).create(t)}}function js(t,e,n,i,r){var o,a=0,s=0,l=(i-r)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(a+1)*h-1}function Ys(t,e){var n=t.scale,i=n.getTicksLabels(),r=n.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),f(i,e)):"function"==typeof e?f(r,function(n,i){return e(qs(t,n),i)},this):i}function qs(t,e){return"category"===t.type?t.scale.getLabel(e):e}function $s(t,e){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1)}}function Ks(t,e,n,i,r,o,a){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?ki(t.slice(8),new Xt(e,n,i,r),a?"center":"cover"):0===t.indexOf("path://")?Di(t.slice(7),{},new Xt(e,n,i,r),a?"center":"cover"):new x_({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=s,l.setColor=$s,l.setColor(o),l}function Qs(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function il(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function rl(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Go(t,e,n[0]);if(i){for(var r=[],o=0;o=0?1:-1}function fl(t,e,n){for(var i,r=t.getBaseAxis(),o=t.getOtherAxis(r),a=r.onZero?0:o.scale.getExtent()[0],s=o.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,n);h&&dl(h.get(s,n))===dl(u);){i=h;break}var c=[];return c[l]=e.get(r.dim,n),c[1-l]=i?i.get(s,n,!0):a,t.dataToPoint(c)}function pl(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}function gl(t){return isNaN(t[0])||isNaN(t[1])}function ml(t,e,n,i,r,o,a,s,l,h,u){for(var c=0,d=n,f=0;f=r||d<0)break;if(gl(p)){if(u){d+=o;continue}break}if(d===n)t[o>0?"moveTo":"lineTo"](p[0],p[1]),B_(F_,p);else if(l>0){var g=d+o,m=e[g];if(u)for(;m&&gl(e[g]);)m=e[g+=o];var v=.5,y=e[c];if(!(m=e[g])||gl(m))B_(G_,p);else{gl(m)&&!u&&(m=p),W(V_,m,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=lp(p,y),_=lp(p,m);N_(G_,p,V_,-l*(1-(v=_/(_+x))))}E_(F_,F_,s),R_(F_,F_,a),E_(G_,G_,s),R_(G_,G_,a),t.bezierCurveTo(F_[0],F_[1],G_[0],G_[1],p[0],p[1]),N_(F_,p,V_,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function vl(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}function yl(t,e){if(t.length===e.length){for(var n=0;ne[0]?1:-1;e[0]+=i*n,e[1]-=i*n}return e}function wl(t){return t>=0?1:-1}function bl(t,e,n,i){var r=e.getBaseAxis(),o=e.getOtherAxis(r),a=0,s=o.scale.getExtent();"start"===i?a=s[0]:"end"===i?a=s[1]:(s=o.scale.getExtent())[0]>0?a=s[0]:s[1]<0&&(a=s[1]);var l=o.dim,h="x"===l||"radius"===l?1:0,u=n.mapDimension(l);return n.mapArray(u?[u]:[],function(t,i){for(var o,s=n.stackedOn;s&&wl(s.get(u,i))===wl(t);){o=s;break}var l=[];return l[h]=n.get(r.dim,i),l[1-h]=o?o.get(u,i,!0):a,e.dataToPoint(l)},!0)}function Sl(t,e,n){var i=_l(t.getAxis("x")),r=_l(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),a=Math.min(i[0],i[1]),s=Math.min(r[0],r[1]),l=Math.max(i[0],i[1])-a,h=Math.max(r[0],r[1])-s,u=n.get("lineStyle.width")||2,c=n.get("clipOverflow")?u/2:Math.max(l,h);o?(s-=c,h+=2*c):(a-=c,l+=2*c);var d=new lv({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,ar(d,{shape:{width:l,height:h}},n)),d}function Ml(t,e,n){var i=t.getAngleAxis(),r=t.getRadiusAxis().getExtent(),o=i.getExtent(),a=Math.PI/180,s=new nv({shape:{cx:t.cx,cy:t.cy,r0:r[0],r:r[1],startAngle:-o[0]*a,endAngle:-o[1]*a,clockwise:i.inverse}});return e&&(s.shape.endAngle=-o[0]*a,ar(s,{shape:{endAngle:-o[1]*a}},n)),s}function Il(t,e,n){return"polar"===t.type?Ml(t,e,n):Sl(t,e,n)}function Tl(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,o=[],a=0;a=0;r--)if(n[r].dimension<2){i=n[r];break}if(i&&"cartesian2d"===e.type){var o=i.dimension,a=t.dimensions[o],s=e.getAxis(a),l=f(i.stops,function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),h=l.length,u=i.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,p=l[h-1].coord+10,g=p-c;if(g<.001)return"transparent";d(l,function(t){t.offset=(t.coord-c)/g}),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var m=new gv(0,0,0,0,l,!0);return m[a]=c,m[a+"2"]=p,m}}}function Al(t){return this._axes[t]}function Dl(t){Y_.call(this,t)}function kl(t,e){return e.type||(e.data?"category":"value")}function Pl(t,e,n){return t.getCoordSysModel()===e}function Ll(t,e){var n=e*Math.PI/180,i=t.plain(),r=i.width,o=i.height,a=r*Math.cos(n)+o*Math.sin(n),s=r*Math.sin(n)+o*Math.cos(n);return new Xt(i.x,i.y,a,s)}function Ol(t){var e,n=t.model,i=n.get("axisLabel.show")?n.getFormattedLabels():[],r=n.getModel("axisLabel"),o=1,a=i.length;a>40&&(o=Math.ceil(a/40));for(var s=0;si[1],l="start"===e&&!s||"start"!==e&&s;return Cr(a-sw/2)?(o=l?"bottom":"top",r="center"):Cr(a-1.5*sw)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*sw&&a>sw/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Hl(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Wl(t,e,n){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],h=n[0],u=n[1],c=n[n.length-1],d=n[n.length-2];!1===i?(Zl(o),Zl(h)):Ul(o,a)&&(i?(Zl(a),Zl(u)):(Zl(o),Zl(h))),!1===r?(Zl(s),Zl(c)):Ul(l,s)&&(r?(Zl(l),Zl(d)):(Zl(s),Zl(c)))}function Zl(t){t&&(t.ignore=!0)}function Ul(t,e,n){var i=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(i&&r){var o=ot([]);return ht(o,o,-t.rotation),i.applyTransform(st([],o,t.getLocalTransform())),r.applyTransform(st([],o,e.getLocalTransform())),i.intersect(r)}}function Xl(t){return"middle"===t||"center"===t}function jl(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),s=r.get("length"),l=dw(r,n.labelInterval),h=i.getTicksCoords(r.get("alignWithLabel")),u=i.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],p=[],g=t._transform,m=[],v=h.length,y=0;y=0||t===e}function eh(t){var e=nh(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=rh(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0?"bottom":"top":r.width>0?"left":"right";l||hh(t.style,d,i,h,o,n,p),Yi(t,d)}function ph(t,e){var n=t.get(Mw)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function gh(t,e,n,i){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){mh(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function mh(t,e,n,i,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=n?i:0,h=[a*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function vh(t,e){function n(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function i(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}Xp.call(this);var r=new nv({z2:2}),o=new sv,a=new Qm;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function yh(t,e,n,i,r,o,a){function s(e,n){for(var i=e;i>=0&&(t[i].y-=n,!(i>0&&t[i].y>t[i-1].y+t[i-1].height));i--);}function l(t,e,n,i,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=a&&(d=a-10),!e&&d<=a&&(d=a+10),t[s].x=n+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,d=[],f=[],p=0;pe&&o+1t[o].y+t[o].height)return void s(o,i/2);s(n-1,i/2)}(p,c,-h),u=t[p].y+t[p].height;a-u<0&&s(c-1,u-a);for(p=0;p=n?f.push(t[p]):d.push(t[p]);l(d,!1,e,n,i,r),l(f,!0,e,n,i,r)}function xh(t,e,n,i,r,o){for(var a=[],s=[],l=0;l=0&&s<0)&&(a=p,s=f,r=h,o.length=0),Bw(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function kh(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function Ph(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=oh(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Lh(t,e,n){var i=n.axesInfo=[];Bw(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Oh(t,e,n,i){if(!Nh(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}function zh(t,e,n){var i=n.getZr(),r=Fw(i).axisPointerLastHighlights||{},o=Fw(i).axisPointerLastHighlights={};Bw(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&Bw(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var a=[],s=[];d(r,function(t,e){!o[e]&&s.push(t)}),d(o,function(t,e){!r[e]&&a.push(t)}),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),a.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:a})}function Eh(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function Rh(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Nh(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Bh(t,e,n){if(!Zf.node){var i=e.getZr();Gw(i).records||(Gw(i).records={}),Vh(i,e),(Gw(i).records[t]||(Gw(i).records[t]={})).handler=n}}function Vh(t,e){function n(n,i){t.on(n,function(n){var r=Wh(e);Hw(Gw(t).records,function(t){t&&i(t,n,r.dispatchAction)}),Fh(r.pendings,e)})}Gw(t).initialized||(Gw(t).initialized=!0,n("click",v(Hh,"click")),n("mousemove",v(Hh,"mousemove")),n("globalout",Gh))}function Fh(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function Gh(t,e,n){t.handler("leave",null,n)}function Hh(t,e,n,i){e.handler(t,n,i)}function Wh(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function Zh(t,e){if(!Zf.node){var n=e.getZr();(Gw(n).records||{})[t]&&(Gw(n).records[t]=null)}}function Uh(){}function Xh(t,e,n,i){jh(Zw(n).lastProp,i)||(Zw(n).lastProp=i,e?or(n,i,t):(n.stopAnimation(),n.attr(i)))}function jh(t,e){if(w(t)&&w(e)){var n=!0;return d(e,function(e,i){n=n&&jh(t[i],e)}),!!n}return t===e}function Yh(t,e){t[e.get("label.show")?"show":"hide"]()}function qh(t){return{position:t.position.slice(),rotation:t.rotation||0}}function $h(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function Kh(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function Qh(t,e,n,i,r){var o=tu(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),a=n.getModel("label"),s=Ov(a.get("padding")||0),l=a.getFont(),h=ce(o,l),u=r.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],f=r.align;"right"===f&&(u[0]-=c),"center"===f&&(u[0]-=c/2);var p=r.verticalAlign;"bottom"===p&&(u[1]-=d),"middle"===p&&(u[1]-=d/2),Jh(u,c,d,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:a.get("borderRadius")},position:u.slice(),style:{text:o,textFont:l,textFill:a.getTextColor(),textPosition:"inside",fill:g,stroke:a.get("borderColor")||"transparent",lineWidth:a.get("borderWidth")||0,shadowBlur:a.get("shadowBlur"),shadowColor:a.get("shadowColor"),shadowOffsetX:a.get("shadowOffsetX"),shadowOffsetY:a.get("shadowOffsetY")},z2:10}}function Jh(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function tu(t,e,n,i,r){var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:qs(e,t),seriesData:[]};d(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)}),_(a)?o=a.replace("{value}",o):x(a)&&(o=a(s))}return o}function eu(t,e,n){var i=rt();return ht(i,i,n.rotation),lt(i,i,n.position),lr([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function nu(t,e,n,i,r,o){var a=lw.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),Qh(e,i,r,o,{position:eu(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function iu(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function ru(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}function ou(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function au(t){return"x"===t.dim?0:1}function su(t){var e="left "+t+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)";return f(Kw,function(t){return t+"transition:"+e}).join(";")}function lu(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();return i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px"),qw(["decoration","align"],function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)}),e.join(";")}function hu(t){var e=[],n=t.get("transitionDuration"),i=t.get("backgroundColor"),r=t.getModel("textStyle"),o=t.get("padding");return n&&e.push(su(n)),i&&(Zf.canvasSupported?e.push("background-Color:"+i):(e.push("background-Color:#"+At(i)),e.push("filter:alpha(opacity=70)"))),qw(["width","color","radius"],function(n){var i="border-"+n,r=$w(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))}),e.push(lu(r)),null!=o&&e.push("padding:"+Ov(o).join("px ")+"px"),e.join(";")+";"}function uu(t,e){if(Zf.wxa)return null;var n=document.createElement("div"),i=this._zr=e.getZr();this.el=n,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!r._enterable){var n=i.handler;rn(t,e,!0),n.dispatch("mousemove",e)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function cu(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(fr.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new fr(n,e,e.ecModel))}return e}function du(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function fu(t,e,n,i,r,o,a){var s=gu(n),l=s.width,h=s.height;return null!=o&&(t+l+o>i?t-=l+o:t+=o),null!=a&&(e+h+a>r?e-=h+a:e+=a),[t,e]}function pu(t,e,n,i,r){var o=gu(n),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function gu(t){var e=t.clientWidth,n=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(t);i&&(e+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),n+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:n}}function mu(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-5;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+5;break;case"left":o=e.x-i-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+5,a=e.y+l/2-r/2}return[o,a]}function vu(t){return"center"===t||"middle"===t}function yu(t,e,n){var i,r={},o="toggleSelected"===t;return n.eachComponent("legend",function(n){o&&null!=i?n[i?"select":"unSelect"](e.name):(n[t](e.name),i=n.isSelected(e.name)),d(n.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&i:r[e]=i}})}),{name:e.name,selected:r}}function xu(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Fr(i,o,r);Wv(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Gr(t,i,o,r)}function _u(t,e){var n=Ov(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new lv({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}function wu(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function bu(t,e,n){var i=n.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||t.get("legendHoverLink")&&n.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function Su(t,e,n){var i=n.getZr().storage.getDisplayList()[0];i&&i.useHoverLayer||t.get("legendHoverLink")&&n.dispatchAction({type:"downplay",seriesName:t.name,name:e})}function Mu(t,e,n){var i=[1,1];i[t.getOrient().index]=0,Hr(e,n,{type:"box",ignoreSize:i})}function Iu(t){_n(t,"label",["show"])}function Tu(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function Cu(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Au(t,e,n){var i=-1;do{i=Math.max(br(t.get(e,n)),i),t=t.stackedOn}while(t);return i}function Du(t,e,n,i,r,o){var a=[],s=Eu(e,i,t),l=e.indicesOfNearest(i,s,!0)[0];a[r]=e.get(n,l,!0),a[o]=e.get(i,l,!0);var h=Au(e,i,l);return(h=Math.min(h,20))>=0&&(a[o]=+a[o].toFixed(h)),a}function ku(t,e){var i=t.getData(),r=t.coordinateSystem;if(e&&!Cu(e)&&!y(e.coord)&&r){var o=r.dimensions,a=Pu(e,i,r,t);if((e=n(e)).type&&vb[e.type]&&a.baseAxis&&a.valueAxis){var s=gb(o,a.baseAxis.dim),l=gb(o,a.valueAxis.dim);e.coord=vb[e.type](i,a.baseDataDim,a.valueDataDim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)vb[h[u]]&&(h[u]=Eu(i,i.mapDimension(o[u]),h[u]));e.coord=h}}return e}function Pu(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(Lu(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function Lu(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0}function sc(t,e,n){function i(t,e){return l(e.nodes,t)>=0}function r(t,i){var r=!1;return e(function(e){d(n(t,e)||[],function(t){i.records[e.name][t]&&(r=!0)})}),r}function o(t,i){i.nodes.push(t),e(function(e){d(n(t,e)||[],function(t){i.records[e.name][t]=!0})})}return function(n){var a={nodes:[],records:{}};if(e(function(t){a.records[t.name]={}}),!n)return a;o(n,a);var s;do{s=!1,t(function(t){!i(t,a)&&r(t,a)&&(o(t,a),s=!0)})}while(s);return a}}function lc(t,e,n){var i=[1/0,-1/0];return kb(n,function(t){var n=t.getData();n&&kb(n.mapDimension(e,!0),function(t){var e=n.getApproximateExtent(t);e[0]i[1]&&(i[1]=e[1])})}),i[1]0?0:NaN);var a=n.getMax(!0);return null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:NaN),n.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function uc(t,e){var n=t.getAxisModel(),i=t._percentWindow,r=t._valueWindow;if(i){var o=Mr(r,[0,500]);o=Math.min(o,20);var a=e||0===i[0]&&100===i[1];n.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function cc(t){var e=t._minMaxSpan={},n=t._dataZoomModel;kb(["min","max"],function(i){e[i+"Span"]=n.get(i+"Span");var r=n.get(i+"ValueSpan");if(null!=r&&(e[i+"ValueSpan"]=r,null!=(r=t.getAxisModel().axis.scale.parse(r)))){var o=t._dataExtent;e[i+"Span"]=yr(o[0]+r,o,[0,100],!0)}})}function dc(t){var e={};return Ob(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}function fc(t,e){var n=t._rangePropMode,i=t.get("rangeMode");Ob([["start","startValue"],["end","endValue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?n[r]="percent":!o&&a?n[r]="value":i?n[r]=i[r]:o&&(n[r]="percent")})}function pc(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function gc(t,e){return Math.min(e[1],Math.max(e[0],t))}function mc(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function vc(t){return"vertical"===t?"ns-resize":"ew-resize"}function yc(t,e,n){wc(t)[e]=n}function xc(t,e,n){var i=wc(t);i[e]===n&&(i[e]=null)}function _c(t,e){return!!wc(t)[e]}function wc(t){return t[jb]||(t[jb]={})}function bc(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,i=e(Sc,this),r=e(Mc,this),o=e(Ic,this),s=e(Tc,this),l=e(Cc,this);dp.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=a(n(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Sc(t){if(!(sn(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function Mc(t){if(!sn(t)&&Dc(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!_c(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&bg(t.event),this.trigger("pan",o,a,i,r,e,n)}}function Ic(t){sn(t)||(this._dragging=!1)}function Tc(t){if(Dc(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;Ac.call(this,t,e,t.offsetX,t.offsetY)}}function Cc(t){if(!_c(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Ac.call(this,t,e,t.pinchX,t.pinchY)}}function Ac(t,e,n,i){this.pointerChecker&&this.pointerChecker(t,n,i)&&(bg(t.event),this.trigger("zoom",e,n,i))}function Dc(t,e,n){var i=t._opt[e];return i&&(!_(i)||n.event[i+"Key"])}function kc(t,e){var n=zc(t),i=e.dataZoomId,r=e.coordId;d(n,function(t,n){var o=t.dataZoomInfos;o[i]&&l(e.allCoordIds,r)<0&&(delete o[i],t.count--)}),Rc(n);var o=n[r];o||((o=n[r]={coordId:r,dataZoomInfos:{},count:0}).controller=Ec(t,o),o.dispatchAction=v(Fc,t)),!o.dataZoomInfos[i]&&o.count++,o.dataZoomInfos[i]=e;var a=Gc(o.dataZoomInfos);o.controller.enable(a.controlType,a.opt),o.controller.setPointerChecker(e.containsPoint),sa(o,"dispatchAction",e.throttleRate,"fixRate")}function Pc(t,e){var n=zc(t);d(n,function(t){t.controller.dispose();var n=t.dataZoomInfos;n[e]&&(delete n[e],t.count--)}),Rc(n)}function Lc(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var n=0,i=t.batch.length;ni["type_"+e]&&(e=r),o(n,t.roamControllerOpt)}),{controlType:e,opt:n}}function Hc(t,e){Jb[t]=e}function Wc(t){return Jb[t]}function Zc(t){return 0===t.indexOf("my")}function Uc(t){this.model=t}function Xc(t){this.model=t}function jc(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}function Yc(t){var e=[];return d(t,function(t,n){var i=t.categoryAxis,r=t.valueAxis.dim,o=[" "].concat(f(t.series,function(t){return t.name})),a=[i.model.getCategories()];d(t.series,function(t){a.push(t.getRawData().mapArray(r,function(t){return t}))});for(var s=[o.join(lS)],l=0;l=0)return!0}function Jc(t){for(var e=t.split(/\n+/g),n=[],i=f(Kc(e.shift()).split(hS),function(t){return{name:t,data:[]}}),r=0;rvS}function yd(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function xd(t,e,n,i){var r=new Xp;return r.add(new lv({name:"main",style:Sd(n),silent:!0,draggable:!0,cursor:"move",drift:uS(t,e,r,"nswe"),ondragend:uS(md,e,{isEnd:!0})})),cS(i,function(n){r.add(new lv({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:uS(t,e,r,n),ondragend:uS(md,e,{isEnd:!0})}))}),r}function _d(t,e,n,i){var r=i.brushStyle.lineWidth||0,o=pS(r,yS),a=n[0][0],s=n[1][0],l=a-r/2,h=s-r/2,u=n[0][1],c=n[1][1],d=u-o+r/2,f=c-o+r/2,p=u-a,g=c-s,m=p+r,v=g+r;bd(t,e,"main",a,s,p,g),i.transformable&&(bd(t,e,"w",l,h,o,v),bd(t,e,"e",d,h,o,v),bd(t,e,"n",l,h,m,o),bd(t,e,"s",l,f,m,o),bd(t,e,"nw",l,h,o,o),bd(t,e,"ne",d,h,o,o),bd(t,e,"sw",l,f,o,o),bd(t,e,"se",d,f,o,o))}function wd(t,e){var n=e.__brushOption,i=n.transformable,r=e.childAt(0);r.useStyle(Sd(n)),r.attr({silent:!i,cursor:i?"move":"default"}),cS(["w","e","n","s","se","sw","ne","nw"],function(n){var r=e.childOfName(n),o=Td(t,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?wS[o]+"-resize":null})})}function bd(t,e,n,i,r,o,a){var s=e.childOfName(n);s&&s.setShape(Pd(kd(t,e,[[i,r],[i+o,r+a]])))}function Sd(t){return a({strokeNoScale:!0},t.brushStyle)}function Md(t,e,n,i){var r=[fS(t,n),fS(e,i)],o=[pS(t,n),pS(e,i)];return[[r[0],o[0]],[r[1],o[1]]]}function Id(t){return sr(t.group)}function Td(t,e){if(e.length>1)return("e"===(i=[Td(t,(e=e.split(""))[0]),Td(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var n={left:"w",right:"e",top:"n",bottom:"s"},i=hr({w:"left",e:"right",n:"top",s:"bottom"}[e],Id(t));return n[i]}function Cd(t,e,n,i,r,o,a,s){var l=i.__brushOption,h=t(l.range),u=Dd(n,o,a);cS(r.split(""),function(t){var e=_S[t];h[e[0]][e[1]]+=u[e[0]]}),l.range=e(Md(h[0][0],h[1][0],h[0][1],h[1][1])),cd(n,i),md(n,{isEnd:!1})}function Ad(t,e,n,i,r){var o=e.__brushOption.range,a=Dd(t,n,i);cS(o,function(t){t[0]+=a[0],t[1]+=a[1]}),cd(t,e),md(t,{isEnd:!1})}function Dd(t,e,n){var i=t.group,r=i.transformCoordToLocal(e,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function kd(t,e,i){var r=pd(t,e);return r&&!0!==r?r.clipPath(i,t._transform):n(i)}function Pd(t){var e=fS(t[0][0],t[1][0]),n=fS(t[0][1],t[1][1]);return{x:e,y:n,width:pS(t[0][0],t[1][0])-e,height:pS(t[0][1],t[1][1])-n}}function Ld(t,e,n){if(t._brushType){var i=t._zr,r=t._covers,o=fd(t,e,n);if(!t._dragging)for(var a=0;a=0)&&t(o,i,r)})}function Ud(t){return t[0]>t[1]&&t.reverse(),t}function Xd(t,e){return An(t,e,{includeMainTypes:PS})}function jd(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=Ud(f([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}function Yd(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function qd(t,e){var n=$d(t),i=$d(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}function $d(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function Kd(t,e){var n=ef(t);BS(e,function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}}),n.push(e)}function Qd(t){var e=ef(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return BS(n,function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}}),i}function Jd(t){t[VS]=null}function tf(t){return ef(t).length}function ef(t){var e=t[VS];return e||(e=t[VS]=[{}]),e}function nf(t,e,n){(this._brushController=new rd(n.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function rf(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(n){e[n]=t[n],null==e[n]&&(e[n]="all"),(!1===e[n]||"none"===e[n])&&(e[n]=[])}),e}function of(t,e){t.setIconStatus("back",tf(e)>1?"emphasis":"normal")}function af(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Zd(rf(t.option),e,{include:["grid"]});n._brushController.setPanels(a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!o&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function sf(t){this.model=t}function lf(t){return XS(t)}function hf(){if(!qS&&$S){qS=!0;var t=$S.styleSheets;t.length<31?$S.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function uf(t){return parseInt(t,10)}function cf(t,e){hf(),this.root=t,this.storage=e;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",t.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var r=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(i)},e.addToStorage=function(t){t.onAdd&&t.onAdd(i),o.call(e,t)},this._firstPaint=!0}function df(t){return function(){Fp('In IE8.0 VML mode painter not support method "'+t+'"')}}function ff(t){return document.createElementNS(kM,t)}function pf(t){return zM(1e4*t)/1e4}function gf(t){return t-FM}function mf(t,e){var n=e?t.textFill:t.fill;return null!=n&&n!==OM}function vf(t,e){var n=e?t.textStroke:t.stroke;return null!=n&&n!==OM}function yf(t,e){e&&xf(t,"transform","matrix("+LM.call(e,",")+")")}function xf(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function _f(t,e,n){t.setAttributeNS("http://www.w3.org/1999/xlink",e,n)}function wf(t,e,n){if(mf(e,n)){var i=n?e.textFill:e.fill;i="transparent"===i?OM:i,"none"!==t.getAttribute("clip-path")&&i===OM&&(i="rgba(0, 0, 0, 0.002)"),xf(t,"fill",i),xf(t,"fill-opacity",e.opacity)}else xf(t,"fill",OM);if(vf(e,n)){var r=n?e.textStroke:e.stroke;xf(t,"stroke",r="transparent"===r?OM:r),xf(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?e.host.getLineScale():1)),xf(t,"paint-order",n?"stroke":"fill"),xf(t,"stroke-opacity",e.opacity),e.lineDash?(xf(t,"stroke-dasharray",e.lineDash.join(",")),xf(t,"stroke-dashoffset",zM(e.lineDashOffset||0))):xf(t,"stroke-dasharray",""),e.lineCap&&xf(t,"stroke-linecap",e.lineCap),e.lineJoin&&xf(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&xf(t,"stroke-miterlimit",e.miterLimit)}else xf(t,"stroke",OM)}function bf(t){for(var e=[],n=t.data,i=t.len(),r=0;r=BM||!gf(g)&&(d>-NM&&d<0||d>NM)==!!p;var y=pf(s+h*RM(c)),x=pf(l+u*EM(c));m&&(d=p?BM-1e-4:1e-4-BM,v=!0,9===r&&e.push("M",y,x));var _=pf(s+h*RM(c+d)),w=pf(l+u*EM(c+d));e.push("A",pf(h),pf(u),zM(f*VM),+v,+p,_,w);break;case PM.Z:o="Z";break;case PM.R:var _=pf(n[r++]),w=pf(n[r++]),b=pf(n[r++]),S=pf(n[r++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}o&&e.push(o);for(var M=0;M=11)}}(navigator.userAgent),Uf={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Xf={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},jf=Object.prototype.toString,Yf=Array.prototype,qf=Yf.forEach,$f=Yf.filter,Kf=Yf.slice,Qf=Yf.map,Jf=Yf.reduce,tp={},ep=function(){return tp.createCanvas()};tp.createCanvas=function(){return document.createElement("canvas")};var np,ip="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var n in this)this.hasOwnProperty(n)&&t(this[n],n)},removeKey:function(t){delete this[t]}};var rp=(Object.freeze||Object)({$override:e,clone:n,merge:i,mergeAll:r,extend:o,defaults:a,createCanvas:ep,getContext:s,indexOf:l,inherits:h,mixin:u,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,n){if(t&&e)for(var i=0,r=t.length;i3&&(e=cp.call(e,1));for(var i=this._$handlers[t],r=i.length,o=0;o4&&(e=cp.call(e,1,e.length-1));for(var i=e[e.length-1],r=this._$handlers[t],o=r.length,a=0;a=0;o--){var a;if(i[o]!==n&&!i[o].ignore&&(a=it(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==fp)){r.target=i[o];break}}return r}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){gp.prototype[t]=function(e){var n=this.findHover(e.zrX,e.zrY),i=n.target;if("mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||lp(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),u(gp,dp),u(gp,J);var mp="undefined"==typeof Float32Array?Array:Float32Array,vp=(Object.freeze||Object)({create:rt,identity:ot,copy:at,mul:st,translate:lt,rotate:ht,scale:ut,invert:ct,clone:function(t){var e=rt();return at(e,t),e}}),yp=ot,xp=5e-5,_p=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},wp=_p.prototype;wp.transform=null,wp.needLocalTransform=function(){return dt(this.rotation)||dt(this.position[0])||dt(this.position[1])||dt(this.scale[0]-1)||dt(this.scale[1]-1)},wp.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||rt(),n?this.getLocalTransform(i):yp(i),e&&(n?st(i,t.transform,i):at(i,t.transform)),this.transform=i,this.invTransform=this.invTransform||rt(),ct(this.invTransform,i)):i&&yp(i)},wp.getLocalTransform=function(t){return _p.getLocalTransform(this,t)},wp.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},wp.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var bp=[];wp.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(st(bp,t.invTransform,e),e=bp);var n=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=this.position,o=this.scale;dt(n-1)&&(n=Math.sqrt(n)),dt(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(n=-n),e[3]<0&&(i=-i),r[0]=e[4],r[1]=e[5],o[0]=n,o[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/n)}},wp.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),n=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(n=-n),[e,n]},wp.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&$(n,n,i),n},wp.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&$(n,n,i),n},_p.getLocalTransform=function(t,e){yp(e=e||[]);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),ut(e,e,i),r&&ht(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=o[0],e[5]+=o[1],e};var Sp={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Sp.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Sp.bounceIn(2*t):.5*Sp.bounceOut(2*t-1)+.5}};ft.prototype={constructor:ft,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Sp[i]:i,o="function"==typeof r?r(n):n;return this.fire("frame",o),1==n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Mp=function(){this.head=null,this.tail=null,this._len=0},Ip=Mp.prototype;Ip.insert=function(t){var e=new Tp(t);return this.insertEntry(e),e},Ip.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ip.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Ip.len=function(){return this._len},Ip.clear=function(){this.head=this.tail=null,this._len=0};var Tp=function(t){this.value=t,this.next,this.prev},Cp=function(t){this._list=new Mp,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Ap=Cp.prototype;Ap.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Tp(e),a.key=t,n.insertEntry(a),i[t]=a}return r},Ap.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},Ap.clear=function(){this._list.clear(),this._map={}};var Dp={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},kp=new Cp(20),Pp=null,Lp=Dt,Op=kt,zp=(Object.freeze||Object)({parse:Mt,lift:Ct,toHex:At,fastLerp:Dt,fastMapToColor:Lp,lerp:kt,mapToColor:Op,modifyHSL:function(t,e,n,i){if(t=Mt(t))return t=Tt(t),null!=e&&(t[0]=gt(e)),null!=n&&(t[1]=yt(n)),null!=i&&(t[2]=yt(i)),Lt(It(t),"rgba")},modifyAlpha:Pt,stringify:Lt}),Ep=Array.prototype.slice,Rp=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Ot,this._setter=i||zt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Rp.prototype={when:function(t,e){var n=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==t&&n[i].push({time:0,value:Ht(r)})}n[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t0&&this.animate(t,!1).when(null==i?500:i,o).delay(r||0),this}};var Hp=function(t){_p.call(this,t),dp.call(this,t),Gp.call(this,t),this.id=t.id||Hf()};Hp.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var n=this[t];n||(n=this[t]=[]),n[0]=e[0],n[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(w(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new Xt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Xt.create=function(t){return new Xt(t.x,t.y,t.width,t.height)};var Xp=function(t){t=t||{},Hp.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Xp.prototype={constructor:Xp,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Xp&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,r=l(i,t);return r<0?this:(i.splice(r,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof Xp&&t.delChildrenFromStorage(n)),e&&e.refresh(),this)},removeAll:function(){var t,e,n=this._children,i=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Xp&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:ee};var $p={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Kp=function(t,e,n){return $p.hasOwnProperty(e)?n*=t.dpr:n},Qp=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Jp=function(t,e){this.extendFrom(t,!1),this.host=e};Jp.prototype={constructor:Jp,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){for(var i=this,r=n&&n.style,o=!r,a=0;a0},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?ie:ne)(t,e,n),r=e.colorStops,o=0;o=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n15)break}s.__drawIndex=g,s.__drawIndex0&&t>i[0]){for(a=0;at);a++);o=n[i[a]]}if(i.splice(a+1,0,t),n[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Fp("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i0?.01:0),this._needsManuallyCompositing),o.__builtin__||Fp("ZLevel "+s+" has been used by unkown layer "+o.id),o!==n&&(o.__used=!0,o.__startIndex!==r&&(o.__dirty=!0),o.__startIndex=r,o.incremental?o.__drawIndex=-1:o.__drawIndex=r,e(r),n=o),a.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?i(n[t],e,!0):n[t]=e;for(var r=0;r=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n1&&i&&i.length>1){var o=ln(i)/ln(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=hn(i);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},Tg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Cg=["touchstart","touchend","touchmove"],Ag={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Dg=f(Tg,function(t){var e=t.replace("mouse","pointer");return Ag[e]?e:t}),kg={mousemove:function(t){t=rn(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=rn(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=rn(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,cn(this,t,"start"),kg.mousemove.call(this,t),kg.mousedown.call(this,t),dn(this)},touchmove:function(t){(t=rn(this.dom,t)).zrByTouch=!0,cn(this,t,"change"),kg.mousemove.call(this,t),dn(this)},touchend:function(t){(t=rn(this.dom,t)).zrByTouch=!0,cn(this,t,"end"),kg.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&kg.click.call(this,t),dn(this)},pointerdown:function(t){kg.mousedown.call(this,t)},pointermove:function(t){fn(t)||kg.mousemove.call(this,t)},pointerup:function(t){kg.mouseup.call(this,t)},pointerout:function(t){fn(t)||kg.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){kg[t]=function(e){e=rn(this.dom,e),this.trigger(t,e)}});var Pg=gn.prototype;Pg.dispose=function(){for(var t=Tg.concat(Cg),e=0;e=0||i&&l(i,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},jg=Xg([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Yg={getLineStyle:function(t){var e=jg(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},qg=Xg([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),$g={getAreaStyle:function(t,e){return qg(this,t,e)}},Kg=Math.pow,Qg=Math.sqrt,Jg=1e-8,tm=1e-4,em=Qg(3),nm=1/3,im=B(),rm=B(),om=B(),am=Math.min,sm=Math.max,lm=Math.sin,hm=Math.cos,um=2*Math.PI,cm=B(),dm=B(),fm=B(),pm=[],gm=[],mm={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},vm=[],ym=[],xm=[],_m=[],wm=Math.min,bm=Math.max,Sm=Math.cos,Mm=Math.sin,Im=Math.sqrt,Tm=Math.abs,Cm="undefined"!=typeof Float32Array,Am=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Am.prototype={constructor:Am,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Tm(1/Bp/t)||0,this._uy=Tm(1/Bp/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(mm.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Tm(t-this._xi)>this._ux||Tm(e-this._yi)>this._uy||this._len<5;return this.addData(mm.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,o){return this.addData(mm.C,t,e,n,i,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,n,i){return this.addData(mm.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,o){return this.addData(mm.A,t,e,n,n,i,r-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Sm(r)*n+t,this._yi=Mm(r)*n+t,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(mm.R,t,e,n,i),this},closePath:function(){this.addData(mm.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;n0&&f<=t||u<0&&f>=t||0==u&&(c>0&&p<=e||c<0&&p>=e);)f+=u*(n=a[i=this._dashIdx]),p+=c*n,this._dashIdx=(i+1)%g,u>0&&fl||c>0&&ph||s[i%2?"moveTo":"lineTo"](u>=0?wm(f,t):bm(f,t),c>=0?wm(p,e):bm(p,e));u=f-t,c=p-e,this._dashOffset=-Im(u*u+c*c)},_dashedBezierTo:function(t,e,n,i,r,o){var a,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Gn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,a=0;a<1;a+=.1)s=v(g,t,n,r,a+.1)-v(g,t,n,r,a),l=v(m,e,i,o,a+.1)-v(m,e,i,o,a),y+=Im(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(a=(w-d)/y;a<=1;)h=v(g,t,n,r,a),u=v(m,e,i,o,a),x%2?p.moveTo(h,u):p.lineTo(h,u),a+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,o),s=r-h,l=o-u,this._dashOffset=-Im(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Cm&&(this.data=new Float32Array(t)))},getBoundingRect:function(){vm[0]=vm[1]=xm[0]=xm[1]=Number.MAX_VALUE,ym[0]=ym[1]=_m[0]=_m[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,o=0;ol||Tm(a-r)>h||c===u-1)&&(t.lineTo(o,a),i=o,r=a);break;case mm.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case mm.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case mm.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1==c&&(e=Sm(v)*g+f,n=Mm(v)*m+p),i=Sm(M)*g+f,r=Mm(M)*m+p;break;case mm.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case mm.Z:t.closePath(),i=e,r=n}}}},Am.CMD=mm;var Dm=2*Math.PI,km=2*Math.PI,Pm=Am.CMD,Lm=2*Math.PI,Om=1e-4,zm=[-1,-1,-1],Em=[-1,-1],Rm=ig.prototype.getCanvasPattern,Nm=Math.abs,Bm=new Am(!0);yi.prototype={constructor:yi,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n=this.style,i=this.path||Bm,r=n.hasStroke(),o=n.hasFill(),a=n.fill,s=n.stroke,l=o&&!!a.colorStops,h=r&&!!s.colorStops,u=o&&!!a.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=n.getGradient(t,a,d)),h&&(d=d||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=Rm.call(a,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Rm.call(s,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();i.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&r?(i.beginPath(t),f&&!g&&(i.setLineDash(f),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o&&i.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),r&&i.stroke(t),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new Am},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Am),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||n){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),vi(o,a/s,t,e)))return!0}if(r.hasFill())return mi(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Xe.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(w(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Nm(t[0]-1)>1e-10&&Nm(t[3]-1)>1e-10?Math.sqrt(Nm(t[0]*t[3]-t[2]*t[1])):1}},yi.extend=function(t){var e=function(e){yi.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var n=t.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}t.init&&t.init.call(this,e)};h(e,yi);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},h(yi,Xe);var Vm=Am.CMD,Fm=[[],[],[]],Gm=Math.sqrt,Hm=Math.atan2,Wm=function(t,e){var n,i,r,o,a,s,l=t.data,h=Vm.M,u=Vm.C,c=Vm.L,d=Vm.R,f=Vm.A,p=Vm.Q;for(r=0,o=0;r=11?function(){var e,n=this.__clipPaths,i=this.style;if(n)for(var r=0;rn-2?n-1:c+1],h=t[c>n-3?n-1:c+2]);var p=d*d,g=d*p;i.push([Mi(s[0],f[0],l[0],h[0],d,p,g),Mi(s[1],f[1],l[1],h[1],d,p,g)])}return i},ov=function(t,e,n,i){var r,o,a,s,l=[],h=[],u=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}},createIcon:dr,Group:Xp,Image:je,Text:Qm,Circle:Jm,Sector:nv,Ring:iv,Polygon:av,Polyline:sv,Rect:lv,Line:hv,BezierCurve:cv,Arc:dv,IncrementalDisplayable:Ci,CompoundPath:fv,LinearGradient:gv,RadialGradient:mv,BoundingRect:Xt}),Sv=["textStyle","color"],Mv={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Sv):null)},getFont:function(){return ir({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ce(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Iv=Xg([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Tv={getItemStyle:function(t,e){var n=Iv(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Cv=u,Av=Cn();fr.prototype={constructor:fr,init:null,mergeOption:function(t){i(this.option,t,!0)},get:function(t,e){return null==t?this.option:pr(this.option,this.parsePath(t),!e&&gr(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&gr(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n,i=null==t?this.option:pr(this.option,t=this.parsePath(t));return e=e||(n=gr(this,t))&&n.getModel(t),new fr(i,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(n(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Av(this).getParent=t},isAnimationEnabled:function(){if(!Zf.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},zn(fr),En(fr),Cv(fr,Yg),Cv(fr,$g),Cv(fr,Mv),Cv(fr,Tv);var Dv=0,kv=1e-4,Pv=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Lv=(Object.freeze||Object)({linearMap:yr,parsePercent:xr,round:_r,asc:wr,getPrecision:br,getPrecisionSafe:Sr,getPixelPrecision:Mr,getPercentWithPrecision:Ir,MAX_SAFE_INTEGER:9007199254740991,remRadian:Tr,isRadianAroundZero:Cr,parseDate:Ar,quantity:Dr,nice:Pr,reformIntervals:function(t){function e(t,n,i){return t.interval[i]=0}}),Ov=k,zv=["a","b","c","d","e","f","g"],Ev=function(t,e){return"{"+t+(null==e?"":e)+"}"},Rv=function(t){return t<10?"0"+t:t},Nv=ve,Bv=ce,Vv=(Object.freeze||Object)({addCommas:Lr,toCamelCase:Or,normalizeCssArray:Ov,encodeHTML:zr,formatTpl:Er,formatTplSimple:function(t,e,n){return d(e,function(e,i){t=t.replace("{"+i+"}",n?zr(e):e)}),t},getTooltipMarker:Rr,formatTime:Nr,capitalFirst:Br,truncateText:Nv,getTextRect:Bv}),Fv=d,Gv=["left","right","top","bottom","width","height"],Hv=[["width","left","right"],["height","top","bottom"]],Wv=Vr,Zv=(v(Vr,"vertical"),v(Vr,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),Uv=Cn(),Xv=fr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){fr.call(this,t,e,n,i),this.uid=mr("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,r=n?Wr(t):{};i(t,e.getTheme().get(this.mainType)),i(t,this.getDefaultOption()),n&&Hr(t,r,n)},mergeOption:function(t,e){i(this.option,t,!0);var n=this.layoutMode;n&&Hr(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Uv(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var r=n.prototype.defaultOption;r&&e.push(r),n=n.superClass}for(var o={},a=e.length-1;a>=0;a--)o=i(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Bn(Xv,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){t=Ln(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Ln(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Xv),function(t,e){function n(t){var n={},o=[];return d(t,function(a){var s=i(n,a),h=r(s.originalDeps=e(a),t);s.entryCount=h.length,0===s.entryCount&&o.push(a),d(h,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=i(n,t);l(e.successor,t)<0&&e.successor.push(a)})}),{graph:n,noEntryList:o}}function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var n=[];return d(t,function(t){l(e,t)>=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function o(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var a=n(e),s=a.graph,l=a.noEntryList,h={};for(d(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],f=!!h[u];f&&(i.call(r,u,c.originalDeps.slice()),delete h[u]),d(c.successor,f?function(t){h[t]=!0,o(t)}:o)}d(h,function(){throw new Error("Circle dependency may exists")})}}}(Xv,function(t){var e=[];return d(Xv.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Ln(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),u(Xv,Zv);var jv="";"undefined"!=typeof navigator&&(jv=navigator.platform||"");var Yv={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:jv.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},qv=Cn(),$v={clearColorPalette:function(){qv(this).colorIdx=0,qv(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=qv(e=e||this),r=i.colorIdx||0,o=i.colorNameMap=i.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=xn(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?Ur(s,n):a;if((l=l||a)&&l.length){var h=l[r];return t&&(o[t]=h),i.colorIdx=(r+1)%l.length,h}}},Kv={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),jr(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),jr(o)&&(i.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),jr(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),jr(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),jr(a)&&(i.set("angle",a),e.firstCategoryDimIndex=1)},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();d(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),jr(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=o)})}},Qv="original",Jv="arrayRows",ty="objectRows",ey="keyedColumns",ny="unknown",iy="typedArray",ry="column",oy="row";Yr.seriesDataToSource=function(t){return new Yr({data:t,sourceFormat:S(t)?iy:Qv,fromDataset:!1})},En(Yr);var ay=Cn(),sy="\0_ec_inner",ly=fr.extend({constructor:ly,init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new fr(n),this._optionManager=i},setOption:function(t,e){P(!(sy in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,n=this._optionManager;if(!t||"recreate"===t){var i=n.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(i)):ho.call(this,i),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=n.getMediaOption(this,this._api);o.length&&d(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];Kr(this),d(t,function(t,r){null!=t&&(Xv.hasClass(r)?r&&a.push(r):e[r]=null==e[r]?n(t):i(e[r],t,!0))}),Xv.topologicalTravel(a,Xv.getAllClassMainTypes(),function(n,i){var a=xn(t[n]),s=Sn(r.get(n),a);Mn(s),d(s,function(t,e){var i=t.option;w(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=co(n,i,t.exist))});var l=uo(r,i);e[n]=[],r.set(n,[]),d(s,function(t,i){var a=t.exist,s=t.option;if(P(w(s)||a,"Empty component definition"),s){var h=Xv.getClass(n,t.keyInfo.subType,!0);if(a&&a instanceof h)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var u=o({dependentModels:l,componentIndex:i},t.keyInfo);o(a=new h(s,this,this,u),u),a.init(s,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);r.get(n)[i]=a,e[n][i]=a.option},this),"series"===n&&fo(this,r.get("series"))},this),this._seriesIndicesMap=R(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return d(t,function(e,n){if(Xv.hasClass(n)){for(var i=(e=xn(e)).length-1;i>=0;i--)In(e[i])&&e.splice(i,1);t[n]=e}}),delete t[sy],t},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n=t.index,i=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var a;if(null!=n)y(n)||(n=[n]),a=g(f(n,function(t){return o[t]}),function(t){return!!t});else if(null!=i){var s=y(i);a=g(o,function(t){return s&&l(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var h=y(r);a=g(o,function(t){return h&&l(r,t.name)>=0||!h&&t.name===r})}else a=o.slice();return po(a,t)},findComponents:function(t){var e=t.query,n=t.mainType,i=function(t){var e=n+"Index",i=n+"Id",r=n+"Name";return!t||null==t[e]&&null==t[i]&&null==t[r]?null:{mainType:n,index:t[e],id:t[i],name:t[r]}}(e);return function(e){return t.filter?g(e,t.filter):e}(po(i?this.queryComponents(i):this._componentsMap.get(n),t))},eachComponent:function(t,e,n){var i=this._componentsMap;"function"==typeof t?(n=e,e=t,i.each(function(t,i){d(t,function(t,r){e.call(n,i,t,r)})})):_(t)?d(i.get(t),e,n):w(t)&&d(this.findComponents(t),e,n)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){d(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===t&&e.call(n,r,i)},this)},eachRawSeriesByType:function(t,e,n){return d(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){fo(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;fo(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),Xv.topologicalTravel(n,Xv.getAllClassMainTypes(),function(n,i){d(e.get(n),function(e){("series"!==n||!so(e,t))&&e.restoreData()})})}});u(ly,$v);var hy=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],uy={};mo.prototype={constructor:mo,create:function(t,e){var n=[];d(uy,function(i,r){var o=i.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},update:function(t,e){d(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},mo.register=function(t,e){uy[t]=e},mo.get=function(t){return uy[t]};var cy=d,dy=n,fy=f,py=i,gy=/^(min|max)?(.+)$/;vo.prototype={constructor:vo,setOption:function(t,e){t&&d(xn(t.series),function(t){t&&t.data&&S(t.data)&&O(t.data)}),t=dy(t,!0);var n=this._optionBackup,i=yo.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(bo(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=fy(e.timelineOptions,dy),this._mediaList=fy(e.mediaList,dy),this._mediaDefault=dy(e.mediaDefault),this._currentMediaIndices=[],dy(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=dy(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,o=[],a=[];if(!i.length&&!r)return a;for(var s=0,l=i.length;s1||l&&!a?function(n){function i(t,n){var i=r.getDimensionInfo(n);if(i&&!1!==i.otherDims.tooltip){var o=i.type,l=Rr({color:h,type:"subItem"}),u=(a?l+zr(i.displayName||"-")+": ":"")+zr("ordinal"===o?t+"":"time"===o?e?"":Nr("yyyy/MM/dd hh:mm:ss",t):Lr(t));u&&s.push(u)}}var a=p(n,function(t,e,n){var i=r.getDimensionInfo(n);return t|=i&&!1!==i.tooltip&&null!=i.displayName},0),s=[];return o.length?d(o,function(e){i(Go(r,t,e),e)}):d(n,i),(a?"
":"")+s.join(a?"
":", ")}(s):i(a?Go(r,t,o[0]):l?s[0]:s),c=Rr(h),f=r.getName(t),g=this.name;return g===Fg&&(g=""),g=g?zr(g)+(e?": ":"
"):"",e?c+g+u:g+c+(f?zr(f)+": "+u:u)},isAnimationEnabled:function(){if(Zf.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=$v.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});u(Py,Ay),u(Py,$v);var Ly=function(){this.group=new Xp,this.uid=mr("viewComponent")};Ly.prototype={constructor:Ly,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){}};var Oy=Ly.prototype;Oy.updateView=Oy.updateLayout=Oy.updateVisual=function(t,e,n,i){},zn(Ly),Bn(Ly,{registerWhenExtend:!0});var zy=function(){var t=Cn();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,o=n.incrementalRender,a=n.large=i.large,s=n.incrementalRender=i.incrementalRender;return(r^a||o^s)&&"reset"}},Ey=Cn(),Ry=zy();ta.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){na(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){na(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var Ny=ta.prototype;Ny.updateView=Ny.updateLayout=Ny.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},zn(ta),Bn(ta,{registerWhenExtend:!0}),ta.markUpdateMethod=function(t,e){Ey(t).updateMethod=e};var By="\0__throttleOriginMethod",Vy="\0__throttleRate",Fy="\0__throttleType",Gy={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(i)||t.getColorFromPalette(t.get("name"),null,e.getSeriesCount());if(n.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof pv||n.each(function(e){n.setItemVisual(e,"color",r(t.getDataParams(e)))});return{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}}},Hy={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},Wy=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return d(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=o.get(t);if(null==e){for(var n=t.split("."),i=Hy.aria,r=0;r1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:a}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";o=n(o=i(s?h+"withName":h+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:r(t.subType)});var c=t.getData();window.data=c,c.count()>l?o+=n(i("data.partialData"),{displayCnt:l}):o+=i("data.allData");for(var d=[],p=0;pn.bockIndex?n.step:null}}},Uy.getPipeline=function(t){return this._pipelineMap.get(t)},Uy.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold");t.pipelineContext=n.context={incrementalRender:r,large:o}},Uy.restorePipelines=function(t){var e=this,n=e._pipelineMap=R();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),bockIndex:-1,step:i||700,count:0}),wa(e,t,t.dataTask)})},Uy.prepareStageTasks=function(t,e){var n=this._stageTaskMap,i=this.ecInstance.getModel(),r=this.api;d(t,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&ca(this,t,e,i,r),t.overallReset&&da(this,t,e,i,r)},this)},Uy.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,wa(this,e,r)},Uy.performDataProcessorTasks=function(t,e,n){ua(this,t,e,n,{block:!0})},Uy.performVisualTasks=function(t,e,n,i){ua(this,t,e,n,i)},Uy.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Uy.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.bockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Xy=Uy.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};ha.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:ba(t)}),t.uid=mr("stageHandler"),e&&(t.visualType=e),t};var jy,Yy={},qy={};Sa(Yy,ly),Sa(qy,go),Yy.eachSeriesByType=Yy.eachRawSeriesByType=function(t){jy=t},Yy.eachComponent=function(t){"series"===t.mainType&&t.subType&&(jy=t.subType)};var $y=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Ky={color:$y,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$y]},Qy=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Jy={color:Qy,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Qy[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Qy},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Jy.categoryAxis.splitLine.show=!1;var tx=P,ex=d,nx=x,ix=w,rx=Xv.parseClassType,ox={zrender:"4.0.1"},ax=1e3,sx=1e3,lx=3e3,hx={PROCESSOR:{FILTER:ax,STATISTIC:5e3},VISUAL:{LAYOUT:sx,GLOBAL:2e3,CHART:lx,COMPONENT:4e3,BRUSH:5e3}},ux="__flagInMainProcess",cx="__optionUpdated",dx=/^[a-zA-Z0-9_]+$/;Ia.prototype.on=Ma("on"),Ia.prototype.off=Ma("off"),Ia.prototype.one=Ma("one"),u(Ia,dp);var fx=Ta.prototype;fx._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[cx]){var e=this[cx].silent;this[ux]=!0,Aa(this),px.update.call(this),this[ux]=!1,this[cx]=!1,Oa.call(this,e),za.call(this,e)}else if(t.unfinished){var n=1,i=this._model;this._api;t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(yx,i),Pa(this,i),t.performVisualTasks(bx,i),Fa(this,this._model,0,"remain"),n-=+new Date-r}while(n>0&&t.unfinished);t.unfinished||(this._zr&&this._zr.flush(),this.trigger("finished"))}}},fx.getDom=function(){return this._dom},fx.getZr=function(){return this._zr},fx.setOption=function(t,e,n){var i;if(ix(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[ux]=!0,!this._model||e){var r=new vo(this._api),o=this._theme,a=this._model=new ly(null,null,o,r);a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,xx),n?(this[cx]={silent:i},this[ux]=!1):(Aa(this),px.update.call(this),this._zr.flush(),this[cx]=!1,this[ux]=!1,Oa.call(this,i),za.call(this,i))},fx.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},fx.getModel=function(){return this._model},fx.getOption=function(){return this._model&&this._model.getOption()},fx.getWidth=function(){return this._zr.getWidth()},fx.getHeight=function(){return this._zr.getHeight()},fx.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},fx.getRenderedCanvas=function(t){if(Zf.canvasSupported){(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return d(e.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},fx.getSvgDataUrl=function(){if(Zf.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToSvg()}},fx.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;ex(e,function(t){n.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ex(i,function(t){t.group.ignore=!1}),o},fx.getConnectedDataURL=function(t){if(Zf.canvasSupported){var e=this.group,i=Math.min,r=Math.max;if(Tx[e]){var o=1/0,a=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelRatio||1;d(Ix,function(u,c){if(u.group===e){var d=u.getRenderedCanvas(n(t)),f=u.getDom().getBoundingClientRect();o=i(f.left,o),a=i(f.top,a),s=r(f.right,s),l=r(f.bottom,l),h.push({dom:d,left:f.left,top:f.top})}});var c=(s*=u)-(o*=u),f=(l*=u)-(a*=u),p=ep();p.width=c,p.height=f;var g=mn(p);return ex(h,function(t){var e=new je({style:{x:t.left*u-o,y:t.top*u-a,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},fx.convertToPixel=v(Ca,"convertToPixel"),fx.convertFromPixel=v(Ca,"convertFromPixel"),fx.containPixel=function(t,e){var n;return t=An(this._model,t),d(t,function(t,i){i.indexOf("Models")>=0&&d(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n|=o.containPoint(e,t))}},this)},this),!!n},fx.getVisual=function(t,e){var n=(t=An(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),i=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=i?n.getItemVisual(i,e):n.getVisual(e)},fx.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},fx.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var px={prepareAndUpdate:function(t){Aa(this),px.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){e.restoreData(t),o.performSeriesTasks(e),r.create(e,n),o.performDataProcessorTasks(yx,e,t),Pa(this,e),Ra(e),r.update(e,n),Na(e),o.performVisualTasks(bx,e,t),Ba(this,e,n,t);var a=e.get("backgroundColor")||"transparent",s=i.painter;if(s.isSingleCanvas&&s.isSingleCanvas())i.configLayer(0,{clearColor:a});else{if(!Zf.canvasSupported){var l=Mt(a);a=Lt(l,"rgb"),0===l[3]&&(a="transparent")}a.colorStops||a.image?(i.configLayer(0,{clearColor:a}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&i.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=a)}Ga(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(o,a){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var o=R();e.eachSeries(function(r){var a=n._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,i,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),Na(e),this._scheduler.performVisualTasks(bx,e,t,{setDirty:!0,dirtyMap:o}),Fa(n,e,0,t,o),Ga(e,this._api)}},updateView:function(t){var e=this._model;e&&(ta.markUpdateMethod(t,"updateView"),Na(e),this._scheduler.performVisualTasks(bx,e,t,{setDirty:!0}),Ba(this,this._model,this._api,t),Ga(e,this._api))},updateVisual:function(t){px.update.call(this,t)},updateLayout:function(t){px.update.call(this,t)}};fx.resize=function(t){this._zr.resize(t);var e=this._model;this._loadingFX&&this._loadingFX.resize(),e&&ka(this,e.resetOption("media"),t&&t.silent)},fx.showLoading=function(t,e){if(ix(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Mx[t]){var n=Mx[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},fx.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},fx.makeActionFromEvent=function(t){var e=o({},t);return e.type=vx[t.type],e},fx.dispatchAction=function(t,e){ix(e)||(e={silent:!!e}),mx[t.type]&&this._model&&(this[ux]?this._pendingActions.push(t):(La.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&Zf.browser.weChat&&this._throttledZrFlush(),Oa.call(this,e.silent),za.call(this,e.silent)))},fx.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},fx.on=Ma("on"),fx.off=Ma("off"),fx.one=Ma("one");var gx=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];fx._initEvents=function(){ex(gx,function(t){this._zr.on(t,function(e){var n,i=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(n=o({},r.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))},this)},this),ex(vx,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},fx.isDisposed=function(){return this._disposed},fx.clear=function(){this.setOption({series:[]},!0)},fx.dispose=function(){if(!this._disposed){this._disposed=!0,kn(this.getDom(),Dx,"");var t=this._api,e=this._model;ex(this._componentsViews,function(n){n.dispose(e,t)}),ex(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete Ix[this.id]}},u(Ta,dp);var mx={},vx={},yx=[],xx=[],_x=[],bx=[],Sx={},Mx={},Ix={},Tx={},Cx=new Date-0,Ax=new Date-0,Dx="_echarts_instance_",kx={},Px=ja;ts(2e3,Gy),$a(by),ns("default",function(t,e){a(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new lv({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new dv({shape:{startAngle:-Zy/2,endAngle:-Zy/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new lv({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});i.animateShape(!0).when(1e3,{endAngle:3*Zy/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*Zy/2}).delay(300).start("circularInOut");var o=new Xp;return o.add(i),o.add(r),o.add(n),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;i.setShape({cx:e,cy:o});var a=i.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o}),Qa({type:"highlight",event:"highlight",update:"highlight"},N),Qa({type:"downplay",event:"downplay",update:"downplay"},N),qa("light",Ky),qa("dark",Jy);var Lx={};ls.prototype={constructor:ls,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],r=[];for(hs(t,{},i,"_oldKeyGetter",this),hs(e,n,r,"_newKeyGetter",this),o=0;o=e)){for(var n,i=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=this._dimensionInfos,l=this._nameList,h=this._idList,u=this._rawExtent,c=this._nameRepeatCount={},d=this._chunkCount,f=d-1,p=0;pu[I][1]&&(u[I][1]=C)}if(!r.pure){var A=l[_];w&&!A&&(null!=n?A=this._getNameFromStore(_):null!=w.name&&(l[_]=A=w.name));var D=null==w?null:w.id;null==D&&null!=A&&(c[A]=c[A]||0,D=A,c[A]>0&&(D+="__ec__"+c[A]),c[A]++),null!=D&&(h[_]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={}}},Gx._getNameFromStore=function(t){var e=this._nameDimIdx;if(null!=e){var n=this._chunkSize,i=Math.floor(t/n),r=t%n,o=this.dimensions[e],a=this._dimensionInfos[o].ordinalMeta;if(a)return a.categories[t];var s=this._storage[o][i];return s&&s[r]}},Gx._getIdFromStore=function(t){var e=this._idDimIdx;if(null!=e){var n=this._chunkSize,i=Math.floor(t/n),r=t%n,o=this.dimensions[e],a=this._dimensionInfos[o].ordinalMeta;if(a)return a.categories[t];var s=this._storage[o][i];return s&&s[r]}},Gx.count=function(){return this._count},Gx.getIndices=function(){if(this._indices)return new(t=this._indices.constructor)(this._indices.buffer,0,this._count);for(var t=fs(this),e=new t(this.count()),n=0;n=0&&e=0&&h>0||a<=0&&h<0)&&(a+=h),l=l.stackedOn}}return a},Gx._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},Gx.getValues=function(t,e,n){var i=[];y(t)||(n=e,e=t,t=this.dimensions);for(var r=0,o=t.length;rl&&(l=u)}return r=[s,l],this._extent[a]=r,r},Gx.getApproximateExtent=function(t,e){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t,e)},Gx.setApproximateExtent=function(t,e,n){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Gx.isStacked=function(t){var e=this._dimensionInfos[t];return e&&e.stackable&&this.stackedOn},Gx.getSum=function(t,e){var n=0;if(this._storage[t])for(var i=0,r=this.count();i=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},Gx.indicesOfNearest=function(t,e,n,i){var r=[];if(!this._storage[t])return r;null==i&&(i=1/0);for(var o=Number.MAX_VALUE,a=-1,s=0,l=this.count();s=0&&a<0)&&(o=u,a=h,r.length=0),r.push(s))}return r},Gx.getRawIndex=ms,Gx.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=h&&b<=u&&(a[s++]=d),d++;c=!0}else if(2===r){for(var f=this._storage[l],y=this._storage[n[1]],x=t[n[1]][0],_=t[n[1]][1],p=0;p=h&&b<=u&&S>=x&&S<=_&&(a[s++]=d),d++}c=!0}}if(!c)if(1===r){e=e||this.isStacked(l);for(v=0;v=h&&b<=u&&(a[s++]=I)}}else for(v=0;vt[T][1])&&(M=!1)}M&&(a[s++]=this.getRawIndex(v))}return sh-f&&(s=h-f,a.length=s);for(var p=0;p=e[0]&&t<=e[1]},Ds.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ds.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ds.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Ds.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e,!0))},Ds.prototype.getExtent=function(){return this._extent.slice()},Ds.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Ds.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),n=0;ne[1]&&(e[1]=t[1]),qx.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=zs(t)},getTicks:function(){return Ns(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),n=0;n>>1;t[r][1]n&&(o=n);var a=n_.length,s=t_(n_,o,0,a),l=n_[Math.min(s,a-1)],h=l[1];"year"===l[0]&&(h*=Pr(r/h/t,!0));var u=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Qx((i[0]-u)/h)*h+u),Math.round(Jx((i[1]-u)/h)*h+u)];Rs(c,i),this._stepLvl=l,this._interval=h,this._niceExtent=c},parse:function(t){return+Ar(t)}});d(["contain","normalize"],function(t){e_.prototype[t]=function(e){return Kx[t].call(this,this.parse(e))}});var n_=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];e_.create=function(t){return new e_({useUTC:t.ecModel.get("useUTC")})};var i_=Ds.prototype,r_=qx.prototype,o_=Sr,a_=_r,s_=Math.floor,l_=Math.ceil,h_=Math.pow,u_=Math.log,c_=Ds.extend({type:"log",base:10,$constructor:function(){Ds.apply(this,arguments),this._originalScale=new qx},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return f(r_.getTicks.call(this),function(i){var r=_r(h_(this.base,i));return r=i===e[0]&&t.__fixMin?Hs(r,n[0]):r,r=i===e[1]&&t.__fixMax?Hs(r,n[1]):r},this)},getLabel:r_.getLabel,scale:function(t){return t=i_.scale.call(this,t),h_(this.base,t)},setExtent:function(t,e){var n=this.base;t=u_(t)/u_(n),e=u_(e)/u_(n),r_.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=i_.getExtent.call(this);e[0]=h_(t,e[0]),e[1]=h_(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=Hs(e[0],i[0])),n.__fixMax&&(e[1]=Hs(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=u_(t[0])/u_(e),t[1]=u_(t[1])/u_(e),i_.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e,!0,function(t){return t>0}))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=Dr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[_r(l_(e[0]/i)*i),_r(s_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(t){r_.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){c_.prototype[t]=function(e){return e=u_(e)/u_(this.base),i_[t].call(this,e)}}),c_.create=function(){return new c_};var d_={getFormattedLabels:function(){return Ys(this.axis,this.get("axisLabel.formatter"))},getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!I(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:N,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},f_=Ai({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),p_=Ai({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),g_=Ai({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),f=.6*a,p=.7*a;t.moveTo(n-u,l+s),t.arc(n,l,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(n+u-c*f,l+s+d*f,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-u+c*f,l+s+d*f,n-u,l+s),t.closePath()}}),m_=Ai({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,a=i/3*2;t.moveTo(r,o),t.lineTo(r+a,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-a,o+n),t.lineTo(r,o),t.closePath()}}),v_={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},y_={};d({line:hv,rect:lv,roundRect:lv,square:lv,circle:Jm,diamond:p_,pin:g_,arrow:m_,triangle:f_},function(t,e){y_[e]=new t});var x_=Ai({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,r=y_[i];"none"!==e.symbolType&&(r||(r=y_[i="rect"]),v_[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),__=(Object.freeze||Object)({createList:function(t){return Is(t.getSource(),t)},getLayoutRect:Fr,createScale:function(t,e){var n=e;fr.isInstance(e)||u(n=new fr(e),d_);var i=Xs(n);return i.setExtent(t[0],t[1]),Us(i,n),i},mixinAxisModelCommonMethods:function(t){u(t,d_)},completeDimensions:bs,createDimensions:Wx,createSymbol:Ks}),w_=1e-8;tl.prototype={constructor:tl,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;s0}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,r=[];"Polygon"===n.type&&r.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&d(i,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new tl(e.name,r,e.cp);return o.properties=e,o})},S_=yr,M_=[0,1],I_=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};I_.prototype={constructor:I_,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Mr(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&il(n=n.slice(),i.count()),S_(t,M_,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&il(n=n.slice(),i.count());var r=S_(t,n,M_,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),n=[],i=0;i0&&gl(n[r-1]);r--);for(;i0&&gl(n[o-1]);o--);for(;r=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;(a=new sl(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else ta.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),o=Tn(r,i);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else ta.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new H_({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new W_({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_getSymbolIgnoreFunc:function(t,e){var n=e.getAxesByScale("ordinal")[0];if(n&&n.isLabelIgnored)return m(n.isLabelIgnored,n)},_updateAnimation:function(t,e,n,i,r){var o=this._polyline,a=this._polygon,s=t.hostModel,l=z_(this._data,t,this._stackedOnPoints,e,this._coordSys,n),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;r&&(h=Tl(l.current,n,r),u=Tl(l.stackedOnCurrent,n,r),c=Tl(l.next,n,r),d=Tl(l.stackedOnNext,n,r)),o.shape.__points=l.current,o.shape.points=h,or(o,{shape:{points:c}},s),a&&(a.setShape({points:h,stackedOnPoints:u}),or(a,{shape:{points:c,stackedOnPoints:d}},s));for(var f=[],p=l.status,g=0;ge&&(e=t[n]);return e},min:function(t){for(var e=1/0,n=0;ne[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(q_,I_);var $_={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},K_={};K_.categoryAxis=i({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},$_),K_.valueAxis=i({boundaryGap:[0,0],splitNumber:5},$_),K_.timeAxis=a({scale:!0,min:"dataMin",max:"dataMax"},K_.valueAxis),K_.logAxis=a({scale:!0,logBase:10},K_.valueAxis);var Q_=["value","category","time","log"],J_=function(t,e,n,o){d(Q_,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,r){var o=this.layoutMode,s=o?Wr(e):{};i(e,r.getTheme().get(a+"Axis")),i(e,this.getDefaultOption()),e.type=n(t,e),o&&Hr(e,s,o)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=ks.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r([{},K_[a+"Axis"],o],!0)})}),Xv.registerSubTypeDefaulter(t+"Axis",v(n,t))},tw=Xv.extend({type:"cartesian2dAxis",axis:null,init:function(){tw.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){tw.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){tw.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});i(tw.prototype,d_);var ew={offset:0};J_("x",tw,kl,ew),J_("y",tw,kl,ew),Xv.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var nw=d,iw=function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)},rw=Us,ow=zl.prototype;ow.type="grid",ow.axisPointerEnabled=!0,ow.getRect=function(){return this._rect},ow.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),nw(n.x,function(t){rw(t.scale,t.model)}),nw(n.y,function(t){rw(t.scale,t.model)}),nw(n.x,function(t){El(n,"y",t)}),nw(n.y,function(t){El(n,"x",t)}),this.resize(this.model,e)},ow.resize=function(t,e,n){function i(){nw(o,function(t){var e=t.isHorizontal(),n=e?[0,r.width]:[0,r.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),Nl(t,e?r.x:r.y)})}var r=Fr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;i(),!n&&t.get("containLabel")&&(nw(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Ol(t);if(e){var n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin");r[n]-=e[n]+i,"top"===t.position?r.y+=e.height+i:"left"===t.position&&(r.x+=e.width+i)}}}),i())},ow.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},ow.getAxes=function(){return this._axesList.slice()},ow.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;ih[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,Xl(r)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*sw/180);var f;Xl(r)?i=uw(t.rotation,null!=d?d:t.rotation,a):(i=Gl(t,r,d||0,h),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(i.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?Nv(n,v,p,m,{minChar:2,placeholder:g.placeholder}):n,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:n,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new Qm({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:Hl(e),z2:1,tooltip:x&&x.show?o({content:n,formatter:function(){return n},formatterParams:w},x):null});$i(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:i.textAlign,textVerticalAlign:i.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Fl(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},uw=lw.innerTextLayout=function(t,e,n){var i,r,o=Tr(e-t);return Cr(o)?(r=n>0?"top":"bottom",i="center"):Cr(o-sw)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},cw=lw.ifIgnoreOnTick=function(t,e,n,i,r,o){if(0===e&&r||e===i-1&&o)return!1;var a,s=t.scale;return"ordinal"===s.type&&("function"==typeof n?(a=s.getTicks()[e],!n(a,s.getLabel(a))):e%(n+1))},dw=lw.getInterval=function(t,e){var n=t.get("interval");return null!=n&&"auto"!=n||(n=e),n},fw=d,pw=v,gw=rs({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&eh(t),gw.superApply(this,"render",arguments),ah(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i,r){ah(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),gw.superApply(this,"remove",arguments)},dispose:function(t,e){sh(this,e),gw.superApply(this,"dispose",arguments)}}),mw=[];gw.registerAxisPointerClass=function(t,e){mw[t]=e},gw.getAxisPointerClass=function(t){return t&&mw[t]};var vw=lw.ifIgnoreOnTick,yw=lw.getInterval,xw=["axisLine","axisTickLabel","axisName"],_w=["splitArea","splitLine"],ww=gw.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Xp,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=lh(o,t),s=new lw(t,a);d(xw,s.add,s),this._axisGroup.add(s.getGroup()),d(_w,function(e){t.get(e+".show")&&this["_"+e](t,o,a.labelInterval)},this),ur(r,this._axisGroup,t),ww.superCall(this,"render",t,e,n,i)}},_splitLine:function(t,e,n){var i=t.axis;if(!i.scale.isBlank()){var r=t.getModel("splitLine"),o=r.getModel("lineStyle"),s=o.get("color"),l=yw(r,n);s=y(s)?s:[s];for(var h=e.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,d=i.getTicksCoords(),f=i.scale.getTicks(),p=t.get("axisLabel.showMinLabel"),g=t.get("axisLabel.showMaxLabel"),m=[],v=[],x=o.getLineStyle(),_=0;_1){var c;"string"==typeof r?c=X_[r]:"function"==typeof r&&(c=r),c&&t.setData(i.downSample(s.dim,1/u,c,j_))}}}}}("line")),Py.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Is(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var bw=Xg([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Sw={getBarItemStyle:function(t){var e=bw(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},Mw=["itemStyle","barBorderWidth"];o(fr.prototype,Sw),as({type:"bar",render:function(t,e,n){var i=t.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||this._render(t,e,n),this.group},dispose:N,_render:function(t,e,n){var i,r=this.group,o=t.getData(),a=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var h=t.isAnimationEnabled()?t:null;o.diff(a).add(function(e){if(o.hasValue(e)){var n=o.getItemModel(e),a=Tw[s.type](o,e,n),l=Iw[s.type](o,e,n,a,i,h);o.setItemGraphicEl(e,l),r.add(l),fh(l,o,e,n,a,t,i,"polar"===s.type)}}).update(function(e,n){var l=a.getItemGraphicEl(n);if(o.hasValue(e)){var u=o.getItemModel(e),c=Tw[s.type](o,e,u);l?or(l,{shape:c},h,e):l=Iw[s.type](o,e,u,c,i,h,!0),o.setItemGraphicEl(e,l),r.add(l),fh(l,o,e,u,c,t,i,"polar"===s.type)}else r.remove(l)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===s.type?e&&ch(t,h,e):e&&dh(t,h,e)}).execute(),this._data=o},remove:function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){"sector"===e.type?dh(e.dataIndex,t,e):ch(e.dataIndex,t,e)}):n.removeAll()}});var Iw={cartesian2d:function(t,e,n,i,r,a,s){var l=new lv({shape:o({},i)});if(a){var h=l.shape,u=r?"height":"width",c={};h[u]=0,c[u]=i[u],bv[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,n,i,r,a,s){var l=new nv({shape:o({},i)});if(a){var h=l.shape,u=r?"r":"endAngle",c={};h[u]=r?0:i.startAngle,c[u]=i[u],bv[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l}},Tw={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),r=ph(n,i),o=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};Ja(v(function(t,e,n){var i=Fs(g(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),r={},o={};e.eachSeriesByType(t,function(t){if("cartesian2d"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),s=Bs(t),l=i[Vs(a)][s],h=l.offset,u=l.width,c=n.getOtherAxis(a),d=t.get("barMinHeight")||0,f=a.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],p=[e.mapDimension("x"),e.mapDimension("y")],g=e.mapArray(p,function(t,e){return n.dataToPoint([t,e])},!0);r[s]=r[s]||[],o[s]=o[s]||[],e.setLayout({offset:h,size:u}),e.each(e.mapDimension(c.dim),function(t,n){if(!isNaN(t)){r[s][n]||(r[s][n]={p:f,n:f},o[s][n]={p:f,n:f});var i,a,l,p,m=t>=0?"p":"n",v=g[n],y=r[s][n][m],x=o[s][n][m];c.isHorizontal()?(i=y,a=v[1]+h,l=v[0]-x,p=u,o[s][n][m]+=l,Math.abs(l)0&&"scale"!==h){var d=r.getItemLayout(0),f=Math.max(n.getWidth(),n.getHeight())/2,p=m(a.removeClipPath,a);a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,o,a){var s=new nv({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return ar(s,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}}});var Pw=function(t,e,n,i){var r,o,a=t.getData(),s=[],l=!1;a.each(function(n){var i,h,u,c,d=a.getItemLayout(n),f=a.getItemModel(n),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);r=d.cx,o=d.cy;var b="inside"===g||"inner"===g;if("center"===g)i=d.cx,h=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+r,M=(b?(d.r+d.r0)/2*w:d.r*w)+o;if(i=S+3*_,h=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),C=I+(_<0?-1:1)*y,A=T;i=C+(_<0?-5:5),h=A,u=[[S,M],[I,T],[C,A]]}c=b?"center":_>0?"left":"right"}var D=p.getFont(),k=p.get("rotate")?_<0?-x+Math.PI:-x:0,P=ce(t.getFormattedLabel(n,"normal")||a.getName(n),D,c,"top");l=!!k,d.label={x:i,y:h,position:g,height:P.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:k,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&xh(s,r,o,e,n,i)},Lw=2*Math.PI,Ow=Math.PI/180;!function(t,e){d(e,function(e){e.update="updateView",Qa(e,function(n,i){var r={};return i.eachComponent({mainType:"series",subType:t,query:n},function(t){t[e.method]&&t[e.method](n.name,n.dataIndex);var i=t.getData();i.each(function(e){var n=i.getName(e);r[n]=t.isSelected(n)||!1})}),{name:n.name,selected:r}})})}("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),ts(function(t){return{getTargetSeries:function(e){var n={},i=R();return e.eachSeriesByType(t,function(t){t.__paletteScope=n,i.set(t.uid,t)}),i},reset:function(t,e){var n=t.getRawData(),i={},r=t.getData();r.each(function(t){var e=r.getRawIndex(t);i[e]=t}),n.each(function(e){var o=i[e],a=null!=o&&r.getItemVisual(o,"color",!0);if(a)n.setItemVisual(e,"color",a);else{var s=n.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(n.getName(e),t.__paletteScope,n.count());n.setItemVisual(e,"color",s),null!=o&&r.setItemVisual(o,"color",s)}})}}}("pie")),Ja(v(function(t,e,n,i){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=t.get("center"),o=t.get("radius");y(o)||(o=[0,o]),y(r)||(r=[r,r]);var a=n.getWidth(),s=n.getHeight(),l=Math.min(a,s),h=xr(r[0],a),u=xr(r[1],s),c=xr(o[0],l/2),d=xr(o[1],l/2),f=-t.get("startAngle")*Ow,p=t.get("minAngle")*Ow,g=0;e.each(i,function(t){!isNaN(t)&&g++});var m=e.getSum(i),v=Math.PI/(m||g)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(i);b[0]=0;var S=Lw,M=0,I=f,T=x?1:-1;if(e.each(i,function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:h,cy:u,r0:c,r:_?NaN:d});else{(i="area"!==_?0===m&&w?v:t*v:Lw/g)=0;s--){var l=2*s,h=i[l]-o/2,u=i[l+1]-a/2;if(t>=h&&e>=u&&t<=h+o&&e<=u+a)return s}return-1}}),Ew=_h.prototype;Ew.isPersistent=function(){return!this._incremental},Ew.updateData=function(t){this.group.removeAll();var e=new zw({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Ew.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)})}},Ew.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Ci({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Ew.incrementalUpdate=function(t,e){var n;this._incremental?(n=new zw,this._incremental.addDisplayable(n,!0)):((n=new zw({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},Ew._setCommon=function(t,e,n){var i=e.hostModel,r=e.getVisual("symbolSize");t.setShape("size",r instanceof Array?r:[r,r]),t.symbolProxy=Ks(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("color");a&&t.setColor(a),n||(t.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(t.dataIndex=n+(t.startIndex||0))}))},Ew.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Ew._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},as({type:"scatter",render:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i),this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=U_().reset(t);r.progress&&r.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new _h:new hl,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),ts(Z_("scatter","circle")),Ja(U_("scatter")),$a(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var Rw=is({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,Rw.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o);var a=Sn(r,o);Mn(a);var s=this._elOptionsToUpdate=[];d(a,function(t,e){var n=t.option;n&&(s.push(n),Ih(t,n),Th(r,e,n),Ch(r[e],n))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(t,e,n){d(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});rs({type:"graphic",init:function(t,e){this._elMap=R(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,n),this._relocate(t,n)},_updateElements:function(t,e){var n=t.useElOptionsToUpdate();if(n){var i=this._elMap,r=this.group;d(n,function(t){var e=t.$action,n=t.id,o=i.get(n),a=t.parentId,s=null!=a?i.get(a):r;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=Sh(t);e&&"merge"!==e?"replace"===e?(bh(o,i),wh(n,s,h,i)):"remove"===e&&bh(o,i):o?o.attr(h):wh(n,s,h,i);var u=i.get(n);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=n.length-1;o>=0;o--){var a=n[o],s=r.get(a.id);if(s){var l=s.parent;Gr(s,a,l===i?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:a.hv,boundingMode:a.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){bh(e,t)}),this._elMap=R()},dispose:function(){this._clear()}});var Nw=function(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Tn(o,t);if(null==a||a<0||y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(o.getValues(f(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),i=[h.x+h.width/2,h.y+h.height/2]}return{point:i,el:s}},Bw=d,Vw=v,Fw=Cn(),Gw=(is({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),Cn()),Hw=d,Ww=rs({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Bh("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Zh(e.getZr(),"axisPointer"),Ww.superApply(this._model,"remove",arguments)},dispose:function(t,e){Zh("axisPointer",e),Ww.superApply(this._model,"dispose",arguments)}}),Zw=Cn(),Uw=n,Xw=m;(Uh.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=v(Xh,e,u);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new Xp,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);$h(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=nh(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},makeElOption:function(t,e,n,i,r){},createPointerEl:function(t,e,n,i){var r=e.pointer;if(r){var o=Zw(t).pointerEl=new bv[r.type](Uw(e.pointer));t.add(o)}},createLabelEl:function(t,e,n,i){if(e.label){var r=Zw(t).labelEl=new lv(Uw(e.label));t.add(r),Yh(r,i)}},updatePointerEl:function(t,e,n){var i=Zw(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=Zw(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),Yh(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return i&&n.remove(i),void(this._handle=null);var a;this._handle||(a=!0,i=this._handle=dr(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){bg(t.event)},onmousedown:Xw(this._onHandleDragMove,this,0,0),drift:Xw(this._onHandleDragMove,this),ondragend:Xw(this._onHandleDragEnd,this)}),n.add(i)),$h(i,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.setStyle(r.getItemStyle(null,s));var l=r.get("size");y(l)||(l=[l,l]),i.attr("scale",[l[0]/2,l[1]/2]),sa(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){Xh(this._axisPointerModel,!e&&this._moveAnimation,this._handle,qh(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(qh(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(qh(i)),Zw(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=Uh,zn(Uh);var jw=Uh.extend({makeElOption:function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=ou(a,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var u=Kh(i),c=Yw[s](o,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}nu(e,t,lh(a.model,n),n,i,r)},getHandleTransform:function(t,e,n){var i=lh(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:eu(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=ou(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),Yw={line:function(t,e,n,i){var r=iu([e,n[0]],[e,n[1]],au(t));return Oi({shape:r,style:i}),{type:"Line",shape:r}},shadow:function(t,e,n,i){var r=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:ru([e-r/2,n[0]],[r,o],au(t))}}};gw.registerAxisPointerClass("CartesianAxisPointer",jw),$a(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Ka(hx.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ql(t,e)}),Qa({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||m(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Nh(r)&&(r=Nw({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=Nh(r),h=o.axesInfo,u=s.axesInfo,c="leave"===i||Nh(r),d={},f={},p={list:[],map:{}},g={showPointer:Vw(kh,f),showTooltip:Vw(Ph,p)};Bw(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);Bw(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=Eh(h,t);if(!c&&n&&(!h||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&Ah(t,a,g,!1,d)}})});var v={};return Bw(u,function(t,e){var n=t.linkGroup;n&&!f[e]&&Bw(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,Rh(e),Rh(t)))),v[t.key]=o}})}),Bw(v,function(t,e){Ah(u[e],t,g,!0,d)}),Lh(f,u,d),Oh(p,r,t,a),zh(u,0,n),d}}),is({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var qw=d,$w=Or,Kw=["","-webkit-","-moz-","-o-"];uu.prototype={constructor:uu,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+hu(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var Qw=m,Jw=d,tb=xr,eb=new lv({shape:{x:-1,y:-1,width:2,height:2}});rs({type:"tooltip",init:function(t,e){if(!Zf.node){var n=new uu(e.getDom(),e);this._tooltipContent=n}},render:function(t,e,n){if(!Zf.node&&!Zf.wxa){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");Bh("itemTooltip",this._api,Qw(function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY})})}},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!Zf.node){var r=du(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var a=eb;a.position=[i.x,i.y],a.update(),a.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:a},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=Nw(i,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:i.position,target:s.el,event:{}},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},r))}},manuallyHideTip:function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(du(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===(t=cu([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},_tryShow:function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var n=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=[],a=[],s=cu([e.tooltipOption,i]);Jw(t,function(t){Jw(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value,r=[];if(e&&null!=i){var s=tu(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(o){var l=n.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=qs(e.axis,i),u.axisValueLabel=s,u&&(a.push(u),r.push(l.formatTooltip(h,!0)))});var l=s;o.push((l?zr(l)+"
":"")+r.join("
"))}})},this),o.reverse(),o=o.join("

");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,r[0],r[1],this._tooltipContent,a):this._showTooltipContent(s,o,a,Math.random(),r[0],r[1],l)})},_showSeriesItemTooltip:function(t,e,n){var i=this._ecModel,r=e.seriesIndex,o=i.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,h=a.getData(),u=cu([h.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=a.getDataParams(s,l),f=a.formatTooltip(s,!1,l),p="item_"+a.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),n({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;if("string"==typeof i){var r=i;i={content:r,formatter:r}}var o=new fr(i,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,n,i,r,o,a,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var u=e;if(h&&"string"==typeof h)u=Er(h,n,!0);else if("function"==typeof h){var c=Qw(function(e,i){e===this._ticket&&(l.setContent(i),this._updatePosition(t,a,r,o,l,n,s))},this);this._ticket=i,u=h(n,i,c)}l.setContent(u),l.show(t),this._updatePosition(t,a,r,o,l,n,s)}},_updatePosition:function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),"function"==typeof e&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),y(e))n=tb(e[0],s),i=tb(e[1],l);else if(w(e)){e.width=h[0],e.height=h[1];var f=Fr(e,{width:s,height:l});n=f.x,i=f.y,u=null,c=null}else"string"==typeof e&&a?(n=(p=mu(e,d,h))[0],i=p[1]):(n=(p=fu(n,i,r.el,s,l,u?null:20,c?null:20))[0],i=p[1]);if(u&&(n-=vu(u)?h[0]/2:"right"===u?h[0]:0),c&&(i-=vu(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var p=pu(n,i,r.el,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&Jw(e,function(e,i){var r=e.dataByAxis||{},o=(t[i]||{}).dataByAxis||[];(n&=r.length===o.length)&&Jw(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&Jw(r,function(t,e){var i=a[e];n&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Zf.node||(this._tooltipContent.hide(),Zh("itemTooltip",e))}}),Qa({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Qa({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var nb=is({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){nb.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Qa("legendToggleSelect","legendselectchanged",v(yu,"toggleSelected")),Qa("legendSelect","legendselected",v(yu,"select")),Qa("legendUnSelect","legendunselected",v(yu,"unSelect"));var ib=v,rb=d,ob=Xp,ab=rs({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new ob),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){if(this.resetInner(),t.get("show",!0)){var i=t.get("align");i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n);var r=t.getBoxLayoutParams(),o={width:n.getWidth(),height:n.getHeight()},s=t.get("padding"),l=Fr(r,o,s),h=this.layoutInner(t,i,l),u=Fr(a({width:h.width,height:h.height},r),o,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=_u(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,n,i){var r=this.getContentGroup(),o=R(),a=e.get("selectedMode");rb(e.getData(),function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=n.getSeriesByName(h)[0];if(!o.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",p=c.getVisual("symbol");this._createItem(h,l,s,e,f,p,t,d,a).on("click",ib(wu,h,i)).on("mouseover",ib(bu,u,null,i)).on("mouseout",ib(Su,u,null,i)),o.set(h,!0)}else n.eachRawSeries(function(n){if(!o.get(h)&&n.legendDataProvider){var r=n.legendDataProvider(),u=r.indexOfName(h);if(u<0)return;var c=r.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,a).on("click",ib(wu,h,i)).on("mouseover",ib(bu,n,h,i)).on("mouseout",ib(Su,n,h,i)),o.set(h,!0)}},this)}else r.add(new ob({newline:!0}))},this)},_createItem:function(t,e,n,i,r,a,s,l,h){var u=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.isSelected(t),p=new ob,g=n.getModel("textStyle"),m=n.get("icon"),v=n.getModel("tooltip"),y=v.parentModel;if(r=m||r,p.add(Ks(r,0,0,u,c,f?l:d,!0)),!m&&a&&(a!==r||"none"==a)){var x=.8*c;"none"===a&&(a="circle"),p.add(Ks(a,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=i.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),p.add(new Qm({style:$i({},g,{text:S,x:_,y:c/2,textFill:f?g.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new lv({shape:p.getBoundingRect(),invisible:!0,tooltip:v.get("show")?o({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},v.option):null});return p.add(M),p.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(p),Yi(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,n){var i=this.getContentGroup();Wv(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var r=i.getBoundingRect();return i.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}});Ka(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;nn[s],f=[-u.x,-u.y];f[a]=i.position[a];var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[a]+=n[s]-c[s]:p[a]+=c[s]+m),g[1-a]+=u[l]/2-c[l]/2,i.attr("position",f),r.attr("position",p),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?n[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-a]),r.__rectSize=n[s],d){var y={x:0,y:0};y[s]=Math.max(n[s]-c[s]-m,0),y[l]=v[l],r.setClipPath(new lv({shape:y})),r.__rectSize=y[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&or(i,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(t,e){var n=this._controllerGroup;d(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",_(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var n,i,r,o,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=hb[u],d=hb[1-u],f=ub[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(o){var m=o.getBoundingRect(),v=o.position[u]+m[f];p[u]=-v-l[f],n=Math.floor(g*(v+m[f]+h/2)/l[c]),n=l[c]&&g?Math.max(0,Math.min(g-1,n)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,n){var i=e(t);i.intersect(y)&&(null==x&&(x=n),r=t.__legendDataIndex),n===_.length-1&&i[f]+i[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=e(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])i=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;i=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:n,pageCount:g,pagePrevDataIndex:i,pageNextDataIndex:r}}});Qa("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),is({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),rs({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=t.get("textBaseline"),l=new Qm({style:$i({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new Qm({style:$i({},o,{text:u,textFill:o.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),i.add(l),u&&i.add(c);var p=i.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var m=Fr(g,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),i.attr("position",[m.x,m.y]);var v={textAlign:a,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),p=i.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new lv({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});zi(_),i.add(_)}}});var db=Lr,fb=zr,pb=is({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(Zf.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,n,i){var r=this.constructor,a=this.mainType+"Model";n||e.eachSeries(function(t){var n=t.get(this.mainType),s=t[a];n&&n.data?(s?s.mergeOption(n,e,!0):(i&&Iu(n),d(n.data,function(t){t instanceof Array?(Iu(t[0]),Iu(t[1])):Iu(t)}),o(s=new r(n,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[a]=s):t[a]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=y(n)?f(n,db).join(", "):db(n),r=e.getName(t),o=fb(this.name);return(null!=n||r)&&(o+="
"),r&&(o+=fb(r),null!=n&&(o+=" : ")),null!=n&&(o+=fb(i)),o},getData:function(){return this._data},setData:function(t){this._data=t}});u(pb,Ay),pb.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var gb=l,mb=v,vb={min:mb(Du,"min"),max:mb(Du,"max"),average:mb(Du,"average")},yb=rs({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,n){var i=this.markerGroupMap;i.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var i=t[r];i&&this.renderSeries(t,i,e,n)},this),i.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});yb.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Ru(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new hl),h=Nu(r,t,e);e.setData(h),Ru(e.getData(),t,i),h.each(function(t){var n=h.getItemModel(t),i=n.getShallow("symbolSize");"function"==typeof i&&(i=i(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:i,color:n.get("itemStyle.color")||a.getVisual("color"),symbol:n.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),$a(function(t){t.markPoint=t.markPoint||{}}),pb.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var xb=hv.prototype,_b=cv.prototype,wb=Ai({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Bu(e)?xb:_b).buildPath(t,e)},pointAt:function(t){return Bu(this.shape)?xb.pointAt.call(this,t):_b.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Bu(e)?[e.x2-e.x1,e.y2-e.y1]:_b.tangentAt.call(this,t);return j(n,n)}}),bb=["fromSymbol","toSymbol"],Sb=Wu.prototype;Sb.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),n=t.childOfName("toSymbol"),i=t.childOfName("label");if(e||n||!i.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),h=a.pointAt(s),u=W([],h,l);if(j(u,u),e&&(e.attr("position",l),c=a.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])),n){n.attr("position",h);var c=a.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),n.attr("scale",[r*s,r*s])}if(!i.ignore){i.attr("position",h);var d,f,p,g=5*r;if("end"===i.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",p=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var m=s/2,v=[(c=a.tangentAt(m))[1],-c[0]],y=a.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",p=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:d,scale:[r,r]})}}}},Sb._createLine=function(t,e,n){var i=t.hostModel,r=Gu(t.getItemLayout(e));r.shape.percent=0,ar(r,{shape:{percent:1}},i,e),this.add(r);var o=new Qm({name:"label"});this.add(o),d(bb,function(n){var i=Fu(n,t,e);this.add(i),this[Vu(n)]=t.getItemVisual(e,n)},this),this._updateCommonStl(t,e,n)},Sb.updateData=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};Hu(a.shape,o),or(r,a,i,e),d(bb,function(n){var i=t.getItemVisual(e,n),r=Vu(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=Fu(n,t,e);this.add(o)}this[r]=i},this),this._updateCommonStl(t,e,n)},Sb._updateCommonStl=function(t,e,n){var i=t.hostModel,r=this.childOfName("line"),o=n&&n.lineStyle,s=n&&n.hoverLineStyle,l=n&&n.labelModel,h=n&&n.hoverLabelModel;if(!n||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle").getLineStyle(),s=u.getModel("emphasis.lineStyle").getLineStyle(),l=u.getModel("label"),h=u.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=A(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(a({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},o)),r.hoverStyle=s,d(bb,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m,v=l.getShallow("show"),y=h.getShallow("show"),x=this.childOfName("label");if(v||y){if(p=c||"#000",null==(g=i.getFormattedLabel(e,"normal",t.dataType))){var _=i.getRawValue(e);g=null==_?t.getName(e):isFinite(_)?_r(_):_}m=C(i.getFormattedLabel(e,"emphasis",t.dataType),g)}if(v){var w=$i(x.style,l,{text:g},{autoColor:p});x.__textAlign=w.textAlign,x.__verticalAlign=w.textVerticalAlign,x.__position=l.get("position")||"middle"}else x.setStyle("text",null);x.hoverStyle=y?{text:m,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},x.ignore=!v&&!y,Yi(this)},Sb.highlight=function(){this.trigger("emphasis")},Sb.downplay=function(){this.trigger("normal")},Sb.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Sb.setLinePoints=function(t){var e=this.childOfName("line");Hu(e.shape,t),e.dirty()},h(Wu,Xp);var Mb=Zu.prototype;Mb.isPersistent=function(){return!0},Mb.updateData=function(t){var e=this,n=e.group,i=e._lineData;e._lineData=t,i||n.removeAll();var r=ju(t);t.diff(i).add(function(n){Uu(e,t,n,r)}).update(function(n,o){Xu(e,i,t,o,n,r)}).remove(function(t){n.remove(i.getItemGraphicEl(t))}).execute()},Mb.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},Mb.incrementalPrepareUpdate=function(t){this._seriesScope=ju(t),this._lineData=null,this.group.removeAll()},Mb.incrementalUpdate=function(t,e){for(var n=t.start;n=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=u,a=[p,g,{type:l,valueIndex:a.valueIndex,value:u}]}return a=[ku(t,a[0]),ku(t,a[1]),o({},a[2])],a[2].type=a[2].type||"",i(a[2],a[0]),i(a[2],a[1]),a};yb.extend({type:"markLine",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markLineModel;if(e){var i=e.getData(),r=e.__from,o=e.__to;r.each(function(e){Ju(r,e,!0,t,n),Ju(o,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,n,i){function r(e,n,r){var o=e.getItemModel(n);Ju(e,n,r,t,i),e.setItemVisual(n,{symbolSize:o.get("symbolSize")||g[r?0:1],symbol:o.get("symbol",!0)||p[r?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,new Zu);this.group.add(h.group);var u=tc(o,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),u.from.each(function(t){r(c,t,!0),r(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),h.updateData(f),u.line.eachItemGraphicEl(function(t,n){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),$a(function(t){t.markLine=t.markLine||{}}),pb.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var Tb=function(t,e,n,i){var o=ku(t,i[0]),a=ku(t,i[1]),s=T,l=o.coord,h=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=r([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u},Cb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];yb.extend({type:"markArea",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var i=e.getData();i.each(function(e){var r=f(Cb,function(r){return rc(i,e,r,t,n)});i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)})}},this)},renderSeries:function(t,e,n,i){var r=t.coordinateSystem,o=t.name,s=t.getData(),l=this.markerGroupMap,h=l.get(o)||l.set(o,{group:new Xp});this.group.add(h.group),h.__keep=!0;var u=oc(r,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,f(Cb,function(n){return rc(u,e,n,t,i)})),u.setItemVisual(e,{color:s.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new av({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,n){var i=h.__data.getItemGraphicEl(n);or(i,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(i),u.setItemGraphicEl(t,i)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,n){var i=u.getItemModel(n),r=i.getModel("label"),o=i.getModel("emphasis.label"),s=u.getItemVisual(n,"color");t.useStyle(a(i.getModel("itemStyle").getItemStyle(),{fill:Pt(s,.4),stroke:s})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),qi(t.style,t.hoverStyle,r,o,{labelFetcher:e,labelDataIndex:n,defaultText:u.getName(n)||"",isRectText:!0,autoColor:s}),Yi(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),$a(function(t){t.markArea=t.markArea||{}}),Xv.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var Ab=["cartesian2d","polar","singleAxis"],Db=function(t,e){var n=f(t=t.slice(),Br),i=f(e=(e||[]).slice(),Br);return function(r,o){d(t,function(t,a){for(var s={name:t,capital:n[a]},l=0;l=a[0]&&t<=a[1]}if(t===this._dataZoomModel){var i=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;if("none"!==o){var s=this.getOtherAxisModel();t.get("$fromToolbox")&&s&&s.hasSeriesStacked&&(o="empty"),kb(r,function(t){var e=t.getData(),r=e.mapDimension(i,!0);"weakFilter"===o?e.filterSelf(function(t){for(var n,i,o,s=0;sa[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(n=!0),c&&(i=!0)}return o&&n&&i}):kb(r,function(i){if("empty"===o)t.setData(e.map(i,function(t){return n(t)?t:NaN}));else{var r={};r[i]=a,e.selectRange(r)}}),kb(r,function(t){e.setApproximateExtent(a,t)})})}}}};var Ob=d,zb=Db,Eb=is({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=dc(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=dc(t);i(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;Zf.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),fc(this,t),Ob([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,n,i,r){var o=this.dependentModels[e.axis][n],a=o.__dzAxisProxy||(o.__dzAxisProxy=new Lb(e.name,n,this,r));t[e.name+"_"+n]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();zb(function(e){var n=e.axisIndex;t[n]=xn(t[n])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;zb(function(n){null!=t[n.axisIndex]&&(e=!0)},this);var n=t.orient;return null==n&&e?"orient":e?void 0:(null==n&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),n=this.option,i=this.dependentModels;if(t){var r="vertical"===e?"y":"x";i[r+"Axis"].length?(n[r+"AxisIndex"]=[0],t=!1):Ob(i.singleAxis,function(i){t&&i.get("orient",!0)===e&&(n.singleAxisIndex=[i.componentIndex],t=!1)})}t&&zb(function(e){if(t){var i=[],r=this.dependentModels[e.axis];if(r.length&&!i.length)for(var o=0,a=r.length;o0?100:20}},getFirstTargetAxisModel:function(){var t;return zb(function(e){if(null==t){var n=this.get(e.axisIndex);n.length&&(t=this.dependentModels[e.axis][n[0]])}},this),t},eachTargetAxis:function(t,e){var n=this.ecModel;zb(function(i){Ob(this.get(i.axisIndex),function(r){t.call(e,i,r,this,n)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(t,e){var n=this.option;Ob([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(n[e[0]]=t[e[0]],n[e[1]]=t[e[1]])},this),!e&&fc(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var n in e)if(e.hasOwnProperty(n)&&e[n].hostedBy(this))return e[n];for(var n in e)if(e.hasOwnProperty(n)&&!e[n].hostedBy(this))return e[n]},getRangePropMode:function(){return this._rangePropMode.slice()}}),Rb=Ly.extend({type:"dataZoom",render:function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){function t(t,e,n,i){for(var r,o=0;oo&&(e[1-i]=e[i]+u.sign*o),e}),Bb=lv,Vb=yr,Fb=wr,Gb=m,Hb=d,Wb="horizontal",Zb=5,Ub=["line","bar","candlestick","scatter"],Xb=Rb.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){Xb.superApply(this,"render",arguments),sa(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){Xb.superApply(this,"remove",arguments),la(this,"_dispatchZoomAction")},dispose:function(){Xb.superApply(this,"dispose",arguments),la(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Xp;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},r=this._orient===Wb?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},o=Wr(t.option);d(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=Fr(o,i,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==Wb||r?n===Wb&&r?{scale:a?[-1,1]:[-1,-1]}:"vertical"!==n||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new Bb({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new Bb({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),s=.3*(o[1]-o[0]);o=[o[0]-s,o[1]+s];var l,h=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=u[1]/(i.count()-1),p=0,g=Math.round(i.count()/e[0]);i.each([r],function(t,e){if(g>0&&e%g)p+=f;else{var n=null==t||isNaN(t)||""===t,i=n?0:Vb(t,o,h,!0);n&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!n&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,i]),d.push([p,i]),p+=f,l=n}});var m=this.dataZoomModel;this._displayables.barGroup.add(new av({shape:{points:c},style:a({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new sv({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis(function(r,o){d(t.getAxisProxy(r.name,o).getTargetSeriesModels(),function(t){if(!(n||!0!==e&&l(Ub,t.get("type"))<0)){var a,s=i.getComponent(r.axis,o).axis,h=mc(r.name),u=t.coordinateSystem;null!=h&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),h=t.getData().mapDimension(h),n={thisAxis:s,series:t,thisDim:r.name,otherDim:h,otherAxisInverse:a}}},this)},this),n}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],n=t.handleLabels=[],i=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;i.add(t.filler=new Bb({draggable:!0,cursor:vc(this._orient),drift:Gb(this._onDragMove,this,"all"),onmousemove:function(t){bg(t.event)},ondragstart:Gb(this._showDataInfo,this,!0),ondragend:Gb(this._onDragEnd,this),onmouseover:Gb(this._showDataInfo,this,!0),onmouseout:Gb(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),i.add(new Bb(zi({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),Hb([0,1],function(t){var r=dr(o.get("handleIcon"),{cursor:vc(this._orient),draggable:!0,drift:Gb(this._onDragMove,this,t),onmousemove:function(t){bg(t.event)},ondragend:Gb(this._onDragEnd,this),onmouseover:Gb(this._showDataInfo,this,!0),onmouseout:Gb(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=xr(o.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(r.style.fill=s),i.add(e[t]=r);var l=o.textStyleModel;this.group.add(n[t]=new Qm({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Vb(t[0],[0,100],e,!0),Vb(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];Nb(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Vb(o.minSpan,a,r,!0):null,null!=o.maxSpan?Vb(o.maxSpan,a,r,!0):null),this._range=Fb([Vb(i[0],r,a,!0),Vb(i[1],r,a,!0)])},_updateView:function(t){var e=this._displayables,n=this._handleEnds,i=Fb(n.slice()),r=this._size;Hb([0,1],function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scale:[o/2,o/2],position:[n[t],r[1]/2-o/2]})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=sr(i.handles[t].parent,this.group),n=hr(0===t?"right":"left",e),s=this._handleWidth/2+Zb,l=lr([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===Wb?"middle":n,textAlign:o===Wb?n:"center",text:a[t]})}var n=this.dataZoomModel,i=this._displayables,r=i.handleLabels,o=this._orient,a=["",""];if(n.get("showDetail")){var s=n.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=Fb(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),r=n.get("labelPrecision");null!=r&&"auto"!==r||(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return x(i)?i(t,o):_(i)?i.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n){this._dragging=!0;var i=lr([e,n],this._displayables.barGroup.getLocalTransform(),!0);this._updateInterval(t,i[0]);var r=this.dataZoomModel.get("realtime");this._updateView(!r),r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,n=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(n[0]<0||n[0]>e[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2;this._updateInterval("all",n[0]-r),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(Hb(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}}),!t){var e=this.api.getWidth(),n=this.api.getHeight();t={x:.2*e,y:.2*n,width:.6*e,height:.6*n}}return t}});Eb.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var jb="\0_ec_interaction_mutex";Qa({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),u(bc,dp);var Yb=v,qb="\0_ec_dataZoom_roams",$b=m,Kb=Rb.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,n,i){Kb.superApply(this,"render",arguments),Lc(i,t.id)&&(this._range=t.getPercentRange()),d(this.getTargetCoordInfo(),function(e,i){var r=f(e,function(t){return Oc(t.model)});d(e,function(e){var o=e.model,a=t.option;kc(n,{coordId:Oc(o),allCoordIds:r,containsPoint:function(t,e,n){return o.coordinateSystem.containPoint([e,n])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:$b(this._onPan,this,e,i),zoomGetRange:$b(this._onZoom,this,e,i),zoomLock:a.zoomLock,disabled:a.disabled,roamControllerOpt:{zoomOnMouseWheel:a.zoomOnMouseWheel,moveOnMouseMove:a.moveOnMouseMove,preventDefaultMouseMove:a.preventDefaultMouseMove}})},this)},this)},dispose:function(){Pc(this.api,this.dataZoomModel.id),Kb.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,n,i,r,o,a,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=Qb[e]([o,a],[s,l],u,n,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return Nb(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,n,i,r,o){var a=this._range.slice(),s=t.axisModels[0];if(s){var l=Qb[e](null,[r,o],s,n,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(a[1]-a[0])+a[0];i=Math.max(1/i,0),a[0]=(a[0]-h)*i+h,a[1]=(a[1]-h)*i+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Nb(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a}}}),Qb={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};Ka({getTargetSeries:function(t){var e=R();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,i){d(i.getAxisProxy(t.name,n).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},isOverallFilter:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,n,i){i.getAxisProxy(t.name,n).reset(i,e)}),t.eachTargetAxis(function(t,n,i){i.getAxisProxy(t.name,n).filterData(i,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setRawRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]},!0)})}}),Qa("dataZoom",function(t,e){var n=sc(m(e.eachComponent,e,"dataZoom"),Db,function(t,e){return t.get(e.axisIndex)}),i=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){i.push.apply(i,n(t).nodes)}),d(i,function(e,n){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Jb={},tS=is({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){tS.superApply(this,"mergeDefaultAndTheme",arguments),d(this.option.feature,function(t,e){var n=Wc(e);n&&i(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});rs({type:"toolbox",render:function(t,e,n,i){function r(r,a){var s,c=u[r],d=u[a],f=new fr(l[c],t,t.ecModel);if(c&&!d){if(Zc(c))s={model:f,onclick:f.option.onclick,featureName:c};else{var p=Wc(c);if(!p)return;s=new p(f,e,n)}h[c]=s}else{if(!(s=h[d]))return;s.model=f,s.ecModel=e,s.api=n}c||!d?f.get("show")&&!s.unusable?(o(f,s,c),f.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},s.render&&s.render(f,e,n,i)):s.remove&&s.remove(e,n):s.dispose&&s.dispose(e,n)}function o(i,r,o){var l=i.getModel("iconStyle"),h=i.getModel("emphasis.iconStyle"),u=r.getIcons?r.getIcons():i.get("icon"),c=i.get("title")||{};if("string"==typeof u){var f=u,p=c;c={},(u={})[o]=f,c[o]=p}var g=i.iconPaths={};d(u,function(o,u){var d=dr(o,{},{x:-s/2,y:-s/2,width:s,height:s});d.setStyle(l.getItemStyle()),d.hoverStyle=h.getItemStyle(),Yi(d),t.get("showTitle")&&(d.__title=c[u],d.on("mouseover",function(){var t=h.getItemStyle();d.setStyle({text:c[u],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){d.setStyle({textFill:null})})),d.trigger(i.get("iconStatus."+u)||"normal"),a.add(d),d.on("click",m(r.onclick,r,e,n,u)),g[u]=d})}var a=this.group;if(a.removeAll(),t.get("show")){var s=+t.get("itemSize"),l=t.get("feature")||{},h=this._features||(this._features={}),u=[];d(l,function(t,e){u.push(e)}),new ls(this._featureNames||[],u).add(r).update(r).remove(v(r,null)).execute(),this._featureNames=u,xu(a,t,n),a.add(_u(a.getBoundingRect(),t)),a.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var r=ce(e,Te(i)),o=t.position[0]+a.position[0],l=!1;t.position[1]+a.position[1]+s+r.height>n.getHeight()&&(i.textPosition="top",l=!0);var h=l?-5-r.height:s+8;o+r.width/2>n.getWidth()?(i.textPosition=["100%",h],i.textAlign="right"):o-r.width/2<0&&(i.textPosition=[0,h],i.textAlign="left")}})}},updateView:function(t,e,n,i){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(t,e){d(this._features,function(n){n.remove&&n.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(n){n.dispose&&n.dispose(t,e)})}});var eS=Hy.toolbox.saveAsImage;Uc.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:eS.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:eS.lang.slice()},Uc.prototype.unusable=!Zf.canvasSupported,Uc.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=n.get("type",!0)||"png";r.download=i+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(r.href=a,"function"!=typeof MouseEvent||Zf.browser.ie||Zf.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(a.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,i+"."+o)}else{var c=n.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(f)}},Hc("saveAsImage",Uc);var nS=Hy.toolbox.magicType;Xc.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:n(nS.title),option:{},seriesIndex:{}};var iS=Xc.prototype;iS.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return d(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var rS={line:function(t,e,n,r){if("bar"===t)return i({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get("option.line")||{},!0)},bar:function(t,e,n,r){if("line"===t)return i({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get("option.bar")||{},!0)},stack:function(t,e,n,r){if("line"===t||"bar"===t)return i({id:e,stack:"__ec_magicType_stack__"},r.get("option.stack")||{},!0)},tiled:function(t,e,n,r){if("line"===t||"bar"===t)return i({id:e,stack:""},r.get("option.tiled")||{},!0)}},oS=[["line","bar"],["stack","tiled"]];iS.onclick=function(t,e,n){var i=this.model,r=i.get("seriesIndex."+n);if(rS[n]){var o={series:[]};d(oS,function(t){l(t,n)>=0&&d(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(e){var r=e.subType,s=e.id,l=rS[n](r,s,e,i);l&&(a(l,e.option),o.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===n||"bar"===n)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var f=0;f<=d;f++)o[c][d]=o[c][d]||{};o[c][d].boundaryGap="bar"===n}}}),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:o})}},Qa({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Hc("magicType",Xc);var aS=Hy.toolbox.dataView,sS=new Array(60).join("-"),lS="\t",hS=new RegExp("["+lS+"]+","g");nd.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n(aS.title),lang:n(aS.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},nd.prototype.onclick=function(t,e){function n(){i.removeChild(o),x._dom=null}var i=e.getDom(),r=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=r.get("textColor");var l=document.createElement("div"),h=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var u=r.get("optionToContent"),c=r.get("contentToOption"),d=$c(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(h),h.readOnly=r.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=r.get("textColor"),h.style.borderColor=r.get("textareaBorderColor"),h.style.backgroundColor=r.get("textareaColor"),h.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;on(v,"click",n),on(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):ed(h.value,p)}catch(t){throw n(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),on(h,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,n=this.selectionStart,i=this.selectionEnd;this.value=e.substring(0,n)+lS+e.substring(i),this.selectionStart=this.selectionEnd=n+1,bg(t)}}),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},nd.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},nd.prototype.dispose=function(t,e){this.remove(t,e)},Hc("dataView",nd),Qa({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var n=[];d(t.newOption.series,function(t){var i=e.getSeriesByName(t.name)[0];if(i){var r=i.get("data");n.push({name:t.name,data:id(t.data,r)})}else n.push(o({type:"scatter"},t))}),e.mergeOption(a({series:n},t.newOption))});var uS=v,cS=d,dS=f,fS=Math.min,pS=Math.max,gS=Math.pow,mS=1e4,vS=6,yS=6,xS="globalPan",_S={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},wS={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},bS={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},SS=0;rd.prototype={constructor:rd,enableBrush:function(t){return this._brushType&&ad(this),t.brushType&&od(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};d(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){cS(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:o+e)+"-"+t.brushType}function r(e,n){var i=t[e];if(null!=n&&a[n]===h)s[e]=a[n];else{var r=s[e]=null!=n?(a[n].__brushOption=i,a[n]):ld(l,sd(l,i));cd(l,r)}}t=f(t,function(t){return i(n(bS),t,!0)});var o="\0-brush-index-",a=this._covers,s=this._covers=[],l=this,h=this._creatingCover;return new ls(a,t,function(t,n){return e(t.__brushOption,n)},e).add(r).update(r).remove(function(t){a[t]!==h&&l.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),gd(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},u(rd,dp);var MS={mousedown:function(t){if(this._dragging)Nd.call(this,t);else if(!t.target||!t.target.draggable){Od(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=fd(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(Ld(this,t,e),this._dragging){Od(t);var n=Ed(this,t,e,!1);n&&md(this,n)}},mouseup:Nd},IS={lineX:Bd(0),lineY:Bd(1),rect:{createCover:function(t,e){return xd(uS(Cd,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=yd(t);return Md(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){_d(t,e,n,i)},updateCommon:wd,contain:zd},polygon:{createCover:function(t,e){var n=new Xp;return n.add(new sv({name:"main",style:Sd(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new av({name:"main",draggable:!0,drift:uS(Ad,t,e),ondragend:uS(md,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:kd(t,e,n)})},updateCommon:wd,contain:zd}},TS={axisPointer:1,tooltip:1,brush:1},CS=d,AS=l,DS=v,kS=["dataToPoint","pointToData"],PS=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],LS=Zd.prototype;LS.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=RS[t.brushType](0,n,e);t.__rangeOffset={offset:NS[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})},LS.matchOutputRanges=function(t,e,n){CS(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&d(i.coordSyses,function(i){var r=RS[t.brushType](1,i,t.range);n(t,r.values,i,e)})},this)},LS.setInputRanges=function(t,e){CS(t,function(t){var n=this.findTargetInfo(t,e);if(t.range=t.range||[],n&&!0!==n){t.panelId=n.panelId;var i=RS[t.brushType](0,n.coordSys,t.coordRange),r=t.__rangeOffset;t.range=r?NS[t.brushType](i.values,r.offset,qd(i.xyMinMax,r.xyMinMax)):i.values}},this)},LS.makePanelOpts=function(t,e){return f(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e&&e(n),clipPath:Fd(i),isTargetByCursor:Hd(i,t,n.coordSysModel),getLinearBrushOtherExtent:Gd(i)}})},LS.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&AS(i.coordSyses,e.coordinateSystem)>=0},LS.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Xd(e,t),r=0;r=0||AS(i,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:ES.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){CS(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:ES.geo})})}},zS=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],ES={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(sr(t)),e}},RS={lineX:DS(jd,0),lineY:DS(jd,1),rect:function(t,e,n){var i=e[kS[t]]([n[0][0],n[1][0]]),r=e[kS[t]]([n[0][1],n[1][1]]),o=[Ud([i[0],r[0]]),Ud([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:f(n,function(n){var r=e[kS[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r}),xyMinMax:i}}},NS={lineX:DS(Yd,0),lineY:DS(Yd,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return f(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}},BS=d,VS="\0_ec_hist_store";Eb.extend({type:"dataZoom.select"}),Rb.extend({type:"dataZoom.select"});var FS=Hy.toolbox.dataZoom,GS=d,HS="\0_ec_\0toolbox-dataZoom_";nf.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n(FS.title)};var WS=nf.prototype;WS.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,af(t,e,this,i,n),of(t,e)},WS.onclick=function(t,e,n){ZS[n].call(this)},WS.remove=function(t,e){this._brushController.unmount()},WS.dispose=function(t,e){this._brushController.dispose()};var ZS={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Qd(this.ecModel))}};WS._onBrush=function(t,e){function n(t,e,n){var a=e.getAxis(t),s=a.model,l=i(t,s,o),h=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==h.minValueSpan&&null==h.maxValueSpan||(n=Nb(0,n.slice(),a.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),l&&(r[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}function i(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)}),i}if(e.isEnd&&t.length){var r={},o=this.ecModel;this._brushController.updateCovers([]),new Zd(rf(this.model.option),o,{include:["grid"]}).matchOutputRanges(t,o,function(t,e,i){if("cartesian2d"===i.type){var r=t.brushType;"rect"===r?(n("x",i,e[0]),n("y",i,e[1])):n({lineX:"x",lineY:"y"}[r],i,e)}}),Kd(o,r),this._dispatchZoomAction(r)}},WS._dispatchZoomAction=function(t){var e=[];GS(t,function(t,i){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Hc("dataZoom",nf),$a(function(t){function e(t,e){if(e){var r=t+"Index",o=e[r];null==o||"all"==o||y(o)||(o=!1===o||"none"===o?[]:[o]),n(t,function(e,n){if(null==o||"all"==o||-1!==l(o,n)){var a={type:"select",$fromToolbox:!0,id:HS+t+n};a[r]=n,i.push(a)}})}}function n(e,n){var i=t[e];y(i)||(i=i?[i]:[]),GS(i,n)}if(t){var i=t.dataZoom||(t.dataZoom=[]);y(i)||(t.dataZoom=i=[i]);var r=t.toolbox;if(r&&(y(r)&&(r=r[0]),r&&r.feature)){var o=r.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}});var US=Hy.toolbox.restore;sf.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:US.title},sf.prototype.onclick=function(t,e,n){Jd(t),e.dispatchAction({type:"restore",from:this.uid})},Hc("restore",sf),Qa({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var XS,jS="urn:schemas-microsoft-com:vml",YS="undefined"==typeof window?null:window,qS=!1,$S=YS&&YS.document;if($S&&!Zf.canvasSupported)try{!$S.namespaces.zrvml&&$S.namespaces.add("zrvml",jS),XS=function(t){return $S.createElement("')}}catch(t){XS=function(t){return $S.createElement("<"+t+' xmlns="'+jS+'" class="zrvml">')}}var KS=Am.CMD,QS=Math.round,JS=Math.sqrt,tM=Math.abs,eM=Math.cos,nM=Math.sin,iM=Math.max;if(!Zf.canvasSupported){var rM=21600,oM=rM/2,aM=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=rM+","+rM,t.coordorigin="0,0"},sM=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},lM=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},hM=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},uM=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},cM=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},dM=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},fM=function(t,e,n){var i=Mt(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=lM(i[0],i[1],i[2]),t.opacity=n*i[3])},pM=function(t){var e=Mt(t);return[lM(e[0],e[1],e[2]),e[3]]},gM=function(t,e,n){var i=e.fill;if(null!=i)if(i instanceof pv){var r,o=0,a=[0,0],s=0,l=1,h=n.getBoundingRect(),u=h.width,c=h.height;if("linear"===i.type){r="gradient";var d=n.transform,f=[i.x*u,i.y*c],p=[i.x2*u,i.y2*c];d&&($(f,f,d),$(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(o=180*Math.atan2(g,m)/Math.PI)<0&&(o+=360),o<1e-6&&(o=0)}else{r="gradientradial";var f=[i.x*u,i.y*c],d=n.transform,v=n.scale,y=u,x=c;a=[(f[0]-h.x)/y,(f[1]-h.y)/x],d&&$(f,f,d),y/=v[0]*rM,x/=v[1]*rM;var _=iM(y,x);s=0/_,l=2*i.r/_-s}var w=i.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I=2){var A=S[0][0],D=S[1][0],k=S[0][1]*e.opacity,P=S[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=o,t.color=A,t.color2=D,t.colors=M.join(","),t.opacity=P,t.opacity2=k}"radial"===r&&(t.focusposition=a.join(","))}else fM(t,i,e.opacity)},mM=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof pv||fM(t,e.stroke,e.opacity)},vM=function(t,e,n,i){var r="fill"==e,o=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof pv&&uM(t,o),o||(o=lf(e)),r?gM(o,n,i):mM(o,n),hM(t,o)):(t[r?"filled":"stroked"]="false",uM(t,o))},yM=[[],[],[]],xM=function(t,e){var n,i,r,o,a,s,l=KS.M,h=KS.C,u=KS.L,c=KS.A,d=KS.Q,f=[],p=t.data,g=t.len();for(o=0;o.01?O&&(z+=.0125):Math.abs(E-A)<1e-4?O&&zC?x-=.0125:x+=.0125:O&&EA?y+=.0125:y-=.0125),f.push(R,QS(((C-D)*M+b)*rM-oM),",",QS(((A-k)*I+S)*rM-oM),",",QS(((C+D)*M+b)*rM-oM),",",QS(((A+k)*I+S)*rM-oM),",",QS((z*M+b)*rM-oM),",",QS((E*I+S)*rM-oM),",",QS((y*M+b)*rM-oM),",",QS((x*I+S)*rM-oM)),a=y,s=x;break;case KS.R:var N=yM[0],B=yM[1];N[0]=p[o++],N[1]=p[o++],B[0]=N[0]+p[o++],B[1]=N[1]+p[o++],e&&($(N,N,e),$(B,B,e)),N[0]=QS(N[0]*rM-oM),B[0]=QS(B[0]*rM-oM),N[1]=QS(N[1]*rM-oM),B[1]=QS(B[1]*rM-oM),f.push(" m ",N[0],",",N[1]," l ",B[0],",",N[1]," l ",B[0],",",B[1]," l ",N[0],",",B[1]);break;case KS.Z:f.push(" x ")}if(n>0){f.push(i);for(var V=0;V100&&(SM=0,bM={});var n,i=MM.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(t){}e={style:i.fontStyle||"normal",variant:i.fontVariant||"normal",weight:i.fontWeight||"normal",size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},bM[t]=e,SM++}return e};!function(t,e){dg[t]=e}("measureText",function(t,e){var n=$S;wM||((wM=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",$S.body.appendChild(wM));try{wM.style.font=e}catch(t){}return wM.innerHTML="",wM.appendChild(n.createTextNode(t)),{width:wM.offsetWidth}});for(var TM=new Xt,CM=[mg,Xe,je,yi,Qm],AM=0;AM=r&&h+1>=o){for(var u=[],c=0;c=r&&c+1>=o)return If(0,s.components);l[n]=s}else l[n]=void 0}a++}();if(d)return d}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,o=n.length,a=t.newPos,s=a-i,l=0;a+1=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},Cf.prototype.update=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},Cf.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Cf.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Cf.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(n){var i=t.getElementsByTagName(n);e=e.concat([].slice.call(i))}),e},Cf.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},Cf.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Cf.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(n){"1"!==n[e._markLabel]&&t.removeChild(n)})}},Cf.prototype.getSvgProxy=function(t){return t instanceof yi?GM:t instanceof je?HM:t instanceof Qm?WM:GM},Cf.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Cf.prototype.getSvgElement=function(t){return t.__svgEl},h(Af,Cf),Af.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;d(["fill","stroke"],function(i){if(e.style[i]&&("linear"===e.style[i].type||"radial"===e.style[i].type)){var r,o=e.style[i],a=n.getDefs(!0);o._dom?(r=o._dom,a.contains(o._dom)||n.addDom(r)):r=n.add(o),n.markUsed(e);var s=r.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}})}},Af.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Fp("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Af.prototype.update=function(t){var e=this;Cf.prototype.update.call(this,t,function(){var n=t.type,i=t._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},Af.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Fp("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,r=n.length;i0){var i,r,o=this.getDefs(!0),a=e[0],s=n?"_textDom":"_dom";a[s]?(r=a[s].getAttribute("id"),i=a[s],o.contains(i)||o.appendChild(i)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(i),a[s]=i);var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!n){var h=Array.prototype.slice.call(a.transform);st(a.transform,a.parent.invTransform,a.transform),l.brush(a),a.transform=h}else l.brush(a);var u=this.getSvgElement(a);i.innerHTML="",i.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(i,e.slice(1),n)}else t&&t.setAttribute("clip-path","none")},Df.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&Cf.prototype.markUsed.call(e,t._dom),t._textDom&&Cf.prototype.markUsed.call(e,t._textDom)})},h(kf,Cf),kf.prototype.addWithoutUpdate=function(t,e){if(e&&Pf(e.style)){var n,i=e.style;i._shadowDom?(n=i._shadowDom,this.getDefs(!0).contains(i._shadowDom)||this.addDom(n)):n=this.add(e),this.markUsed(e);var r=n.getAttribute("id");t.style.filter="url(#"+r+")"}},kf.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},kf.prototype.update=function(t,e){var n=e.style;if(Pf(n)){var i=this;Cf.prototype.update.call(this,e,function(t){i.updateDom(e,t._shadowDom)})}else this.remove(t,n)},kf.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},kf.prototype.updateDom=function(t,e){var n=e.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,r,o,a,s=t.style,l=t.scale?t.scale[0]||1:1,h=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);i=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",r/h),n.setAttribute("flood-color",a);var u=o/2/l+" "+o/2/h;n.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(n),s._shadowDom=e},kf.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&Cf.prototype.markUsed.call(this,e._shadowDom)};var YM=function(t,e,n,i){this.root=t,this.storage=e,this._opts=n=o({},n||{});var r=ff("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new Af(i,r),this.clipPathManager=new Df(i,r),this.shadowManager=new kf(i,r);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=a,t.appendChild(a),a.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]};YM.prototype={constructor:YM,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,n=this._svgRoot,i=this._visibleList,r=t.length,o=[];for(e=0;e=0;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||Lf(s[n])||Lf(a.style[n]))-(Lf(s[r])||0)-(Lf(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){YM.prototype[t]=Ff(t)}),vn("svg",YM),t.version="4.0.2",t.dependencies=ox,t.PRIORITY=hx,t.init=function(t,e,n){var i=Ya(t);if(i)return i;var r=new Ta(t,e,n);return r.id="ec_"+Cx++,Ix[r.id]=r,kn(t,Dx,r.id),Xa(r),r},t.connect=function(t){if(y(t)){var e=t;t=null,ex(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+Ax++,ex(e,function(e){e.group=t})}return Tx[t]=!0,t},t.disConnect=ja,t.disconnect=Px,t.dispose=function(t){"string"==typeof t?t=Ix[t]:t instanceof Ta||(t=Ya(t)),t instanceof Ta&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=Ya,t.getInstanceById=function(t){return Ix[t]},t.registerTheme=qa,t.registerPreprocessor=$a,t.registerProcessor=Ka,t.registerPostUpdate=function(t){_x.push(t)},t.registerAction=Qa,t.registerCoordinateSystem=function(t,e){mo.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=mo.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=Ja,t.registerVisual=ts,t.registerLoading=ns,t.extendComponentModel=is,t.extendComponentView=rs,t.extendSeriesModel=os,t.extendChartView=as,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,n){e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),kx[t]={geoJson:e,specialAreas:n}},t.getMap=function(t){return kx[t]},t.dataTool=Lx,t.zrender=Rg,t.graphic=bv,t.number=Lv,t.format=Vv,t.throttle=aa,t.helper=__,t.matrix=vp,t.vector=up,t.color=zp,t.parseGeoJSON=b_,t.parseGeoJson=T_,t.util=C_,t.List=Fx,t.Model=fr,t.Axis=I_,t.env=Zf});