/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
!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&&(ou=null),ru[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=Qh.call(t);if("[object Array]"===i){if(!E(t)){e=[];for(var r=0,a=t.length;r=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&et(t,r,e,n)}else et(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&pu.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function rt(t,e,n){du?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function at(t,e,n){du?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}function ot(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function st(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function lt(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ht}}function ht(t){gu(this.event)}function ut(){}function ct(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||yu}return!1}function ft(){var t=new wu(6);return dt(t),t}function dt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function pt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function gt(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function vt(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function mt(t,e,n){var i=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(n),u=Math.cos(n);return t[0]=i*u+o*h,t[1]=-i*h+o*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t}function yt(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function _t(t,e){var n=e[0],i=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=n*o-a*i;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-o*r)*l,t[5]=(a*r-n*s)*l,t):null}function xt(t){return t>Su||t<-Su}function wt(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 bt(t){return(t=Math.round(t))<0?0:t>255?255:t}function St(t){return t<0?0:t>1?1:t}function Mt(t){return bt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function It(t){return St(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Tt(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 Ct(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function kt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Dt(t,e){zu&&kt(zu,e),zu=Bu.put(t,zu||e.slice())}function At(t,e){if(t){e=e||[];var n=Bu.get(t);if(n)return kt(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Nu)return kt(e,Nu[i]),Dt(t,e),e;if("#"!==i.charAt(0)){var r=i.indexOf("("),a=i.indexOf(")");if(-1!==r&&a+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,a-(r+1)).split(","),l=1;switch(o){case"rgba":if(4!==s.length)return void Ct(e,0,0,0,1);l=It(s.pop());case"rgb":return 3!==s.length?void Ct(e,0,0,0,1):(Ct(e,Mt(s[0]),Mt(s[1]),Mt(s[2]),l),Dt(t,e),e);case"hsla":return 4!==s.length?void Ct(e,0,0,0,1):(s[3]=It(s[3]),Lt(s,e),Dt(t,e),e);case"hsl":return 3!==s.length?void Ct(e,0,0,0,1):(Lt(s,e),Dt(t,e),e);default:return}}Ct(e,0,0,0,1)}else{if(4===i.length)return(h=parseInt(i.substr(1),16))>=0&&h<=4095?(Ct(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),Dt(t,e),e):void Ct(e,0,0,0,1);if(7===i.length){var h=parseInt(i.substr(1),16);return h>=0&&h<=16777215?(Ct(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),Dt(t,e),e):void Ct(e,0,0,0,1)}}}}function Lt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=It(t[1]),r=It(t[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return e=e||[],Ct(e,bt(255*Tt(o,a,n+1/3)),bt(255*Tt(o,a,n)),bt(255*Tt(o,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Pt(t,e){var n=At(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,n[i]>255?n[i]=255:t[i]<0&&(n[i]=0);return Ot(n,4===n.length?"rgba":"rgb")}}function Ot(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 Et(t,e){return t[e]}function Nt(t,e,n){t[e]=n}function Bt(t,e,n){return(e-t)*n+t}function zt(t,e,n){return n>.5?e:t}function Rt(t,e,n,i,r){var a=t.length;if(1===r)for(s=0;sr)t.length=r;else for(o=i;o=0&&!(v[n]<=e);n--);n=Math.min(n,h-2)}else{for(n=A;ne);n++);n=Math.min(n-1,h-2)}A=n,L=e;var i=v[n+1]-v[n];if(0!==i)if(I=(e-v[n])/i,l)if(C=m[n],T=m[0===n?n:n-1],k=m[n>h-2?h-1:n+1],D=m[n>h-3?h-1:n+2],f)Wt(T,C,k,D,I,I*I,I*I*I,o(t,r),g);else{if(d)a=Wt(T,C,k,D,I,I*I,I*I*I,P,1),a=Xt(P);else{if(p)return zt(C,k,I);a=Ht(T,C,k,D,I,I*I,I*I*I)}s(t,r,a)}else if(f)Rt(m[n],m[n+1],I,o(t,r),g);else{var a;if(d)Rt(m[n],m[n+1],I,P,1),a=Xt(P);else{if(p)return zt(m[n],m[n+1],I);a=Bt(m[n],m[n+1],I)}s(t,r,a)}},ondestroy:n});return e&&"spline"!==e&&(O.easing=e),O}}}function Ut(t,e,n,i,r,a,o,s){x(i)?(a=r,r=i,i=0):_(r)?(a=r,r="linear",i=0):_(i)?(a=i,i=0):_(n)?(a=n,n=500):n||(n=500),t.stopAnimation(),jt(t,"",t,e,n,i,s);var l=t.animators.slice(),h=l.length;h||a&&a();for(var u=0;u0&&t.animate(e,!1).when(null==r?500:r,s).delay(a||0)}function Zt(t,e,n,i){if(e){var r={};r[e]={},r[e][n]=i,t.attr(r)}else t.attr(n,i)}function $t(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 Qt(t){for(var e=0;t>=$u;)e|=1&t,t>>=1;return t+e}function Kt(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 Jt(t,e,n){for(n--;e>>1])<0?l=a:s=a+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]=o}}function ee(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])>0){for(s=i-r;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;ls&&(l=s);var h=o;o=r-l,l=r-h}for(o++;o>>1);a(t,e[n+u])>0?o=u+1:l=u}return l}function ne(t,e,n,i,r,a){var o=0,s=0,l=1;if(a(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=i-r;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o>>1);a(t,e[n+u])<0?l=u:o=u+1}return l}function ie(t,e){function n(n){var s=a[n],h=o[n],u=a[n+1],c=o[n+1];o[n]=h+c,n===l-3&&(a[n+1]=a[n+2],o[n+1]=o[n+2]),l--;var f=ne(t[u],t,s,h,0,e);s+=f,0!==(h-=f)&&0!==(c=ee(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,a){var o=0;for(o=0;o=Qu||d>=Qu);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===i){for(o=0;o=0;o--)t[d+o]=t[f+o];if(0===i){m=!0;break}}if(t[c--]=h[u--],1==--a){m=!0;break}if(0!=(v=a-ee(t[l],h,0,a,a-1,e))){for(a-=v,d=(c-=v)+1,f=(u-=v)+1,o=0;o=Qu||v>=Qu);if(m)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(d=(c-=i)+1,f=(l-=i)+1,o=i-1;o>=0;o--)t[d+o]=t[f+o];t[c]=h[u]}else{if(0===a)throw new Error;for(f=c-(a-1),o=0;o=0;o--)t[d+o]=t[f+o];t[c]=h[u]}else for(f=c-(a-1),o=0;o1;){var t=l-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;n(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&o[t-1]s&&(l=s),te(t,n,n+l,n+a,e),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}function ae(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function oe(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(i,a,r,o)}function se(t,e,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*i+n.x,s=s*r+n.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}function le(){return!1}function he(t,e,n){var i=au(),r=e.getWidth(),a=e.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=a*n,i}function ue(t){if("string"==typeof t){var e=cc.get(t);return e&&e.image}return t}function ce(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var a=cc.get(t),o={hostEl:n,cb:i,cbPayload:r};return a?!de(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=fe,cc.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function fe(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;epc&&(dc=0,fc={}),dc++,fc[n]=r,r}function ge(t,e,n,i,r,a,o,s){return o?me(t,e,n,i,r,a,o,s):ve(t,e,n,i,r,a,s)}function ve(t,e,n,i,r,a,o){var s=Ce(t,e,r,a,o),l=pe(t,e);r&&(l+=r[1]+r[3]);var h=s.outerHeight,u=new $t(ye(0,l,n),_e(0,h,i),l,h);return u.lineHeight=s.lineHeight,u}function me(t,e,n,i,r,a,o,s){var l=ke(t,{rich:o,truncate:s,font:e,textAlign:n,textPadding:r,textLineHeight:a}),h=l.outerWidth,u=l.outerHeight;return new $t(ye(0,h,n),_e(0,u,i),h,u)}function ye(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function _e(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function xe(t,e,n){var i=e.x,r=e.y,a=e.height,o=e.width,s=a/2,l="left",h="top";switch(t){case"left":i-=n,r+=s,l="right",h="middle";break;case"right":i+=n+o,r+=s,h="middle";break;case"top":i+=o/2,r-=n,l="center",h="bottom";break;case"bottom":i+=o/2,r+=a+n,l="center";break;case"inside":i+=o/2,r+=s,l="center",h="middle";break;case"insideLeft":i+=n,r+=s,h="middle";break;case"insideRight":i+=o-n,r+=s,l="right",h="middle";break;case"insideTop":i+=o/2,r+=n,l="center";break;case"insideBottom":i+=o/2,r+=a-n,l="center",h="bottom";break;case"insideTopLeft":i+=n,r+=n;break;case"insideTopRight":i+=o-n,r+=n,l="right";break;case"insideBottomLeft":i+=n,r+=a-n,h="bottom";break;case"insideBottomRight":i+=o-n,r+=a-n,l="right",h="bottom"}return{x:i,y:r,textAlign:l,textVerticalAlign:h}}function we(t,e,n,i,r){if(!e)return"";var a=(t+"").split("\n");r=be(e,n,i,r);for(var o=0,s=a.length;o=o;l++)s-=o;var h=pe(n,e);return h>s&&(n="",h=0),s=t-h,i.ellipsis=n,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=t,i}function Se(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var a=pe(t,i);if(a<=n)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?Me(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=pe(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function Me(t,e,n,i){for(var r=0,a=0,o=t.length;ah)t="",o=[];else if(null!=u)for(var c=be(u-(n?n[1]+n[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,d=o.length;fr&&De(n,t.substring(r,a)),De(n,i[2],i[1]),r=gc.lastIndex}rd)return{lines:[],width:0,height:0};L.textWidth=pe(L.text,x);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))L.percentWidth=b,h.push(L),b=0;else{if(S){b=L.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&de(I=ue(I))&&(b=Math.max(b,I.width*w/I.height))}var T=_?_[1]+_[3]:0;b+=T;var D=null!=f?f-v:null;null!=D&&Dl&&(n*=l/(c=n+i),i*=l/c),r+a>l&&(r*=l/(c=r+a),a*=l/c),i+r>h&&(i*=h/(c=i+r),r*=h/c),n+a>h&&(n*=h/(c=n+a),a*=h/c),t.moveTo(o+n,s),t.lineTo(o+l-i,s),0!==i&&t.arc(o+l-i,s+i,i,-Math.PI/2,0),t.lineTo(o+l,s+h-r),0!==r&&t.arc(o+l-r,s+h-r,r,0,Math.PI/2),t.lineTo(o+a,s+h),0!==a&&t.arc(o+a,s+h-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+n),0!==n&&t.arc(o+n,s+n,n,Math.PI,1.5*Math.PI)}function Pe(t){return Oe(t),f(t.rich,Oe),t}function Oe(t){if(t){t.font=Ae(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||_c[e]?e:"left";var n=t.textVerticalAlign||t.textBaseline;"center"===n&&(n="middle"),t.textVerticalAlign=null==n||xc[n]?n:"top",t.textPadding&&(t.textPadding=A(t.textPadding))}}function Ee(t,e,n,i,r,a){i.rich?Be(t,e,n,i,r,a):Ne(t,e,n,i,r,a)}function Ne(t,e,n,i,r,a){var o,s=Ve(i),l=!1,h=e.__attrCachedBy===ec.PLAIN_TEXT;a!==nc?(a&&(o=a.style,l=!s&&h&&o),e.__attrCachedBy=s?ec.NONE:ec.PLAIN_TEXT):h&&(e.__attrCachedBy=ec.NONE);var u=i.font||yc;l&&u===(o.font||yc)||(e.font=u);var c=t.__computedFont;t.__styleFont!==u&&(t.__styleFont=u,c=t.__computedFont=e.font);var f=i.textPadding,d=i.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Ce(n,c,f,d,i.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=Ge(g,i,r),_=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;Re(e,i,r,_,x);var S=_e(x,g,b),M=_,I=S;if(s||f){var T=pe(n,c);f&&(T+=f[1]+f[3]);var C=ye(_,T,w);s&&We(t,e,i,C,S,T,g),f&&(M=je(_,w,f),I+=f[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=i.opacity||1;for(R=0;R=0&&"right"===(x=b[D]).textAlign;)Fe(t,e,x,i,M,m,k,"right"),I-=x.width,k-=x.width,D--;for(C+=(a-(C-v)-(y-k)-I)/2;T<=D;)Fe(t,e,x=b[T],i,M,m,C+x.width/2,"center"),C+=x.width,T++;m+=M}}function Re(t,e,n,i,r){if(n&&e.textRotation){var a=e.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),t.translate(i,r),t.rotate(-e.textRotation),t.translate(-i,-r)}}function Fe(t,e,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var h=n.textVerticalAlign,u=a+r/2;"top"===h?u=a+n.height/2:"bottom"===h&&(u=a+r-n.height/2),!n.isLineHolder&&Ve(l)&&We(t,e,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,u-n.height/2,n.width,n.height);var c=n.textPadding;c&&(o=je(o,s,c),u-=n.height/2-c[2]-n.textHeight/2),Xe(e,"shadowBlur",k(l.textShadowBlur,i.textShadowBlur,0)),Xe(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Xe(e,"shadowOffsetX",k(l.textShadowOffsetX,i.textShadowOffsetX,0)),Xe(e,"shadowOffsetY",k(l.textShadowOffsetY,i.textShadowOffsetY,0)),Xe(e,"textAlign",s),Xe(e,"textBaseline","middle"),Xe(e,"font",n.font||yc);var f=qe(l.textStroke||i.textStroke,p),d=Ye(l.textFill||i.textFill),p=C(l.textStrokeWidth,i.textStrokeWidth);f&&(Xe(e,"lineWidth",p),Xe(e,"strokeStyle",f),e.strokeText(n.text,o,u)),d&&(Xe(e,"fillStyle",d),e.fillText(n.text,o,u))}function Ve(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function We(t,e,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,h=n.textBorderColor,u=x(s);if(Xe(e,"shadowBlur",n.textBoxShadowBlur||0),Xe(e,"shadowColor",n.textBoxShadowColor||"transparent"),Xe(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Xe(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=n.textBorderRadius;c?Le(e,{x:i,y:r,width:a,height:o,r:c}):e.rect(i,r,a,o),e.closePath()}if(u)if(Xe(e,"fillStyle",s),null!=n.fillOpacity){d=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(w(s)){var f=s.image;(f=ce(f,null,t,He,s))&&de(f)&&e.drawImage(f,i,r,a,o)}if(l&&h)if(Xe(e,"lineWidth",l),Xe(e,"strokeStyle",h),null!=n.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function He(t,e){e.image=t}function Ge(t,e,n){var i=e.x||0,r=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(n){var s=e.textPosition;if(s instanceof Array)i=n.x+Ue(s[0],n.width),r=n.y+Ue(s[1],n.height);else{var l=xe(s,n,e.textDistance);i=l.x,r=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(i+=h[0],r+=h[1])}return{baseX:i,baseY:r,textAlign:a,textVerticalAlign:o}}function Xe(t,e,n){return t[e]=tc(t,e,n),t[e]}function qe(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ye(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ue(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function je(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ze(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function $e(t){t=t||{},qu.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new rc(t.style,this),this._rect=null,this.__clipPaths=[]}function Qe(t){$e.call(this,t)}function Ke(t){return parseInt(t,10)}function Je(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function tn(t,e,n){return Mc.copy(t.getBoundingRect()),t.transform&&Mc.applyTransform(t.transform),Ic.width=e,Ic.height=n,!Mc.intersect(Ic)}function en(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n=n.length&&n.push({option:t})}}),n}function vn(t){var e=B();zc(t,function(t,n){var i=t.exist;i&&e.set(i.id,t)}),zc(t,function(t,n){var i=t.option;L(!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={})}),zc(t,function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(Rc(r)){if(a.name=null!=r.name?r.name+"":i?i.name:Vc+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}})}function mn(t){var e=t.name;return!(!e||!e.indexOf(Vc))}function yn(t){return Rc(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function _n(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?d(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?d(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function xn(){var t="__\0ec_inner_"+Hc+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function wn(t,e,n){if(x(e)){var i={};i[e+"Index"]=0,e=i}var r=n&&n.defaultMainType;!r||bn(e,r+"Index")||bn(e,r+"Id")||bn(e,r+"Name")||(e[r+"Index"]=0);var a={};return zc(e,function(i,r){var i=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],h=(o[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);a[s+"Models"]=c,a[s+"Model"]=c[0]}}else a[r]=i}),a}function bn(t,e){return t&&t.hasOwnProperty(e)}function Sn(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Mn(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function In(t){return"auto"===t?jh.domSupported?"html":"richText":t||"html"}function Tn(t){var e={main:"",sub:""};return t&&(t=t.split(Gc),e.main=t[0]||"",e.sub=t[1]||""),e}function Cn(t){L(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function kn(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 a(n.prototype,t),n.extend=this.extend,n.superCall=An,n.superApply=Ln,h(n,this),n.superClass=e,n}}function Dn(t){var e=["__\0is_clz",qc++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function An(t,e){var n=D(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Ln(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Pn(t,e){function n(t){var e=i[t.main];return e&&e[Xc]||((e=i[t.main]={})[Xc]=!0),e}e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(Cn(e),(e=Tn(e)).sub?e.sub!==Xc&&(n(e)[e.sub]=t):i[e.main]=t),t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Xc]&&(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=Tn(t);var e=[],n=i[t.main];return n&&n[Xc]?f(n,function(t,n){n!==Xc&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=Tn(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(i,function(e,n){t.push(n)}),t},t.hasSubTypes=function(t){t=Tn(t);var e=i[t.main];return e&&e[Xc]},t.parseClassType=Tn,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 On(t){return t>-Jc&&tJc||t<-Jc}function Nn(t,e,n,i,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*i+3*a*n)}function Bn(t,e,n,i,r){var a=1-r;return 3*(((e-t)*a+2*(n-e)*r)*a+(i-n)*r*r)}function zn(t,e,n,i,r,a){var o=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*o*l,c=s*l-9*o*h,f=l*l-3*s*h,d=0;if(On(u)&&On(c))On(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[d++]=M);else{var p=c*c-4*u*f;if(On(p)){var g=c/u,v=-g/2;(M=-s/o+g)>=0&&M<=1&&(a[d++]=M),v>=0&&v<=1&&(a[d++]=v)}else if(p>0){var m=Kc(p),y=u*s+1.5*o*(-c+m),_=u*s+1.5*o*(-c-m);(M=(-s-((y=y<0?-Qc(-y,nf):Qc(y,nf))+(_=_<0?-Qc(-_,nf):Qc(_,nf))))/(3*o))>=0&&M<=1&&(a[d++]=M)}else{var x=(2*u*s-3*o*c)/(2*Kc(u*u*u)),w=Math.acos(x)/3,b=Kc(u),S=Math.cos(w),M=(-s-2*b*S)/(3*o),v=(-s+b*(S+ef*Math.sin(w)))/(3*o),I=(-s+b*(S-ef*Math.sin(w)))/(3*o);M>=0&&M<=1&&(a[d++]=M),v>=0&&v<=1&&(a[d++]=v),I>=0&&I<=1&&(a[d++]=I)}}return d}function Rn(t,e,n,i,r){var a=6*n-12*e+6*t,o=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(On(o))En(a)&&(c=-s/a)>=0&&c<=1&&(r[l++]=c);else{var h=a*a-4*o*s;if(On(h))r[0]=-a/(2*o);else if(h>0){var u=Kc(h),c=(-a+u)/(2*o),f=(-a-u)/(2*o);c>=0&&c<=1&&(r[l++]=c),f>=0&&f<=1&&(r[l++]=f)}}return l}function Fn(t,e,n,i,r,a){var o=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=i}function Vn(t,e,n,i,r,a,o,s,l,h,u){var c,f,d,p,g,v=.005,m=1/0;rf[0]=l,rf[1]=h;for(var y=0;y<1;y+=.05)af[0]=Nn(t,n,r,o,y),af[1]=Nn(e,i,a,s,y),(p=uu(rf,af))=0&&p=0&&c<=1&&(r[l++]=c);else{var h=o*o-4*a*s;if(On(h))(c=-o/(2*a))>=0&&c<=1&&(r[l++]=c);else if(h>0){var u=Kc(h),c=(-o+u)/(2*a),f=(-o-u)/(2*a);c>=0&&c<=1&&(r[l++]=c),f>=0&&f<=1&&(r[l++]=f)}}return l}function Xn(t,e,n){var i=t+n-2*e;return 0===i?.5:(t-e)/i}function qn(t,e,n,i,r){var a=(e-t)*i+t,o=(n-e)*i+e,s=(o-a)*i+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n}function Yn(t,e,n,i,r,a,o,s,l){var h,u=.005,c=1/0;rf[0]=o,rf[1]=s;for(var f=0;f<1;f+=.05)af[0]=Wn(t,n,r,f),af[1]=Wn(e,i,a,f),(v=uu(rf,af))=0&&v1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(ff[0]=uf(r)*n+t,ff[1]=hf(r)*i+e,df[0]=uf(a)*n+t,df[1]=hf(a)*i+e,h(s,ff,df),u(l,ff,df),(r%=cf)<0&&(r+=cf),(a%=cf)<0&&(a+=cf),r>a&&!o?a+=cf:rr&&(pf[0]=uf(d)*n+t,pf[1]=hf(d)*i+e,h(s,pf,s),u(l,pf,l))}function Qn(t,e,n,i,r,a,o){if(0===r)return!1;var s=r,l=0,h=t;if(o>e+s&&o>i+s||ot+s&&a>n+s||ae+c&&u>i+c&&u>a+c&&u>s+c||ut+c&&h>n+c&&h>r+c&&h>o+c||he+h&&l>i+h&&l>a+h||lt+h&&s>n+h&&s>r+h||sn||u+hr&&(r+=Lf);var f=Math.atan2(l,s);return f<0&&(f+=Lf),f>=i&&f<=r||f+Lf>=i&&f+Lf<=r}function ni(t,e,n,i,r,a){if(a>e&&a>i||ar?o:0}function ii(t,e){return Math.abs(t-e)e&&h>i&&h>a&&h>s||h1&&ri(),c=Nn(e,i,a,s,Bf[0]),p>1&&(f=Nn(e,i,a,s,Bf[1]))),2===p?ve&&s>i&&s>a||s=0&&h<=1){for(var u=0,c=Wn(e,i,a,h),f=0;fn||s<-n)return 0;h=Math.sqrt(n*n-s*s);Nf[0]=-h,Nf[1]=h;var l=Math.abs(i-r);if(l<1e-4)return 0;if(l%Of<1e-4){i=0,r=Of;p=a?1:-1;return o>=Nf[0]+t&&o<=Nf[1]+t?p:0}if(a){var h=i;i=ti(r),r=ti(h)}else i=ti(i),r=ti(r);i>r&&(r+=Of);for(var u=0,c=0;c<2;c++){var f=Nf[c];if(f+t>o){var d=Math.atan2(s,f),p=a?1:-1;d<0&&(d=Of+d),(d>=i&&d<=r||d+Of>=i&&d+Of<=r)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),u+=p)}}return u}function li(t,e,n,i,r){for(var a=0,o=0,s=0,l=0,h=0,u=0;u1&&(n||(a+=ni(o,s,l,h,i,r))),1===u&&(l=o=t[u],h=s=t[u+1]),c){case Pf.M:o=l=t[u++],s=h=t[u++];break;case Pf.L:if(n){if(Qn(o,s,t[u],t[u+1],e,i,r))return!0}else a+=ni(o,s,t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case Pf.C:if(n){if(Kn(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else a+=ai(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case Pf.Q:if(n){if(Jn(o,s,t[u++],t[u++],t[u],t[u+1],e,i,r))return!0}else a+=oi(o,s,t[u++],t[u++],t[u],t[u+1],i,r)||0;o=t[u++],s=t[u++];break;case Pf.A:var f=t[u++],d=t[u++],p=t[u++],g=t[u++],v=t[u++],m=t[u++];u+=1;var y=1-t[u++],_=Math.cos(v)*p+f,x=Math.sin(v)*g+d;u>1?a+=ni(o,s,_,x,i,r):(l=_,h=x);var w=(i-f)*g/p+f;if(n){if(ei(f,d,g,v,v+m,y,e,w,r))return!0}else a+=si(f,d,g,v,v+m,y,w,r);o=Math.cos(v+m)*p+f,s=Math.sin(v+m)*g+d;break;case Pf.R:l=o=t[u++],h=s=t[u++];var _=l+t[u++],x=h+t[u++];if(n){if(Qn(l,h,_,h,e,i,r)||Qn(_,h,_,x,e,i,r)||Qn(_,x,l,x,e,i,r)||Qn(l,x,l,h,e,i,r))return!0}else a+=ni(_,h,_,x,i,r),a+=ni(l,x,l,h,i,r);break;case Pf.Z:if(n){if(Qn(o,s,l,h,e,i,r))return!0}else a+=ni(o,s,l,h,i,r);o=l,s=h}}return n||ii(s,h)||(a+=ni(o,s,l,h,i,r)||0),0!==a}function hi(t,e,n){return li(t,0,!1,e,n)}function ui(t,e,n,i){return li(t,e,!0,n,i)}function ci(t){$e.call(this,t),this.path=null}function fi(t,e,n,i,r,a,o,s,l,h,u){var c=l*(jf/180),f=Uf(c)*(t-n)/2+Yf(c)*(e-i)/2,d=-1*Yf(c)*(t-n)/2+Uf(c)*(e-i)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=qf(p),s*=qf(p));var g=(r===a?-1:1)*qf((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,v=g*o*d/s,m=g*-s*f/o,y=(t+n)/2+Uf(c)*v-Yf(c)*m,_=(e+i)/2+Yf(c)*v+Uf(c)*m,x=Qf([1,0],[(f-v)/o,(d-m)/s]),w=[(f-v)/o,(d-m)/s],b=[(-1*f-v)/o,(-1*d-m)/s],S=Qf(w,b);$f(w,b)<=-1&&(S=jf),$f(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*jf),1===a&&S<0&&(S+=2*jf),u.addData(h,y,_,o,s,x,S,c,a)}function di(t){if(!t)return new Df;for(var e,n=0,i=0,r=n,a=i,o=new Df,s=Df.CMD,l=t.match(Kf),h=0;h=2){if(r&&"spline"!==r){var a=sd(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],h=a[2*s+1],u=i[(s+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(i=od(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s=0)?(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(n={textFill:null},t.textFill=a),n&&(t.insideRollback=n)}}function Ji(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function tr(t,e){var n=e||e.getModel("textStyle");return P([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 er(t,e,n,i,r,a){if("function"==typeof r&&(a=r,r=null),i&&i.isAnimationEnabled()){var o=t?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),h=i.getShallow("animationDelay"+o);"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,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function nr(t,e,n,i,r){er(!0,t,e,n,i,r)}function ir(t,e,n,i,r){er(!1,t,e,n,i,r)}function rr(t,e,n){return e&&!c(e)&&(e=Mu.getLocalTransform(e)),n&&(e=_t([],e)),U([],t,e)}function ar(t,e,n,i){function r(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var o=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=o[t.anid];if(e){var i=r(t);t.attr(r(e)),nr(t,i,n,t.dataIndex)}}})}}function or(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function sr(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*a+n[0]}function fr(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?ur(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function dr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function pr(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 gr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function vr(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),a=d(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,s=d(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=d(a,function(t,e){return t-s[e]});lu&&(u=h[f],c=f);++s[c],h[c]=0,++l}return s[e]/r}function mr(t){var e=2*Math.PI;return(t%e+e)%e}function yr(t){return t>-Rd&&t=-20?+t.toFixed(i<0?-i:0):t}function Sr(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Mr(t){return null==t?"":(t+"").replace(Wd,function(t,e){return Hd[e]})}function Ir(t,e,n){y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],a=0;a':'':{renderMode:r,content:"{marker"+a+"|} ",style:{color:n}}:""}function Cr(t,e){return t+="","0000".substr(0,e-t.length)+t}function kr(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=_r(e),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=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"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Cr(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Cr(s,2)).replace("d",s).replace("hh",Cr(l,2)).replace("h",l).replace("mm",Cr(h,2)).replace("m",h).replace("ss",Cr(u,2)).replace("s",u).replace("SSS",Cr(c,3))}function Dr(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,f=l.position,d=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=d.width+(g?-g.x+d.x:0);(u=a+v)>i||l.newline?(a=0,u=v,o+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(g?-g.y+d.y:0);(c=o+m)>r||l.newline?(a+=s+n,o=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(f[0]=a,f[1]=o,"horizontal"===t?a=u+n:o=c+n)})}function Ar(t,e,n){n=Vd(n||0);var i=e.width,r=e.height,a=fr(t.left,i),o=fr(t.top,r),s=fr(t.right,i),l=fr(t.bottom,r),h=fr(t.width,i),u=fr(t.height,r),c=n[2]+n[0],f=n[1]+n[3],d=t.aspect;switch(isNaN(h)&&(h=i-s-f-a),isNaN(u)&&(u=r-l-c-o),null!=d&&(isNaN(h)&&isNaN(u)&&(d>i/r?h=.8*i:u=.8*r),isNaN(h)&&(h=d*u),isNaN(u)&&(u=h/d)),isNaN(a)&&(a=i-s-h-f),isNaN(o)&&(o=r-l-u-c),t.left||t.right){case"center":a=i/2-h/2-n[3];break;case"right":a=i-h-f}switch(t.top||t.bottom){case"middle":case"center":o=r/2-u/2-n[0];break;case"bottom":o=r-u-c}a=a||0,o=o||0,isNaN(h)&&(h=i-f-a-(s||0)),isNaN(u)&&(u=r-c-o-(l||0));var p=new $t(a+n[3],o+n[0],h,u);return p.margin=n,p}function Lr(t,e,n){function i(n,i){var o={},l=0,h={},u=0;if(Yd(n,function(e){h[e]=t[e]}),Yd(n,function(t){r(e,t)&&(o[t]=h[t]=e[t]),a(o,t)&&l++,a(h,t)&&u++}),s[i])return a(e,n[1])?h[n[2]]=null:a(e,n[2])&&(h[n[1]]=null),h;if(2!==u&&l){if(l>=2)return o;for(var c=0;ce)return t[i];return t[n-1]}function Nr(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:B(),categoryAxisMap:B()},i=np[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}function Br(t){return"category"===t.get("type")}function zr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===op?{}:[]),this.sourceFormat=t.sourceFormat||sp,this.seriesLayoutBy=t.seriesLayoutBy||hp,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&B(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function Rr(t){var e=t.option.source,n=sp;if(S(e))n=lp;else if(y(e)){0===e.length&&(n=rp);for(var i=0,r=e.length;i=e:"max"===n?t<=e:t===e}function ha(t,e){return t.join(",")===e.join(",")}function ua(t,e){vp(e=e||{},function(e,n){if(null!=e){var i=t[n];if(Qd.hasClass(n)){e=cn(e);var r=gn(i=cn(i),e);t[n]=yp(r,function(t){return t.option&&t.exist?_p(t.exist,t.option,!0):t.exist||t.option})}else t[n]=_p(i,e,!0)}})}function ca(t){var e=t&&t.itemStyle;if(e)for(var n=0,r=Sp.length;n=0;p--){var g=t[p];if(s||(f=g.data.rawIndexOf(g.stackedByDimension,c)),f>=0){var v=g.data.getByRawIndex(g.stackResultDimension,f);if(u>=0&&v>0||u<=0&&v<0){u+=v,d=v;break}}}return i[0]=u,i[1]=d,i});o.hostModel.setData(l),e.data=l})}function Sa(t,e){zr.isInstance(t)||(t=zr.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===lp&&(this._offset=0,this._dimSize=e,this._data=n),a(this,Dp[i===rp?i+"_"+t.seriesLayoutBy:i])}function Ma(){return this._data.length}function Ia(t){return this._data[t]}function Ta(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Wa(t,e){f(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,m(Ha,e))})}function Ha(t){var e=Ga(t);e&&e.setOutputEnd(this.count())}function Ga(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 Xa(){this.group=new Zu,this.uid=hr("viewChart"),this.renderTask=Pa({plan:Ua,reset:ja}),this.renderTask.context={view:this}}function qa(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n=0?i():c=setTimeout(i,-a),h=r};return f.clear=function(){c&&(clearTimeout(c),c=null)},f.debounceNextCall=function(t){l=t},f}function $a(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;var n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=B()}function Qa(t,e,n,i,r){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{};var o;f(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,f=u.agentStubMap;f.each(function(t){a(r,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),$p(u,i);var d=t.getPerformArgs(u,r.block);f.each(function(t){t.perform(d)}),o|=u.perform(d)}else h&&h.each(function(s,l){a(r,s)&&s.dirty();var h=t.getPerformArgs(s,r.block);h.skip=!e.performRawSeries&&n.isSeriesFiltered(s.context.model),$p(s,i),o|=s.perform(h)})}}),t.unfinished|=o}function Ka(t,e,n,i,r){function a(n){var a=n.uid,s=o.get(a)||o.set(a,Pa({plan:ro,reset:ao,count:so}));s.context={model:n,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},lo(t,n,s)}var o=n.seriesTaskMap||(n.seriesTaskMap=B()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(a):s?i.eachRawSeriesByType(s,a):l&&l(i,r).each(a);var h=t._pipelineMap;o.each(function(t,e){h.get(e)||(t.dispose(),o.removeKey(e))})}function Ja(t,e,n,i,r){function a(e){var n=e.uid,i=s.get(n);i||(i=s.set(n,Pa({reset:eo,onDirty:io})),o.dirty()),i.context={model:e,overallProgress:u,modifyOutputEnd:c},i.agent=o,i.__block=u,lo(t,e,i)}var o=n.overallTask=n.overallTask||Pa({reset:to});o.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:t};var s=o.agentStubMap=o.agentStubMap||B(),l=e.seriesType,h=e.getTargetSeries,u=!0,c=e.modifyOutputEnd;l?i.eachRawSeriesByType(l,a):h?h(i,r).each(a):(u=!1,f(i.getSeries(),a));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),s.removeKey(e))})}function to(t){t.overallReset(t.ecModel,t.api,t.payload)}function eo(t,e){return t.overallProgress&&no}function no(){this.agent.dirty(),this.getDownstream().dirty()}function io(){this.agent&&this.agent.dirty()}function ro(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function ao(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=cn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?d(e,function(t,e){return oo(e)}):Qp}function oo(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";e.addColorStop(i,r)}n=n.nextSibling}}function go(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),o(e.__inheritedStyle,t.__inheritedStyle))}function vo(t){for(var e=P(t).split(og),n=[],i=0;i0;a-=2){var o=r[a],s=r[a-1];switch(i=i||ft(),s){case"translate":o=P(o).split(og),vt(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=P(o).split(og),yt(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=P(o).split(og),mt(i,i,parseFloat(o[0]));break;case"skew":o=P(o).split(og),console.warn("Skew transform is not supported yet");break;case"matrix":o=P(o).split(og);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}e.setLocalTransform(i)}}function xo(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i={};fg.lastIndex=0;for(var r;null!=(r=fg.exec(e));)i[r[1]]=r[2];for(var a in hg)hg.hasOwnProperty(a)&&null!=i[a]&&(n[hg[a]]=i[a]);return n}function wo(t,e,n){var i=e/t.width,r=n/t.height,a=Math.min(i,r);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2]}}function bo(t){return function(e,n,i){e=e&&e.toLowerCase(),fu.prototype[t].call(this,e,n,i)}}function So(){fu.call(this)}function Mo(t,e,i){function r(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=Rg[e]),this.id,this.group,this._dom=t;var a=this._zr=un(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Za(v(a.flush,a),17),(e=n(e))&&Cp(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ra;var o=this._api=Ho(this);re(zg,r),re(Eg,r),this._scheduler=new $a(this,o,Eg,zg),fu.call(this,this._ecEventProcessor=new Go),this._messageCenter=new So,this._initEvents(),this.resize=v(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),Po(a,this),O(this)}function Io(t,e,n){var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=wn(r,e);for(var o=0;oe.get("hoverLayerThreshold")&&!jh.node&&n.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function Vo(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 Wo(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 Ho(t){var e=t._coordSysMgr;return a(new ia(t),{getCoordinateSystems:v(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 Go(){this.eventInfo}function Xo(t){function e(t,e){for(var i=0;i65535?Kg:tv}function cs(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function fs(t,e){f(ev.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,f(nv,function(i){t[i]=n(e[i])}),t._calculationInfo=a(e._calculationInfo)}function ds(t,e,n,i,r){var a=Qg[e.type],o=i-1,s=e.name,l=t[s][o];if(l&&l.length=0?this._indices[t]:-1}function ys(t,e){var n=t._idList[e];return null==n&&(n=gs(t,t._idDimIdx,e)),null==n&&(n=$g+e),n}function _s(t){return y(t)||(t=[t]),t}function xs(t,e){var n=t.dimensions,i=new iv(d(n,t.getDimensionInfo,t),t.hostModel);fs(i,t);for(var r=i._storage={},a=t._storage,o=0;o=0?(r[s]=ws(a[s]),i._rawExtent[s]=bs(),i._extent[s]=null):r[s]=a[s])}return i}function ws(t){for(var e=new Array(t.length),n=0;n0?n=i[0]:i[1]<0&&(n=i[1]),n}function js(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var a=t.baseDataOffset,o=[];return o[a]=n.get(t.baseDim,i),o[1-a]=r,e.dataToPoint(o)}function Zs(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 $s(t){return isNaN(t[0])||isNaN(t[1])}function Qs(t,e,n,i,r,a,o,s,l,h,u){return"none"!==h&&h?Ks.apply(this,arguments):Js.apply(this,arguments)}function Ks(t,e,n,i,r,a,o,s,l,h,u){for(var c=0,f=n,d=0;d=r||f<0)break;if($s(p)){if(u){f+=a;continue}break}if(f===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],v="y"===h?1:0,m=(p[v]-g[v])*l;Iv(Cv,g),Cv[v]=g[v]+m,Iv(kv,p),kv[v]=p[v]-m,t.bezierCurveTo(Cv[0],Cv[1],kv[0],kv[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=f,f+=a}return d}function Js(t,e,n,i,r,a,o,s,l,h,u){for(var c=0,f=n,d=0;d=r||f<0)break;if($s(p)){if(u){f+=a;continue}break}if(f===n)t[a>0?"moveTo":"lineTo"](p[0],p[1]),Iv(Cv,p);else if(l>0){var g=f+a,v=e[g];if(u)for(;v&&$s(e[g]);)v=e[g+=a];var m=.5,y=e[c];if(!(v=e[g])||$s(v))Iv(kv,p);else{$s(v)&&!u&&(v=p),W(Tv,v,y);var _,x;if("x"===h||"y"===h){var w="x"===h?0:1;_=Math.abs(p[w]-y[w]),x=Math.abs(p[w]-v[w])}else _=hu(p,y),x=hu(p,v);Mv(kv,p,Tv,-l*(1-(m=x/(x+_))))}bv(Cv,Cv,s),Sv(Cv,Cv,o),bv(kv,kv,s),Sv(kv,kv,o),t.bezierCurveTo(Cv[0],Cv[1],kv[0],kv[1],p[0],p[1]),Mv(Cv,p,Tv,l*m)}else t.lineTo(p[0],p[1]);c=f,f+=a}return d}function tl(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var r=0;ri[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function el(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 rl(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,a=e.count();ra[1]&&a.reverse();var o=r.getExtent(),s=Math.PI/180;n&&(a[0]-=.5,a[1]+=.5);var l=new rd({shape:{cx:dr(t.cx,1),cy:dr(t.cy,1),r0:dr(a[0],1),r:dr(a[1],1),startAngle:-o[0]*s,endAngle:-o[1]*s,clockwise:r.inverse}});return e&&(l.shape.endAngle=-o[0]*s,ir(l,{shape:{endAngle:-o[1]*s}},i)),l}function sl(t,e,n,i){return"polar"===t.type?ol(t,e,n,i):al(t,e,n,i)}function ll(t,e,n){for(var i=e.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o=0;a--){var o=n[a].dimension,s=t.dimensions[o],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[a];break}}if(r){var h=e.getAxis(i),u=d(r.stops,function(t){return{coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}}),c=u.length,p=r.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),p.reverse());var g=u[0].coord-10,v=u[c-1].coord+10,m=v-g;if(m<.001)return"transparent";f(u,function(t){t.offset=(t.coord-g)/m}),u.push({offset:c?u[c-1].offset:.5,color:p[1]||"transparent"}),u.unshift({offset:c?u[0].offset:.5,color:p[0]||"transparent"});var y=new xd(0,0,0,0,u,!0);return y[i]=g,y[i+"2"]=v,y}}}function ul(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!cl(a,e))){var o=e.mapDimension(a.dim),s={};return f(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(o,t))}}}}function cl(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),a=Math.max(1,Math.round(r/5)),o=0;oi)return!1;return!0}function fl(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function dl(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function pl(t){return t._map||(t._map=B(t.categories))}function gl(t){return w(t)&&null!=t.value?t.value:t+""}function vl(t,e,n,i){var r={},a=t[1]-t[0],o=r.interval=br(a/e,!0);null!=n&&oi&&(o=r.interval=i);var s=r.intervalPrecision=ml(o);return _l(r.niceTickExtent=[Bv(Math.ceil(t[0]/o)*o,s),Bv(Math.floor(t[1]/o)*o,s)],t),r}function ml(t){return pr(t)+2}function yl(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function _l(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),yl(t,0,e),yl(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function xl(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 wl(t){return t.get("stack")||Fv+t.seriesIndex}function bl(t){return t.dim+t.index}function Sl(t,e){var n=[];return e.eachSeriesByType(t,function(t){Cl(t)&&!kl(t)&&n.push(t)}),n}function Ml(t){var e=[];return f(t,function(t){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),r=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(r[1]-r[0])/n.count(),o=fr(t.get("barWidth"),a),s=fr(t.get("barMaxWidth"),a),l=t.get("barGap"),h=t.get("barCategoryGap");e.push({bandWidth:a,barWidth:o,barMaxWidth:s,barGap:l,barCategoryGap:h,axisKey:bl(i),stackId:wl(t)})}),Il(e)}function Il(t){var e={};f(t,function(t,n){var i=t.axisKey,r=t.bandWidth,a=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[i]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var h=t.barMaxWidth;h&&(o[s].maxWidth=h);var u=t.barGap;null!=u&&(a.gap=u);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var n={};return f(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,a=fr(t.categoryGap,r),o=fr(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-a)/(l+(l-1)*o);h=Math.max(h,0),f(i,function(t,e){var n=t.maxWidth;n&&na[1]?(i=a[1],r=a[0]):(i=a[0],r=a[1]);var o=e.toGlobalCoord(e.dataToCoord(0));return or&&(o=r),o}function Al(t,e){return Qv(t,$v(e))}function Ll(t,e){var n,i,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,h=null!=s,u=t.getExtent();"ordinal"===a?n=e.getCategories().length:(y(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=fr(i[0],1),i[1]=fr(i[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==o&&(o="ordinal"===a?n?0:NaN:u[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:NaN:u[1]+i[1]*r),"dataMin"===o?o=u[0]:"function"==typeof o&&(o=o({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(o)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,p=Sl("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Ml(p),v=Pl(o,s,e,g);o=v.min,s=v.max}}return[o,s]}function Pl(t,e,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=Tl(i,n.axis);if(void 0===o)return{min:t,max:e};var s=1/0;f(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(o,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var h=s+l,u=e-t,c=u/(1-(s+l)/a)-u;return e+=c*(l/h),t-=c*(s/h),{min:t,max:e}}function Ol(t,e){var n=Ll(t,e),i=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function El(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Nv(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Rv;default:return(fl.getClass(e)||Rv).create(t)}}function Nl(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function Bl(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(n){return n=t.scale.getLabel(n),e.replace("{value}",null!=n?n:"")}}(e):"function"==typeof e?function(i,r){return null!=n&&(r=i-n),e(zl(t,i),r)}:function(e){return t.scale.getLabel(e)}}function zl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Rl(t){var e=t.model,n=t.scale;if(e.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===t.type,o=n.getExtent();r=a?n.count():(i=n.getTicks()).length;var s,l=t.getLabelModel(),h=Bl(t),u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;c40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],h=t.dataToCoord(l+1)-t.dataToCoord(l),u=Math.abs(h*Math.cos(i)),c=Math.abs(h*Math.sin(i)),f=0,d=0;l<=a[1];l+=s){var p=0,g=0,v=ge(n(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,f=Math.max(f,p,7),d=Math.max(d,g,7)}var m=f/u,y=d/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=rm(t.model),w=x.lastAutoInterval,b=x.lastTickCount;return null!=w&&null!=b&&Math.abs(w-_)<=1&&Math.abs(b-o)<=1&&w>_?_=w:(x.lastTickCount=o,x.lastAutoInterval=_),_}function eh(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function nh(t,e,n){function i(t){l.push(n?t:{formattedLabel:r(t),rawLabel:a.getLabel(t),tickValue:t})}var r=Bl(t),a=t.scale,o=a.getExtent(),s=t.getLabelModel(),l=[],h=Math.max((e||0)+1,1),u=o[0],c=a.count();0!==u&&h>1&&c/h>2&&(u=Math.round(Math.ceil(u/h)*h));var f=Wl(t),d=s.get("showMinLabel")||f,p=s.get("showMaxLabel")||f;d&&u!==o[0]&&i(o[0]);for(var g=u;g<=o[1];g+=h)i(g);return p&&g!==o[1]&&i(o[1]),l}function ih(t,e,n){var i=t.scale,r=Bl(t),a=[];return f(i.getTicks(),function(t){var o=i.getLabel(t);e(t,o)&&a.push(n?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})}),a}function rh(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function ah(t,e,n,i,r){function a(t,e){return u?t>e:t0&&(t.coord-=h/(2*(e+1)))}),s={coord:e[o-1].coord+h},e.push(s)}var u=l[0]>l[1];a(e[0].coord,l[0])&&(r?e[0].coord=l[0]:e.shift()),r&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(r?s.coord=l[1]:e.pop()),r&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function oh(t,e){return e.type||(e.data?"category":"value")}function sh(t,e,n){return t.getCoordSysModel()===e}function lh(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function hh(t,e,n,i){function r(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],s=n.model,l=s.get("axisLine.onZero"),h=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=h)uh(o[h])&&(a=o[h]);else for(var u in o)if(o.hasOwnProperty(u)&&uh(o[u])&&!i[r(o[u])]){a=o[u];break}a&&(i[r(a)]=!0)}}function uh(t){return t&&"category"!==t.type&&"time"!==t.type&&Nl(t)}function ch(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}function fh(t,e){return d(vm,function(e){return t.getReferringComponents(e)[0]})}function dh(t){return"cartesian2d"===t.get("coordinateSystem")}function ph(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function gh(t,e,n,i){var r,a,o=mr(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return yr(o-mm/2)?(a=l?"bottom":"top",r="center"):yr(o-1.5*mm)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*mm&&o>mm/2?l?"left":"right":l?"right":"left"),{rotation:o,textAlign:r,textVerticalAlign:a}}function vh(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function mh(t,e,n){if(!Wl(t.axis)){var i=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],n=n||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],h=n[0],u=n[1],c=n[n.length-1],f=n[n.length-2];!1===i?(yh(a),yh(h)):_h(a,o)&&(i?(yh(o),yh(u)):(yh(a),yh(h))),!1===r?(yh(s),yh(c)):_h(l,s)&&(r?(yh(l),yh(f)):(yh(s),yh(c)))}}function yh(t){t&&(t.ignore=!0)}function _h(t,e,n){var i=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(i&&r){var a=dt([]);return mt(a,a,-t.rotation),i.applyTransform(gt([],a,t.getLocalTransform())),r.applyTransform(gt([],a,e.getLocalTransform())),i.intersect(r)}}function xh(t){return"middle"===t||"center"===t}function wh(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var r=e.getModel("axisTick"),a=r.getModel("lineStyle"),s=r.get("length"),l=i.getTicksCoords(),h=[],u=[],c=t._transform,f=[],d=0;dl[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o0?"bottom":"top":r.width>0?"left":"right";l||Lh(t.style,f,i,h,a,n,p),Xi(t,f)}function Bh(t,e){var n=t.get(km)||0;return Math.min(n,Math.abs(e.width),Math.abs(e.height))}function zh(t,e,n){var i=t.getData(),r=[],a=i.getLayout("valueAxisHorizontal")?1:0;r[1-a]=i.getLayout("valueAxisStart");var o=new Lm({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:r,__valueIdx:a});e.add(o),Rh(o,t,i)}function Rh(t,e,n){var i=n.getVisual("borderColor")||n.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=i,t.style.lineWidth=n.getLayout("barWidth")}function Fh(t,e,n,i){var r=e.getData(),a=this.dataIndex,o=r.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),r.each(function(t){Vh(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,n)})}function Vh(t,e,n,i,r){var a=(e.startAngle+e.endAngle)/2,o=Math.cos(a),s=Math.sin(a),l=n?i:0,h=[o*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function Wh(t,e){function n(){a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore}function i(){a.ignore=a.normalIgnore,o.ignore=o.normalIgnore}Zu.call(this);var r=new rd({z2:2}),a=new hd,o=new td;this.add(r),this.add(a),this.add(o),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function Hh(t,e,n,i,r,a,o){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,a){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=o&&(f=o-10),!e&&f<=o&&(f=o+10),t[s].x=n+f*a,o=f}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,f=[],d=[],p=0;pe&&a+1t[a].y+t[a].height)return void s(a,i/2);s(n-1,i/2)}(p,c,-h),u=t[p].y+t[p].height;o-u<0&&s(c-1,u-o);for(p=0;p=n?d.push(t[p]):f.push(t[p]);l(f,!1,e,n,i,r),l(d,!0,e,n,i,r)}function Gh(t,e,n,i,r,a){for(var o=[],s=[],l=0;l=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),Zh={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},$h={"[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},Qh=Object.prototype.toString,Kh=Array.prototype,Jh=Kh.forEach,tu=Kh.filter,eu=Kh.slice,nu=Kh.map,iu=Kh.reduce,ru={},au=function(){return ru.createCanvas()};ru.createCanvas=function(){return document.createElement("canvas")};var ou,su="__ec_primitive__";N.prototype={constructor:N,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=v(t,e));for(var n in this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var lu="undefined"==typeof Float32Array?Array:Float32Array,hu=Y,uu=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};$.prototype={constructor:$,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(Q(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,e.drift(r,a,t),this.dispatchToElement(Q(e,t),"drag",t.event);var o=this.findHover(n,i,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(Q(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(Q(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(Q(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(Q(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var cu=Array.prototype.slice,fu=function(t){this._$handlers={},this._$eventProcessor=t};fu.prototype={constructor:fu,one:function(t,e,n,i){return J(this,t,e,n,i,!0)},on:function(t,e,n,i){return J(this,t,e,n,i,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,a=n[t].length;r3&&(i=cu.call(i,1));for(var a=e.length,o=0;o4&&(i=cu.call(i,1,i.length-1));for(var a=i[i.length-1],o=e.length,s=0;s1&&i&&i.length>1){var a=ot(i)/ot(r);!isFinite(a)&&(a=1),e.pinchScale=a;var o=st(i);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},yu="silent";ut.prototype.dispose=function(){};var _u=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],xu=function(t,e,n,i){fu.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new ut,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,$.call(this),this.setHandlerProxy(n)};xu.prototype={constructor:xu,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(_u,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,r=i.target;r&&!r.__zr&&(r=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=this.findHover(e,n),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),r&&o!==r&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==r&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,n=t.toElement||t.relatedTarget;do{n=n&&n.parentNode}while(n&&9!==n.nodeType&&!(e=n===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,a=lt(e,t,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(e,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=ct(i[a],t,e))&&(!r.topTarget&&(r.topTarget=i[a]),o!==yu)){r.target=i[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new vu);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){xu.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||hu(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}),u(xu,fu),u(xu,$);var wu="undefined"==typeof Float32Array?Array:Float32Array,bu=dt,Su=5e-5,Mu=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},Iu=Mu.prototype;Iu.transform=null,Iu.needLocalTransform=function(){return xt(this.rotation)||xt(this.position[0])||xt(this.position[1])||xt(this.scale[0]-1)||xt(this.scale[1]-1)};var Tu=[];Iu.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;if(n||e){i=i||ft(),n?this.getLocalTransform(i):bu(i),e&&(n?gt(i,t.transform,i):pt(i,t.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(Tu);var a=Tu[0]<0?-1:1,o=Tu[1]<0?-1:1,s=((Tu[0]-a)*r+a)/Tu[0]||0,l=((Tu[1]-o)*r+o)/Tu[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||ft(),_t(this.invTransform,i)}else i&&bu(i)},Iu.getLocalTransform=function(t){return Mu.getLocalTransform(this,t)},Iu.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)},Iu.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Cu=[],ku=ft();Iu.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,r=this.scale;xt(e-1)&&(e=Math.sqrt(e)),xt(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],r[0]=e,r[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e)}},Iu.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(gt(Cu,t.invTransform,e),e=Cu);var n=this.origin;n&&(n[0]||n[1])&&(ku[4]=n[0],ku[5]=n[1],gt(Cu,e,ku),Cu[4]-=n[0],Cu[5]-=n[1],e=Cu),this.setLocalTransform(e)}},Iu.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},Iu.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&U(n,n,i),n},Iu.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&U(n,n,i),n},Mu.getLocalTransform=function(t,e){bu(e=e||[]);var n=t.origin,i=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),yt(e,e,i),r&&mt(e,e,r),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var Du={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-Du.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*Du.bounceIn(2*t):.5*Du.bounceOut(2*t-1)+.5}};wt.prototype={constructor:wt,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?Du[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),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 Au=function(){this.head=null,this.tail=null,this._len=0},Lu=Au.prototype;Lu.insert=function(t){var e=new Pu(t);return this.insertEntry(e),e},Lu.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++},Lu.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--},Lu.len=function(){return this._len},Lu.clear=function(){this.head=this.tail=null,this._len=0};var Pu=function(t){this.value=t,this.next,this.prev},Ou=function(t){this._list=new Au,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Eu=Ou.prototype;Eu.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Pu(e),o.key=t,n.insertEntry(o),i[t]=o}return r},Eu.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},Eu.clear=function(){this._list.clear(),this._map={}};var Nu={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]},Bu=new Ou(20),zu=null,Ru=Array.prototype.slice,Fu=function(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Et,this._setter=i||Nt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Fu.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:Gt(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;t=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new $t(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}}},$t.create=function(t){return new $t(t.x,t.y,t.width,t.height)};var Zu=function(t){t=t||{},qu.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Zu.prototype={constructor:Zu,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 Zu&&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 Zu&&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 Zu&&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:ae};var Ju={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},tc=function(t,e,n){return Ju.hasOwnProperty(e)?n*=t.dpr:n},ec={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},nc=9,ic=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],rc=function(t){this.extendFrom(t,!1)};rc.prototype={constructor:rc,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){var i=this,r=n&&n.style,a=!r||t.__attrCachedBy!==ec.STYLE_BIND;t.__attrCachedBy=ec.STYLE_BIND;for(var o=0;o0},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?se:oe)(t,e,n),r=e.colorStops,a=0;a=0&&n.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,n=0;n15)break}s.__drawIndex=v,s.__drawIndex0&&t>i[0]){for(o=0;ot);o++);a=n[i[o]]}if(i.splice(o+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.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 Gu("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),a.__builtin__||Gu("ZLevel "+s+" has been used by unkown layer "+a.id),a!==n&&(a.__used=!0,a.__startIndex!==r&&(a.__dirty=!0),a.__startIndex=r,a.incremental?a.__drawIndex=-1:a.__drawIndex=r,e(r),n=a),o.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__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()},setBackgroundColor:function(t){this._backgroundColor=t},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;n=0||i&&l(i,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Uc=Yc([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jc={getLineStyle:function(t){var e=Uc(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]}},Zc=Yc([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),$c={getAreaStyle:function(t,e){return Zc(this,t,e)}},Qc=Math.pow,Kc=Math.sqrt,Jc=1e-8,tf=1e-4,ef=Kc(3),nf=1/3,rf=R(),af=R(),of=R(),sf=Math.min,lf=Math.max,hf=Math.sin,uf=Math.cos,cf=2*Math.PI,ff=R(),df=R(),pf=R(),gf=[],vf=[],mf={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},yf=[],_f=[],xf=[],wf=[],bf=Math.min,Sf=Math.max,Mf=Math.cos,If=Math.sin,Tf=Math.sqrt,Cf=Math.abs,kf="undefined"!=typeof Float32Array,Df=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Df.prototype={constructor:Df,_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=Cf(1/Wu/t)||0,this._uy=Cf(1/Wu/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(mf.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=Cf(t-this._xi)>this._ux||Cf(e-this._yi)>this._uy||this._len<5;return this.addData(mf.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,a){return this.addData(mf.C,t,e,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,a):this._ctx.bezierCurveTo(t,e,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(mf.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,a){return this.addData(mf.A,t,e,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,a),this._xi=Mf(r)*n+t,this._yi=If(r)*n+e,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(mf.R,t,e,n,i),this},closePath:function(){this.addData(mf.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&&d<=t||u<0&&d>=t||0===u&&(c>0&&p<=e||c<0&&p>=e);)d+=u*(n=o[i=this._dashIdx]),p+=c*n,this._dashIdx=(i+1)%g,u>0&&dl||c>0&&ph||s[i%2?"moveTo":"lineTo"](u>=0?bf(d,t):Sf(d,t),c>=0?bf(p,e):Sf(p,e));u=d-t,c=p-e,this._dashOffset=-Tf(u*u+c*c)},_dashedBezierTo:function(t,e,n,i,r,a){var o,s,l,h,u,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=Nn,y=0,_=this._dashIdx,x=d.length,w=0;for(f<0&&(f=c+f),f%=c,o=0;o<1;o+=.1)s=m(g,t,n,r,o+.1)-m(g,t,n,r,o),l=m(v,e,i,a,o+.1)-m(v,e,i,a,o),y+=Tf(s*s+l*l);for(;_f);_++);for(o=(w-f)/y;o<=1;)h=m(g,t,n,r,o),u=m(v,e,i,a,o),_%2?p.moveTo(h,u):p.lineTo(h,u),o+=d[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(r,a),s=r-h,l=a-u,this._dashOffset=-Tf(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var r=n,a=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,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,kf&&(this.data=new Float32Array(t)))},getBoundingRect:function(){yf[0]=yf[1]=xf[0]=xf[1]=Number.MAX_VALUE,_f[0]=_f[1]=wf[0]=wf[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,n=0,i=0,r=0,a=0;al||Cf(o-r)>h||c===u-1)&&(t.lineTo(a,o),i=a,r=o);break;case mf.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 mf.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case mf.A:var d=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],_=s[c++],x=s[c++],w=g>v?g:v,b=g>v?1:g/v,S=g>v?v/g:1,M=m+y;Math.abs(g-v)>.001?(t.translate(d,p),t.rotate(_),t.scale(b,S),t.arc(0,0,w,m,M,1-x),t.scale(1/b,1/S),t.rotate(-_),t.translate(-d,-p)):t.arc(d,p,w,m,M,1-x),1===c&&(e=Mf(m)*g+d,n=If(m)*v+p),i=Mf(M)*g+d,r=If(M)*v+p;break;case mf.R:e=i=s[c],n=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case mf.Z:t.closePath(),i=e,r=n}}}},Df.CMD=mf;var Af=2*Math.PI,Lf=2*Math.PI,Pf=Df.CMD,Of=2*Math.PI,Ef=1e-4,Nf=[-1,-1,-1],Bf=[-1,-1],zf=lc.prototype.getCanvasPattern,Rf=Math.abs,Ff=new Df(!0);ci.prototype={constructor:ci,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var n=this.style,i=this.path||Ff,r=n.hasStroke(),a=n.hasFill(),o=n.fill,s=n.stroke,l=a&&!!o.colorStops,h=r&&!!s.colorStops,u=a&&!!o.image,c=r&&!!s.image;if(n.bind(t,this,e),this.setTransform(t),this.__dirty){var f;l&&(f=f||this.getBoundingRect(),this._fillGradient=n.getGradient(t,o,f)),h&&(f=f||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,s,f))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=zf.call(o,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=zf.call(s,t));var d=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(i.setScale(v[0],v[1]),this.__dirtyPath||d&&!g&&r?(i.beginPath(t),d&&!g&&(i.setLineDash(d),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=n.fillOpacity){m=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,i.fill(t),t.globalAlpha=m}else i.fill(t);if(d&&g&&(t.setLineDash(d),t.lineDashOffset=p),r)if(null!=n.strokeOpacity){var m=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,i.stroke(t),t.globalAlpha=m}else i.stroke(t);d&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,n){},createPathProxy:function(){this.path=new Df},getBoundingRect:function(){var t=this._rect,e=this.style,n=!t;if(n){var i=this.path;i||(i=this.path=new Df),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 a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/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 a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ui(a,o/s,t,e)))return!0}if(r.hasFill())return hi(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):$e.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&&Rf(t[0]-1)>1e-10&&Rf(t[3]-1)>1e-10?Math.sqrt(Rf(t[0]*t[3]-t[2]*t[1])):1}},ci.extend=function(t){var e=function(e){ci.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,ci);for(var n in t)"style"!==n&&"shape"!==n&&(e.prototype[n]=t[n]);return e},h(ci,$e);var Vf=Df.CMD,Wf=[[],[],[]],Hf=Math.sqrt,Gf=Math.atan2,Xf=function(t,e){var n,i,r,a,o,s,l=t.data,h=Vf.M,u=Vf.C,c=Vf.L,f=Vf.R,d=Vf.A,p=Vf.Q;for(r=0,a=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=f*f,g=f*p;i.push([mi(s[0],d[0],l[0],h[0],f,p,g),mi(s[1],d[1],l[1],h[1],f,p,g)])}return i},sd=function(t,e,n,i){var r,a,o,s,l=[],h=[],u=[],c=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;fMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},groupTransition:ar,clipPointsByRect:function(t,e){return d(t,function(t){var n=t[0];n=Md(n,e.x),n=Id(n,e.x+e.width);var i=t[1];return i=Md(i,e.y),i=Id(i,e.y+e.height),[n,i]})},clipRectByRect:function(t,e){var n=Md(t.x,e.x),i=Id(t.x+t.width,e.x+e.width),r=Md(t.y,e.y),a=Id(t.y+t.height,e.y+e.height);if(i>=n&&a>=r)return{x:n,y:r,width:i-n,height:a-r}},createIcon:function(t,e,n){var i=(e=a({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),o(i,n),new Qe(e)):Ii(t.replace("path://",""),e,n,"center")},Group:Zu,Image:Qe,Text:td,Circle:ed,Sector:rd,Ring:ad,Polygon:ld,Polyline:hd,Rect:fd,Line:pd,BezierCurve:vd,Arc:md,IncrementalDisplayable:Si,CompoundPath:yd,LinearGradient:xd,RadialGradient:wd,BoundingRect:$t}),Ld=["textStyle","color"],Pd={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ld):null)},getFont:function(){return tr({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ge(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},Od=Yc([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Ed={getItemStyle:function(t,e){var n=Od(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]}},Nd=u,Bd=xn();or.prototype={constructor:or,init:null,mergeOption:function(t){i(this.option,t,!0)},get:function(t,e){return null==t?this.option:sr(this.option,this.parsePath(t),!e&&lr(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],r=!e&&lr(this,t);return null==i&&r&&(i=r.getShallow(t)),i},getModel:function(t,e){var n,i=null==t?this.option:sr(this.option,t=this.parsePath(t));return e=e||(n=lr(this,t))&&n.getModel(t),new or(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){Bd(this).getParent=t},isAnimationEnabled:function(){if(!jh.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},kn(or),Dn(or),Nd(or,jc),Nd(or,$c),Nd(or,Pd),Nd(or,Ed);var zd=0,Rd=1e-4,Fd=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Vd=A,Wd=/([&<>"'])/g,Hd={"&":"&","<":"<",">":">",'"':""","'":"'"},Gd=["a","b","c","d","e","f","g"],Xd=function(t,e){return"{"+t+(null==e?"":e)+"}"},qd=we,Yd=f,Ud=["left","right","top","bottom","width","height"],jd=[["width","left","right"],["height","top","bottom"]],Zd=(m(Dr,"vertical"),m(Dr,"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")}}}),$d=xn(),Qd=or.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){or.call(this,t,e,n,i),this.uid=hr("ec_cpt_model")},init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,r=n?Pr(t):{};i(t,e.getTheme().get(this.mainType)),i(t,this.getDefaultOption()),n&&Lr(t,r,n)},mergeOption:function(t,e){i(this.option,t,!0);var n=this.layoutMode;n&&Lr(this.option,t,n)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=$d(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 a={},o=e.length-1;o>=0;o--)a=i(a,e[o],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Pn(Qd,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){t=Tn(t),e[t.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var a=Tn(n).main;t.hasSubTypes(n)&&e[a]&&(r=e[a](i))}return r}}(Qd),function(t,e){function n(t){var n={},a=[];return f(t,function(o){var s=i(n,o),h=r(s.originalDeps=e(o),t);s.entryCount=h.length,0===s.entryCount&&a.push(o),f(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(o)})}),{graph:n,noEntryList:a}}function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function r(t,e){var n=[];return f(t,function(t){l(e,t)>=0&&n.push(t)}),n}t.topologicalTravel=function(t,e,i,r){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var o=n(e),s=o.graph,l=o.noEntryList,h={};for(f(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],d=!!h[u];d&&(i.call(r,u,c.originalDeps.slice()),delete h[u]),f(c.successor,d?function(t){h[t]=!0,a(t)}:a)}f(h,function(){throw new Error("Circle dependency may exists")})}}}(Qd,function(t){var e=[];return f(Qd.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=d(e,function(t){return Tn(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),u(Qd,Zd);var Kd="";"undefined"!=typeof navigator&&(Kd=navigator.platform||"");var Jd={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Kd.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},tp=xn(),ep={clearColorPalette:function(){tp(this).colorIdx=0,tp(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=tp(e=e||this),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=cn(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?Er(s,n):o;if((l=l||o)&&l.length){var h=l[r];return t&&(a[t]=h),i.colorIdx=(r+1)%l.length,h}}},np={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),Br(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Br(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",r),Br(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),Br(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Br(o)&&(i.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();f(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];n.set(l,s),Br(s)&&null==e.firstCategoryDimIndex&&(i.set(l,s),e.firstCategoryDimIndex=a)})}},ip="original",rp="arrayRows",ap="objectRows",op="keyedColumns",sp="unknown",lp="typedArray",hp="column",up="row";zr.seriesDataToSource=function(t){return new zr({data:t,sourceFormat:S(t)?lp:ip,fromDataset:!1})},Dn(zr);var cp=xn(),fp="\0_ec_inner",dp=or.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new or(n),this._optionManager=i},setOption:function(t,e){L(!(fp 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)):Kr.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 a=n.getMediaOption(this,this._api);a.length&&f(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,o=[];Vr(this),f(t,function(t,r){null!=t&&(Qd.hasClass(r)?r&&o.push(r):e[r]=null==e[r]?n(t):i(e[r],t,!0))}),Qd.topologicalTravel(o,Qd.getAllClassMainTypes(),function(n,i){var o=cn(t[n]),s=gn(r.get(n),o);vn(s),f(s,function(t,e){var i=t.option;w(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=ta(n,i,t.exist))});var l=Jr(r,i);e[n]=[],r.set(n,[]),f(s,function(t,i){var o=t.exist,s=t.option;if(L(w(s)||o,"Empty component definition"),s){var h=Qd.getClass(n,t.keyInfo.subType,!0);if(o&&o instanceof h)o.name=t.keyInfo.name,o.mergeOption(s,this),o.optionUpdated(s,!1);else{var u=a({dependentModels:l,componentIndex:i},t.keyInfo);a(o=new h(s,this,this,u),u),o.init(s,this,this,u),o.optionUpdated(null,!0)}}else o.mergeOption({},this),o.optionUpdated({},!1);r.get(n)[i]=o,e[n][i]=o.option},this),"series"===n&&ea(this,r.get("series"))},this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,n){if(Qd.hasClass(n)){for(var i=(e=cn(e)).length-1;i>=0;i--)yn(e[i])&&e.splice(i,1);t[n]=e}}),delete t[fp],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,a=this._componentsMap.get(e);if(!a||!a.length)return[];var o;if(null!=n)y(n)||(n=[n]),o=g(d(n,function(t){return a[t]}),function(t){return!!t});else if(null!=i){var s=y(i);o=g(a,function(t){return s&&l(i,t.id)>=0||!s&&t.id===i})}else if(null!=r){var h=y(r);o=g(a,function(t){return h&&l(r,t.name)>=0||!h&&t.name===r})}else o=a.slice();return na(o,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}(na(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){f(t,function(t,r){e.call(n,i,t,r)})})):x(t)?f(i.get(t),e,n):w(t)&&f(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){f(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];t.call(e,i,n)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,n){f(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 f(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){ea(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;ea(this,e.get("series"));var n=[];e.each(function(t,e){n.push(e)}),Qd.topologicalTravel(n,Qd.getAllClassMainTypes(),function(n,i){f(e.get(n),function(e){("series"!==n||!$r(e,t))&&e.restoreData()})})}});u(dp,ep);var pp=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],gp={};ra.prototype={constructor:ra,create:function(t,e){var n=[];f(gp,function(i,r){var a=i.create(t,e);n=n.concat(a||[])}),this._coordinateSystems=n},update:function(t,e){f(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ra.register=function(t,e){gp[t]=e},ra.get=function(t){return gp[t]};var vp=f,mp=n,yp=d,_p=i,xp=/^(min|max)?(.+)$/;aa.prototype={constructor:aa,setOption:function(t,e){t&&f(cn(t.series),function(t){t&&t.data&&S(t.data)&&O(t.data)}),t=mp(t,!0);var n=this._optionBackup,i=oa.call(this,t,e,!n);this._newBaseOption=i.baseOption,n?(ua(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=yp(e.timelineOptions,mp),this._mediaList=yp(e.mediaList,mp),this._mediaDefault=mp(e.mediaDefault),this._currentMediaIndices=[],mp(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=mp(n[i.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,a=[],o=[];if(!i.length&&!r)return o;for(var s=0,l=i.length;s=1)&&(t=1),t}var n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),h=t&&t.modDataCount||0;o===l&&s===h||(a="reset");var u;(this._dirty||"reset"===a)&&(this._dirty=!1,u=Na(this,i)),this._modBy=l,this._modDataCount=h;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(u||f=n?null:t1&&a>0?e:t}};return s}();Ep.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Ep.unfinished=function(){return this._progress&&this._dueIndex":"\n",s="richText"===i,l={},h=0,u=this.getData(),c=u.mapDimension("defaultedTooltip",!0),d=c.length,g=this.getRawValue(t),v=y(g),m=u.getItemVisual(t,"color");w(m)&&m.colorStops&&(m=(m.colorStops[0]||{}).color),m=m||"transparent";var _=(d>1||v&&!d?function(n){function r(t,n){var r=u.getDimensionInfo(n);if(r&&!1!==r.otherDims.tooltip){var c=r.type,f="sub"+a.seriesIndex+"at"+h,p=Tr({color:m,type:"subItem",renderMode:i,markerId:f}),g="string"==typeof p?p:p.content,v=(o?g+Mr(r.displayName||"-")+": ":"")+Mr("ordinal"===c?t+"":"time"===c?e?"":kr("yyyy/MM/dd hh:mm:ss",t):Sr(t));v&&d.push(v),s&&(l[f]=m,++h)}}var o=p(n,function(t,e,n){var i=u.getDimensionInfo(n);return t|=i&&!1!==i.tooltip&&null!=i.displayName},0),d=[];c.length?f(c,function(e){r(Aa(u,t,e),e)}):f(n,r);var g=o?s?"\n":"
":"",v=g+d.join(g||", ");return{renderMode:i,content:v,style:l}}(g):r(d?Aa(u,t,c[0]):v?g[0]:g)).content,x=a.seriesIndex+"at"+h,b=Tr({color:m,type:"item",renderMode:i,markerId:x});l[x]=m,++h;var S=u.getName(t),M=this.name;mn(this)||(M=""),M=M?Mr(M)+(e?": ":o):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+_:M+I+(S?Mr(S)+": "+_:_),markers:l}},isAnimationEnabled:function(){if(jh.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=ep.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(zp,Op),u(zp,ep);var Rp=function(){this.group=new Zu,this.uid=hr("viewComponent")};Rp.prototype={constructor:Rp,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var Fp=Rp.prototype;Fp.updateView=Fp.updateLayout=Fp.updateVisual=function(t,e,n,i){},kn(Rp),Pn(Rp,{registerWhenExtend:!0});var Vp=function(){var t=xn();return function(e){var n=t(e),i=e.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i.large,s=n.progressiveRender=i.progressiveRender;return!!(r^o||a^s)&&"reset"}},Wp=xn(),Hp=Vp();Xa.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){Ya(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){Ya(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Gp=Xa.prototype;Gp.updateView=Gp.updateLayout=Gp.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},kn(Xa),Pn(Xa,{registerWhenExtend:!0}),Xa.markUpdateMethod=function(t,e){Wp(t).updateMethod=e};var Xp={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},qp={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.name,null,e.getSeriesCount());if(n.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof _d||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}}}},Yp={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:""}}}},Up=function(t,e){function n(t,e){if("string"!=typeof t)return t;var n=t;return f(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function i(t){var e=a.get(t);if(null==e){for(var n=t.split("."),i=Yp.aria,r=0;r1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:o}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";a=n(a=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?a+=n(i("data.partialData"),{displayCnt:l}):a+=i("data.allData");for(var f=[],p=0;pn.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},Zp.getPipeline=function(t){return this._pipelineMap.get(t)},Zp.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},Zp.restorePipelines=function(t){var e=this,n=e._pipelineMap=B();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()),blockIndex:-1,step:Math.round(i||700),count:0}),lo(e,t,t.dataTask)})},Zp.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),n=this.api;f(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,[]);i.reset&&Ka(this,i,r,e,n),i.overallReset&&Ja(this,i,r,e,n)},this)},Zp.prepareView=function(t,e,n,i){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=n,a.api=i,r.__block=!t.incrementalPrepareRender,lo(this,e,r)},Zp.performDataProcessorTasks=function(t,e){Qa(this,this._dataProcessorHandlers,t,e,{block:!0})},Zp.performVisualTasks=function(t,e,n){Qa(this,this._visualHandlers,t,e,n)},Zp.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Zp.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var $p=Zp.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Qp=oo(0);$a.wrapStageHandler=function(t,e){return _(t)&&(t={overallReset:t,seriesType:ho(t)}),t.uid=hr("stageHandler"),e&&(t.visualType=e),t};var Kp,Jp={},tg={};uo(Jp,dp),uo(tg,ia),Jp.eachSeriesByType=Jp.eachRawSeriesByType=function(t){Kp=t},Jp.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Kp=t.subType)};var eg=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],ng={color:eg,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],eg]},ig=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],rg={color:ig,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:ig[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:ig},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};rg.categoryAxis.splitLine.show=!1,Qd.extend({type:"dataset",defaultOption:{seriesLayoutBy:hp,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Rr(this)}}),Rp.extend({type:"dataset"});var ag=ci.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=.5522848,i=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*n,l=o*n;t.moveTo(i-a,r),t.bezierCurveTo(i-a,r-l,i-s,r-o,i,r-o),t.bezierCurveTo(i+s,r-o,i+a,r-l,i+a,r),t.bezierCurveTo(i+a,r+l,i+s,r+o,i,r+o),t.bezierCurveTo(i-s,r+o,i-a,r+l,i-a,r),t.closePath()}}),og=/[\s,]+/;fo.prototype.parse=function(t,e){e=e||{};var n=co(t);if(!n)throw new Error("Illegal svg");var i=new Zu;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),o=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),mo(n,i,null,!0);for(var s=n.firstChild;s;)this._parseNode(s,i),s=s.nextSibling;var l,h;if(r){var u=P(r).split(og);u.length>=4&&(l={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])})}if(l&&null!=a&&null!=o&&(h=wo(l,a,o),!e.ignoreViewBox)){var c=i;(i=new Zu).add(c),c.scale=h.scale.slice(),c.position=h.position.slice()}return e.ignoreRootClip||null==a||null==o||i.setClipPath(new fd({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:l,viewBoxTransform:h}},fo.prototype._parseNode=function(t,e){var n=t.nodeName.toLowerCase();"defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0);var i;if(this._isDefine){if(o=lg[n]){var r=o.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=r)}}else{var o=sg[n];o&&(i=o.call(this,t,e),e.add(i))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},fo.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new td({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});go(e,r),mo(t,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var sg={g:function(t,e){var n=new Zu;return go(e,n),mo(t,n,this._defs),n},rect:function(t,e){var n=new fd;return go(e,n),mo(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new ed;return go(e,n),mo(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new pd;return go(e,n),mo(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new ag;return go(e,n),mo(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=t.getAttribute("points");n&&(n=vo(n));var i=new ld({shape:{points:n||[]}});return go(e,i),mo(t,i,this._defs),i},polyline:function(t,e){var n=new ci;go(e,n),mo(t,n,this._defs);var i=t.getAttribute("points");return i&&(i=vo(i)),new hd({shape:{points:i||[]}})},image:function(t,e){var n=new Qe;return go(e,n),mo(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Zu;return go(e,o),mo(t,o,this._defs),o},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new Zu;return go(e,o),mo(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var n=gi(t.getAttribute("d")||"");return go(e,n),mo(t,n,this._defs),n}},lg={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new xd(e,n,i,r);return po(t,a),a},radialgradient:function(t){}},hg={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},ug=/url\(\s*#(.*?)\)/,cg=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,fg=/([^\s:;]+)\s*:\s*([^:;]+)/g,dg=B(),pg={registerMap:function(t,e,n){var i;return y(e)?i=e:e.svg?i=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),i=[{type:"geoJSON",source:e,specialAreas:n}]),f(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,gg[e])(t)}),dg.set(t,i)},retrieveMap:function(t){return dg.get(t)}},gg={geoJSON:function(t){var e=t.source;t.geoJSON=x(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=co(t.source)}},vg=L,mg=f,yg=_,_g=w,xg=Qd.parseClassType,wg={zrender:"4.0.6"},bg=1e3,Sg=1e3,Mg=3e3,Ig={PROCESSOR:{FILTER:bg,STATISTIC:5e3},VISUAL:{LAYOUT:Sg,GLOBAL:2e3,CHART:Mg,COMPONENT:4e3,BRUSH:5e3}},Tg="__flagInMainProcess",Cg="__optionUpdated",kg=/^[a-zA-Z0-9_]+$/;So.prototype.on=bo("on"),So.prototype.off=bo("off"),So.prototype.one=bo("one"),u(So,fu);var Dg=Mo.prototype;Dg._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Cg]){var e=this[Cg].silent;this[Tg]=!0,To(this),Ag.update.call(this),this[Tg]=!1,this[Cg]=!1,Ao.call(this,e),Lo.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(i),ko(this,i),t.performVisualTasks(i),zo(this,this._model,0,"remain"),n-=+new Date-r}while(n>0&&t.unfinished);t.unfinished||this._zr.flush()}}},Dg.getDom=function(){return this._dom},Dg.getZr=function(){return this._zr},Dg.setOption=function(t,e,n){var i;if(_g(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[Tg]=!0,!this._model||e){var r=new aa(this._api),a=this._theme,o=this._model=new dp(null,null,a,r);o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,Ng),n?(this[Cg]={silent:i},this[Tg]=!1):(To(this),Ag.update.call(this),this._zr.flush(),this[Cg]=!1,this[Tg]=!1,Ao.call(this,i),Lo.call(this,i))},Dg.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Dg.getModel=function(){return this._model},Dg.getOption=function(){return this._model&&this._model.getOption()},Dg.getWidth=function(){return this._zr.getWidth()},Dg.getHeight=function(){return this._zr.getHeight()},Dg.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Dg.getRenderedCanvas=function(t){if(jh.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},Dg.getSvgDataUrl=function(){if(jh.svgSupported){var t=this._zr;return f(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},Dg.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;mg(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 a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return mg(i,function(t){t.group.ignore=!1}),a},Dg.getConnectedDataURL=function(t){if(jh.canvasSupported){var e=this.group,i=Math.min,r=Math.max;if(Wg[e]){var a=1/0,o=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelRatio||1;f(Vg,function(u,c){if(u.group===e){var f=u.getRenderedCanvas(n(t)),d=u.getDom().getBoundingClientRect();a=i(d.left,a),o=i(d.top,o),s=r(d.right,s),l=r(d.bottom,l),h.push({dom:f,left:d.left,top:d.top})}});var c=(s*=u)-(a*=u),d=(l*=u)-(o*=u),p=au();p.width=c,p.height=d;var g=un(p);return mg(h,function(t){var e=new Qe({style:{x:t.left*u-a,y:t.top*u-o,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},Dg.convertToPixel=m(Io,"convertToPixel"),Dg.convertFromPixel=m(Io,"convertFromPixel"),Dg.containPixel=function(t,e){var n;return t=wn(this._model,t),f(t,function(t,i){i.indexOf("Models")>=0&&f(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}},this)},this),!!n},Dg.getVisual=function(t,e){var n=(t=wn(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)},Dg.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Dg.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Ag={prepareAndUpdate:function(t){To(this),Ag.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),r.create(e,n),a.performDataProcessorTasks(e,t),ko(this,e),r.update(e,n),Eo(e),a.performVisualTasks(e,t),No(this,e,n,t);var o=e.get("backgroundColor")||"transparent";if(jh.canvasSupported)i.setBackgroundColor(o);else{var s=At(o);o=Ot(s,"rgb"),0===s[3]&&(o="transparent")}Ro(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&r.push(s)}else r.push(s)});var a=B();e.eachSeries(function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,i,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),Eo(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),zo(n,e,0,t,a),Ro(e,this._api)}},updateView:function(t){var e=this._model;e&&(Xa.markUpdateMethod(t,"updateView"),Eo(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),No(this,this._model,this._api,t),Ro(e,this._api))},updateVisual:function(t){Ag.update.call(this,t)},updateLayout:function(t){Ag.update.call(this,t)}};Dg.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Tg]=!0,n&&To(this),Ag.update.call(this),this[Tg]=!1,Ao.call(this,i),Lo.call(this,i)}},Dg.showLoading=function(t,e){if(_g(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Fg[t]){var n=Fg[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},Dg.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Dg.makeActionFromEvent=function(t){var e=a({},t);return e.type=Og[t.type],e},Dg.dispatchAction=function(t,e){_g(e)||(e={silent:!!e}),Pg[t.type]&&this._model&&(this[Tg]?this._pendingActions.push(t):(Do.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&jh.browser.weChat&&this._throttledZrFlush(),Ao.call(this,e.silent),Lo.call(this,e.silent)))},Dg.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},Dg.on=bo("on"),Dg.off=bo("off"),Dg.one=bo("one");var Lg=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];Dg._initEvents=function(){mg(Lg,function(t){var e=function(e){var n,i=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var o=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=o&&o.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=a({},r.eventData));if(n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var h=s&&null!=l&&i.getComponent(s,l),u=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:h,view:u},this.trigger(t,n)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),mg(Og,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Dg.isDisposed=function(){return this._disposed},Dg.clear=function(){this.setOption({series:[]},!0)},Dg.dispose=function(){if(!this._disposed){this._disposed=!0,Sn(this.getDom(),Xg,"");var t=this._api,e=this._model;mg(this._componentsViews,function(n){n.dispose(e,t)}),mg(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete Vg[this.id]}},u(Mo,fu),Go.prototype={constructor:Go,normalizeQuery:function(t){var e={},n={},i={};if(x(t)){var r=xg(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};f(t,function(t,r){for(var s=!1,l=0;l0&&u===r.length-h.length){var c=r.slice(0,u);"data"!==c&&(e.mainType=c,e[h.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e,n){function i(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var r=this.eventInfo;if(!r)return!0;var a=r.targetEl,o=r.packedEvent,s=r.model,l=r.view;if(!s||!l)return!0;var h=e.cptQuery,u=e.dataQuery;return i(h,s,"mainType")&&i(h,s,"subType")&&i(h,s,"index","componentIndex")&&i(h,s,"name")&&i(h,s,"id")&&i(u,o,"name")&&i(u,o,"dataIndex")&&i(u,o,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,a,o))},afterTrigger:function(){this.eventInfo=null}};var Pg={},Og={},Eg=[],Ng=[],Bg=[],zg=[],Rg={},Fg={},Vg={},Wg={},Hg=new Date-0,Gg=new Date-0,Xg="_echarts_instance_",qg=qo;Ko(2e3,qp),jo(Cp),Zo(5e3,function(t){var e=B();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}}),e.each(ba)}),ts("default",function(t,e){o(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var n=new fd({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),i=new md({shape:{startAngle:-jp/2,endAngle:-jp/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new fd({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*jp/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*jp/2}).delay(300).start("circularInOut");var a=new Zu;return a.add(i),a.add(r),a.add(n),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;i.setShape({cx:e,cy:a});var o=i.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),$o({type:"highlight",event:"highlight",update:"highlight"},z),$o({type:"downplay",event:"downplay",update:"downplay"},z),Uo("light",ng),Uo("dark",rg);var Yg={};as.prototype={constructor:as,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(os(t,{},i,"_oldKeyGetter",this),os(e,n,r,"_newKeyGetter",this),a=0;a_[1]&&(_[1]=y)}e&&(this._nameList[f]=e[d])}this._rawCount=this._count=l,this._extent={},ps(this)},rv._initDataFromProvider=function(t,e){if(!(t>=e)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,h=this._nameList,u=this._idList,c=this._rawExtent,f=this._nameRepeatCount={},d=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!r.pure){var I=h[m];if(v&&null==I)if(null!=v.name)h[m]=I=v.name;else if(null!=n){var T=o[n],C=a[T][y];if(C){I=C[_];var k=l[T].ordinalMeta;k&&k.categories.length&&(I=k.categories[I])}}var D=null==v?null:v.id;null==D&&null!=I&&(f[I]=f[I]||0,D=I,f[I]>0&&(D+="__ec__"+f[I]),f[I]++),null!=D&&(u[m]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},ps(this)}},rv.count=function(){return this._count},rv.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){i=new e(n);for(r=0;r=0&&e=0&&ea&&(a=s)}return n=[r,a],this._extent[t]=n,n},rv.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},rv.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},rv.getCalculationInfo=function(t){return this._calculationInfo[t]},rv.setCalculationInfo=function(t,e){jg(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},rv.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&nt))return a;r=a-1}}return-1},rv.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=Number.MAX_VALUE,a=-1,o=0,s=this.count();o=0&&a<0)&&(r=h,a=l,i.length=0),i.push(o))}return i},rv.getRawIndex=vs,rv.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=l&&w<=h||isNaN(w))&&(a[o++]=c),c++;u=!0}else if(2===i){for(var f=this._storage[s],m=this._storage[e[1]],y=t[e[1]][0],_=t[e[1]][1],d=0;d=l&&w<=h||isNaN(w))&&(b>=y&&b<=_||isNaN(b))&&(a[o++]=c),c++}u=!0}}if(!u)if(1===i)for(v=0;v=l&&w<=h||isNaN(w))&&(a[o++]=M)}else for(v=0;vt[I][1])&&(S=!1)}S&&(a[o++]=this.getRawIndex(v))}return ob[1]&&(b[1]=w)}}}return r},rv.downSample=function(t,e,n,i){for(var r=xs(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],f=new(us(this))(h),d=0,p=0;ph-p&&(s=h-p,o.length=s);for(var g=0;gc[1]&&(c[1]=_),f[d++]=x}return r._count=d,r._indices=f,r.getRawIndex=ms,r},rv.getItemModel=function(t){var e=this.hostModel;return new or(this.getRawDataItem(t),e,e&&e.ecModel)},rv.diff=function(t){var e=this;return new as(t?t.getIndices():[],this.getIndices(),function(e){return ys(t,e)},function(t){return ys(e,t)})},rv.getVisual=function(t){var e=this._visual;return e&&e[t]},rv.setVisual=function(t,e){if(jg(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},rv.setLayout=function(t,e){if(jg(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},rv.getLayout=function(t){return this._layout[t]},rv.getItemLayout=function(t){return this._itemLayouts[t]},rv.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?a(this._itemLayouts[t]||{},e):e},rv.clearItemLayouts=function(){this._itemLayouts.length=0},rv.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},rv.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,jg(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],r[a]=!0);else i[e]=n,r[e]=!0},rv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var av=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};rv.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(av,e)),this._graphicEls[t]=e},rv.getItemGraphicEl=function(t){return this._graphicEls[t]},rv.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},rv.cloneShallow=function(t){if(!t){var e=d(this.dimensions,this.getDimensionInfo,this);t=new iv(e,this.hostModel)}if(t._storage=this._storage,fs(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ms:vs,t},rv.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(D(arguments)))})},rv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],rv.CHANGABLE_METHODS=["filterSelf","selectRange"];var ov=function(t,e){return e=e||{},Ss(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};zp.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return Ds(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var sv=Mi({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,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i+a),t.lineTo(n-r,i+a),t.closePath()}}),lv=Mi({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,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+r,i),t.lineTo(n,i+a),t.lineTo(n-r,i),t.closePath()}}),hv=Mi({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,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),f=Math.cos(h),d=.6*o,p=.7*o;t.moveTo(n-u,l+s),t.arc(n,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(n+u-c*d,l+s+f*d,n,i-p,n,i),t.bezierCurveTo(n,i-p,n-u+c*d,l+s+f*d,n-u,l+s),t.closePath()}}),uv=Mi({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,a=e.y,o=i/3*2;t.moveTo(r,a),t.lineTo(r+o,a+n),t.lineTo(r,a+n/4*3),t.lineTo(r-o,a+n),t.lineTo(r,a),t.closePath()}}),cv={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 a=Math.min(n,i);r.x=t,r.y=e,r.width=a,r.height=a},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}},fv={};f({line:pd,rect:fd,roundRect:fd,square:fd,circle:ed,diamond:lv,pin:hv,arrow:uv,triangle:sv},function(t,e){fv[e]=new t});var dv=Mi({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=fv[i];"none"!==e.symbolType&&(r||(r=fv[i="rect"]),cv[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n))}}),pv=Ns.prototype,gv=Ns.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};pv._createSymbol=function(t,e,n,i,r){this.removeAll();var a=Os(t,-1,-1,2,2,e.getItemVisual(n,"color"),r);a.attr({z2:100,culling:!0,scale:Bs(i)}),a.drift=zs,this._symbolType=t,this.add(a)},pv.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},pv.getSymbolPath=function(){return this.childAt(0)},pv.getScale=function(){return this.childAt(0).scale},pv.highlight=function(){this.childAt(0).trigger("emphasis")},pv.downplay=function(){this.childAt(0).trigger("normal")},pv.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},pv.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},pv.updateData=function(t,e,n){this.silent=!1;var i=t.getItemVisual(e,"symbol")||"circle",r=t.hostModel,a=gv(t,e),o=i!==this._symbolType;if(o){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(i,t,e,a,s)}else(l=this.childAt(0)).silent=!1,nr(l,{scale:Bs(a)},r,e);if(this._updateCommon(t,e,a,n),o){var l=this.childAt(0),h=n&&n.fadeIn,u={scale:l.scale.slice()};h&&(u.style={opacity:l.style.opacity}),l.scale=[0,0],h&&(l.style.opacity=0),ir(l,u,r,e)}this._seriesModel=r};var vv=["itemStyle"],mv=["emphasis","itemStyle"],yv=["label"],_v=["emphasis","label"];pv._updateCommon=function(t,e,n,i){var r=this.childAt(0),o=t.hostModel,s=t.getItemVisual(e,"color");"image"!==r.type&&r.useStyle({strokeNoScale:!0});var l=i&&i.itemStyle,h=i&&i.hoverItemStyle,u=i&&i.symbolRotate,c=i&&i.symbolOffset,f=i&&i.labelModel,d=i&&i.hoverLabelModel,p=i&&i.hoverAnimation,g=i&&i.cursorStyle;if(!i||t.hasItemOption){var v=i&&i.itemModel?i.itemModel:t.getItemModel(e);l=v.getModel(vv).getItemStyle(["color"]),h=v.getModel(mv).getItemStyle(),u=v.getShallow("symbolRotate"),c=v.getShallow("symbolOffset"),f=v.getModel(yv),d=v.getModel(_v),p=v.getShallow("hoverAnimation"),g=v.getShallow("cursor")}else h=a({},h);var m=r.style;r.attr("rotation",(u||0)*Math.PI/180||0),c&&r.attr("position",[fr(c[0],n[0]),fr(c[1],n[1])]),g&&r.attr("cursor",g),r.setColor(s,i&&i.symbolInnerColor),r.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(m.opacity=y);var _=t.getItemVisual(e,"liftZ"),x=r.__z2Origin;null!=_?null==x&&(r.__z2Origin=r.z2,r.z2+=_):null!=x&&(r.z2=x,r.__z2Origin=null);var w=i&&i.useNameLabel;Yi(m,h,f,d,{labelFetcher:o,labelDataIndex:e,defaultText:function(e,n){return w?t.getName(e):Es(t,e)},isRectText:!0,autoColor:s}),r.off("mouseover").off("mouseout").off("emphasis").off("normal"),r.hoverStyle=h,Xi(r),r.__symbolOriginalScale=Bs(n),p&&o.isAnimationEnabled()&&r.on("mouseover",Rs).on("mouseout",Fs).on("emphasis",Vs).on("normal",Ws)},pv.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,!(e&&e.keepLabel)&&(n.style.text=null),nr(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(Ns,Zu);var xv=Hs.prototype;xv.updateData=function(t,e){e=Xs(e);var n=this.group,i=t.hostModel,r=this._data,a=this._symbolCtor,o=qs(t);r||n.removeAll(),t.diff(r).add(function(i){var r=t.getItemLayout(i);if(Gs(t,r,i,e)){var s=new a(t,i,o);s.attr("position",r),t.setItemGraphicEl(i,s),n.add(s)}}).update(function(s,l){var h=r.getItemGraphicEl(l),u=t.getItemLayout(s);Gs(t,u,s,e)?(h?(h.updateData(t,s,o),nr(h,{position:u},i)):(h=new a(t,s)).attr("position",u),n.add(h),t.setItemGraphicEl(s,h)):n.remove(h)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){n.remove(e)})}).execute(),this._data=t},xv.isPersistent=function(){return!0},xv.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,n){var i=t.getItemLayout(n);e.attr("position",i)})},xv.incrementalPrepareUpdate=function(t){this._seriesScope=qs(t),this._data=null,this.group.removeAll()},xv.incrementalUpdate=function(t,e,n){n=Xs(n);for(var i=t.start;i0&&$s(n[r-1]);r--);for(;i0&&$s(n[a-1]);a--);for(;r=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;(o=new Ns(r,a)).position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Xa.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),a=_n(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else Xa.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Dv({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 Av({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(t,e,n,i,r,a){var o=this._polyline,s=this._polygon,l=t.hostModel,h=wv(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),u=h.current,c=h.stackedOnCurrent,f=h.next,d=h.stackedOnNext;r&&(u=ll(h.current,n,r),c=ll(h.stackedOnCurrent,n,r),f=ll(h.next,n,r),d=ll(h.stackedOnNext,n,r)),o.shape.__points=h.current,o.shape.points=u,nr(o,{shape:{points:f}},l),s&&(s.setShape({points:u,stackedOnPoints:c}),nr(s,{shape:{points:f,stackedOnPoints:d}},l));for(var p=[],g=h.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=e[0]&&t<=e[1]},fl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},fl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},fl.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},fl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},fl.prototype.getExtent=function(){return this._extent.slice()},fl.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},fl.prototype.isBlank=function(){return this._isBlank},fl.prototype.setBlank=function(t){this._isBlank=t},fl.prototype.getLabel=null,kn(fl),Pn(fl,{registerWhenExtend:!0}),dl.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&d(n,gl);return new dl({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var Ov=dl.prototype;Ov.getOrdinal=function(t){return pl(this).get(t)},Ov.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=pl(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Ev=fl.prototype,Nv=fl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new dl({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Ev.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Ev.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Ev.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:z,niceExtent:z});Nv.create=function(){return new Nv};var Bv=dr,zv=dr,Rv=fl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),Rv.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=ml(t)},getTicks:function(){return xl(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=pr(t)||0:"auto"===n&&(n=this._intervalPrecision),t=zv(t,n,!0),Sr(t)},niceTicks:function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var a=vl(i,t,e,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax?e[0]-=n/2:(e[1]+=n/2,e[0]-=n/2)}else e[1]=1;var i=e[1]-e[0];isFinite(i)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=zv(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=zv(Math.ceil(e[1]/r)*r))}});Rv.create=function(){return new Rv};var Fv="__ec_stack_",Vv="undefined"!=typeof Float32Array?Float32Array:Array,Wv={seriesType:"bar",plan:Vp(),reset:function(t){if(Cl(t)&&kl(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),a=e.mapDimension(r.dim),o=e.mapDimension(i.dim),s=r.isHorizontal(),l=s?0:1,h=Tl(Ml([t]),i,t).width;return h>.5||(h=.5),{progress:function(t,e){for(var i,u=new Vv(2*t.count),c=[],f=[],d=0;null!=(i=t.next());)f[l]=e.get(a,i),f[1-l]=e.get(o,i),c=n.dataToPoint(f,null,c),u[d++]=c[0],u[d++]=c[1];e.setLayout({largePoints:u,barWidth:h,valueAxisStart:Dl(0,r),valueAxisHorizontal:s})}}}}},Hv=Rv.prototype,Gv=Math.ceil,Xv=Math.floor,qv=function(t,e,n,i){for(;n>>1;t[r][1]n&&(a=n);var o=Uv.length,s=qv(Uv,a,0,o),l=Uv[Math.min(s,o-1)],h=l[1];"year"===l[0]&&(h*=br(r/h/t,!0));var u=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Gv((i[0]-u)/h)*h+u),Math.round(Xv((i[1]-u)/h)*h+u)];_l(c,i),this._stepLvl=l,this._interval=h,this._niceExtent=c},parse:function(t){return+_r(t)}});f(["contain","normalize"],function(t){Yv.prototype[t]=function(e){return Hv[t].call(this,this.parse(e))}});var Uv=[["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",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];Yv.create=function(t){return new Yv({useUTC:t.ecModel.get("useUTC")})};var jv=fl.prototype,Zv=Rv.prototype,$v=pr,Qv=dr,Kv=Math.floor,Jv=Math.ceil,tm=Math.pow,em=Math.log,nm=fl.extend({type:"log",base:10,$constructor:function(){fl.apply(this,arguments),this._originalScale=new Rv},getTicks:function(){var t=this._originalScale,e=this._extent,n=t.getExtent();return d(Zv.getTicks.call(this),function(i){var r=dr(tm(this.base,i));return r=i===e[0]&&t.__fixMin?Al(r,n[0]):r,r=i===e[1]&&t.__fixMax?Al(r,n[1]):r},this)},getLabel:Zv.getLabel,scale:function(t){return t=jv.scale.call(this,t),tm(this.base,t)},setExtent:function(t,e){var n=this.base;t=em(t)/em(n),e=em(e)/em(n),Zv.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=jv.getExtent.call(this);e[0]=tm(t,e[0]),e[1]=tm(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=Al(e[0],i[0])),n.__fixMax&&(e[1]=Al(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=em(t[0])/em(e),t[1]=em(t[1])/em(e),jv.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=xr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[dr(Jv(e[0]/i)*i),dr(Kv(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(t){Zv.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){nm.prototype[t]=function(e){return e=em(e)/em(this.base),jv[t].call(this,e)}}),nm.create=function(){return new nm};var im=function(t){this._axes={},this._dimList=[],this.name=t||""};im.prototype={constructor:im,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return d(this._dimList,Hl,this)},getAxesByScale:function(t){return t=t.toLowerCase(),g(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},r=0;r=n&&t<=i},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return gr(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&&rh(n=n.slice(),i.count()),cr(t,am,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&rh(n=n.slice(),i.count());var r=cr(t,n,am,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=ql(this,e),i=d(n.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),r=e.get("alignWithLabel");return ah(this,i,n.tickCategoryInterval,r,t.clamp),i},getViewLabels:function(){return Xl(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return th(this)}};var sm=function(t,e,n,i,r){om.call(this,t,e,n),this.type=i||"value",this.position=r||"bottom"};sm.prototype={constructor:sm,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(sm,om);var lm={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)"]}}},hm={};hm.categoryAxis=i({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},lm),hm.valueAxis=i({boundaryGap:[0,0],splitNumber:5},lm),hm.timeAxis=o({scale:!0,min:"dataMin",max:"dataMax"},hm.valueAxis),hm.logAxis=o({scale:!0,logBase:10},hm.valueAxis);var um=["value","category","time","log"],cm=function(t,e,n,a){f(um,function(o){e.extend({type:t+"Axis."+o,mergeDefaultAndTheme:function(e,r){var a=this.layoutMode,s=a?Pr(e):{};i(e,r.getTheme().get(o+"Axis")),i(e,this.getDefaultOption()),e.type=n(t,e),a&&Lr(e,s,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=dl.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r([{},hm[o+"Axis"],a],!0)})}),Qd.registerSubTypeDefaulter(t+"Axis",m(n,t))},fm={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:z,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},dm=Qd.extend({type:"cartesian2dAxis",axis:null,init:function(){dm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){dm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){dm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});i(dm.prototype,fm);var pm={offset:0};cm("x",dm,oh,pm),cm("y",dm,oh,pm),Qd.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 gm=lh.prototype;gm.type="grid",gm.axisPointerEnabled=!0,gm.getRect=function(){return this._rect},gm.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),f(n.x,function(t){Ol(t.scale,t.model)}),f(n.y,function(t){Ol(t.scale,t.model)});var i={};f(n.x,function(t){hh(n,"y",t,i)}),f(n.y,function(t){hh(n,"x",t,i)}),this.resize(this.model,e)},gm.resize=function(t,e,n){function i(){f(a,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]),ch(t,e?r.x:r.y)})}var r=Ar(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var a=this._axesList;i(),!n&&t.get("containLabel")&&(f(a,function(t){if(!t.model.get("axisLabel.inside")){var e=Rl(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())},gm.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]}},gm.getAxes=function(){return this._axesList.slice()},gm.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,xh(r)?t.labelOffset+o*l:0],f=e.get("nameRotate");null!=f&&(f=f*mm/180);var d;xh(r)?i=xm(t.rotation,null!=f?f:t.rotation,o):(i=gh(t,r,f||0,h),null!=(d=t.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(i.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},v=g.ellipsis,m=T(t.nameTruncateMaxWidth,g.maxWidth,d),y=null!=v&&null!=m?qd(n,m,p,v,{minChar:2,placeholder:g.placeholder}):n,_=e.get("tooltip",!0),x=e.mainType,w={componentType:x,name:n,$vars:["name"]};w[x+"Index"]=e.componentIndex;var b=new td({anid:"name",__fullText:n,__truncatedText:y,position:c,rotation:i.rotation,silent:vh(e),z2:1,tooltip:_&&_.show?a({content:n,formatter:function(){return n},formatterParams:w},_):null});Ui(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=ph(e),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},xm=ym.innerTextLayout=function(t,e,n){var i,r,a=mr(e-t);return yr(a)?(r=n>0?"top":"bottom",i="center"):yr(a-mm)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&a0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}},wm=es({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){this.axisPointerClass&&Sh(t),wm.superApply(this,"render",arguments),kh(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n,i,r){kh(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),wm.superApply(this,"remove",arguments)},dispose:function(t,e){Dh(this,e),wm.superApply(this,"dispose",arguments)}}),bm=[];wm.registerAxisPointerClass=function(t,e){bm[t]=e},wm.getAxisPointerClass=function(t){return t&&bm[t]};var Sm=["axisLine","axisTickLabel","axisName"],Mm=["splitArea","splitLine"],Im=wm.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Zu,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=Ah(a,t),s=new ym(t,o);f(Sm,s.add,s),this._axisGroup.add(s.getGroup()),f(Mm,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),ar(r,this._axisGroup,t),Im.superCall(this,"render",t,e,n,i)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=y(a)?a:[a];for(var s=e.coordinateSystem.getRect(),l=n.isHorizontal(),h=0,u=n.getTicksCoords({tickModel:i}),c=[],f=[],d=r.getLineStyle(),p=0;p1){var c;"string"==typeof r?c=Lv[r]:"function"==typeof r&&(c=r),c&&t.setData(i.downSample(i.mapDimension(s.dim),1/u,c,Pv))}}}}}("line")),zp.extend({type:"series.__base_bar__",getInitialData:function(t,e){return Ds(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"),a=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var Tm=Yc([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Cm={getBarItemStyle:function(t){var e=Tm(this,t);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(e.lineDash=n)}return e}},km=["itemStyle","barBorderWidth"];a(or.prototype,Cm),is({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t,e,n){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,n,i){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,n){var i,r=this.group,a=t.getData(),o=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;a.diff(o).add(function(e){if(a.hasValue(e)){var n=a.getItemModel(e),o=Am[s.type](a,e,n),l=Dm[s.type](a,e,n,o,i,h);a.setItemGraphicEl(e,l),r.add(l),Nh(l,a,e,n,o,t,i,"polar"===s.type)}}).update(function(e,n){var l=o.getItemGraphicEl(n);if(a.hasValue(e)){var u=a.getItemModel(e),c=Am[s.type](a,e,u);l?nr(l,{shape:c},h,e):l=Dm[s.type](a,e,u,c,i,h,!0),a.setItemGraphicEl(e,l),r.add(l),Nh(l,a,e,u,c,t,i,"polar"===s.type)}else r.remove(l)}).remove(function(t){var e=o.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Oh(t,h,e):e&&Eh(t,h,e)}).execute(),this._data=a},_renderLarge:function(t,e,n){this._clear(),zh(t,this.group)},_incrementalRenderLarge:function(t,e){zh(e,this.group,!0)},dispose:z,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,n=this._data;t&&t.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(e){"sector"===e.type?Eh(e.dataIndex,t,e):Oh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var Dm={cartesian2d:function(t,e,n,i,r,o,s){var l=new fd({shape:a({},i)});if(o){var h=l.shape,u=r?"height":"width",c={};h[u]=0,c[u]=i[u],Ad[s?"updateProps":"initProps"](l,{shape:c},o,e)}return l},polar:function(t,e,n,i,r,a,s){var l=i.startAngle0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*r/2,y:i.y+o*r/2,width:i.width-a*r,height:i.height-o*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}}},Lm=ci.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__valueIdx,a=0;a=0?"p":"n",b=v;p&&(r[o][x]||(r[o][x]={p:v,n:v}),b=r[o][x][w]);var S,M,I,T;if(g)S=b,M=(C=n.dataToPoint([_,x]))[1]+l,I=C[0]-v,T=h,Math.abs(I)0&&"scale"!==h){var f=r.getItemLayout(0),d=Math.max(n.getWidth(),n.getHeight())/2,p=v(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,d,f.startAngle,f.clockwise,p,t))}else o.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(t,e,n,i,r,a,o){var s=new rd({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:r}});return ir(s,{shape:{endAngle:i+(r?1:-1)*Math.PI*2}},o,a),s},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,a=Math.sqrt(i*i+r*r);return a<=n.r&&a>=n.r0}}});var Bm=function(t,e,n,i){var r,a,o=t.getData(),s=[],l=!1;o.each(function(n){var i,h,u,c,f=o.getItemLayout(n),d=o.getItemModel(n),p=d.getModel("label"),g=p.get("position")||d.get("emphasis.label.position"),v=d.getModel("labelLine"),m=v.get("length"),y=v.get("length2"),_=(f.startAngle+f.endAngle)/2,x=Math.cos(_),w=Math.sin(_);r=f.cx,a=f.cy;var b="inside"===g||"inner"===g;if("center"===g)i=f.cx,h=f.cy,c="center";else{var S=(b?(f.r+f.r0)/2*x:f.r*x)+r,M=(b?(f.r+f.r0)/2*w:f.r*w)+a;if(i=S+3*x,h=M+3*w,!b){var I=S+x*(m+e-f.r),T=M+w*(m+e-f.r),C=I+(x<0?-1:1)*y,k=T;i=C+(x<0?-5:5),h=k,u=[[S,M],[I,T],[C,k]]}c=b?"center":x>0?"left":"right"}var D=p.getFont(),A=p.get("rotate")?x<0?-_+Math.PI:-_:0,L=ge(t.getFormattedLabel(n,"normal")||o.getName(n),D,c,"top");l=!!A,f.label={x:i,y:h,position:g,height:L.height,len:m,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:A,inside:b},b||s.push(f.label)}),!l&&t.get("avoidLabelOverlap")&&Gh(s,r,a,e,n,i)},zm=2*Math.PI,Rm=Math.PI/180;!function(t,e){f(e,function(e){e.update="updateView",$o(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"}]),Ko(function(t){return{getTargetSeries:function(e){var n={},i=B();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 a=i[e],o=null!=a&&r.getItemVisual(a,"color",!0);if(o)n.setItemVisual(e,"color",o);else{var s=n.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(n.getName(e)||e+"",t.__paletteScope,n.count());n.setItemVisual(e,"color",s),null!=a&&r.setItemVisual(a,"color",s)}})}}}("pie")),Qo(m(function(t,e,n,i){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=t.get("center"),a=t.get("radius");y(a)||(a=[0,a]),y(r)||(r=[r,r]);var o=n.getWidth(),s=n.getHeight(),l=Math.min(o,s),h=fr(r[0],o),u=fr(r[1],s),c=fr(a[0],l/2),f=fr(a[1],l/2),d=-t.get("startAngle")*Rm,p=t.get("minAngle")*Rm,g=0;e.each(i,function(t){!isNaN(t)&&g++});var v=e.getSum(i),m=Math.PI/(v||g)*2,_=t.get("clockwise"),x=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(i);b[0]=0;var S=zm,M=0,I=d,T=_?1:-1;if(e.each(i,function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:h,cy:u,r0:c,r:x?NaN:f});else{(i="area"!==x?0===v&&w?m:t*m:zm/g)