// +---------------------------------------------------------------------- // | vaeThink [ Programming makes me happy ] // +---------------------------------------------------------------------- // | Copyright (c) 2018 http://www.vaeThink.com All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: 听雨 < 389625819@qq.com > // +--------------------------------------------------------------------- var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};layui.define(function(t){var e,i;e=this,i=function(t){function e(t,e){"createCanvas"===t&&(Gu=null),Fu[t]=e}function i(t){if(null==t||"object"!=(void 0===t?"undefined":_typeof(t)))return t;var e=t,n=Ou.call(t);if("[object Array]"===n){if(!z(t)){e=[];for(var r=0,o=t.length;roc||t<-oc}function dt(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 ft(t){return(t=Math.round(t))<0?0:t>255?255:t}function pt(t){return t<0?0:t>1?1:t}function gt(t){return ft(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function mt(t){return pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function vt(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function yt(t,e,i){return t+(e-t)*i}function xt(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function _t(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function wt(t,e){vc&&_t(vc,e),vc=mc.put(t,vc||e.slice())}function bt(t,e){if(t){e=e||[];var i=mc.get(t);if(i)return _t(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in gc)return _t(e,gc[n]),wt(t,e),e;if("#"!==n.charAt(0)){var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===n.length){var a=n.substr(0,r),s=n.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void xt(e,0,0,0,1);l=mt(s.pop());case"rgb":return 3!==s.length?void xt(e,0,0,0,1):(xt(e,gt(s[0]),gt(s[1]),gt(s[2]),l),wt(t,e),e);case"hsla":return 4!==s.length?void xt(e,0,0,0,1):(s[3]=mt(s[3]),St(s,e),wt(t,e),e);case"hsl":return 3!==s.length?void xt(e,0,0,0,1):(St(s,e),wt(t,e),e);default:return}}xt(e,0,0,0,1)}else{if(4===n.length)return(h=parseInt(n.substr(1),16))>=0&&h<=4095?(xt(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),wt(t,e),e):void xt(e,0,0,0,1);if(7===n.length){var h=parseInt(n.substr(1),16);return h>=0&&h<=16777215?(xt(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),wt(t,e),e):void xt(e,0,0,0,1)}}}}function St(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=mt(t[1]),r=mt(t[2]),o=r<=.5?r*(n+1):r+n-r*n,a=2*r-o;return xt(e=e||[],ft(255*vt(a,o,i+1/3)),ft(255*vt(a,o,i)),ft(255*vt(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Mt(t,e){var i=bt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return At(i,4===i.length?"rgba":"rgb")}}function It(t){var e=bt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Tt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=e[r],s=e[o],l=n-r;return i[0]=ft(yt(a[0],s[0],l)),i[1]=ft(yt(a[1],s[1],l)),i[2]=ft(yt(a[2],s[2],l)),i[3]=pt(yt(a[3],s[3],l)),i}}function Ct(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=bt(e[r]),s=bt(e[o]),l=n-r,h=At([ft(yt(a[0],s[0],l)),ft(yt(a[1],s[1],l)),ft(yt(a[2],s[2],l)),pt(yt(a[3],s[3],l))],"rgba");return i?{color:h,leftIndex:r,rightIndex:o,value:n}:h}}function Dt(t,e){if((t=bt(t))&&null!=e)return t[3]=pt(e),At(t,"rgba")}function At(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function kt(t,e){return t[e]}function Pt(t,e,i){t[e]=i}function Lt(t,e,i){return(e-t)*i+t}function Ot(t,e,i){return i>.5?e:t}function zt(t,e,i,n,r){var o=t.length;if(1==r)for(s=0;sr)t.length=r;else for(a=n;a=0&&!(y[i]<=e);i--);i=Math.min(i,d-2)}else{for(i=P;ie);i++);i=Math.min(i-1,d-2)}P=i,L=e;var n=y[i+1]-y[i];if(0!==n)if(T=(e-y[i])/n,u)if(D=x[i],C=x[0===i?i:i-1],A=x[i>d-2?d-1:i+1],k=x[i>d-3?d-1:i+2],p)Rt(C,D,A,k,T,T*T,T*T*T,l(t,r),v);else{if(g)o=Rt(C,D,A,k,T,T*T,T*T*T,O,1),o=Ft(O);else{if(m)return Ot(D,A,T);o=Bt(C,D,A,k,T,T*T,T*T*T)}h(t,r,o)}else if(p)zt(x[i],x[i+1],T,l(t,r),v);else{var o;if(g)zt(x[i],x[i+1],T,O,1),o=Ft(O);else{if(m)return Ot(x[i],x[i+1],T);o=Lt(x[i],x[i+1],T)}h(t,r,o)}},ondestroy:i});return e&&"spline"!==e&&(z.easing=e),z}}}function Gt(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function Wt(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function Zt(t,e,i,n,r){for(n===e&&n++;n>>1])<0?l=o:s=o+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function Ut(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var h=a;a=r-l,l=r-h}for(a++;a>>1);o(t,e[i+u])>0?a=u+1:l=u}return l}function Xt(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;ls&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=n-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[i+u])<0?l=u:a=u+1}return l}function jt(t,e){function i(i){var l=n[i],h=r[i],u=n[i+1],c=r[i+1];r[i]=h+c,i===a-3&&(n[i+1]=n[i+2],r[i+1]=r[i+2]),a--;var d=Xt(t[u],t,l,h,0,e);l+=d,0!=(h-=d)&&0!==(c=Ut(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,r,a){var l=0;for(l=0;l=Rc||f>=Rc);if(p)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===n){for(l=0;l=0;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=s[u--],1==--a){v=!0;break}if(0!=(m=a-Ut(t[h],s,0,a,a-1,e))){for(a-=m,f=1+(c-=m),d=1+(u-=m),l=0;l=Rc||m>=Rc);if(v)break;p<0&&(p=0),p+=2}if((o=p)<1&&(o=1),1===a){for(f=1+(c-=n),d=1+(h-=n),l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=s[u]}else{if(0===a)throw new Error;for(d=c-(a-1),l=0;l=0;l--)t[f+l]=t[d+l];t[c]=s[u]}else for(d=c-(a-1),l=0;l1;){var t=a-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;a>1;){var t=a-2;t>0&&r[t-1]=Nc;)e|=1&t,t>>=1;return t+e}(r);do{if((o=Wt(t,i,n,e))s&&(l=s),Zt(t,i,i+l,i+o,e),o=l}a.pushRun(i,o),a.mergeRuns(),r-=o,i+=o}while(0!==r);a.forceMergeRuns()}}function qt(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function $t(){return!1}function Kt(t,e,i){var n=Hu(),r=e.getWidth(),o=e.getHeight(),a=n.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=o*i,n}function Qt(t){if("string"==typeof t){var e=qc.get(t);return e&&e.image}return t}function Jt(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=qc.get(t),a={hostEl:i,cb:n,cbPayload:r};return o?!ee(e=o.image)&&o.pending.push(a):(!e&&(e=new Image),e.onload=te,qc.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function te(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;eQc&&(Kc=0,$c={}),Kc++,$c[r]=a,a}function ne(t,e,i,n,r,o,a){return o?(l=n,h=fe(t,{rich:o,truncate:a,font:e,textAlign:s=i,textPadding:r}),u=h.outerWidth,c=h.outerHeight,new Gt(re(0,u,s),oe(0,c,l),u,c)):function(t,e,i,n,r,o){var a=de(t,e,r,o),s=ie(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,h=new Gt(re(0,s,i),oe(0,l,n),s,l);return h.lineHeight=a.lineHeight,h}(t,e,i,n,r,a);var s,l,h,u,c}function re(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function oe(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function ae(t,e,i){var n=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",h="top";switch(t){case"left":n-=i,r+=s,l="right",h="middle";break;case"right":n+=i+a,r+=s,h="middle";break;case"top":n+=a/2,r-=i,l="center",h="bottom";break;case"bottom":n+=a/2,r+=o+i,l="center";break;case"inside":n+=a/2,r+=s,l="center",h="middle";break;case"insideLeft":n+=i,r+=s,h="middle";break;case"insideRight":n+=a-i,r+=s,l="right",h="middle";break;case"insideTop":n+=a/2,r+=i,l="center";break;case"insideBottom":n+=a/2,r+=o-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,r+=i;break;case"insideTopRight":n+=a-i,r+=i,l="right";break;case"insideBottomLeft":n+=i,r+=o-i,h="bottom";break;case"insideBottomRight":n+=a-i,r+=o-i,l="right",h="bottom"}return{x:n,y:r,textAlign:l,textVerticalAlign:h}}function se(t,e,i,n,r){if(!e)return"";var o=(t+"").split("\n");r=le(e,i,n,r);for(var a=0,s=o.length;a=a;l++)s-=a;var h=ie(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function he(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var o=ie(t,n);if(o<=i)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ue(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=ie(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function ue(t,e,i,n){for(var r=0,o=0,a=t.length;ol)t="",o=[];else if(null!=h)for(var u=le(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=o.length;cr&&pe(i,t.substring(r,o)),pe(i,n[2],n[1]),r=Jc.lastIndex}rf)return{lines:[],width:0,height:0};P.textWidth=ie(P.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))P.percentWidth=b,h.push(P),b=0;else{if(S){b=P.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&ee(I=Qt(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var A=null!=d?d-m:null;null!=A&&Ah&&(i*=h/(a=i+n),n*=h/a),r+o>h&&(r*=h/(a=r+o),o*=h/a),n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.arc(s+h-n,l+n,n,-Math.PI/2,0),t.lineTo(s+h,l+u-r),0!==r&&t.arc(s+h-r,l+u-r,r,0,Math.PI/2),t.lineTo(s+o,l+u),0!==o&&t.arc(s+o,l+u-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}function ve(t){return ye(t),d(t.rich,ye),t}function ye(t){if(t){t.font=ge(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||id[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||nd[i]?i:"top",t.textPadding&&(t.textPadding=k(t.textPadding))}}function xe(t,e,i,n,r){var o,a,s,l,h,u;n.rich?(a=e,s=i,l=n,h=r,(u=(o=t).__textCotentBlock)&&!o.__dirty||(u=o.__textCotentBlock=fe(s,l)),function(t,e,i,n,r){var o=i.width,a=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Ie(s,n,r),u=h.baseX,c=h.baseY,d=h.textAlign,f=h.textVerticalAlign;_e(e,n,r,u,c);var p=re(u,a,d),g=oe(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+o;be(n)&&Se(t,e,n,p,g,a,s);for(var x=0;x=0&&"right"===(_=b[A]).textAlign;)we(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,A--;for(C+=(o-(C-m)-(y-D)-I)/2;T<=A;)we(t,e,_=b[T],n,M,v,C+_.width/2,"center"),C+=_.width,T++;v+=M}}(o,a,u,l,h)):function(t,e,i,n,r){var o=Te(e,"font",n.font||td),a=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=de(i,o,a,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Ie(l,n,r),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;_e(e,n,r,d,f);var m=oe(f,l,g),v=d,y=m,x=be(n);if(x||a){var _=ie(i,o);a&&(_+=a[1]+a[3]);var w=re(d,_,p);x&&Se(t,e,n,w,m,_,l),a&&(v=ke(d,p,a),y+=a[0])}Te(e,"textAlign",p||"left"),Te(e,"textBaseline","middle"),Te(e,"shadowBlur",n.textShadowBlur||0),Te(e,"shadowColor",n.textShadowColor||"transparent"),Te(e,"shadowOffsetX",n.textShadowOffsetX||0),Te(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var b=n.textStrokeWidth,S=Ce(n.textStroke,b),M=De(n.textFill);S&&(Te(e,"lineWidth",b),Te(e,"strokeStyle",S)),M&&Te(e,"fillStyle",M);for(var I=0;I=0?parseFloat(t)/100*e:parseFloat(t):t}function ke(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Pe(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Le(t){for(var e in t=t||{},Cc.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Gc(t.style,this),this._rect=null,this.__clipPaths=[]}function Oe(t){Le.call(this,t)}function ze(t){return parseInt(t,10)}function Ee(t,e,i,n){return i=i||{},n||!ku.canvasSupported?Ne(t,e,i):ku.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Ne(t,e,i),i}function Ne(t,e,i){var n,r=(n=t).getBoundingClientRect?n.getBoundingClientRect():{left:0,top:0};i.zrX=e.clientX-r.left,i.zrY=e.clientY-r.top}function Re(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];r&&Ee(t,r,e,i)}else Ee(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&ud.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Be(t,e,i){hd?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function Ve(t){return t.which>1}function Fe(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function He(t){return"mousewheel"===t&&ku.browser.firefox?"DOMMouseScroll":t}function Ge(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var r=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),r){var o=r.type;e.gestureEvent=o,t.handler.dispatchToElement({target:r.target},o,r.event)}}function We(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Ze(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ue(t){function e(e,i){d(e,function(e){Be(t,He(e),i._handlers[e])},i)}var i;Qu.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new fd,this._handlers={},i=this,d(md,function(t){i._handlers[t]=m(xd[t],i)}),d(yd,function(t){i._handlers[t]=m(xd[t],i)}),d(gd,function(t){var e,n;i._handlers[t]=(e=xd[t],n=i,function(){if(!n._touching)return e.apply(n,arguments)})}),ku.pointerEventsSupported?e(yd,this):(ku.touchEventsSupported&&e(md,this),e(gd,this))}function Xe(t,e){var i=new Md(Au(),t,e);return Sd[i.id]=i,i}function je(t,e){bd[t]=e}function Ye(t){return t instanceof Array?t:null==t?[]:[t]}function qe(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;n=i.length&&i.push({option:t})}}),i}function Qe(t){var e=N();Td(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Td(t,function(t,i){var n=t.option;P(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Td(t,function(t,i){var n=t.exist,r=t.option,o=t.keyInfo;if(Cd(r)){if(o.name=null!=r.name?r.name+"":n?n.name:Ad+i,n)o.id=n.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(e.get(o.id))}e.set(o.id,t)}})}function Je(t){var e=t.name;return!(!e||!e.indexOf(Ad))}function ti(t){return Cd(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function ei(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?f(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?f(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function ii(){var t="__\0ec_inner_"+Pd+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function ni(t,e,i){if(_(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||ri(e,r+"Index")||ri(e,r+"Id")||ri(e,r+"Name")||(e[r+"Index"]=0);var o={};return Td(e,function(n,r){n=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],h=(a[2]||"").toLowerCase();if(!(!s||!h||null==n||"index"===h&&"none"===n||i&&i.includeMainTypes&&l(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===h&&"all"===n||(u[h]=n);var c=t.queryComponents(u);o[s+"Models"]=c,o[s+"Model"]=c[0]}}else o[r]=n}),o}function ri(t,e){return t&&t.hasOwnProperty(e)}function oi(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function ai(t){var e={main:"",sub:""};return t&&(t=t.split(Ld),e.main=t[0]||"",e.sub=t[1]||""),e}function si(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(i.prototype,t),i.extend=this.extend,i.superCall=hi,i.superApply=ui,h(i,this),i.superClass=e,i}}function li(t){var e=["__\0is_clz",zd++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function hi(t,e){var i=A(arguments,2);return this.superClass.prototype[e].apply(t,i)}function ui(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ci(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(o=e),'componentType "'+o+'" illegal'),(e=ai(e)).sub?e.sub!==Od&&((n=e,r=i[n.main],r&&r[Od]||((r=i[n.main]={})[Od]=!0),r)[e.sub]=t):i[e.main]=t),t;var n,r,o},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Od]&&(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=ai(t);var e=[],n=i[t.main];return n&&n[Od]?d(n,function(t,i){i!==Od&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=ai(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(i,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=ai(t);var e=i[t.main];return e&&e[Od]},t.parseClassType=ai,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t}function di(t){return t>-Gd&&tGd||t<-Gd}function pi(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function gi(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function mi(t,e,i,n,r){var o=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(di(a))fi(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var h=o*o-4*a*s;if(di(h))r[0]=-o/(2*a);else if(h>0){var u=Hd(h),c=(-o+u)/(2*a),d=(-o-u)/(2*a);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function vi(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n}function yi(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function xi(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function _i(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function wi(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function bi(t,e,i){if(0!==t.length){var n,r=t[0],o=r[0],a=r[0],s=r[1],l=r[1];for(n=1;n1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(tf[0]=Qd(r)*i+t,tf[1]=Kd(r)*n+e,ef[0]=Qd(o)*i+t,ef[1]=Kd(o)*n+e,h(s,tf,ef),u(l,tf,ef),(r%=Jd)<0&&(r+=Jd),(o%=Jd)<0&&(o+=Jd),r>o&&!a?o+=Jd:rr&&(nf[0]=Qd(f)*i+t,nf[1]=Kd(f)*n+e,h(s,nf,s),u(l,nf,l))}function Ti(t,e,i,n,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>n+l||at+l&&o>i+l||oe+c&&u>n+c&&u>o+c&&u>s+c||ut+c&&h>i+c&&h>r+c&&h>a+c||h=0&&pe+h&&l>n+h&&l>o+h||lt+h&&s>i+h&&s>r+h||s=0&&mi||u+hr&&(r+=_f);var d=Math.atan2(l,s);return d<0&&(d+=_f),d>=n&&d<=r||d+_f>=n&&d+_f<=r}function Pi(t,e,i,n,r,o){if(o>e&&o>n||or?a:0}function Li(t,e,i,n,r,o,a,s,l,h){if(h>e&&h>n&&h>o&&h>s||h=0&&M<=1&&(o[f++]=M);else{var p=c*c-4*u*d;if(di(p)){var g=c/u,m=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m)}else if(p>0){var v=Hd(p),y=u*s+1.5*a*(-c+v),x=u*s+1.5*a*(-c-v);(M=(-s-((y=y<0?-Fd(-y,Ud):Fd(y,Ud))+(x=x<0?-Fd(-x,Ud):Fd(x,Ud))))/(3*a))>=0&&M<=1&&(o[f++]=M)}else{var _=(2*u*s-3*a*c)/(2*Hd(u*u*u)),w=Math.acos(_)/3,b=Hd(u),S=Math.cos(w),M=(-s-2*b*S)/(3*a),I=(m=(-s+b*(S+Zd*Math.sin(w)))/(3*a),(-s+b*(S-Zd*Math.sin(w)))/(3*a));M>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m),I>=0&&I<=1&&(o[f++]=I)}}return f}(e,n,o,s,h,Mf);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m1&&(void 0,u=If[0],If[0]=If[1],If[1]=u),d=pi(e,n,o,s,If[0]),g>1&&(f=pi(e,n,o,s,If[1]))),2==g?ve&&s>n&&s>o||s=0&&c<=1&&(r[l++]=c);else{var h=a*a-4*o*s;if(di(h))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(h>0){var u=Hd(h),c=(-a+u)/(2*o),d=(-a-u)/(2*o);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,n,o,s,Mf);if(0===l)return 0;var h=_i(e,n,o);if(h>=0&&h<=1){for(var u=0,c=yi(e,n,o,h),d=0;di||s<-i)return 0;h=Math.sqrt(i*i-s*s),Mf[0]=-h,Mf[1]=h;var l=Math.abs(n-r);if(l<1e-4)return 0;if(l%bf<1e-4)return n=0,r=bf,p=o?1:-1,a>=Mf[0]+t&&a<=Mf[1]+t?p:0;if(o){var h=n;n=Ai(r),r=Ai(h)}else n=Ai(n),r=Ai(r);n>r&&(r+=bf);for(var u=0,c=0;c<2;c++){var d=Mf[c];if(d+t>a){var f=Math.atan2(s,d),p=o?1:-1;f<0&&(f=bf+f),(f>=n&&f<=r||f+bf>=n&&f+bf<=r)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),u+=p)}}return u}function Ei(t,e,i,n,r){for(var o=0,a=0,s=0,l=0,h=0,u=0;u1&&(i||(o+=Pi(a,s,l,h,n,r))),1==u&&(l=a=t[u],h=s=t[u+1]),c){case wf.M:a=l=t[u++],s=h=t[u++];break;case wf.L:if(i){if(Ti(a,s,t[u],t[u+1],e,n,r))return!0}else o+=Pi(a,s,t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case wf.C:if(i){if(Ci(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Li(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case wf.Q:if(i){if(Di(a,s,t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Oi(a,s,t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case wf.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;u>1?o+=Pi(a,s,x,_,n,r):(l=x,h=_);var w=(n-d)*g/p+d;if(i){if(ki(d,f,g,m,m+v,y,e,w,r))return!0}else o+=zi(d,f,g,m,m+v,y,w,r);a=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case wf.R:l=a=t[u++],h=s=t[u++];x=l+t[u++],_=h+t[u++];if(i){if(Ti(l,h,x,h,e,n,r)||Ti(x,h,x,_,e,n,r)||Ti(x,_,l,_,e,n,r)||Ti(l,_,l,h,e,n,r))return!0}else o+=Pi(x,h,x,_,n,r),o+=Pi(l,_,l,h,n,r);break;case wf.Z:if(i){if(Ti(a,s,l,h,e,n,r))return!0}else o+=Pi(a,s,l,h,n,r);a=l,s=h}}return i||(b=s,S=h,Math.abs(b-S)1&&(a*=Ef(p),s*=Ef(p));var g=(r===o?-1:1)*Ef((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=g*-s*d/a,y=(t+i)/2+Rf(c)*m-Nf(c)*v,x=(e+n)/2+Nf(c)*m+Rf(c)*v,_=Hf([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],b=[(-1*d-m)/a,(-1*f-v)/s],S=Hf(w,b);Ff(w,b)<=-1&&(S=Bf),Ff(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*Bf),1===o&&S<0&&(S+=2*Bf),u.addData(h,y,x,a,s,_,S,c,o)}function Bi(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var p=0;p=2){if(r&&"spline"!==r){var o=qf(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;s<(i?a:a-1);s++){var l=o[2*s],h=o[2*s+1],u=n[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(n=Yf(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function vn(t,e){var i=e||e.getModel("textStyle");return L([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function yn(t,e,i,n,r,o){if("function"==typeof r&&(o=r,r=null),n&&n.isAnimationEnabled()){var a=t?"Update":"",s=n.getShallow("animationDuration"+a),l=n.getShallow("animationEasing"+a),h=n.getShallow("animationDelay"+a);"function"==typeof h&&(h=h(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(i,s,h||0,l,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function xn(t,e,i,n,r){yn(!0,t,e,i,n,r)}function _n(t,e,i,n,r){yn(!1,t,e,i,n,r)}function wn(t,e){for(var i=rt([]);t&&t!==e;)at(i,t.getLocalTransform(),i),t=t.parent;return i}function bn(t,e,i){return e&&!c(e)&&(e=ac.getLocalTransform(e)),i&&(e=ut([],e)),$([],t,e)}function Sn(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=bn(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Mn(t,e,i,n){function r(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=(s={},t.traverse(function(t){!t.isGroup&&t.anid&&(s[t.anid]=t)}),s);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=r(t);t.attr(r(e)),xn(t,n,i,t.dataIndex)}}})}var s}function In(t,e){return f(t,function(t){var i=t[0];i=hp(i,e.x),i=up(i,e.x+e.width);var n=t[1];return n=hp(n,e.y),[i,n=up(n,e.y+e.height)]})}function Tn(t,e,i){var n=(e=o({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),a(n,i),new Oe(e)):Zi(t.replace("path://",""),e,i,"center")}function Cn(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Dn(t,e,i){for(var n=0;n0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]}function Ln(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?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i}function On(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function zn(t){return t.sort(function(t,e){return t-e}),t}function En(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Nn(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Rn(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Bn(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var r=Math.pow(10,i),o=f(t,function(t){return(isNaN(t)?0:t)/n*r*100}),a=100*r,s=f(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=f(o,function(t,e){return t-s[e]});lu&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function Vn(t){var e=2*Math.PI;return(t%e+e)%e}function Fn(t){return t>-bp&&t=-20?+t.toFixed(i<0?-i:0):t}function Un(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Xn(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function jn(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Yn(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;o':'':""}function $n(t,e){return"0000".substr(0,e-(t+="").length)+t}function Kn(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Hn(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),a=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),u=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t.replace("MM",$n(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",$n(s,2)).replace("d",s).replace("hh",$n(l,2)).replace("h",l).replace("mm",$n(h,2)).replace("m",h).replace("ss",$n(u,2)).replace("s",u).replace("SSS",$n(c,3))}function Qn(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Jn(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(u=o+m)>n||l.newline?(o=0,u=m,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=a+v)>r||l.newline?(o+=s+i,a=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=u+i:a=c+i)})}function tr(t,e,i){i=Ip(i||0);var n=e.width,r=e.height,o=Ln(t.left,n),a=Ln(t.top,r),s=Ln(t.right,n),l=Ln(t.bottom,r),h=Ln(t.width,n),u=Ln(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-o),isNaN(u)&&(u=r-l-c-a),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/r?h=.8*n:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(o)&&(o=n-s-h-d),isNaN(a)&&(a=r-l-u-c),t.left||t.right){case"center":o=n/2-h/2-i[3];break;case"right":o=n-h-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-u/2-i[0];break;case"bottom":a=r-u-c}o=o||0,a=a||0,isNaN(h)&&(h=n-d-o-(s||0)),isNaN(u)&&(u=r-c-a-(l||0));var p=new Gt(o+i[3],a+i[0],h,u);return p.margin=i,p}function er(t,e,i,n,r){var o=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||s){var h;if("raw"===l)h="group"===t.type?new Gt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(h=h.clone()).applyTransform(u)}e=tr(a({width:h.width,height:h.height},e),i,n);var c=t.position,d=o?e.x-h.x:0,f=s?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function ir(t,e,i){function n(i,n){var a={},l=0,h={},u=0;if(Pp(i,function(e){h[e]=t[e]}),Pp(i,function(t){r(e,t)&&(a[t]=h[t]=e[t]),o(a,t)&&l++,o(h,t)&&u++}),s[n])return o(e,i[1])?h[i[2]]=null:o(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&l){if(l>=2)return a;for(var c=0;c=o:"max"===a?i<=o:i===o)||(r=!1)}}),r}function xr(t){var e=t&&t.itemStyle;if(e)for(var i=0,r=hg.length;i=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,u)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n});a.hostModel.setData(l),e.data=l})}function Dr(t,e){sr.isInstance(t)||(t=sr.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Yp&&(this._offset=0,this._dimSize=e,this._data=i),o(this,gg[n===Zp?n+"_"+t.seriesLayoutBy:n])}function Ar(){return this._data.length}function kr(t){return this._data[t]}function Pr(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Wr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(Zr,e))})}function Zr(t){var e=Ur(t);e&&e.setOutputEnd(this.count())}function Ur(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}function Xr(){this.group=new Ec,this.uid=kn("viewChart"),this.renderTask=Rr({plan:qr,reset:$r}),this.renderTask.context={view:this}}function jr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?n():c=setTimeout(n,-o),h=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Qr(t,e,i,n){var r=t[e];if(r){var o=r[kg]||r,a=r[Lg];if(r[Pg]!==i||a!==n){if(null==i||!n)return t[e]=o;(r=t[e]=Kr(o,i,"debounce"===n))[kg]=o,r[Lg]=n,r[Pg]=i}return r}}function Jr(t,e){var i=t[e];i&&i[kg]&&(t[e]=i[kg])}function to(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished,this._dataProcessorHandlers=i.slice(),this._visualHandlers=n.slice(),this._stageTaskMap=N()}function eo(t,e,i,n,r){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}var a;r=r||{},d(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each(function(t){o(r,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),Bg(u,n);var f=t.getPerformArgs(u,r.block);d.each(function(t){t.perform(f)}),a|=u.perform(f)}else h&&h.each(function(s,l){o(r,s)&&s.dirty();var h=t.getPerformArgs(s,r.block);h.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),Bg(s,n),a|=s.perform(h)})}}),t.unfinished|=a}function io(t){t.overallReset(t.ecModel,t.api,t.payload)}function no(t,e){return t.overallProgress&&ro}function ro(){this.agent.dirty(),this.getDownstream().dirty()}function oo(){this.agent&&this.agent.dirty()}function ao(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function so(t){if(t.useClearVisual&&t.data.clearAllVisual(),(t.resetDefines=Ye(t.reset(t.model,t.ecModel,t.api,t.payload))).length)return lo}function lo(t,e){for(var i=e.data,n=e.resetDefines,r=0;rs.get("hoverLayerThreshold")&&!ku.node&&l.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),Eg(t._zr.dom,e)}function Co(t,e){jg(cm,function(i){i(t,e)})}function Do(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Ao(t){mm[t]=!1}function ko(t){return gm[(e=t,i=xm,e.getAttribute?e.getAttribute(i):e[i])];var e,i}function Po(t,e){fm[t]=e}function Lo(t){um.push(t)}function Oo(t,e){Ro(hm,t,e,Kg)}function zo(t,e,i){"function"==typeof e&&(i=e,e="");var n=qg(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Xg(nm.test(n)&&nm.test(e)),sm[n]||(sm[n]={action:i,actionInfo:t}),lm[e]=n}function Eo(t,e){Ro(dm,t,e,Qg,"layout")}function No(t,e){Ro(dm,t,e,Jg,"visual")}function Ro(t,e,i,n,r){(Yg(e)||qg(e))&&(i=e,e=n);var o=to.wrapStageHandler(i,r);return o.__prio=e,o.__raw=i,t.push(o),o}function Bo(t,e){pm[t]=e}function Vo(t){return Rp.extend(t)}function Fo(t){return Sg.extend(t)}function Ho(t){return bg.extend(t)}function Go(t){return Xr.extend(t)}function Wo(t){return t}function Zo(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||Wo,this._newKeyGetter=n||Wo,this.context=r}function Uo(t,e,i,n,r){for(var o=0;o65535?Cm:Dm}function jo(t,e){d(Am.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods}function Yo(t){return t}function qo(t){return t=0?this._indices[t]:-1}function $o(t,e){var i=t._idList[e];return null==i&&(i=t._getIdFromStore(e)),null==i&&(i=Im+e),i}function Ko(t){return y(t)||(t=[t]),t}function Qo(t,e){var i=t.dimensions,n=new km(f(i,t.getDimensionInfo,t),t.hostModel);jo(n,t);for(var r=n._storage={},a=t._storage,s=o({},t._rawExtent),h=0;h=0?(r[u]=Jo(a[u]),s[u]=[1/0,-1/0]):r[u]=a[u])}return n}function Jo(t){for(var e=new Array(t.length),i=0;it[1]&&(t[0]=t[1])}function da(t){return t.get("stack")||Fm+t.seriesIndex}function fa(t){return t.dim+t.index}function pa(t,e){return function(t,e){var i={};d(t,function(t,e){var n=t.axisKey,r=t.bandWidth,o=i[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;i[n]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var h=t.barMaxWidth;h&&(a[s].maxWidth=h);var u=t.barGap;null!=u&&(o.gap=u);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=Ln(t.categoryGap,r),a=Ln(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-o)/(l+(l-1)*a);h=Math.max(h,0),d(i,function(t,e){var i=t.maxWidth;i&&i0&&s>0&&!l&&(a=0),a<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===o){var f,p=[];if(c.eachSeriesByType("bar",function(t){t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type&&(p.push(t),f|=t.getBaseAxis()===e.axis)}),f){var g=function(t,e,i,n){var r=i.axis.getExtent(),o=r[1]-r[0],a=pa(n)[i.axis.dim+i.axis.index];if(void 0===a)return{min:t,max:e};var s=1/0;d(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(a,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var h=s+l,u=e-t,c=u/(1-(s+l)/o)-u;return{min:t-=c*(s/h),max:e+=c*(l/h)}}(a,s,e,p);a=g.min,s=g.max}}return[a,s]}function va(t,e){var i=ma(t,e),n=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function ya(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Nm(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Vm;default:return(oa.getClass(e)||Vm).create(t)}}function xa(t,e){return"category"===t.type?t.scale.getLabel(e):e}function _a(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function wa(t,e,i,n,r,o,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Ui(t.slice(8),new Gt(e,i,n,r),a?"center":"cover"):0===t.indexOf("path://")?Zi(t.slice(7),{},new Gt(e,i,n,r),a?"center":"cover"):new lv({shape:{symbolType:t,x:e,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=_a,s.setColor(o),s}function ba(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,n.push([s/i,l/i])}return n}function Ta(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function Ca(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Er(t,e,i[0]);if(n){for(var r=[],o=0;o0?r=o[0]:o[1]<0&&(r=o[1]),r),h=a.dim,u=s.dim,c=e.mapDimension(u),d=e.mapDimension(h),p="x"===u||"radius"===u?1:0,g=na(e,c,d);return{dataDimsForPoint:f(t.dimensions,function(t){return e.mapDimension(t)}),valueStart:l,valueAxisDim:u,baseAxisDim:h,stacked:g,valueDim:c,baseDim:d,baseDataOffset:p,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Na(t,e,i,n){var r=NaN;t.stacked&&(r=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=i.get(t.baseDim,n),a[1-o]=r,e.dataToPoint(a)}function Ra(t){return isNaN(t[0])||isNaN(t[1])}function Ba(t,e,i,n,r,o,a,s,l,h,u){return null==h?Va(e,"x")?Fa(t,e,i,n,r,o,a,s,l,"x",u):Va(e,"y")?Fa(t,e,i,n,r,o,a,s,l,"y",u):Ha.apply(this,arguments):"none"!==h&&Va(e,h)?Fa.apply(this,arguments):Ha.apply(this,arguments)}function Va(t,e){if(t.length<=1)return!0;for(var i="x"===e?0:1,n=t[0][i],r=0,o=1;o=0!=r>=0)return!1;isNaN(a)||0===a||(r=a,n=t[o][i])}return!0}function Fa(t,e,i,n,r,o,a,s,l,h,u){for(var c=0,d=i,f=0;f=r||d<0)break;if(Ra(p)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===h?1:0,v=(p[m]-g[m])*l;Cv(Av,g),Av[m]=g[m]+v,Cv(kv,p),kv[m]=p[m]-v,t.bezierCurveTo(Av[0],Av[1],kv[0],kv[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Ha(t,e,i,n,r,o,a,s,l,h,u){for(var c=0,d=i,f=0;f=r||d<0)break;if(Ra(p)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]),Cv(Av,p);else if(l>0){var g=d+o,m=e[g];if(u)for(;m&&Ra(e[g]);)m=e[g+=o];var v=.5,y=e[c];if(!(m=e[g])||Ra(m))Cv(kv,p);else{var x,_;if(Ra(m)&&!u&&(m=p),W(Dv,m,y),"x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=Yu(p,y),_=Yu(p,m);Tv(kv,p,Dv,-l*(1-(v=_/(_+x))))}Mv(Av,Av,s),Iv(Av,Av,a),Mv(kv,kv,s),Iv(kv,kv,a),t.bezierCurveTo(Av[0],Av[1],kv[0],kv[1],p[0],p[1]),Tv(Av,p,Dv,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Ga(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var r=0;rn[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function Wa(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Xa(t,e,i){return"polar"===t.type?(r=e,o=i,a=(n=t).getAngleAxis(),s=n.getRadiusAxis().getExtent(),l=a.getExtent(),h=Math.PI/180,u=new Xf({shape:{cx:n.cx,cy:n.cy,r0:s[0],r:s[1],startAngle:-l[0]*h,endAngle:-l[1]*h,clockwise:a.inverse}}),r&&(u.shape.endAngle=-l[0]*h,_n(u,{shape:{endAngle:-l[1]*h}},o)),u):function(t,e,i){var n=Ua(t.getAxis("x")),r=Ua(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),a=Math.min(n[0],n[1]),s=Math.min(r[0],r[1]),l=Math.max(n[0],n[1])-a,h=Math.max(r[0],r[1])-s,u=i.get("lineStyle.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);o?(s-=c,h+=2*c):(a-=c,l+=2*c);var d=new Qf({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,_n(d,{shape:{width:l,height:h}},i)),d}(t,e,i);var n,r,o,a,s,l,h,u}function ja(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a=0||t===e}function us(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ds(t)]}function cs(t){return!!t.get("handle.show")}function ds(t){return t.type+"||"+t.id}function fs(t,e,i,n,r,o){var a,s=ry.getAxisPointerClass(t.axisPointerClass);if(s){var l=(a=us(e))&&a.axisPointerModel;l?(t._axisPointer||(t._axisPointer=new s)).render(e,l,n,o):ps(t,n)}}function ps(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function gs(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,o={},a=r.position,s=r.onZero?"onZero":a,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(r.onZero){var p=n.getAxis("x"===l?"y":"x",r.onZeroAxisIndex),g=p.toGlobalCoord(p.dataToCoord(0));f[c.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===l?f[c[s]]:u[0],"x"===l?f[c[s]]:u[3]],o.rotation=Math.PI/2*("x"===l?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r.onZero?f[c[a]]-f[c.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(i.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var m=e.get("axisLabel.rotate");return o.labelRotate="top"===s?-m:m,o.labelInterval=r.getLabelInterval(),o.z2=1,o}function ms(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function vs(t,e,i){i.style.text=null,xn(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function ys(t,e,i){i.style.text=null,xn(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function xs(t,e,i,n,r,o,s,l){var h=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(a({fill:h,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var p,g,m,v,y,x;s?r.height:r.width;l||(p=t.style,v=h,y=o,x=i,cn(p,g=d,(m=n).getModel("label"),m.getModel("emphasis.label"),{labelFetcher:y,labelDataIndex:x,defaultText:Ca(y.getData(),x),isRectText:!0,autoColor:v}),ms(p),ms(g)),un(t,d)}function _s(t,e,i,n){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){ws(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,i)})}function ws(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,h=[a*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function bs(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}Ec.call(this);var r=new Xf({z2:2}),o=new Kf,a=new Gf;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Ss(t,e,i,n,r,o,a){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=a&&(d=a-10),!e&&d<=a&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,d=[],f=[],p=0;pe&&o+1t[o].y+t[o].height)return void s(o,n/2);s(i-1,n/2)}(p,c,-h),u=t[p].y+t[p].height;for(a-u<0&&s(c-1,u-a),p=0;p=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,r),l(f,!0,e,i,n,r)}function Ms(){this.group=new Ec}function Is(t,e,i,n){var r=i.type,o=new(0,dp[r.charAt(0).toUpperCase()+r.slice(1)])(i);e.add(o),n.set(t,o),o.__ecGraphicId=t}function Ts(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Ts(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Cs(t,e){var i;return d(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Ds(t,e,i,n,r){var a,s,l,h,u,c,d,f,p=t.axis;if(!p.scale.isBlank()&&p.containData(e))if(t.involveSeries){var g=(a=e,l=(s=t).axis,h=l.dim,u=a,c=[],d=Number.MAX_VALUE,f=-1,Ty(s.seriesModels,function(t,e){var i,n,r=t.getData().mapDimension(h,!0);if(t.getAxisTooltipData){var o=t.getAxisTooltipData(r,a,l);n=o.dataIndices,i=o.nestestValue}else{if(!(n=t.getData().indicesOfNearest(r[0],a,"category"===l.type?.5:null)).length)return;i=t.getData().get(r[0],n[0])}if(null!=i&&isFinite(i)){var s=a-i,p=Math.abs(s);p<=d&&((p=0&&f<0)&&(d=p,f=s,u=i,c.length=0),Ty(n,function(e){c.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:c,snapToValue:u}),m=g.payloadBatch,v=g.snapToValue;m[0]&&null==r.seriesIndex&&o(r,m[0]),!n&&t.snap&&p.containData(v)&&null!=v&&(e=v),i.showPointer(t,e,m,r),i.showTooltip(t,g,v)}else i.showPointer(t,e)}function As(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function ks(t,e,i,n){var r=i.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=ds(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Ps(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function Ls(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Os(t,e,i){if(!ku.node){var n=e.getZr();Ay(n).records||(Ay(n).records={}),function(t,e){function i(i,n){t.on(i,function(i){var r,o,a,s,l,h,u,c=(r=e,{dispatchAction:function t(e){var i=o[e.type];i?i.push(e):(e.dispatchAction=t,r.dispatchAction(e))},pendings:o={showTip:[],hideTip:[]}});ky(Ay(t).records,function(t){t&&n(t,i,c.dispatchAction)}),a=c.pendings,s=e,h=a.showTip.length,u=a.hideTip.length,h?l=a.showTip[h-1]:u&&(l=a.hideTip[u-1]),l&&(l.dispatchAction=null,s.dispatchAction(l))})}Ay(t).initialized||(Ay(t).initialized=!0,i("click",v(Es,"click")),i("mousemove",v(Es,"mousemove")),i("globalout",zs))}(n,e),(Ay(n).records[t]||(Ay(n).records[t]={})).handler=i}}function zs(t,e,i){t.handler("leave",null,i)}function Es(t,e,i,n){e.handler(t,i,n)}function Ns(t,e){if(!ku.node){var i=e.getZr();(Ay(i).records||{})[t]&&(Ay(i).records[t]=null)}}function Rs(){}function Bs(t,e,i,n){(function t(e,i){if(w(e)&&w(i)){var n=!0;return d(i,function(i,r){n=n&&t(e[r],i)}),!!n}return e===i})(Ly(i).lastProp,n)||(Ly(i).lastProp=n,e?xn(i,n,t):(i.stopAnimation(),i.attr(n)))}function Vs(t,e){t[e.get("label.show")?"show":"hide"]()}function Fs(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Hs(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)})}function Gs(t,e,i,n,r){var o=Ws(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),a=i.getModel("label"),s=Ip(a.get("padding")||0),l=a.getFont(),h=ne(o,l),u=r.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],f=r.align;"right"===f&&(u[0]-=c),"center"===f&&(u[0]-=c/2);var p,g,m,v,y,x,_=r.verticalAlign;"bottom"===_&&(u[1]-=d),"middle"===_&&(u[1]-=d/2),p=u,g=c,m=d,y=(v=n).getWidth(),x=v.getHeight(),p[0]=Math.min(p[0]+g,y)-g,p[1]=Math.min(p[1]+m,x)-m,p[0]=Math.max(p[0],0),p[1]=Math.max(p[1],0);var w=a.get("backgroundColor");w&&"auto"!==w||(w=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:a.get("borderRadius")},position:u.slice(),style:{text:o,textFont:l,textFill:a.getTextColor(),textPosition:"inside",fill:w,stroke:a.get("borderColor")||"transparent",lineWidth:a.get("borderWidth")||0,shadowBlur:a.get("shadowBlur"),shadowColor:a.get("shadowColor"),shadowOffsetX:a.get("shadowOffsetX"),shadowOffsetY:a.get("shadowOffsetY")},z2:10}}function Ws(t,e,i,n,r){var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:xa(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),_(a)?o=a.replace("{value}",o):x(a)&&(o=a(s))}return o}function Zs(t,e,i){var n=nt();return lt(n,n,i.rotation),st(n,n,i.position),bn([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Us(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Xs(t){return"x"===t.dim?0:1}function js(t){var e,i,n,r,o,a,s=[],l=t.get("transitionDuration"),h=t.get("backgroundColor"),u=t.getModel("textStyle"),c=t.get("padding");return l&&s.push((a="left "+(o=l)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+o+"s cubic-bezier(0.23, 1, 0.32, 1)",f(Vy,function(t){return t+"transition:"+a}).join(";"))),h&&(ku.canvasSupported?s.push("background-Color:"+h):(s.push("background-Color:#"+It(h)),s.push("filter:alpha(opacity=70)"))),Ry(["width","color","radius"],function(e){var i="border-"+e,n=By(i),r=t.get(n);null!=r&&s.push(i+":"+r+("color"===e?"":"px"))}),s.push((i=[],n=(e=u).get("fontSize"),(r=e.getTextColor())&&i.push("color:"+r),i.push("font:"+e.getFont()),n&&i.push("line-height:"+Math.round(3*n/2)+"px"),Ry(["decoration","align"],function(t){var n=e.get(t);n&&i.push("text-"+t+":"+n)}),i.join(";"))),null!=c&&s.push("padding:"+Ip(c).join("px ")+"px"),s.join(";")+";"}function Ys(t,e){if(ku.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!r._enterable){var i=n.handler;Re(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function qs(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(Cn.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Cn(i,e,e.ecModel))}return e}function $s(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function Ks(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function Qs(t){return"center"===t||"middle"===t}function Js(t,e,i){var n,r={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name)),d(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}function tl(t,e){var i=Ip(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),new Qf({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}function el(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function il(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function nl(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}function rl(t,e,i){var n=[1,1];n[t.getOrient().index]=0,ir(e,i,{type:"box",ignoreSize:n})}function ol(t){qe(t,"label",["show"])}function al(t,e,i,n,r,o){var a=[],s=na(e,n,i)?e.getCalculationInfo("stackResultDimension"):n,l=cl(e,s,t),h=e.indicesOfNearest(s,l)[0];a[r]=e.get(i,h),a[o]=e.get(n,h);var u=En(e.get(n,h));return(u=Math.min(u,20))>=0&&(a[o]=+a[o].toFixed(u)),a}function sl(t,e){var n,r=t.getData(),o=t.coordinateSystem;if(e&&(n=e,isNaN(parseFloat(n.x))||isNaN(parseFloat(n.y)))&&!y(e.coord)&&o){var a=o.dimensions,s=ll(e,r,o,t);if((e=i(e)).type&&ox[e.type]&&s.baseAxis&&s.valueAxis){var l=nx(a,s.baseAxis.dim),h=nx(a,s.valueAxis.dim);e.coord=ox[e.type](r,s.baseDataDim,s.valueDataDim,l,h),e.value=e.coord[h]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;c<2;c++)ox[u[c]]&&(u[c]=cl(r,r.mapDimension(a[c]),u[c]));e.coord=u}}return e}function ll(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;rn[1]&&(n[1]=e[1])})}),n[1]0?0:NaN);var a=i.getMax(!0);null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}function Pl(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=Rn(r,[0,500]);o=Math.min(o,20);var a=e||0===n[0]&&100===n[1];i.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function Ll(t){var e={};return Tx(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Ol(t,e){var i=t._rangePropMode,n=t.get("rangeMode");Tx([["start","startValue"],["end","endValue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?i[r]="percent":!o&&a?i[r]="value":n?i[r]=n[r]:o&&(i[r]="percent")})}function zl(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function El(t,e){return Math.min(e[1],Math.max(e[0],t))}function Nl(t){return"vertical"===t?"ns-resize":"ew-resize"}function Rl(t,e){return!!Bl(t)[e]}function Bl(t){return t[Fx]||(t[Fx]={})}function Vl(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,n=e(Fl,this),r=e(Hl,this),o=e(Gl,this),s=e(Wl,this),l=e(Zl,this);Qu.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=a(i(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",r),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Fl(t){if(!(Ve(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Hl(t){if(!Ve(t)&&Xl(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!Rl(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,o=e-n,a=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&cd(t.event),this.trigger("pan",o,a,n,r,e,i)}}function Gl(t){Ve(t)||(this._dragging=!1)}function Wl(t){if(Xl(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;Ul.call(this,t,e,t.offsetX,t.offsetY)}}function Zl(t){if(!Rl(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Ul.call(this,t,e,t.pinchX,t.pinchY)}}function Ul(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(cd(t.event),this.trigger("zoom",e,i,n))}function Xl(t,e,i){var n=t._opt[e];return n&&(!_(n)||i.event[n+"Key"])}function jl(t,e){var i=ql(t),n=e.dataZoomId,r=e.coordId;d(i,function(t,i){var o=t.dataZoomInfos;o[n]&&l(e.allCoordIds,r)<0&&(delete o[n],t.count--)}),$l(i);var a,s,h=i[r];h||((h=i[r]={coordId:r,dataZoomInfos:{},count:0}).controller=(a=h,(s=new Vl(t.getZr())).on("pan",Hx(Kl,a)),s.on("zoom",Hx(Ql,a)),s),h.dispatchAction=v(th,t)),!h.dataZoomInfos[n]&&h.count++,h.dataZoomInfos[n]=e;var u,c,f,p,g=(u=h.dataZoomInfos,f={},p={type_true:2,type_move:1,type_false:0,type_undefined:-1},d(u,function(t){var e=!t.disabled&&(!t.zoomLock||"move");p["type_"+e]>p["type_"+c]&&(c=e),o(f,t.roamControllerOpt)}),{controlType:c,opt:f});h.controller.enable(g.controlType,g.opt),h.controller.setPointerChecker(e.containsPoint),Qr(h,"dispatchAction",e.throttleRate,"fixRate")}function Yl(t){return t.type+"\0_"+t.id}function ql(t){var e=t.getZr();return e[Gx]||(e[Gx]={})}function $l(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Kl(t,e,i,n,r,o,a){Jl(t,function(s){return s.panGetRange(t.controller,e,i,n,r,o,a)})}function Ql(t,e,i,n){Jl(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function Jl(t,e){var i=[];d(t.dataZoomInfos,function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function th(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function eh(t,e){Xx[t]=e}function ih(t){return Xx[t]}function nh(t){this.model=t}function rh(t){this.model=t}function oh(t){var e,i,n,r,o,a,s=(e={},i=[],n=[],t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n});return{value:g([(o=s.seriesGroupByCategoryAxis,a=[],d(o,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,r=[" "].concat(f(t.series,function(t){return t.name})),o=[i.model.getCategories()];d(t.series,function(t){o.push(t.getRawData().mapArray(n,function(t){return t}))});for(var s=[r.join(e_)],l=0;l=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),i=[],n=f(ah(e.shift()).split(i_),function(t){return{name:t,data:[]}}),r=0;r1)return("e"===(n=[t(e,(i=i.split(""))[0]),t(e,i[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n=Sn({w:"left",e:"right",n:"top",s:"bottom"}[i],(r=e,wn(r.group)));var r;return{left:"w",right:"e",top:"n",bottom:"s"}[n]}(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?p_[o]+"-resize":null})})}function Th(t,e,i,n,r,o,a){var s,l,h,u=e.childOfName(i);u&&u.setShape((s=Lh(t,e,[[n,r],[n+o,r+a]]),l=a_(s[0][0],s[1][0]),h=a_(s[0][1],s[1][1]),{x:l,y:h,width:s_(s[0][0],s[1][0])-l,height:s_(s[0][1],s[1][1])-h}))}function Ch(t){return a({strokeNoScale:!0},t.brushStyle)}function Dh(t,e,i,n){var r=[a_(t,i),a_(e,n)],o=[s_(t,i),s_(e,n)];return[[r[0],o[0]],[r[1],o[1]]]}function Ah(t,e,i,n,r,o,a,s){var l=n.__brushOption,h=t(l.range),u=Ph(i,o,a);r_(r.split(""),function(t){var e=f_[t];h[e[0]][e[1]]+=u[e[0]]}),l.range=e(Dh(h[0][0],h[1][0],h[0][1],h[1][1])),mh(i,n),wh(i,{isEnd:!1})}function kh(t,e,i,n,r){var o=e.__brushOption.range,a=Ph(t,i,n);r_(o,function(t){t[0]+=a[0],t[1]+=a[1]}),mh(t,e),wh(t,{isEnd:!1})}function Ph(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function Lh(t,e,n){var r=xh(t,e);return r&&!0!==r?r.clipPath(n,t._transform):i(n)}function Oh(t){var e=t.event;e.preventDefault&&e.preventDefault()}function zh(t,e,i){return t.childOfName("main").contain(e,i)}function Eh(t,e,n,r){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],o=i[1]-n[1];return l_(r*r+o*o,.5)>u_}(t)||a){if(s&&!a){"single"===l.brushMode&&_h(t);var h=i(l);h.brushType=Nh(h.brushType,s),h.panelId=!0===s?null:s.panelId,a=t._creatingCover=dh(t,h),t._covers.push(a)}if(a){var u=y_[Nh(t._brushType,s)];a.__brushOption.range=u.getCreatingRange(Lh(t,a,t._track)),r&&(fh(t,a),u.updateCommon(t,a)),ph(t,a),o={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&yh(t,e,n)&&_h(t)&&(o={isEnd:r,removeOnClick:!0});return o}function Nh(t,e){return"auto"===t?e.defaultBrushType:t}function Rh(t){if(this._dragging){Oh(t);var e=Eh(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&wh(this,e)}}function Bh(t){return{createCover:function(e,i){return Sh(n_(Ah,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=bh(e);return[a_(i[0][t],i[1][t]),s_(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,r){var o,a=xh(e,i);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,o];t&&l.reverse(),Mh(e,i,l,r)},updateCommon:Ih,contain:zh}}function Vh(t,e,i){return t=Fh(t),function(n,r,o){return t.contain(r[0],r[1])&&(a=n,s=i,l=e.getComponentByElement(a.topTarget),h=l&&l.coordinateSystem,!(l&&l!==s&&!x_[l.mainType]&&h&&h.model!==s));var a,s,l,h}}function Fh(t){return Gt.create(t)}function Hh(t,e,i){var n=this._targetInfoList=[],r={},o=Wh(e,t);__(T_,function(t,e){(!i||!i.include||w_(i.include,e)>=0)&&t(o,n,r)})}function Gh(t){return t[0]>t[1]&&t.reverse(),t}function Wh(t,e){return ni(t,e,{includeMainTypes:M_})}function Zh(t,e,i,n){var r=i.getAxis(["x","y"][t]),o=Gh(f([0,1],function(t){return e?r.coordToData(r.toLocalCoord(n[t])):r.toGlobalCoord(r.dataToCoord(n[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}function Uh(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Xh(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function jh(t){var e=t[L_];return e||(e=t[L_]=[{}]),e}function Yh(t,e,i){(this._brushController=new hh(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function qh(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function $h(t,e){t.setIconStatus("back",jh(e).length>1?"emphasis":"normal")}function Kh(t){this.model=t}function Qh(t){return V_(t)}function Jh(t){return parseInt(t,10)}function tu(t,e){(function(){if(!G_&&W_){G_=!0;var t=W_.styleSheets;t.length<31?W_.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}})(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var r=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}function eu(t){return document.createElementNS(vw,t)}function iu(t){return ww(1e4*t)/1e4}function nu(t){return t-Cw}function ru(t,e){e&&ou(t,"transform","matrix("+xw.call(e,",")+")")}function ou(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function au(t,e,i){if(r=e,null!=(o=i?r.textFill:r.fill)&&o!==_w){var n=i?e.textFill:e.fill;n="transparent"===n?_w:n,"none"!==t.getAttribute("clip-path")&&n===_w&&(n="rgba(0, 0, 0, 0.002)"),ou(t,"fill",n),ou(t,"fill-opacity",e.opacity)}else ou(t,"fill",_w);var r,o,a,s;if(a=e,null!=(s=i?a.textStroke:a.stroke)&&s!==_w){var l=i?e.textStroke:e.stroke;ou(t,"stroke",l="transparent"===l?_w:l),ou(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?e.host.getLineScale():1)),ou(t,"paint-order",i?"stroke":"fill"),ou(t,"stroke-opacity",e.opacity),e.lineDash?(ou(t,"stroke-dasharray",e.lineDash.join(",")),ou(t,"stroke-dashoffset",ww(e.lineDashOffset||0))):ou(t,"stroke-dasharray",""),e.lineCap&&ou(t,"stroke-linecap",e.lineCap),e.lineJoin&&ou(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&ou(t,"stroke-miterlimit",e.miterLimit)}else ou(t,"stroke",_w)}function su(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function lu(){}function hu(t,e,i,n){for(var r=0,o=e.length,a=0,s=0;r=11)}),Pu={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Lu={"[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},Ou=Object.prototype.toString,zu=Array.prototype,Eu=zu.forEach,Nu=zu.filter,Ru=zu.slice,Bu=zu.map,Vu=zu.reduce,Fu={},Hu=function(){return Fu.createCanvas()};Fu.createCanvas=function(){return document.createElement("canvas")};var Gu,Wu="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=m(t,e)),this)this.hasOwnProperty(i)&&t(this[i],i)},removeKey:function(t){delete this[t]}};var Zu=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:r,extend:o,defaults:a,createCanvas:Hu,getContext:s,indexOf:l,inherits:h,mixin:u,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,r=t.length;n3&&(e=Ku.call(e,1));for(var n=this._$handlers[t],r=n.length,o=0;o4&&(e=Ku.call(e,1,e.length-1));for(var n=e[e.length-1],r=this._$handlers[t],o=r.length,a=0;a=0;o--){var a;if(n[o]!==i&&!n[o].ignore&&(a=it(n[o],t,e))&&(!r.topTarget&&(r.topTarget=n[o]),a!==Ju)){r.target=n[o];break}}return r}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ec.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Yu(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),u(ec,Qu),u(ec,J);var ic="undefined"==typeof Float32Array?Array:Float32Array,nc=(Object.freeze||Object)({create:nt,identity:rt,copy:ot,mul:at,translate:st,rotate:lt,scale:ht,invert:ut,clone:function(t){var e=nt();return ot(e,t),e}}),rc=rt,oc=5e-5,ac=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},sc=ac.prototype;sc.transform=null,sc.needLocalTransform=function(){return ct(this.rotation)||ct(this.position[0])||ct(this.position[1])||ct(this.scale[0]-1)||ct(this.scale[1]-1)},sc.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||nt(),i?this.getLocalTransform(n):rc(n),e&&(i?at(n,t.transform,n):ot(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||nt(),ut(this.invTransform,n)):n&&rc(n)},sc.getLocalTransform=function(t){return ac.getLocalTransform(this,t)},sc.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},sc.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var lc=[];sc.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(at(lc,t.invTransform,e),e=lc);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=this.position,o=this.scale;ct(i-1)&&(i=Math.sqrt(i)),ct(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),r[0]=e[4],r[1]=e[5],o[0]=i,o[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},sc.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},sc.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&$(i,i,n),i},sc.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&$(i,i,n),i},ac.getLocalTransform=function(t,e){rc(e=e||[]);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ht(e,e,n),r&<(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var hc={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,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+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-hc.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*hc.bounceIn(2*t):.5*hc.bounceOut(2*t-1)+.5}};dt.prototype={constructor:dt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?hc[n]:n,o="function"==typeof r?r(i):i;return this.fire("frame",o),1==i?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 uc=function(){this.head=null,this.tail=null,this._len=0},cc=uc.prototype;cc.insert=function(t){var e=new dc(t);return this.insertEntry(e),e},cc.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++},cc.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},cc.len=function(){return this._len},cc.clear=function(){this.head=this.tail=null,this._len=0};var dc=function(t){this.value=t,this.next,this.prev},fc=function(t){this._list=new uc,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},pc=fc.prototype;pc.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new dc(e),a.key=t,i.insertEntry(a),n[t]=a}return r},pc.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},pc.clear=function(){this._list.clear(),this._map={}};var gc={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]},mc=new fc(20),vc=null,yc=Tt,xc=Ct,_c=(Object.freeze||Object)({parse:bt,lift:Mt,toHex:It,fastLerp:Tt,fastMapToColor:yc,lerp:Ct,mapToColor:xc,modifyHSL:function(t,e,i,n){if(t=bt(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(t[1]=mt(i)),null!=n&&(t[2]=mt(n)),At(St(t),"rgba");var r},modifyAlpha:Dt,stringify:At}),wc=Array.prototype.slice,bc=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||kt,this._setter=n||Pt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};bc.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:Vt(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t0&&this.animate(t,!1).when(null==n?500:n,o).delay(r||0),this}};var Cc=function(t){ac.call(this,t),Qu.call(this,t),Tc.call(this,t),this.id=t.id||Au()};Cc.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(w(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new Gt(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}}},Gt.create=function(t){return new Gt(t.x,t.y,t.width,t.height)};var Ec=function(t){for(var e in t=t||{},Cc.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ec.prototype={constructor:Ec,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,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ec&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=l(n,t);return r<0?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ec&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Ec&&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:qt};var Vc={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Fc=function(t,e,i){return Vc.hasOwnProperty(e)?i*=t.dpr:i},Hc=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Gc=function(t,e){this.extendFrom(t,!1),this.host=e};Gc.prototype={constructor:Gc,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,r=i&&i.style,o=!r,a=0;a0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},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,i){for(var n=("radial"===e.type?function(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*n+i.x,s=s*r+i.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}:function(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,r=r*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(n,o,r,a)})(t,e,i),r=e.colorStops,o=0;o=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}s.__drawIndex=m,s.__drawIndex0&&t>r[0]){for(s=0;st);s++);a=n[r[s]]}if(r.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var h=a.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else Ic("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n0?.01:0),this._needsManuallyCompositing),o.__builtin__||Ic("ZLevel "+s+" has been used by unkown layer "+o.id),o!==i&&(o.__used=!0,o.__startIndex!==r&&(o.__dirty=!0),o.__startIndex=r,o.incremental?o.__drawIndex=-1:o.__drawIndex=r,e(r),i=o),a.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var r=0;r=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&r&&r.length>1){var a=Fe(r)/Fe(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},gd=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],md=["touchstart","touchend","touchmove"],vd={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},yd=f(gd,function(t){var e=t.replace("mouse","pointer");return vd[e]?e:t}),xd={mousemove:function(t){t=Re(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Re(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Re(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Ge(this,t,"start"),xd.mousemove.call(this,t),xd.mousedown.call(this,t),We(this)},touchmove:function(t){(t=Re(this.dom,t)).zrByTouch=!0,Ge(this,t,"change"),xd.mousemove.call(this,t),We(this)},touchend:function(t){(t=Re(this.dom,t)).zrByTouch=!0,Ge(this,t,"end"),xd.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&xd.click.call(this,t),We(this)},pointerdown:function(t){xd.mousedown.call(this,t)},pointermove:function(t){Ze(t)||xd.mousemove.call(this,t)},pointerup:function(t){xd.mouseup.call(this,t)},pointerout:function(t){Ze(t)||xd.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){xd[t]=function(e){e=Re(this.dom,e),this.trigger(t,e)}});var _d=Ue.prototype;_d.dispose=function(){for(var t=gd.concat(md),e=0;e=0||n&&l(n,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},Nd=Ed([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Rd={getLineStyle:function(t){var e=Nd(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},Bd=Ed([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Vd={getAreaStyle:function(t,e){return Bd(this,t,e)}},Fd=Math.pow,Hd=Math.sqrt,Gd=1e-8,Wd=1e-4,Zd=Hd(3),Ud=1/3,Xd=B(),jd=B(),Yd=B(),qd=Math.min,$d=Math.max,Kd=Math.sin,Qd=Math.cos,Jd=2*Math.PI,tf=B(),ef=B(),nf=B(),rf=[],of=[],af={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},sf=[],lf=[],hf=[],uf=[],cf=Math.min,df=Math.max,ff=Math.cos,pf=Math.sin,gf=Math.sqrt,mf=Math.abs,vf="undefined"!=typeof Float32Array,yf=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};yf.prototype={constructor:yf,_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=mf(1/Mc/t)||0,this._uy=mf(1/Mc/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(af.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 i=mf(t-this._xi)>this._ux||mf(e-this._yi)>this._uy||this._len<5;return this.addData(af.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(af.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(af.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(af.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=ff(r)*i+t,this._yi=pf(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(af.R,t,e,i,n),this},closePath:function(){this.addData(af.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,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,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&f<=t||u<0&&f>=t||0==u&&(c>0&&p<=e||c<0&&p>=e);)f+=u*(i=a[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,u>0&&fl||c>0&&ph||s[n%2?"moveTo":"lineTo"](u>=0?cf(f,t):df(f,t),c>=0?cf(p,e):df(p,e));u=f-t,c=p-e,this._dashOffset=-gf(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,r,o){var a,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=pi,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,a=0;a<1;a+=.1)s=v(g,t,i,r,a+.1)-v(g,t,i,r,a),l=v(m,e,n,o,a+.1)-v(m,e,n,o,a),y+=gf(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(a=(w-d)/y;a<=1;)h=v(g,t,i,r,a),u=v(m,e,n,o,a),x%2?p.moveTo(h,u):p.lineTo(h,u),a+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,o),s=r-h,l=o-u,this._dashOffset=-gf(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,vf&&(this.data=new Float32Array(t)))},getBoundingRect:function(){sf[0]=sf[1]=hf[0]=hf[1]=Number.MAX_VALUE,lf[0]=lf[1]=uf[0]=uf[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,o=0;ol||mf(a-r)>h||c===u-1)&&(t.lineTo(o,a),n=o,r=a);break;case af.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case af.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case af.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1==c&&(e=ff(v)*g+f,i=pf(v)*m+p),n=ff(M)*g+f,r=pf(M)*m+p;break;case af.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case af.Z:t.closePath(),n=e,r=i}}}},yf.CMD=af;var xf=2*Math.PI,_f=2*Math.PI,wf=yf.CMD,bf=2*Math.PI,Sf=1e-4,Mf=[-1,-1,-1],If=[-1,-1],Tf=Xc.prototype.getCanvasPattern,Cf=Math.abs,Df=new yf(!0);Ni.prototype={constructor:Ni,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,r=this.path||Df,o=n.hasStroke(),a=n.hasFill(),s=n.fill,l=n.stroke,h=a&&!!s.colorStops,u=o&&!!l.colorStops,c=a&&!!s.image,d=o&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Tf.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Tf.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();r.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&r.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o&&r.stroke(t),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new yf},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new yf),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Ei(o,a/s,!0,t,e)))return!0}if(r.hasFill())return Ei(o,0,!1,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Cf(t[0]-1)>1e-10&&Cf(t[3]-1)>1e-10?Math.sqrt(Cf(t[0]*t[3]-t[2]*t[1])):1}},Ni.extend=function(t){var e=function(e){Ni.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};for(var i in h(e,Ni),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(Ni,Le);var Af=yf.CMD,kf=[[],[],[]],Pf=Math.sqrt,Lf=Math.atan2,Of=function(t,e){var i,n,r,o,a,s,l=t.data,h=Af.M,u=Af.C,c=Af.L,d=Af.R,f=Af.A,p=Af.Q;for(r=0,o=0;r=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;ri-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Vi(s[0],f[0],l[0],h[0],d,p,g),Vi(s[1],f[1],l[1],h[1],d,p,g)])}return n},qf=function(t,e,i,n){var r,o,a,s,l=[],h=[],u=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&o>=r)return{x:i,y:r,width:n-i,height:o-r}},createIcon:Tn,Group:Ec,Image:Oe,Text:Gf,Circle:Wf,Sector:Xf,Ring:jf,Polygon:$f,Polyline:Kf,Rect:Qf,Line:Jf,BezierCurve:ep,Arc:ip,IncrementalDisplayable:Gi,CompoundPath:np,LinearGradient:op,RadialGradient:ap,BoundingRect:Gt}),fp=["textStyle","color"],pp={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(fp):null)},getFont:function(){return vn({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ne(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},gp=Ed([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),mp={getItemStyle:function(t,e){var i=gp(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},vp=u,yp=ii();Cn.prototype={constructor:Cn,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:Dn(this.option,this.parsePath(t),!e&&An(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&An(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i;return new Cn(null==t?this.option:Dn(this.option,t=this.parsePath(t)),e=e||(i=An(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){yp(this).getParent=t},isAnimationEnabled:function(){if(!ku.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},si(Cn),li(Cn),vp(Cn,Rd),vp(Cn,Vd),vp(Cn,pp),vp(Cn,mp);var xp,_p,wp=0,bp=1e-4,Sp=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Mp=(Object.freeze||Object)({linearMap:Pn,parsePercent:Ln,round:On,asc:zn,getPrecision:En,getPrecisionSafe:Nn,getPixelPrecision:Rn,getPercentWithPrecision:Bn,MAX_SAFE_INTEGER:9007199254740991,remRadian:Vn,isRadianAroundZero:Fn,parseDate:Hn,quantity:Gn,nice:Zn,reformIntervals:function(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]=0}}),Ip=k,Tp=["a","b","c","d","e","f","g"],Cp=function(t,e){return"{"+t+(null==e?"":e)+"}"},Dp=se,Ap=ne,kp=(Object.freeze||Object)({addCommas:Un,toCamelCase:Xn,normalizeCssArray:Ip,encodeHTML:jn,formatTpl:Yn,formatTplSimple:function(t,e,i){return d(e,function(e,n){t=t.replace("{"+n+"}",i?jn(e):e)}),t},getTooltipMarker:qn,formatTime:Kn,capitalFirst:Qn,truncateText:Dp,getTextRect:Ap}),Pp=d,Lp=["left","right","top","bottom","width","height"],Op=[["width","left","right"],["height","top","bottom"]],zp=Jn,Ep=(v(Jn,"vertical"),v(Jn,"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")}}}),Np=ii(),Rp=Cn.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Cn.call(this,t,e,i,n),this.uid=kn("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,r=i?nr(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&ir(t,r,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&ir(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Np(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var r=i.prototype.defaultOption;r&&e.push(r),i=i.superClass}for(var o={},a=e.length-1;a>=0;a--)o=n(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});ci(Rp,{registerWhenExtend:!0}),_p={},(xp=Rp).registerSubTypeDefaulter=function(t,e){t=ai(t),_p[t.main]=e},xp.determineSubType=function(t,e){var i=e.type;if(!i){var n=ai(t).main;xp.hasSubTypes(t)&&_p[n]&&(i=_p[n](e))}return i},function(t,e){function i(t){var i={},r=[];return d(t,function(o){var a,s,h,u=n(i,o),c=(a=u.originalDeps=e(o),s=t,h=[],d(a,function(t){l(s,t)>=0&&h.push(t)}),h);u.entryCount=c.length,0===u.entryCount&&r.push(o),d(c,function(t){l(u.predecessor,t)<0&&u.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(o)})}),{graph:i,noEntryList:r}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Rp.topologicalTravel=function(t,e,n,r){function o(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var a=i(e),s=a.graph,l=a.noEntryList,h={};for(d(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],f=!!h[u];f&&(n.call(r,u,c.originalDeps.slice()),delete h[u]),d(c.successor,f?function(t){h[t]=!0,o(t)}:o)}d(h,function(){throw new Error("Circle dependency may exists")})}}}(0,function(t){var e=[];return d(Rp.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return ai(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),u(Rp,Ep);var Bp="";"undefined"!=typeof navigator&&(Bp=navigator.platform||"");var Vp={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Bp.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},Fp=ii(),Hp={clearColorPalette:function(){Fp(this).colorIdx=0,Fp(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Fp(e=e||this),r=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=Ye(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;ne)return t[n];return t[i-1]}(s,i):a;if((l=l||a)&&l.length){var h=l[r];return t&&(o[t]=h),n.colorIdx=(r+1)%l.length,h}}},Gp={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",o),ar(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),ar(o)&&(n.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),ar(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",a),ar(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),ar(a)&&(n.set("angle",a),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();d(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];i.set(l,s),ar(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}},Wp="original",Zp="arrayRows",Up="objectRows",Xp="keyedColumns",jp="unknown",Yp="typedArray",qp="column",$p="row";sr.seriesDataToSource=function(t){return new sr({data:t,sourceFormat:S(t)?Yp:Wp,fromDataset:!1})},li(sr);var Kp=ii(),Qp="\0_ec_inner",Jp=Cn.extend({constructor:Jp,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Cn(i),this._optionManager=n},setOption:function(t,e){P(!(Qp in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):dr.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&d(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];Kp(this).datasetMap=N(),d(t,function(t,r){null!=t&&(Rp.hasClass(r)?r&&a.push(r):e[r]=null==e[r]?i(t):n(e[r],t,!0))}),Rp.topologicalTravel(a,Rp.getAllClassMainTypes(),function(i,n){var a=Ye(t[i]),s=Ke(r.get(i),a);Qe(s),d(s,function(t,e){var n,r,o,a=t.option;w(a)&&(t.keyInfo.mainType=i,t.keyInfo.subType=(n=i,r=a,o=t.exist,r.type?r.type:o?o.subType:Rp.determineSubType(n,r)))});var l=function(t,e){y(e)||(e=e?[e]:[]);var i={};return d(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}(r,n);e[i]=[],r.set(i,[]),d(s,function(t,n){var a=t.exist,s=t.option;if(P(w(s)||a,"Empty component definition"),s){var h=Rp.getClass(i,t.keyInfo.subType,!0);if(a&&a instanceof h)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var u=o({dependentModels:l,componentIndex:n},t.keyInfo);o(a=new h(s,this,this,u),u),a.init(s,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);r.get(i)[n]=a,e[i][n]=a.option},this),"series"===i&&fr(this,r.get("series"))},this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(Rp.hasClass(i)){for(var n=(e=Ye(e)).length-1;n>=0;n--)ti(e[n])&&e.splice(n,1);t[i]=e}}),delete t[Qp],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,r=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];if(null!=n)y(n)||(n=[n]),i=g(f(n,function(t){return a[t]}),function(t){return!!t});else if(null!=r){var s=y(r);i=g(a,function(t){return s&&l(r,t.id)>=0||!s&&t.id===r})}else if(null!=o){var h=y(o);i=g(a,function(t){return h&&l(o,t.name)>=0||!h&&t.name===o})}else i=a.slice();return pr(i,t)},findComponents:function(t){var e,i,n,r,o,a=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",r=s+"Name",!(e=a)||null==e[i]&&null==e[n]&&null==e[r]?null:{mainType:s,index:e[i],id:e[n],name:e[r]});return o=pr(l?this.queryComponents(l):this._componentsMap.get(s),t),t.filter?g(o,t.filter):o},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,r){e.call(i,n,t,r)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){fr(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;fr(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),Rp.topologicalTravel(i,Rp.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}(e,t))&&e.restoreData()})})}});u(Jp,Hp);var tg=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],eg={};mr.prototype={constructor:mr,create:function(t,e){var i=[];d(eg,function(n,r){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},mr.register=function(t,e){eg[t]=e},mr.get=function(t){return eg[t]};var ig=d,ng=i,rg=f,og=n,ag=/^(min|max)?(.+)$/;vr.prototype={constructor:vr,setOption:function(t,e){t&&d(Ye(t.series),function(t){t&&t.data&&S(t.data)&&O(t.data)}),t=ng(t,!0);var i,n,r=this._optionBackup,o=function(t,e,i){var n,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;ig(l,function(t){t&&t.option&&(t.query?a.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),ig([r].concat(o).concat(f(a,function(t){return t.option})),function(t){ig(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:o,mediaDefault:n,mediaList:a}}.call(this,t,e,!r);this._newBaseOption=o.baseOption,r?(i=r.baseOption,n=o.baseOption,ig(n=n||{},function(t,e){if(null!=t){var n=i[e];if(Rp.hasClass(e)){t=Ye(t);var r=Ke(n=Ye(n),t);i[e]=rg(r,function(t){return t.option&&t.exist?og(t.exist,t.option,!0):t.exist||t.option})}else i[e]=og(n,t,!0)}}),o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=rg(e.timelineOptions,ng),this._mediaList=rg(e.mediaList,ng),this._mediaDefault=ng(e.mediaDefault),this._currentMediaIndices=[],ng(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=ng(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),r=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var h=0,u=o.length;h1||s&&!o?function(i){function o(t,i){var r=n.getDimensionInfo(i);if(r&&!1!==r.otherDims.tooltip){var o=r.type,h=qn({color:l,type:"subItem"}),u=(a?h+jn(r.displayName||"-")+": ":"")+jn("ordinal"===o?t+"":"time"===o?e?"":Kn("yyyy/MM/dd hh:mm:ss",t):Un(t));u&&s.push(u)}}var a=p(i,function(t,e,i){var r=n.getDimensionInfo(i);return t|(r&&!1!==r.tooltip&&null!=r.displayName)},0),s=[];return r.length?d(r,function(e){o(Er(n,t,e),e)}):d(i,o),(a?"
":"")+s.join(a?"
":", ")}(a):jn(Un(o?Er(n,t,r[0]):s?a[0]:a)),u=qn(l),c=n.getName(t),f=this.name;return Je(this)||(f=""),f=f?jn(f)+(e?": ":"
"):"",e?u+f+h:f+u+(c?jn(c)+": "+h:h)},isAnimationEnabled:function(){if(ku.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,i){var n=this.ecModel,r=Hp.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),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(bg,xg),u(bg,Hp);var Sg=function(){this.group=new Ec,this.uid=kn("viewComponent")};Sg.prototype={constructor:Sg,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var Mg=Sg.prototype;Mg.updateView=Mg.updateLayout=Mg.updateVisual=function(t,e,i,n){},si(Sg),ci(Sg,{registerWhenExtend:!0});var Ig=function(){var t=ii();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,o=i.canProgressiveRender,a=i.large=n.large,s=i.canProgressiveRender=n.canProgressiveRender;return!!(r^a||o^s)&&"reset"}},Tg=ii(),Cg=Ig();Xr.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Yr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Yr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var Dg=Xr.prototype;Dg.updateView=Dg.updateLayout=Dg.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},si(Xr),ci(Xr,{registerWhenExtend:!0}),Xr.markUpdateMethod=function(t,e){Tg(t).updateMethod=e};var Ag={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)}}},kg="\0__throttleOriginMethod",Pg="\0__throttleRate",Lg="\0__throttleType",Og={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",r),!e.isSeriesFiltered(t))return"function"!=typeof r||r instanceof rp||i.each(function(e){i.setItemVisual(e,"color",r(t.getDataParams(e)))}),{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}},zg={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:""}}}},Eg=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=o.get(t);if(null==e){for(var i=t.split("."),n=zg.aria,r=0;r1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:a}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";r=i(r=n(o?s+"withName":s+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(m=t.subType,zg.series.typeNames[m]||"自定义图")});var h=t.getData();window.data=h,h.count()>l?r+=i(n("data.partialData"),{displayCnt:l}):r+=n("data.allData");for(var c=[],d=0;di.bockIndex?i.step:null}}},Rg.getPipeline=function(t){return this._pipelineMap.get(t)},Rg.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largeThreshold");t.pipelineContext=i.context={canProgressiveRender:r,large:o}},Rg.restorePipelines=function(t){var e=this,i=e._pipelineMap=N();t.eachSeries(function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),bockIndex:-1,step:n||700,count:0}),uo(e,t,t.dataTask)})},Rg.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d([this._dataProcessorHandlers,this._visualHandlers],function(n){d(n,function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){function o(i){var o=i.uid,s=a.get(o)||a.set(o,Rr({plan:ao,reset:so,count:ho}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},uo(t,i,s)}var a=i.seriesTaskMap||(i.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(o):s?n.eachRawSeriesByType(s,o):l&&l(n,r).each(o);var h=t._pipelineMap;a.each(function(t,e){h.get(e)||(t.dispose(),a.removeKey(e))})}(this,n,r,e,i),n.overallReset&&function(t,e,i,n,r){function o(e){var i=e.uid,n=s.get(i)||s.set(i,Rr({reset:no,onDirty:oo}));n.context={model:e,overallProgress:u,isOverallFilter:c},n.agent=a,n.__block=u,uo(t,e,n)}var a=i.overallTask=i.overallTask||Rr({reset:io});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var s=a.agentStubMap=a.agentStubMap||N(),l=e.seriesType,h=e.getTargetSeries,u=!0,c=e.isOverallFilter;l?n.eachRawSeriesByType(l,o):h?h(n,r).each(o):(u=!1,d(n.getSeries(),o));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),s.removeKey(e))})}(this,n,r,e,i)},this)},this)},Rg.prepareView=function(t,e,i,n){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=i,o.api=n,r.__block=!t.incrementalPrepareRender,uo(this,e,r)},Rg.performDataProcessorTasks=function(t,e){eo(this,this._dataProcessorHandlers,t,e,{block:!0})},Rg.performVisualTasks=function(t,e,i){eo(this,this._visualHandlers,t,e,i)},Rg.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Rg.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.bockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Bg=Rg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};to.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:function(t){Vg=null;try{t(Fg,Hg)}catch(t){}return Vg}(t)}),t.uid=kn("stageHandler"),e&&(t.visualType=e),t};var Vg,Fg={},Hg={};co(Fg,Jp),co(Hg,gr),Fg.eachSeriesByType=Fg.eachRawSeriesByType=function(t){Vg=t},Fg.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Vg=t.subType)};var Gg=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Wg={color:Gg,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Gg]},Zg=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Ug={color:Zg,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:Zg[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:Zg},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Ug.categoryAxis.splitLine.show=!1;var Xg=P,jg=d,Yg=x,qg=w,$g=Rp.parseClassType,Kg=1e3,Qg=1e3,Jg=3e3,tm={PROCESSOR:{FILTER:Kg,STATISTIC:5e3},VISUAL:{LAYOUT:Qg,GLOBAL:2e3,CHART:Jg,COMPONENT:4e3,BRUSH:5e3}},em="__flagInMainProcess",im="__optionUpdated",nm=/^[a-zA-Z0-9_]+$/;po.prototype.on=fo("on"),po.prototype.off=fo("off"),po.prototype.one=fo("one"),u(po,Qu);var rm=go.prototype;rm._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[im]){var e=this[im].silent;this[em]=!0,vo(this),om.update.call(this),this[em]=!1,this[im]=!1,wo.call(this,e),bo.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api,t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),xo(this,n),t.performVisualTasks(n),To(this,this._model,0,"remain"),i-=+new Date-r}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},rm.getDom=function(){return this._dom},rm.getZr=function(){return this._zr},rm.setOption=function(t,e,i){var n;if(qg(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[em]=!0,!this._model||e){var r=new vr(this._api),o=this._theme,a=this._model=new Jp(null,null,o,r);a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,um),i?(this[im]={silent:n},this[em]=!1):(vo(this),om.update.call(this),this._zr.flush(),this[im]=!1,this[em]=!1,wo.call(this,n),bo.call(this,n))},rm.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},rm.getModel=function(){return this._model},rm.getOption=function(){return this._model&&this._model.getOption()},rm.getWidth=function(){return this._zr.getWidth()},rm.getHeight=function(){return this._zr.getHeight()},rm.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},rm.getRenderedCanvas=function(t){if(ku.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},rm.getSvgDataUrl=function(){if(ku.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},rm.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],r=this;jg(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return jg(n,function(t){t.group.ignore=!1}),o},rm.getConnectedDataURL=function(t){if(ku.canvasSupported){var e=this.group,n=Math.min,r=Math.max;if(mm[e]){var o=1/0,a=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelRatio||1;d(gm,function(u,c){if(u.group===e){var d=u.getRenderedCanvas(i(t)),f=u.getDom().getBoundingClientRect();o=n(f.left,o),a=n(f.top,a),s=r(f.right,s),l=r(f.bottom,l),h.push({dom:d,left:f.left,top:f.top})}});var c=(s*=u)-(o*=u),f=(l*=u)-(a*=u),p=Hu();p.width=c,p.height=f;var g=Xe(p);return jg(h,function(t){var e=new Oe({style:{x:t.left*u-o,y:t.top*u-a,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},rm.convertToPixel=v(mo,"convertToPixel"),rm.convertFromPixel=v(mo,"convertFromPixel"),rm.containPixel=function(t,e){var i;return d(t=ni(this._model,t),function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i},rm.getVisual=function(t,e){var i=(t=ni(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},rm.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},rm.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var om={prepareAndUpdate:function(t){vo(this),om.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){e.restoreData(t),o.performSeriesTasks(e),r.create(e,i),o.performDataProcessorTasks(e,t),xo(this,e),r.update(e,i),Mo(e),o.performVisualTasks(e,t),Io(this,e,i,t);var a=e.get("backgroundColor")||"transparent";if(ku.canvasSupported)n.setBackgroundColor(a);else{var s=bt(a);a=At(s,"rgb"),0===s[3]&&(a="transparent")}Co(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent(function(o,a){var s=i.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,n,t);l&&l.update&&r.push(s)}else r.push(s)});var o=N();e.eachSeries(function(r){var a=i._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,n,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),Mo(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),To(i,e,0,t,o),Co(e,this._api)}},updateView:function(t){var e=this._model;e&&(Xr.markUpdateMethod(t,"updateView"),Mo(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Io(this,this._model,this._api,t),Co(e,this._api))},updateVisual:function(t){om.update.call(this,t)},updateLayout:function(t){om.update.call(this,t)}};rm.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[em]=!0,i&&vo(this),om.update.call(this),this[em]=!1,wo.call(this,n),bo.call(this,n)}},rm.showLoading=function(t,e){if(qg(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pm[t]){var i=pm[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},rm.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},rm.makeActionFromEvent=function(t){var e=o({},t);return e.type=lm[t.type],e},rm.dispatchAction=function(t,e){qg(e)||(e={silent:!!e}),sm[t.type]&&this._model&&(this[em]?this._pendingActions.push(t):(_o.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&ku.browser.weChat&&this._throttledZrFlush(),wo.call(this,e.silent),bo.call(this,e.silent)))},rm.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},rm.on=fo("on"),rm.off=fo("off"),rm.one=fo("one");var am=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];rm._initEvents=function(){jg(am,function(t){this._zr.on(t,function(e){var i,n=this.getModel(),r=e.target;if("globalout"===t)i={};else if(r&&null!=r.dataIndex){var a=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(i=o({},r.eventData));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),jg(lm,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},rm.isDisposed=function(){return this._disposed},rm.clear=function(){this.setOption({series:[]},!0)},rm.dispose=function(){if(!this._disposed){this._disposed=!0,oi(this.getDom(),xm,"");var t=this._api,e=this._model;jg(this._componentsViews,function(i){i.dispose(e,t)}),jg(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete gm[this.id]}},u(go,Qu);var sm={},lm={},hm=[],um=[],cm=[],dm=[],fm={},pm={},gm={},mm={},vm=new Date-0,ym=new Date-0,xm="_echarts_instance_",_m={},wm=Ao;No(2e3,Og),Lo(fg),Oo(5e3,function(t){var e=N();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),o={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(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(Cr)}),Bo("default",function(t,e){a(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Qf({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new ip({shape:{startAngle:-Ng/2,endAngle:-Ng/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new Qf({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*Ng/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Ng/2}).delay(300).start("circularInOut");var o=new Ec;return o.add(n),o.add(r),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var a=n.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o}),zo({type:"highlight",event:"highlight",update:"highlight"},R),zo({type:"downplay",event:"downplay",update:"downplay"},R),Po("light",Wg),Po("dark",Ug);Zo.prototype={constructor:Zo,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,i={},n=[],r=[];for(Uo(t,{},n,"_oldKeyGetter",this),Uo(e,i,r,"_newKeyGetter",this),o=0;o=e)){for(var i,n=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=this._dimensionInfos,l=this._nameList,h=this._idList,u=this._rawExtent,c=this._nameRepeatCount={},f=this._chunkCount,p=f-1,g=0;gu[T][1]&&(u[T][1]=D)}if(!r.pure){var A=l[w];b&&!A&&(null!=i?A=this._getNameFromStore(w):null!=b.name&&(l[w]=A=b.name));var k=null==b?null:b.id;null==k&&null!=A&&(c[A]=c[A]||0,k=A,c[A]>0&&(k+="__ec__"+c[A]),c[A]++),null!=k&&(h[w]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},d(L=(P=this)._invertedIndicesMap,function(t,e){var i=P._dimensionInfos[e].ordinalMeta;if(i){for(t=L[e]=new Cm(i.categories.length),n=0;n=0&&e=0&&eo&&(o=s)}return i=[r,o],this._extent[t]=i,i},Pm.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Pm.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Pm.getCalculationInfo=function(t){return this._calculationInfo[t]},Pm.setCalculationInfo=function(t,e){Sm(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},Pm.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&it))return o;r=o-1}}return-1},Pm.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=Number.MAX_VALUE,o=-1,a=0,s=this.count();a=0&&o<0)&&(r=h,o=l,n.length=0),n.push(a))}return n},Pm.getRawIndex=Yo,Pm.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i=l&&w<=h&&(o[a++]=c),c++;u=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f=l&&w<=h&&b>=y&&b<=x&&(o[a++]=c),c++}}u=!0}}if(!u)if(1===n)for(m=0;m=l&&w<=h&&(o[a++]=M);else for(m=0;mt[I][1])&&(S=!1)}S&&(o[a++]=this.getRawIndex(m))}return ab[1]&&(b[1]=w)}}}return r},Pm.downSample=function(t,e,i,n){for(var r=Qo(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(Xo(this))(h),f=0,p=0;ph-p&&(s=h-p,a.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=qo,r},Pm.getItemModel=function(t){var e=this.hostModel;return new Cn(this.getRawDataItem(t),e,e&&e.ecModel)},Pm.diff=function(t){var e=this;return new Zo(t?t.getIndices():[],this.getIndices(),function(e){return $o(t,e)},function(t){return $o(e,t)})},Pm.getVisual=function(t){var e=this._visual;return e&&e[t]},Pm.setVisual=function(t,e){if(Sm(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Pm.setLayout=function(t,e){if(Sm(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Pm.getLayout=function(t){return this._layout[t]},Pm.getItemLayout=function(t){return this._itemLayouts[t]},Pm.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?o(this._itemLayouts[t]||{},e):e},Pm.clearItemLayouts=function(){this._itemLayouts.length=0},Pm.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},Pm.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,Sm(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],r[o]=!0);else n[e]=i,r[e]=!0},Pm.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Lm=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Pm.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Lm,e)),this._graphicEls[t]=e},Pm.getItemGraphicEl=function(t){return this._graphicEls[t]},Pm.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},Pm.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new km(e,this.hostModel)}if(t._storage=this._storage,jo(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?qo:Yo,t._extent=i(this._extent),t._approximateExtent=i(this._approximateExtent),t},Pm.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(A(arguments)))})},Pm.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Pm.CHANGABLE_METHODS=["filterSelf","selectRange"];var Om=function(t,e){return ta((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};oa.prototype.parse=function(t){return t},oa.prototype.getSetting=function(t){return this._setting[t]},oa.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},oa.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},oa.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},oa.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},oa.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},oa.prototype.getExtent=function(){return this._extent.slice()},oa.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},oa.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;ie[1]&&(e[1]=t[1]),Vm.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=ha(t)},getTicks:function(){return function(t,e,i,n){var r=[];if(!t)return r;e[0]1e4)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;in&&(a=r.interval=n);var s=r.intervalPrecision=ha(a);return ca(r.niceTickExtent=[Rm(Math.ceil(t[0]/a)*a,s),Rm(Math.floor(t[1]/a)*a,s)],t),r}(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Bm(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Bm(Math.ceil(e[1]/r)*r))}});Vm.create=function(){return new Vm};var Fm="__ec_stack_",Hm=Vm.prototype,Gm=Math.ceil,Wm=Math.floor,Zm=Vm.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Kn(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=On(Wm(e[0]/n)*n)),t.fixMax||(e[1]=On(Gm(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],o=r/t;null!=e&&oi&&(o=i);var a=Um.length,s=function(t,e,i,n){for(;i>>1;t[r][1]0;)n*=10;var r=[On(Km(e[0]/n)*n),On($m(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){jm.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){tv.prototype[t]=function(e){return e=Jm(e)/Jm(this.base),Xm[t].call(this,e)}}),tv.create=function(){return new tv};var ev={getFormattedLabels:function(){return function(t,e){var i,n=t.scale,r=n.getTicksLabels(),o=n.getTicks();return"string"==typeof e?(i=e,f(r,e=function(t){return i.replace("{value}",null!=t?t:"")})):"function"==typeof e?f(o,function(i,n){return e(xa(t,i),n)},this):r}(this.axis,this.get("axisLabel.formatter"))},getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:R,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},iv=Wi({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),nv=Wi({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),rv=Wi({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),f=.6*a,p=.7*a;t.moveTo(i-u,l+s),t.arc(i,l,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),ov=Wi({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),av={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},sv={};d({line:Jf,rect:Qf,roundRect:Qf,square:Qf,circle:Wf,diamond:nv,pin:rv,arrow:ov,triangle:iv},function(t,e){sv[e]=new t});var lv=Wi({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,i){var n=e.symbolType,r=sv[n];"none"!==e.symbolType&&(r||(r=sv[n="rect"]),av[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i))}}),hv={isDimensionStacked:na,enableDataStack:ia},uv=(Object.freeze||Object)({createList:function(t){return ra(t.getSource(),t)},getLayoutRect:tr,dataStack:hv,createScale:function(t,e){var i=e;Cn.isInstance(e)||u(i=new Cn(e),ev);var n=ya(i);return n.setExtent(t[0],t[1]),va(n,i),n},mixinAxisModelCommonMethods:function(t){u(t,ev)},completeDimensions:ta,createDimensions:Om,createSymbol:wa}),cv=1e-8;Ma.prototype={constructor:Ma,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],o=[],a=this.geometries,s=0;s0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new Ma(e.name,r,e.cp);return o.properties=e,o})},fv=Pn,pv=[0,1],gv=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};gv.prototype={constructor:gv,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Rn(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&Ta(i=i.slice(),n.count()),fv(t,pv,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Ta(i=i.slice(),n.count());var r=fv(t,i,pv,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(a+1)*h-1}(f(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,i.get("rotate"))),this._labelInterval=t}return t}};var mv=dv,vv={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){vv[t]=Zu[t]}),Vo({type:"dataset",defaultOption:{seriesLayoutBy:qp,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=jp;if(S(e))i=Yp;else if(y(e))for(var n=0,r=e.length;n0&&Ra(i[r-1]);r--);for(;n0&&Ra(i[o-1]);o--);for(;r=0;o--){var a=i[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){r=i[o];break}}if(r){var h=e.getAxis(n),u=f(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,m=u[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(u,function(t){t.offset=(t.coord-g)/v}),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 op(0,0,0,0,u,!0);return y[n]=g,y[n+"2"]=m,y}}}(o,n)||o.getVisual("color");g.useStyle(a(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"}));var D=t.get("smooth");if(D=Za(t.get("smooth")),g.setShape({smooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),m){var A=o.getCalculationInfo("stackedOnSeries"),k=0;m.useStyle(a(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel"})),A&&(k=Za(A.get("smooth"))),m.setShape({smooth:D,stackedOnSmooth:k,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=w,this._points=h,this._step=I,this._valueOrigin=_},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),o=ei(r,n);if(!(o instanceof Array)&&null!=o&&o>=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;(a=new Aa(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else Xr.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=ei(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Xr.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Pv({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Lv({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return m(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,h=function(t,e,i,n,r,o,a,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],m=Ea(r,e,a),v=Ea(o,t,s),y=0;ye&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(Bv,gv);var Vv={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)"]}}},Fv={};Fv.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Vv),Fv.valueAxis=n({boundaryGap:[0,0],splitNumber:5},Vv),Fv.timeAxis=a({scale:!0,min:"dataMin",max:"dataMax"},Fv.valueAxis),Fv.logAxis=a({scale:!0,logBase:10},Fv.valueAxis);var Hv=["value","category","time","log"],Gv=function(t,e,i,o){d(Hv,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,r){var o=this.layoutMode,s=o?nr(e):{};n(e,r.getTheme().get(a+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),o&&ir(e,s,o)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=aa.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r([{},Fv[a+"Axis"],o],!0)})}),Rp.registerSubTypeDefaulter(t+"Axis",v(i,t))},Wv=Rp.extend({type:"cartesian2dAxis",axis:null,init:function(){Wv.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Wv.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Wv.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(Wv.prototype,ev);var Zv={offset:0};Gv("x",Wv,$a,Zv),Gv("y",Wv,$a,Zv),Rp.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 Uv=d,Xv=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},jv=va,Yv=Qa.prototype;Yv.type="grid",Yv.axisPointerEnabled=!0,Yv.getRect=function(){return this._rect},Yv.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Uv(i.x,function(t){jv(t.scale,t.model)}),Uv(i.y,function(t){jv(t.scale,t.model)}),Uv(i.x,function(t){Ja(i,"y",t)}),Uv(i.y,function(t){Ja(i,"x",t)}),this.resize(this.model,e)},Yv.resize=function(t,e,i){function n(){Uv(o,function(t){var e,i,n,o,a=t.isHorizontal(),s=a?[0,r.width]:[0,r.height],l=t.inverse?1:0;t.setExtent(s[l],s[1-l]),e=t,i=a?r.x:r.y,n=e.getExtent(),o=n[0]+n[1],e.toGlobalCoord="x"===e.dim?function(t){return t+i}:function(t){return o-t+i},e.toLocalCoord="x"===e.dim?function(t){return t-i}:function(t){return o-t+i}})}var r=tr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;n(),!i&&t.get("containLabel")&&(Uv(o,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,r,o,a,s,l,h,u=t.model,c=u.get("axisLabel.show")?u.getFormattedLabels():[],d=u.getModel("axisLabel"),f=1,p=c.length;p>40&&(f=Math.ceil(p/40));for(var g=0;gv[1]?-1:1,x=["start"===f?v[0]-y*m:"end"===f?v[1]+y*m:(v[0]+v[1])/2,ss(f)?l.labelOffset+p*m:0],_=h.get("nameRotate");null!=_&&(_=_*$v/180),ss(f)?c=Jv(l.rotation,null!=_?_:l.rotation,p):(t=f,e=v,r=Vn((_||0)-l.rotation),a=e[0]>e[1],s="start"===t&&!a||"start"!==t&&a,Fn(r-$v/2)?(n=s?"bottom":"top",i="center"):Fn(r-1.5*$v)?(n=s?"top":"bottom",i="center"):(n="middle",i=r<1.5*$v&&r>$v/2?s?"left":"right":s?"right":"left"),c={rotation:r,textAlign:i,textVerticalAlign:n},null!=(d=l.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var w=g.getFont(),b=h.get("nameTruncate",!0)||{},S=b.ellipsis,M=T(l.nameTruncateMaxWidth,b.maxWidth,d),I=null!=S&&null!=M?Dp(u,M,w,S,{minChar:2,placeholder:b.placeholder}):u,C=h.get("tooltip",!0),D=h.mainType,A={componentType:D,name:u,$vars:["name"]};A[D+"Index"]=h.componentIndex;var k=new Gf({anid:"name",__fullText:u,__truncatedText:I,position:x,rotation:c.rotation,silent:rs(h),z2:1,tooltip:C&&C.show?o({content:u,formatter:function(){return u},formatterParams:A},C):null});dn(k.style,g,{text:I,textFont:w,textFill:g.getTextColor()||h.get("axisLine.lineStyle.color"),textAlign:c.textAlign,textVerticalAlign:c.textVerticalAlign}),h.get("triggerEvent")&&(k.eventData=ns(h),k.eventData.targetType="axisName",k.eventData.name=u),this._dumbGroup.add(k),k.updateTransform(),this.group.add(k),k.decomposeTransform()}}},Jv=Kv.innerTextLayout=function(t,e,i){var n,r,o=Vn(e-t);return Fn(o)?(r=i>0?"top":"bottom",n="center"):Fn(o-$v)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&o<$v?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:r}},ty=Kv.ifIgnoreOnTick=function(t,e,i,n,r,o){if(0===e&&r||e===n-1&&o)return!1;var a,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?!i(a=s.getTicks()[e],s.getLabel(a)):e%(i+1))},ey=Kv.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i},iy=d,ny=v,ry=Fo({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=us(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=cs(i);null==o&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a1&&("string"==typeof r?a=Ev[r]:"function"==typeof r&&(a=r),a&&t.setData(n.downSample(l.dim,1/c,a,Nv)))}}}),bg.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ra(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var cy=Ed([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),dy={getBarItemStyle:function(t){var e=cy(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},fy=["itemStyle","barBorderWidth"];o(Cn.prototype,dy),Go({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||this._render(t,e,i),this.group},dispose:R,_render:function(t,e,i){var n,r=this.group,o=t.getData(),a=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var h=t.isAnimationEnabled()?t:null;o.diff(a).add(function(e){if(o.hasValue(e)){var i=o.getItemModel(e),a=gy[s.type](o,e,i),l=py[s.type](o,e,i,a,n,h);o.setItemGraphicEl(e,l),r.add(l),xs(l,o,e,i,a,t,n,"polar"===s.type)}}).update(function(e,i){var l=a.getItemGraphicEl(i);if(o.hasValue(e)){var u=o.getItemModel(e),c=gy[s.type](o,e,u);l?xn(l,{shape:c},h,e):l=py[s.type](o,e,u,c,n,h,!0),o.setItemGraphicEl(e,l),r.add(l),xs(l,o,e,u,c,t,n,"polar"===s.type)}else r.remove(l)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===s.type?e&&vs(t,h,e):e&&ys(t,h,e)}).execute(),this._data=o},remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(e){"sector"===e.type?ys(e.dataIndex,t,e):vs(e.dataIndex,t,e)}):i.removeAll()}});var py={cartesian2d:function(t,e,i,n,r,a,s){var l=new Qf({shape:o({},n)});if(a){var h=l.shape,u=r?"height":"width",c={};h[u]=0,c[u]=n[u],dp[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,i,n,r,o,s){var l=n.startAngle0?1:-1,l=o.height>0?1:-1;return{x:o.x+s*a/2,y:o.y+l*a/2,width:o.width-s*a,height:o.height-l*a}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};Eo(v(function(t,e,i){var n=[];e.eachSeriesByType(t,function(t){t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type&&n.push(t)});var r=pa(n),o={};d(n,function(t){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=da(t),s=r[fa(n)][a],l=s.offset,h=s.width,u=i.getOtherAxis(n),c=t.get("barMinHeight")||0;o[a]=o[a]||[],e.setLayout({offset:l,size:h});for(var d=e.mapDimension(u.dim),f=e.mapDimension(n.dim),p=na(e,d,f),g=u.isHorizontal(),m=n.onZero||p?u.toGlobalCoord(u.dataToCoord(0)):u.getGlobalExtent()[0],v=0,y=e.count();v=0?"p":"n",T=m;if(p&&(o[a][_]||(o[a][_]={p:m,n:m}),T=o[a][_][I]),g)w=T,b=(C=i.dataToPoint([x,_]))[1]+l,S=C[0]-m,M=h,Math.abs(S)0&&"scale"!==h){var d=r.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(a.removeClipPath,a);a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,i,n,r,o,a){var s=new Xf({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return _n(s,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,r=t[1]-i.cy,o=Math.sqrt(n*n+r*r);return o<=i.r&&o>=i.r0}}});var xy=function(t,e,i,n){var r,o,a=t.getData(),s=[],l=!1;a.each(function(i){var n,h,u,c,d=a.getItemLayout(i),f=a.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);r=d.cx,o=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+r,M=(b?(d.r+d.r0)/2*w:d.r*w)+o;if(n=S+3*_,h=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),C=I+(_<0?-1:1)*y;n=C+(_<0?-5:5),h=T,u=[[S,M],[I,T],[C,T]]}c=b?"center":_>0?"left":"right"}var D=p.getFont(),A=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=ne(t.getFormattedLabel(i,"normal")||a.getName(i),D,c,"top");l=!!A,d.label={x:n,y:h,position:g,height:k.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:A,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&function(t,e,i,n,r,o){for(var a=[],s=[],l=0;l=0;s--){var l=2*s,h=n[l]-o/2,u=n[l+1]-a/2;if(t>=h&&e>=u&&t<=h+o&&e<=u+a)return s}return-1}}),Sy=Ms.prototype;Sy.isPersistent=function(){return!this._incremental},Sy.updateData=function(t){this.group.removeAll();var e=new by({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Sy.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},Sy.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Gi({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Sy.incrementalUpdate=function(t,e){var i;this._incremental?(i=new by,this._incremental.addDisplayable(i,!0)):((i=new by({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},Sy._setCommon=function(t,e,i){var n=e.hostModel,r=e.getVisual("symbolSize");t.setShape("size",r instanceof Array?r:[r,r]),t.symbolProxy=wa(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("color");a&&t.setColor(a),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},Sy.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Sy._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Go({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=zv().reset(t);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Ms:new Pa,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),No(Ov("scatter","circle")),Eo(zv("scatter")),Lo(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var My=Vo({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,My.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,r=(e?i:t).elements,a=i.elements=e?[]:i.elements,s=[];this._flatten(r,s);var l=Ke(a,s);Qe(l);var h=this._elOptionsToUpdate=[];d(l,function(t,e){var i,r,s,l,u,c,d,f,p=t.option;p&&(h.push(p),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,p),s=a,l=e,c=o({},u=p),d=s[l],"merge"===(f=u.$action||"merge")?d?(n(d,c,!0),ir(d,c,{ignoreSize:!0}),rr(u,d)):s[l]=c:"replace"===f?s[l]=c:"remove"===f&&d&&(s[l]=null),i=a[e],r=p,i&&(i.hv=r.hv=[Cs(r,["left","right"]),Cs(r,["top","bottom"])],"group"===i.type&&(null==i.width&&(i.width=r.width=0),null==i.height&&(i.height=r.height=0))))},this);for(var u=a.length-1;u>=0;u--)null==a[u]?a.splice(u,1):delete a[u].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Fo({type:"graphic",init:function(t,e){this._elMap=N(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,r=this.group;d(i,function(t){var e=t.$action,i=t.id,a=n.get(i),s=t.parentId,l=null!=s?n.get(s):r;if("text"===t.type){var h=t.style;t.hv&&t.hv[1]&&(h.textVerticalAlign=h.textBaseline=null),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke)}var u,c=(u=o({},u=t),d(["id","parentId","$action","hv","bounding"].concat(Lp),function(t){delete u[t]}),u);e&&"merge"!==e?"replace"===e?(Ts(a,n),Is(i,l,c,n)):"remove"===e&&Ts(a,n):a?a.attr(c):Is(i,l,c,n);var f=n.get(i);f&&(f.__ecGraphicWidth=t.width,f.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,r=this._elMap,o=i.length-1;o>=0;o--){var a=i[o],s=r.get(a.id);if(s){var l=s.parent;er(s,a,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:a.hv,boundingMode:a.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Ts(e,t)}),this._elMap=N()},dispose:function(){this._clear()}});var Iy=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var o=i.getData(),a=ei(o,t);if(null==a||a<0||y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(f(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},Ty=d,Cy=v,Dy=ii(),Ay=(Vo({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),ii()),ky=d,Py=Fo({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Os("axisPointer",i,function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Ns(e.getZr(),"axisPointer"),Py.superApply(this._model,"remove",arguments)},dispose:function(t,e){Ns("axisPointer",e),Py.superApply(this._model,"dispose",arguments)}}),Ly=ii(),Oy=i,zy=m;(Rs.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=v(Bs,e,u);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new Ec,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);Hs(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(r&&n.getBandWidth()>a)return!0;if(o){var s=us(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===i},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var o=Ly(t).pointerEl=new dp[r.type](Oy(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var r=Ly(t).labelEl=new Qf(Oy(e.label));t.add(r),Vs(r,n)}},updatePointerEl:function(t,e,i){var n=Ly(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=Ly(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),Vs(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,o=i.getModel("handle"),a=i.get("status");if(!o.get("show")||!a||"hide"===a)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Tn(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){cd(t.event)},onmousedown:zy(this._onHandleDragMove,this,0,0),drift:zy(this._onHandleDragMove,this),ondragend:zy(this._onHandleDragEnd,this)}),n.add(r)),Hs(r,i,!1);r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");y(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),Qr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){Bs(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Fs(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Fs(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Fs(n)),Ly(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=Rs,si(Rs);var Ey=Rs.extend({makeElOption:function(t,e,i,n,r){var o,a,s,l,h,u,c,d,f,p,g,m=i.axis,v=m.grid,y=n.get("type"),x=Us(v,m).getOtherAxis(m).getGlobalExtent(),_=m.toGlobalCoord(m.dataToCoord(e,!0));if(y&&"none"!==y){var w=(s=(o=n).get("type"),l=o.getModel(s+"Style"),"line"===s?(a=l.getLineStyle()).fill=null:"shadow"===s&&((a=l.getAreaStyle()).stroke=null),a),b=Ny[y](m,_,x,w);b.style=w,t.graphicKey=b.type,t.pointer=b}h=e,u=t,c=gs(v.model,i),d=i,f=n,p=r,g=Kv.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=f.get("label.margin"),Gs(u,d,f,p,{position:Zs(d.axis,h,c),align:g.textAlign,verticalAlign:g.textVerticalAlign})},getHandleTransform:function(t,e,i){var n=gs(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Zs(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,o=r.grid,a=r.getGlobalExtent(!0),s=Us(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}}),Ny={line:function(t,e,i,n){var r,o,a,s=(r=[e,i[0]],o=[e,i[1]],a=Xs(t),{x1:r[a=a||0],y1:r[1-a],x2:o[a],y2:o[1-a]});return Yi({shape:s,style:n}),{type:"Line",shape:s}},shadow:function(t,e,i,n){var r,o,a,s=t.getBandWidth(),l=i[1]-i[0];return{type:"Rect",shape:(r=[e-s/2,i[0]],o=[s,l],a=Xs(t),{x:r[a=a||0],y:r[1-a],width:o[a],height:o[1-a]})}}};ry.registerAxisPointerClass("CartesianAxisPointer",Ey),Lo(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Oo(tm.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ls(t,e)}),zo({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n,r,o,a=t.currTrigger,s=[t.x,t.y],l=t,h=t.dispatchAction||m(i.dispatchAction,i),u=e.getComponent("axisPointer").coordSysAxesInfo;if(u){Ls(s)&&(s=Iy({seriesIndex:l.seriesIndex,dataIndex:l.dataIndex},e).point);var c=Ls(s),f=l.axesInfo,p=u.axesInfo,g="leave"===a||Ls(s),v={},y={},x={list:[],map:{}},_={showPointer:Cy(As,y),showTooltip:Cy(ks,x)};Ty(u.coordSysMap,function(t,e){var i=c||t.containPoint(s);Ty(u.coordSysAxesInfo[e],function(t,e){var n=t.axis,r=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(f,t);if(!g&&i&&(!f||r)){var o=r&&r.value;null!=o||c||(o=n.pointToData(s)),null!=o&&Ds(t,o,_,!1,v)}})});var w={};return Ty(p,function(t,e){var i=t.linkGroup;i&&!y[e]&&Ty(i.axesInfo,function(e,n){var r=y[n];if(e!==t&&r){var o=r.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Ps(e),Ps(t)))),w[t.key]=o}})}),Ty(w,function(t,e){Ds(p[e],t,_,!0,v)}),n=y,r=p,o=v.axesInfo=[],Ty(r,function(t,e){var i=t.axisPointerModel.option,r=n[e];r?(!t.useHandle&&(i.status="show"),i.value=r.value,i.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}),function(t,e,i,n){if(!Ls(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}(x,s,t,h),function(t,e,i){var n=i.getZr(),r=Dy(n).axisPointerLastHighlights||{},o=Dy(n).axisPointerLastHighlights={};Ty(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Ty(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var a=[],s=[];d(r,function(t,e){!o[e]&&s.push(t)}),d(o,function(t,e){!r[e]&&a.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),a.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:a})}(p,0,i),v}}),Vo({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var Ry=d,By=Xn,Vy=["","-webkit-","-moz-","-o-"];Ys.prototype={constructor:Ys,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+js(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var Fy=m,Hy=d,Gy=Ln,Wy=new Qf({shape:{x:-1,y:-1,width:2,height:2}});Fo({type:"tooltip",init:function(t,e){if(!ku.node){var i=new Ys(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!ku.node&&!ku.wxa){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");Os("itemTooltip",this._api,Fy(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!ku.node){var r=$s(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=Wy;a.position=[n.x,n.y],a.update(),a.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:a},r)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=Iy(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide($s(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,o=n.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===(t=qs([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,r=[e.offsetX,e.offsetY],o=[],a=[],s=qs([e.tooltipOption,n]);Hy(t,function(t){Hy(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=Ws(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(o){var l=i.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=xa(e.axis,n),u.axisValueLabel=s,u&&(a.push(u),r.push(l.formatTooltip(h,!0)))});var l=s;o.push((l?jn(l)+"
":"")+r.join("
"))}})},this),o.reverse(),o=o.join("

");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,r[0],r[1],this._tooltipContent,a):this._showTooltipContent(s,o,a,Math.random(),r[0],r[1],l)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,o=n.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,h=a.getData(),u=qs([h.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=a.getDataParams(s,l),f=a.formatTooltip(s,!1,l),p="item_"+a.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new Cn(n,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random();this._showOrMove(r,function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,o,a,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var u=e;if(h&&"string"==typeof h)u=Yn(h,i,!0);else if("function"==typeof h){var c=Fy(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,a,r,o,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,a,r,o,l,i,s)}},_updatePosition:function(t,e,i,n,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h,u,c,d,f,p,g,m,v,x,_,b,S,M,I,T,C,D,A=r.getSize(),k=t.get("align"),P=t.get("verticalAlign"),L=a&&a.getBoundingRect().clone();if(a&&L.applyTransform(a.transform),"function"==typeof e&&(e=e([i,n],o,r.el,L,{viewSize:[s,l],contentSize:A.slice()})),y(e))i=Gy(e[0],s),n=Gy(e[1],l);else if(w(e)){e.width=A[0],e.height=A[1];var O=tr(e,{width:s,height:l});i=O.x,n=O.y,k=null,P=null}else"string"==typeof e&&a?(i=(z=function(t,e,i){var n=i[0],r=i[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-n/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-n/2,a=e.y-r-5;break;case"bottom":o=e.x+s/2-n/2,a=e.y+l+5;break;case"left":o=e.x-n-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+5,a=e.y+l/2-r/2}return[o,a]}(e,L,A))[0],n=z[1]):(i=(h=i,u=n,c=r.el,d=s,f=l,p=k?null:20,g=P?null:20,m=Ks(c),v=m.width,x=m.height,null!=p&&(h+v+p>d?h-=v+p:h+=p),null!=g&&(u+x+g>f?u-=x+g:u+=g),z=[h,u])[0],n=z[1]);if(k&&(i-=Qs(k)?A[0]/2:"right"===k?A[0]:0),P&&(n-=Qs(P)?A[1]/2:"bottom"===P?A[1]:0),t.get("confine")){var z=(_=i,b=n,S=r.el,M=s,I=l,T=Ks(S),C=T.width,D=T.height,_=Math.min(_+C,M)-C,b=Math.min(b+D,I)-D,[_=Math.max(_,0),b=Math.max(b,0)]);i=z[0],n=z[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&Hy(e,function(e,n){var r=e.dataByAxis||{},o=(t[n]||{}).dataByAxis||[];(i&=r.length===o.length)&&Hy(r,function(t,e){var n=o[e]||{},r=t.seriesDataIndices||[],a=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===a.length)&&Hy(r,function(t,e){var n=a[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){ku.node||(this._tooltipContent.hide(),Ns("itemTooltip",e))}}),zo({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),zo({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var Zy=Vo({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){Zy.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});zo("legendToggleSelect","legendselectchanged",v(Js,"toggleSelected")),zo("legendSelect","legendselected",v(Js,"select")),zo("legendUnSelect","legendunselected",v(Js,"unSelect"));var Uy=v,Xy=d,jy=Ec,Yy=Fo({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new jy),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var r=t.getBoxLayoutParams(),o={width:i.getWidth(),height:i.getHeight()},s=t.get("padding"),l=tr(r,o,s),h=this.layoutInner(t,n,l),u=tr(a({width:h.width,height:h.height},r),o,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=tl(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var r=this.getContentGroup(),o=N(),a=e.get("selectedMode");Xy(e.getData(),function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!o.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",p=c.getVisual("symbol");this._createItem(h,l,s,e,f,p,t,d,a).on("click",Uy(el,h,n)).on("mouseover",Uy(il,u,null,n)).on("mouseout",Uy(nl,u,null,n)),o.set(h,!0)}else i.eachRawSeries(function(i){if(!o.get(h)&&i.legendDataProvider){var r=i.legendDataProvider(),u=r.indexOfName(h);if(u<0)return;var c=r.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,a).on("click",Uy(el,h,n)).on("mouseover",Uy(il,i,h,n)).on("mouseout",Uy(nl,i,h,n)),o.set(h,!0)}},this)}else r.add(new jy({newline:!0}))},this)},_createItem:function(t,e,i,n,r,a,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),p=new jy,g=i.getModel("textStyle"),m=i.get("icon"),v=i.getModel("tooltip"),y=v.parentModel;if(r=m||r,p.add(wa(r,0,0,u,c,f?l:d,!0)),!m&&a&&(a!==r||"none"==a)){var x=.8*c;"none"===a&&(a="circle"),p.add(wa(a,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=n.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),p.add(new Gf({style:dn({},g,{text:S,x:_,y:c/2,textFill:f?g.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new Qf({shape:p.getBoundingRect(),invisible:!0,tooltip:v.get("show")?o({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},v.option):null});return p.add(M),p.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(p),un(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();zp(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var r=n.getBoundingRect();return n.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}});Oo(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[s],f=[-u.x,-u.y];f[a]=n.position[a];var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[a]+=i[s]-c[s]:p[a]+=c[s]+m),g[1-a]+=u[l]/2-c[l]/2,n.attr("position",f),r.attr("position",p),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-a]),r.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],r.setClipPath(new Qf({shape:y})),r.__rectSize=y[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&xn(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var r=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var n=i.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;n&&r&&n.setStyle("text",_(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var i,n,r,o,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=Ky[u],d=Ky[1-u],f=Qy[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(o){var m=o.getBoundingRect(),v=o.position[u]+m[f];p[u]=-v-l[f],i=Math.floor(g*(v+m[f]+h/2)/l[c]),i=l[c]&&g?Math.max(0,Math.min(g-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),r=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=e(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:i,pageCount:g,pagePrevDataIndex:n,pageNextDataIndex:r}}});zo("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Vo({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Fo({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=t.get("textBaseline"),l=new Gf({style:dn({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new Gf({style:dn({},o,{text:u,textFill:o.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),n.add(l),u&&n.add(c);var p=n.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var m=tr(g,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var v={textAlign:a,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),p=n.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new Qf({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});qi(_),n.add(_)}}});var tx=Un,ex=jn,ix=Vo({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(ku.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var r=this.constructor,a=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[a];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ol(i),d(i.data,function(t){t instanceof Array?(ol(t[0]),ol(t[1])):ol(t)}),o(s=new r(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[a]=s):t[a]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,tx).join(", "):tx(i),r=e.getName(t),o=ex(this.name);return(null!=i||r)&&(o+="
"),r&&(o+=ex(r),null!=i&&(o+=" : ")),null!=i&&(o+=ex(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});u(ix,xg),ix.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var nx=l,rx=v,ox={min:rx(al,"min"),max:rx(al,"max"),average:rx(al,"average")},ax=Fo({type:"marker",init:function(){this.markerGroupMap=N()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var n=t[r];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});ax.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(dl(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(o)||l.set(o,new Pa),u=function(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return a({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new km(n,i),o=f(i.get("data"),v(sl,e));return t&&(o=g(o,v(hl,t))),r.initData(o,null,t?ul:function(t){return t.value}),r}(r,t,e);e.setData(u),dl(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||s.getVisual("color"),symbol:i.getShallow("symbol")})}),h.updateData(u),this.group.add(h.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),Lo(function(t){t.markPoint=t.markPoint||{}}),ix.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var sx=Jf.prototype,lx=ep.prototype,hx=Wi({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(fl(e)?sx:lx).buildPath(t,e)},pointAt:function(t){return fl(this.shape)?sx.pointAt.call(this,t):lx.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=fl(e)?[e.x2-e.x1,e.y2-e.y1]:lx.tangentAt.call(this,t);return j(i,i)}}),ux=["fromSymbol","toSymbol"],cx=vl.prototype;cx.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,r=this.parent;r;)r.scale&&(n/=r.scale[0]),r=r.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var a=o.shape.percent,s=o.pointAt(0),l=o.pointAt(a),h=W([],l,s);if(j(h,h),t&&(t.attr("position",s),u=o.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(u[1],u[0])),t.attr("scale",[n*a,n*a])),e){e.attr("position",l);var u=o.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(u[1],u[0])),e.attr("scale",[n*a,n*a])}if(!i.ignore){i.attr("position",l);var c,d,f,p=5*n;if("end"===i.__position)c=[h[0]*p+l[0],h[1]*p+l[1]],d=h[0]>.8?"left":h[0]<-.8?"right":"center",f=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var g=a/2,m=[(u=o.tangentAt(g))[1],-u[0]],v=o.pointAt(g);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),c=[v[0]+m[0]*p,v[1]+m[1]*p],d="center",f="bottom";var y=-Math.atan2(u[1],u[0]);l[0].8?"right":h[0]<-.8?"left":"center",f=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n]})}}}},cx._createLine=function(t,e,i){var n,r,o=t.hostModel,a=(n=t.getItemLayout(e),ml((r=new hx({name:"line"})).shape,n),r);a.shape.percent=0,_n(a,{shape:{percent:1}},o,e),this.add(a);var s=new Gf({name:"label"});this.add(s),d(ux,function(i){var n=gl(i,t,e);this.add(n),this[pl(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},cx.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};ml(a.shape,o),xn(r,a,n,e),d(ux,function(i){var n=t.getItemVisual(e,i),r=pl(i);if(this[r]!==n){this.remove(this.childOfName(i));var o=gl(i,t,e);this.add(o)}this[r]=n},this),this._updateCommonStl(t,e,i)},cx._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle").getLineStyle(),s=u.getModel("emphasis.lineStyle").getLineStyle(),l=u.getModel("label"),h=u.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(a({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},o)),r.hoverStyle=s,d(ux,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m,v=l.getShallow("show"),y=h.getShallow("show"),x=this.childOfName("label");if(v||y){if(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType))){var _=n.getRawValue(e);g=null==_?t.getName(e):isFinite(_)?On(_):_}m=C(n.getFormattedLabel(e,"emphasis",t.dataType),g)}if(v){var w=dn(x.style,l,{text:g},{autoColor:p});x.__textAlign=w.textAlign,x.__verticalAlign=w.textVerticalAlign,x.__position=l.get("position")||"middle"}else x.setStyle("text",null);x.hoverStyle=y?{text:m,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},x.ignore=!v&&!y,un(this)},cx.highlight=function(){this.trigger("emphasis")},cx.downplay=function(){this.trigger("normal")},cx.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},cx.setLinePoints=function(t){var e=this.childOfName("line");ml(e.shape,t),e.dirty()},h(vl,Ec);var dx=yl.prototype;dx.isPersistent=function(){return!0},dx.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var r=xl(t);t.diff(n).add(function(i){!function(t,e,i,n){if(wl(e.getItemLayout(i))){var r=new t._ctor(e,i,n);e.setItemGraphicEl(i,r),t.group.add(r)}}(e,t,i,r)}).update(function(i,o){var a,s,l,h,u,c;a=e,s=t,l=o,h=i,u=r,c=n.getItemGraphicEl(l),wl(s.getItemLayout(h))?(c?c.updateData(s,h,u):c=new a._ctor(s,h,u),s.setItemGraphicEl(h,c),a.group.add(c)):a.group.remove(c)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},dx.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},dx.incrementalPrepareUpdate=function(t){this._seriesScope=xl(t),this._lineData=null,this.group.removeAll()},dx.incrementalUpdate=function(t,e){for(var i=t.start;i=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=u,a=[p,g,{type:l,valueIndex:a.valueIndex,value:u}]}return(a=[sl(t,a[0]),sl(t,a[1]),o({},a[2])])[2].type=a[2].type||"",n(a[2],a[0]),n(a[2],a[1]),a};ax.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){Il(r,e,!0,t,i),Il(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);Il(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||_[r?0:1],symbol:o.get("symbol",!0)||x[r?0:1],color:o.get("itemStyle.color")||l.getVisual("color")})}var o=t.coordinateSystem,s=t.id,l=t.getData(),h=this.markerGroupMap,u=h.get(s)||h.set(s,new yl);this.group.add(u.group);var c=function(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return a({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new km(n,i),o=new km(n,i),s=new km([],i),l=f(i.get("data"),v(fx,e,t,i));t&&(l=g(l,v(Ml,t)));var h=t?ul:function(t){return t.value};return r.initData(f(l,function(t){return t[0]}),null,h),o.initData(f(l,function(t){return t[1]}),null,h),s.initData(f(l,function(t){return t[2]})),s.hasItemOption=!0,{from:r,to:o,line:s}}(o,t,e),d=c.from,p=c.to,m=c.line;e.__from=d,e.__to=p,e.setData(m);var x=e.get("symbol"),_=e.get("symbolSize");y(x)||(x=[x,x]),"number"==typeof _&&(_=[_,_]),c.from.each(function(t){r(d,t,!0),r(p,t,!1)}),m.each(function(t){var e=m.getItemModel(t).get("lineStyle.color");m.setItemVisual(t,{color:e||d.getItemVisual(t,"color")}),m.setItemLayout(t,[d.getItemLayout(t),p.getItemLayout(t)]),m.setItemVisual(t,{fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolSize:p.getItemVisual(t,"symbolSize"),toSymbol:p.getItemVisual(t,"symbol")})}),u.updateData(m),c.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Lo(function(t){t.markLine=t.markLine||{}}),ix.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var px=function(t,e,i,n){var o=sl(t,n[0]),a=sl(t,n[1]),s=T,l=o.coord,h=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=r([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u},gx=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];ax.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var r=f(gx,function(r){return Al(n,e,r,t,i)});n.setItemLayout(e,r),n.getItemGraphicEl(e).setShape("points",r)})}},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.name,s=t.getData(),l=this.markerGroupMap,h=l.get(o)||l.set(o,{group:new Ec});this.group.add(h.group),h.__keep=!0;var u=function(t,e,i){var n,r;t?(n=f(t&&t.dimensions,function(t){var i=e.getData();return a({name:t},i.getDimensionInfo(i.mapDimension(t))||{})}),r=new km(f(["x0","y0","x1","y1"],function(t,e){return{name:t,type:n[e%2].type}}),i)):r=new km(n=[{name:"value",type:"float"}],i);var o=f(i.get("data"),v(px,e,t,i));t&&(o=g(o,v(Dl,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return r.initData(o,null,s),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,f(gx,function(i){return Al(u,e,i,t,n)})),u.setItemVisual(e,{color:s.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new $f({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getItemGraphicEl(i);xn(n,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,i){var n=u.getItemModel(i),r=n.getModel("label"),o=n.getModel("emphasis.label"),s=u.getItemVisual(i,"color");t.useStyle(a(n.getModel("itemStyle").getItemStyle(),{fill:Dt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),cn(t.style,t.hoverStyle,r,o,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:s}),un(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),Lo(function(t){t.markArea=t.markArea||{}}),Rp.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var mx,vx,yx,xx,_x=["cartesian2d","polar","singleAxis"],bx=(vx=["axisIndex","axis","index","id"],yx=f(mx=(mx=["x","y","z","radius","angle","single"]).slice(),Qn),xx=f(vx=(vx||[]).slice(),Qn),function(t,e){d(mx,function(i,n){for(var r={name:i,capital:yx[n]},o=0;o=0){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}var o},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,r=this.ecModel,o=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),r.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return i(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[t.start,t.end],a=[];return Sx(["startValue","endValue"],function(e){a.push(null!=t[e]?i.parse(t[e]):null)}),Sx([0,1],function(t){var s=a[t],l=o[t];"percent"===n[t]?(null==l&&(l=r[t]),s=i.parse(Pn(l,r,e,!0))):l=Pn(s,e,r,!0),a[t]=s,o[t]=l}),{valueWindow:Mx(a),percentWindow:Mx(o)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=kl(this,this._dimName,e);var i=this.calculateDataWindow(t.option);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,r=(n=this)._minMaxSpan={},o=n._dataZoomModel,Sx(["min","max"],function(t){r[t+"Span"]=o.get(t+"Span");var e=o.get(t+"ValueSpan");if(null!=e&&(r[t+"ValueSpan"]=e,null!=(e=n.getAxisModel().axis.scale.parse(e)))){var i=n._dataExtent;r[t+"Span"]=Pn(i[0]+e,i,[0,100],!0)}}),Pl(this)}var n,r,o},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Pl(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&Sx(n,function(t){var e=t.getData(),n=e.mapDimension(i,!0);"weakFilter"===r?e.filterSelf(function(t){for(var i,r,a,s=0;so[1];if(h&&!u&&!c)return!0;h&&(a=!0),u&&(i=!0),c&&(r=!0)}return a&&i&&r}):Sx(n,function(i){if("empty"===r)t.setData(e.map(i,function(t){return(e=t)>=o[0]&&e<=o[1]?t:NaN;var e}));else{var n={};n[i]=o,e.selectRange(n)}}),Sx(n,function(t){e.setApproximateExtent(o,t)})})}}};var Tx=d,Cx=bx,Dx=Vo({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=Ll(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Ll(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;ku.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Ol(this,t),Tx([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new Ix(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Cx(function(e){var i=e.axisIndex;t[i]=Ye(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Cx(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var r="vertical"===e?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],t=!1):Tx(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Cx(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;o0?100:20}},getFirstTargetAxisModel:function(){var t;return Cx(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;Cx(function(n){Tx(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;Tx([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Ol(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),Ax=Sg.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis(function(t,n){var r=e.getComponent(t.axis,n);if(r){var o=r.getCoordSysModel();o&&function(t,e,i,n){for(var r,o=0;oo&&(e[1-n]=e[n]+u.sign*o),e}),Px=Qf,Lx=Pn,Ox=zn,zx=m,Ex=d,Nx="horizontal",Rx=5,Bx=["line","bar","candlestick","scatter"],Vx=Ax.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){Vx.superApply(this,"render",arguments),Qr(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){Vx.superApply(this,"remove",arguments),Jr(this,"_dispatchZoomAction")},dispose:function(){Vx.superApply(this,"dispose",arguments),Jr(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ec;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},r=this._orient===Nx?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=nr(t.option);d(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=tr(o,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==Nx||r?i===Nx&&r?{scale:a?[-1,1]:[-1,-1]}:"vertical"!==i||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new Px({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new Px({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=r){var o=n.getDataExtent(r),s=.3*(o[1]-o[0]);o=[o[0]-s,o[1]+s];var l,h=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=u[1]/(n.count()-1),p=0,g=Math.round(n.count()/e[0]);n.each([r],function(t,e){if(g>0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:Lx(t,o,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new $f({shape:{points:c},style:a({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Kf({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(r,o){d(t.getAxisProxy(r.name,o).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(Bx,t.get("type"))<0)){var a,s=n.getComponent(r.axis,o).axis,h={x:"y",y:"x",radius:"angle",angle:"radius"}[r.name],u=t.coordinateSystem;null!=h&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),h=t.getData().mapDimension(h),i={thisAxis:s,series:t,thisDim:r.name,otherDim:h,otherAxisInverse:a}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new Px({draggable:!0,cursor:Nl(this._orient),drift:zx(this._onDragMove,this,"all"),onmousemove:function(t){cd(t.event)},ondragstart:zx(this._showDataInfo,this,!0),ondragend:zx(this._onDragEnd,this),onmouseover:zx(this._showDataInfo,this,!0),onmouseout:zx(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new Px(qi({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),Ex([0,1],function(t){var r=Tn(o.get("handleIcon"),{cursor:Nl(this._orient),draggable:!0,drift:zx(this._onDragMove,this,t),onmousemove:function(t){cd(t.event)},ondragend:zx(this._onDragEnd,this),onmouseover:zx(this._showDataInfo,this,!0),onmouseout:zx(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=Ln(o.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=o.textStyleModel;this.group.add(i[t]=new Gf({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Lx(t[0],[0,100],e,!0),Lx(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];kx(e,n,r,i.get("zoomLock")?"all":t,null!=o.minSpan?Lx(o.minSpan,a,r,!0):null,null!=o.maxSpan?Lx(o.maxSpan,a,r,!0):null),this._range=Ox([Lx(n[0],r,a,!0),Lx(n[1],r,a,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=Ox(i.slice()),r=this._size;Ex([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],r[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=wn(n.handles[t].parent,this.group),i=Sn(0===t?"right":"left",e),s=this._handleWidth/2+Rx,l=bn([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===Nx?"middle":i,textAlign:o===Nx?i:"center",text:a[t]})}var i=this.dataZoomModel,n=this._displayables,r=n.handleLabels,o=this._orient,a=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=Ox(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");null!=r&&"auto"!==r||(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return x(n)?n(t,o):_(n)?n.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=bn([e,i],this._displayables.barGroup.getLocalTransform(),!0);this._updateInterval(t,n[0]);var r=this.dataZoomModel.get("realtime");this._updateView(!r),r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2;this._updateInterval("all",i[0]-r),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(Ex(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});Dx.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var Fx="\0_ec_interaction_mutex";zo({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),u(Vl,Qu);var Hx=v,Gx="\0_ec_dataZoom_roams",Wx=m,Zx=Ax.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){Zx.superApply(this,"render",arguments),function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(a[1]-a[0])+a[0];n=Math.max(1/n,0),a[0]=(a[0]-h)*n+h,a[1]=(a[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return kx(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a}}}),Ux={grid:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,i,n,r){var o=i.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};Oo({getTargetSeries:function(t){var e=N();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},isOverallFilter:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),zo("dataZoom",function(t,e){var i=function(t,e,i){function n(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(r){var o,a={nodes:[],records:{}};if(e(function(t){a.records[t.name]={}}),!r)return a;n(r,a);do{o=!1,t(function(t){var r,s,h,u;u=t,!(l(a.nodes,u)>=0)&&(r=t,s=a,h=!1,e(function(t){d(i(r,t)||[],function(e){s.records[t.name][e]&&(h=!0)})}),h)&&(n(t,a),o=!0)})}while(o);return a}}(m(e.eachComponent,e,"dataZoom"),bx,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Xx={},jx=Vo({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){jx.superApply(this,"mergeDefaultAndTheme",arguments),d(this.option.feature,function(t,e){var i=ih(e);i&&n(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});Fo({type:"toolbox",render:function(t,e,i,n){function r(r,o){var a,s=x[r],l=x[o],h=new Cn(g[s],t,t.ecModel);if(s&&!l){if(0===s.indexOf("my"))a={model:h,onclick:h.option.onclick,featureName:s};else{var u=ih(s);if(!u)return;a=new u(h,e,i)}y[s]=a}else{if(!(a=y[l]))return;a.model=h,a.ecModel=e,a.api=i}s||!l?h.get("show")&&!a.unusable?(function(n,r,o){var a=n.getModel("iconStyle"),s=n.getModel("emphasis.iconStyle"),l=r.getIcons?r.getIcons():n.get("icon"),h=n.get("title")||{};if("string"==typeof l){var u=l,c=h;h={},(l={})[o]=u,h[o]=c}var g=n.iconPaths={};d(l,function(o,l){var u=Tn(o,{},{x:-p/2,y:-p/2,width:p,height:p});u.setStyle(a.getItemStyle()),u.hoverStyle=s.getItemStyle(),un(u),t.get("showTitle")&&(u.__title=h[l],u.on("mouseover",function(){var t=s.getItemStyle();u.setStyle({text:h[l],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){u.setStyle({textFill:null})})),u.trigger(n.get("iconStatus."+l)||"normal"),f.add(u),u.on("click",m(r.onclick,r,e,i,l)),g[l]=u})}(h,a,s),h.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},a.render&&a.render(h,e,i,n)):a.remove&&a.remove(e,i):a.dispose&&a.dispose(e,i)}var o,a,s,l,h,u,c,f=this.group;if(f.removeAll(),t.get("show")){var p=+t.get("itemSize"),g=t.get("feature")||{},y=this._features||(this._features={}),x=[];d(g,function(t,e){x.push(e)}),new Zo(this._featureNames||[],x).add(r).update(r).remove(v(r,null)).execute(),this._featureNames=x,o=f,s=i,l=(a=t).getBoxLayoutParams(),h=a.get("padding"),u={width:s.getWidth(),height:s.getHeight()},c=tr(l,u,h),zp(a.get("orient"),o,a.get("itemGap"),c.width,c.height),er(o,l,u,h),f.add(tl(f.getBoundingRect(),t)),f.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=ne(e,ge(n)),o=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+r.height>i.getHeight()&&(n.textPosition="top",a=!0);var s=a?-5-r.height:p+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",s],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,s],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var Yx=zg.toolbox.saveAsImage;nh.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:Yx.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:Yx.lang.slice()},nh.prototype.unusable=!ku.canvasSupported,nh.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=i.get("type",!0)||"png";r.download=n+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(r.href=a,"function"!=typeof MouseEvent||ku.browser.ie||ku.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(a.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(f)}},eh("saveAsImage",nh);var qx=zg.toolbox.magicType;rh.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(qx.title),option:{},seriesIndex:{}};var $x=rh.prototype;$x.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var Kx={line:function(t,e,i,r){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.line")||{},!0)},bar:function(t,e,i,r){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.bar")||{},!0)},stack:function(t,e,i,r){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},r.get("option.stack")||{},!0)},tiled:function(t,e,i,r){if("line"===t||"bar"===t)return n({id:e,stack:""},r.get("option.tiled")||{},!0)}},Qx=[["line","bar"],["stack","tiled"]];$x.onclick=function(t,e,i){var n=this.model,r=n.get("seriesIndex."+i);if(Kx[i]){var o={series:[]};d(Qx,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(e){var r=e.subType,s=e.id,l=Kx[i](r,s,e,n);l&&(a(l,e.option),o.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var f=0;f<=d;f++)o[c][d]=o[c][d]||{};o[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:o})}},zo({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),eh("magicType",rh);var Jx=zg.toolbox.dataView,t_=new Array(60).join("-"),e_="\t",i_=new RegExp("["+e_+"]+","g");lh.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(Jx.title),lang:i(Jx.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},lh.prototype.onclick=function(t,e){function i(){n.removeChild(o),x._dom=null}var n=e.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=r.get("textColor");var l=document.createElement("div"),h=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var u=r.get("optionToContent"),c=r.get("contentToOption"),d=oh(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(h),h.readOnly=r.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=r.get("textColor"),h.style.borderColor=r.get("textareaBorderColor"),h.style.backgroundColor=r.get("textareaColor"),h.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;Be(v,"click",i),Be(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):sh(h.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),Be(h,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+e_+e.substring(n),this.selectionStart=this.selectionEnd=i+1,cd(t)}}),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},lh.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},lh.prototype.dispose=function(t,e){this.remove(t,e)},eh("dataView",lh),zo({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n,r,s=e.getSeriesByName(t.name)[0];if(s){var l=s.get("data");i.push({name:t.name,data:(n=t.data,r=l,f(n,function(t,e){var i=r&&r[e];return w(i)&&!y(i)?(w(t)&&!y(t)&&(t=t.value),a({value:t},i)):t}))})}else i.push(o({type:"scatter"},t))}),e.mergeOption(a({series:i},t.newOption))});var n_=v,r_=d,o_=f,a_=Math.min,s_=Math.max,l_=Math.pow,h_=1e4,u_=6,c_=6,d_="globalPan",f_={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},p_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},g_={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},m_=0;hh.prototype={constructor:hh,enableBrush:function(t){return this._brushType&&ch(this),t.brushType&&uh(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};d(t,function(t){e[t.panelId]=i(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){r_(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:o+e)+"-"+t.brushType}function r(e,i){var n=t[e];if(null!=i&&a[i]===h)s[e]=a[i];else{var r=s[e]=null!=i?(a[i].__brushOption=n,a[i]):fh(l,dh(l,n));mh(l,r)}}t=f(t,function(t){return n(i(g_),t,!0)});var o="\0-brush-index-",a=this._covers,s=this._covers=[],l=this,h=this._creatingCover;return new Zo(a,t,function(t,i){return e(t.__brushOption,i)},e).add(r).update(r).remove(function(t){a[t]!==h&&l.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),_h(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},u(hh,Qu);var v_={mousedown:function(t){if(this._dragging)Rh.call(this,t);else if(!t.target||!t.target.draggable){Oh(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=yh(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,r=t._covers,o=yh(t,e,i);if(!t._dragging)for(var a=0;a=0},I_.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Wh(e,t),r=0;r=0||w_(n,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:D_.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){__(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:D_.geo})})}},C_=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,r=t.gridModel;return!r&&i&&(r=i.axis.grid.model),!r&&n&&(r=n.axis.grid.model),r&&r===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],D_={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(wn(t)),e}},A_={lineX:b_(Zh,0),lineY:b_(Zh,1),rect:function(t,e,i){var n=e[S_[t]]([i[0][0],i[1][0]]),r=e[S_[t]]([i[0][1],i[1][1]]),o=[Gh([n[0],r[0]]),Gh([n[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var r=e[S_[t]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r}),xyMinMax:n}}},k_={lineX:b_(Uh,0),lineY:b_(Uh,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},P_=d,L_="\0_ec_hist_store";Dx.extend({type:"dataZoom.select"}),Ax.extend({type:"dataZoom.select"});var O_=zg.toolbox.dataZoom,z_=d,E_="\0_ec_\0toolbox-dataZoom_";Yh.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(O_.title)};var N_=Yh.prototype;N_.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,r){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Hh(qh(t.option),e,{include:["grid"]});i._brushController.setPanels(a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!o&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),$h(t,e)},N_.onclick=function(t,e,i){R_[i].call(this)},N_.remove=function(t,e){this._brushController.unmount()},N_.dispose=function(t,e){this._brushController.dispose()};var R_={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=jh(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return P_(i,function(t,i){for(var r=e.length-1;r>=0;r--)if(t=e[r][i]){n[i]=t;break}}),n}(this.ecModel))}};N_._onBrush=function(t,e){function i(t,e,i){var o,a,s,l=e.getAxis(t),h=l.model,u=(o=t,a=h,r.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(o,a.componentIndex)&&(s=t)}),s),c=u.findRepresentativeAxisProxy(h).getMinMaxSpan();null==c.minValueSpan&&null==c.maxValueSpan||(i=kx(0,i.slice(),l.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),u&&(n[u.id]={dataZoomId:u.id,startValue:i[0],endValue:i[1]})}if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new Hh(qh(this.model.option),r,{include:["grid"]}).matchOutputRanges(t,r,function(t,e,n){if("cartesian2d"===n.type){var r=t.brushType;"rect"===r?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[r],n,e)}}),a=n,s=jh(o=r),P_(a,function(t,e){for(var i=s.length-1;i>=0&&!s[i][e];i--);if(i<0){var n=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(n){var r=n.getPercentRange();s[0][e]={dataZoomId:e,start:r[0],end:r[1]}}}}),s.push(a),this._dispatchZoomAction(n)}var o,a,s},N_._dispatchZoomAction=function(t){var e=[];z_(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},eh("dataZoom",Yh),Lo(function(t){function e(e,n){if(n){var r=e+"Index",o=n[r];null==o||"all"==o||y(o)||(o=!1===o||"none"===o?[]:[o]),a=function(t,n){if(null==o||"all"==o||-1!==l(o,n)){var a={type:"select",$fromToolbox:!0,id:E_+e+n};a[r]=n,i.push(a)}},y(s=t[e])||(s=s?[s]:[]),z_(s,a)}var a,s}if(t){var i=t.dataZoom||(t.dataZoom=[]);y(i)||(t.dataZoom=i=[i]);var n=t.toolbox;if(n&&(y(n)&&(n=n[0]),n&&n.feature)){var r=n.feature.dataZoom;e("xAxis",r),e("yAxis",r)}}});var B_=zg.toolbox.restore;Kh.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:B_.title},Kh.prototype.onclick=function(t,e,i){t[L_]=null,e.dispatchAction({type:"restore",from:this.uid})},eh("restore",Kh),zo({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var V_,F_="urn:schemas-microsoft-com:vml",H_="undefined"==typeof window?null:window,G_=!1,W_=H_&&H_.document;if(W_&&!ku.canvasSupported)try{!W_.namespaces.zrvml&&W_.namespaces.add("zrvml",F_),V_=function(t){return W_.createElement("')}}catch(t){V_=function(t){return W_.createElement("<"+t+' xmlns="'+F_+'" class="zrvml">')}}var Z_=yf.CMD,U_=Math.round,X_=Math.sqrt,j_=Math.abs,Y_=Math.cos,q_=Math.sin,$_=Math.max;if(!ku.canvasSupported){var K_=21600,Q_=K_/2,J_=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=K_+","+K_,t.coordorigin="0,0"},tw=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},ew=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},iw=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},nw=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},rw=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ow=function(t,e,i){var n=bt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=tw(n[0],n[1],n[2]),t.opacity=i*n[3])},aw=function(t,e,i,n){var r,o,a="fill"==e,s=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof rp&&iw(t,s),s||(s=Qh(e)),a?function(t,e,i){var n,r,o=e.fill;if(null!=o)if(o instanceof rp){var a,s=0,l=[0,0],h=0,u=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===o.type){a="gradient";var p=i.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&($(g,g,p),$(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{a="gradientradial",g=[o.x*d,o.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&$(g,g,p),_/=x[0]*K_,w/=x[1]*K_;var b=$_(_,w);h=0/b,u=2*o.r/b-h}var S=o.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],C=0;C=2){var k=I[0][0],P=I[1][0],L=I[0][1]*e.opacity,O=I[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=s,t.color=k,t.color2=P,t.colors=T.join(","),t.opacity=O,t.opacity2=L}"radial"===a&&(t.focusposition=l.join(","))}else ow(t,o,e.opacity)}(s,i,n):(r=s,null!=(o=i).lineDash&&(r.dashstyle=o.lineDash.join(" ")),null==o.stroke||o.stroke instanceof rp||ow(r,o.stroke,o.opacity)),ew(t,s)):(t[a?"filled":"stroked"]="false",iw(t,s))},sw=[[],[],[]];Ni.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=Qh("shape"),J_(i),this._vmlEl=i),aw(i,"fill",e,this),aw(i,"stroke",e,this);var n=this.transform,r=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=X_(j_(s))}o.weight=a+"px"}var l=this.path||(this.path=new yf);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,r,o,a,s,l=Z_.M,h=Z_.C,u=Z_.L,c=Z_.A,d=Z_.Q,f=[],p=t.data,g=t.len();for(o=0;o.01?O&&(z+=.0125):Math.abs(E-D)<1e-4?O&&zC?x-=.0125:x+=.0125:O&&ED?y+=.0125:y-=.0125),f.push(N,U_(((C-A)*M+b)*K_-Q_),",",U_(((D-k)*I+S)*K_-Q_),",",U_(((C+A)*M+b)*K_-Q_),",",U_(((D+k)*I+S)*K_-Q_),",",U_((z*M+b)*K_-Q_),",",U_((E*I+S)*K_-Q_),",",U_((y*M+b)*K_-Q_),",",U_((x*I+S)*K_-Q_)),a=y,s=x;break;case Z_.R:var R=sw[0],B=sw[1];R[0]=p[o++],R[1]=p[o++],B[0]=R[0]+p[o++],B[1]=R[1]+p[o++],e&&($(R,R,e),$(B,B,e)),R[0]=U_(R[0]*K_-Q_),B[0]=U_(B[0]*K_-Q_),R[1]=U_(R[1]*K_-Q_),B[1]=U_(B[1]*K_-Q_),f.push(" m ",R[0],",",R[1]," l ",B[0],",",R[1]," l ",B[0],",",B[1]," l ",R[0],",",B[1]);break;case Z_.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V100&&(uw=0,hw={});var i,n=cw.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},hw[t]=e,uw++}return e};ed.measureText=function(t,e){var i=W_;lw||((lw=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",W_.body.appendChild(lw));try{lw.style.font=e}catch(t){}return lw.innerHTML="",lw.appendChild(i.createTextNode(t)),{width:lw.offsetWidth}};for(var fw=new Gt,pw=[od,Le,Oe,Ni,Gf],gw=0;gw=Iw||!nu(g)&&(d>-Mw&&d<0||d>Mw)==!!p;var y=iu(s+h*Sw(c)),x=iu(l+u*bw(c));m&&(d=p?Iw-1e-4:1e-4-Iw,v=!0,9===r&&e.push("M",y,x));var _=iu(s+h*Sw(c+d)),w=iu(l+u*bw(c+d));e.push("A",iu(h),iu(u),ww(f*Tw),+v,+p,_,w);break;case yw.Z:o="Z";break;case yw.R:_=iu(i[r++]),w=iu(i[r++]);var b=iu(i[r++]),S=iu(i[r++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}o&&e.push(o);for(var M=0;M=r&&h+1>=o){for(var u=[],c=0;c=r&&c+1>=o)return hu(0,s.components);l[i]=s}else l[i]=void 0}var p;a++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,o=i.length,a=t.newPos,s=a-n,l=0;a+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},uu.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},uu.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},uu.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},uu.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},uu.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},uu.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},uu.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},uu.prototype.getSvgProxy=function(t){return t instanceof Ni?Dw:t instanceof Oe?Aw:t instanceof Gf?kw:Dw},uu.prototype.getTextSvgElement=function(t){return t.__textSvgEl},uu.prototype.getSvgElement=function(t){return t.__svgEl},h(cu,uu),cu.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var r,o=e.style[n],a=i.getDefs(!0);o._dom?(r=o._dom,a.contains(o._dom)||i.addDom(r)):r=i.add(o),i.markUsed(e);var s=r.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},cu.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Ic("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},cu.prototype.update=function(t){var e=this;uu.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},cu.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Ic("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,r=i.length;n0){var n,r,o=this.getDefs(!0),a=e[0],s=i?"_textDom":"_dom";a[s]?(r=a[s].getAttribute("id"),n=a[s],o.contains(n)||o.appendChild(n)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(n),a[s]=n);var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!i){var h=Array.prototype.slice.call(a.transform);at(a.transform,a.parent.invTransform,a.transform),l.brush(a),a.transform=h}else l.brush(a);var u=this.getSvgElement(a);n.innerHTML="",n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},du.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&uu.prototype.markUsed.call(e,t._dom),t._textDom&&uu.prototype.markUsed.call(e,t._textDom)})},h(fu,uu),fu.prototype.addWithoutUpdate=function(t,e){if(e&&pu(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var r=i.getAttribute("id");t.style.filter="url(#"+r+")"}},fu.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},fu.prototype.update=function(t,e){var i=e.style;if(pu(i)){var n=this;uu.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},fu.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},fu.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,r,o,a,s=t.style,l=t.scale&&t.scale[0]||1,h=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",r/h),i.setAttribute("flood-color",a);var u=o/2/l+" "+o/2/h;i.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(i),s._shadowDom=e},fu.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&uu.prototype.markUsed.call(this,e._shadowDom)};var zw=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=o({},i||{});var r=eu("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new cu(n,r),this.clipPathManager=new du(n,r),this.shadowManager=new fu(n,r);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=a,t.appendChild(a),a.appendChild(r),this.resize(i.width,i.height),this._visibleList=[]};zw.prototype={constructor:zw,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,r=this._visibleList,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=i.style;r.width=t+"px",r.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||gu(s[i])||gu(a.style[i]))-(gu(s[r])||0)-(gu(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;zw.prototype[t]=(e=t,function(){Ic('In SVG mode painter not support method "'+e+'"')})}),je("svg",zw),t.version="4.0.4",t.dependencies={zrender:"4.0.3"},t.PRIORITY=tm,t.init=function(t,e,i){var n=ko(t);if(n)return n;var r=new go(t,e,i);return r.id="ec_"+vm++,gm[r.id]=r,oi(t,xm,r.id),function(t){function e(t,e){for(var n=0;n