!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),r&&(i.ie=!0,i.version=r[1]),o&&(i.edge=!0,i.version=o[1]),a&&(i.weChat=!0),{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11)}}function i(t,e){Kd[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=Wd.call(t);if("[object Array]"===i){e=[];for(var r=0,o=t.length;o>r;r++)e[r]=n(t[r])}else if(Gd[i]){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(var r=0,o=t.length;o>r;r++)e[r]=n(t[r])}}else if(!Fd[i]&&!z(t)&&!I(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function r(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!S(s)||!S(a)||_(s)||_(a)||I(s)||I(a)||M(s)||M(a)||z(s)||z(a)?!i&&o in t||(t[o]=n(e[o],!0)):r(a,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=r(i,t[n],e);return i}function a(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function s(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function l(){return Qd||(Qd=$d().getContext("2d")),Qd}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;n>i;i++)if(t[i]===e)return i}return-1}function u(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var r in n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function c(t,e,i){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,s(t,e,i)}function d(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,i){if(t&&e)if(t.forEach&&t.forEach===Xd)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;r>n;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function g(t,e,i){if(t&&e){if(t.map&&t.map===Yd)return t.map(e,i);for(var n=[],r=0,o=t.length;o>r;r++)n.push(e.call(i,t[r],r,t));return n}}function p(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===jd)return t.reduce(e,i,n);for(var r=0,o=t.length;o>r;r++)i=e.call(n,i,t[r],r,t);return i}}function v(t,e,i){if(t&&e){if(t.filter&&t.filter===qd)return t.filter(e,i);for(var n=[],r=0,o=t.length;o>r;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e,i){if(t&&e)for(var n=0,r=t.length;r>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=Ud.call(arguments,2);return function(){return t.apply(e,i.concat(Ud.call(arguments)))}}function x(t){var e=Ud.call(arguments,1);return function(){return t.apply(this,e.concat(Ud.call(arguments)))}}function _(t){return"[object Array]"===Wd.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===Wd.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function M(t){return!!Fd[Wd.call(t)]}function I(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function T(t){return t!==t}function A(){for(var t=0,e=arguments.length;e>t;t++)if(null!=arguments[t])return arguments[t]}function C(t,e){return null!=t?t:e}function D(t,e,i){return null!=t?t:null!=e?e:i}function L(){return Function.call.apply(Ud,arguments)}function k(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function P(t,e){if(!t)throw new Error(e)}function O(t){t[Jd]=!0}function z(t){return t[Jd]}function E(t){t&&f(t,function(t,e){this.set(e,t)},this)}function R(t){return new E(t)}function B(){}function V(t,e){var i=new rf(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function N(t,e){return t[0]=e[0],t[1]=e[1],t}function H(t){var e=new rf(2);return e[0]=t[0],e[1]=t[1],e}function F(t,e,i){return t[0]=e,t[1]=i,t}function G(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function W(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function Z(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function X(t){return Math.sqrt(q(t))}function q(t){return t[0]*t[0]+t[1]*t[1]}function U(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function Y(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function j(t,e){return t[0]*e[0]+t[1]*e[1]}function K(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function $(t,e){var i=X(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function Q(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function J(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function te(t,e){return t[0]=-e[0],t[1]=-e[1],t}function ee(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function ie(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function ne(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function re(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function oe(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function ae(t,e){return{target:t,topTarget:e&&e.topTarget}}function se(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which}}function le(){}function he(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return n?df:!0}return!1}function ue(){var t=new pf(6);return ce(t),t}function ce(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function de(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function fe(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function ge(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function pe(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t}function ve(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function me(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}function ye(t){return t>yf||-yf>t}function xe(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1: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 _e(t){return t=Math.round(t),0>t?0:t>255?255:t}function we(t){return t=Math.round(t),0>t?0:t>360?360:t}function be(t){return 0>t?0:t>1?1:t}function Se(t){return _e(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Me(t){return be(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Ie(t,e,i){return 0>i?i+=1:i>1&&(i-=1),1>6*i?t+(e-t)*i*6:1>2*i?e:2>3*i?t+(e-t)*(2/3-i)*6:t}function Te(t,e,i){return t+(e-t)*i}function Ae(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function Ce(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function De(t,e){Lf&&Ce(Lf,e),Lf=Df.put(t,Lf||e.slice())}function Le(t,e){if(t){e=e||[];var i=Df.get(t);if(i)return Ce(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in Cf)return Ce(e,Cf[n]),De(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 Ae(e,0,0,0,1);l=Me(s.pop());case"rgb":return 3!==s.length?void Ae(e,0,0,0,1):(Ae(e,Se(s[0]),Se(s[1]),Se(s[2]),l),De(t,e),e);case"hsla":return 4!==s.length?void Ae(e,0,0,0,1):(s[3]=Me(s[3]),ke(s,e),De(t,e),e);case"hsl":return 3!==s.length?void Ae(e,0,0,0,1):(ke(s,e),De(t,e),e);default:return}}Ae(e,0,0,0,1)}else{if(4===n.length){var h=parseInt(n.substr(1),16);return h>=0&&4095>=h?(Ae(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),De(t,e),e):void Ae(e,0,0,0,1)}if(7===n.length){var h=parseInt(n.substr(1),16);return h>=0&&16777215>=h?(Ae(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),De(t,e),e):void Ae(e,0,0,0,1)}}}}function ke(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Me(t[1]),r=Me(t[2]),o=.5>=r?r*(n+1):r+n-r*n,a=2*r-o;return e=e||[],Ae(e,_e(255*Ie(a,o,i+1/3)),_e(255*Ie(a,o,i)),_e(255*Ie(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Pe(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=.5>h?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),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}function Oe(t,e){var i=Le(t);if(i){for(var n=0;3>n;n++)i[n]=0>e?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return Ne(i,4===i.length?"rgba":"rgb")}}function ze(t){var e=Le(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function Ee(t,e,i){if(e&&e.length&&t>=0&&1>=t){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]=_e(Te(a[0],s[0],l)),i[1]=_e(Te(a[1],s[1],l)),i[2]=_e(Te(a[2],s[2],l)),i[3]=be(Te(a[3],s[3],l)),i}}function Re(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=Le(e[r]),s=Le(e[o]),l=n-r,h=Ne([_e(Te(a[0],s[0],l)),_e(Te(a[1],s[1],l)),_e(Te(a[2],s[2],l)),be(Te(a[3],s[3],l))],"rgba");return i?{color:h,leftIndex:r,rightIndex:o,value:n}:h}}function Be(t,e,i,n){return t=Le(t),t?(t=Pe(t),null!=e&&(t[0]=we(e)),null!=i&&(t[1]=Me(i)),null!=n&&(t[2]=Me(n)),Ne(ke(t),"rgba")):void 0}function Ve(t,e){return t=Le(t),t&&null!=e?(t[3]=be(e),Ne(t,"rgba")):void 0}function Ne(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 He(t,e){return t[e]}function Fe(t,e,i){t[e]=i}function Ge(t,e,i){return(e-t)*i+t}function We(t,e,i){return i>.5?e:t}function Ze(t,e,i,n,r){var o=t.length;if(1==r)for(var a=0;o>a;a++)n[a]=Ge(t[a],e[a],i);else for(var s=o&&t[0].length,a=0;o>a;a++)for(var l=0;s>l;l++)n[a][l]=Ge(t[a][l],e[a][l],i)}function Xe(t,e,i){var n=t.length,r=e.length;if(n!==r){var o=n>r;if(o)t.length=r;else for(var a=n;r>a;a++)t.push(1===i?e[a]:zf.call(e[a]))}for(var s=t[0]&&t[0].length,a=0;al;l++)isNaN(t[a][l])&&(t[a][l]=e[a][l])}function qe(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;n>r;r++)if(t[r]!==e[r])return!1}else for(var o=t[0].length,r=0;n>r;r++)for(var a=0;o>a;a++)if(t[r][a]!==e[r][a])return!1;return!0}function Ue(t,e,i,n,r,o,a,s,l){var h=t.length;if(1==l)for(var u=0;h>u;u++)s[u]=Ye(t[u],e[u],i[u],n[u],r,o,a);else for(var c=t[0].length,u=0;h>u;u++)for(var d=0;c>d;d++)s[u][d]=Ye(t[u][d],e[u][d],i[u][d],n[u][d],r,o,a)}function Ye(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function je(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(zf.call(t[n]));return i}return zf.call(t)}return t}function Ke(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function $e(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function Qe(t,e,i,n,r,o){var a=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=n[0].value,f=d(c),g=!1,p=!1,v=f?$e(n):0;n.sort(function(t,e){return t.time-e.time}),u=n[h-1].time;for(var m=[],y=[],x=n[0].value,_=!0,w=0;h>w;w++){m.push(n[w].time/u);var b=n[w].value;if(f&&qe(b,x,v)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=Le(b);S?(b=S,g=!0):p=!0}y.push(b)}if(o||!_){for(var M=y[h-1],w=0;h-1>w;w++)f?Xe(y[w],M,v):!isNaN(y[w])||isNaN(M)||p||g||(y[w]=M);f&&Xe(a(t._target,r),M,v);var I,T,A,C,D,L,k=0,P=0;if(g)var O=[0,0,0,0];var z=function(t,e){var i;if(0>e)i=0;else if(P>e){for(I=Math.min(k+1,h-1),i=I;i>=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=k;h>i&&!(m[i]>e);i++);i=Math.min(i-1,h-2)}k=i,P=e;var n=m[i+1]-m[i];if(0!==n)if(T=(e-m[i])/n,l)if(C=y[i],A=y[0===i?i:i-1],D=y[i>h-2?h-1:i+1],L=y[i>h-3?h-1:i+2],f)Ue(A,C,D,L,T,T*T,T*T*T,a(t,r),v);else{var o;if(g)o=Ue(A,C,D,L,T,T*T,T*T*T,O,1),o=Ke(O);else{if(p)return We(C,D,T);o=Ye(A,C,D,L,T,T*T,T*T*T)}s(t,r,o)}else if(f)Ze(y[i],y[i+1],T,a(t,r),v);else{var o;if(g)Ze(y[i],y[i+1],T,O,1),o=Ke(O);else{if(p)return We(y[i],y[i+1],T);o=Ge(y[i],y[i+1],T)}s(t,r,o)}},E=new xe({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:z,ondestroy:i});return e&&"spline"!==e&&(E.easing=e),E}}}function Je(t,e,i,n){0>i&&(t+=i,i=-i),0>n&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function ti(t){for(var e=0;t>=Uf;)e|=1&t,t>>=1;return t+e}function ei(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;i>r&&n(t[r],t[r-1])<0;)r++;ii(t,e,r)}else for(;i>r&&n(t[r],t[r-1])>=0;)r++;return r-e}function ii(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function ni(t,e,i,n,r){for(n===e&&n++;i>n;n++){for(var o,a=t[n],s=e,l=n;l>s;)o=s+l>>>1,r(a,t[o])<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 ri(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;s>l&&o(t,e[i+r+l])>0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;s>l&&o(t,e[i+r-l])<=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])>0?a=u+1:l=u}return l}function oi(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;s>l&&o(t,e[i+r-l])<0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=n-r;s>l&&o(t,e[i+r+l])>=0;)a=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;l>a;){var u=a+(l-a>>>1);o(t,e[i+u])<0?l=u:a=u+1}return l}function ai(t,e){function i(t,e){l[c]=t,h[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&h[t-1]<=h[t]+h[t+1]||t>=2&&h[t-2]<=h[t]+h[t-1])h[t-1]h[t+1])break;o(t)}}function r(){for(;c>1;){var t=c-2;t>0&&h[t-1]=r?a(n,r,o,u):s(n,r,o,u)))}function a(i,n,r,o){var a=0;for(a=0;n>a;a++)d[a]=t[i+a];var s=0,l=r,h=i;if(t[h++]=t[l++],0!==--o){if(1===n){for(a=0;o>a;a++)t[h+a]=t[l+a];return void(t[h+o]=d[s])}for(var c,f,g,p=u;;){c=0,f=0,g=!1;do if(e(t[l],d[s])<0){if(t[h++]=t[l++],f++,c=0,0===--o){g=!0;break}}else if(t[h++]=d[s++],c++,f=0,1===--n){g=!0;break}while(p>(c|f));if(g)break;do{if(c=oi(t[l],d,s,n,0,e),0!==c){for(a=0;c>a;a++)t[h+a]=d[s+a];if(h+=c,s+=c,n-=c,1>=n){g=!0;break}}if(t[h++]=t[l++],0===--o){g=!0;break}if(f=ri(d[s],t,l,o,0,e),0!==f){for(a=0;f>a;a++)t[h+a]=t[l+a];if(h+=f,l+=f,o-=f,0===o){g=!0;break}}if(t[h++]=d[s++],1===--n){g=!0;break}p--}while(c>=Yf||f>=Yf);if(g)break;0>p&&(p=0),p+=2}if(u=p,1>u&&(u=1),1===n){for(a=0;o>a;a++)t[h+a]=t[l+a];t[h+o]=d[s]}else{if(0===n)throw new Error;for(a=0;n>a;a++)t[h+a]=d[s+a]}}else for(a=0;n>a;a++)t[h+a]=d[s+a]}function s(i,n,r,o){var a=0;for(a=0;o>a;a++)d[a]=t[r+a];var s=i+n-1,l=o-1,h=r+o-1,c=0,f=0;if(t[h--]=t[s--],0!==--n){if(1===o){for(h-=n,s-=n,f=h+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];return void(t[h]=d[l])}for(var g=u;;){var p=0,v=0,m=!1;do if(e(d[l],t[s])<0){if(t[h--]=t[s--],p++,v=0,0===--n){m=!0;break}}else if(t[h--]=d[l--],v++,p=0,1===--o){m=!0;break}while(g>(p|v));if(m)break;do{if(p=n-oi(d[l],t,i,n,n-1,e),0!==p){for(h-=p,s-=p,n-=p,f=h+1,c=s+1,a=p-1;a>=0;a--)t[f+a]=t[c+a];if(0===n){m=!0;break}}if(t[h--]=d[l--],1===--o){m=!0;break}if(v=o-ri(t[s],d,0,o,o-1,e),0!==v){for(h-=v,l-=v,o-=v,f=h+1,c=l+1,a=0;v>a;a++)t[f+a]=d[c+a];if(1>=o){m=!0;break}}if(t[h--]=t[s--],0===--n){m=!0;break}g--}while(p>=Yf||v>=Yf);if(m)break;0>g&&(g=0),g+=2}if(u=g,1>u&&(u=1),1===o){for(h-=n,s-=n,f=h+1,c=s+1,a=n-1;a>=0;a--)t[f+a]=t[c+a];t[h]=d[l]}else{if(0===o)throw new Error;for(c=h-(o-1),a=0;o>a;a++)t[c+a]=d[a]}}else for(c=h-(o-1),a=0;o>a;a++)t[c+a]=d[a]}var l,h,u=Yf,c=0,d=[];l=[],h=[],this.mergeRuns=n,this.forceMergeRuns=r,this.pushRun=i}function si(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(2>r)){var o=0;if(Uf>r)return o=ei(t,i,n,e),void ni(t,i,n,i+o,e);var a=new ai(t,e),s=ti(r);do{if(o=ei(t,i,n,e),s>o){var l=r;l>s&&(l=s),ni(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 li(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function hi(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;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);var s=t.createLinearGradient(n,o,r,a);return s}function ui(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;e.global||(a=a*n+i.x,s=s*r+i.y,l*=o);var h=t.createRadialGradient(a,s,0,a,s,l);return h}function ci(){return!1}function di(t,e,i){var n=$d(),r=e.getWidth(),o=e.getHeight(),a=n.style;return a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",n.width=r*i,n.height=o*i,n.setAttribute("data-zr-dom-id",t),n}function fi(t){if("string"==typeof t){var e=rg.get(t);return e&&e.image}return t}function gi(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=rg.get(t),a={hostEl:i,cb:n,cbPayload:r};return o?(e=o.image,!vi(e)&&o.pending.push(a)):(!e&&(e=new Image),e.onload=pi,rg.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function pi(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;eo;o++)r=Math.max(Di(n[o],e).width,r);return ag>sg&&(ag=0,og={}),ag++,og[i]=r,r}function yi(t,e,i,n,r,o,a){return o?_i(t,e,i,n,r,o,a):xi(t,e,i,n,r,a)}function xi(t,e,i,n,r,o){var a=Li(t,e,r,o),s=mi(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,h=wi(0,s,i),u=bi(0,l,n),c=new Je(h,u,s,l);return c.lineHeight=a.lineHeight,c}function _i(t,e,i,n,r,o,a){var s=ki(t,{rich:o,truncate:a,font:e,textAlign:i,textPadding:r}),l=s.outerWidth,h=s.outerHeight,u=wi(0,l,i),c=bi(0,h,n);return new Je(u,c,l,h)}function wi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function bi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Si(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 Mi(t,e,i,n,r){if(!e)return"";var o=(t+"").split("\n");r=Ii(e,i,n,r);for(var a=0,s=o.length;s>a;a++)o[a]=Ti(o[a],r);return o.join("\n")}function Ii(t,e,i,n){n=a({},n),n.font=e;var i=C(i,"...");n.maxIterations=C(n.maxIterations,2);var r=n.minChar=C(n.minChar,0);n.cnCharWidth=mi("国",e);var o=n.ascCharWidth=mi("a",e);n.placeholder=C(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;r>l&&s>=o;l++)s-=o;var h=mi(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function Ti(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var o=mi(t,n);if(i>=o)return t;for(var a=0;;a++){if(r>=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?Ai(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;t=t.substr(0,s),o=mi(t,n)}return""===t&&(t=e.placeholder),t}function Ai(t,e,i,n){for(var r=0,o=0,a=t.length;a>o&&e>r;o++){var s=t.charCodeAt(o);r+=s>=0&&127>=s?i:n}return o}function Ci(t){return mi("国",t)}function Di(t,e){return ug.measureText(t,e)}function Li(t,e,i,n){null!=t&&(t+="");var r=Ci(e),o=t?t.split("\n"):[],a=o.length*r,s=a;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",o=[];else if(null!=h)for(var u=Ii(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=o.length;d>c;c++)o[c]=Ti(o[c],u)}return{lines:o,height:a,outerHeight:s,lineHeight:r}}function ki(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=lg.lastIndex=0;null!=(n=lg.exec(t));){var o=n.index;o>r&&Pi(i,t.substring(r,o)),Pi(i,n[2],n[1]),r=lg.lastIndex}rf)return{lines:[],width:0,height:0};x.textWidth=mi(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,h.push(x),M=0;else{if(I){M=x.textWidth;var T=_.textBackgroundColor,A=T&&T.image;A&&(A=fi(A),vi(A)&&(M=Math.max(M,A.width*S/A.height)))}var L=w?w[1]+w[3]:0;M+=L;var k=null!=d?d-m:null;null!=k&&M>k&&(!I||L>k?(x.text="",x.textWidth=M=0):(x.text=Mi(x.text,k-L,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=mi(x.text,b),M=x.textWidth+L))}m+=x.width=M,_&&(v=Math.max(v,x.lineHeight))}p.width=m,p.lineHeight=v,s+=v,l=Math.max(l,m)}i.outerWidth=i.width=C(e.textWidth,l),i.outerHeight=i.height=C(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(var g=0;gl&&(a+=l,l=-l),0>h&&(s+=h,h=-h),"number"==typeof u?i=n=r=o=u:u instanceof Array?1===u.length?i=n=r=o=u[0]:2===u.length?(i=r=u[0],n=o=u[1]):3===u.length?(i=u[0],n=o=u[1],r=u[2]):(i=u[0],n=u[1],r=u[2],o=u[3]):i=n=r=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),r+o>l&&(c=r+o,r*=l/c,o*=l/c),n+r>h&&(c=n+r,n*=h/c,r*=h/c),i+o>h&&(c=i+o,i*=h/c,o*=h/c),t.moveTo(a+i,s),t.lineTo(a+l-n,s),0!==n&&t.quadraticCurveTo(a+l,s,a+l,s+n),t.lineTo(a+l,s+h-r),0!==r&&t.quadraticCurveTo(a+l,s+h,a+l-r,s+h),t.lineTo(a+o,s+h),0!==o&&t.quadraticCurveTo(a,s+h,a,s+h-o),t.lineTo(a,s+i),0!==i&&t.quadraticCurveTo(a,s,a+i,s)}function Ei(t){return Ri(t),f(t.rich,Ri),t}function Ri(t){if(t){t.font=Oi(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||cg[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||dg[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=k(t.textPadding))}}function Bi(t,e,i,n,r){n.rich?Ni(t,e,i,n,r):Vi(t,e,i,n,r)}function Vi(t,e,i,n,r){var o=Ui(e,"font",n.font||hg),a=n.textPadding,s=t.__textCotentBlock;(!s||t.__dirty)&&(s=t.__textCotentBlock=Li(i,o,a,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=qi(l,n,r),d=c.baseX,f=c.baseY,g=c.textAlign,p=c.textVerticalAlign;Fi(e,n,r,d,f);var v=bi(f,l,p),m=d,y=v,x=Wi(n);if(x||a){var _=mi(i,o),w=_;a&&(w+=a[1]+a[3]);var b=wi(d,w,g);x&&Zi(t,e,n,b,v,w,l),a&&(m=$i(d,g,a),y+=a[0])}Ui(e,"textAlign",g||"left"),Ui(e,"textBaseline","middle"),Ui(e,"shadowBlur",n.textShadowBlur||0),Ui(e,"shadowColor",n.textShadowColor||"transparent"),Ui(e,"shadowOffsetX",n.textShadowOffsetX||0),Ui(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var S=n.textStrokeWidth,M=Yi(n.textStroke,S),I=ji(n.textFill);M&&(Ui(e,"lineWidth",S),Ui(e,"strokeStyle",M)),I&&Ui(e,"fillStyle",I);for(var T=0;TT&&(_=b[T],!_.textAlign||"left"===_.textAlign);)Gi(t,e,_,n,M,m,A,"left"),I-=_.width,A+=_.width,T++;for(;D>=0&&(_=b[D],"right"===_.textAlign);)Gi(t,e,_,n,M,m,C,"right"),I-=_.width,C-=_.width,D--;for(A+=(o-(A-v)-(y-C)-I)/2;D>=T;)_=b[T],Gi(t,e,_,n,M,m,A+_.width/2,"center"),A+=_.width,T++;m+=M}}function Fi(t,e,i,n,r){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,r=i.height/2+i.y):o&&(n=o[0]+i.x,r=o[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function Gi(t,e,i,n,r,o,a,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=o+r/2;"top"===h?u=o+i.height/2:"bottom"===h&&(u=o+r-i.height/2),!i.isLineHolder&&Wi(l)&&Zi(t,e,l,"right"===s?a-i.width:"center"===s?a-i.width/2:a,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(a=$i(a,s,c),u-=i.height/2-c[2]-i.textHeight/2),Ui(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),Ui(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Ui(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),Ui(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),Ui(e,"textAlign",s),Ui(e,"textBaseline","middle"),Ui(e,"font",i.font||hg);var d=Yi(l.textStroke||n.textStroke,g),f=ji(l.textFill||n.textFill),g=C(l.textStrokeWidth,n.textStrokeWidth);d&&(Ui(e,"lineWidth",g),Ui(e,"strokeStyle",d),e.strokeText(i.text,a,u)),f&&(Ui(e,"fillStyle",f),e.fillText(i.text,a,u))}function Wi(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Zi(t,e,i,n,r,o,a){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=b(s);if(Ui(e,"shadowBlur",i.textBoxShadowBlur||0),Ui(e,"shadowColor",i.textBoxShadowColor||"transparent"),Ui(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Ui(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?zi(e,{x:n,y:r,width:o,height:a,r:c}):e.rect(n,r,o,a),e.closePath()}if(u)Ui(e,"fillStyle",s),e.fill();else if(S(s)){var d=s.image;d=gi(d,null,t,Xi,s),d&&vi(d)&&e.drawImage(d,n,r,o,a)}l&&h&&(Ui(e,"lineWidth",l),Ui(e,"strokeStyle",h),e.stroke())}function Xi(t,e){e.image=t}function qi(t,e,i){var n=e.x||0,r=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+Ki(s[0],i.width),r=i.y+Ki(s[1],i.height);else{var l=Si(s,i,e.textDistance);n=l.x,r=l.y,o=o||l.textAlign,a=a||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],r+=h[1])}return{baseX:n,baseY:r,textAlign:o,textVerticalAlign:a}}function Ui(t,e,i){return t[e]=i,t[e]}function Yi(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ji(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ki(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function $i(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Qi(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Ji(t){t=t||{},Gf.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new $f(t.style,this),this._rect=null,this.__clipPaths=[]}function tn(t){Ji.call(this,t)}function en(t){return parseInt(t,10)}function nn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function rn(t){t.__unusedCount++}function on(t){1==t.__unusedCount&&t.clear()}function an(t,e,i){return vg.copy(t.getBoundingRect()),t.transform&&vg.applyTransform(t.transform),mg.width=e,mg.height=i,!vg.intersect(mg)}function sn(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0;if(r){var o="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];o&&cn(t,o,e,i)}else cn(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&_g.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function gn(t,e,i){xg?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function pn(t,e,i){xg?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function vn(t){return t.which>1}function mn(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function yn(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function xn(t){return"mousewheel"===t&&Hd.browser.firefox?"DOMMouseScroll":t}function _n(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 wn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function bn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Sn(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}f(Ag,function(e){t._handlers[e]=y(Lg[e],t)}),f(Dg,function(e){t._handlers[e]=y(Lg[e],t)}),f(Tg,function(i){t._handlers[i]=e(Lg[i],t)})}function Mn(t){function e(e,i){f(e,function(e){gn(t,xn(e),i._handlers[e])},i)}cf.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Sg,this._handlers={},Sn(this),Hd.pointerEventsSupported?e(Dg,this):(Hd.touchEventsSupported&&e(Ag,this),e(Tg,this)) }function In(t,e){var i=new Rg(Vd(),t,e);return zg[i.id]=i,i}function Tn(t){if(t)t.dispose();else{for(var e in zg)zg.hasOwnProperty(e)&&zg[e].dispose();zg={}}return this}function An(t){return zg[t]}function Cn(t,e){Og[t]=e}function Dn(t){delete zg[t]}function Ln(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function kn(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){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 Pn(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?Ln(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}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 Rn(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var r=e.indexOf(".");return 0>r?0:e.length-1-r}function Bn(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 Vn(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=g(t,function(t){return(isNaN(t)?0:t)/n*r*100}),a=100*r,s=g(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=g(o,function(t,e){return t-s[e]});a>l;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,f=h.length;f>d;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function Nn(t){var e=2*Math.PI;return(t%e+e)%e}function Hn(t){return t>-Vg&&Vg>t}function Fn(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Hg.exec(t);if(!e)return new Date(0/0);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return new Date(null==t?0/0:Math.round(t))}function Gn(t){return Math.pow(10,Wn(t))}function Wn(t){return Math.floor(Math.log(t)/Math.LN10)}function Zn(t,e){var i,n=Wn(t),r=Math.pow(10,n),o=t/r;return i=e?1.5>o?1:2.5>o?2:4>o?3:7>o?5:10:1>o?1:2>o?2:3>o?3:5>o?5:10,t=i*r,n>=-20?+t.toFixed(0>n?-n:0):t}function Xn(t){function e(t,i,n){return t.interval[n]s;s++)o[s]<=i&&(o[s]=i,a[s]=s?1:1-n),i=o[s],n=a[s];o[0]===o[1]&&a[0]*a[1]!==1?t.splice(r,1):r++}return t}function qn(t){return t-parseFloat(t)>=0}function Un(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Yn(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 Kn(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;ol;l++)for(var h=0;h':""}function Jn(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=Fn(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"]();return t=t.replace("MM",Xg(a)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Xg(s)).replace("d",s).replace("hh",Xg(l)).replace("h",l).replace("mm",Xg(h)).replace("m",h).replace("ss",Xg(u)).replace("s",u)}function tr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function er(t,e,i){return t[$g+e]=i}function ir(t,e){return t[$g+e]}function nr(t,e){return t.hasOwnProperty($g+e)}function rr(t){var e={main:"",sub:""};return t&&(t=t.split(jg),e.main=t[0]||"",e.sub=t[1]||""),e}function or(t){P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function ar(t,e){t.$constructor=t,t.extend=function(t){Rd&&f(e,function(e){t[e]||console.warn("Method `"+e+"` should be implemented"+(t.type?" in "+t.type:"")+".")});var i=this,n=function(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)};return a(n.prototype,t),n.extend=this.extend,n.superCall=sr,n.superApply=lr,u(n,this),n.superClass=i,n}}function sr(t,e){var i=L(arguments,2);return this.superClass.prototype[e].apply(t,i)}function lr(t,e,i){return this.superClass.prototype[e].apply(t,i)}function hr(t,e){function i(t){var e=n[t.main];return e&&e[Kg]||(e=n[t.main]={},e[Kg]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(or(e),e=rr(e),e.sub){if(e.sub!==Kg){var r=i(e);r[e.sub]=t}}else Rd&&n[e.main]&&console.warn(e.main+" exists."),n[e.main]=t;return t},t.getClass=function(t,e,i){var r=n[t];if(r&&r[Kg]&&(r=e?r[e]:null),i&&!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=rr(t);var e=[],i=n[t.main];return i&&i[Kg]?f(i,function(t,i){i!==Kg&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=rr(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=rr(t);var e=n[t.main];return e&&e[Kg]},t.parseClassType=rr,e.registerWhenExtend){var r=t.extend;r&&(t.extend=function(e){var i=r.call(this,e);return t.registerClass(i,e.type)})}return t}function ur(t){return t>-op&&op>t}function cr(t){return t>op||-op>t}function dr(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 fr(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function gr(t,e,i,n,r,o){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,f=0;if(ur(u)&&ur(c))if(ur(s))o[0]=0;else{var g=-l/s;g>=0&&1>=g&&(o[f++]=g)}else{var p=c*c-4*u*d;if(ur(p)){var v=c/u,g=-s/a+v,m=-v/2;g>=0&&1>=g&&(o[f++]=g),m>=0&&1>=m&&(o[f++]=m)}else if(p>0){var y=rp(p),x=u*s+1.5*a*(-c+y),_=u*s+1.5*a*(-c-y);x=0>x?-np(-x,lp):np(x,lp),_=0>_?-np(-_,lp):np(_,lp);var g=(-s-(x+_))/(3*a);g>=0&&1>=g&&(o[f++]=g)}else{var w=(2*u*s-3*a*c)/(2*rp(u*u*u)),b=Math.acos(w)/3,S=rp(u),M=Math.cos(b),g=(-s-2*S*M)/(3*a),m=(-s+S*(M+sp*Math.sin(b)))/(3*a),I=(-s+S*(M-sp*Math.sin(b)))/(3*a);g>=0&&1>=g&&(o[f++]=g),m>=0&&1>=m&&(o[f++]=m),I>=0&&1>=I&&(o[f++]=I)}}return f}function pr(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(ur(a)){if(cr(o)){var h=-s/o;h>=0&&1>=h&&(r[l++]=h)}}else{var u=o*o-4*a*s;if(ur(u))r[0]=-o/(2*a);else if(u>0){var c=rp(u),h=(-o+c)/(2*a),d=(-o-c)/(2*a);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function vr(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 mr(t,e,i,n,r,o,a,s,l,h,u){var c,d,f,g,p,v=.005,m=1/0;hp[0]=l,hp[1]=h;for(var y=0;1>y;y+=.05)up[0]=dr(t,i,r,a,y),up[1]=dr(e,n,o,s,y),g=lf(hp,up),m>g&&(c=y,m=g);m=1/0;for(var x=0;32>x&&!(ap>v);x++)d=c-v,f=c+v,up[0]=dr(t,i,r,a,d),up[1]=dr(e,n,o,s,d),g=lf(up,hp),d>=0&&m>g?(c=d,m=g):(cp[0]=dr(t,i,r,a,f),cp[1]=dr(e,n,o,s,f),p=lf(cp,hp),1>=f&&m>p?(c=f,m=p):v*=.5);return u&&(u[0]=dr(t,i,r,a,c),u[1]=dr(e,n,o,s,c)),rp(m)}function yr(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function xr(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function _r(t,e,i,n,r){var o=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(ur(o)){if(cr(a)){var h=-s/a;h>=0&&1>=h&&(r[l++]=h)}}else{var u=a*a-4*o*s;if(ur(u)){var h=-a/(2*o);h>=0&&1>=h&&(r[l++]=h)}else if(u>0){var c=rp(u),h=(-a+c)/(2*o),d=(-a-c)/(2*o);h>=0&&1>=h&&(r[l++]=h),d>=0&&1>=d&&(r[l++]=d)}}return l}function wr(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function br(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 Sr(t,e,i,n,r,o,a,s,l){var h,u=.005,c=1/0;hp[0]=a,hp[1]=s;for(var d=0;1>d;d+=.05){up[0]=yr(t,i,r,d),up[1]=yr(e,n,o,d);var f=lf(hp,up);c>f&&(h=d,c=f)}c=1/0;for(var g=0;32>g&&!(ap>u);g++){var p=h-u,v=h+u;up[0]=yr(t,i,r,p),up[1]=yr(e,n,o,p);var f=lf(up,hp);if(p>=0&&c>f)h=p,c=f;else{cp[0]=yr(t,i,r,v),cp[1]=yr(e,n,o,v);var m=lf(cp,hp);1>=v&&c>m?(h=v,c=m):u*=.5}}return l&&(l[0]=yr(t,i,r,h),l[1]=yr(e,n,o,h)),rp(c)}function Mr(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;nu;u++){var g=d(t,i,r,a,_p[u]);l[0]=dp(g,l[0]),h[0]=fp(g,h[0])}for(f=c(e,n,o,s,wp),u=0;f>u;u++){var p=d(e,n,o,s,wp[u]);l[1]=dp(p,l[1]),h[1]=fp(p,h[1])}l[0]=dp(t,l[0]),h[0]=fp(t,h[0]),l[0]=dp(a,l[0]),h[0]=fp(a,h[0]),l[1]=dp(e,l[1]),h[1]=fp(e,h[1]),l[1]=dp(s,l[1]),h[1]=fp(s,h[1])}function Ar(t,e,i,n,r,o,a,s){var l=wr,h=yr,u=fp(dp(l(t,i,r),1),0),c=fp(dp(l(e,n,o),1),0),d=h(t,i,r,u),f=h(e,n,o,c);a[0]=dp(t,r,d),a[1]=dp(e,o,f),s[0]=fp(t,r,d),s[1]=fp(e,o,f)}function Cr(t,e,i,n,r,o,a,s,l){var h=ne,u=re,c=Math.abs(r-o);if(1e-4>c%vp&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(mp[0]=pp(r)*i+t,mp[1]=gp(r)*n+e,yp[0]=pp(o)*i+t,yp[1]=gp(o)*n+e,h(s,mp,yp),u(l,mp,yp),r%=vp,0>r&&(r+=vp),o%=vp,0>o&&(o+=vp),r>o&&!a?o+=vp:o>r&&a&&(r+=vp),a){var d=o;o=r,r=d}for(var f=0;o>f;f+=Math.PI/2)f>r&&(xp[0]=pp(f)*i+t,xp[1]=gp(f)*n+e,h(s,xp,s),u(l,xp,l))}function Dr(t,e,i,n,r,o,a){if(0===r)return!1;var s=r,l=0,h=t;if(a>e+s&&a>n+s||e-s>a&&n-s>a||o>t+s&&o>i+s||t-s>o&&i-s>o)return!1;if(t===i)return Math.abs(o-t)<=s/2;l=(e-n)/(t-i),h=(t*n-i*e)/(t-i);var u=l*o-a+h,c=u*u/(l*l+1);return s/2*s/2>=c}function Lr(t,e,i,n,r,o,a,s,l,h,u){if(0===l)return!1;var c=l;if(u>e+c&&u>n+c&&u>o+c&&u>s+c||e-c>u&&n-c>u&&o-c>u&&s-c>u||h>t+c&&h>i+c&&h>r+c&&h>a+c||t-c>h&&i-c>h&&r-c>h&&a-c>h)return!1;var d=mr(t,e,i,n,r,o,a,s,h,u,null);return c/2>=d}function kr(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var h=a;if(l>e+h&&l>n+h&&l>o+h||e-h>l&&n-h>l&&o-h>l||s>t+h&&s>i+h&&s>r+h||t-h>s&&i-h>s&&r-h>s)return!1;var u=Sr(t,e,i,n,r,o,s,l,null);return h/2>=u}function Pr(t){return t%=Ep,0>t&&(t+=Ep),t}function Or(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var h=a;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||i>u+h)return!1;if(Math.abs(n-r)%Rp<1e-4)return!0;if(o){var c=n;n=Pr(r),r=Pr(c)}else n=Pr(n),r=Pr(r);n>r&&(r+=Rp);var d=Math.atan2(l,s);return 0>d&&(d+=Rp),d>=n&&r>=d||d+Rp>=n&&r>=d+Rp}function zr(t,e,i,n,r,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var a=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(a=e>n?.5:-.5);var l=s*(i-t)+t;return l>r?a:0}function Er(t,e){return Math.abs(t-e)e&&h>n&&h>o&&h>s||e>h&&n>h&&o>h&&s>h)return 0;var u=gr(e,n,o,s,h,Hp);if(0===u)return 0;for(var c,d,f=0,g=-1,p=0;u>p;p++){var v=Hp[p],m=0===v||1===v?.5:1,y=dr(t,i,r,a,v);l>y||(0>g&&(g=pr(e,n,o,s,Fp),Fp[1]1&&Rr(),c=dr(e,n,o,s,Fp[0]),g>1&&(d=dr(e,n,o,s,Fp[1]))),f+=2==g?vc?m:-m:vd?m:-m:d>s?m:-m:vc?m:-m:c>s?m:-m)}return f}function Vr(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=_r(e,n,o,s,Hp);if(0===l)return 0;var h=wr(e,n,o);if(h>=0&&1>=h){for(var u=0,c=yr(e,n,o,h),d=0;l>d;d++){var f=0===Hp[d]||1===Hp[d]?.5:1,g=yr(t,i,r,Hp[d]);a>g||(u+=Hp[d]c?f:-f:c>o?f:-f)}return u}var f=0===Hp[0]||1===Hp[0]?.5:1,g=yr(t,i,r,Hp[0]);return a>g?0:e>o?f:-f}function Nr(t,e,i,n,r,o,a,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);Hp[0]=-l,Hp[1]=l;var h=Math.abs(n-r);if(1e-4>h)return 0;if(1e-4>h%Vp){n=0,r=Vp;var u=o?1:-1;return a>=Hp[0]+t&&a<=Hp[1]+t?u:0}if(o){var l=n;n=Pr(r),r=Pr(l)}else n=Pr(n),r=Pr(r);n>r&&(r+=Vp);for(var c=0,d=0;2>d;d++){var f=Hp[d];if(f+t>a){var g=Math.atan2(s,f),u=o?1:-1;0>g&&(g=Vp+g),(g>=n&&r>=g||g+Vp>=n&&r>=g+Vp)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Hr(t,e,i,n,r){for(var o=0,a=0,s=0,l=0,h=0,u=0;u1&&(i||(o+=zr(a,s,l,h,n,r))),1==u&&(a=t[u],s=t[u+1],l=a,h=s),c){case Bp.M:l=t[u++],h=t[u++],a=l,s=h;break;case Bp.L:if(i){if(Dr(a,s,t[u],t[u+1],e,n,r))return!0}else o+=zr(a,s,t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case Bp.C:if(i){if(Lr(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Br(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 Bp.Q:if(i){if(kr(a,s,t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Vr(a,s,t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case Bp.A:var d=t[u++],f=t[u++],g=t[u++],p=t[u++],v=t[u++],m=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(v)*g+d,_=Math.sin(v)*p+f;u>1?o+=zr(a,s,x,_,n,r):(l=x,h=_);var w=(n-d)*p/g+d;if(i){if(Or(d,f,p,v,v+m,y,e,w,r))return!0}else o+=Nr(d,f,p,v,v+m,y,w,r);a=Math.cos(v+m)*g+d,s=Math.sin(v+m)*p+f;break;case Bp.R:l=a=t[u++],h=s=t[u++];var b=t[u++],S=t[u++],x=l+b,_=h+S;if(i){if(Dr(l,h,x,h,e,n,r)||Dr(x,h,x,_,e,n,r)||Dr(x,_,l,_,e,n,r)||Dr(l,_,l,h,e,n,r))return!0}else o+=zr(x,h,x,_,n,r),o+=zr(l,_,l,h,n,r);break;case Bp.Z:if(i){if(Dr(a,s,l,h,e,n,r))return!0}else o+=zr(a,s,l,h,n,r);a=l,s=h}}return i||Er(s,h)||(o+=zr(a,s,l,h,n,r)||0),0!==o}function Fr(t,e,i){return Hr(t,0,!1,e,i)}function Gr(t,e,i,n){return Hr(t,e,!0,i,n)}function Wr(t){Ji.call(this,t),this.path=null}function Zr(t,e,i,n,r,o,a,s,l,h,u){var c=l*(tv/180),d=Jp(c)*(t-i)/2+Qp(c)*(e-n)/2,f=-1*Qp(c)*(t-i)/2+Jp(c)*(e-n)/2,g=d*d/(a*a)+f*f/(s*s);g>1&&(a*=$p(g),s*=$p(g));var p=(r===o?-1:1)*$p((a*a*s*s-a*a*f*f-s*s*d*d)/(a*a*f*f+s*s*d*d))||0,v=p*a*f/s,m=p*-s*d/a,y=(t+i)/2+Jp(c)*v-Qp(c)*m,x=(e+n)/2+Qp(c)*v+Jp(c)*m,_=nv([1,0],[(d-v)/a,(f-m)/s]),w=[(d-v)/a,(f-m)/s],b=[(-1*d-v)/a,(-1*f-m)/s],S=nv(w,b);iv(w,b)<=-1&&(S=tv),iv(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*tv),1===o&&0>S&&(S+=2*tv),u.addData(h,y,x,a,s,_,S,c,o)}function Xr(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 g=0;gr;r++){var o=t[r];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var a=new Wr(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},a}function Kr(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function $r(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var o=cv(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;(i?a:a-1)>s;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=uv(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;c>s;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Qr(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?fr:dr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?fr:dr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?xr:yr)(t.x1,t.cpx1,t.x2,e),(i?xr:yr)(t.y1,t.cpy1,t.y2,e)]}function Jr(t){return Wr.extend(t)}function to(t,e){return Yr(t,e)}function eo(t,e,i,n){var r=Ur(t,e),o=r.getBoundingRect();return i&&("center"===n&&(i=no(i,o)),ro(r,i)),r}function io(t,e,i){var n=new tn({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(no(e,r))}}});return n}function no(t,e){var i,n=e.width/e.height,r=t.height*n;r<=t.width?i=t.height:(r=t.width,i=r/n);var o=t.x+t.width/2,a=t.y+t.height/2;return{x:o-r/2,y:a-i/2,width:r,height:i}}function ro(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function oo(t){var e=t.shape,i=t.style.lineWidth;return Sv(2*e.x1)===Sv(2*e.x2)&&(e.x1=e.x2=so(e.x1,i,!0)),Sv(2*e.y1)===Sv(2*e.y2)&&(e.y1=e.y2=so(e.y1,i,!0)),t}function ao(t){var e=t.shape,i=t.style.lineWidth,n=e.x,r=e.y,o=e.width,a=e.height;return e.x=so(e.x,i,!0),e.y=so(e.y,i,!0),e.width=Math.max(so(n+o,i,!1)-e.x,0===o?0:1),e.height=Math.max(so(r+a,i,!1)-e.y,0===a?0:1),t}function so(t,e,i){var n=Sv(2*t);return(n+Sv(e))%2===0?n/2:(n+(i?1:-1))/2}function lo(t){return null!=t&&"none"!=t}function ho(t){return"string"==typeof t?Oe(t,-.1):t}function uo(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(lo(i)?ho(i):null),n.stroke=n.stroke||(lo(e)?ho(e):null);var r={};for(var o in n)null!=n[o]&&(r[o]=t.style[o]);t.__normalStl=r,t.__hoverStlDirty=!1}}function co(t){if(!t.__isHover){if(uo(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&Lo(e),e.extendFrom(t.__hoverStl),i&&(Do(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function fo(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function go(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&co(t)}):co(t)}function po(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&fo(t)}):fo(t)}function vo(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&uo(t)}function mo(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&go(this)}function yo(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&po(this)}function xo(){this.__isEmphasis=!0,go(this)}function _o(){this.__isEmphasis=!1,po(this)}function wo(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&vo(t,e)}):vo(t,e),t.on("mouseover",mo).on("mouseout",yo),t.on("emphasis",xo).on("normal",_o)}function bo(t,e,i,n,r,o,a){r=r||Tv;var s=r.labelFetcher,l=r.labelDataIndex,h=r.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?C(s?s.getFormattedLabel(l,"normal",null,h):null,r.defaultText):null,f=u?d:null,g=c?C(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;(null!=f||null!=g)&&(So(t,i,o,r),So(e,n,a,r,!0)),t.text=f,e.text=g}function So(t,e,i,n,r){return Io(t,e,n,r),i&&a(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function Mo(t,e,i){var n,r={isRectText:!0};i===!1?n=!0:r.autoColor=i,Io(t,e,r,n),t.host&&t.host.dirty&&t.host.dirty(!1)}function Io(t,e,i,n){if(i=i||Tv,i.isRectText){var r=e.getShallow("position")||(n?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=C(e.getShallow("distance"),n?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,h=To(e);if(h){a={};for(var u in h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Ao(a[u]={},c,l,i,n)}}return t.rich=a,Ao(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function To(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||Tv).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function Ao(t,e,i,n,r,o){if(i=!r&&i||Tv,t.textFill=Co(e.getShallow("color"),n)||i.color,t.textStroke=Co(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=C(e.getShallow("textBorderWidth"),i.textBorderWidth),!r){if(o){var a=t.textPosition;t.insideRollback=Do(t,a,n),t.insideOriginalTextPosition=a,t.insideRollbackOpt=n}null==t.textFill&&(t.textFill=n.autoColor)}t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&n.disableBox||(t.textBackgroundColor=Co(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Co(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Co(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Do(t,e,i){var n,r=i.useInsideStyle;return null==t.textFill&&r!==!1&&(r===!0||i.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=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 Lo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function ko(t,e){var i=e||e.getModel("textStyle");return[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 Po(t,e,i,n,r,o){"function"==typeof r&&(o=r,r=null);var a=n&&n.isAnimationEnabled();if(a){var s=t?"Update":"",l=n.getShallow("animationDuration"+s),h=n.getShallow("animationEasing"+s),u=n.getShallow("animationDelay"+s);"function"==typeof u&&(u=u(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof l&&(l=l(r)),l>0?e.animateTo(i,l,u||0,h,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function Oo(t,e,i,n,r){Po(!0,t,e,i,n,r)}function zo(t,e,i,n,r){Po(!1,t,e,i,n,r)}function Eo(t,e){for(var i=ce([]);t&&t!==e;)fe(i,t.getLocalTransform(),i),t=t.parent;return i}function Ro(t,e,i){return e&&!d(e)&&(e=xf.getLocalTransform(e)),i&&(e=me([],e)),ie([],t,e)}function Bo(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=Ro(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Vo(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function r(t){var e={position:H(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var o=n(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),Oo(t,n,i,t.dataIndex)}}})}}function No(t,e){return g(t,function(t){var i=t[0];i=Mv(i,e.x),i=Iv(i,e.x+e.width);var n=t[1];return n=Mv(n,e.y),n=Iv(n,e.y+e.height),[i,n]})}function Ho(t,e){var i=Mv(t.x,e.x),n=Iv(t.x+t.width,e.x+e.width),r=Mv(t.y,e.y),o=Iv(t.y+t.height,e.y+e.height);return n>=i&&o>=r?{x:i,y:r,width:n-i,height:o-r}:void 0}function Fo(t,e,i){e=a({rectHover:!0},e);var n=e.style={strokeNoScale:!0};return i=i||{x:-1,y:-1,width:2,height:2},t?0===t.indexOf("image://")?(n.image=t.slice(8),s(n,i),new tn(e)):eo(t.replace("path://",""),e,i,"center"):void 0}function Go(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Wo(t,e,i){for(var n=0;nr;r++){var a=e[r];!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}}function Uo(t){return t&&(null==t.value?t:t.value)}function Yo(t){return Ev(t)&&!(t instanceof Array)}function jo(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Fn(t)),null==t||""===t?0/0:+t)}function Ko(t,e){e=(e||[]).slice();var i=g(t||[],function(t){return{exist:t}});return zv(e,function(t,n){if(Ev(t)){for(var r=0;r=i.length&&i.push({option:t})}}),i}function $o(t){var e=R();zv(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),zv(t,function(t){var i=t.option;P(!i||null==i.id||!e.get(i.id)||e.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&e.set(i.id,t),!t.keyInfo&&(t.keyInfo={})}),zv(t,function(t){var i=t.exist,n=t.option,r=t.keyInfo;if(Ev(n)){if(r.name=null!=n.name?n.name+"":i?i.name:"\x00-",i)r.id=i.id;else if(null!=n.id)r.id=n.id+"";else{var o=0;do r.id="\x00"+r.name+"\x00"+o++;while(e.get(r.id))}e.set(r.id,t)}})}function Qo(t){return Ev(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function Jo(t,e){function i(t,e,i){for(var n=0,r=t.length;r>n;n++)for(var o=t[n].seriesId,a=Xo(t[n].dataIndex),s=i&&i[o],l=0,h=a.length;h>l;l++){var u=a[l];s&&s[u]?s[u]=null:(e[o]||(e[o]={}))[u]=1}}function n(t,e){var i=[];for(var r in t)if(t.hasOwnProperty(r)&&null!=t[r])if(e)i.push(+r);else{var o=n(t[r],!0);o.length&&i.push({seriesId:r,dataIndex:o})}return i}var r={},o={};return i(t||[],r),i(e||[],o,r),[n(r),n(o)]}function ta(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?g(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?g(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function ea(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||oa(e,r+"Index")||oa(e,r+"Id")||oa(e,r+"Name")||(e[r+"Index"]=0);var o={};return zv(e,function(n,r){var n=e[r];if("dataIndex"===r||"dataIndexInside"===r)return void(o[r]=n);var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],l=(a[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&h(i.includeMainTypes,s)<0)){var u={mainType:s};("index"!==l||"all"!==n)&&(u[l]=n);var c=t.queryComponents(u);o[s+"Models"]=c,o[s+"Model"]=c[0]}}),o}function ia(t,e){var i=t.dimensions;e=t.getDimension(e);for(var n=0;n=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,r){function o(t){l[t].entryCount--,0===l[t].entryCount&&h.push(t)}function a(t){u[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,h=s.noEntryList,u={};for(f(t,function(t){u[t]=!0});h.length;){var c=h.pop(),d=l[c],g=!!u[c];g&&(n.call(r,c,d.originalDeps.slice()),delete u[c]),f(d.successor,g?a:o)}f(u,function(){throw new Error("Circle dependency may exists")})}}}function ha(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(),g=e.childAt(h+1),p=g&&g.getBoundingRect();if("horizontal"===t){var v=f.width+(p?-p.x+f.x:0);u=o+v,u>n||l.newline?(o=0,u=v,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(p?-p.y+f.y:0);c=a+m,c>r||l.newline?(o+=s+i,a=0,c=m,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 ua(t,e,i){i=Gg(i||0);var n=e.width,r=e.height,o=Pn(t.left,n),a=Pn(t.top,r),s=Pn(t.right,n),l=Pn(t.bottom,r),h=Pn(t.width,n),u=Pn(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 g=new Je(o+i[3],a+i[0],h,u); return g.margin=i,g}function ca(t,e,i,n,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||a){var h;if("raw"===l)h="group"===t.type?new Je(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();h=h.clone(),h.applyTransform(u)}e=ua(s({width:h.width,height:h.height},e),i,n);var c=t.position,d=o?e.x-h.x:0,f=a?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function da(t,e,i){function n(i,n){var a={},l=0,h={},u=0,c=2;if(Fv(i,function(e){h[e]=t[e]}),Fv(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(u!==c&&l){if(l>=c)return a;for(var d=0;d=e:"max"===i?e>=t:t===e}function Da(t,e){return t.join(",")===e.join(",")}function La(t,e){e=e||{},sm(e,function(e,i){if(null!=e){var n=t[i];if(Uv.hasClass(i)){e=Xo(e),n=Xo(n);var r=Ko(n,e);t[i]=hm(r,function(t){return t.option&&t.exist?um(t.exist,t.option,!0):t.exist||t.option})}else t[i]=um(n,e,!0)}})}function ka(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=gm.length;n>i;i++){var o=gm[i],a=e.normal,s=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?r(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?r(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function Pa(t,e){var i=fm(t)&&t[e],n=fm(i)&&i.textStyle;if(n)for(var r=0,o=Rv.length;o>r;r++){var e=Rv[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Oa(t){fm(t)&&(Pa(t,"normal"),Pa(t,"emphasis"))}function za(t){if(fm(t)){ka(t),Oa(t.label),Oa(t.upperLabel),Oa(t.edgeLabel);var e=t.markPoint;ka(e),Oa(e&&e.label);var i=t.markLine;ka(t.markLine),Oa(i&&i.label);var n=t.markArea;Oa(n&&n.label),Pa(t,"axisLabel"),Pa(t,"title"),Pa(t,"detail");var r=t.data;if(r)for(var o=0;o=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 Za(t,e,i,n){var r=t[e];if(r){var o=r[Mm]||r,a=r[Tm],s=r[Im];if(s!==i||a!==n){if(null==i||!n)return t[e]=o;r=t[e]=Wa(o,i,"debounce"===n),r[Mm]=o,r[Tm]=n,r[Im]=i}return r}}function Xa(t,e){var i=t[e];i&&i[Mm]&&(t[e]=i[Mm])}function qa(t){return function(e,i,n){e=e&&e.toLowerCase(),cf.prototype[t].call(this,e,i,n)}}function Ua(){cf.call(this)}function Ya(t,e,i){function r(t,e){return t.prio-e.prio}i=i||{},"string"==typeof e&&(e=ey[e]),this.id,this.group,this._dom=t;var o="canvas";Rd&&(o=("undefined"==typeof window?global:window).__ECHARTS__DEFAULT__RENDERER__||o);var a=this._zr=In(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Wa(y(a.flush,a),17);var e=n(e);e&&xm(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Ma,this._api=us(this),cf.call(this),this._messageCenter=new Ua,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],si(ty,r),si($m,r),a.animation.on("frame",this._onframe,this),O(this)}function ja(t,e,i){var n,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=ea(r,e);for(var a=0;ae.get("hoverLayerThreshold")&&!Hd.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function ls(t,e){var i=0;e.group.traverse(function(t){"group"===t.type||t.ignore||i++});var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!Hd.node;r&&e.group.traverse(function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))});var o=t.get("blendMode")||null;Rd&&!Hd.canvasSupported&&o&&"source-over"!==o&&console.warn("Only canvas support blendMode"),e.group.traverse(function(t){t.isGroup||t.setStyle("blend",o)})}function hs(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 us(t){var e=t._coordSysMgr;return a(new Sa(t),{getCoordinateSystems:y(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function cs(t){function e(t,e){for(var i=0;i=0?new l.constructor(o[s].length):o[s]}return n}function Gs(t,e,i){function r(t,e,i){by[e]?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,h.set(e,!0))}function o(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}e=e||[],i=i||{},t=(t||[]).slice();var a=(i.dimsDef||[]).slice(),s=R(i.encodeDef),l=R(),h=R(),u=[],c=i.dimCount;if(null==c){var d=Ws(e[0]);c=Math.max(_(d)&&d.length||1,t.length,a.length),xy(t,function(t){var e=t.dimsDef;e&&(c=Math.max(c,e.length))})}for(var f=0;c>f;f++){var g=_y(a[f])?{name:a[f]}:a[f]||{},p=g.name,v=u[f]={otherDims:{}};null!=p&&null==l.get(p)&&(v.name=v.tooltipName=p,l.set(p,f)),null!=g.type&&(v.type=g.type)}s.each(function(t,e){t=s.set(e,Xo(t).slice()),xy(t,function(i,n){_y(i)&&(i=l.get(i)),null!=i&&c>i&&(t[n]=i,r(u[i],e,n))})});var m=0;xy(t,function(t){var e,t,i,o;_y(t)?(e=t,t={}):(e=t.name,t=n(t),i=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null);var a=Xo(s.get(e));if(!a.length)for(var l=0;l<(i&&i.length||1);l++){for(;mx;x++){var v=u[x]=u[x]||{},w=v.coordDim;null==w&&(v.coordDim=o(y,h,i.extraFromZero),v.coordDimIndex=0,v.isExtraCoord=!0),null==v.name&&(v.name=o(v.coordDim,l)),null==v.type&&Sy(e,x)&&(v.type="ordinal")}return u}function Ws(t){return _(t)?t:S(t)?t.value:t}function Zs(t){for(var e=0;e=0&&Xs(t)?function(t,e,i,n){return Yo(t)&&(c.hasItemOption=!0),n===u?i:jo(Uo(t),l[n])}:function(t,e,i,n){var r=Uo(t),o=jo(r&&r[n],l[n]);Yo(t)&&(c.hasItemOption=!0);var a=s&&s.categoryAxesModels;return a&&a[e]&&"string"==typeof o&&(f[e]=f[e]||a[e].getCategories(),o=h(f[e],o),0>o&&!isNaN(o)&&(o=+o)),o};return c.hasItemOption=!1,c.initData(t,d,g),c}function Us(t){return"category"!==t&&"time"!==t}function Ys(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function js(t,e){var i,n=[],r=t&&t.dimensions[t.categoryIndex];if(r&&(i=t.categoryAxesModels[r.name]),i){var o=i.getCategories();if(o){var a=e.length;if(_(e[0])&&e[0].length>1){n=[];for(var s=0;a>s;s++)n[s]=o[e[s][t.categoryIndex||0]]}else n=o.slice(0)}}return n}function Ks(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function $s(t,e,i,n){var r={},o=t[1]-t[0],a=r.interval=Zn(o/e,!0);null!=i&&i>a&&(a=r.interval=i),null!=n&&a>n&&(a=r.interval=n);var s=r.intervalPrecision=Qs(a),l=r.niceTickExtent=[Ay(Math.ceil(t[0]/a)*a,s),Ay(Math.floor(t[1]/a)*a,s)];return tl(l,t),r}function Qs(t){return Rn(t)+2}function Js(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function tl(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Js(t,0,e),Js(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function el(t,e,i,n){var r=[];if(!t)return r;var o=1e4;e[0]o)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}function il(t,e){return Wy(t,Gy(e))}function nl(t,e){var i,n,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,h=null!=s,u=t.getExtent();return"ordinal"===o?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(Rd&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),n=[0,0]),n[0]=Pn(n[0],1),n[1]=Pn(n[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==a&&(a="ordinal"===o?i?0:0/0:u[0]-n[0]*r),null==s&&(s="ordinal"===o?i?i-1:0/0:u[1]+n[1]*r),"dataMin"===a?a=u[0]:"function"==typeof a&&(a=a({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==a||!isFinite(a))&&(a=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(T(a)||T(s)),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),0>a&&0>s&&!h&&(s=0)),[a,s]}function rl(t,e){var i=nl(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 ol(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Ty(t.getCategories(),[1/0,-1/0]);case"value":return new Dy;default:return(Ks.getClass(e)||Dy).create(t)}}function al(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function sl(t,e,i,n,r){var o,a=0,s=0,l=(n-r)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(a+1)*h-1}function ll(t,e){var i=t.scale,n=i.getTicksLabels(),r=i.getTicks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),g(n,e)):"function"==typeof e?g(r,function(i,n){return e(hl(t,i),n)},this):n}function hl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function ul(t){return S(t)&&null!=t.value?t.value:t+""}function cl(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 dl(t,e,i,n,r,o,a){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?io(t.slice(8),new Je(e,i,n,r),a?"center":"cover"):0===t.indexOf("path://")?eo(t.slice(7),{},new Je(e,i,n,r),a?"center":"cover"):new nx({shape:{symbolType:t,x:e,y:i,width:n,height:r}}),l.__isEmptyBrush=s,l.setColor=cl,l.setColor(o),l}function fl(t){var e=t.get("data");return qs(e,t,t.ecModel)}function gl(t,e){var i=e;e instanceof Go||(i=new Go(e),c(i,jy));var n=ol(i);return n.setExtent(t[0],t[1]),rl(n,i),n}function pl(t){c(t,jy)}function vl(t,e){var i=t[1]-t[0],n=e,r=i/n/2;t[0]+=r,t[1]-=r}function ml(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=r,l+=o,r=s,o=l,n.push([s/i,l/i])}return n}function bl(t){return t.get("stack")||cx+t.seriesIndex}function Sl(t){return t.dim+t.index}function Ml(t,e){var i=[],n=t.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),a=0;ae&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),h=(s-o)/(l+(l-1)*a),h=Math.max(h,0);var u,c=0;f(n,function(t){t.width||(t.width=h),u=t,c+=t.width*(1+a)}),u&&(c-=u.width*a);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+a)})}),i}function Al(t,e){var i=Il(v(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),n={},r={};e.eachSeriesByType(t,function(t){if("cartesian2d"===t.coordinateSystem.type){var e=t.getData(),o=t.coordinateSystem,a=o.getBaseAxis(),s=bl(t),l=i[Sl(a)][s],h=l.offset,u=l.width,c=o.getOtherAxis(a),d=t.get("barMinHeight")||0,f=a.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],g=[t.coordDimToDataDim("x")[0],t.coordDimToDataDim("y")[0]],p=e.mapArray(g,function(t,e){return o.dataToPoint([t,e])},!0);n[s]=n[s]||[],r[s]=r[s]||[],e.setLayout({offset:h,size:u}),e.each(t.coordDimToDataDim(c.dim)[0],function(t,i){if(!isNaN(t)){n[s][i]||(n[s][i]={p:f,n:f},r[s][i]={p:f,n:f});var o,a,l,g,v=t>=0?"p":"n",m=p[i],y=n[s][i][v],x=r[s][i][v];c.isHorizontal()?(o=y,a=m[1]+h,l=m[0]-x,g=u,r[s][i][v]+=l,Math.abs(l)l?-1:1)*d),n[s][i][v]+=l):(o=m[0]+h,a=y,l=u,g=m[1]-x,r[s][i][v]+=g,Math.abs(g)=g?-1:1)*d),n[s][i][v]+=g),e.setItemLayout(i,{x:o,y:a,width:l,height:g})}},!0)}},this)}function Cl(t){return this._axes[t]}function Dl(t){dx.call(this,t)}function Ll(t,e){return e.type||(e.data?"category":"value")}function kl(t,e){return t.getCoordSysModel()===e}function Pl(t,e){var i=e*Math.PI/180,n=t.plain(),r=n.width,o=n.height,a=r*Math.cos(i)+o*Math.sin(i),s=r*Math.sin(i)+o*Math.cos(i),l=new Je(n.x,n.y,a,s);return l}function Ol(t){var e,i=t.model,n=i.getFormattedLabels(),r=i.getModel("axisLabel"),o=1,a=n.length;a>40&&(o=Math.ceil(a/40));for(var s=0;a>s;s+=o)if(!t.isLabelIgnored(s)){var l=r.getTextRect(n[s]),h=Pl(l,r.get("rotate")||0);e?e.union(h):e=h}return e}function zl(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function El(t,e,i){var n=t[e];if(i.onZero){var r=i.onZeroAxisIndex;if(null!=r){var o=n[r];return void(o&&Rl(o)&&(i.onZero=!1))}for(var a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o&&!Rl(o)){r=+a;break}}null==r&&(i.onZero=!1),i.onZeroAxisIndex=r}}function Rl(t){return"category"===t.type||"time"===t.type||!wx(t)}function Bl(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function Vl(t){return g(Mx,function(e){var i=t.getReferringComponents(e)[0];if(Rd&&!i)throw new Error(e+' "'+A(t.get(e+"Index"),t.get(e+"Id"),0)+'" not found');return i})}function Nl(t){return"cartesian2d"===t.get("coordinateSystem")}function Hl(t,e,i,n,r,o){var a=i.getModel("label.normal"),s=i.getModel("label.emphasis");bo(t,e,a,s,{labelFetcher:r,labelDataIndex:o,defaultText:r.getRawValue(o),isRectText:!0,autoColor:n}),Fl(t),Fl(e)}function Fl(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function Gl(t,e,i){i.style.text=null,Oo(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Wl(t,e,i){i.style.text=null,Oo(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Zl(t,e,i,n,r,o,a,l){var h=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle.normal"),d=n.getModel("itemStyle.emphasis").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(s({fill:h,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var g=a?r.height>0?"bottom":"top":r.width>0?"left":"right";l||Hl(t.style,d,n,h,o,i,g),wo(t,d)}function Xl(t,e){var i=t.get(Cx)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function ql(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function Ul(t,e,i,n){var r,o,a=Nn(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Hn(a-kx/2)?(o=l?"bottom":"top",r="center"):Hn(a-1.5*kx)?(o=l?"top":"bottom",r="center"):(o="middle",r=1.5*kx>a&&a>kx/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}function Yl(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function jl(t,e,i){var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(Kl(o),Kl(h)):$l(o,a)&&(n?(Kl(a),Kl(u)):(Kl(o),Kl(h))),r===!1?(Kl(s),Kl(c)):$l(l,s)&&(r?(Kl(l),Kl(d)):(Kl(s),Kl(c)))}function Kl(t){t&&(t.ignore=!0)}function $l(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var r=ce([]);return pe(r,r,-t.rotation),i.applyTransform(fe([],r,t.getLocalTransform())),n.applyTransform(fe([],r,e.getLocalTransform())),i.intersect(n)}}function Ql(t){return"middle"===t||"center"===t}function Jl(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),a=r.get("length"),l=Rx(r,i.labelInterval),h=n.getTicksCoords(r.get("alignWithLabel")),u=n.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],g=[],p=t._transform,v=[],m=h.length,y=0;m>y;y++)if(!Ex(n,y,l,m,c,d)){var x=h[y];f[0]=x,f[1]=0,g[0]=x,g[1]=i.tickDirection*a,p&&(ie(f,f,p),ie(g,g,p));var _=new pv(oo({anid:"tick_"+u[y],shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:s(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(_),v.push(_)}return v}}function th(t,e,i){var n=e.axis,r=A(i.axisLabelShow,e.get("axisLabel.show"));if(r&&!n.scale.isBlank()){var o=e.getModel("axisLabel"),a=o.get("margin"),s=n.scale.getTicks(),l=e.getFormattedLabels(),h=(A(i.labelRotate,o.get("rotate"))||0)*kx/180,u=zx(i.rotation,h,i.labelDirection),c=e.get("data"),d=[],g=Yl(e),p=e.get("triggerEvent"),v=e.get("axisLabel.showMinLabel"),m=e.get("axisLabel.showMaxLabel");return f(s,function(r,h){if(!Ex(n,h,i.labelInterval,s.length,v,m)){var f=o;c&&c[r]&&c[r].textStyle&&(f=new Go(c[r].textStyle,o,e.ecModel));var y=f.getTextColor()||e.get("axisLine.lineStyle.color"),x=n.dataToCoord(r),_=[x,i.labelOffset+i.labelDirection*a],w=n.scale.getLabel(r),b=new rv({anid:"label_"+r,position:_,rotation:u.rotation,silent:g,z2:10});So(b.style,f,{text:l[h],textAlign:f.getShallow("align",!0)||u.textAlign,textVerticalAlign:f.getShallow("verticalAlign",!0)||f.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof y?y("category"===n.type?w:"value"===n.type?r+"":r,h):y}),p&&(b.eventData=ql(e),b.eventData.targetType="axisLabel",b.eventData.value=w),t._dumbGroup.add(b),b.updateTransform(),d.push(b),t.group.add(b),b.decomposeTransform()}}),d}}function eh(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return ih(i,t,e),i.seriesInvolved&&rh(i,t),i}function ih(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];Bx(i.getCoordinateSystems(),function(i){function s(n,s,l){var u=l.model.getModel("axisPointer",r),d=u.get("show");if(d&&("auto"!==d||n||uh(u))){null==s&&(s=u.get("triggerTooltip")),u=n?nh(l,c,r,e,n,s):u;var f=u.get("snap"),g=ch(l.model),p=s||f||"category"===l.type,v=t.axesInfo[g]={key:g,axis:l,coordSys:i,axisPointerModel:u,triggerTooltip:s,involveSeries:p,snap:f,useHandle:uh(u),seriesModels:[]};h[g]=v,t.seriesInvolved|=p;var m=oh(o,l);if(null!=m){var y=a[m]||(a[m]={axesInfo:{}});y.axesInfo[g]=v,y.mapper=o[m].mapper,v.linkGroup=y}}}if(i.axisPointerEnabled){var l=ch(i.model),h=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=i;var u=i.model,c=u.getModel("tooltip",n);if(Bx(i.getAxes(),Vx(s,!1,null)),i.getTooltipAxes&&n&&c.get("show")){var d="axis"===c.get("trigger"),f="cross"===c.get("axisPointer.type"),g=i.getTooltipAxes(c.get("axisPointer.axis"));(d||f)&&Bx(g.baseAxes,Vx(s,f?"cross":!0,d)),f&&Bx(g.otherAxes,Vx(s,"cross",!1))}}})}function nh(t,e,i,r,o,a){var l=e.getModel("axisPointer"),h={};Bx(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){h[t]=n(l.get(t))}),h.snap="category"!==t.type&&!!a,"cross"===l.get("type")&&(h.type="line");var u=h.label||(h.label={});if(null==u.show&&(u.show=!1),"cross"===o&&(u.show=!0,!a)){var c=h.lineStyle=l.get("crossStyle");c&&s(u,c.textStyle)}return t.model.getModel("axisPointer",new Go(h,i,r))}function rh(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&n!==!1&&"item"!==n&&r!==!1&&e.get("axisPointer.show",!0)!==!1&&Bx(t.coordSysAxesInfo[ch(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count()) })},this)}function oh(t,e){for(var i=e.model,n=e.dim,r=0;r=0||t===e}function sh(t){var e=lh(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=uh(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]),a=0?1:-1}function Sh(t,e,i){for(var n,r=t.getBaseAxis(),o=t.getOtherAxis(r),a=r.onZero?0:o.scale.getExtent()[0],s=o.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&bh(h.get(s,i))===bh(u);){n=h;break}var c=[];return c[l]=e.get(r.dim,i),c[1-l]=n?n.get(s,i,!0):a,t.dataToPoint(c)}function Mh(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}function Ih(t){return isNaN(t[0])||isNaN(t[1])}function Th(t,e,i,n,r,o,a,s,l,h,u){for(var c=0,d=i,f=0;n>f;f++){var g=e[d];if(d>=r||0>d)break;if(Ih(g)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](g[0],g[1]),i_(r_,g);else if(l>0){var p=d+o,v=e[p];if(u)for(;v&&Ih(e[p]);)p+=o,v=e[p];var m=.5,y=e[c],v=e[p];if(!v||Ih(v))i_(o_,g);else{Ih(v)&&!u&&(v=g),Z(n_,v,y);var x,_;if("x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(g[w]-y[w]),_=Math.abs(g[w]-v[w])}else x=sf(g,y),_=sf(g,v);m=_/(_+x),e_(o_,g,n_,-l*(1-m))}Jx(r_,r_,s),t_(r_,r_,a),Jx(o_,o_,s),t_(o_,o_,a),t.bezierCurveTo(r_[0],r_[1],o_[0],o_[1],g[0],g[1]),e_(r_,g,n_,l*m)}else t.lineTo(g[0],g[1]);c=d,d+=o}return f}function Ah(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 Ch(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 kh(t){return t>=0?1:-1}function Ph(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),r=0;if(!i.onZero){var o=n.scale.getExtent();o[0]>0?r=o[0]:o[1]<0&&(r=o[1])}var a=n.dim,s="x"===a||"radius"===a?1:0;return e.mapArray([a],function(n,o){for(var l,h=e.stackedOn;h&&kh(h.get(a,o))===kh(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,o),u[1-s]=l?l.get(a,o,!0):r,t.dataToPoint(u)},!0)}function Oh(t,e,i){var n=Lh(t.getAxis("x")),r=Lh(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.normal.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 gv({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,zo(d,{shape:{width:l,height:h}},i)),d}function zh(t,e,i){var n=t.getAngleAxis(),r=t.getRadiusAxis(),o=r.getExtent(),a=n.getExtent(),s=Math.PI/180,l=new lv({shape:{cx:t.cx,cy:t.cy,r0:o[0],r:o[1],startAngle:-a[0]*s,endAngle:-a[1]*s,clockwise:n.inverse}});return e&&(l.shape.endAngle=-a[0]*s,zo(l,{shape:{endAngle:-a[1]*s}},i)),l}function Eh(t,e,i){return"polar"===t.type?zh(t,e,i):Oh(t,e,i)}function Rh(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a=0;r--)if(i[r].dimension<2){n=i[r];break}if(!n||"cartesian2d"!==e.type)return void(Rd&&console.warn("Visual map on line style only support x or y dimension."));var o=n.dimension,a=t.dimensions[o],s=e.getAxis(a),l=g(n.stops,function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=10,d=l[0].coord-c,p=l[h-1].coord+c,v=p-d;if(.001>v)return"transparent";f(l,function(t){t.offset=(t.coord-d)/v}),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var m=new wv(0,0,0,0,l,!0);return m[a]=d,m[a+"2"]=p,m}}function Vh(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){Nh(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,i)})}function Nh(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 Hh(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}qf.call(this);var r=new lv({z2:2}),o=new fv,a=new rv;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 Fh(t,e,i,n,r,o,a){function s(e,i,n){for(var r=e;i>r;r++)if(t[r].y+=n,r>e&&i>r+1&&t[r+1].y>t[r].y+t[r].height)return void l(r,n/2);l(i-1,n/2)}function l(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 h(t,e,i,n,r,o){for(var a=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=r+u>h?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&a>=d&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var u,c=0,d=t.length,f=[],g=[],p=0;d>p;p++)u=t[p].y-c,0>u&&s(p,d,-u,r),c=t[p].y+t[p].height;0>a-c&&l(d-1,c-a);for(var p=0;d>p;p++)t[p].y>=i?g.push(t[p]):f.push(t[p]);h(f,!1,e,i,n,r),h(g,!0,e,i,n,r)}function Gh(t,e,i,n,r,o){for(var a=[],s=[],l=0;l=f&&((a>f||d>=0&&0>s)&&(a=f,s=d,r=l,o.length=0),P_(h,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}function jh(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Kh(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=ch(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 $h(t,e,i){var n=i.axesInfo=[];P_(e,function(e,i){var r=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}function Qh(t,e,i,n){if(iu(e)||!t.list.length)return void n({type:"hideTip"});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})}function Jh(t,e,i){var n=i.getZr(),r="axisPointerLastHighlights",o=z_(n)[r]||{},a=z_(n)[r]={};P_(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&P_(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];f(o,function(t,e){!a[e]&&l.push(t)}),f(a,function(t,e){!o[e]&&s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function tu(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}}function eu(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 iu(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function nu(t,e,i){if(!Hd.node){var n=e.getZr();R_(n).records||(R_(n).records={}),ru(n,e);var r=R_(n).records[t]||(R_(n).records[t]={});r.handler=i}}function ru(t,e){function i(i,n){t.on(i,function(i){var r=lu(e);B_(R_(t).records,function(t){t&&n(t,i,r.dispatchAction)}),ou(r.pendings,e)})}R_(t).initialized||(R_(t).initialized=!0,i("click",x(su,"click")),i("mousemove",x(su,"mousemove")),i("globalout",au))}function ou(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function au(t,e,i){t.handler("leave",null,i)}function su(t,e,i,n){e.handler(t,i,n)}function lu(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function hu(t,e){if(!Hd.node){var i=e.getZr(),n=(R_(i).records||{})[t];n&&(R_(i).records[t]=null)}}function uu(){}function cu(t,e,i,n){du(N_(i).lastProp,n)||(N_(i).lastProp=n,e?Oo(i,n,t):(i.stopAnimation(),i.attr(n)))}function du(t,e){if(S(t)&&S(e)){var i=!0;return f(e,function(e,n){i=i&&du(t[n],e)}),!!i}return t===e}function fu(t,e){t[e.get("label.show")?"show":"hide"]()}function gu(t){return{position:t.position.slice(),rotation:t.rotation||0}}function pu(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 vu(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle(),e.fill=null):"shadow"===i&&(e=n.getAreaStyle(),e.stroke=null),e}function mu(t,e,i,n,r){var o=i.get("value"),a=xu(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=Gg(s.get("padding")||0),h=s.getFont(),u=yi(a,h),c=r.position,d=u.width+l[1]+l[3],f=u.height+l[0]+l[2],g=r.align;"right"===g&&(c[0]-=d),"center"===g&&(c[0]-=d/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=f),"middle"===p&&(c[1]-=f/2),yu(c,d,f,n);var v=s.get("backgroundColor");v&&"auto"!==v||(v=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:a,textFont:h,textFill:s.getTextColor(),textPosition:"inside",fill:v,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function yu(t,e,i,n){var r=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function xu(t,e,i,n,r){var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:hl(e,t),seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),b(a)?o=a.replace("{value}",o):w(a)&&(o=a(s))}return o}function _u(t,e,i){var n=ue();return pe(n,n,i.rotation),ge(n,n,i.position),Ro([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function wu(t,e,i,n,r,o){var a=Px.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),mu(e,n,r,o,{position:_u(n.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function bu(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Su(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Mu(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Iu(t){return"x"===t.dim?0:1}function Tu(t){return t.isHorizontal()?0:1}function Au(t,e){var i=t.getRect();return[i[Z_[e]],i[Z_[e]]+i[X_[e]]]}function Cu(){function t(e,n){if(n>=i.length)return e;for(var r=-1,o=e.length,a=i[n++],s={},l={};++r=i.length)return t;var o=[],a=n[r++];return f(t,function(t,i){o.push({key:i,values:e(t,r)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}var i=[],n=[];return{key:function(t){return i.push(t),this},sortKeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}function Du(t,e,i){var n=new gv({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return zo(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Lu(t,e,i){if(t.count())for(var n,r=e.coordinateSystem,o=e.getLayerSeries(),a=g(o,function(e){return g(e.indices,function(e){var i=r.dataToPoint(t.get("time",e));return i[1]=t.get("value",e),i})}),s=ku(a),l=s.y0,h=i/s.max,u=o.length,c=o[0].indices.length,d=0;c>d;++d){n=l[d]*h,t.setItemLayout(o[0].indices[d],{layerIndex:0,x:a[0][d][0],y0:n,y:a[0][d][1]*h});for(var f=1;u>f;++f)n+=a[f-1][d][1]*h,t.setItemLayout(o[f].indices[d],{layerIndex:f,x:a[f][d][0],y0:n,y:a[f][d][1]*h})}}function ku(t){for(var e,i=t.length,n=t[0].length,r=[],o=[],a=0,s={},l=0;n>l;++l){for(var h=0,e=0;i>h;++h)e+=t[h][l][1];e>a&&(a=e),r.push(e)}for(var u=0;n>u;++u)o[u]=(a-r[u])/2;a=0;for(var c=0;n>c;++c){var d=r[c]+o[c];d>a&&(a=d)}return s.y0=o,s.max=a,s}function Pu(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));var a=i.getData();f(a,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r[e]=r.hasOwnProperty(e)?r[e]&&n:n}})}),{name:e.name,selected:r}}function Ou(t,e){var i=Gg(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new gv({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});return t}function zu(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Eu(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 Ru(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 Bu(t,e,i){var n=t.getOrient(),r=[1,1];r[n.index]=0,da(e,i,{type:"box",ignoreSize:r})}function Vu(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return g(cw,function(t){return t+"transition:"+i}).join(";")}function Nu(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),hw(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function Hu(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),r=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(Vu(i)),n&&(Hd.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ze(n)),e.push("filter:alpha(opacity=70)"))),hw(["width","color","radius"],function(i){var n="border-"+i,r=uw(n),o=t.get(r);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(Nu(r)),null!=o&&e.push("padding:"+Gg(o).join("px ")+"px"),e.join(";")+";"}function Fu(t,e){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;fn(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function Gu(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof Go&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Go(i,e,e.ecModel))}return e}function Wu(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function Zu(t,e,i,n,r,o,a){var s=qu(i),l=s.width,h=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=a&&(e+h+a>r?e-=h+a:e+=a),[t,e]}function Xu(t,e,i,n,r){var o=qu(i),a=o.width,s=o.height;return t=Math.min(t+a,n)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function qu(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 Uu(t,e,i){var n=i[0],r=i[1],o=5,a=0,s=0,l=e.width,h=e.height;switch(t){case"inside":a=e.x+l/2-n/2,s=e.y+h/2-r/2;break;case"top":a=e.x+l/2-n/2,s=e.y-r-o;break;case"bottom":a=e.x+l/2-n/2,s=e.y+h+o;break;case"left":a=e.x-n-o,s=e.y+h/2-r/2;break;case"right":a=e.x+l+o,s=e.y+h/2-r/2}return[a,s]}function Yu(t){return"center"===t||"middle"===t}function ju(t){qo(t.label,["show"])}function Ku(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function $u(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function Qu(t,e,i){var n=-1;do n=Math.max(En(t.get(e,i)),n),t=t.stackedOn;while(t);return n}function Ju(t,e,i,n,r,o){var a=[],s=rc(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];a[r]=e.get(i,l,!0),a[o]=e.get(n,l,!0);var h=Qu(e,n,l);return h=Math.min(h,20),h>=0&&(a[o]=+a[o].toFixed(h)),a}function tc(t,e){var i=t.getData(),r=t.coordinateSystem;if(e&&!$u(e)&&!_(e.coord)&&r){var o=r.dimensions,a=ec(e,i,r,t);if(e=n(e),e.type&&bw[e.type]&&a.baseAxis&&a.valueAxis){var s=_w(o,a.baseAxis.dim),l=_w(o,a.valueAxis.dim);e.coord=bw[e.type](i,a.baseDataDim,a.valueDataDim,s,l),e.value=e.coord[l]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;2>u;u++)if(bw[h[u]]){var c=t.coordDimToDataDim(o[u])[0];h[u]=rc(i,c,h[u])}e.coord=h}}return e}function ec(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(n.dataDimToCoordDim(r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0]):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=n.coordDimToDataDim(r.baseAxis.dim)[0],r.valueDataDim=n.coordDimToDataDim(r.valueAxis.dim)[0]),r}function ic(t,e){return t&&t.containData&&e.coord&&!Ku(e)?t.containData(e.coord):!0}function nc(t,e,i,n){return 2>n?t.coord&&t.coord[n]:t.value}function rc(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t){isNaN(t)||(n+=t,r++)},!0),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]}function oc(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),s=Pn(a.get("x"),i.getWidth()),l=Pn(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var h=t.get(n.dimensions[0],r),u=t.get(n.dimensions[1],r);o=n.dataToPoint([h,u])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)})}function ac(t,e,i){var n;n=t?g(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new vy(n,i),o=g(i.get("data"),x(tc,e));return t&&(o=v(o,x(ic,t))),r.initData(o,null,t?nc:function(t){return t.value}),r}function sc(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function lc(t){return"_"+t+"Type"}function hc(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){_(o)||(o=[o,o]);var a=dl(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function uc(t){var e=new Tw({name:"line"});return cc(e.shape,t),e}function cc(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=0/0,t.cpy1=0/0)}function dc(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var r=1,o=this.parent;o;)o.scale&&(r/=o.scale[0]),o=o.parent;var a=t.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),h=a.pointAt(s),u=Z([],h,l);if($(u,u),e){e.attr("position",l);var c=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[r*s,r*s])}if(i){i.attr("position",h);var c=a.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[r*s,r*s])}if(!n.ignore){n.attr("position",h);var d,f,g,p=5*r;if("end"===n.__position)d=[u[0]*p+h[0],u[1]*p+h[1]],f=u[0]>.8?"left":u[0]<-.8?"right":"center",g=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var v=s/2,c=a.tangentAt(v),m=[c[1],-c[0]],y=a.pointAt(v);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),d=[y[0]+m[0]*p,y[1]+m[1]*p],f="center",g="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",g=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||g,textAlign:n.__textAlign||f},position:d,scale:[r,r]})}}}}function fc(t,e,i){qf.call(this),this._createLine(t,e,i)}function gc(t){return isNaN(t[0])||isNaN(t[1])}function pc(t){return!gc(t[0])&&!gc(t[1])}function vc(t){this._ctor=t||fc,this.group=new qf}function mc(t){return!isNaN(t)&&!isFinite(t)}function yc(t,e,i,n){var r=1-t,o=n.dimensions[t];return mc(e[r])&&mc(i[r])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function xc(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(yc(1,i,n,t)||yc(0,i,n,t)))return!0}return ic(t,e[0])&&ic(t,e[1])}function _c(t,e,i,n,r){var o,a=n.coordinateSystem,s=t.getItemModel(e),l=Pn(s.get("x"),r.getWidth()),h=Pn(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);o=a.dataToPoint([c,d])}if("cartesian2d"===a.type){var f=a.getAxis("x"),g=a.getAxis("y"),u=a.dimensions;mc(t.get(u[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):mc(t.get(u[1],e))&&(o[1]=g.toGlobalCoord(g.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];t.setItemLayout(e,o)}function wc(t,e,i){var n;n=t?g(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i}):[{name:"value",type:"float"}];var r=new vy(n,i),o=new vy(n,i),a=new vy([],i),s=g(i.get("data"),x(Lw,e,t,i));t&&(s=v(s,x(xc,t)));var l=t?nc:function(t){return t.value};return r.initData(g(s,function(t){return t[0]}),null,l),o.initData(g(s,function(t){return t[1]}),null,l),a.initData(g(s,function(t){return t[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}function bc(t){return h(Pw,t)>=0}function Sc(t,e){t=t.slice();var i=g(t,tr);e=(e||[]).slice();var n=g(e,tr);return function(r,o){f(t,function(t,a){for(var s={name:t,capital:i[a]},l=0;l=0}function r(t,n){var r=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}function o(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function a(t){!n(t,s)&&r(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(a);while(l);return s}}function Ic(t,e,i){var n=[1/0,-1/0];return zw(i,function(t){var i=t.getData();i&&zw(t.coordDimToDataDim(e),function(t){var e=i.getDataExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var a=i.getMax(!0);return null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Ac(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=Bn(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 Cc(t){var e=t._minMaxSpan={},i=t._dataZoomModel;zw(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var r=i.get(n+"ValueSpan");if(null!=r&&(e[n+"ValueSpan"]=r,r=t.getAxisModel().axis.scale.parse(r),null!=r)){var o=t._dataExtent;e[n+"Span"]=kn(o[0]+r,o,[0,100],!0)}})}function Dc(t){var e={};return Bw(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Lc(t,e){var i=t._rangePropMode,n=t.get("rangeMode");Bw([["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 kc(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:0>i?1:e?-1:1}}function Pc(t,e){return Math.min(e[1],Math.max(e[0],t))}function Oc(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function zc(t){return"vertical"===t?"ns-resize":"ew-resize"}function Ec(t,e){return!!Rc(t)[e]}function Rc(t){return t[eb]||(t[eb]={})}function Bc(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(Vc,this),r=e(Nc,this),o=e(Hc,this),a=e(Fc,this),l=e(Gc,this);cf.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=s(n(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Vc(t){if(!(vn(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 Nc(t){if(!vn(t)&&Zc(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!Ec(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&&wg(t.event),this.trigger("pan",o,a,n,r,e,i)}}function Hc(t){vn(t)||(this._dragging=!1)}function Fc(t){if(Zc(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;Wc.call(this,t,e,t.offsetX,t.offsetY)}}function Gc(t){if(!Ec(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Wc.call(this,t,e,t.pinchX,t.pinchY)}}function Wc(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(wg(t.event),this.trigger("zoom",e,i,n))}function Zc(t,e,i){var n=t._opt[e];return n&&(!b(n)||i.event[n+"Key"])}function Xc(t,e){var i=jc(t),n=e.dataZoomId,r=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&h(e.allCoordIds,r)<0&&(delete i[n],t.count--)}),$c(i);var o=i[r];o||(o=i[r]={coordId:r,dataZoomInfos:{},count:0},o.controller=Kc(t,o),o.dispatchAction=x(ed,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var a=id(o.dataZoomInfos);o.controller.enable(a.controlType,a.opt),o.controller.setPointerChecker(e.containsPoint),Za(o,"dispatchAction",e.throttleRate,"fixRate") }function qc(t,e){var i=jc(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),$c(i)}function Uc(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;n>i;i++)if(t.batch[i].dataZoomId===e)return!1;return!0}function Yc(t){return t.type+"\x00_"+t.id}function jc(t){var e=t.getZr();return e[nb]||(e[nb]={})}function Kc(t,e){var i=new Bc(t.getZr());return i.on("pan",ib(Qc,e)),i.on("zoom",ib(Jc,e)),i}function $c(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Qc(t,e,i,n,r,o,a){td(t,function(s){return s.panGetRange(t.controller,e,i,n,r,o,a)})}function Jc(t,e,i,n){td(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function td(t,e){var i=[];f(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 ed(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function id(t){var e,i={},n={"true":2,move:1,"false":0,undefined:-1};return f(t,function(t){var r=t.disabled?!1:t.zoomLock?"move":!0;n[r]>n[e]&&(e=r),a(i,t.roamControllerOpt)}),{controlType:e,opt:i}}function nd(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function rd(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}function od(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function ad(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function sd(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(hb(e,function(t,e){n[t]=e}),!_(i)){var r=[];S(i)?hb(i,function(t,e){var i=n[e];r[null!=i?i:cb]=t}):r[cb]=i,i=vd(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function ld(t,e){var i=t.visual,n=[];S(i)?hb(i,function(t){n.push(t)}):null!=i&&n.push(i);var r={color:1,symbol:1};e||1!==n.length||r.hasOwnProperty(t.type)||(n[1]=n[0]),vd(t,n)}function hd(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:gd([0,1])}}function ud(t){var e=this.option.visual;return e[Math.round(kn(t,[0,1],[0,e.length-1],!0))]||{}}function cd(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function dd(t){var e=this.option.visual;return e[this.option.loop&&t!==cb?t%e.length:t]}function fd(){return this.option.visual[0]}function gd(t){return{linear:function(e){return kn(e,t,this.option.visual,!0)},category:dd,piecewise:function(e,i){var n=pd.call(this,i);return null==n&&(n=kn(e,t,this.option.visual,!0)),n},fixed:fd}}function pd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=db.findPieceIndex(t,i),r=i[n];if(r&&r.visual)return r.visual[this.type]}}function vd(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=g(e,function(t){return Le(t)})),e}function md(t,e,i){return t?i>=e:i>e}function yd(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function xd(t,e,i){function r(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return pb(e,function(e){var a=o[e]=r();pb(t[e],function(t,r){if(db.isValidType(r)){var o={type:r,visual:t};i&&i(o,e),a[r]=new db(o),"opacity"===r&&(o=n(o),o.type="colorAlpha",a.__hidden.__alphaForOpacity=new db(o))}})}),o}function _d(t,e,i){var r;f(i,function(t){e.hasOwnProperty(t)&&yd(e[t])&&(r=!0)}),r&&f(i,function(i){e.hasOwnProperty(i)&&yd(e[i])?t[i]=n(e[i]):delete t[i]})}function wd(t,e,i,n,r,o){function a(t){return i.getItemVisual(u,t)}function s(t,e){i.setItemVisual(u,t,e)}function l(t,l){u=null==o?t:l;var c=i.getRawDataItem(u);if(!c||c.visualMap!==!1)for(var d=n.call(r,t),f=e[d],g=h[d],p=0,v=g.length;v>p;p++){var m=g[p];f[m]&&f[m].applyVisual(t,a,s)}}var h={};f(t,function(t){var i=db.prepareVisualTypes(e[t]);h[t]=i});var u;null==o?i.each(l,!0):i.each([o],l,!0)}function bd(t){t.eachTargetSeries(function(e){var i=e.getData();wd(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))})}function Sd(t){t.eachSeries(function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var r=t.getVisualMeta(y(Md,null,e,t))||{stops:[],outerColors:[]};r.dimension=t.getDataDimension(i),n.push(r)}}),e.getData().setVisual("visualMeta",n)})}function Md(t,e,i,n){function r(t){return l[t]}function o(t,e){l[t]=e}for(var a=e.targetVisuals[n],s=db.prepareVisualTypes(a),l={color:t.getData().getVisual("color")},h=0,u=s.length;u>h;h++){var c=s[h],d=a["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,r,o)}return l.color}function Id(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,r=(i[1]-i[0])/n,o=i[0],a=[],s=0;n>=s&&oc;c++)u[s[1-a][c]]=h[c],u[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][a],f=ua(u,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function Ad(t){return f(t||[],function(){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)}),t}function Cd(t,e,i,n){return new dv({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){wg(t.event)},ondragend:n})}function Dd(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function Ld(t,e,i,n){return t?[[0,-Pb(e,Ob(i,0))],[Eb,0],[0,Pb(e,Ob(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function kd(t,e,i){var n=zb/2,r=t.get("hoverLinkDataSize");return r&&(n=Lb(r,e,i,!0)/2),n}function Pd(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function Od(t){return"vertical"===t?"ns-resize":"ew-resize"}function zd(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var Ed;"undefined"!=typeof window?Ed=window.__DEV__:"undefined"!=typeof global&&(Ed=global.__DEV__),"undefined"==typeof Ed&&(Ed=!0);var Rd=Ed,Bd=2311,Vd=function(){return Bd++},Nd={};Nd="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:e(navigator.userAgent);var Hd=Nd,Fd={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Gd={"[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},Wd=Object.prototype.toString,Zd=Array.prototype,Xd=Zd.forEach,qd=Zd.filter,Ud=Zd.slice,Yd=Zd.map,jd=Zd.reduce,Kd={},$d=function(){return Kd.createCanvas()};Kd.createCanvas=function(){return document.createElement("canvas")};var Qd,Jd="__ec_primitive__",tf="_ec_",ef=4;E.prototype={constructor:E,get:function(t){return this[tf+t]},set:function(t,e){return this[tf+t]=e,e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this)this.hasOwnProperty(i)&&t(this[i],i.slice(ef))},removeKey:function(t){delete this[tf+t]}};var nf=(Object.freeze||Object)({$override:i,clone:n,merge:r,mergeAll:o,extend:a,defaults:s,createCanvas:$d,getContext:l,indexOf:h,inherits:u,mixin:c,isArrayLike:d,each:f,map:g,reduce:p,filter:v,find:m,bind:y,curry:x,isArray:_,isFunction:w,isString:b,isObject:S,isBuiltInObject:M,isDom:I,eqNaN:T,retrieve:A,retrieve2:C,retrieve3:D,slice:L,normalizeCssArray:k,assert:P,setAsPrimitive:O,isPrimitive:z,createHashMap:R,noop:B}),rf="undefined"==typeof Float32Array?Array:Float32Array,of=X,af=q,sf=Q,lf=J,hf=(Object.freeze||Object)({create:V,copy:N,clone:H,set:F,add:G,scaleAndAdd:W,sub:Z,len:X,length:of,lenSquare:q,lengthSquare:af,mul:U,div:Y,dot:j,scale:K,normalize:$,distance:Q,dist:sf,distanceSquare:J,distSquare:lf,negate:te,lerp:ee,applyTransform:ie,min:ne,max:re});oe.prototype={constructor:oe,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ae(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this.dispatchToElement(ae(e,t),"drag",t.event);var a=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.dispatchToElement(ae(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(ae(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ae(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ae(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var uf=Array.prototype.slice,cf=function(){this._$handlers={}};cf.prototype={constructor:cf,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;rr;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=uf.call(e,1));for(var n=this._$handlers[t],r=n.length,o=0;r>o;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,e[1]);break;case 3:n[o].h.call(n[o].ctx,e[1],e[2]);break;default:n[o].h.apply(n[o].ctx,e)}n[o].one?(n.splice(o,1),r--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=uf.call(e,1,e.length-1));for(var n=e[e.length-1],r=this._$handlers[t],o=r.length,a=0;o>a;){switch(i){case 1:r[a].h.call(n);break;case 2:r[a].h.call(n,e[1]);break;case 3:r[a].h.call(n,e[1],e[2]);break;default:r[a].h.apply(n,e)}r[a].one?(r.splice(a,1),o--):a++}}return this}};var df="silent";le.prototype.dispose=function(){};var ff=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],gf=function(t,e,i,n){cf.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new le,this.proxy=i,i.handler=this,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,oe.call(this),f(ff,function(t){i.on&&i.on(t,this[t],this)},this)};gf.prototype={constructor:gf,mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,r=n.target;r&&!r.__zr&&(n=this.findHover(n.x,n.y),r=n.target);var o=this._hovered=this.findHover(e,i),a=o.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),r&&a!==r&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(o,"mousemove",t),a&&a!==r&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do i=i&&i.parentNode;while(i&&9!=i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var r="on"+e,o=se(e,t,i);n&&(n[r]&&(o.cancelBubble=n[r].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},o=n.length-1;o>=0;o--){var a;if(n[o]!==i&&!n[o].ignore&&(a=he(n[o],t,e))&&(!r.topTarget&&(r.topTarget=n[o]),a!==df)){r.target=n[o];break}}return r}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){gf.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("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||sf(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(gf,cf),c(gf,oe);var pf="undefined"==typeof Float32Array?Array:Float32Array,vf=(Object.freeze||Object)({create:ue,identity:ce,copy:de,mul:fe,translate:ge,rotate:pe,scale:ve,invert:me}),mf=ce,yf=5e-5,xf=function(t){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},_f=xf.prototype;_f.transform=null,_f.needLocalTransform=function(){return ye(this.rotation)||ye(this.position[0])||ye(this.position[1])||ye(this.scale[0]-1)||ye(this.scale[1]-1)},_f.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;return i||e?(n=n||ue(),i?this.getLocalTransform(n):mf(n),e&&(i?fe(n,t.transform,n):de(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||ue(),void me(this.invTransform,n)):void(n&&mf(n))},_f.getLocalTransform=function(t){return xf.getLocalTransform(this,t)},_f.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)},_f.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var wf=[];_f.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(fe(wf,t.invTransform,e),e=wf);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;ye(i-1)&&(i=Math.sqrt(i)),ye(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)}},_f.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]},_f.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&ie(i,i,n),i},_f.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&ie(i,i,n),i},xf.getLocalTransform=function(t,e){e=e||[],mf(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]),ve(e,e,n),r&&pe(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var bf={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*(-Math.pow(2,-10*(t-1))+2)},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,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-bf.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*bf.bounceIn(2*t):.5*bf.bounceOut(2*t-1)+.5}};xe.prototype={constructor:xe,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?bf[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){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Sf=function(){this.head=null,this.tail=null,this._len=0},Mf=Sf.prototype;Mf.insert=function(t){var e=new If(t);return this.insertEntry(e),e},Mf.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++},Mf.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--},Mf.len=function(){return this._len},Mf.clear=function(){this.head=this.tail=null,this._len=0};var If=function(t){this.value=t,this.next,this.prev},Tf=function(t){this._list=new Sf,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Af=Tf.prototype;Af.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 If(e),a.key=t,i.insertEntry(a),n[t]=a}return r},Af.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},Af.clear=function(){this._list.clear(),this._map={}};var Cf={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]},Df=new Tf(20),Lf=null,kf=Ee,Pf=Re,Of=(Object.freeze||Object)({parse:Le,lift:Oe,toHex:ze,fastLerp:Ee,fastMapToColor:kf,lerp:Re,mapToColor:Pf,modifyHSL:Be,modifyAlpha:Ve,stringify:Ne}),zf=Array.prototype.slice,Ef=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||He,this._setter=n||Fe,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Ef.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:je(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;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,o=function(){r--,r||n._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var s=Qe(this,t,o,this._tracks[a],a,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i1&&(Nf=function(){for(var t in arguments)console.log(arguments[t])});var Hf=Nf,Ff=function(){this.animators=[]};Ff.prototype={constructor:Ff,animate:function(t,e){var i,n=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;n="shape"===a[0];for(var l=0,u=a.length;u>l;l++)s&&(s=s[a[l]]);s&&(i=s)}else i=r;if(!i)return void Hf('Property "'+t+'" is not existed in element '+r.id);var c=r.animators,d=new Ef(i,e);return d.during(function(){r.dirty(n)}).done(function(){c.splice(h(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,o){function a(){l--,l||r&&r()}b(i)?(r=n,n=i,i=0):w(n)?(r=n,n="linear",i=0):w(i)?(r=i,i=0):w(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var s=this.animators.slice(),l=s.length;l||r&&r();for(var h=0;h0&&this.animate(t,!1).when(null==n?500:n,o).delay(r||0),this}};var Gf=function(t){xf.call(this,t),cf.call(this,t),Ff.call(this,t),this.id=t.id||Vd()};Gf.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,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(){},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(S(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;in||i>s||l>o||r>h)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Je(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}}},Je.create=function(t){return new Je(t.x,t.y,t.width,t.height)};var qf=function(t){t=t||{},Gf.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};qf.prototype={constructor:qf,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 qf&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=h(n,t);return 0>r?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof qf&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Hd.canvasSupported&&si(i,li)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.clipPath}if(t.isGroup){for(var a=t._children,s=0;se;e++)this.delRoot(t[e]);else{var r=h(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof qf&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:li};var Kf=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],$f=function(t,e){this.extendFrom(t,!1),this.host=e};$f.prototype={constructor:$f,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)||e!==!0&&(e===!1?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?ui:hi,r=n(t,e,i),o=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;er;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){function t(){i===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,ng(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var i=e._progressiveToken=+new Date;e._progress++,ng(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,f(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuiltinLayer(rn),this._doPaintList(t,e),this.eachBuiltinLayer(on)},_doPaintList:function(t,e){function i(t){var e=o.dpr||1;o.save(),o.globalAlpha=1,o.shadowBlur=0,n.__dirty=!0,o.setTransform(1,0,0,1,0,0),o.drawImage(t.dom,0,0,u*e,c*e),o.restore()}for(var n,r,o,a,s,l,h=0,u=this._width,c=this._height,d=this._progress,g=0,p=t.length;p>g;g++){var v=t[g],m=this._singleCanvas?0:v.zlevel,y=v.__frame;if(0>y&&s&&(i(s),s=null),r!==m&&(o&&o.restore(),a={},r=m,n=this.getLayer(r),n.__builtin__||Hf("ZLevel "+r+" has been used by unkown layer "+n.id),o=n.ctx,o.save(),n.__unusedCount=0,(n.__dirty||e)&&n.clear()),n.__dirty||e){if(y>=0){if(!s){if(s=this._progressiveLayers[Math.min(h++,pg-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){g=s.__nextIdxNotProg-1;continue}l=s.__progress,s.__dirty||(d=l),s.__progress=d+1}y===d&&this._doPaintEl(v,s,!0,s.renderScope)}else this._doPaintEl(v,n,e,a);v.__dirty=!1}}s&&i(s),o&&o.restore(),this._furtherProgressive=!1,f(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,i,n){var r=e.ctx,o=t.transform;if(!(!e.__dirty&&!i||t.invisible||0===t.style.opacity||o&&!o[0]&&!o[3]||t.culling&&an(t,this._width,this._height))){var a=t.__clipPaths;(n.prevClipLayer!==e||sn(a,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),a&&(r.save(),ln(a,r),n.prevClipLayer=e,n.prevElClipPaths=a)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new ig("zr_"+t,this,this.dpr),e.__builtin__=!0,this._layerConfig[t]&&r(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,r=n.length,o=null,a=-1,s=this._domRoot;if(i[t])return void Hf("ZLevel "+t+" has been used already");if(!nn(e))return void Hf("Layer of zlevel "+t+" is not valid");if(r>0&&t>n[0]){for(a=0;r-1>a&&!(n[a]t);a++);o=i[n[a]]}if(n.splice(a+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;nh;h++){var c=t[h],d=this._singleCanvas?0:c.zlevel,g=e[d],p=c.progressive;if(g&&(g.elCount++,g.__dirty=g.__dirty||c.__dirty),p>=0){a!==p&&(a=p,l++);var v=c.__frame=l-1;if(!o){var m=Math.min(s,pg-1);o=i[m],o||(o=i[m]=new ig("progressive",this,this.dpr),o.initContext()),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,v),o.__maxProgress>=o.__progress&&(g.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=h,s++,o=null)}o&&(s++,o.__nextIdxNotProg=h),this.eachBuiltinLayer(function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)}),i.length=Math.min(s,pg),f(i,function(t,e){r[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?r(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&r(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(h(i,t),1))},resize:function(t,e){var i=this._domRoot;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||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var r in this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);f(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){function e(t,e){var n=a._zlevelList;null==t&&(t=-1/0);for(var r,o=0;ot&&e>s){r=l;break}}r&&r.renderToCanvas&&(i.ctx.save(),r.renderToCanvas(i.ctx),i.ctx.restore())}if(t=t||{},this._singleCanvas)return this._layers[0].dom;var i=new ig("image",this,t.pixelRatio||this.dpr);i.initContext(),i.clearColor=t.backgroundColor,i.clear();for(var n,r=this.storage.getDisplayList(!0),o={},a=this,s=0;s=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ia;a++){var s=i[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(var a=0;n>a;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;n=r.length;for(var a=0;n>a;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(ng(t),!e._paused&&e._update())}var e=this;this._running=!0,ng(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},animate:function(t,e){e=e||{};var i=new Ef(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(bg,cf);var Sg=function(){this._track=[]};Sg.prototype={constructor:Sg,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,a=n.length;a>o;o++){var s=n[o],l=cn(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Mg)if(Mg.hasOwnProperty(e)){var i=Mg[e](this._track,t);if(i)return i}}};var Mg={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,r=(t[i-2]||{}).points||n;if(r&&r.length>1&&n&&n.length>1){var o=mn(n)/mn(r);!isFinite(o)&&(o=1),e.pinchScale=o;var a=yn(n);return e.pinchX=a[0],e.pinchY=a[1],{type:"pinch",target:t[0].target,event:e}}}}},Ig=300,Tg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ag=["touchstart","touchend","touchmove"],Cg={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Dg=g(Tg,function(t){var e=t.replace("mouse","pointer");return Cg[e]?e:t}),Lg={mousemove:function(t){t=fn(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){t=fn(this.dom,t);var e=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=fn(this.dom,t),t.zrByTouch=!0,this._lastTouchMoment=new Date,_n(this,t,"start"),Lg.mousemove.call(this,t),Lg.mousedown.call(this,t),wn(this)},touchmove:function(t){t=fn(this.dom,t),t.zrByTouch=!0,_n(this,t,"change"),Lg.mousemove.call(this,t),wn(this)},touchend:function(t){t=fn(this.dom,t),t.zrByTouch=!0,_n(this,t,"end"),Lg.mouseup.call(this,t),+new Date-this._lastTouchMomentt?"0"+t:t},qg=Mi,Ug=yi,Yg=(Object.freeze||Object)({addCommas:Un,toCamelCase:Yn,normalizeCssArray:Gg,encodeHTML:jn,formatTpl:Kn,formatTplSimple:$n,getTooltipMarker:Qn,formatTime:Jn,capitalFirst:tr,truncateText:qg,getTextRect:Ug}),jg=".",Kg="___EC__COMPONENT__CONTAINER___",$g="\x00ec_\x00",Qg=function(t){for(var e=0;e=0||n&&h(n,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},Jg=Qg([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),tp={getLineStyle:function(t){var e=Jg(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]}},ep=Qg([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ip={getAreaStyle:function(t,e){return ep(this,t,e)}},np=Math.pow,rp=Math.sqrt,op=1e-8,ap=1e-4,sp=rp(3),lp=1/3,hp=V(),up=V(),cp=V(),dp=Math.min,fp=Math.max,gp=Math.sin,pp=Math.cos,vp=2*Math.PI,mp=V(),yp=V(),xp=V(),_p=[],wp=[],bp={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Sp=[],Mp=[],Ip=[],Tp=[],Ap=Math.min,Cp=Math.max,Dp=Math.cos,Lp=Math.sin,kp=Math.sqrt,Pp=Math.abs,Op="undefined"!=typeof Float32Array,zp=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};zp.prototype={constructor:zp,_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=Pp(1/Vf/t)||0,this._uy=Pp(1/Vf/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(bp.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=Pp(t-this._xi)>this._ux||Pp(e-this._yi)>this._uy||this._len<5;return this.addData(bp.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(bp.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(bp.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(bp.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=Dp(r)*i+t,this._yi=Lp(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(bp.R,t,e,i,n),this},closePath:function(){this.addData(bp.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;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;e>r;r++)i+=t[r].len();Op&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var r=0;e>r;r++)for(var o=t[r].data,a=0;ae.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=r+o),o%=r,f-=o*u,g-=o*c;u>0&&t>=f||0>u&&f>=t||0==u&&(c>0&&e>=g||0>c&&g>=e);)n=this._dashIdx,i=a[n],f+=u*i,g+=c*i,this._dashIdx=(n+1)%p,u>0&&l>f||0>u&&f>l||c>0&&h>g||0>c&&g>h||s[n%2?"moveTo":"lineTo"](u>=0?Ap(f,t):Cp(f,t),c>=0?Ap(g,e):Cp(g,e));u=f-t,c=g-e,this._dashOffset=-kp(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,g=this._ctx,p=this._xi,v=this._yi,m=dr,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,a=0;1>a;a+=.1)s=m(p,t,i,r,a+.1)-m(p,t,i,r,a),l=m(v,e,n,o,a+.1)-m(v,e,n,o,a),y+=kp(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(a=(w-d)/y;1>=a;)h=m(p,t,i,r,a),u=m(v,e,n,o,a),x%2?g.moveTo(h,u):g.lineTo(h,u),a+=f[x]/y,x=(x+1)%_;x%2!==0&&g.lineTo(r,o),s=r-h,l=o-u,this._dashOffset=-kp(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,Op&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Sp[0]=Sp[1]=Ip[0]=Ip[1]=Number.MAX_VALUE,Mp[0]=Mp[1]=Tp[0]=Tp[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,o=0;oc;){var d=s[c++];switch(1==c&&(n=s[c],r=s[c+1],e=n,i=r),d){case bp.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case bp.L:o=s[c++],a=s[c++],(Pp(o-n)>l||Pp(a-r)>h||c===u-1)&&(t.lineTo(o,a),n=o,r=a);break;case bp.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 bp.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case bp.A:var f=s[c++],g=s[c++],p=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],w=p>v?p:v,b=p>v?1:p/v,S=p>v?v/p:1,M=Math.abs(p-v)>.001,I=m+y;M?(t.translate(f,g),t.rotate(x),t.scale(b,S),t.arc(0,0,w,m,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-g)):t.arc(f,g,w,m,I,1-_),1==c&&(e=Dp(m)*p+f,i=Lp(m)*v+g),n=Dp(I)*p+f,r=Lp(I)*v+g;break;case bp.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case bp.Z:t.closePath(),n=e,r=i}}}},zp.CMD=bp;var Ep=2*Math.PI,Rp=2*Math.PI,Bp=zp.CMD,Vp=2*Math.PI,Np=1e-4,Hp=[-1,-1,-1],Fp=[-1,-1],Gp=eg.prototype.getCanvasPattern,Wp=Math.abs,Zp=new zp(!0);Wr.prototype={constructor:Wr,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,n=this.path||Zp,r=i.hasStroke(),o=i.hasFill(),a=i.fill,s=i.stroke,l=o&&!!a.colorStops,h=r&&!!s.colorStops,u=o&&!!a.image,c=r&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,a,d)),h&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=Gp.call(a,t)),h?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=Gp.call(s,t));var f=i.lineDash,g=i.lineDashOffset,p=!!t.setLineDash,v=this.getGlobalScale();n.setScale(v[0],v[1]),this.__dirtyPath||f&&!p&&r?(n.beginPath(t),f&&!p&&(n.setLineDash(f),n.setLineDashOffset(g)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o&&n.fill(t),f&&p&&(t.setLineDash(f),t.lineDashOffset=g),r&&n.stroke(t),f&&p&&t.setLineDash([]),this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect()) },buildPath:function(){},createPathProxy:function(){this.path=new zp},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new zp),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)),Gr(o,a/s,t,e)))return!0}if(r.hasFill())return Fr(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Ji.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(S(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&&Wp(t[0]-1)>1e-10&&Wp(t[3]-1)>1e-10?Math.sqrt(Wp(t[0]*t[3]-t[2]*t[1])):1}},Wr.extend=function(t){var e=function(e){Wr.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)};u(e,Wr);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Wr,Ji);var Xp=zp.CMD,qp=[[],[],[]],Up=Math.sqrt,Yp=Math.atan2,jp=function(t,e){var i,n,r,o,a,s,l=t.data,h=Xp.M,u=Xp.C,c=Xp.L,d=Xp.R,f=Xp.A,g=Xp.Q;for(r=0,o=0;ra;a++){var s=qp[a];s[0]=l[r++],s[1]=l[r++],ie(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},Kp=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],$p=Math.sqrt,Qp=Math.sin,Jp=Math.cos,tv=Math.PI,ev=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},iv=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(ev(t)*ev(e))},nv=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;ro;o++)r+=Q(t[o-1],t[o]);var a=r/2;a=i>a?i:a;for(var o=0;a>o;o++){var s,l,h,u=o/(a-1)*(e?i:i-1),c=Math.floor(u),d=u-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var g=d*d,p=d*g;n.push([Kr(s[0],f[0],l[0],h[0],d,g,p),Kr(s[1],f[1],l[1],h[1],d,g,p)])}return n},cv=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;f>d;d++)ne(a,a,t[d]),re(s,s,t[d]);ne(a,a,n[0]),re(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var g=t[d];if(i)r=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(H(t[d]));continue}r=t[d-1],o=t[d+1]}Z(h,o,r),K(h,h,e);var p=Q(g,r),v=Q(g,o),m=p+v;0!==m&&(p/=m,v/=m),K(u,h,-p),K(c,h,v);var y=G([],g,u),x=G([],g,c);n&&(re(y,y,a),ne(y,y,s),re(x,x,a),ne(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},dv=Wr.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){$r(t,e,!0)}}),fv=Wr.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){$r(t,e,!1)}}),gv=Wr.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width,o=e.height;e.r?zi(t,e):t.rect(i,n,r,o),t.closePath()}}),pv=Wr.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),1>a&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),vv=[],mv=Wr.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(1>u&&(br(i,a,r,u,vv),a=vv[1],r=vv[2],br(n,s,o,u,vv),s=vv[1],o=vv[2]),t.quadraticCurveTo(a,s,r,o)):(1>u&&(vr(i,a,l,r,u,vv),a=vv[1],l=vv[2],r=vv[3],vr(n,s,h,o,u,vv),s=vv[1],h=vv[2],o=vv[3]),t.bezierCurveTo(a,s,l,h,r,o)))},pointAt:function(t){return Qr(this.shape,t,!1)},tangentAt:function(t){var e=Qr(this.shape,t,!0);return $(e,e)}}),yv=Wr.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,o,a,!s)}}),xv=Wr.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i=0;o--)n=r(n,t[o],!0);er(this,"__defaultOption",n)}return ir(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});hr(Uv,{registerWhenExtend:!0}),sa(Uv),la(Uv,pa),c(Uv,Xv);var Yv="";"undefined"!=typeof navigator&&(Yv=navigator.platform||"");var jv={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:Yv.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},Kv={clearColorPalette:function(){er(this,"colorIdx",0),er(this,"colorNameMap",{})},getColorFromPalette:function(t,e){e=e||this;var i=ir(e,"colorIdx")||0,n=ir(e,"colorNameMap")||er(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var r=this.get("color",!0)||[];if(r.length){var o=r[i];return t&&(n[t]=o),er(e,"colorIdx",(i+1)%r.length),o}}},$v=f,Qv=v,Jv=g,tm=_,em=h,im=S,nm="\x00_ec_inner",rm=Go.extend({constructor:rm,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Go(i),this._optionManager=n},setOption:function(t,e){P(!(nm 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)):ma.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&&$v(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var r=Xo(t[e]),s=Ko(o.get(e),r);$o(s),$v(s,function(t){var i=t.option;im(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=xa(e,i,t.exist))});var l=ya(o,n);i[e]=[],o.set(e,[]),$v(s,function(t,n){var r=t.exist,s=t.option;if(P(im(s)||r,"Empty component definition"),s){var h=Uv.getClass(e,t.keyInfo.subType,!0);if(r&&r instanceof h)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var u=a({dependentModels:l,componentIndex:n},t.keyInfo);r=new h(s,this,this,u),a(r,u),r.init(s,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(e)[n]=r,i[e][n]=r.option},this),"series"===e&&(this._seriesIndices=_a(o.get("series")))}var i=this.option,o=this._componentsMap,s=[];$v(t,function(t,e){null!=t&&(Uv.hasClass(e)?s.push(e):i[e]=null==i[e]?n(t):r(i[e],t,!0))}),Uv.topologicalTravel(s,Uv.getAllClassMainTypes(),e,this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=n(this.option);return $v(t,function(e,i){if(Uv.hasClass(i)){for(var e=Xo(e),n=e.length-1;n>=0;n--)Qo(e[n])&&e.splice(n,1);t[i]=e}}),delete t[nm],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var a;if(null!=i)tm(i)||(i=[i]),a=Qv(Jv(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=tm(n);a=Qv(o,function(t){return s&&em(n,t.id)>=0||!s&&t.id===n})}else if(null!=r){var l=tm(r);a=Qv(o,function(t){return l&&em(r,t.name)>=0||!l&&t.name===r})}else a=o.slice();return wa(a,t)},findComponents:function(t){function e(t){var e=r+"Index",i=r+"Id",n=r+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:r,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?Qv(e,t.filter):e}var n=t.query,r=t.mainType,o=e(n),a=o?this.queryComponents(o):this._componentsMap.get(r);return i(wa(a,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){$v(t,function(t,r){e.call(i,n,t,r)})});else if(b(t))$v(n.get(t),e,i);else if(im(t)){var r=this.findComponents(t);$v(r,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return Qv(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return Qv(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){ba(this),$v(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){$v(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){ba(this),$v(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 $v(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return ba(this),h(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){ba(this);var i=Qv(this._componentsMap.get("series"),t,e);this._seriesIndices=_a(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=_a(t.get("series"));var e=[];t.each(function(t,i){e.push(i)}),Uv.topologicalTravel(e,Uv.getAllClassMainTypes(),function(e){$v(t.get(e),function(t){t.restoreData()})})}});c(rm,Kv);var om=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],am={};Ma.prototype={constructor:Ma,create:function(t,e){var i=[];f(am,function(n){var r=n.create(t,e);i=i.concat(r||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Ma.register=function(t,e){am[t]=e},Ma.get=function(t){return am[t]};var sm=f,lm=n,hm=g,um=r,cm=/^(min|max)?(.+)$/;Ia.prototype={constructor:Ia,setOption:function(t,e){t=lm(t,!0);var i=this._optionBackup,n=Ta.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(La(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=hm(e.timelineOptions,lm),this._mediaList=hm(e.mediaList,lm),this._mediaDefault=lm(e.mediaDefault),this._currentMediaIndices=[],lm(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=lm(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,r=[],o=[];if(!i.length&&!n)return o;for(var a=0,s=i.length;s>a;a++)Aa(i[a].query,t,e)&&r.push(a);return!r.length&&n&&(r=[-1]),r.length&&!Da(r,this._currentMediaIndices)&&(o=hm(r,function(t){return lm(-1===t?n.option:i[t].option)})),this._currentMediaIndices=r,o}};var dm=f,fm=S,gm=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],pm=function(t,e){dm(Ea(t.series),function(t){fm(t)&&za(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),dm(i,function(e){dm(Ea(t[e]),function(t){t&&(Pa(t,"axisLabel"),Pa(t.axisPointer,"label"))})}),dm(Ea(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Pa(e,"axisLabel"),Pa(e&&e.axisPointer,"label")}),dm(Ea(t.calendar),function(t){Pa(t,"dayLabel"),Pa(t,"monthLabel"),Pa(t,"yearLabel")}),dm(Ea(t.radar),function(t){Pa(t,"name")}),dm(Ea(t.geo),function(t){fm(t)&&(Oa(t.label),dm(Ea(t.regions),function(t){Oa(t.label)}))}),Oa(Ra(t.timeline).label),Pa(Ra(t.axisPointer),"label"),Pa(Ra(t.tooltip).axisPointer,"label")},vm=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],mm=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],ym=["bar","boxplot","candlestick","chord","effectScatter","funnel","gauge","lines","graph","heatmap","line","map","parallel","pie","radar","sankey","scatter","treemap"],xm=function(t,e){pm(t,e),t.series=Xo(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if(("pie"===e||"gauge"===e)&&null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=Ba(t,"pointer.color");null!=i&&Va(t,"itemStyle.normal.color",i)}for(var n=0;n":"")+a.join(o?"
":", ")}var n=ir(this,"data"),r=this.getRawValue(t),o=_(r)?i(r):jn(Un(r)),a=n.getName(t),s=n.getItemVisual(t,"color");S(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color),s=s||"transparent";var l=Qn(s),h=this.name;return"\x00-"===h&&(h=""),h=h?jn(h)+(e?": ":"
"):"",e?l+h+o:h+l+(a?jn(a)+": "+o:o)},isAnimationEnabled:function(){if(Hd.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){er(this,"data",ir(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=Kv.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});c(_m,Bv),c(_m,Kv);var wm=function(){this.group=new qf,this.uid=aa("viewComponent")};wm.prototype={constructor:wm,init:function(){},render:function(){},dispose:function(){}};var bm=wm.prototype;bm.updateView=bm.updateLayout=bm.updateVisual=function(){},ar(wm),hr(wm,{registerWhenExtend:!0}),Ha.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){Ga(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Ga(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){}};var Sm=Ha.prototype;Sm.updateView=Sm.updateLayout=Sm.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ar(Ha,["dispose"]),hr(Ha,{registerWhenExtend:!0});var Mm="\x00__throttleOriginMethod",Im="\x00__throttleRate",Tm="\x00__throttleType",Am=function(t){function e(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),r=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",r),t.isSeriesFiltered(e)||("function"!=typeof r||r instanceof _v||n.each(function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))}),n.each(function(t){var e=n.getItemModel(t),r=e.get(i,!0);null!=r&&n.setItemVisual(t,"color",r)}))}t.eachRawSeries(e)},Cm=Math.PI,Dm=function(t,e){e=e||{},s(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new gv({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new yv({shape:{startAngle:-Cm/2,endAngle:-Cm/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new gv({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*Cm/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Cm/2}).delay(300).start("circularInOut");var o=new qf;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},Lm=f,km=Uv.parseClassType,Pm="3.8.5",Om={zrender:"3.7.4"},zm=1e3,Em=5e3,Rm=1e3,Bm=2e3,Vm=3e3,Nm=4e3,Hm=5e3,Fm={PROCESSOR:{FILTER:zm,STATISTIC:Em},VISUAL:{LAYOUT:Rm,GLOBAL:Bm,CHART:Vm,COMPONENT:Nm,BRUSH:Hm}},Gm="__flagInMainProcess",Wm="__hasGradientOrPatternBg",Zm="__optionUpdated",Xm=/^[a-zA-Z0-9_]+$/;Ua.prototype.on=qa("on"),Ua.prototype.off=qa("off"),Ua.prototype.one=qa("one"),c(Ua,cf);var qm=Ya.prototype;qm._onframe=function(){if(this[Zm]){var t=this[Zm].silent;this[Gm]=!0,Um.prepareAndUpdate.call(this),this[Gm]=!1,this[Zm]=!1,Qa.call(this,t),Ja.call(this,t)}},qm.getDom=function(){return this._dom},qm.getZr=function(){return this._zr},qm.setOption=function(t,e,i){Rd&&P(!this[Gm],"`setOption` should not be called during main process.");var n;if(S(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[Gm]=!0,!this._model||e){var r=new Ia(this._api),o=this._theme,a=this._model=new rm(null,null,o,r);a.init(null,null,o,r)}this._model.setOption(t,Qm),i?(this[Zm]={silent:n},this[Gm]=!1):(Um.prepareAndUpdate.call(this),this._zr.flush(),this[Zm]=!1,this[Gm]=!1,Qa.call(this,n),Ja.call(this,n))},qm.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},qm.getModel=function(){return this._model},qm.getOption=function(){return this._model&&this._model.getOption()},qm.getWidth=function(){return this._zr.getWidth()},qm.getHeight=function(){return this._zr.getHeight()},qm.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},qm.getRenderedCanvas=function(t){if(Hd.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,i=e.storage.getDisplayList();return f(i,function(t){t.stopAnimation(!0)}),e.painter.getRenderedCanvas(t)}},qm.getSvgDataUrl=function(){if(Hd.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToSvg()}},qm.getDataURL=function(t){t=t||{};var e=t.excludeComponents,i=this._model,n=[],r=this;Lm(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 Lm(n,function(t){t.group.ignore=!1}),o},qm.getConnectedDataURL=function(t){if(Hd.canvasSupported){var e=this.group,i=Math.min,r=Math.max,o=1/0;if(ry[e]){var a=o,s=o,l=-o,h=-o,u=[],c=t&&t.pixelRatio||1;f(ny,function(o){if(o.group===e){var c=o.getRenderedCanvas(n(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),h=r(d.bottom,h),u.push({dom:c,left:d.left,top:d.top})}}),a*=c,s*=c,l*=c,h*=c;var d=l-a,g=h-s,p=$d();p.width=d,p.height=g;var v=In(p);return Lm(u,function(t){var e=new tn({style:{x:t.left*c-a,y:t.top*c-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},qm.convertToPixel=x(ja,"convertToPixel"),qm.convertFromPixel=x(ja,"convertFromPixel"),qm.containPixel=function(t,e){var i,n=this._model;return t=ea(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(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):Rd&&console.warn(n+": "+(o?"The found component do not support containPoint.":"No view mapping to the found component."))}else Rd&&console.warn(n+": containPoint is not supported")},this)},this),!!i},qm.getVisual=function(t,e){var i=this._model;t=ea(i,t,{defaultMainType:"series"});var n=t.seriesModel;Rd&&(n||console.warn("There is no specified seires model"));var r=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?r.indexOfRawIndex(t.dataIndex):null;return null!=o?r.getItemVisual(o,e):r.getVisual(e)},qm.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},qm.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Um={update:function(t){var e=this._model,i=this._api,n=this._coordSysMgr,r=this._zr;if(e){e.restoreData(),n.create(this._model,this._api),is.call(this,e,i),ns.call(this,e),n.update(e,i),os.call(this,e,t),as.call(this,e,t);var o=e.get("backgroundColor")||"transparent",a=r.painter;if(a.isSingleCanvas&&a.isSingleCanvas())r.configLayer(0,{clearColor:o});else{if(!Hd.canvasSupported){var s=Le(o);o=Ne(s,"rgb"),0===s[3]&&(o="transparent")}o.colorStops||o.image?(r.configLayer(0,{clearColor:o}),this[Wm]=!0,this._dom.style.background="transparent"):(this[Wm]&&r.configLayer(0,{clearColor:null}),this[Wm]=!1,this._dom.style.background=o) }Lm(Jm,function(t){t(e,i)})}},updateView:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),os.call(this,e,t),ts.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries(function(t){t.getData().clearAllVisual()}),os.call(this,e,t,!0),ts.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(rs.call(this,e,t),ts.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;es.call(this,"component",e),es.call(this,"chart",e),Um.update.call(this,t)}};qm.resize=function(t){Rd&&P(!this[Gm],"`resize` should not be called during main process."),this[Gm]=!0,this._zr.resize(t);var e=this._model&&this._model.resetOption("media"),i=e?"prepareAndUpdate":"update";Um[i].call(this),this._loadingFX&&this._loadingFX.resize(),this[Gm]=!1;var n=t&&t.silent;Qa.call(this,n),Ja.call(this,n)},qm.showLoading=function(t,e){if(S(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),!iy[t])return void(Rd&&console.warn("Loading effects "+t+" not exists."));var i=iy[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)},qm.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},qm.makeActionFromEvent=function(t){var e=a({},t);return e.type=Km[t.type],e},qm.dispatchAction=function(t,e){if(S(e)||(e={silent:!!e}),jm[t.type]&&this._model){if(this[Gm])return void this._pendingActions.push(t);$a.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Hd.browser.weChat&&this._throttledZrFlush(),Qa.call(this,e.silent),Ja.call(this,e.silent)}},qm.on=qa("on"),qm.off=qa("off"),qm.one=qa("one");var Ym=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];qm._initEvents=function(){Lm(Ym,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 o=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=o&&o.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(i=a({},r.eventData));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),Lm(Km,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},qm.isDisposed=function(){return this._disposed},qm.clear=function(){this.setOption({series:[]},!0)},qm.dispose=function(){if(this._disposed)return void(Rd&&console.warn("Instance "+this.id+" has been disposed"));this._disposed=!0;var t=this._api,e=this._model;Lm(this._componentsViews,function(i){i.dispose(e,t)}),Lm(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete ny[this.id]},c(Ya,cf);var jm={},Km={},$m=[],Qm=[],Jm=[],ty=[],ey={},iy={},ny={},ry={},oy=new Date-0,ay=new Date-0,sy="_echarts_instance_",ly={},hy=gs;Ts(Bm,Am),xs(xm),As("default",Dm),bs({type:"highlight",event:"highlight",update:"highlight"},B),bs({type:"downplay",event:"downplay",update:"downplay"},B);var uy={};Rs.prototype={constructor:Rs,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,e=this._old,i=this._new,n={},r={},o=[],a=[];for(Bs(e,n,o,"_oldKeyGetter",this),Bs(i,r,a,"_newKeyGetter",this),t=0;tu;u++)this._add&&this._add(l[u]);else this._add&&this._add(l)}}}};var cy=S,dy="undefined",fy=typeof window===dy?global:window,gy={"float":typeof fy.Float64Array===dy?Array:fy.Float64Array,"int":typeof fy.Int32Array===dy?Array:fy.Int32Array,ordinal:Array,number:Array,time:Array},py=["stackedOn","hasItemOption","_nameList","_idList","_rawData"];Ns.prototype.pure=!1,Ns.prototype.count=function(){return this._array.length},Ns.prototype.getItem=function(t){return this._array[t]};var vy=function(t,e){t=t||["x","y"];for(var i={},n=[],r=0;rd;d++){for(var v=t.getItem(d),m=0;md;d++){var v=t.getItem(d);!e[d]&&v&&(null!=v.name?e[d]=v.name:null!=r&&(e[d]=o[s[r]][d]));var w=e[d]||"",b=v&&v.id;!b&&w&&(c[w]=c[w]||0,b=w,c[w]>0&&(b+="__ec__"+c[w]),c[w]++),b&&(u[d]=b)}this._nameList=e,this._idList=u},my.count=function(){return this.indices.length},my.get=function(t,e,i){var n=this._storage,r=this.indices[e];if(null==r||!n[t])return 0/0;var o=n[t][r];if(i){var a=this._dimensionInfos[t];if(a&&a.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||0>=o&&0>l)&&(o+=l),s=s.stackedOn}}return o},my.getValues=function(t,e,i){var n=[];_(t)||(i=e,e=t,t=this.dimensions);for(var r=0,o=t.length;o>r;r++)n.push(this.get(t[r],e,i));return n},my.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,r=e.length;r>n;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},my.getDataExtent=function(t,e,i){t=this.getDimension(t);var n=this._storage[t],r=this.getDimensionInfo(t);e=r&&r.stackable&&e;var o,a=(this._extent||(this._extent={}))[t+!!e];if(a)return a;if(n){for(var s=1/0,l=-1/0,h=0,u=this.count();u>h;h++)o=this.get(t,h,e),(!i||i(o,t,h))&&(s>o&&(s=o),o>l&&(l=o));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},my.getSum=function(t,e){var i=this._storage[t],n=0;if(i)for(var r=0,o=this.count();o>r;r++){var a=this.get(t,r,e);isNaN(a)||(n+=a)}return n},my.indexOf=function(t,e){var i=this._storage,n=i[t],r=this.indices;if(n)for(var o=0,a=r.length;a>o;o++){var s=r[o];if(n[s]===e)return o}return-1},my.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,r=e.length;r>n;n++){var o=e[n];if(i[o]===t)return n}return-1},my.indexOfRawIndex=function(t){var e=this.indices,i=e[t];if(null!=i&&i===t)return t;for(var n=0,r=e.length-1;r>=n;){var o=(n+r)/2|0;if(e[o]t))return o;r=o-1}}return-1},my.indicesOfNearest=function(t,e,i,n){var r=this._storage,o=r[t],a=[];if(!o)return a;null==n&&(n=1/0);for(var s=Number.MAX_VALUE,l=-1,h=0,u=this.count();u>h;h++){var c=e-this.get(t,h,i),d=Math.abs(c);n>=c&&s>=d&&((s>d||c>=0&&0>l)&&(s=d,l=c,a.length=0),a.push(h))}return a},my.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},my.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},my.getName=function(t){return this._nameList[this.indices[t]]||""},my.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},my.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=g(Hs(t),this.getDimension,this);var r=[],o=t.length,a=this.indices;n=n||this;for(var s=0;sl;l++)r[l]=this.get(t[l],s,i);r[l]=s,e.apply(n,r)}},my.filterSelf=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),t=g(Hs(t),this.getDimension,this);var r=[],o=[],a=t.length,s=this.indices;n=n||this;for(var l=0;lu;u++)o[u]=this.get(t[u],l,i);o[u]=l,h=e.apply(n,o)}else h=e.call(n,l);h&&r.push(s[l])}return this.indices=r,this._extent={},this},my.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i,n),r},my.map=function(t,e,i,n){t=g(Hs(t),this.getDimension,this);var r=Fs(this,t),o=r.indices=this.indices,a=r._storage,s=[];return this.each(t,function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(s[0]=n,n=s);for(var r=0;rg;g+=c){c>f-g&&(c=f-g,h.length=c);for(var p=0;c>p;p++){var v=s[g+p];h[p]=d[v],u[p]=v}var m=i(h),v=u[n(h,m)||0];d[v]=m,l.push(v)}return r},my.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new Go(this._rawData.getItem(t),e,e&&e.ecModel)},my.diff=function(t){var e,i=this._idList,n=t&&t._idList,r="e\x00\x00";return new Rs(t?t.indices:[],this.indices,function(t){return null!=(e=n[t])?e:r+t},function(t){return null!=(e=i[t])?e:r+t})},my.getVisual=function(t){var e=this._visual;return e&&e[t]},my.setVisual=function(t,e){if(cy(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},my.setLayout=function(t,e){if(cy(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},my.getLayout=function(t){return this._layout[t]},my.getItemLayout=function(t){return this._itemLayouts[t]},my.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},my.clearItemLayouts=function(){this._itemLayouts.length=0},my.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},my.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,cy(e))for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);else n[e]=i},my.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var yy=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};my.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(yy,e)),this._graphicEls[t]=e},my.getItemGraphicEl=function(t){return this._graphicEls[t]},my.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},my.cloneShallow=function(){var t=g(this.dimensions,this.getDimensionInfo,this),e=new vy(t,this.hostModel);return e._storage=this._storage,Vs(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=a({},this._extent)),e},my.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(L(arguments)))})},my.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],my.CHANGABLE_METHODS=["filterSelf"];var xy=f,_y=b,wy=s,by={tooltip:1,label:1,itemName:1},Sy=Gs.guessOrdinal=function(t,e){for(var i=0,n=t.length;n>i;i++){var r=Ws(t[i]);if(!_(r))return!1;var r=r[e];if(null!=r&&isFinite(r)&&""!==r)return!1;if(_y(r)&&"-"!==r)return!0}return!1},My={cartesian2d:function(t,e,i,n){var r=g(["xAxis","yAxis"],function(t){return i.queryComponents({mainType:t,index:e.get(t+"Index"),id:e.get(t+"Id")})[0]}),o=r[0],a=r[1];if(Rd){if(!o)throw new Error('xAxis "'+A(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+A(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}var s=o.get("type"),l=a.get("type"),h=[{name:"x",type:Ys(s),stackable:Us(s)},{name:"y",type:Ys(l),stackable:Us(l)}],u="category"===s,c="category"===l;h=Gs(h,t,n);var d={};return u&&(d.x=o),c&&(d.y=a),{dimensions:h,categoryIndex:u?0:c?1:-1,categoryAxesModels:d}},singleAxis:function(t,e,i,n){var r=i.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];if(Rd&&!r)throw new Error("singleAxis should be specified.");var o=r.get("type"),a="category"===o,s=[{name:"single",type:Ys(o),stackable:Us(o)}];s=Gs(s,t,n);var l={};return a&&(l.single=r),{dimensions:s,categoryIndex:a?0:-1,categoryAxesModels:l}},polar:function(t,e,i,n){var r=i.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0],o=r.findAxisModel("angleAxis"),a=r.findAxisModel("radiusAxis");if(Rd){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}var s=a.get("type"),l=o.get("type"),h=[{name:"radius",type:Ys(s),stackable:Us(s)},{name:"angle",type:Ys(l),stackable:Us(l)}],u="category"===l,c="category"===s;h=Gs(h,t,n);var d={};return c&&(d.radius=a),u&&(d.angle=o),{dimensions:h,categoryIndex:u?1:c?0:-1,categoryAxesModels:d}},geo:function(t,e,i,n){return{dimensions:Gs([{name:"lng"},{name:"lat"}],t,n)}}};Ks.prototype.parse=function(t){return t},Ks.prototype.getSetting=function(t){return this._setting[t]},Ks.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Ks.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ks.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ks.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Ks.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},Ks.prototype.getExtent=function(){return this._extent.slice()},Ks.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Ks.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;ie[1]&&(e[1]=t[1]),Dy.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=Qs(t)},getTicks:function(){return el(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ir&&(r=-r,n.reverse());var o=$s(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]=Cy(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Cy(Math.ceil(e[1]/r)*r))}});Dy.create=function(){return new Dy};var Ly=Dy.prototype,ky=Math.ceil,Py=Math.floor,Oy=1e3,zy=60*Oy,Ey=60*zy,Ry=24*Ey,By=function(t,e,i,n){for(;n>i;){var r=i+n>>>1;t[r][1]o&&(o=e),null!=i&&o>i&&(o=i);var a=Ny.length,s=By(Ny,o,0,a),l=Ny[Math.min(s,a-1)],h=l[1];if("year"===l[0]){var u=r/h,c=Zn(u/t,!0);h*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(ky((n[0]-d)/h)*h+d),Math.round(Py((n[1]-d)/h)*h+d)];tl(f,n),this._stepLvl=l,this._interval=h,this._niceExtent=f},parse:function(t){return+Fn(t)}});f(["contain","normalize"],function(t){Vy.prototype[t]=function(e){return Ly[t].call(this,this.parse(e))}});var Ny=[["hh:mm:ss",Oy],["hh:mm:ss",5*Oy],["hh:mm:ss",10*Oy],["hh:mm:ss",15*Oy],["hh:mm:ss",30*Oy],["hh:mm\nMM-dd",zy],["hh:mm\nMM-dd",5*zy],["hh:mm\nMM-dd",10*zy],["hh:mm\nMM-dd",15*zy],["hh:mm\nMM-dd",30*zy],["hh:mm\nMM-dd",Ey],["hh:mm\nMM-dd",2*Ey],["hh:mm\nMM-dd",6*Ey],["hh:mm\nMM-dd",12*Ey],["MM-dd\nyyyy",Ry],["MM-dd\nyyyy",2*Ry],["MM-dd\nyyyy",3*Ry],["MM-dd\nyyyy",4*Ry],["MM-dd\nyyyy",5*Ry],["MM-dd\nyyyy",6*Ry],["week",7*Ry],["MM-dd\nyyyy",10*Ry],["week",14*Ry],["week",21*Ry],["month",31*Ry],["week",42*Ry],["month",62*Ry],["week",42*Ry],["quarter",380*Ry/4],["month",31*Ry*4],["month",31*Ry*5],["half-year",380*Ry/2],["month",31*Ry*8],["month",31*Ry*10],["year",380*Ry]];Vy.create=function(t){return new Vy({useUTC:t.ecModel.get("useUTC")})};var Hy=Ks.prototype,Fy=Dy.prototype,Gy=Rn,Wy=On,Zy=Math.floor,Xy=Math.ceil,qy=Math.pow,Uy=Math.log,Yy=Ks.extend({type:"log",base:10,$constructor:function(){Ks.apply(this,arguments),this._originalScale=new Dy},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return g(Fy.getTicks.call(this),function(n){var r=On(qy(this.base,n));return r=n===e[0]&&t.__fixMin?il(r,i[0]):r,r=n===e[1]&&t.__fixMax?il(r,i[1]):r},this)},getLabel:Fy.getLabel,scale:function(t){return t=Hy.scale.call(this,t),qy(this.base,t)},setExtent:function(t,e){var i=this.base;t=Uy(t)/Uy(i),e=Uy(e)/Uy(i),Fy.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Hy.getExtent.call(this);e[0]=qy(t,e[0]),e[1]=qy(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=il(e[0],n[0])),i.__fixMax&&(e[1]=il(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Uy(t[0])/Uy(e),t[1]=Uy(t[1])/Uy(e),Hy.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!0,function(t){return t>0}))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=Gn(i),r=t/i*n;for(.5>=r&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[On(Xy(e[0]/n)*n),On(Zy(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){Fy.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){Yy.prototype[t]=function(e){return e=Uy(e)/Uy(this.base),Hy[t].call(this,e)}}),Yy.create=function(){return new Yy};var jy={getFormattedLabels:function(){return ll(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&g(this.get("data"),ul)},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&&!T(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&&!T(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Ky=Jr({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()}}),$y=Jr({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()}}),Qy=Jr({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,g=.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-g,i,n),t.bezierCurveTo(i,n-g,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),Jy=Jr({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()}}),tx={line:pv,rect:gv,roundRect:gv,square:gv,circle:ov,diamond:$y,pin:Qy,arrow:Jy,triangle:Ky},ex={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}},ix={};f(tx,function(t,e){ix[e]=new t});var nx=Jr({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style,e=this.shape;"pin"===e.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,r=ix[n];"none"!==e.symbolType&&(r||(n="rect",r=ix[n]),ex[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i))}}),rx=(Object.freeze||Object)({createList:fl,createScale:gl,mixinAxisModelCommonMethods:pl,completeDimensions:Gs,createSymbol:dl}),ox=kn,ax=[0,1],sx=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};sx.prototype={constructor:sx,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Bn(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&&(i=i.slice(),vl(i,n.count())),ox(t,ax,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),vl(i,n.count()));var r=ox(t,i,ax,e);return this.scale.scale(r)},pointToData:function(){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;na;a++)e.push([o*a/i+n,o*(a+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=sl(g(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 lx=1e-8;xl.prototype={constructor:xl,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;sn;n++)if("polygon"===i[n].type){var o=i[n].exterior,a=i[n].interiors;if(yl(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(yl(a[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=r.width/r.height;i?n||(n=i/o):i=o*n;for(var a=new Je(t,e,i,n),s=r.calculateTransform(a),l=this.geometries,h=0;h0}),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&&f(n,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new xl(e.name,r,e.cp);return o.properties=e,o})},ux={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){ux[t]=nf[t]});var cx="__ec_stack_";Al.getLayoutOnAxis=Ml;var dx=function(t){this._axes={},this._dimList=[],this.name=t||""};dx.prototype={constructor:dx,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return g(this._dimList,Cl,this)},getAxesByScale:function(t){return t=t.toLowerCase(),v(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;re[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},u(fx,sx);var gx={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)"]}}},px={};px.categoryAxis=r({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},gx),px.valueAxis=r({boundaryGap:[0,0],splitNumber:5},gx),px.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},px.valueAxis),px.logAxis=s({scale:!0,logBase:10},px.valueAxis);var vx=["value","category","time","log"],mx=function(t,e,i,n){f(vx,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?fa(e):{},l=n.getTheme();r(e,l.get(a+"Axis")),r(e,this.getDefaultOption()),e.type=i(t,e),o&&da(e,s,o)},defaultOption:o([{},px[a+"Axis"],n],!0)})}),Uv.registerSubTypeDefaulter(t+"Axis",x(i,t))},yx=Uv.extend({type:"cartesian2dAxis",axis:null,init:function(){yx.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){yx.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){yx.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});r(yx.prototype,jy);var xx={offset:0};mx("x",yx,Ll,xx),mx("y",yx,Ll,xx),Uv.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 _x=f,wx=al,bx=rl,Sx=zl.prototype;Sx.type="grid",Sx.axisPointerEnabled=!0,Sx.getRect=function(){return this._rect},Sx.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),_x(i.x,function(t){bx(t.scale,t.model)}),_x(i.y,function(t){bx(t.scale,t.model)}),_x(i.x,function(t){El(i,"y",t)}),_x(i.y,function(t){El(i,"x",t)}),this.resize(this.model,e)},Sx.resize=function(t,e,i){function n(){_x(o,function(t){var e=t.isHorizontal(),i=e?[0,r.width]:[0,r.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),Bl(t,e?r.x:r.y)})}var r=ua(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}); this._rect=r;var o=this._axesList;n(),!i&&t.get("containLabel")&&(_x(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Ol(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");r[i]-=e[i]+n,"top"===t.position?r.y+=e.height+n:"left"===t.position&&(r.x+=e.width+n)}}}),n())},Sx.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},Sx.getAxes=function(){return this._axesList.slice()},Sx.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n0?1:-1,a=n.height>0?1:-1;return{x:n.x+o*r/2,y:n.y+a*r/2,width:n.width-o*r,height:n.height-a*r}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},kx=Math.PI,Px=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new qf;var i=new qf({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Px.prototype={constructor:Px,hasBuilder:function(t){return!!Ox[t]},add:function(t){Ox[t].call(this)},getGroup:function(){return this.group}};var Ox={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],o=[i[1],0];n&&(ie(r,r,n),ie(o,o,n));var s=a({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new pv(oo({anid:"line",shape:{x1:r[0],y1:r[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),h=e.get("axisLine.symbolSize");if(null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof h||"number"==typeof h)&&(h=[h,h]);var u=h[0],c=h[1];f([[t.rotation+Math.PI/2,r],[t.rotation-Math.PI/2,o]],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=dl(l[e],-u/2,-c/2,u,c,s.stroke,!0);i.attr({rotation:t[0],position:t[1],silent:!0}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=Jl(this,t,e),n=th(this,t,e);jl(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=A(t.axisName,e.get("name"));if(i){var n,r=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,Ql(r)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*kx/180);var f;Ql(r)?n=zx(t.rotation,null!=d?d:t.rotation,o):(n=Ul(t,r,d||0,h),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var g=s.getFont(),p=e.get("nameTruncate",!0)||{},v=p.ellipsis,m=A(t.nameTruncateMaxWidth,p.maxWidth,f),y=null!=v&&null!=m?qg(i,m,g,v,{minChar:2,placeholder:p.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new rv({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Yl(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});So(b.style,s,{text:y,textFont:g,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=ql(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},zx=Px.innerTextLayout=function(t,e,i){var n,r,o=Nn(e-t);return Hn(o)?(r=i>0?"top":"bottom",n="center"):Hn(o-kx)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&kx>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:r}},Ex=Px.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?(a=s.getTicks()[e],!i(a,s.getLabel(a))):e%(i+1))},Rx=Px.getInterval=function(t,e){var i=t.get("interval");return(null==i||"auto"==i)&&(i=e),i},Bx=f,Vx=x,Nx=Ds({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&sh(t),Nx.superApply(this,"render",arguments),dh(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){dh(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Nx.superApply(this,"remove",arguments)},dispose:function(t,e){fh(this,e),Nx.superApply(this,"dispose",arguments)}}),Hx=[];Nx.registerAxisPointerClass=function(t,e){if(Rd&&Hx[t])throw new Error("axisPointer "+t+" exists");Hx[t]=e},Nx.getAxisPointerClass=function(t){return t&&Hx[t]};var Fx=Px.ifIgnoreOnTick,Gx=Px.getInterval,Wx=["axisLine","axisTickLabel","axisName"],Zx=["splitArea","splitLine"],Xx=Nx.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new qf,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=gh(o,t),s=new Px(t,a);f(Wx,s.add,s),this._axisGroup.add(s.getGroup()),f(Zx,function(e){t.get(e+".show")&&this["_"+e](t,o,a.labelInterval)},this),Vo(r,this._axisGroup,t),Xx.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var r=t.getModel("splitLine"),o=r.getModel("lineStyle"),a=o.get("color"),l=Gx(r,i);a=_(a)?a:[a];for(var h=e.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,d=n.getTicksCoords(),f=n.scale.getTicks(),g=t.get("axisLabel.showMinLabel"),p=t.get("axisLabel.showMaxLabel"),v=[],m=[],y=o.getLineStyle(),x=0;x0&&Ih(i[r-1]);r--);for(;r>n&&Ih(i[n]);n++);}for(;r>n;)n+=Th(t,i,n,r,r,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),s_=Wr.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:sv(Wr.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,r=0,o=i.length,a=e.smoothMonotone,s=Ah(i,e.smoothConstraint),l=Ah(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Ih(i[o-1]);o--);for(;o>r&&Ih(i[r]);r++);}for(;o>r;){var h=Th(t,i,r,o,o,1,s.min,s.max,e.smooth,a,e.connectNulls);Th(t,n,r+h-1,h,o,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),r+=h+1,t.closePath()}}});Ha.extend({type:"line",init:function(){var t=new qf,e=new _h;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle.normal"),l=t.getModel("areaStyle.normal"),h=o.mapArray(o.getItemLayout,!0),u="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,g=this._polygon,p=this._lineGroup,v=t.get("animation"),m=!l.isEmpty(),y=Ph(n,o),x=t.get("showSymbol"),_=x&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(o,n),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),w.setItemGraphicEl(e,null))}),x||d.remove(),r.add(p);var b=!u&&t.get("step");f&&c.type===n.type&&b===this._step?(m&&!g?g=this._newPolygon(h,y,n,v):g&&!m&&(p.remove(g),g=this._polygon=null),p.setClipPath(Eh(n,!1,t)),x&&d.updateData(o,_),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Ch(this._stackedOnPoints,y)&&Ch(this._points,h)||(v?this._updateAnimation(o,y,n,i,b):(b&&(h=Rh(h,n,b),y=Rh(y,n,b)),f.setShape({points:h}),g&&g.setShape({points:h,stackedOnPoints:y})))):(x&&d.updateData(o,_),b&&(h=Rh(h,n,b),y=Rh(y,n,b)),f=this._newPolyline(h,n,v),m&&(g=this._newPolygon(h,y,n,v)),p.setClipPath(Eh(n,!0,t)));var S=Bh(o,n)||o.getVisual("color");f.useStyle(s(a.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var M=t.get("smooth");if(M=Dh(t.get("smooth")),f.setShape({smooth:M,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),g){var I=o.stackedOn,T=0;if(g.useStyle(s(l.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),I){var A=I.hostModel;T=Dh(A.get("smooth"))}g.setShape({smooth:M,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=y,this._points=h,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),o=ta(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 yh(r,o),a.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 Ha.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=ta(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 Ha.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new a_({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 s_({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];return i&&i.isLabelIgnored?y(i.isLabelIgnored,i):void 0},_updateAnimation:function(t,e,i,n,r){var o=this._polyline,a=this._polygon,s=t.hostModel,l=Qx(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;r&&(h=Rh(l.current,i,r),u=Rh(l.stackedOnCurrent,i,r),c=Rh(l.next,i,r),d=Rh(l.stackedOnNext,i,r)),o.shape.__points=l.current,o.shape.points=h,Oo(o,{shape:{points:c}},s),a&&(a.setShape({points:h,stackedOnPoints:u}),Oo(a,{shape:{points:c,stackedOnPoints:d}},s));for(var f=[],g=l.status,p=0;pe&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1){var h;"string"==typeof i?h=u_[i]:"function"==typeof i&&(h=i),h&&(e=e.downSample(o.dim,1/l,h,c_),t.setData(e))}}},this)};Ts(x(l_,"line","circle","line")),Is(x(h_,"line")),_s(Fm.PROCESSOR.STATISTIC,x(d_,"line"));var f_={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},R())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},g_=Ls({type:"series.pie",init:function(t){g_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){g_.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t){var e=Gs(["value"],t.data),i=new vy(e,this);return i.initData(t.data),i},getDataParams:function(t){var e=this.getData(),i=g_.superCall(this,"getDataParams",t),n=[];return e.each("value",function(t){n.push(t)}),i.percent=Vn(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){qo(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});c(g_,f_);var p_=Hh.prototype;p_.updateData=function(t,e,i){function n(){o.stopAnimation(!0),o.animateTo({shape:{r:u.r+l.get("hoverOffset")}},300,"elasticOut")}function r(){o.stopAnimation(!0),o.animateTo({shape:{r:u.r}},300,"elasticOut")}var o=this.childAt(0),l=t.hostModel,h=t.getItemModel(e),u=t.getItemLayout(e),c=a({},u);if(c.label=null,i){o.setShape(c);var d=l.getShallow("animationType");"scale"===d?(o.shape.r=u.r0,zo(o,{shape:{r:u.r}},l,e)):(o.shape.endAngle=u.startAngle,Oo(o,{shape:{endAngle:u.endAngle}},l,e))}else Oo(o,{shape:c},l,e);var f=h.getModel("itemStyle"),g=t.getItemVisual(e,"color");o.useStyle(s({lineJoin:"bevel",fill:g},f.getModel("normal").getItemStyle())),o.hoverStyle=f.getModel("emphasis").getItemStyle();var p=h.getShallow("cursor");p&&o.attr("cursor",p),Nh(this,t.getItemLayout(e),h.get("selected"),l.get("selectedOffset"),l.get("animation")),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&l.isAnimationEnabled()&&o.on("mouseover",n).on("mouseout",r).on("emphasis",n).on("normal",r),this._updateLabel(t,e),wo(this)},p_._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=a.label,l=t.getItemVisual(e,"color");Oo(i,{shape:{points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]}},r,e),Oo(n,{style:{x:s.x,y:s.y}},r,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label.normal"),u=o.getModel("label.emphasis"),c=o.getModel("labelLine.normal"),d=o.getModel("labelLine.emphasis"),l=t.getItemVisual(e,"color");bo(n.style,n.hoverStyle={},h,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!h.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle();var f=c.get("smooth");f&&f===!0&&(f=.4),i.setShape({smooth:f})},u(Hh,qf);var v_=(Ha.extend({type:"pie",init:function(){var t=new qf;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var r=t.getData(),o=this._data,a=this.group,s=e.get("animation"),l=!o,h=t.get("animationType"),u=x(Vh,this.uid,t,s,i),c=t.get("selectedMode");if(r.diff(o).add(function(t){var e=new Hh(r,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",u),r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(r,t),i.off("click"),c&&i.on("click",u),a.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),s&&l&&r.count()>0&&"scale"!==h){var d=r.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,g=y(a.removeClipPath,a);a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,g,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,i,n,r,o,a){var s=new lv({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return zo(s,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var r=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(r*r+o*o);return a<=n.r&&a>=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",bs(e,function(i,n){var r={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);r[i]=t.isSelected(i)||!1})}),{name:i.name,selected:r}})})}),m_=function(t,e){var i={};e.eachRawSeriesByType(t,function(t){var n=t.getRawData(),r={};if(!e.isSeriesFiltered(t)){var o=t.getData();o.each(function(t){var e=o.getRawIndex(t);r[e]=t}),n.each(function(e){var a=r[e],s=null!=a&&o.getItemVisual(a,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var l=n.getItemModel(e),h=l.get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",h),null!=a&&o.setItemVisual(a,"color",h)}})}})},y_=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),g=f.getModel("label.normal"),p=g.get("position")||f.get("label.emphasis.position"),v=f.getModel("labelLine.normal"),m=v.get("length"),y=v.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x); r=d.cx,o=d.cy;var b="inside"===p||"inner"===p;if("center"===p)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+_*(m+e-d.r),T=M+w*(m+e-d.r),A=I+(0>_?-1:1)*y,C=T;n=A+(0>_?-5:5),h=C,u=[[S,M],[I,T],[A,C]]}c=b?"center":_>0?"left":"right"}var D=g.getFont(),L=g.get("rotate")?0>_?-x+Math.PI:-x:0,k=t.getFormattedLabel(i,"normal")||a.getName(i),P=yi(k,D,c,"top");l=!!L,d.label={x:n,y:h,position:p,height:P.height,len:m,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Gh(s,r,o,e,i,n)},x_=2*Math.PI,__=Math.PI/180,w_=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var r=i.getWidth(),o=i.getHeight(),a=Math.min(r,o),s=Pn(e[0],r),l=Pn(e[1],o),h=Pn(n[0],a/2),u=Pn(n[1],a/2),c=t.getData(),d=-t.get("startAngle")*__,f=t.get("minAngle")*__,g=0;c.each("value",function(t){!isNaN(t)&&g++});var p=c.getSum("value"),v=Math.PI/(p||g)*2,m=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),w=c.getDataExtent("value");w[0]=0;var b=x_,S=0,M=d,I=m?1:-1;if(c.each("value",function(t,e){var i;if(isNaN(t))return void c.setItemLayout(e,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:m,cx:s,cy:l,r0:h,r:y?0/0:u});i="area"!==y?0===p&&x?v:t*v:x_/g,f>i?(i=f,b-=f):S+=t;var n=M+I*i;c.setItemLayout(e,{angle:i,startAngle:M,endAngle:n,clockwise:m,cx:s,cy:l,r0:h,r:y?kn(t,w,[h,u]):u}),M=n},!0),x_>b&&g)if(.001>=b){var T=x_/g;c.each("value",function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e);i.angle=T,i.startAngle=d+I*e*T,i.endAngle=d+I*(e+1)*T}})}else v=b/S,M=d,c.each("value",function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e),n=i.angle===f?f:t*v;i.startAngle=M,i.endAngle=M+I*n,M+=I*n}});y_(t,u,r,o)})},b_=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,function(t){var e=t.getData();e.filterSelf(function(t){for(var n=e.getName(t),r=0;r=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2,n}},Ma.register("single",{create:Zh,dimensions:Wh.prototype.dimensions});var M_=Px.getInterval,I_=Px.ifIgnoreOnTick,T_=["axisLine","axisTickLabel","axisName"],A_="splitLine",C_=Nx.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var r=this.group;r.removeAll();var o=Xh(t),a=new Px(t,o);f(T_,a.add,a),r.add(a.getGroup()),t.get(A_+".show")&&this["_"+A_](t,o.labelInterval),C_.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),o=r.get("width"),a=r.get("color"),s=M_(n,e);a=a instanceof Array?a:[a];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),f=[],g=[],p=t.get("axisLabel.showMinLabel"),v=t.get("axisLabel.showMaxLabel"),m=0;m=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){hu(e.getZr(),"axisPointer"),V_.superApply(this._model,"remove",arguments)},dispose:function(t,e){hu("axisPointer",e),V_.superApply(this._model,"dispose",arguments)}}),N_=Vv(),H_=n,F_=y;uu.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=x(cu,e,u);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new qf,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);pu(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=lh(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=N_(t).pointerEl=new Cv[i.type](H_(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var r=N_(t).labelEl=new gv(H_(e.label));t.add(r),fu(r,n)}},updatePointerEl:function(t,e,i){var n=N_(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=N_(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),fu(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,r=e.getModel("handle"),o=e.get("status");if(!r.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var a;this._handle||(a=!0,n=this._handle=Fo(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){wg(t.event)},onmousedown:F_(this._onHandleDragMove,this,0,0),drift:F_(this._onHandleDragMove,this),ondragend:F_(this._onHandleDragEnd,this)}),i.add(n)),pu(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(r.getItemStyle(null,s));var l=r.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Za(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,a)}},_moveHandleToValue:function(t,e){cu(this._axisPointerModel,!e&&this._moveAnimation,this._handle,gu(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(gu(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(gu(n)),N_(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){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 i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},uu.prototype.constructor=uu,ar(uu);var G_=uu.extend({makeElOption:function(t,e,i,n,r){var o=i.axis,a=o.grid,s=n.get("type"),l=Mu(a,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var u=vu(n),c=W_[s](o,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=gh(a.model,i);wu(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=gh(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:_u(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.grid,o=n.getGlobalExtent(!0),a=Mu(r,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var h=(a[1]+a[0])/2,u=[h,h];u[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:u,tooltipOption:c[s]}}}),W_={line:function(t,e,i,n){var r=bu([e,i[0]],[e,i[1]],Iu(t));return oo({shape:r,style:n}),{type:"Line",shape:r}},shadow:function(t,e,i){var n=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:Su([e-n/2,i[0]],[n,r],Iu(t))}}};Nx.registerAxisPointerClass("CartesianAxisPointer",G_),xs(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),_s(Fm.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=eh(t,e)}),bs({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},E_);var Z_=["x","y"],X_=["width","height"],q_=uu.extend({makeElOption:function(t,e,i,n,r){var o=i.axis,a=o.coordinateSystem,s=Au(a,1-Tu(o)),l=a.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=vu(n),c=U_[h](o,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=Xh(i);wu(e,t,d,i,n,r)},getHandleTransform:function(t,e,i){var n=Xh(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:_u(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,r=n.coordinateSystem,o=Tu(n),a=Au(r,o),s=t.position;s[o]+=e[o],s[o]=Math.min(a[1],s[o]),s[o]=Math.max(a[0],s[o]);var l=Au(r,1-o),h=(l[1]+l[0])/2,u=[h,h];return u[o]=s[o],{position:s,rotation:t.rotation,cursorPoint:u,tooltipOption:{verticalAlign:"middle"}}}}),U_={line:function(t,e,i,n){var r=bu([e,i[0]],[e,i[1]],Tu(t));return oo({shape:r,style:n}),{type:"Line",shape:r}},shadow:function(t,e,i){var n=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:Su([e-n/2,i[0]],[n,r],Tu(t))}}};Nx.registerAxisPointerClass("SingleAxisPointer",q_),Ds({type:"single"});var Y_=2,j_=_m.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){j_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=Cu().key(function(t){return t[2]}).entries(t),n=g(i,function(t){return{name:t.key,dataList:t.values}}),r=n.length,o=-1,a=-1,s=0;r>s;++s){var l=n[s].dataList.length;l>o&&(o=l,a=s)}for(var h=0;r>h;++h)if(h!==a)for(var u=n[h].name,c=0;o>c;++c){for(var d=n[a].dataList[c][0],f=n[h].dataList.length,p=-1,v=0;f>v;++v){var m=n[h].dataList[v][0];if(m===d){p=v;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){var i=[],n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],r=n.get("type");i=[{name:"time",type:"category"===r?"ordinal":"time"===r?"time":"float"},{name:"value",type:"float"},{name:"name",type:"ordinal"}];for(var o=v(t.data,function(t){return void 0!==t[2]}),a=this.fixData(o||[]),s=[],l=this.nameMap=R(),h=0,u=0;ur;++r)n[r]=r;for(var o=Cu().key(function(t){return e.get("name",t)}).entries(n),a=g(o,function(t){return{name:t.key,indices:t.values}}),s=0;ss;++s){for(var l=Number.MAX_VALUE,h=-1,u=r[s].indices.length,c=0;u>c;++c){var d=n.get(t[0],r[s].indices[c]),f=Math.abs(d-e);l>=f&&(i=d,l=f,h=r[s].indices[c])}o.push(h)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),i=e.get("name",t),n=e.get("value",t);return(isNaN(n)||null==n)&&(n="-"),jn(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{normal:{margin:4,textAlign:"right",show:!0,position:"left",color:"#000",fontSize:11},emphasis:{show:!0}}}});ks({type:"themeRiver",init:function(){this._layers=[]},render:function(t){function e(t){return t.name}function i(e,i,s){var l=this._layers;if("remove"===e)return void r.remove(l[i]);for(var h,u=[],d=[],f=o[i].indices,g=0;g=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}}});bs("legendToggleSelect","legendselectchanged",x(Pu,"toggleSelected")),bs("legendSelect","legendselected",x(Pu,"select")),bs("legendUnSelect","legendunselected",x(Pu,"unSelect"));var J_=x,tw=f,ew=qf,iw=Ds({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new ew),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()},a=t.get("padding"),l=ua(r,o,a),h=this.layoutInner(t,n,l),u=ua(s({width:h.width,height:h.height},r),o,a);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=Ou(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=R(),a=e.get("selectedMode");tw(e.getData(),function(s,l){var h=s.get("name");if(!this.newlineDisabled&&(""===h||"\n"===h))return void r.add(new ew({newline:!0}));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",g=c.getVisual("symbol"),p=this._createItem(h,l,s,e,f,g,t,d,a);p.on("click",J_(zu,h,n)).on("mouseover",J_(Eu,u,null,n)).on("mouseout",J_(Ru,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(0>u)return;var c=r.getItemVisual(u,"color"),d="roundRect",f=this._createItem(h,l,s,e,d,null,t,c,a);f.on("click",J_(zu,h,n)).on("mouseover",J_(Eu,i,h,n)).on("mouseout",J_(Ru,i,h,n)),o.set(h,!0)}},this);Rd&&(o.get(h)||console.warn(h+" series not exists. Legend data should be same with series name or data name."))}},this)},_createItem:function(t,e,i,n,r,o,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),g=new ew,p=i.getModel("textStyle"),v=i.get("icon"),m=i.getModel("tooltip"),y=m.parentModel;if(r=v||r,g.add(dl(r,0,0,u,c,f?l:d,!0)),!v&&o&&(o!==r||"none"==o)){var x=.8*c;"none"===o&&(o="circle"),g.add(dl(o,(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)),g.add(new rv({style:So({},p,{text:S,x:_,y:c/2,textFill:f?p.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new gv({shape:g.getBoundingRect(),invisible:!0,tooltip:m.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return g.add(M),g.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(g),wo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();Zv(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()}}),nw=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 g=[0,0],p=[-c.x,-c.y],v=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var m=t.get("pageButtonPosition",!0);"end"===m?p[a]+=i[s]-c[s]:g[a]+=c[s]+v}p[1-a]+=u[l]/2-c[l]/2,n.attr("position",f),r.attr("position",g),o.attr("position",p);var y=this.group.getBoundingRect(),y={x:0,y:0};if(y[s]=d?i[s]:u[s],y[l]=Math.max(u[l],c[l]),y[h]=Math.min(0,c[h]+p[1-a]),r.__rectSize=i[s],d){var x={x:0,y:0};x[s]=Math.max(i[s]-c[s]-v,0),x[l]=y[l],r.setClipPath(new gv({shape:x})),r.__rectSize=x[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Oo(n,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_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;f(["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",b(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=aw[u],d=aw[1-u],f=sw[u],g=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var p=h?Math.ceil(l[c]/h):0;if(o){var v=o.getBoundingRect(),m=o.position[u]+v[f];g[u]=-m-l[f],i=Math.floor(p*(m+v[f]+h/2)/l[c]),i=l[c]&&p?Math.max(0,Math.min(p-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-g[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=_[x],b=e(w);if(y[f]=b[f]+b[c]-y[c],0>=x&&b[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:g,pageIndex:i,pageCount:p,pagePrevDataIndex:n,pageNextDataIndex:r}}});bs("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Cs({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 hw=f,uw=Yn,cw=["","-webkit-","-moz-","-o-"],dw="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";Fu.prototype={constructor:Fu,_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=dw+Hu(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var 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(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var fw=y,gw=f,pw=Pn,vw=new gv({shape:{x:-1,y:-1,width:2,height:2}});Ds({type:"tooltip",init:function(t,e){if(!Hd.node){var i=new Fu(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!Hd.node){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,e=t.get("triggerOn");nu("itemTooltip",this._api,fw(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&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&&!Hd.node){var r=Wu(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=vw;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=k_(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||r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Wu(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){var l=s.getData(),t=Gu([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,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=y(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=Gu([e.tooltipOption,n]);gw(t,function(t){gw(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=xu(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(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=hl(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=Gu([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),g="item_"+a.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,g,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){var r=n;n={content:r,formatter:r}}var o=new Go(n,this._tooltipModel,this._ecModel),a=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),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=Kn(h,i,!0);else if("function"==typeof h){var c=fw(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=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),"function"==typeof e&&(e=e([i,n],o,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),_(e))i=pw(e[0],s),n=pw(e[1],l);else if(S(e)){e.width=h[0],e.height=h[1];var f=ua(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else if("string"==typeof e&&a){var g=Uu(e,d,h);i=g[0],n=g[1]}else{var g=Zu(i,n,r.el,s,l,u?null:20,c?null:20);i=g[0],n=g[1]}if(u&&(i-=Yu(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=Yu(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){var g=Xu(i,n,r.el,s,l);i=g[0],n=g[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&gw(e,function(e,n){var r=e.dataByAxis||{},o=t[n]||{},a=o.dataByAxis||[];i&=r.length===a.length,i&&gw(r,function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length,i&&gw(r,function(t,e){var n=o[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){Hd.node||(this._tooltipContent.hide(),hu("itemTooltip",e))}}),bs({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),bs({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var mw=Un,yw=jn,xw=Cs({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){if(Rd&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(Hd.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var r=this.constructor,o=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[o];return i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ju(i),f(i.data,function(t){t instanceof Array?(ju(t[0]),ju(t[1])):ju(t)}),s=new r(i,this,e),a(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[o]=s)):void(t[o]=null)},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=_(i)?g(i,mw).join(", "):mw(i),r=e.getName(t),o=yw(this.name);return(null!=i||r)&&(o+="
"),r&&(o+=yw(r),null!=i&&(o+=" : ")),null!=i&&(o+=yw(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});c(xw,Bv),xw.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var _w=h,ww=x,bw={min:ww(Ju,"min"),max:ww(Ju,"max"),average:ww(Ju,"average")},Sw=Ds({type:"marker",init:function(){this.markerGroupMap=R()},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(){}});Sw.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(oc(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,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new _h),h=ac(r,t,e);e.setData(h),oc(e.getData(),t,n),h.each(function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||a.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),xs(function(t){t.markPoint=t.markPoint||{}}),xw.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var Mw=pv.prototype,Iw=mv.prototype,Tw=Jr({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){(sc(e)?Mw:Iw).buildPath(t,e)},pointAt:function(t){return sc(this.shape)?Mw.pointAt.call(this,t):Iw.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=sc(e)?[e.x2-e.x1,e.y2-e.y1]:Iw.tangentAt.call(this,t);return $(i,i)}}),Aw=["fromSymbol","toSymbol"],Cw=fc.prototype;Cw.beforeUpdate=dc,Cw._createLine=function(t,e,i){var n=t.hostModel,r=t.getItemLayout(e),o=uc(r);o.shape.percent=0,zo(o,{shape:{percent:1}},n,e),this.add(o);var a=new rv({name:"label"});this.add(a),f(Aw,function(i){var n=hc(i,t,e);this.add(n),this[lc(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},Cw.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};cc(a.shape,o),Oo(r,a,n,e),f(Aw,function(i){var n=t.getItemVisual(e,i),r=lc(i);if(this[r]!==n){this.remove(this.childOfName(i));var o=hc(i,t,e);this.add(o)}this[r]=n},this),this._updateCommonStl(t,e,i)},Cw._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=i&&i.lineStyle,a=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle.normal").getLineStyle(),a=u.getModel("lineStyle.emphasis").getLineStyle(),l=u.getModel("label.normal"),h=u.getModel("label.emphasis")}var c=t.getItemVisual(e,"color"),d=D(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),r.hoverStyle=a,f(Aw,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var g,p,v,m,y=l.getShallow("show"),x=h.getShallow("show"),_=this.childOfName("label");if(y||x){var w=n.getRawValue(e);p=null==w?p=t.getName(e):isFinite(w)?On(w):w,g=c||"#000",v=C(n.getFormattedLabel(e,"normal",t.dataType),p),m=C(n.getFormattedLabel(e,"emphasis",t.dataType),v)}if(y){var b=So(_.style,l,{text:v},{autoColor:g});_.__textAlign=b.textAlign,_.__verticalAlign=b.textVerticalAlign,_.__position=l.get("position")||"middle"}else _.setStyle("text",null);_.hoverStyle=x?{text:m,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},_.ignore=!y&&!x,wo(this)},Cw.highlight=function(){this.trigger("emphasis")},Cw.downplay=function(){this.trigger("normal")},Cw.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},Cw.setLinePoints=function(t){var e=this.childOfName("line");cc(e.shape,t),e.dirty()},u(fc,qf);var Dw=vc.prototype;Dw.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,r=t.hostModel,o={lineStyle:r.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:r.getModel("lineStyle.emphasis").getLineStyle(),labelModel:r.getModel("label.normal"),hoverLabelModel:r.getModel("label.emphasis")};t.diff(e).add(function(e){if(pc(t.getItemLayout(e))){var r=new n(t,e,o);t.setItemGraphicEl(e,r),i.add(r)}}).update(function(r,a){var s=e.getItemGraphicEl(a);return pc(t.getItemLayout(r))?(s?s.updateData(t,r,o):s=new n(t,r,o),t.setItemGraphicEl(r,s),void i.add(s)):void i.remove(s)}).remove(function(t){i.remove(e.getItemGraphicEl(t))}).execute(),this._lineData=t},Dw.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},Dw.remove=function(){this.group.removeAll()};var Lw=function(t,e,i,o){var s=t.getData(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||null!=o.xAxis||null!=o.yAxis)){var h,u,c;if(null!=o.yAxis||null!=o.xAxis)u=null!=o.yAxis?"y":"x",h=e.getAxis(u),c=A(o.yAxis,o.xAxis);else{var d=ec(o,s,e,t);u=d.valueDataDim,h=d.valueAxis,c=rc(s,u,l)}var f="x"===u?0:1,g=1-f,p=n(o),v={};p.type=null,p.coord=[],v.coord=[],p.coord[g]=-1/0,v.coord[g]=1/0;var m=i.get("precision");m>=0&&"number"==typeof c&&(c=+c.toFixed(Math.min(m,20))),p.coord[f]=v.coord[f]=c,o=[p,v,{type:l,valueIndex:o.valueIndex,value:c}]}return o=[tc(t,o[0]),tc(t,o[1]),a({},o[2])],o[2].type=o[2].type||"",r(o[2],o[0]),r(o[2],o[1]),o};Sw.extend({type:"markLine",updateLayout: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){_c(r,e,!0,t,i),_c(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);_c(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||p[r?0:1],symbol:o.get("symbol",!0)||g[r?0:1],color:o.get("itemStyle.normal.color")||s.getVisual("color")})}var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(a)||l.set(a,new vc);this.group.add(h.group);var u=wc(o,t,e),c=u.from,d=u.to,f=u.line;e.__from=c,e.__to=d,e.setData(f);var g=e.get("symbol"),p=e.get("symbolSize");_(g)||(g=[g,g]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){r(c,t,!0),r(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.normal.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),h.updateData(f),u.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),xs(function(t){t.markLine=t.markLine||{}}),Uv.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var kw=["x","y","z","radius","angle","single"],Pw=["cartesian2d","polar","singleAxis"],Ow=Sc(kw,["axisIndex","axis","index","id"]),zw=f,Ew=zn,Rw=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};Rw.prototype={constructor:Rw,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(bc(i.get("coordinateSystem"))){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)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,r=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var a;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(r.get(e)||0)&&(a=t)}),a},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel(),n=i.axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[t.start,t.end],s=[];return zw(["startValue","endValue"],function(e){s.push(null!=t[e]?n.parse(t[e]):null)}),zw([0,1],function(t){var i=s[t],l=a[t];"percent"===r[t]?(null==l&&(l=o[t]),i=n.parse(kn(l,o,e,!0))):l=kn(i,e,o,!0),s[t]=i,a[t]=l}),{valueWindow:Ew(s),percentWindow:Ew(a)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=Ic(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,Cc(this),Ac(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Ac(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;if("none"!==r){var a=this.getOtherAxisModel();t.get("$fromToolbox")&&a&&"category"===a.get("type")&&(r="empty"),zw(n,function(t){var n=t.getData(),a=t.coordDimToDataDim(i);"weakFilter"===r?n&&n.filterSelf(function(t){for(var e,i,r,s=0;so[1];if(h&&!u&&!c)return!0;h&&(r=!0),u&&(e=!0),c&&(i=!0)}return r&&e&&i}):n&&zw(a,function(i){"empty"===r?t.setData(n.map(i,function(t){return e(t)?t:0/0})):n.filterSelf(i,e)})})}}}};var Bw=f,Vw=Ow,Nw=Cs({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=Dc(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Dc(t);r(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;Hd.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Lc(this,t),Bw([["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 Rw(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Vw(function(e){var i=e.axisIndex;t[i]=Xo(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Vw(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):Bw(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Vw(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;a>o;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&Vw(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex),o=t.get(e.axisId),a=t.ecModel.queryComponents({mainType:e.axis,index:r,id:o})[0];if(Rd&&!a)throw new Error(e.axis+' "'+A(r,o,0)+'" not found');r=a.componentIndex,h(n,r)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return Vw(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Vw(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;Vw(function(n){Bw(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;Bw([["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&&Lc(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},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()}}),Hw=wm.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var r,o=0;oo&&(e[1-n]=e[n]+u.sign*o),e}),Gw=gv,Ww=kn,Zw=zn,Xw=y,qw=f,Uw=7,Yw=1,jw=30,Kw="horizontal",$w="vertical",Qw=5,Jw=["line","bar","candlestick","scatter"],tb=Hw.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){return tb.superApply(this,"render",arguments),Za(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),this.dataZoomModel.get("show")===!1?void this.group.removeAll():(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),void this._updateView())},remove:function(){tb.superApply(this,"remove",arguments),Xa(this,"_dispatchZoomAction")},dispose:function(){tb.superApply(this,"dispose",arguments),Xa(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new qf;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===Kw?{right:n.width-i.x-i.width,top:n.height-jw-Uw,width:i.width,height:jw}:{right:Uw,top:i.y,width:jw,height:i.height},o=fa(t.option);f(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=ua(o,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],this._orient===$w&&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!==Kw||r?i===Kw&&r?{scale:a?[-1,1]:[-1,-1]}:i!==$w||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 Gw({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new Gw({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:y(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),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var l,h=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=u[1]/(n.count()-1),g=0,p=Math.round(n.count()/e[0]);n.each([r],function(t,e){if(p>0&&e%p)return void(g+=f);var i=null==t||isNaN(t)||""===t,n=i?0:Ww(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([g,0]),d.push([g,0])),c.push([g,n]),d.push([g,n]),g+=f,l=i});var v=this.dataZoomModel;this._displayables.barGroup.add(new dv({shape:{points:c},style:s({fill:v.get("dataBackgroundColor")},v.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new fv({shape:{points:d},style:v.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(r,o){var a=t.getAxisProxy(r.name,o).getTargetSeriesModels();f(a,function(t){if(!(i||e!==!0&&h(Jw,t.get("type"))<0)){var a,s=n.getComponent(r.axis,o).axis,l=Oc(r.name),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:r.name,otherDim:l,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 Gw({draggable:!0,cursor:zc(this._orient),drift:Xw(this._onDragMove,this,"all"),onmousemove:function(t){wg(t.event)},ondragstart:Xw(this._showDataInfo,this,!0),ondragend:Xw(this._onDragEnd,this),onmouseover:Xw(this._showDataInfo,this,!0),onmouseout:Xw(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new Gw(ao({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:Yw,fill:"rgba(0,0,0,0)"}}))),qw([0,1],function(t){var r=Fo(o.get("handleIcon"),{cursor:zc(this._orient),draggable:!0,drift:Xw(this._onDragMove,this,t),onmousemove:function(t){wg(t.event)},ondragend:Xw(this._onDragEnd,this),onmouseover:Xw(this._showDataInfo,this,!0),onmouseout:Xw(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=Pn(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 rv({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=[Ww(t[0],[0,100],e,!0),Ww(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];Fw(e,n,r,i.get("zoomLock")?"all":t,null!=o.minSpan?Ww(o.minSpan,a,r,!0):null,null!=o.maxSpan?Ww(o.maxSpan,a,r,!0):null),this._range=Zw([Ww(n[0],r,a,!0),Ww(n[1],r,a,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=Zw(i.slice()),r=this._size;qw([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=Eo(n.handles[t].parent,this.group),i=Bo(0===t?"right":"left",e),s=this._handleWidth/2+Qw,l=Ro([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===Kw?"middle":i,textAlign:o===Kw?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=Zw(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 w(n)?n(t,o):b(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=this._displayables.barGroup.getLocalTransform(),r=Ro([e,i],n,!0);this._updateInterval(t,r[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),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(qw(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}});Nw.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var eb="\x00_ec_interaction_mutex";bs({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(Bc,cf);var ib=x,nb="\x00_ec_dataZoom_roams",rb=y,ob=Hw.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i,n){ob.superApply(this,"render",arguments),Uc(n,t.id)&&(this._range=t.getPercentRange()),f(this.getTargetCoordInfo(),function(e,n){var r=g(e,function(t){return Yc(t.model)});f(e,function(e){var o=e.model,a=t.option;Xc(i,{coordId:Yc(o),allCoordIds:r,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:rb(this._onPan,this,e,n),zoomGetRange:rb(this._onZoom,this,e,n),zoomLock:a.zoomLock,disabled:a.disabled,roamControllerOpt:{zoomOnMouseWheel:a.zoomOnMouseWheel,moveOnMouseMove:a.moveOnMouseMove,preventDefaultMouseMove:a.preventDefaultMouseMove}})},this)},this)},dispose:function(){qc(this.api,this.dataZoomModel.id),ob.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,r,o,a,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=ab[e]([o,a],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return Fw(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,r,o){var a=this._range.slice(),s=t.axisModels[0];if(s){var l=ab[e](null,[r,o],s,i,t),h=(l.signal>0?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 Fw(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a}}}),ab={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}};_s(function(t){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(nd),t.eachTargetAxis(rd)}),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)})}),bs("dataZoom",function(t,e){var i=Mc(y(e.eachComponent,e,"dataZoom"),Ow,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var sb=f,lb=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),sb(e,function(t){if(t){od(t,"splitList")&&!od(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&sb(e,function(t){S(t)&&(od(t,"start")&&!od(t,"min")&&(t.min=t.start),od(t,"end")&&!od(t,"max")&&(t.max=t.end))})}})};Uv.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var hb=f,ub=S,cb=-1,db=function(t){var e=t.mappingMethod,i=t.type,r=this.option=n(t);this.type=i,this.mappingMethod=e,this._normalizeData=gb[e];var o=fb[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(ld(r),ad(r)):"category"===e?r.categories?sd(r):ld(r,!0):(P("linear"!==e||r.dataExtent),ld(r))};db.prototype={constructor:db,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return y(this._normalizeData,this)}};var fb=db.visualHandlers={color:{applyVisual:cd("color"),getColorMapper:function(){var t=this.option;return y("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),dd.call(this,t)}:function(e,i,n){var r=!!n;return!i&&(e=this._normalizeData(e)),n=Ee(e,t.parsedVisual,n),r?n:Ne(n,"rgba")},this)},_doMap:{linear:function(t){return Ne(Ee(t,this.option.parsedVisual),"rgba")},category:dd,piecewise:function(t,e){var i=pd.call(this,e);return null==i&&(i=Ne(Ee(t,this.option.parsedVisual),"rgba")),i},fixed:fd}},colorHue:hd(function(t,e){return Be(t,e)}),colorSaturation:hd(function(t,e){return Be(t,null,e)}),colorLightness:hd(function(t,e){return Be(t,null,null,e)}),colorAlpha:hd(function(t,e){return Ve(t,e)}),opacity:{applyVisual:cd("opacity"),_doMap:gd([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(b(n))i("symbol",n);else if(ub(n))for(var r in n)n.hasOwnProperty(r)&&i(r,n[r])},_doMap:{linear:ud,category:dd,piecewise:function(t,e){var i=pd.call(this,e);return null==i&&(i=ud.call(this,t)),i},fixed:fd}},symbolSize:{applyVisual:cd("symbolSize"),_doMap:gd([0,1])}},gb={linear:function(t){return kn(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=db.findPieceIndex(t,e,!0);return null!=i?kn(i,[0,e.length-1],[0,1],!0):void 0},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?cb:e},fixed:B};db.listVisualTypes=function(){var t=[];return f(fb,function(e,i){t.push(i)}),t},db.addVisualHandler=function(t,e){fb[t]=e},db.isValidType=function(t){return fb.hasOwnProperty(t)},db.eachVisual=function(t,e,i){S(t)?f(t,e,i):e.call(i,t)},db.mapVisual=function(t,e,i){var n,r=_(t)?[]:S(t)?{}:(n=!0,null);return db.eachVisual(t,function(t,o){var a=e.call(i,t,o);n?r=a:r[o]=a}),r},db.retrieveVisuals=function(t){var e,i={};return t&&hb(fb,function(n,r){t.hasOwnProperty(r)&&(i[r]=t[r],e=!0)}),e?i:null},db.prepareVisualTypes=function(t){if(ub(t)){var e=[];hb(t,function(t,i){e.push(i)}),t=e}else{if(!_(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},db.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},db.findPieceIndex=function(t,e,i){function n(e,i){var n=Math.abs(e-t);o>n&&(o=n,r=i)}for(var r,o=1/0,a=0,s=e.length;s>a;a++){var l=e[a].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return a;i&&n(l,a)}}for(var a=0,s=e.length;s>a;a++){var h=e[a],u=h.interval,c=h.close;if(u){if(u[0]===-1/0){if(md(c[1],t,u[1]))return a}else if(1/0===u[1]){if(md(c[0],u[0],t))return a}else if(md(c[0],u[0],t)&&md(c[1],t,u[1]))return a;i&&n(u[0],a),i&&n(u[1],a)}}return i?1/0===t?e.length-1:t===-1/0?0:r:void 0};var pb=f;Ts(Fm.VISUAL.COMPONENT,function(t){t.eachComponent("visualMap",function(e){bd(e,t)}),Sd(t)});var vb={get:function(t,e,i){var r=n((mb[t]||{})[e]);return i&&_(r)?r[r.length-1]:r}},mb={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},yb=db.mapVisual,xb=db.eachVisual,_b=_,wb=f,bb=zn,Sb=kn,Mb=B,Ib=["#f6efa6","#d88273","#bf444c"],Tb=Cs({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;Hd.canvasSupported||(i.realtime=!1),!e&&_d(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=xd(this.option.controller,e,t),this.targetVisuals=xd(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Xo(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var r,o,a=this.option,s=a.precision,l=this.dataBound,h=a.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),r=!0),o=e?t:r?[n(t[0]),n(t[1])]:n(t),b(h)?h.replace("{value}",r?o[0]:o).replace("{value2}",r?o[1]:o):w(h)?r?h(t[0],t[1]):h(t):r?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=bb([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){_b(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:Ib},wb(this.stateList,function(e){var i=t[e];if(b(i)){var n=vb.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},wb(n,function(t,e){if(db.isValidType(e)){var i=vb.get(e,"inactive",h);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor");wb(this.stateList,function(o){var a=this.itemSize,s=t[o];s||(s=t[o]={color:h?r:[r]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?a[0]:[a[0],a[0]])),s.symbol=yb(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;xb(l,function(t){t>u&&(u=t)}),s.symbolSize=yb(l,function(t){return Sb(t,[0,u],[0,a[0]],!0)})}},this)}var o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},s=o.target||(o.target={}),l=o.controller||(o.controller={});r(s,a),r(l,a);var h=this.isCategory();t.call(this,s),t.call(this,l),e.call(this,s,"inRange","outOfRange"),i.call(this,l)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:Mb,getValueState:Mb,getVisualMeta:Mb}),Ab=[20,140],Cb=Tb.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(){Cb.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){Cb.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=Ab[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=Ab[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){Tb.prototype.completeVisualOption.apply(this,arguments),f(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=zn((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){r.push({value:e,color:t(e,i)})}for(var i=Id(this,"outOfRange",this.getExtent()),n=Id(this,"inRange",this.option.range.slice()),r=[],o=0,a=0,s=n.length,l=i.length;l>a&&(!n.length||i[a]<=n[0]);a++)i[a]o;o++,h=0)h&&r.length&&e(n[o],"outOfRange"),e(n[o],"inRange");for(var h=1;l>a;a++)(!n.length||n[n.length-1]o;o++){var a=t[0]+r*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new qf("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,o=i.handleLabels;kb([0,1],function(a){var s=r[a];s.setStyle("fill",e.handlesColor[a]),s.position[1]=t[a];var l=Ro(i.handleLabelPoints[a],Eo(s,this.group));o[a].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[a]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===a?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=Lb(t,o,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",Ld(!!i,n,l,a[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);u.setStyle("fill",d);var f=Ro(h.indicatorLabelPoint,Eo(u,this.group)),g=h.indicatorLabel;g.attr("invisible",!1);var p=this._applyTransform("left",h.barGroup),v=this._orient;g.setStyle({text:(i?i:"")+r.formatValueText(e),textVerticalAlign:"horizontal"===v?p:"middle",textAlign:"horizontal"===v?"center":p,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=Pb(Ob(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],o=i.getExtent();t=Pb(Ob(r[0],t),r[1]);var a=kd(i,o,r),s=[t-a,t+a],l=Lb(t,r,o,!0),h=[Lb(s[0],r,o,!0),Lb(s[1],r,o,!0)];s[0]r[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",a):1/0===h[1]?this._showIndicator(l,h[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var u=this._hoverLinkDataIndices,c=[];(e||Pd(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=Jo(u,c);this._dispatchHighDown("downplay",Ad(d[0])),this._dispatchHighDown("highlight",Ad(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var r=n.getData(e.dataType),o=r.getDimension(i.getDataDimension(r)),a=r.get(o,e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Ad(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var r=Eo(e,n?null:this.group);return Cv[_(t)?"applyTransform":"transformDirection"](t,r,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}}),Bb={type:"selectDataRange",event:"dataRangeSelected",update:"update"};bs(Bb,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),xs(lb);{var Vb=Tb.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){Vb.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();Nb[this._mode].call(this),this._resetSelected(t,e);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=g(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(S(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=db.listVisualTypes(),r=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.stateList,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=vb.get(n,"inRange"===t?"active":"inactive",r)})},this),Tb.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,r=(e?i:t).selected||{};if(i.selected=r,f(n,function(t){var e=this.getSelectedMapKey(t);r.hasOwnProperty(e)||(r[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);r[e]&&(o?r[e]=!1:o=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=db.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),function(e,i){var r=db.findPieceIndex(e,this._pieceList);r===t&&n.push(i)},!0,this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,o){var a=r.getRepresentValue({interval:e});o||(o=r.getValueState(a));var s=t(a,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],r=this,o=this._pieceList.slice();if(o.length){var a=o[0].interval[0];a!==-1/0&&o.unshift({interval:[-1/0,a]}),a=o[o.length-1].interval[1],1/0!==a&&o.push({interval:[a,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),Nb={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(n[1]-n[0])/r;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i);var a=0;t.minOpen&&e.push({index:a++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=a+r;l>a;s+=o){var h=a===r-1?n[1]:s+o;e.push({index:a++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:a++,interval:[n[1],1/0],close:[0,0]}),Xn(e),f(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),zd(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){S(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var r=n.value=t.value;n.interval=[r,r],n.close=[1,1]}else{for(var o=n.interval=[],a=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;2>u;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;3>d&&null==o[u];d++)o[u]=t[c[d]],a[u]=s[d],h[u]=2===d;null==o[u]&&(o[u]=l[u])}h[0]&&1/0===o[1]&&(a[0]=0),h[1]&&o[0]===-1/0&&(a[1]=0),Rd&&o[0]>o[1]&&console.warn("Piece "+i+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=db.retrieveVisuals(t),e.push(n)},this),zd(t,e),Xn(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};Db.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var r=t.piece,h=new qf;h.onclick=y(this._onItemClick,this,r),this._enableHoverLink(h,t.indexInModelPieceList);var u=i.getRepresentValue(r);if(this._createItemSymbol(h,u,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(u);h.add(new rv({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:r.text,textVerticalAlign:"middle",textAlign:s,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}e.add(h)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),r=i.textStyleModel,o=r.getFont(),a=r.getTextColor(),s=this._getItemAlign(),l=i.itemSize,h=this._getViewData(),u=h.endsText,c=A(i.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],l,c,s),f(h.viewPieceList,t,this),u&&this._renderEndsText(e,u[1],l,c,s),Zv(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:Ad(i.findTargetDataIndices(e))})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Td(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,r){if(e){var o=new qf,a=this.visualMapModel.textStyleModel;o.add(new rv({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:e,textFont:a.getFont(),textFill:a.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=g(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),r=t.get("inverse");return("horizontal"===n?r:!r)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(dl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,r=n(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(r[o]=!0,f(r,function(t,e){r[e]=e===o})):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r}) }})}xs(lb),t.version=Pm,t.dependencies=Om,t.PRIORITY=Fm,t.init=ds,t.connect=fs,t.disConnect=gs,t.disconnect=hy,t.dispose=ps,t.getInstanceByDom=vs,t.getInstanceById=ms,t.registerTheme=ys,t.registerPreprocessor=xs,t.registerProcessor=_s,t.registerPostUpdate=ws,t.registerAction=bs,t.registerCoordinateSystem=Ss,t.getCoordinateSystemDimensions=Ms,t.registerLayout=Is,t.registerVisual=Ts,t.registerLoading=As,t.extendComponentModel=Cs,t.extendComponentView=Ds,t.extendSeriesModel=Ls,t.extendChartView=ks,t.setCanvasCreator=Ps,t.registerMap=Os,t.getMap=zs,t.dataTool=uy,t.zrender=Bg,t.graphic=Cv,t.number=Fg,t.format=Yg,t.throttle=Wa,t.helper=rx,t.matrix=vf,t.vector=hf,t.color=Of,t.util=ux,t.List=vy,t.Model=Go,t.Axis=sx,t.env=Hd,t.parseGeoJson=hx});