!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.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);return n&&(i.firefox=!0,i.version=n[1]),a&&(i.ie=!0,i.version=a[1]),o&&(i.edge=!0,i.version=o[1]),r&&(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),domSupported:"undefined"!=typeof document}}function i(t,e){"createCanvas"===t&&(DS=null),TS[t]=e}function n(t){if(null==t||"object"!=typeof t)return t;var e=t,i=xS.call(t);if("[object Array]"===i){if(!R(t)){e=[];for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}else if(yS[i]){if(!R(t)){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(var a=0,o=t.length;o>a;a++)e[a]=n(t[a])}}}else if(!vS[i]&&!R(t)&&!T(t)){e={};for(var s in t)t.hasOwnProperty(s)&&(e[s]=n(t[s]))}return e}function a(t,e,i){if(!S(e)||!S(t))return i?n(e):t;for(var o in e)if(e.hasOwnProperty(o)){var r=t[o],s=e[o];!S(s)||!S(r)||_(s)||_(r)||T(s)||T(r)||M(s)||M(r)||R(s)||R(r)?!i&&o in t||(t[o]=n(e[o],!0)):a(r,s,i)}return t}function o(t,e){for(var i=t[0],n=1,o=t.length;o>n;n++)i=a(i,t[n],e);return i}function r(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 DS||(DS=AS().getContext("2d")),DS}function u(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 h(t,e){function i(){}var n=t.prototype;i.prototype=e.prototype,t.prototype=new i;for(var a in n)n.hasOwnProperty(a)&&(t.prototype[a]=n[a]);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===wS)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;a>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 p(t,e,i){if(t&&e){if(t.map&&t.map===MS)return t.map(e,i);for(var n=[],a=0,o=t.length;o>a;a++)n.push(e.call(i,t[a],a,t));return n}}function g(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===IS)return t.reduce(e,i,n);for(var a=0,o=t.length;o>a;a++)i=e.call(n,i,t[a],a,t);return i}}function m(t,e,i){if(t&&e){if(t.filter&&t.filter===bS)return t.filter(e,i);for(var n=[],a=0,o=t.length;o>a;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}}function v(t,e,i){if(t&&e)for(var n=0,a=t.length;a>n;n++)if(e.call(i,t[n],n,t))return t[n]}function y(t,e){var i=SS.call(arguments,2);return function(){return t.apply(e,i.concat(SS.call(arguments)))}}function x(t){var e=SS.call(arguments,1);return function(){return t.apply(this,e.concat(SS.call(arguments)))}}function _(t){return"[object Array]"===xS.call(t)}function w(t){return"function"==typeof t}function b(t){return"[object String]"===xS.call(t)}function S(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function M(t){return!!vS[xS.call(t)]}function I(t){return!!yS[xS.call(t)]}function T(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function A(t){return t!==t}function D(){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 L(t,e,i){return null!=t?t:null!=e?e:i}function k(){return Function.call.apply(SS,arguments)}function P(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 O(t,e){if(!t)throw new Error(e)}function E(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function N(t){t[CS]=!0}function R(t){return t[CS]}function z(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=_(t);this.data={};var n=this;t instanceof z?t.each(e):t&&f(t,e)}function B(t){return new z(t)}function V(t,e){for(var i=new t.constructor(t.length+e.length),n=0;nd;d++){var p=1<r;r++)for(var s=0;8>s;s++)null==o[s]&&(o[s]=0),o[s]+=((r+s)%2?-1:1)*de(i,7,0===r?1:0,1<o;o++){var r=document.createElement("div"),s=r.style,l=o%2,u=(o>>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}function ve(t,e){for(var i=e.transformer,n=e.srcCoords,a=!0,o=[],r=[],s=0;4>s;s++){var l=t[s].getBoundingClientRect(),u=2*s,h=l.left,c=l.top;o.push(h,c),a&=n&&h===n[u]&&c===n[u+1],r.push(t[s].offsetLeft,t[s].offsetTop)}return a?i:(e.srcCoords=o,e.transformer=fe(o,r))}function ye(t){return t||window.event}function xe(t,e,i){if(e=ye(e),null!=e.zrX)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&pe(t,o,e,i)}else pe(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var r=e.button;return null==e.which&&void 0!==r&&FS.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e}function _e(t,e,i,n){GS?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}function we(t,e,i,n){GS?t.removeEventListener(e,i,n):t.detachEvent("on"+e,i)}function be(t){return 2===t.which||3===t.which}function Se(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Me(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Ie(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,stop:Te}}function Te(){ZS(this.event)}function Ae(){}function De(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,a=t;a;){if(a.clipPath&&!a.clipPath.contain(e,i))return!1;a.silent&&(n=!0),a=a.parent}return n?YS:!0}return!1}function Ce(t,e,i){var n=t.painter;return 0>e||e>n.getWidth()||0>i||i>n.getHeight()}function Le(){var t=new KS(6);return ke(t),t}function ke(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Pe(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 Oe(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=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]=a,t[2]=o,t[3]=r,t[4]=s,t[5]=l,t}function Ee(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 Ne(t,e,i){var n=e[0],a=e[2],o=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=a*h+s*u,t[3]=-a*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function Re(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t}function ze(t,e){var i=e[0],n=e[2],a=e[4],o=e[1],r=e[3],s=e[5],l=i*r-o*n;return l?(l=1/l,t[0]=r*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*a)*l,t[5]=(o*a-i*s)*l,t):null}function Be(t){var e=Le();return Pe(e,t),e}function Ve(t){return t>QS||-QS>t}function Ge(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 Fe(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 He(t){return 0>t?0:t>1?1:t}function Ze(t){return Fe(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ue(t){return He(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Xe(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 Ye(t,e,i){return t+(e-t)*i}function je(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function qe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Ke(t,e){fM&&qe(fM,e),fM=dM.put(t,fM||e.slice())}function $e(t,e){if(t){e=e||[];var i=dM.get(t);if(i)return qe(e,i);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in cM)return qe(e,cM[n]),Ke(t,e),e;if("#"!==n.charAt(0)){var a=n.indexOf("("),o=n.indexOf(")");if(-1!==a&&o+1===n.length){var r=n.substr(0,a),s=n.substr(a+1,o-(a+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void je(e,0,0,0,1);l=Ue(s.pop());case"rgb":return 3!==s.length?void je(e,0,0,0,1):(je(e,Ze(s[0]),Ze(s[1]),Ze(s[2]),l),Ke(t,e),e);case"hsla":return 4!==s.length?void je(e,0,0,0,1):(s[3]=Ue(s[3]),Je(s,e),Ke(t,e),e);case"hsl":return 3!==s.length?void je(e,0,0,0,1):(Je(s,e),Ke(t,e),e);default:return}}je(e,0,0,0,1)}else{if(4===n.length){var u=parseInt(n.substr(1),16);return u>=0&&4095>=u?(je(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Ke(t,e),e):void je(e,0,0,0,1)}if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&16777215>=u?(je(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Ke(t,e),e):void je(e,0,0,0,1)}}}}function Je(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ue(t[1]),a=Ue(t[2]),o=.5>=a?a*(n+1):a+n-a*n,r=2*a-o;return e=e||[],je(e,Fe(255*Xe(r,o,i+1/3)),Fe(255*Xe(r,o,i)),Fe(255*Xe(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Qe(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=.5>u?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+h-d:o===s&&(e=2/3+c-h),0>e&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function ti(t,e){var i=$e(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,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return ri(i,4===i.length?"rgba":"rgb")}}function ei(t){var e=$e(t);return e?((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1):void 0}function ii(t,e,i){if(e&&e.length&&t>=0&&1>=t){i=i||[];var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=e[a],s=e[o],l=n-a;return i[0]=Fe(Ye(r[0],s[0],l)),i[1]=Fe(Ye(r[1],s[1],l)),i[2]=Fe(Ye(r[2],s[2],l)),i[3]=He(Ye(r[3],s[3],l)),i}}function ni(t,e,i){if(e&&e.length&&t>=0&&1>=t){var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=$e(e[a]),s=$e(e[o]),l=n-a,u=ri([Fe(Ye(r[0],s[0],l)),Fe(Ye(r[1],s[1],l)),Fe(Ye(r[2],s[2],l)),He(Ye(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:a,rightIndex:o,value:n}:u}}function ai(t,e,i,n){return t=$e(t),t?(t=Qe(t),null!=e&&(t[0]=We(e)),null!=i&&(t[1]=Ue(i)),null!=n&&(t[2]=Ue(n)),ri(Je(t),"rgba")):void 0}function oi(t,e){return t=$e(t),t&&null!=e?(t[3]=He(e),ri(t,"rgba")):void 0}function ri(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 si(t,e){return t[e]}function li(t,e,i){t[e]=i}function ui(t,e,i){return(e-t)*i+t}function hi(t,e,i){return i>.5?e:t}function ci(t,e,i,n,a){var o=t.length;if(1===a)for(var r=0;o>r;r++)n[r]=ui(t[r],e[r],i);else for(var s=o&&t[0].length,r=0;o>r;r++)for(var l=0;s>l;l++)n[r][l]=ui(t[r][l],e[r][l],i)}function di(t,e,i){var n=t.length,a=e.length;if(n!==a){var o=n>a;if(o)t.length=a;else for(var r=n;a>r;r++)t.push(1===i?e[r]:vM.call(e[r]))}for(var s=t[0]&&t[0].length,r=0;rl;l++)isNaN(t[r][l])&&(t[r][l]=e[r][l])}function fi(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var a=0;n>a;a++)if(t[a]!==e[a])return!1}else for(var o=t[0].length,a=0;n>a;a++)for(var r=0;o>r;r++)if(t[a][r]!==e[a][r])return!1;return!0}function pi(t,e,i,n,a,o,r,s,l){var u=t.length;if(1===l)for(var h=0;u>h;h++)s[h]=gi(t[h],e[h],i[h],n[h],a,o,r);else for(var c=t[0].length,h=0;u>h;h++)for(var d=0;c>d;d++)s[h][d]=gi(t[h][d],e[h][d],i[h][d],n[h][d],a,o,r)}function gi(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function mi(t){if(d(t)){var e=t.length;if(d(t[0])){for(var i=[],n=0;e>n;n++)i.push(vM.call(t[n]));return i}return vM.call(t)}return t}function vi(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function yi(t){var e=t[t.length-1].value;return d(e&&e[0])?2:1}function xi(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=n[0].value,f=d(c),p=!1,g=!1,m=f?yi(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var v=[],y=[],x=n[0].value,_=!0,w=0;u>w;w++){v.push(n[w].time/h);var b=n[w].value;if(f&&fi(b,x,m)||!f&&b===x||(_=!1),x=b,"string"==typeof b){var S=$e(b);S?(b=S,p=!0):g=!0}y.push(b)}if(o||!_){for(var M=y[u-1],w=0;u-1>w;w++)f?di(y[w],M,m):!isNaN(y[w])||isNaN(M)||g||p||(y[w]=M);f&&di(r(t._target,a),M,m);var I,T,A,D,C,L,k=0,P=0;if(p)var O=[0,0,0,0];var E=function(t,e){var i;if(0>e)i=0;else if(P>e){for(I=Math.min(k+1,u-1),i=I;i>=0&&!(v[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=k;u>i&&!(v[i]>e);i++);i=Math.min(i-1,u-2)}k=i,P=e;var n=v[i+1]-v[i];if(0!==n)if(T=(e-v[i])/n,l)if(D=y[i],A=y[0===i?i:i-1],C=y[i>u-2?u-1:i+1],L=y[i>u-3?u-1:i+2],f)pi(A,D,C,L,T,T*T,T*T*T,r(t,a),m);else{var o;if(p)o=pi(A,D,C,L,T,T*T,T*T*T,O,1),o=vi(O);else{if(g)return hi(D,C,T);o=gi(A,D,C,L,T,T*T,T*T*T)}s(t,a,o)}else if(f)ci(y[i],y[i+1],T,r(t,a),m);else{var o;if(p)ci(y[i],y[i+1],T,O,1),o=vi(O);else{if(g)return hi(y[i],y[i+1],T);o=ui(y[i],y[i+1],T)}s(t,a,o)}},N=new Ge({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:E,ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function _i(t,e,i,n,a,o,r,s){function l(){h--,h||o&&o()}b(n)?(o=a,a=n,n=0):w(a)?(o=a,a="linear",n=0):w(n)?(o=n,n=0):w(i)?(o=i,i=500):i||(i=500),t.stopAnimation(),wi(t,"",t,e,i,n,s);var u=t.animators.slice(),h=u.length;h||o&&o();for(var c=0;c0&&t.animate(e,!1).when(null==a?500:a,s).delay(o||0)}function bi(t,e,i,n){if(e){var a={};a[e]={},a[e][i]=n,t.attr(a)}else t.attr(i,n)}function Si(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 Mi(t){for(var e=0;t>=LM;)e|=1&t,t>>=1;return t+e}function Ii(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;Ti(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function Ti(t,e,i){for(i--;i>e;){var n=t[e];t[e++]=t[i],t[i--]=n}}function Ai(t,e,i,n,a){for(n===e&&n++;i>n;n++){for(var o,r=t[n],s=e,l=n;l>s;)o=s+l>>>1,a(r,t[o])<0?l=o:s=o+1;var u=n-s;switch(u){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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function Di(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])>0){for(s=n-a;s>l&&o(t,e[i+a+l])>0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}else{for(s=a+1;s>l&&o(t,e[i+a-l])<=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])>0?r=h+1:l=h}return l}function Ci(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])<0){for(s=a+1;s>l&&o(t,e[i+a-l])<0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s);var u=r;r=a-l,l=a-u}else{for(s=n-a;s>l&&o(t,e[i+a+l])>=0;)r=l,l=(l<<1)+1,0>=l&&(l=s);l>s&&(l=s),r+=a,l+=a}for(r++;l>r;){var h=r+(l-r>>>1);o(t,e[i+h])<0?l=h:r=h+1}return l}function Li(t,e){function i(t,e){l[c]=t,u[c]=e,c+=1}function n(){for(;c>1;){var t=c-2;if(t>=1&&u[t-1]<=u[t]+u[t+1]||t>=2&&u[t-2]<=u[t]+u[t-1])u[t-1]u[t+1])break;o(t)}}function a(){for(;c>1;){var t=c-2;t>0&&u[t-1]=a?r(n,a,o,h):s(n,a,o,h)))}function r(i,n,a,o){var r=0;for(r=0;n>r;r++)d[r]=t[i+r];var s=0,l=a,u=i;if(t[u++]=t[l++],0!==--o){if(1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];return void(t[u+o]=d[s])}for(var c,f,p,g=h;;){c=0,f=0,p=!1;do if(e(t[l],d[s])<0){if(t[u++]=t[l++],f++,c=0,0===--o){p=!0;break}}else if(t[u++]=d[s++],c++,f=0,1===--n){p=!0;break}while(g>(c|f));if(p)break;do{if(c=Ci(t[l],d,s,n,0,e),0!==c){for(r=0;c>r;r++)t[u+r]=d[s+r];if(u+=c,s+=c,n-=c,1>=n){p=!0;break}}if(t[u++]=t[l++],0===--o){p=!0;break}if(f=Di(d[s],t,l,o,0,e),0!==f){for(r=0;f>r;r++)t[u+r]=t[l+r];if(u+=f,l+=f,o-=f,0===o){p=!0;break}}if(t[u++]=d[s++],1===--n){p=!0;break}g--}while(c>=kM||f>=kM);if(p)break;0>g&&(g=0),g+=2}if(h=g,1>h&&(h=1),1===n){for(r=0;o>r;r++)t[u+r]=t[l+r];t[u+o]=d[s]}else{if(0===n)throw new Error;for(r=0;n>r;r++)t[u+r]=d[s+r]}}else for(r=0;n>r;r++)t[u+r]=d[s+r]}function s(i,n,a,o){var r=0;for(r=0;o>r;r++)d[r]=t[a+r];var s=i+n-1,l=o-1,u=a+o-1,c=0,f=0;if(t[u--]=t[s--],0!==--n){if(1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];return void(t[u]=d[l])}for(var p=h;;){var g=0,m=0,v=!1;do if(e(d[l],t[s])<0){if(t[u--]=t[s--],g++,m=0,0===--n){v=!0;break}}else if(t[u--]=d[l--],m++,g=0,1===--o){v=!0;break}while(p>(g|m));if(v)break;do{if(g=n-Ci(d[l],t,i,n,n-1,e),0!==g){for(u-=g,s-=g,n-=g,f=u+1,c=s+1,r=g-1;r>=0;r--)t[f+r]=t[c+r];if(0===n){v=!0;break}}if(t[u--]=d[l--],1===--o){v=!0;break}if(m=o-Di(t[s],d,0,o,o-1,e),0!==m){for(u-=m,l-=m,o-=m,f=u+1,c=l+1,r=0;m>r;r++)t[f+r]=d[c+r];if(1>=o){v=!0;break}}if(t[u--]=t[s--],0===--n){v=!0;break}p--}while(g>=kM||m>=kM);if(v)break;0>p&&(p=0),p+=2}if(h=p,1>h&&(h=1),1===o){for(u-=n,s-=n,f=u+1,c=s+1,r=n-1;r>=0;r--)t[f+r]=t[c+r];t[u]=d[l]}else{if(0===o)throw new Error;for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}}else for(c=u-(o-1),r=0;o>r;r++)t[c+r]=d[r]}var l,u,h=kM,c=0,d=[];l=[],u=[],this.mergeRuns=n,this.forceMergeRuns=a,this.pushRun=i}function ki(t,e,i,n){i||(i=0),n||(n=t.length);var a=n-i;if(!(2>a)){var o=0;if(LM>a)return o=Ii(t,i,n,e),void Ai(t,i,n,i+o,e);var r=new Li(t,e),s=Mi(a);do{if(o=Ii(t,i,n,e),s>o){var l=a;l>s&&(l=s),Ai(t,i,i+l,i+o,e),o=l}r.pushRun(i,o),r.mergeRuns(),a-=o,i+=o}while(0!==a);r.forceMergeRuns()}}function Pi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Oi(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,o=null==e.y?0:e.y,r=null==e.y2?0:e.y2;e.global||(n=n*i.width+i.x,a=a*i.width+i.x,o=o*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,a=isNaN(a)?1:a,o=isNaN(o)?0:o,r=isNaN(r)?0:r;var s=t.createLinearGradient(n,o,a,r);return s}function Ei(t,e,i){var n=i.width,a=i.height,o=Math.min(n,a),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;e.global||(r=r*n+i.x,s=s*a+i.y,l*=o);var u=t.createRadialGradient(r,s,0,r,s,l);return u}function Ni(){return!1}function Ri(t,e,i){var n=AS(),a=e.getWidth(),o=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=a+"px",r.height=o+"px",n.setAttribute("data-zr-dom-id",t)),n.width=a*i,n.height=o*i,n}function zi(t){if("string"==typeof t){var e=UM.get(t);return e&&e.image}return t}function Bi(t,e,i,n,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=UM.get(t),r={hostEl:i,cb:n,cbPayload:a};return o?(e=o.image,!Gi(e)&&o.pending.push(r)):(e=new Image,e.onload=e.onerror=Vi,UM.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Vi(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;eo;o++)a=Math.max(tn(n[o],e).width,a);return YM>jM&&(YM=0,XM={}),YM++,XM[i]=a,a}function Hi(t,e,i,n,a,o,r,s){return r?Ui(t,e,i,n,a,o,r,s):Zi(t,e,i,n,a,o,s)}function Zi(t,e,i,n,a,o,r){var s=en(t,e,a,o,r),l=Wi(t,e);a&&(l+=a[1]+a[3]);var u=s.outerHeight,h=Xi(0,l,i),c=Yi(0,u,n),d=new Si(h,c,l,u);return d.lineHeight=s.lineHeight,d}function Ui(t,e,i,n,a,o,r,s){var l=nn(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:a,textLineHeight:o}),u=l.outerWidth,h=l.outerHeight,c=Xi(0,u,i),d=Yi(0,h,n);return new Si(c,d,u,h)}function Xi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Yi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function ji(t,e,i){var n=e.textPosition,a=e.textDistance,o=i.x,r=i.y;a=a||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":o-=a,r+=u,h="right",c="middle";break;case"right":o+=a+l,r+=u,c="middle";break;case"top":o+=l/2,r-=a,h="center",c="bottom";break;case"bottom":o+=l/2,r+=s+a,h="center";break;case"inside":o+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":o+=a,r+=u,c="middle";break;case"insideRight":o+=l-a,r+=u,h="right",c="middle";break;case"insideTop":o+=l/2,r+=a,h="center";break;case"insideBottom":o+=l/2,r+=s-a,h="center",c="bottom";break;case"insideTopLeft":o+=a,r+=a;break;case"insideTopRight":o+=l-a,r+=a,h="right";break;case"insideBottomLeft":o+=a,r+=s-a,c="bottom";break;case"insideBottomRight":o+=l-a,r+=s-a,h="right",c="bottom"}return t=t||{},t.x=o,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function qi(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=Ki(e,i,n,a);for(var r=0,s=o.length;s>r;r++)o[r]=$i(o[r],a);return o.join("\n")}function Ki(t,e,i,n){n=r({},n),n.font=e;var i=C(i,"...");n.maxIterations=C(n.maxIterations,2);var a=n.minChar=C(n.minChar,0);n.cnCharWidth=Wi("国",e);var o=n.ascCharWidth=Wi("a",e);n.placeholder=C(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;a>l&&s>=o;l++)s-=o;var u=Wi(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function $i(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var o=Wi(t,n);if(i>=o)return t;for(var r=0;;r++){if(a>=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ji(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,s),o=Wi(t,n)}return""===t&&(t=e.placeholder),t}function Ji(t,e,i,n){for(var a=0,o=0,r=t.length;r>o&&e>a;o++){var s=t.charCodeAt(o);a+=s>=0&&127>=s?i:n}return o}function Qi(t){return Wi("国",t)}function tn(t,e){return $M.measureText(t,e)}function en(t,e,i,n,a){null!=t&&(t+="");var o=C(n,Qi(e)),r=t?t.split("\n"):[],s=r.length*o,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&a){u=!1;var h=a.outerHeight,c=a.outerWidth;if(null!=h&&l>h)t="",r=[];else if(null!=c)for(var d=Ki(c-(i?i[1]+i[3]:0),e,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),f=0,p=r.length;p>f;f++)r[f]=$i(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:o,canCacheByTextString:u}}function nn(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=qM.lastIndex=0;null!=(n=qM.exec(t));){var o=n.index;o>a&&an(i,t.substring(a,o)),an(i,n[2],n[1]),a=qM.lastIndex}af)return{lines:[],width:0,height:0};x.textWidth=Wi(x.text,b);var M=_.textWidth,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))x.percentWidth=M,u.push(x),M=0;else{if(I){M=x.textWidth;var T=_.textBackgroundColor,A=T&&T.image;A&&(A=zi(A),Gi(A)&&(M=Math.max(M,A.width*S/A.height)))}var D=w?w[1]+w[3]:0;M+=D;var k=null!=d?d-v:null;null!=k&&M>k&&(!I||D>k?(x.text="",x.textWidth=M=0):(x.text=qi(x.text,k-D,b,c.ellipsis,{minChar:c.minChar}),x.textWidth=Wi(x.text,b),M=x.textWidth+D))}v+=x.width=M,_&&(m=Math.max(m,x.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=C(e.textWidth,l),i.outerHeight=i.height=C(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(var p=0;pl&&(r+=l,l=-l),0>u&&(s+=u,u=-u),"number"==typeof h?i=n=a=o=h:h instanceof Array?1===h.length?i=n=a=o=h[0]:2===h.length?(i=a=h[0],n=o=h[1]):3===h.length?(i=h[0],n=o=h[1],a=h[2]):(i=h[0],n=h[1],a=h[2],o=h[3]):i=n=a=o=0;var c;i+n>l&&(c=i+n,i*=l/c,n*=l/c),a+o>l&&(c=a+o,a*=l/c,o*=l/c),n+a>u&&(c=n+a,n*=u/c,a*=u/c),i+o>u&&(c=i+o,i*=u/c,o*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-a),0!==a&&t.arc(r+l-a,s+u-a,a,0,Math.PI/2),t.lineTo(r+o,s+u),0!==o&&t.arc(r+o,s+u-o,o,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function sn(t){return ln(t),f(t.rich,ln),t}function ln(t){if(t){t.font=on(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||QM[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||tI[i]?i:"top";var n=t.textPadding;n&&(t.textPadding=P(t.textPadding))}}function un(t,e,i,n,a,o){n.rich?cn(t,e,i,n,a,o):hn(t,e,i,n,a,o)}function hn(t,e,i,n,a,o){var r,s=gn(n),l=!1,u=e.__attrCachedBy===NM.PLAIN_TEXT;o!==RM?(o&&(r=o.style,l=!s&&u&&r),e.__attrCachedBy=s?NM.NONE:NM.PLAIN_TEXT):u&&(e.__attrCachedBy=NM.NONE);var h=n.font||JM;l&&h===(r.font||JM)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;(!p||t.__dirtyText)&&(p=t.__textCotentBlock=en(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=yn(nI,t,n,a),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;fn(e,n,a,x,_);var S=Yi(_,g,b),M=x,I=S;if(s||d){var T=Wi(i,c),A=T;d&&(A+=d[1]+d[3]);var D=Xi(x,A,w);s&&mn(t,e,n,D,S,A,g),d&&(M=Sn(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var C=0;CT&&(_=b[T],!_.textAlign||"left"===_.textAlign);)pn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;C>=0&&(_=b[C],"right"===_.textAlign);)pn(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(o-(A-m)-(y-D)-I)/2;C>=T;)_=b[T],pn(t,e,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function fn(t,e,i,n,a){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,a=i.height/2+i.y):o&&(n=o[0]+i.x,a=o[1]+i.y),t.translate(n,a),t.rotate(-e.textRotation),t.translate(-n,-a)}}function pn(t,e,i,n,a,o,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=o+a/2;"top"===u?h=o+i.height/2:"bottom"===u&&(h=o+a-i.height/2),!i.isLineHolder&&gn(l)&&mn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height); var c=i.textPadding;c&&(r=Sn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),xn(e,"shadowBlur",L(l.textShadowBlur,n.textShadowBlur,0)),xn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),xn(e,"shadowOffsetX",L(l.textShadowOffsetX,n.textShadowOffsetX,0)),xn(e,"shadowOffsetY",L(l.textShadowOffsetY,n.textShadowOffsetY,0)),xn(e,"textAlign",s),xn(e,"textBaseline","middle"),xn(e,"font",i.font||JM);var d=_n(l.textStroke||n.textStroke,p),f=wn(l.textFill||n.textFill),p=C(l.textStrokeWidth,n.textStrokeWidth);d&&(xn(e,"lineWidth",p),xn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(xn(e,"fillStyle",f),e.fillText(i.text,r,h))}function gn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function mn(t,e,i,n,a,o,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=b(s);if(xn(e,"shadowBlur",i.textBoxShadowBlur||0),xn(e,"shadowColor",i.textBoxShadowColor||"transparent"),xn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),xn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?rn(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closePath()}if(h)if(xn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(S(s)){var f=s.image;f=Bi(f,null,t,vn,s),f&&Gi(f)&&e.drawImage(f,n,a,o,r)}if(l&&u)if(xn(e,"lineWidth",l),xn(e,"strokeStyle",u),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function vn(t,e){e.image=t}function yn(t,e,i,n){var a=i.x||0,o=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)a=n.x+bn(l[0],n.width),o=n.y+bn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(iI,i,n):ji(iI,i,n);a=u.x,o=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(a+=h[0],o+=h[1])}return t=t||{},t.baseX=a,t.baseY=o,t.textAlign=r,t.textVerticalAlign=s,t}function xn(t,e,i){return t[e]=EM(t,e,i),t[e]}function _n(t,e){return null==t||0>=e||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function wn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function bn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Sn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Mn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function In(t){t=t||{},IM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new BM(t.style,this),this._rect=null,this.__clipPaths=null}function Tn(t){In.call(this,t)}function An(t){return parseInt(t,10)}function Dn(t){return t?t.__builtin__?!0:"function"!=typeof t.resize||"function"!=typeof t.refresh?!1:!0:!1}function Cn(t,e,i){return hI.copy(t.getBoundingRect()),t.transform&&hI.applyTransform(t.transform),cI.width=e,cI.height=i,!hI.intersect(cI)}function Ln(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;in;n++){var o=i[n];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function ta(t){return!CI(t)||LI(t)||t instanceof Date?t:t.value}function ea(t){return CI(t)&&!(t instanceof Array)}function ia(t,e){e=(e||[]).slice();var i=p(t||[],function(t){return{exist:t}});return DI(e,function(t,n){if(CI(t)){for(var a=0;a=i.length&&i.push({option:t})}}),i}function na(t){var e=B();DI(t,function(t){var i=t.exist;i&&e.set(i.id,t)}),DI(t,function(t){var i=t.option;O(!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={})}),DI(t,function(t,i){var n=t.exist,a=t.option,o=t.keyInfo;if(CI(a)){if(o.name=null!=a.name?a.name+"":n?n.name:kI+i,n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do o.id="\x00"+o.name+"\x00"+r++;while(e.get(o.id))}e.set(o.id,t)}})}function aa(t){var e=t.name;return!(!e||!e.indexOf(kI))}function oa(t){return CI(t)&&t.id&&0===(t.id+"").indexOf("\x00_ec_\x00")}function ra(t,e){function i(t,e,i){for(var n=0,a=t.length;a>n;n++)for(var o=t[n].seriesId,r=Jn(t[n].dataIndex),s=i&&i[o],l=0,u=r.length;u>l;l++){var h=r[l];s&&s[h]?s[h]=null:(e[o]||(e[o]={}))[h]=1}}function n(t,e){var i=[];for(var a in t)if(t.hasOwnProperty(a)&&null!=t[a])if(e)i.push(+a);else{var o=n(t[a],!0);o.length&&i.push({seriesId:a,dataIndex:o})}return i}var a={},o={};return i(t||[],a),i(e||[],o,a),[n(a),n(o)]}function sa(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?_(e.dataIndex)?p(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?_(e.name)?p(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function la(){var t="__\x00ec_inner_"+OI++ +"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function ua(t,e,i){if(b(e)){var n={};n[e+"Index"]=0,e=n}var a=i&&i.defaultMainType;!a||ha(e,a+"Index")||ha(e,a+"Id")||ha(e,a+"Name")||(e[a+"Index"]=0);var o={};return DI(e,function(n,a){var n=e[a];if("dataIndex"===a||"dataIndexInside"===a)return void(o[a]=n);var r=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&u(i.includeMainTypes,s)<0)){var h={mainType:s};("index"!==l||"all"!==n)&&(h[l]=n);var c=t.queryComponents(h);o[s+"Models"]=c,o[s+"Model"]=c[0]}}),o}function ha(t,e){return t&&t.hasOwnProperty(e)}function ca(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function da(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function fa(t){return"auto"===t?mS.domSupported?"html":"richText":t||"html"}function pa(t,e){var i=B(),n=[];return f(t,function(t){var a=e(t);(i.get(a)||(n.push(a),i.set(a,[]))).push(t)}),{keys:n,buckets:i}}function ga(t){var e={main:"",sub:""};return t&&(t=t.split(EI),e.main=t[0]||"",e.sub=t[1]||""),e}function ma(t){O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function va(t){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return r(i.prototype,t),i.extend=this.extend,i.superCall=xa,i.superApply=_a,h(i,this),i.superClass=e,i}}function ya(t){var e=["__\x00is_clz",RI++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function xa(t,e){var i=k(arguments,2);return this.superClass.prototype[e].apply(t,i)}function _a(t,e,i){return this.superClass.prototype[e].apply(t,i)}function wa(t,e){function i(t){var e=n[t.main];return e&&e[NI]||(e=n[t.main]={},e[NI]=!0),e}e=e||{};var n={};if(t.registerClass=function(t,e){if(e)if(ma(e),e=ga(e),e.sub){if(e.sub!==NI){var a=i(e);a[e.sub]=t}}else n[e.main]=t;return t},t.getClass=function(t,e,i){var a=n[t];if(a&&a[NI]&&(a=e?a[e]:null),i&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=ga(t);var e=[],i=n[t.main];return i&&i[NI]?f(i,function(t,i){i!==NI&&e.push(t)}):e.push(i),e},t.hasClass=function(t){return t=ga(t),!!n[t.main]},t.getAllClassMainTypes=function(){var t=[];return f(n,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=ga(t);var e=n[t.main];return e&&e[NI]},t.parseClassType=ga,e.registerWhenExtend){var a=t.extend;a&&(t.extend=function(e){var i=a.call(this,e);return t.registerClass(i,e.type)})}return t}function ba(t){return t>-ZI&&ZI>t}function Sa(t){return t>ZI||-ZI>t}function Ma(t,e,i,n,a){var o=1-a;return o*o*(o*t+3*a*e)+a*a*(a*n+3*o*i)}function Ia(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)}function Ta(t,e,i,n,a,o){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-a,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(ba(h)&&ba(c))if(ba(s))o[0]=0;else{var p=-l/s;p>=0&&1>=p&&(o[f++]=p)}else{var g=c*c-4*h*d;if(ba(g)){var m=c/h,p=-s/r+m,v=-m/2;p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v)}else if(g>0){var y=HI(g),x=h*s+1.5*r*(-c+y),_=h*s+1.5*r*(-c-y);x=0>x?-WI(-x,YI):WI(x,YI),_=0>_?-WI(-_,YI):WI(_,YI);var p=(-s-(x+_))/(3*r);p>=0&&1>=p&&(o[f++]=p)}else{var w=(2*h*s-3*r*c)/(2*HI(h*h*h)),b=Math.acos(w)/3,S=HI(h),M=Math.cos(b),p=(-s-2*S*M)/(3*r),v=(-s+S*(M+XI*Math.sin(b)))/(3*r),I=(-s+S*(M-XI*Math.sin(b)))/(3*r);p>=0&&1>=p&&(o[f++]=p),v>=0&&1>=v&&(o[f++]=v),I>=0&&1>=I&&(o[f++]=I)}}return f}function Aa(t,e,i,n,a){var o=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(ba(r)){if(Sa(o)){var u=-s/o;u>=0&&1>=u&&(a[l++]=u)}}else{var h=o*o-4*r*s;if(ba(h))a[0]=-o/(2*r);else if(h>0){var c=HI(h),u=(-o+c)/(2*r),d=(-o-c)/(2*r);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function Da(t,e,i,n,a,o){var r=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,u=(s-r)*a+r,h=(l-s)*a+s,c=(h-u)*a+u;o[0]=t,o[1]=r,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=n}function Ca(t,e,i,n,a,o,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;jI[0]=l,jI[1]=u;for(var y=0;1>y;y+=.05)qI[0]=Ma(t,i,a,r,y),qI[1]=Ma(e,n,o,s,y),p=NS(jI,qI),v>p&&(c=y,v=p);v=1/0;for(var x=0;32>x&&!(UI>m);x++)d=c-m,f=c+m,qI[0]=Ma(t,i,a,r,d),qI[1]=Ma(e,n,o,s,d),p=NS(qI,jI),d>=0&&v>p?(c=d,v=p):(KI[0]=Ma(t,i,a,r,f),KI[1]=Ma(e,n,o,s,f),g=NS(KI,jI),1>=f&&v>g?(c=f,v=g):m*=.5);return h&&(h[0]=Ma(t,i,a,r,c),h[1]=Ma(e,n,o,s,c)),HI(v)}function La(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}function ka(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Pa(t,e,i,n,a){var o=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(ba(o)){if(Sa(r)){var u=-s/r;u>=0&&1>=u&&(a[l++]=u)}}else{var h=r*r-4*o*s;if(ba(h)){var u=-r/(2*o);u>=0&&1>=u&&(a[l++]=u)}else if(h>0){var c=HI(h),u=(-r+c)/(2*o),d=(-r-c)/(2*o);u>=0&&1>=u&&(a[l++]=u),d>=0&&1>=d&&(a[l++]=d)}}return l}function Oa(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function Ea(t,e,i,n,a){var o=(e-t)*n+t,r=(i-e)*n+e,s=(r-o)*n+o;a[0]=t,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i}function Na(t,e,i,n,a,o,r,s,l){var u,h=.005,c=1/0;jI[0]=r,jI[1]=s;for(var d=0;1>d;d+=.05){qI[0]=La(t,i,a,d),qI[1]=La(e,n,o,d);var f=NS(jI,qI);c>f&&(u=d,c=f)}c=1/0;for(var p=0;32>p&&!(UI>h);p++){var g=u-h,m=u+h;qI[0]=La(t,i,a,g),qI[1]=La(e,n,o,g);var f=NS(qI,jI);if(g>=0&&c>f)u=g,c=f;else{KI[0]=La(t,i,a,m),KI[1]=La(e,n,o,m);var v=NS(KI,jI);1>=m&&c>v?(u=m,c=v):h*=.5}}return l&&(l[0]=La(t,i,a,u),l[1]=La(e,n,o,u)),HI(c)}function Ra(t,e,i){if(0!==t.length){var n,a=t[0],o=a[0],r=a[0],s=a[1],l=a[1];for(n=1;nh;h++){var p=d(t,i,a,r,oT[h]);l[0]=$I(p,l[0]),u[0]=JI(p,u[0])}for(f=c(e,n,o,s,rT),h=0;f>h;h++){var g=d(e,n,o,s,rT[h]);l[1]=$I(g,l[1]),u[1]=JI(g,u[1])}l[0]=$I(t,l[0]),u[0]=JI(t,u[0]),l[0]=$I(r,l[0]),u[0]=JI(r,u[0]),l[1]=$I(e,l[1]),u[1]=JI(e,u[1]),l[1]=$I(s,l[1]),u[1]=JI(s,u[1])}function Va(t,e,i,n,a,o,r,s){var l=Oa,u=La,h=JI($I(l(t,i,a),1),0),c=JI($I(l(e,n,o),1),0),d=u(t,i,a,h),f=u(e,n,o,c);r[0]=$I(t,a,d),r[1]=$I(e,o,f),s[0]=JI(t,a,d),s[1]=JI(e,o,f)}function Ga(t,e,i,n,a,o,r,s,l){var u=re,h=se,c=Math.abs(a-o);if(1e-4>c%eT&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(iT[0]=tT(a)*i+t,iT[1]=QI(a)*n+e,nT[0]=tT(o)*i+t,nT[1]=QI(o)*n+e,u(s,iT,nT),h(l,iT,nT),a%=eT,0>a&&(a+=eT),o%=eT,0>o&&(o+=eT),a>o&&!r?o+=eT:o>a&&r&&(a+=eT),r){var d=o;o=a,a=d}for(var f=0;o>f;f+=Math.PI/2)f>a&&(aT[0]=tT(f)*i+t,aT[1]=QI(f)*n+e,u(s,aT,s),h(l,aT,l))}function Fa(t,e,i,n,a,o,r){if(0===a)return!1;var s=a,l=0,u=t;if(r>e+s&&r>n+s||e-s>r&&n-s>r||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),u=(t*n-i*e)/(t-i);var h=l*o-r+u,c=h*h/(l*l+1);return s/2*s/2>=c}function Wa(t,e,i,n,a,o,r,s,l,u,h){if(0===l)return!1;var c=l;if(h>e+c&&h>n+c&&h>o+c&&h>s+c||e-c>h&&n-c>h&&o-c>h&&s-c>h||u>t+c&&u>i+c&&u>a+c&&u>r+c||t-c>u&&i-c>u&&a-c>u&&r-c>u)return!1;var d=Ca(t,e,i,n,a,o,r,s,u,h,null);return c/2>=d}function Ha(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;if(l>e+u&&l>n+u&&l>o+u||e-u>l&&n-u>l&&o-u>l||s>t+u&&s>i+u&&s>a+u||t-u>s&&i-u>s&&a-u>s)return!1;var h=Na(t,e,i,n,a,o,s,l,null);return u/2>=h}function Za(t){return t%=_T,0>t&&(t+=_T),t}function Ua(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(h-u>i||i>h+u)return!1;if(Math.abs(n-a)%wT<1e-4)return!0;if(o){var c=n;n=Za(a),a=Za(c)}else n=Za(n),a=Za(a);n>a&&(a+=wT);var d=Math.atan2(l,s);return 0>d&&(d+=wT),d>=n&&a>=d||d+wT>=n&&a>=d+wT}function Xa(t,e,i,n,a,o){if(o>e&&o>n||e>o&&n>o)return 0;if(n===e)return 0;var r=e>n?1:-1,s=(o-e)/(n-e);(1===s||0===s)&&(r=e>n?.5:-.5);var l=s*(i-t)+t;return l===a?1/0:l>a?r:0}function Ya(t,e){return Math.abs(t-e)e&&u>n&&u>o&&u>s||e>u&&n>u&&o>u&&s>u)return 0;var h=Ta(e,n,o,s,u,IT);if(0===h)return 0;for(var c,d,f=0,p=-1,g=0;h>g;g++){var m=IT[g],v=0===m||1===m?.5:1,y=Ma(t,i,a,r,m);l>y||(0>p&&(p=Aa(e,n,o,s,TT),TT[1]1&&ja(),c=Ma(e,n,o,s,TT[0]),p>1&&(d=Ma(e,n,o,s,TT[1]))),f+=2===p?mc?v:-v:md?v:-v:d>s?v:-v:mc?v:-v:c>s?v:-v)}return f}function Ka(t,e,i,n,a,o,r,s){if(s>e&&s>n&&s>o||e>s&&n>s&&o>s)return 0;var l=Pa(e,n,o,s,IT);if(0===l)return 0;var u=Oa(e,n,o);if(u>=0&&1>=u){for(var h=0,c=La(e,n,o,u),d=0;l>d;d++){var f=0===IT[d]||1===IT[d]?.5:1,p=La(t,i,a,IT[d]);r>p||(h+=IT[d]c?f:-f:c>o?f:-f)}return h}var f=0===IT[0]||1===IT[0]?.5:1,p=La(t,i,a,IT[0]);return r>p?0:e>o?f:-f}function $a(t,e,i,n,a,o,r,s){if(s-=e,s>i||-i>s)return 0;var l=Math.sqrt(i*i-s*s);IT[0]=-l,IT[1]=l;var u=Math.abs(n-a);if(1e-4>u)return 0;if(1e-4>u%ST){n=0,a=ST;var h=o?1:-1;return r>=IT[0]+t&&r<=IT[1]+t?h:0}if(o){var l=n;n=Za(a),a=Za(l)}else n=Za(n),a=Za(a);n>a&&(a+=ST);for(var c=0,d=0;2>d;d++){var f=IT[d];if(f+t>r){var p=Math.atan2(s,f),h=o?1:-1;0>p&&(p=ST+p),(p>=n&&a>=p||p+ST>=n&&a>=p+ST)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Ja(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(o+=Xa(r,s,l,u,n,a))),1===h&&(r=t[h],s=t[h+1],l=r,u=s),c){case bT.M:l=t[h++],u=t[h++],r=l,s=u;break;case bT.L:if(i){if(Fa(r,s,t[h],t[h+1],e,n,a))return!0}else o+=Xa(r,s,t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case bT.C:if(i){if(Wa(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=qa(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case bT.Q:if(i){if(Ha(r,s,t[h++],t[h++],t[h],t[h+1],e,n,a))return!0}else o+=Ka(r,s,t[h++],t[h++],t[h],t[h+1],n,a)||0;r=t[h++],s=t[h++];break;case bT.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?o+=Xa(r,s,x,_,n,a):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(Ua(d,f,g,m,m+v,y,e,w,a))return!0}else o+=$a(d,f,g,m,m+v,y,w,a);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case bT.R:l=r=t[h++],u=s=t[h++];var b=t[h++],S=t[h++],x=l+b,_=u+S;if(i){if(Fa(l,u,x,u,e,n,a)||Fa(x,u,x,_,e,n,a)||Fa(x,_,l,_,e,n,a)||Fa(l,_,l,u,e,n,a))return!0}else o+=Xa(x,u,x,_,n,a),o+=Xa(l,_,l,u,n,a);break;case bT.Z:if(i){if(Fa(r,s,l,u,e,n,a))return!0}else o+=Xa(r,s,l,u,n,a);r=l,s=u}}return i||Ya(s,u)||(o+=Xa(r,s,l,u,n,a)||0),0!==o}function Qa(t,e,i){return Ja(t,0,!1,e,i)}function to(t,e,i,n){return Ja(t,e,!0,i,n)}function eo(t){In.call(this,t),this.path=null}function io(t,e,i,n,a,o,r,s,l,u,h){var c=l*(BT/180),d=zT(c)*(t-i)/2+RT(c)*(e-n)/2,f=-1*RT(c)*(t-i)/2+zT(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=NT(p),s*=NT(p));var g=(a===o?-1:1)*NT((r*r*s*s-r*r*f*f-s*s*d*d)/(r*r*f*f+s*s*d*d))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+zT(c)*m-RT(c)*v,x=(e+n)/2+RT(c)*m+zT(c)*v,_=FT([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=FT(w,b);GT(w,b)<=-1&&(S=BT),GT(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*BT),1===o&&0>S&&(S+=2*BT),h.addData(u,y,x,r,s,_,S,c,o)}function no(t){if(!t)return new xT;for(var e,i=0,n=0,a=i,o=n,r=new xT,s=xT.CMD,l=t.match(WT),u=0;ug;g++)f[g]=parseFloat(f[g]);for(var m=0;p>m;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),a=i,o=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),a=i,o=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;var T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],M=i,I=n,i=f[m++],n=f[m++],h=s.A,io(M,I,i,n,b,S,x,_,w,h,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],M=i,I=n,i+=f[m++],n+=f[m++],h=s.A,io(M,I,i,n,b,S,x,_,w,h,r)}}("z"===d||"Z"===d)&&(h=s.Z,r.addData(h),i=a,n=o),e=h}return r.toStatic(),r}function ao(t,e){var i=no(t);return e=e||{},e.buildPath=function(t){if(t.setData){t.setData(i.data);var e=t.getContext();e&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){ET(i,t),this.dirty(!0)},e}function oo(t,e){return new eo(ao(t,e))}function ro(t,e){return eo.extend(ao(t,e))}function so(t,e){for(var i=[],n=t.length,a=0;n>a;a++){var o=t[a];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var r=new eo(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r}function lo(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function uo(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var o=$T(n,a,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;(i?r:r-1)>s;s++){var l=o[2*s],u=o[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===a&&(n=KT(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 ho(t,e,i){var n=i&&i.lineWidth;if(e&&n){var a=e.x1,o=e.x2,r=e.y1,s=e.y2;tA(2*a)===tA(2*o)?t.x1=t.x2=fo(a,n,!0):(t.x1=a,t.x2=o),tA(2*r)===tA(2*s)?t.y1=t.y2=fo(r,n,!0):(t.y1=r,t.y2=s)}}function co(t,e,i){var n=i&&i.lineWidth;if(e&&n){var a=e.x,o=e.y,r=e.width,s=e.height;t.x=fo(a,n,!0),t.y=fo(o,n,!0),t.width=Math.max(fo(a+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(fo(o+s,n,!1)-t.y,0===s?0:1)}}function fo(t,e,i){var n=tA(2*t);return(n+tA(e))%2===0?n/2:(n+(i?1:-1))/2}function po(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?Ia:Ma)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Ia:Ma)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ka:La)(t.x1,t.cpx1,t.x2,e),(i?ka:La)(t.y1,t.cpy1,t.y2,e)]}function go(t){In.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function mo(t){return eo.extend(t)}function vo(t,e){return ro(t,e)}function yo(t,e){bA[t]=e}function xo(t){return bA.hasOwnProperty(t)?bA[t]:void 0}function _o(t,e,i,n){var a=oo(t,e);return i&&("center"===n&&(i=bo(i,a.getBoundingRect())),So(a,i)),a}function wo(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 a={width:t.width,height:t.height};n.setStyle(bo(e,a))}}});return n}function bo(t,e){var i,n=e.width/e.height,a=t.height*n;a<=t.width?i=t.height:(a=t.width,i=a/n);var o=t.x+t.width/2,r=t.y+t.height/2;return{x:o-a/2,y:r-i/2,width:a,height:i}}function So(t,e){if(t.applyTransform){var i=t.getBoundingRect(),n=i.calculateTransform(e);t.applyTransform(n)}}function Mo(t){return ho(t.shape,t.shape,t.style),t}function Io(t){return co(t.shape,t.shape,t.style),t}function To(t){return null!=t&&"none"!==t}function Ao(t){if("string"!=typeof t)return t;var e=IA.get(t);return e||(e=ti(t,-.1),1e4>TA&&(IA.set(t,e),TA++)),e}function Do(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(!e)return void(t.__cachedNormalStl=t.__cachedNormalZ2=null);var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var a in e)null!=e[a]&&(i[a]=n[a]);i.fill=n.fill,i.stroke=n.stroke}}function Co(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var a=t,o=t.style;n&&(a=i.addHover(t),o=a.style),Jo(o),n||Do(a),o.extendFrom(e),Lo(o,e,"fill"),Lo(o,e,"stroke"),$o(o),n||(t.dirty(!1),t.z2+=mA)}}}function Lo(t,e,i){!To(e[i])&&To(t[i])&&(t[i]=Ao(t[i]))}function ko(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(Jo(i),t.setStyle(n),$o(i));var a=t.__cachedNormalZ2;null!=a&&t.z2-a===mA&&(t.z2=a)}}function Po(t,e,i){var n,a=xA,o=xA;t.__highlighted&&(a=yA,n=!0),e(t,i),t.__highlighted&&(o=yA,n=!0),t.isGroup&&t.traverse(function(t){!t.isGroup&&e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(a,o)}function Oo(t,e){e=t.__hoverStl=e!==!1&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,ko(t),Co(t))}function Eo(t){!Bo(this,t)&&!this.__highByOuter&&Po(this,Co)}function No(t){!Bo(this,t)&&!this.__highByOuter&&Po(this,ko)}function Ro(t){this.__highByOuter|=1<<(t||0),Po(this,Co)}function zo(t){!(this.__highByOuter&=~(1<<(t||0)))&&Po(this,ko)}function Bo(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Vo(t,e){Go(t,!0),Po(t,Oo,e)}function Go(t,e){var i=e===!1;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",Eo)[n]("mouseout",No),t[n]("emphasis",Ro)[n]("normal",zo),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Fo(t){return!(!t||!t.__highDownDispatcher)}function Wo(t){var e=wA[t];return null==e&&32>=_A&&(e=wA[t]=_A++),e}function Ho(t,e,i,n,a,o,r){a=a||gA;var s,l=a.labelFetcher,u=a.labelDataIndex,h=a.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=w(a.defaultText)?a.defaultText(u,a):a.defaultText));var f=c?s:null,p=d?C(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;(null!=f||null!=p)&&(Uo(t,i,o,a),Uo(e,n,r,a,!0)),t.text=f,e.text=p}function Zo(t,e,i){var n=t.style;e&&(Jo(n),t.setStyle(e),$o(n)),n=t.__hoverStl,i&&n&&(Jo(n),r(n,i),$o(n))}function Uo(t,e,i,n,a){return Yo(t,e,n,a),i&&r(t,i),t}function Xo(t,e,i){var n,a={isRectText:!0};i===!1?n=!0:a.autoColor=i,Yo(t,e,a,n)}function Yo(t,e,i,n){if(i=i||gA,i.isRectText){var a;i.getTextPosition?a=i.getTextPosition(e,n):(a=e.getShallow("position")||(n?null:"inside"),"outside"===a&&(a="top")),t.textPosition=a,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 r,s=e.ecModel,l=s&&s.option.textStyle,u=jo(e);if(u){r={};for(var h in u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);qo(r[h]={},c,l,i,n)}}return t.rich=r,qo(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function jo(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||gA).rich;if(i){e=e||{};for(var n in i)i.hasOwnProperty(n)&&(e[n]=1)}t=t.parentModel}return e}function qo(t,e,i,n,a,o){i=!a&&i||gA,t.textFill=Ko(e.getShallow("color"),n)||i.color,t.textStroke=Ko(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=C(e.getShallow("textBorderWidth"),i.textBorderWidth),a||(o&&(t.insideRollbackOpt=n,$o(t)),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=Ko(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Ko(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 Ko(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function $o(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var a=n.autoColor,o=n.isRectText,r=n.useInsideStyle,s=r!==!1&&(r===!0||o&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=a;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=a)}t.insideRollback=e}function Jo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function Qo(t,e){var i=e&&e.getModel("textStyle");return E([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 tr(t,e,i,n,a,o){"function"==typeof a&&(o=a,a=null);var r=n&&n.isAnimationEnabled();if(r){var s=t?"Update":"",l=n.getShallow("animationDuration"+s),u=n.getShallow("animationEasing"+s),h=n.getShallow("animationDelay"+s);"function"==typeof h&&(h=h(a,n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null)),"function"==typeof l&&(l=l(a)),l>0?e.animateTo(i,l,h||0,u,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function er(t,e,i,n,a){tr(!0,t,e,i,n,a)}function ir(t,e,i,n,a){tr(!1,t,e,i,n,a)}function nr(t,e){for(var i=ke([]);t&&t!==e;)Oe(i,t.getLocalTransform(),i),t=t.parent;return i}function ar(t,e,i){return e&&!d(e)&&(e=tM.getLocalTransform(e)),i&&(e=ze([],e)),oe([],t,e)}function or(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),a=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?-a:"bottom"===t?a:0];return o=ar(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function rr(t,e,i){function n(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}function a(t){var e={position:H(t.position),rotation:t.rotation};return t.shape&&(e.shape=r({},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=a(t);t.attr(a(e)),er(t,n,i,t.dataIndex)}}})}}function sr(t,e){return p(t,function(t){var i=t[0];i=fA(i,e.x),i=pA(i,e.x+e.width);var n=t[1];return n=fA(n,e.y),n=pA(n,e.y+e.height),[i,n]})}function lr(t,e){var i=fA(t.x,e.x),n=pA(t.x+t.width,e.x+e.width),a=fA(t.y,e.y),o=pA(t.y+t.height,e.y+e.height);return n>=i&&o>=a?{x:i,y:a,width:n-i,height:o-a}:void 0}function ur(t,e,i){e=r({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)):_o(t.replace("path://",""),e,i,"center"):void 0}function hr(t,e,i,n,a){for(var o=0,r=a[a.length-1];og||g>1)return!1;var m=dr(f,p,h,c)/d;return 0>m||m>1?!1:!0}function dr(t,e,i,n){return t*n-i*e}function fr(t){return 1e-6>=t&&t>=-1e-6}function pr(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function gr(t,e,i){for(var n=0;n=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,a){function o(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function r(t){h[t]=!0,o(t)}if(t.length){var s=i(e),l=s.graph,u=s.noEntryList,h={};for(f(t,function(t){h[t]=!0});u.length;){var c=u.pop(),d=l[c],p=!!h[c];p&&(n.call(a,c,d.originalDeps.slice()),delete h[c]),f(d.successor,p?r:o)}f(h,function(){throw new Error("Circle dependency may exists")})}}}function _r(t){return t.replace(/^\s+|\s+$/g,"")}function wr(t,e,i,n){var a=e[1]-e[0],o=i[1]-i[0];if(0===a)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(a>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])/a*o+i[0]}function br(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?_r(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?0/0:+t}function Sr(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Mr(t){return t.sort(function(t,e){return t-e}),t}function Ir(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 Tr(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return 0>n?-n:0}var a=e.indexOf(".");return 0>a?0:e.length-1-a}function Ar(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-a+o,0),20);return isFinite(r)?r:20}function Dr(t,e,i){if(!t[e])return 0;var n=g(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var a=Math.pow(10,i),o=p(t,function(t){return(isNaN(t)?0:t)/n*a*100}),r=100*a,s=p(o,function(t){return Math.floor(t)}),l=g(s,function(t,e){return t+e},0),u=p(o,function(t,e){return t-s[e]});r>l;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;f>d;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}function Cr(t){var e=2*Math.PI;return(t%e+e)%e}function Lr(t){return t>-NA&&NA>t}function kr(t){if(t instanceof Date)return t;if("string"==typeof t){var e=zA.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 Pr(t){return Math.pow(10,Or(t))}function Or(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Er(t,e){var i,n=Or(t),a=Math.pow(10,n),o=t/a;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*a,n>=-20?+t.toFixed(0>n?-n:0):t}function Nr(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),a=+t[n-1],o=i-n;return o?a+o*(t[n]-a):a}function Rr(t){function e(t,i,n){return t.interval[n]s;s++)o[s]<=i&&(o[s]=i,r[s]=s?1:1-n),i=o[s],n=r[s];o[0]===o[1]&&r[0]*r[1]!==1?t.splice(a,1):a++}return t}function zr(t){return t-parseFloat(t)>=0}function Br(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))}function Vr(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 Gr(t){return null==t?"":(t+"").replace(GA,function(t,e){return FA[e]})}function Fr(t,e,i){_(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;os;s++)for(var l=0;l':'':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function Zr(t,e){return t+="","0000".substr(0,e-t.length)+t}function Ur(t,e,i){("week"===t||"month"===t||"quarter"===t||"half-year"===t||"year"===t)&&(t="MM-dd\nyyyy");var n=kr(e),a=i?"UTC":"",o=n["get"+a+"FullYear"](),r=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),u=n["get"+a+"Minutes"](),h=n["get"+a+"Seconds"](),c=n["get"+a+"Milliseconds"]();return t=t.replace("MM",Zr(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",Zr(s,2)).replace("d",s).replace("hh",Zr(l,2)).replace("h",l).replace("mm",Zr(u,2)).replace("m",u).replace("ss",Zr(h,2)).replace("s",h).replace("SSS",Zr(c,3))}function Xr(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Yr(t){return Hi(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)}function jr(t,e,i,n,a,o,r,s){return Hi(t,e,i,n,a,s,o,r)}function qr(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);h=o+m,h>n||l.newline?(o=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);c=r+v,c>a||l.newline?(o+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=h+i:r=c+i)})}function Kr(t,e,i){var n=e.width,a=e.height,o=br(t.x,n),r=br(t.y,a),s=br(t.x2,n),l=br(t.y2,a);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=VA(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function $r(t,e,i){i=VA(i||0);var n=e.width,a=e.height,o=br(t.left,n),r=br(t.top,a),s=br(t.right,n),l=br(t.bottom,a),u=br(t.width,n),h=br(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=a-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/a?u=.8*n:h=.8*a),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(o)&&(o=n-s-u-d),isNaN(r)&&(r=a-l-h-c),t.left||t.right){case"center":o=n/2-u/2-i[3];break;case"right":o=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-h/2-i[0];break;case"bottom":r=a-h-c}o=o||0,r=r||0,isNaN(u)&&(u=n-d-o-(s||0)),isNaN(h)&&(h=a-c-r-(l||0));var p=new Si(o+i[3],r+i[0],u,h);return p.margin=i,p}function Jr(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],l=a&&a.boundingMode||"all";if(o||r){var u;if("raw"===l)u="group"===t.type?new Si(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();u=u.clone(),u.applyTransform(h)}e=$r(s({width:u.width,height:u.height},e),i,n);var c=t.position,d=o?e.x-u.x:0,f=r?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function Qr(t,e){return null!=t[jA[e][0]]||null!=t[jA[e][1]]&&null!=t[jA[e][2]]}function ts(t,e,i){function n(i,n){var r={},l=0,u={},h=0,c=2;if(XA(i,function(e){u[e]=t[e]}),XA(i,function(t){a(e,t)&&(r[t]=u[t]=e[t]),o(r,t)&&l++,o(u,t)&&h++}),s[n])return o(e,i[1])?u[i[2]]=null:o(e,i[2])&&(u[i[1]]=null),u;if(h!==c&&l){if(l>=c)return r;for(var d=0;dn;n++)if(t[n].length>e)return t[n];return t[i-1]}function os(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===rD?{}:[]),this.sourceFormat=t.sourceFormat||sD,this.seriesLayoutBy=t.seriesLayoutBy||uD,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&B(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function rs(t){var e=t.option.source,i=sD;if(I(e))i=lD;else if(_(e)){0===e.length&&(i=aD);for(var n=0,a=e.length;a>n;n++){var o=e[n];if(null!=o){if(_(o)){i=aD;break}if(S(o)){i=oD;break}}}}else if(S(e)){for(var r in e)if(e.hasOwnProperty(r)&&d(e[r])){i=rD;break}}else if(null!=e)throw new Error("Invalid data");dD(t).sourceFormat=i}function ss(t){return dD(t).source}function ls(t){dD(t).datasetMap=B()}function us(t){var e=t.option,i=e.data,n=I(i)?lD:nD,a=!1,o=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=ms(t);if(l){var u=l.option;i=u.source,n=dD(l).sourceFormat,a=!0,o=o||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=hs(i,n,o,r,s);dD(t).source=new os({data:i,fromDataset:a,seriesLayoutBy:o,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function hs(t,e,i,n,a){if(!t)return{dimensionsDefine:cs(a)};var o,r;if(e===aD)"auto"===n||null==n?ds(function(t){null!=t&&"-"!==t&&(b(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],ds(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===hD?t.length:t[0]?t[0].length:null;else if(e===oD)a||(a=fs(t));else if(e===rD)a||(a=[],f(t,function(t,e){a.push(e)}));else if(e===nD){var s=ta(t[0]);o=_(s)&&s.length||1}return{startIndex:r,dimensionsDefine:cs(a),dimensionsDetectCount:o}}function cs(t){if(t){var e=B();return p(t,function(t){if(t=r({},S(t)?t:{name:t}),null==t.name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=e.get(t.name);return i?t.name+="-"+i.count++:e.set(t.name,{count:1}),t})}}function ds(t,e,i,n){if(null==n&&(n=1/0),e===hD)for(var a=0;aa;a++)t(i[a]?i[a][0]:null,a);else for(var o=i[0]||[],a=0;aa;a++)t(o[a],a)}function fs(t){for(var e,i=0;in;n++)t.push(e+n)}function a(t){var e=t.dimsDef;return e?e.length:1}var o={},r=ms(e);if(!r||!t)return o;var s,l,u=[],h=[],c=e.ecModel,d=dD(c).datasetMap,p=r.uid+"_"+i.seriesLayoutBy;t=t.slice(),f(t,function(e,i){!S(e)&&(t[i]={name:e}),"ordinal"===e.type&&null==s&&(s=i,l=a(t[i])),o[e.name]=[]});var g=d.get(p)||d.set(p,{categoryWayDim:l,valueWayDim:0});return f(t,function(t,e){var i=t.name,r=a(t);if(null==s){var l=g.valueWayDim;n(o[i],l,r),n(h,l,r),g.valueWayDim+=r}else if(s===e)n(o[i],0,r),n(u,0,r);else{var l=g.categoryWayDim;n(o[i],l,r),n(h,l,r),g.categoryWayDim+=r}}),u.length&&(o.itemName=u),h.length&&(o.seriesName=h),o}function gs(t,e,i){var n={},a=ms(t);if(!a)return n;var o,r=e.sourceFormat,s=e.dimensionsDefine;(r===oD||r===rD)&&f(s,function(t,e){"name"===(S(t)?t.name:t)&&(o=e)});var l=function(){function t(t){return null!=t.v&&null!=t.n}for(var n={},a={},l=[],u=0,h=Math.min(5,i);h>u;u++){var c=ys(e.data,r,e.seriesLayoutBy,s,e.startIndex,u);l.push(c);var d=c===cD.Not;if(d&&null==n.v&&u!==o&&(n.v=u),(null==n.n||n.n===n.v||!d&&l[n.n]===cD.Not)&&(n.n=u),t(n)&&l[n.n]!==cD.Not)return n;d||(c===cD.Might&&null==a.v&&u!==o&&(a.v=u),(null==a.n||a.n===a.v)&&(a.n=u))}return t(n)?n:t(a)?a:null}();if(l){n.value=l.v;var u=null!=o?o:l.n;n.itemName=[u],n.seriesName=[u]}return n}function ms(t){var e=t.option,i=e.data;return i?void 0:t.ecModel.getComponent("dataset",e.datasetIndex||0)}function vs(t,e){return ys(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function ys(t,e,i,n,a,o){function r(t){var e=b(t);return null!=t&&isFinite(t)&&""!==t?e?cD.Might:cD.Not:e&&"-"!==t?cD.Must:void 0}var s,l=5;if(I(t))return cD.Not;var u,h;if(n){var c=n[o];S(c)?(u=c.name,h=c.type):b(c)&&(u=c)}if(null!=h)return"ordinal"===h?cD.Must:cD.Not;if(e===aD)if(i===hD){for(var d=t[o],f=0;f<(d||[]).length&&l>f;f++)if(null!=(s=r(d[a+f])))return s}else for(var f=0;ff;f++){var p=t[a+f];if(p&&null!=(s=r(p[o])))return s}else if(e===oD){if(!u)return cD.Not;for(var f=0;ff;f++){var g=t[f];if(g&&null!=(s=r(g[u])))return s}}else if(e===rD){if(!u)return cD.Not;var d=t[u];if(!d||I(d))return cD.Not;for(var f=0;ff;f++)if(null!=(s=r(d[f])))return s}else if(e===nD)for(var f=0;ff;f++){var g=t[f],m=ta(g);if(!_(m))return cD.Not;if(null!=(s=r(m[o])))return s}return cD.Not}function xs(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,a=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=a&&t.name!==a}}function _s(t,e){var i=t.color&&!t.colorLayer;f(e,function(e,o){"colorLayer"===o&&i||JA.hasClass(o)||("object"==typeof e?t[o]=t[o]?a(t[o],e,!1):n(e):null==t[o]&&(t[o]=e))})}function ws(t){t=t,this.option={},this.option[fD]=1,this._componentsMap=B({series:[]}),this._seriesIndices,this._seriesIndicesMap,_s(t,this._theme.option),a(t,tD,!1),this.mergeOption(t)}function bs(t,e){_(e)||(e=e?[e]:[]);var i={};return f(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}function Ss(t,e,i){var n=e.type?e.type:i?i.subType:JA.determineSubType(t,e);return n}function Ms(t,e){t._seriesIndicesMap=B(t._seriesIndices=p(e,function(t){return t.componentIndex})||[])}function Is(t,e){return e.hasOwnProperty("subType")?m(t,function(t){return t.subType===e.subType}):t}function Ts(t){f(gD,function(e){this[e]=y(t[e],t)},this)}function As(){this._coordinateSystems=[]}function Ds(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Cs(t,e,i){var n,a,o=[],r=[],s=t.timeline;if(t.baseOption&&(a=t.baseOption),(s||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;vD(l,function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))})}return a||(a=t),a.timeline||(a.timeline=s),vD([a].concat(o).concat(p(r,function(t){return t.option})),function(t){vD(e,function(e){e(t,i)})}),{baseOption:a,timelineOptions:o,mediaDefault:n,mediaList:r}}function Ls(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return f(t,function(t,e){var i=e.match(wD);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].toLowerCase();ks(n[r],t,o)||(a=!1)}}),a}function ks(t,e,i){return"min"===i?t>=e:"max"===i?e>=t:t===e}function Ps(t,e){return t.join(",")===e.join(",")}function Os(t,e){e=e||{},vD(e,function(e,i){if(null!=e){var n=t[i];if(JA.hasClass(i)){e=Jn(e),n=Jn(n);var a=ia(n,e);t[i]=xD(a,function(t){return t.option&&t.exist?_D(t.exist,t.option,!0):t.exist||t.option})}else t[i]=_D(n,e,!0)}})}function Es(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=MD.length;n>i;i++){var o=MD[i],r=e.normal,s=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?a(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?a(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function Ns(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,a=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,s(t[e],n)):t[e]=n),a&&(t.emphasis=t.emphasis||{},t.emphasis[e]=a)}}function Rs(t){Ns(t,"itemStyle"),Ns(t,"lineStyle"),Ns(t,"areaStyle"),Ns(t,"label"),Ns(t,"labelLine"),Ns(t,"upperLabel"),Ns(t,"edgeLabel")}function zs(t,e){var i=SD(t)&&t[e],n=SD(i)&&i.textStyle;if(n)for(var a=0,o=PI.length;o>a;a++){var e=PI[a];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Bs(t){t&&(Rs(t),zs(t,"label"),t.emphasis&&zs(t.emphasis,"label"))}function Vs(t){if(SD(t)){Es(t),Rs(t),zs(t,"label"),zs(t,"upperLabel"),zs(t,"edgeLabel"),t.emphasis&&(zs(t.emphasis,"label"),zs(t.emphasis,"upperLabel"),zs(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Es(e),Bs(e));var i=t.markLine;i&&(Es(i),Bs(i));var n=t.markArea;n&&Bs(n);var a=t.data;if("graph"===t.type){a=a||t.nodes;var o=t.links||t.edges;if(o&&!I(o))for(var r=0;r=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||0>=h&&0>m){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function Xs(t,e){os.isInstance(t)||(t=os.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===lD&&(this._offset=0,this._dimSize=e,this._data=i);var a=kD[n===aD?n+"_"+t.seriesLayoutBy:n];r(this,a)}function Ys(){return this._data.length}function js(t){return this._data[t]}function qs(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function hl(t,e){f(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,x(cl,e))})}function cl(t){var e=dl(t);e&&e.setOutputEnd(this.count())}function dl(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(t.uid))}return n}}function fl(){this.group=new CM,this.uid=vr("viewChart"),this.renderTask=el({plan:ml,reset:vl}),this.renderTask.context={view:this}}function pl(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Fo(t)))for(var n=0,a=t.childCount();a>n;n++)pl(t.childAt(n),e,i)}function gl(t,e,i){var n=sa(t,e),a=e&&null!=e.highlightKey?Wo(e.highlightKey):null;null!=n?f(Jn(n),function(e){pl(t.getItemGraphicEl(e),i,a)}):t.eachItemGraphicEl(function(t){pl(t,i,a)})}function ml(t){return ZD(t.model)}function vl(t){var e=t.model,i=t.ecModel,n=t.api,a=t.payload,o=e.pipelineContext.progressiveRender,r=t.view,s=a&&HD(a).updateMethod,l=o?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,a),XD[l]}function yl(t,e,i){function n(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}var a,o,r,s,l,u=0,h=0,c=null;e=e||0;var d=function(){a=(new Date).getTime(),r=this,s=arguments;var t=l||e,d=l||i;l=null,o=a-(d?u:h)-t,clearTimeout(c),d?c=setTimeout(n,t):o>=0?n():c=setTimeout(n,-o),u=a};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function xl(t,e,i,n){var a=t[e];if(a){var o=a[YD]||a,r=a[qD],s=a[jD];if(s!==i||r!==n){if(null==i||!n)return t[e]=o;a=t[e]=yl(o,i,"debounce"===n),a[YD]=o,a[qD]=n,a[jD]=i}return a}}function _l(t,e){var i=t[e];i&&i[YD]&&(t[e]=i[YD])}function wl(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=B()}function bl(t,e,i,n,a){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}a=a||{};var r;f(e,function(e){if(!a.visualType||a.visualType===e.visualType){var s=t._stageTaskMap.get(e.uid),l=s.seriesTaskMap,u=s.overallTask;if(u){var h,c=u.agentStubMap;c.each(function(t){o(a,t)&&(t.dirty(),h=!0)}),h&&u.dirty(),iC(u,n);var d=t.getPerformArgs(u,a.block);c.each(function(t){t.perform(d)}),r|=u.perform(d)}else l&&l.each(function(s){o(a,s)&&s.dirty();var l=t.getPerformArgs(s,a.block);l.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),iC(s,n),r|=s.perform(l)})}}),t.unfinished|=r}function Sl(t,e,i,n,a){function o(i){var o=i.uid,s=r.get(o)||r.set(o,el({plan:Cl,reset:Ll,count:Pl}));s.context={model:i,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Ol(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=B()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(o):s?n.eachRawSeriesByType(s,o):l&&l(n,a).each(o);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Ml(t,e,i,n,a){function o(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,el({reset:Tl,onDirty:Dl})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,Ol(t,e,n)}var r=i.overallTask=i.overallTask||el({reset:Il});r.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||B(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,o):u?u(n,a).each(o):(h=!1,f(n.getSeries(),o));var d=t._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Il(t){t.overallReset(t.ecModel,t.api,t.payload)}function Tl(t){return t.overallProgress&&Al}function Al(){this.agent.dirty(),this.getDownstream().dirty()}function Dl(){this.agent&&this.agent.dirty()}function Cl(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Ll(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Jn(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?p(e,function(t,e){return kl(e)}):nC}function kl(t){return function(e,i){var n=i.data,a=i.resetDefines[t];if(a&&a.dataEach)for(var o=e.start;o0?parseInt(n,10)/100:n?parseFloat(n):0;var a=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,a)}i=i.nextSibling}}function Vl(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),s(e.__inheritedStyle,t.__inheritedStyle))}function Gl(t){for(var e=E(t).split(pC),i=[],n=0;n0;o-=2){var r=a[o],s=a[o-1];switch(n=n||Le(),s){case"translate":r=E(r).split(pC),Ee(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=E(r).split(pC),Re(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=E(r).split(pC),Ne(n,n,parseFloat(r[0]));break;case"skew":r=E(r).split(pC),console.warn("Skew transform is not supported yet");break;case"matrix":var r=E(r).split(pC);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}function Zl(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};_C.lastIndex=0;for(var a;null!=(a=_C.exec(e));)n[a[1]]=a[2];for(var o in vC)vC.hasOwnProperty(o)&&null!=n[o]&&(i[vC[o]]=n[o]);return i}function Ul(t,e,i){var n=e/t.width,a=i/t.height,o=Math.min(n,a),r=[o,o],s=[-(t.x+t.width/2)*o+e/2,-(t.y+t.height/2)*o+i/2];return{scale:r,position:s}}function Xl(t,e){var i=new zl;return i.parse(t,e)}function Yl(t,e){return function(i,n,a){(e||!this._disposed)&&(i=i&&i.toLowerCase(),BS.prototype[t].call(this,i,n,a))}}function jl(){BS.call(this)}function ql(t,e,i){function a(t,e){return t.__prio-e.__prio}i=i||{},"string"==typeof e&&(e=iL[e]),this.id,this.group,this._dom=t;var o="canvas",r=this._zr=Yn(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=yl(y(r.flush,r),17);var e=n(e);e&&DD(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new As;var s=this._api=fu(this);ki(eL,a),ki(JC,a),this._scheduler=new wl(this,s,JC,eL),BS.call(this,this._ecEventProcessor=new pu),this._messageCenter=new jl,this._initEvents(),this.resize=y(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),nu(r,this),N(this)}function Kl(t,e,i){if(!this._disposed){var n,a=this._model,o=this._coordSysMgr.getCoordinateSystems();e=ua(a,e);for(var r=0;re.get("hoverLayerThreshold")&&!mS.node&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var i=t._chartsMap[e.__viewId];i.__alive&&i.group.traverse(function(t){t.useHoverLayer=!0})}})}function cu(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function du(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 fu(t){var e=t._coordSysMgr;return r(new Ts(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 pu(){this.eventInfo}function gu(t){function e(t,e){for(var i=0;i65535?vL:xL}function qu(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Ku(t,e){f(_L.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,f(wL,function(i){t[i]=n(e[i])}),t._calculationInfo=r(e._calculationInfo)}function $u(t,e,i,n,a){var o=mL[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.lengthc;c+=i)t[s].push(new o(Math.min(a-c,i)))}function Ju(t){var e=t._invertedIndicesMap;f(e,function(i,n){var a=t._dimensionInfos[n],o=a.ordinalMeta;if(o){i=e[n]=new yL(o.categories.length);for(var r=0;r=0?this._indices[t]:-1}function ih(t,e){var i=t._idList[e];return null==i&&(i=Qu(t,t._idDimIdx,e)),null==i&&(i=gL+e),i}function nh(t){return _(t)||(t=[t]),t}function ah(t,e){var i=t.dimensions,n=new bL(p(i,t.getDimensionInfo,t),t.hostModel);Ku(n,t);for(var a=n._storage={},o=t._storage,r=0;r=0?(a[s]=oh(o[s]),n._rawExtent[s]=rh(),n._extent[s]=null):a[s]=o[s])}return n}function oh(t){for(var e=new Array(t.length),i=0;id;d++){var p=o[d]=r({},S(o[d])?o[d]:{name:o[d]}),g=p.name,m=h[d]=new Yu;null!=g&&null==l.get(g)&&(m.name=m.displayName=g,l.set(g,d)),null!=p.type&&(m.type=p.type),null!=p.displayName&&(m.displayName=p.displayName)}var v=i.encodeDef;!v&&i.encodeDefaulter&&(v=i.encodeDefaulter(e,c)),v=B(v),v.each(function(t,e){if(t=Jn(t).slice(),1===t.length&&!b(t[0])&&t[0]<0)return void v.set(e,!1);var i=v.set(e,[]);f(t,function(t,n){b(t)&&(t=l.get(t)),null!=t&&c>t&&(i[n]=t,a(h[t],e,n))})});var y=0;f(t,function(t){var e,t,i,o;if(b(t))e=t,t={};else{e=t.name;var r=t.ordinalMeta;t.ordinalMeta=null,t=n(t),t.ordinalMeta=r,i=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var l=v.get(e);if(l!==!1){var l=Jn(l);if(!l.length)for(var u=0;u<(i&&i.length||1);u++){for(;yI;I++){var m=h[I]=h[I]||new Yu,T=m.coordDim;null==T&&(m.coordDim=uh(M,u,w),m.coordDimIndex=0,(!x||0>=_)&&(m.isExtraCoord=!0),_--),null==m.name&&(m.name=uh(m.coordDim,l)),null!=m.type||vs(e,I,m.name)!==cD.Must&&(!m.isExtraCoord||null==m.otherDims.itemName&&null==m.otherDims.seriesName)||(m.type="ordinal")}return h}function lh(t,e,i,n){var a=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return f(e,function(t){var e=t.dimsDef;e&&(a=Math.max(a,e.length))}),a}function uh(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}function hh(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=B(),this.categoryAxisMap=B(),this.firstCategoryDimIndex=null}function ch(t){var e=t.get("coordinateSystem"),i=new hh(e),n=TL[e];return n?(n(t,i,i.axisMap,i.categoryAxisMap),i):void 0}function dh(t){return"category"===t.get("type")}function fh(t,e,i){i=i||{};var n,a,o,r,s=i.byIndex,l=i.stackedCoordDimension,u=!(!t||!t.get("stack"));if(f(e,function(t,i){b(t)&&(e[i]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),a||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(a=t))}),!a||s||n||(s=!0),a){o="__\x00ecstackresult",r="__\x00ecstackedover",n&&(n.createInvertedIndices=!0);var h=a.coordDim,c=a.type,d=0;f(e,function(t){t.coordDim===h&&d++}),e.push({name:o,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:o}}function ph(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function gh(t,e){return ph(t,e)?t.getCalculationInfo("stackResultDimension"):e}function mh(t,e,i){i=i||{},os.isInstance(t)||(t=os.seriesDataToSource(t));var n,a=e.get("coordinateSystem"),o=As.get(a),r=ch(e);r&&(n=p(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=Uu(n)}return e})),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,u=IL(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?x(ps,n,e):null});r&&f(u,function(t,e){var i=t.coordDim,n=r.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=fh(e,u),c=new bL(u,e);c.setCalculationInfo(h);var d=null!=s&&vh(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function vh(t){if(t.sourceFormat===nD){var e=yh(t.data||[]);return null!=e&&!_(ta(e))}}function yh(t){for(var e=0;er&&(r=a.interval=i),null!=n&&r>n&&(r=a.interval=n);var s=a.intervalPrecision=Mh(r),l=a.niceTickExtent=[LL(Math.ceil(t[0]/r)*r,s),LL(Math.floor(t[1]/r)*r,s)];return Th(l,t),a}function Mh(t){return Tr(t)+2}function Ih(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Th(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Ih(t,0,e),Ih(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Ah(t){return t.get("stack")||OL+t.seriesIndex}function Dh(t){return t.dim+t.index}function Ch(t){var e=[],i=t.axis,n="axis0";if("category"===i.type){for(var a=i.getBandWidth(),o=0;os;++s){var u=a.get(r,s);e[o]?e[o].push(u):e[o]=[u]}});var i=[];for(var n in e)if(e.hasOwnProperty(n)){var a=e[n];if(a){a.sort(function(t,e){return t-e});for(var o=null,r=1;r0&&(o=null===o?s:Math.min(o,s))}i[n]=o}}return i}function Ph(t){var e=kh(t),i=[];return f(t,function(t){var n,a=t.coordinateSystem,o=a.getBaseAxis(),r=o.getExtent();if("category"===o.type)n=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=Math.abs(r[1]-r[0]),h=o.scale.getExtent(),c=Math.abs(h[1]-h[0]);n=l?u/c*l:u}else{var d=t.getData();n=Math.abs(r[1]-r[0])/d.count()}var f=br(t.get("barWidth"),n),p=br(t.get("barMaxWidth"),n),g=br(t.get("barMinWidth")||1,n),m=t.get("barGap"),v=t.get("barCategoryGap");i.push({bandWidth:n,barWidth:f,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:v,axisKey:Dh(o),stackId:Ah(t)})}),Oh(i)}function Oh(t){var e={};f(t,function(t){var i=t.axisKey,n=t.bandWidth,a=e[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[i]=a;var r=t.stackId;o[r]||a.autoWidthCount++,o[r]=o[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!o[r].width&&(o[r].width=s,s=Math.min(a.remainedWidth,s),a.remainedWidth-=s);var l=t.barMaxWidth;l&&(o[r].maxWidth=l);var u=t.barMinWidth;u&&(o[r].minWidth=u);var h=t.barGap;null!=h&&(a.gap=h);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandWidth,o=br(t.categoryGap,a),r=br(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*r);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){var n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,s-=n+r*n,l--}else{var n=u;e&&n>e&&(n=Math.min(e,s)),i&&i>n&&(n=i),n!==u&&(t.width=n,s-=n+r*n,l--)}}),u=(s-o)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{bandWidth:a,offset:d,width:t.width},d+=t.width*(1+r)})}),i}function Eh(t,e,i){if(t&&e){var n=t[Dh(e)];return null!=n&&null!=i&&(n=n[Ah(i)]),n}}function Nh(t,e){var i=Lh(t,e),n=Ph(i),a={};f(i,function(t){var e=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),r=Ah(t),s=n[Dh(o)][r],l=s.offset,u=s.width,h=i.getOtherAxis(o),c=t.get("barMinHeight")||0;a[r]=a[r]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(h.dim),f=e.mapDimension(o.dim),p=ph(e,d),g=h.isHorizontal(),m=Bh(o,h,p),v=0,y=e.count();y>v;v++){var x=e.get(d,v),_=e.get(f,v);if(!isNaN(x)&&!isNaN(_)){var w=x>=0?"p":"n",b=m;p&&(a[r][_]||(a[r][_]={p:m,n:m}),b=a[r][_][w]);var S,M,I,T;if(g){var A=i.dataToPoint([x,_]);S=b,M=A[1]+l,I=A[0]-m,T=u,Math.abs(I)I?-1:1)*c),p&&(a[r][_][w]+=I)}else{var A=i.dataToPoint([_,x]);S=A[0]+l,M=b,I=u,T=A[1]-m,Math.abs(T)=T?-1:1)*c),p&&(a[r][_][w]+=T)}e.setItemLayout(v,{x:S,y:M,width:I,height:T})}}},this)}function Rh(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function zh(t){return t.pipelineContext&&t.pipelineContext.large}function Bh(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}function Vh(t,e){return KL(t,qL(e))}function Gh(t,e){var i,n,a,o=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===o?i=e.getCategories().length:(n=e.get("boundaryGap"),_(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=br(n[0],1),n[1]=br(n[1],1),a=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===o?i?0:0/0:h[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:0/0:h[1]+n[1]*a),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isFinite(r))&&(r=0/0),(null==s||!isFinite(s))&&(s=0/0),t.setBlank(A(r)||A(s)||"ordinal"===o&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),0>r&&0>s&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===o){var d,p=Lh("bar",c);if(f(p,function(t){d|=t.getBaseAxis()===e.axis}),d){var g=Ph(p),m=Fh(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function Fh(t,e,i,n){var a=i.axis.getExtent(),o=a[1]-a[0],r=Eh(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;f(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;f(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=1-(s+l)/o,d=h/c-h;return e+=d*(l/u),t-=d*(s/u),{min:t,max:e}}function Wh(t,e){var i=Gh(t,e),n=null!=e.getMin(),a=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:a,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Hh(t,e){if(e=e||t.get("type"))switch(e){case"category":return new CL(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new PL;default:return(xh.getClass(e)||PL).create(t)}}function Zh(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||0>i&&0>n)}function Uh(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,a){return null!=i&&(a=n-i),e(Xh(t,n),a)}:function(e){return t.scale.getLabel(e)}}function Xh(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Yh(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,a,o="category"===t.type,r=i.getExtent();o?a=i.count():(n=i.getTicks(),a=n.length);var s,l=t.getLabelModel(),u=Uh(t),h=1;a>40&&(h=Math.ceil(a/40));for(var c=0;a>c;c+=h){var d=n?n[c]:r[0]+c,f=u(d),p=l.getTextRect(f),g=jh(p,l.get("rotate")||0);s?s.union(g):s=g}return s}}function jh(t,e){var i=e*Math.PI/180,n=t.plain(),a=n.width,o=n.height,r=a*Math.cos(i)+o*Math.sin(i),s=a*Math.sin(i)+o*Math.cos(i),l=new Si(n.x,n.y,r,s);return l}function qh(t){var e=t.get("interval");return null==e?"auto":e}function Kh(t){return"category"===t.type&&0===qh(t.getLabelModel())}function $h(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 Jh(t,e,i,n,a,o,r){var s=0===t.indexOf("empty");s&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return l=0===t.indexOf("image://")?wo(t.slice(8),new Si(e,i,n,a),r?"center":"cover"):0===t.indexOf("path://")?_o(t.slice(7),{},new Si(e,i,n,a),r?"center":"cover"):new hk({shape:{symbolType:t,x:e,y:i,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=$h,l.setColor(o),l}function Qh(t){return mh(t.getSource(),t)}function tc(t,e){var i=e;pr.isInstance(e)||(i=new pr(e),c(i,ik));var n=Hh(i);return n.setExtent(t[0],t[1]),Wh(n,i),n}function ec(t){c(t,ik)}function ic(t,e){return Math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),s+=a,l+=o,a=s,o=l,n.push([s/i,l/i])}return n}function sc(t){return"category"===t.type?uc(t):dc(t)}function lc(t,e){return"category"===t.type?cc(t,e):{ticks:t.scale.getTicks()}}function uc(t){var e=t.getLabelModel(),i=hc(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function hc(t,e){var i=fc(t,"labels"),n=qh(e),a=pc(i,n);if(a)return a;var o,r;return w(n)?o=_c(t,n):(r="auto"===n?mc(t):n,o=xc(t,r)),gc(i,n,{labels:o,labelCategoryInterval:r})}function cc(t,e){var i=fc(t,"ticks"),n=qh(e),a=pc(i,n);if(a)return a;var o,r;if((!e.get("show")||t.scale.isBlank())&&(o=[]),w(n))o=_c(t,n,!0);else if("auto"===n){var s=hc(t,t.getLabelModel());r=s.labelCategoryInterval,o=p(s.labels,function(t){return t.tickValue})}else r=n,o=xc(t,r,!0);return gc(i,n,{ticks:o,tickCategoryInterval:r})}function dc(t){var e=t.scale.getTicks(),i=Uh(t);return{labels:p(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function fc(t,e){return gk(t)[e]||(gk(t)[e]=[])}function pc(t,e){for(var i=0;i40&&(s=Math.max(1,Math.floor(r/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=o[1];l+=s){var p=0,g=0,m=Hi(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=gk(t.model),w=t.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-r)<=1&&b>x&&_.axisExtend0===w[0]&&_.axisExtend1===w[1]?x=b:(_.lastTickCount=r,_.lastAutoInterval=x,_.axisExtend0=w[0],_.axisExtend1=w[1]),x}function yc(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function xc(t,e,i){function n(t){l.push(i?t:{formattedLabel:a(t),rawLabel:o.getLabel(t),tickValue:t})}var a=Uh(t),o=t.scale,r=o.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=o.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Kh(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g-u!==r[1]&&n(r[1]),l}function _c(t,e,i){var n=t.scale,a=Uh(t),o=[];return f(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&o.push(i?t:{formattedLabel:a(t),rawLabel:r,tickValue:t})}),o}function wc(t,e){var i=t[1]-t[0],n=e,a=i/n/2;t[0]+=a,t[1]-=a}function bc(t,e,i,n){function a(t,e){return t=Sr(t),e=Sr(e),d?t>e:e>t}var o=e.length;if(t.onBand&&!i&&o){var r,s,l=t.getExtent();if(1===o)e[0].coord=l[0],r=e[1]={coord:l[0]};else{var u=e[o-1].tickValue-e[0].tickValue,h=(e[o-1].coord-e[0].coord)/u;f(e,function(t){t.coord-=h/2});var c=t.scale.getExtent();s=1+c[1]-e[o-1].tickValue,r={coord:e[o-1].coord+h*s},e.push(r)}var d=l[0]>l[1];a(e[0].coord,l[0])&&(n?e[0].coord=l[0]:e.shift()),n&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],r.coord)&&(n?r.coord=l[1]:e.pop()),n&&a(r.coord,l[1])&&e.push({coord:l[1]})}}function Sc(t){return this._axes[t]}function Mc(t){wk.call(this,t)}function Ic(t,e){return e.type||(e.data?"category":"value")}function Tc(t,e){return t.getCoordSysModel()===e}function Ac(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Dc(t,e,i,n){function a(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Cc(r[u])&&(o=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&Cc(r[h])&&!n[a(r[h])]){o=r[h];break}o&&(n[a(o)]=!0)}}function Cc(t){return t&&"category"!==t.type&&"time"!==t.type&&Zh(t)}function Lc(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 kc(t){return p(Lk,function(e){var i=t.getReferringComponents(e)[0];return i})}function Pc(t){return"cartesian2d"===t.get("coordinateSystem")}function Oc(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Qs(t,e,i[0]);if(n){for(var a=[],o=0;o0?"bottom":"top":a.width>0?"left":"right";l||Ec(t.style,f,n,u,o,i,g),Wc(a)&&(f.fill=f.stroke="none"),Vo(t,f)}function Zc(t,e){var i=t.get(Nk)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function Uc(t,e,i){var n=t.getData(),a=[],o=n.getLayout("valueAxisHorizontal")?1:0;a[1-o]=n.getLayout("valueAxisStart");var r=new Wk({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:a,__baseDimIdx:o,__largeDataIndices:n.getLayout("largeDataIndices"),__barWidth:n.getLayout("barWidth")});e.add(r),Yc(r,t,n),r.seriesIndex=t.seriesIndex,t.get("silent")||(r.on("mousedown",Hk),r.on("mousemove",Hk))}function Xc(t,e,i){var n=t.__baseDimIdx,a=1-n,o=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[a];Rk[0]=e,Rk[1]=i;for(var u=Rk[n],h=Rk[1-n],c=u-s,d=u+s,f=0,p=o.length/2;p>f;f++){var g=2*f,m=o[g+n],v=o[g+a];if(m>=c&&d>=m&&(v>=l?h>=l&&v>=h:h>=v&&l>=h))return r[f]}return-1}function Yc(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),a=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(a),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function jc(t,e,i,n){var a,o,r=Cr(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return Lr(r-Zk/2)?(o=l?"bottom":"top",a="center"):Lr(r-1.5*Zk)?(o=l?"top":"bottom",a="center"):(o="middle",a=1.5*Zk>r&&r>Zk/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:a,textVerticalAlign:o}}function qc(t,e,i){if(!Kh(t.axis)){var n=t.get("axisLabel.showMinLabel"),a=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var o=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];n===!1?(Kc(o),Kc(u)):$c(o,r)&&(n?(Kc(r),Kc(h)):(Kc(o),Kc(u))),a===!1?(Kc(s),Kc(c)):$c(l,s)&&(a?(Kc(l),Kc(d)):(Kc(s),Kc(c)))}}function Kc(t){t&&(t.ignore=!0)}function $c(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var a=ke([]);return Ne(a,a,-t.rotation),i.applyTransform(Oe([],a,t.getLocalTransform())),n.applyTransform(Oe([],a,e.getLocalTransform())),i.intersect(n)}}function Jc(t){return"middle"===t||"center"===t}function Qc(t,e,i,n,a){for(var o=[],r=[],s=[],l=0;l=0||t===e}function ud(t){var e=hd(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,a=i.option,o=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=dd(i);null==o&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?i=n[0]:n[1]<0&&(i=n[1]),i}function Ad(t,e,i,n){var a=0/0;t.stacked&&(a=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=t.valueStart);var o=t.baseDataOffset,r=[];return r[o]=i.get(t.baseDim,n),r[1-o]=a,e.dataToPoint(r)}function Dd(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 Cd(t){return isNaN(t[0])||isNaN(t[1])}function Ld(t,e,i,n,a,o,r,s,l,u){return"none"!==u&&u?kd.apply(this,arguments):Pd.apply(this,arguments)}function kd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(Cd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;pP(mP,g),mP[m]=g[m]+v,pP(vP,p),vP[m]=p[m]-v,t.bezierCurveTo(mP[0],mP[1],vP[0],vP[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Pd(t,e,i,n,a,o,r,s,l,u,h){for(var c=0,d=i,f=0;n>f;f++){var p=e[d];if(d>=a||0>d)break;if(Cd(p)){if(h){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]),pP(mP,p);else if(l>0){var g=d+o,m=e[g];if(h)for(;m&&Cd(e[g]);)g+=o,m=e[g];var v=.5,y=e[c],m=e[g];if(!m||Cd(m))pP(vP,p);else{Cd(m)&&!h&&(m=p),Y(gP,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=ES(p,y),_=ES(p,m);v=_/(_+x),fP(vP,p,gP,-l*(1-v))}cP(mP,mP,s),dP(mP,mP,r),cP(vP,vP,s),dP(vP,vP,r),t.bezierCurveTo(mP[0],mP[1],vP[0],vP[1],p[0],p[1]),fP(mP,p,gP,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Od(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;an[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function Ed(t,e){if(t.length===e.length){for(var i=0;ia;a++)n.push(Ad(i,t,e,a));return n}function zd(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r=0;o--){var r=i[o].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if(n=l&&l.coordDim,"x"===n||"y"===n){a=i[o];break}}if(a){var u=e.getAxis(n),h=p(a.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=a.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var g=10,m=h[0].coord-g,v=h[c-1].coord+g,y=v-m;if(.001>y)return"transparent";f(h,function(t){t.offset=(t.coord-m)/y}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var x=new hA(0,0,0,0,h,!0);return x[n]=m,x[n+"2"]=v,x}}}function Vd(t,e,i){var n=t.get("showAllSymbol"),a="auto"===n;if(!n||a){var o=i.getAxesByScale("ordinal")[0];if(o&&(!a||!Gd(o,e))){var r=e.mapDimension(o.dim),s={};return f(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Gd(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),o=Math.max(1,Math.round(a/5)),r=0;a>r;r+=o)if(1.5*vd.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}function Fd(t,e,i){if("cartesian2d"===t.type){var n=t.getBaseAxis().isHorizontal(),a=Rc(t,e,i);if(!i.get("clip",!0)){var o=a.shape,r=Math.max(o.width,o.height);n?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)}return a}return zc(t,e,i)}function Wd(t,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){var i=e();return i.indexOfName(t)>=0},this.indexOfName=function(e){var i=t();return i.indexOfName(e)},this.getItemVisual=function(e,i){var n=t();return n.getItemVisual(e,i)}}function Hd(t,e,i,n){var a=e.getData(),o=this.dataIndex,r=a.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),a.each(function(t){Zd(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)})}function Zd(t,e,i,n,a){var o=(e.startAngle+e.endAngle)/2,r=Math.cos(o),s=Math.sin(o),l=i?n:0,u=[r*l,s*l];a?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Ud(t,e){CM.call(this);var i=new jT({z2:2}),n=new QT,a=new ZT;this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0)}function Xd(t,e,i,n,a,o,r,s,l,u){function h(e,i,n){for(var a=e;i>a&&!(t[a].y+n>l+r);a++)if(t[a].y+=n,a>e&&i>a+1&&t[a+1].y>t[a].y+t[a].height)return void c(a,n/2);c(i-1,n/2)}function c(e,i){for(var n=e;n>=0&&!(t[n].y-i0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function d(t,e,i,n,a,o){for(var r=o>0?e?Number.MAX_VALUE:0:e?Number.MAX_VALUE:0,s=0,l=t.length;l>s;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=a+h>u?Math.sqrt((a+h+c)*(a+h+c)-u*u):Math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&r>=d&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=t.length,m=[],v=[],y=0;g>y;y++){if("outer"===t[y].position&&"labelLine"===t[y].labelAlignTo){var x=t[y].x-u;t[y].linePoints[1][0]+=x,t[y].x=u}f=t[y].y-p,0>f&&h(y,g,-f,a),p=t[y].y+t[y].height}0>r-p&&c(g-1,p-r);for(var y=0;g>y;y++)t[y].y>=i?v.push(t[y]):m.push(t[y]);d(m,!1,e,i,n,a),d(v,!0,e,i,n,a)}function Yd(t,e,i,n,a,o,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d0?"P":"N",o=n.getVisual("borderColor"+a)||n.getVisual("color"+a),r=i.getModel(ZP).getItemStyle(XP);e.useStyle(r),e.style.fill=null,e.style.stroke=o}function sf(t,e,i,n,a){var o;return o=i>n?-1:n>i?1:e>0?t.get(a,e-1)<=n?1:-1:1}function lf(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),o=br(C(t.get("barMaxWidth"),a),a),r=br(C(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?br(s,a):Math.max(Math.min(a/2,o),r)}function uf(t,e,i){vk.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function hf(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=p(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new uf(i,"log"===t.get("axisType")?new ek:new PL);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}function cf(t,e){return s({show:e},t)}function df(t){return _(t)||(t=[+t,+t]),t}function ff(t){return!isNaN(t[0])&&!isNaN(t[1])}function pf(t){return[t.cx,t.cy]}function gf(){var t=AS();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function mf(t,e,i){var n=t[1]-t[0];e=p(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}});var a=e.length,o=0;return function(t){for(var n=o;a>n;n++){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}if(n===a)for(var n=o-1;n>=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){o=n;break}}return n>=0&&a>n&&i[n]}}function vf(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}function yf(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function xf(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,If(e,i,t),uO(i,function(i){uO(e.TRANSFERABLE_METHODS,function(e){i.wrapMethod(e,x(_f,t))})}),e.wrapMethod("cloneShallow",x(bf,t)),uO(e.CHANGABLE_METHODS,function(i){e.wrapMethod(i,x(wf,t))}),O(i[e.dataType]===e)}function _f(t,e){if(Mf(this)){var i=r({},this[hO]);i[this.dataType]=e,If(e,i,t)}else Tf(e,this.dataType,this[cO],t);return e}function wf(t,e){return t.struct&&t.struct.update(this),e}function bf(t,e){return uO(e[hO],function(i,n){i!==e&&Tf(i.cloneShallow(),n,e,t)}),e}function Sf(t){var e=this[cO];return null==t||null==e?e:e[hO][t]}function Mf(t){return t[cO]===t}function If(t,e,i){t[hO]={},uO(e,function(e,n){Tf(e,n,t,i)})}function Tf(t,e,i,n){i[hO][e]=t,t[cO]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Sf}function Af(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=p(e||[],function(e){return new pr(e,t,t.ecModel)}),this.leavesModel=new pr(i||{},t,t.ecModel)}function Df(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Cf(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var r=i[o];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(r)}}function Lf(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,a=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){Nf(t);var o=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a));t.parentNode.hierNode.defaultAncestor=Rf(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)}function kf(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Pf(t){return arguments.length?t:Ff}function Of(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Ef(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Nf(t){for(var e=t.children,i=e.length,n=0,a=0;--i>=0;){var o=e[i];o.hierNode.prelim+=n,o.hierNode.modifier+=n,a+=o.hierNode.change,n+=o.hierNode.shift+a}}function Rf(t,e,i,n){if(e){for(var a=t,o=t,r=o.parentNode.children[0],s=e,l=a.hierNode.modifier,u=o.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=zf(s),o=Bf(o),s&&o;){a=zf(a),r=Bf(r),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-u+n(s,o);d>0&&(Gf(Vf(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=a.hierNode.modifier,h+=r.hierNode.modifier}s&&!zf(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),o&&!Bf(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=u-h,i=t)}return i}function zf(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Bf(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Vf(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Gf(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Ff(t,e){return t.parentNode===e.parentNode?1:2}function Wf(){tM.call(this)}function Hf(t){this.name=t,this.zoomLimit,tM.call(this),this._roamTransformable=new Wf,this._rawTransformable=new Wf,this._center,this._zoom}function Zf(t,e,i,n){var a=i.seriesModel,o=a?a.coordinateSystem:null;return o===this?o[t](n):null}function Uf(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()}function Xf(t,e,i,n){var a=t.target,o=t.zoomLimit,r=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var u=o.min||0,h=o.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()}function Yf(t,e,i){var n=Kf(t);n[e]=i}function jf(t,e,i){var n=Kf(t),a=n[e];a===i&&(n[e]=null)}function qf(t,e){return!!Kf(t)[e]}function Kf(t){return t[pO]||(t[pO]={})}function $f(t){this.pointerChecker,this._zr=t,this._opt={};var e=y,i=e(Jf,this),a=e(Qf,this),o=e(tp,this),r=e(ep,this),l=e(ip,this);BS.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,u){this.disable(),this._opt=s(n(u)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(e===!0||"move"===e||"pan"===e)&&(t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",o)),(e===!0||"scale"===e||"zoom"===e)&&(t.on("mousewheel",r),t.on("pinch",l))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",r),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Jf(t){if(!(be(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 Qf(t){if(this._dragging&&op("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!qf(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&ZS(t.event),ap(this,"pan","moveOnMouseMove",t,{dx:o,dy:r,oldX:n,oldY:a,newX:e,newY:i})}}function tp(t){be(t)||(this._dragging=!1)}function ep(t){var e=op("zoomOnMouseWheel",t,this._opt),i=op("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,a=Math.abs(n),o=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=a>3?1.4:a>1?1.2:1.1,l=n>0?s:1/s;np(this,"zoom","zoomOnMouseWheel",t,{scale:l,originX:o,originY:r})}if(i){var u=Math.abs(n),h=(n>0?1:-1)*(u>3?.4:u>1?.15:.05);np(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:o,originY:r})}}}function ip(t){if(!qf(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;np(this,"zoom",null,t,{scale:e,originX:t.pinchX,originY:t.pinchY})}}function np(t,e,i,n,a){t.pointerChecker&&t.pointerChecker(n,a.originX,a.originY)&&(ZS(n.event),ap(t,e,i,n,a))}function ap(t,e,i,n,a){a.isAvailableBehavior=y(op,null,i,n),t.trigger(e,a)}function op(t,e,i){var n=i[t];return!t||n&&(!b(n)||e.event[n+"Key"])}function rp(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!gO[n.mainType]&&a&&a.model!==i}function sp(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function lp(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),i.symbolInnerColor=t.isExpand===!1&&0!==t.children.length?i.itemStyle.fill:"#fff",i}function up(t,e,i,n,a,o){var r=!i,l=t.tree.getNodeByDataIndex(e),u=l.getModel(),o=lp(l,u,o),h=t.tree.root,c=l.parentNode===h?l:l.parentNode||l,d=t.getItemGraphicEl(c.dataIndex),f=c.getLayout(),p=d?{x:d.position[0],y:d.position[1],rawX:d.__radialOldRawX,rawY:d.__radialOldRawY}:f,g=l.getLayout();r?(i=new vd(t,e,o),i.attr("position",[p.x,p.y])):i.updateData(t,e,o),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=g.rawX,i.__radialRawY=g.rawY,n.add(i),t.setItemGraphicEl(e,i),er(i,{position:[g.x,g.y]},a);var m=i.getSymbolPath();if("radial"===o.layout){var v,y,x=h.children[0],_=x.getLayout(),w=x.children.length;if(g.x===_.x&&l.isExpand===!0){var b={};b.x=(x.children[0].getLayout().x+x.children[w-1].getLayout().x)/2,b.y=(x.children[0].getLayout().y+x.children[w-1].getLayout().y)/2,v=Math.atan2(b.y-_.y,b.x-_.x),0>v&&(v=2*Math.PI+v),y=b.x<_.x,y&&(v-=Math.PI)}else v=Math.atan2(g.y-_.y,g.x-_.x),0>v&&(v=2*Math.PI+v),0===l.children.length||0!==l.children.length&&l.isExpand===!1?(y=g.x<_.x,y&&(v-=Math.PI)):(y=g.x>_.x,y||(v-=Math.PI));var S=y?"left":"right",M=o.labelModel.get("rotate"),I=M*(Math.PI/180);m.setStyle({textPosition:o.labelModel.get("position")||S,textRotation:null==M?-v:I,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==h){var T=i.__edge;T||(T=i.__edge=new rA({shape:cp(o,p,p),style:s({opacity:0,strokeNoScale:!0},o.lineStyle)})),er(T,{shape:cp(o,f,g),style:{opacity:1}},a),n.add(T)}}function hp(t,e,i,n,a,o){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),o=lp(s,u,o),h=s.parentNode===l?s:s.parentNode||s;r=h.getLayout(),null==r;)h=h.parentNode===l?h:h.parentNode||h;er(i,{position:[r.x+1,r.y+1]},a,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&er(c,{shape:cp(o,r,r),style:{opacity:0}},a,function(){n.remove(c)})}function cp(t,e,i){var n,a,o,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Of(s,u),f=Of(s,u+(h-u)*t.curvature),p=Of(l,h+(u-h)*t.curvature),g=Of(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,("LR"===c||"RL"===c)&&(n=s+(l-s)*t.curvature,a=u,o=l+(s-l)*t.curvature,r=h),("TB"===c||"BT"===c)&&(n=s,a=u+(h-u)*t.curvature,o=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:o,cpy2:r}}function dp(t,e,i){var n=t.getZoom(),a=t.getCenter(),o=e.zoom,r=t.dataToPoint(a);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;var a=t.pointToData(r);t.setCenter(a)}if(null!=o){if(i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(n*o,l),s)/n}t.scale[0]*=o,t.scale[1]*=o;var u=t.position,h=(e.originX-u[0])*(o-1),c=(e.originY-u[1])*(o-1);u[0]-=h,u[1]-=c,t.updateTransform();var a=t.pointToData(r);t.setCenter(a),t.setZoom(o*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function fp(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s=0;o--)n.push(a[o])}}function gp(t,e){var i=Ef(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,o=0,r=null;"radial"===n?(a=2*Math.PI,o=Math.min(i.height,i.width)/2,r=Pf(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(a=i.width,o=i.height,r=Pf());var s=t.getData().tree.root,l=s.children[0];if(l){Cf(s),fp(l,Lf,r),s.hierNode.modifier=-l.hierNode.prelim,pp(l,kf);var u=l,h=l,c=l;pp(l,function(t){var e=t.getLayout().x;eh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),pp(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Of(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+f),p=a/(c.depth-1||1),pp(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):("TB"===y||"BT"===y)&&(p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),pp(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function mp(t,e,i){if(t&&u(e,t.type)>=0){var n=i.getData().tree.root,a=t.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var o=t.targetNodeId;if(null!=o&&(a=n.getNodeById(o)))return{node:a}}}function vp(t){for(var e=[];t;)t=t.parentNode,t&&e.push(t);return e.reverse()}function yp(t,e){var i=vp(t);return u(i,e)>=0}function xp(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function _p(t){var e=0;f(t.children,function(t){_p(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function wp(t,e){var i=e.get("color");if(i){t=t||[];var n;if(f(t,function(t){var e=new pr(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){var a=t[0]||(t[0]={});a.color=i.slice()}return t}}function bp(t){this.group=new CM,t.add(this.group)}function Sp(t,e,i,n,a,o){var r=[[a?t:t-xO,e],[t+i,e],[t+i,e+n],[a?t:t-xO,e+n]];return!o&&r.splice(2,0,[t+i+xO,e+n/2]),!a&&r.push([t,e+n/2]),r}function Mp(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&xp(i,e)}}function Ip(){var t,e=[],i={};return{add:function(t,n,a,o,r){return b(o)&&(r=o,o=0),i[t.id]?!1:(i[t.id]=1,e.push({el:t,target:n,time:a,delay:o,easing:r}),!0)},done:function(e){return t=e,this},start:function(){function n(){a--,a||(e.length=0,i={},t&&t())}for(var a=e.length,o=0,r=e.length;r>o;o++){var s=e[o];s.el.animateTo(s.target,s.time,s.delay,s.easing,n)}return this}}}function Tp(){return{nodeGroup:[],background:[],content:[]}}function Ap(t,e,i,a,o,s,l,u,h,c){function d(e,i,n){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:_,height:w});var a=l.getVisual("borderColor",!0),o=k.get("borderColor");p(i,function(){var t=OO(L);t.fill=a;var e=PO(k);if(e.fill=o,n){var r=_-2*b;g(t,e,a,r,A,{x:b,y:0,width:r,height:A})}else t.text=e.text=null;i.setStyle(t),Vo(i,e)}),e.add(i)}function f(e,i){i.dataIndex=l.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(_-2*b,0),a=Math.max(w-2*b,0);i.culling=!0,i.setShape({x:b,y:b,width:n,height:a});var o=l.getVisual("color",!0);p(i,function(){var t=OO(L);t.fill=o;var e=PO(k);g(t,e,o,n,a),i.setStyle(t),Vo(i,e)}),e.add(i)}function p(t,e){S?!t.invisible&&s.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function g(e,i,a,o,r,s){var u=l.getModel(),h=D(t.getFormattedLabel(l.dataIndex,"normal",null,null,s?"upperLabel":"label"),u.get("name"));if(!s&&x.isLeafRoot){var c=t.get("drillDownIcon",!0);h=c?c+" "+h:h}var d=u.getModel(s?AO:IO),f=u.getModel(s?DO:TO),p=d.getShallow("show");Ho(e,i,d,f,{defaultText:p?h:null,autoColor:a,isRectText:!0}),s&&(e.textRect=n(s)),e.truncate=p&&d.get("ellipsis")?{outerWidth:o,outerHeight:r,minChar:2}:null}function m(t,n,a,r){var s=null!=I&&i[t][I],l=o[t];return s?(i[t][I]=null,v(l,s,t)):S||(s=new n({z:Dp(a,r)}),s.__tmDepth=a,s.__tmStorageName=t,y(l,s,t)),e[t][M]=s}function v(t,e,i){var n=t[M]={};n.old="nodeGroup"===i?e.position.slice():r({},e.shape)}function y(t,e,i){var n=t[M]={},r=l.parentNode;if(r&&(!a||"drillDown"===a.direction)){var s=0,u=0,h=o.background[r.getRawIndex()];!a&&h&&h.old&&(s=h.old.width,u=h.old.height),n.old="nodeGroup"===i?[0,u]:{x:s,y:u,width:0,height:0}}n.fadein="nodeGroup"!==i}if(l){var x=l.getLayout();if(x&&x.isInView){var _=x.width,w=x.height,b=x.borderWidth,S=x.invisible,M=l.getRawIndex(),I=u&&u.getRawIndex(),T=l.viewChildren,A=x.upperHeight,C=T&&T.length,L=l.getModel("itemStyle"),k=l.getModel("emphasis.itemStyle"),P=m("nodeGroup",wO);if(P){if(h.add(P),P.attr("position",[x.x||0,x.y||0]),P.__tmNodeWidth=_,P.__tmNodeHeight=w,x.isAboveViewRoot)return P;var O=m("background",bO,c,LO);if(O&&d(P,O,C&&x.upperHeight),!C){var E=m("content",bO,c,kO);E&&f(P,E)}return P}}}}function Dp(t,e){var i=t*CO+e;return(i-1)/i}function Cp(t){var e=t.pieceList;t.hasSpecialVisual=!1,f(e,function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)})}function Lp(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(zO(e,function(t,e){n[t]=e}),!_(i)){var a=[];S(i)?zO(i,function(t,e){var i=n[e];a[null!=i?i:VO]=t}):a[VO]=i,i=Vp(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}function kp(t,e){var i=t.visual,n=[];S(i)?zO(i,function(t){n.push(t)}):null!=i&&n.push(i);var a={color:1,symbol:1};e||1!==n.length||a.hasOwnProperty(t.type)||(n[1]=n[0]),Vp(t,n)}function Pp(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:zp([0,1])}}function Op(t){var e=this.option.visual;return e[Math.round(wr(t,[0,1],[0,e.length-1],!0))]||{}}function Ep(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Np(t){var e=this.option.visual;return e[this.option.loop&&t!==VO?t%e.length:t]}function Rp(){return this.option.visual[0]}function zp(t){return{linear:function(e){return wr(e,t,this.option.visual,!0)},category:Np,piecewise:function(e,i){var n=Bp.call(this,i);return null==n&&(n=wr(e,t,this.option.visual,!0)),n},fixed:Rp}}function Bp(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=GO.findPieceIndex(t,i),a=i[n];if(a&&a.visual)return a.visual[this.type]}}function Vp(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=p(e,function(t){return $e(t)})),e}function Gp(t,e,i){return t?i>=e:i>e}function Fp(t,e,i,n,a,o){var r=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=t.getModel(ZO),h=i[t.depth],c=Wp(u,e,h,n),d=u.get("borderColor"),p=u.get("borderColorSaturation");null!=p&&(l=Hp(c,t),d=Zp(p,l)),t.setVisual("borderColor",d);var g=t.viewChildren;if(g&&g.length){var m=Xp(t,r,s,u,c,g);f(g,function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=jp(r,c,t,e,m,o);Fp(t,s,i,n,a,o)}})}else l=Hp(c,t),t.setVisual("color",l)}}function Wp(t,e,i,n){var a=r({},e);return f(["color","colorAlpha","colorSaturation"],function(o){var r=t.get(o,!0);null==r&&i&&(r=i[o]),null==r&&(r=e[o]),null==r&&(r=n.get(o)),null!=r&&(a[o]=r)}),a}function Hp(t){var e=Up(t,"color");if(e){var i=Up(t,"colorAlpha"),n=Up(t,"colorSaturation");return n&&(e=ai(e,null,null,n)),i&&(e=oi(e,i)),e}}function Zp(t,e){return null!=e?ai(e,null,null,t):null}function Up(t,e){var i=t[e];return null!=i&&"none"!==i?i:void 0}function Xp(t,e,i,n,a,o){if(o&&o.length){var r=Yp(e,"color")||null!=a.color&&"none"!==a.color&&(Yp(e,"colorAlpha")||Yp(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new GO(c);return d.__drColorMappingBy=h,d}}}function Yp(t,e){var i=t.get(e);return HO(i)&&i.length?{name:e,range:i}:null}function jp(t,e,i,n,a,o){var s=r({},e);if(a){var l=a.type,u="color"===l&&a.__drColorMappingBy,h="index"===u?n:"id"===u?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=a.mapValueToVisual(h)}return s}function qp(t,e,i,n){var a,o;if(!t.isRemoved()){var r=t.getLayout();a=r.width,o=r.height;var s=t.getModel(),l=s.get(KO),u=s.get($O)/2,h=og(s),c=Math.max(l,h),d=l-u,f=c-u,s=t.getModel();t.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:h},!0),a=XO(a-2*d,0),o=XO(o-d-f,0);var p=a*o,g=Kp(t,s,p,e,i,n);if(g.length){var m={x:d,y:f,width:a,height:o},v=YO(a,o),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;w>_;){var b=g[_]; x.push(b),x.area+=b.getLayout().area;var S=tg(x,v,e.squareRatio);y>=S?(_++,y=S):(x.area-=x.pop().getLayout().area,eg(x,v,m,u,!1),v=YO(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&eg(x,v,m,u,!0),!i){var M=s.get("childrenVisibleMin");null!=M&&M>p&&(i=!0)}for(var _=0,w=g.length;w>_;_++)qp(g[_],e,i,n+1)}}}function Kp(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!l)return t.viewChildren=[];r=m(r,function(t){return!t.isRemoved()}),Jp(r,s);var u=Qp(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=$p(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;c>h;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function $p(t,e,i,n,a){if(!n)return i;for(var o=t.get("visibleMin"),r=a.length,s=r,l=r-1;l>=0;l--){var u=a["asc"===n?r-l-1:l].getValue();o>u/i*e&&(s=l,i-=u)}return"asc"===n?a.splice(0,r-s):a.splice(s,r-s),i}function Jp(t,e){return e&&t.sort(function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}),t}function Qp(t,e,i){for(var n=0,a=0,o=e.length;o>a;a++)n+=e[a].getValue();var r,s=t.get("visualDimension");if(e&&e.length)if("value"===s&&i)r=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&r.reverse();else{var r=[1/0,-1/0];qO(e,function(t){var e=t.getValue(s);er[1]&&(r[1]=e)})}else r=[0/0,0/0];return{sum:n,dataExtent:r}}function tg(t,e,i){for(var n,a=0,o=1/0,r=0,s=t.length;s>r;r++)n=t[r].getLayout().area,n&&(o>n&&(o=n),n>a&&(a=n));var l=t.area*t.area,u=e*e*i;return l?XO(u*a/l,l/(u*o)):1/0}function eg(t,e,i,n,a){var o=e===i.width?0:1,r=1-o,s=["x","y"],l=["width","height"],u=i[s[o]],h=e?t.area/e:0;(a||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;d>c;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=XO(h-2*n,0),v=i[s[o]]+i[l[o]]-u,y=c===d-1||g>v?v:g,x=p[l[o]]=XO(y-2*n,0);p[s[r]]=i[s[r]]+YO(n,m/2),p[s[o]]=u+YO(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function ig(t,e,i,n,a){var o=(e||{}).node,r=[n,a];if(!o||o===i)return r;for(var s,l=n*a,u=l*t.option.zoomToNodeRatio;s=o.parentNode;){for(var h=0,c=s.children,d=0,f=c.length;f>d;d++)h+=c[d].getValue();var p=o.getValue();if(0===p)return r;u*=h/p;var g=s.getModel(),m=g.get(KO),v=Math.max(m,og(g,m));u+=4*m*m+(3*m+v)*Math.pow(u,.5),u>RA&&(u=RA),o=s}l>u&&(u=l);var y=Math.pow(u/l,.5);return[n*y,a*y]}function ng(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var a=i.node,o=a.getLayout();if(!o)return n;for(var r=[o.width/2,o.height/2],s=a;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}function ag(t,e,i,n,a){var o=t.getLayout(),r=i[a],s=r&&r===t;if(!(r&&!s||a===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new Si(e.x-o.x,e.y-o.y,e.width,e.height);qO(t.viewChildren||[],function(t){ag(t,l,i,n,a+1)})}}function og(t){return t.get(JO)?t.get(QO):0}function rg(t){var e=0;f(t.children,function(t){rg(t);var i=t.value;_(i)&&(i=i[0]),e+=i});var i=t.value;_(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),0>i&&(i=0),_(t.value)?t.value[0]=i:t.value=i}function sg(t,e,i){function n(){r.ignore=r.hoverIgnore}function a(){r.ignore=r.normalIgnore}CM.call(this);var o=new jT({z2:iE});o.seriesIndex=e.seriesIndex;var r=new ZT({z2:nE,silent:t.getModel("label").get("silent")});this.add(o),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",a).on("mouseover",n).on("mouseout",a)}function lg(t,e,i){var n=t.getVisual("color"),a=t.getVisual("visualMeta");a&&0!==a.length||(n=null);var o=t.getModel("itemStyle").get("color");if(o)return o;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return o=i.option.color[ug(t)%r]}function ug(t){for(var e=t;e.depth>1;)e=e.parentNode;var i=t.getAncestors()[0];return u(i.children,e)}function hg(t,e,i){return i===eE.NONE?!1:i===eE.SELF?t===e:i===eE.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e)}function cg(t,e,i){var n=e.getData();n.setItemVisual(t.dataIndex,"color",i)}function dg(t,e){var i=t.children||[];t.children=fg(i,e),i.length&&f(t.children,function(t){dg(t,e)})}function fg(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function pg(t){for(var e,i=0;i1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else o=t.getBoxLayoutParams(),o.aspect=c,f=$r(o,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Ag(t,e){f(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Dg(t,e){var i={};return f(t,function(t){t.each(t.mapDimension("value"),function(e,n){var a="ec-"+t.getName(n);i[a]=i[a]||[],isNaN(e)||i[a].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,a){for(var o="ec-"+t[0].getName(a),r=0,s=1/0,l=-1/0,u=i[o].length,h=0;u>h;h++)s=Math.min(s,i[o][h]),l=Math.max(l,i[o][h]),r+=i[o][h];var c;return c="min"===e?s:"max"===e?l:"average"===e?r/u:r,0===u?0/0:c})}function Cg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=p(e,function(t){var e=[t[0].coord,t[1].coord],i={coords:e};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),o([i,t[0],t[1]])}))}function Lg(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function kg(t){return"_"+t+"Type"}function Pg(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_(o)||(o=[o,o]);var r=Jh(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function Og(t){var e=new FE({name:"line",subPixelOptimize:!0});return Eg(e.shape,t),e}function Eg(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=0/0,t.cpy1=0/0)}function Ng(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=Y([],u,l);if(te(h,h),e){e.attr("position",l);var c=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*a;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,c=r.tangentAt(m),v=[c[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[a,a]})}}}}function Rg(t,e,i){CM.call(this),this._createLine(t,e,i)}function zg(t){this._ctor=t||Rg,this.group=new CM}function Bg(t,e,i,n){var a=e.getItemLayout(i);if(Wg(a)){var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}}function Vg(t,e,i,n,a,o){var r=e.getItemGraphicEl(n);return Wg(i.getItemLayout(a))?(r?r.updateData(i,a,o):r=new t._ctor(i,a,o),i.setItemGraphicEl(a,r),void t.group.add(r)):void t.group.remove(r)}function Gg(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function Fg(t){return isNaN(t[0])||isNaN(t[1])}function Wg(t){return!Fg(t[0])&&!Fg(t[1])}function Hg(t,e,i){CM.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function Zg(t,e,i){CM.call(this),this._createPolyline(t,e,i)}function Ug(t,e,i){Hg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function Xg(){this.group=new CM}function Yg(t){return t instanceof Array||(t=[t,t]),t}function jg(t){return"_EC_"+t}function qg(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function Kg(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}function $g(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,a=n&&n[0]||1,o=e.getZoom(),r=(o-1)*i+1;return r/a}function Jg(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}function Qg(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;.9>=h;h+=.1){aN[0]=sN(a[0],o[0],r[0],h),aN[1]=sN(a[1],o[1],r[1],h);var c=uN(lN(aN,e)-l);s>c&&(s=c,n=h)}for(var d=0;32>d;d++){var f=n+u;oN[0]=sN(a[0],o[0],r[0],n),oN[1]=sN(a[1],o[1],r[1],n),rN[0]=sN(a[0],o[0],r[0],f),rN[1]=sN(a[1],o[1],r[1],f);var c=lN(oN,e)-l;if(uN(c)<.01)break;var p=lN(rN,e)-l;u/=2,0>c?p>=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function tm(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function em(t,e,i){var n=t.getGraphicEl(),a=tm(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;(null==e||null!=i)&&(e=a),t.setStyle("opacity",e)}})}function im(t,e){var i=tm(t,e),n=t.getGraphicEl();n.traverse(function(t){!t.isGroup&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}function nm(t){return t instanceof Array||(t=[t,t]),t}function am(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),om(i)}}function om(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=H(t.node1.getLayout()),n=H(t.node2.getLayout()),a=[i,n];+e&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(a)})}function rm(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),a=t.getData(),o=a.graph,r=n.width/2+n.x,s=n.height/2+n.y,l=Math.min(n.width,n.height)/2,u=a.count();a.setLayout({cx:r,cy:s}),u&&(bN[e](t,i,o,a,l,r,s,u),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=H(t.node1.getLayout()),a=H(t.node2.getLayout()),o=(n[0]+a[0])/2,l=(n[1]+a[1])/2;+i&&(i*=3,e=[r*i+o*(1-i),s*i+l*(1-i)]),t.setLayout([n,a,e])}))}}function sm(t,e,i){for(var n=i.rect,a=n.width,o=n.height,r=[n.x+a/2,n.y+o/2],s=null==i.gravity?.1:i.gravity,l=0;lo;o++){var p=t[o];p.fixed||(Y(n,r,p.p),MN(p.p,p.p,n,s*c))}for(var o=0;a>o;o++)for(var u=t[o],g=o+1;a>g;g++){var h=t[g];Y(n,h.p,u.p);var d=j(n);0===d&&(Z(n,Math.random()-.5,Math.random()-.5),d=1);var m=(u.rep+h.rep)/d/d;!u.fixed&&MN(u.pp,u.pp,n,m),!h.fixed&&MN(h.pp,h.pp,n,-m)}for(var v=[],o=0;a>o;o++){var p=t[o];p.fixed||(Y(v,p.p,p.pp),MN(p.p,p.p,v,c),W(p.pp,p.p))}c=.992*c,i&&i(t,e,.01>c)}}}function lm(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,$r(n,{width:e.getWidth(),height:e.getHeight()})}function um(t,e,i,n,a){var o=t.ends,r=new LN({shape:{points:a?cm(o,n,t):o}});return hm(t,r,e,i,a),r}function hm(t,e,i,n,a){var o=i.hostModel,r=AA[a?"initProps":"updateProps"];r(e,{shape:{points:t.ends}},o,n);var s=i.getItemModel(n),l=s.getModel(DN),u=i.getItemVisual(n,"color"),h=l.getItemStyle(["borderColor"]);h.stroke=u,h.strokeNoScale=!0,e.useStyle(h),e.z2=100;var c=s.getModel(CN).getItemStyle();Vo(e,c)}function cm(t,e,i){return p(t,function(t){return t=t.slice(),t[e]=i.initBaseline,t})}function dm(t){var e=[],i=[];return t.eachSeriesByType("boxplot",function(t){var n=t.getBaseAxis(),a=u(i,n);0>a&&(a=i.length,i[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(t)}),e}function fm(t){var e,i,n=t.axis,a=t.seriesModels,o=a.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;ON(a,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])/u}ON(a,function(t){var e=t.get("boxWidth");_(e)||(e=[e,e]),l.push([br(e[0],i)||0,br(e[1],i)||0])});var h=.8*i-2,c=h/o*.3,d=(h-c*(o-1))/o,f=d/2-h/2;ON(a,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}function pm(t,e,i){function n(t,i,n){var a=s.get(i,n),o=[];o[u]=t,o[h]=a;var l;return isNaN(t)||isNaN(a)?l=[0/0,0/0]:(l=r.dataToPoint(o),l[u]+=e),l}function a(t,e,i){var n=e.slice(),a=e.slice();n[u]+=l,a[u]-=l,i?t.push(n,a):t.push(a,n)}function o(t,e){var i=e.slice(),n=e.slice();i[u]-=l,n[u]+=l,t.push(i,n)}var r=t.coordinateSystem,s=t.getData(),l=i/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=s.mapDimension(c[u]),f=s.mapDimension(c[h],!0);if(!(null==d||f.length<5))for(var p=0;p0?-1:0>i?1:e?-1:1}}function ym(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}function xm(t,e,i){this._axesMap=B(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function _m(t,e){return VN(GN(t,e[0]),e[1])}function wm(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function bm(t,e){var i,n,a=e.layoutLength,o=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return teR}function Fm(t){var e=t.length-1;return 0>e&&(e=0),[t[0],t[e]]}function Wm(t,e,i,n){var a=new CM;return a.add(new iA({name:"main",style:Xm(i),silent:!0,draggable:!0,cursor:"move",drift:jN(t,e,a,"nswe"),ondragend:jN(Vm,e,{isEnd:!0})})),qN(n,function(i){a.add(new iA({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:jN(t,e,a,i),ondragend:jN(Vm,e,{isEnd:!0})}))}),a}function Hm(t,e,i,n){var a=n.brushStyle.lineWidth||0,o=JN(a,iR),r=i[0][0],s=i[1][0],l=r-a/2,u=s-a/2,h=i[0][1],c=i[1][1],d=h-o+a/2,f=c-o+a/2,p=h-r,g=c-s,m=p+a,v=g+a;Um(t,e,"main",r,s,p,g),n.transformable&&(Um(t,e,"w",l,u,o,v),Um(t,e,"e",d,u,o,v),Um(t,e,"n",l,u,m,o),Um(t,e,"s",l,f,m,o),Um(t,e,"nw",l,u,o,o),Um(t,e,"ne",d,u,o,o),Um(t,e,"sw",l,f,o,o),Um(t,e,"se",d,f,o,o))}function Zm(t,e){var i=e.__brushOption,n=i.transformable,a=e.childAt(0);a.useStyle(Xm(i)),a.attr({silent:!n,cursor:n?"move":"default"}),qN(["w","e","n","s","se","sw","ne","nw"],function(i){var a=e.childOfName(i),o=qm(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?oR[o]+"-resize":null})})}function Um(t,e,i,n,a,o,r){var s=e.childOfName(i);s&&s.setShape(tv(Qm(t,e,[[n,a],[n+o,a+r]])))}function Xm(t){return s({strokeNoScale:!0},t.brushStyle)}function Ym(t,e,i,n){var a=[$N(t,i),$N(e,n)],o=[JN(t,i),JN(e,n)];return[[a[0],o[0]],[a[1],o[1]]]}function jm(t){return nr(t.group)}function qm(t,e){if(e.length>1){e=e.split("");var i=[qm(t,e[0]),qm(t,e[1])];return("e"===i[0]||"w"===i[0])&&i.reverse(),i.join("")}var n={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},i=or(n[e],jm(t));return a[i]}function Km(t,e,i,n,a,o,r){var s=n.__brushOption,l=t(s.range),u=Jm(i,o,r);qN(a.split(""),function(t){var e=aR[t];l[e[0]][e[1]]+=u[e[0]]}),s.range=e(Ym(l[0][0],l[1][0],l[0][1],l[1][1])),Em(i,n),Vm(i,{isEnd:!1})}function $m(t,e,i,n){var a=e.__brushOption.range,o=Jm(t,i,n);qN(a,function(t){t[0]+=o[0],t[1]+=o[1]}),Em(t,e),Vm(t,{isEnd:!1})}function Jm(t,e,i){var n=t.group,a=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[a[0]-o[0],a[1]-o[1]]}function Qm(t,e,i){var a=zm(t,e);return a&&a!==!0?a.clipPath(i,t._transform):n(i)}function tv(t){var e=$N(t[0][0],t[1][0]),i=$N(t[0][1],t[1][1]),n=JN(t[0][0],t[1][0]),a=JN(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}function ev(t,e,i){if(t._brushType&&!sv(t,e)){var n=t._zr,a=t._covers,o=Rm(t,e,i);if(!t._dragging)for(var r=0;re||e>n.getWidth()||0>i||i>n.getHeight()}function lv(t){return{createCover:function(e,i){return Wm(jN(Km,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=Fm(e),n=$N(i[0][t],i[1][t]),a=JN(i[0][t],i[1][t]);return[n,a]},updateCoverShape:function(e,i,n,a){var o,r=zm(e,i);if(r!==!0&&r.getLinearBrushOtherExtent)o=r.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,o];t&&l.reverse(),Hm(e,i,l,a)},updateCommon:Zm,contain:nv}}function uv(t){return t=dv(t),function(e){return sr(e,t)}}function hv(t,e){return t=dv(t),function(i){var n=null!=e?e:i,a=n?t.width:t.height,o=n?t.x:t.y;return[o,o+(a||0)]}}function cv(t,e,i){return t=dv(t),function(n,a){return t.contain(a[0],a[1])&&!rp(n,e,i)}}function dv(t){return Si.create(t)}function fv(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}function pv(t){var e=t.axis;return p(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function gv(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}function mv(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}function vv(t,e){if(!t.encodeDefine){var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(i){var n=t.encodeDefine=B();f(i.dimensions,function(t){var e=yv(t);n.set(t,e)})}}}function yv(t){return+t.replace("dim","")}function xv(t,e,i){var n=t.model,a=t.getRect(),o=new iA({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),r="horizontal"===n.get("layout")?"width":"height";return o.setShape(r,0),ir(o,{shape:{width:a.width,height:a.height}},e,i),o}function _v(t,e,i,n){for(var a=[],o=0;or;r++)a[r]=r;return"function"==typeof e?a.sort(e):"none"!==e&&a.sort(function(t,e){return o?n[t]-n[e]:n[e]-n[t]}),a}function Lv(t){t.each(function(e){var i,n,a,o,r=t.getItemModel(e),s=r.getModel("label"),l=s.get("position"),u=r.getModel("labelLine"),h=t.getItemLayout(e),c=h.points,d="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(d)"insideLeft"===l?(n=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,i="left"):"insideRight"===l?(n=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,i="right"):(n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center"),o=[[n,a],[n,a]];else{var f,p,g,m=u.get("length");"left"===l?(f=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,g=f-m,n=g-5,i="right"):"right"===l?(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left"):"rightTop"===l?(f=c[1][0],p=c[1][1],g=f+m,n=g+5,i="top"):"rightBottom"===l?(f=c[2][0],p=c[2][1],g=f+m,n=g+5,i="bottom"):"leftTop"===l?(f=c[0][0],p=c[1][1],g=f-m,n=g-5,i="right"):"leftBottom"===l?(f=c[3][0],p=c[2][1],g=f-m,n=g-5,i="right"):(f=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,g=f+m,n=g+5,i="left");var v=p;o=[[f,p],[g,v]],a=v}h.label={linePoints:o,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:d}})}function kv(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function Pv(t,e,i){var n=t.getGraphicEl(),a=kv(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",a)})}function Ov(t,e){var i=kv(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function Ev(t,e,i){var n=new iA({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return ir(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Nv(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function Rv(t,e,i,n,a,o,r,s,l){Bv(t,e,i,a,o,s,l),Hv(t,e,o,a,n,r,s),ty(t,s)}function zv(t){f(t,function(t){var e=Jv(t.outEdges,$v),i=Jv(t.inEdges,$v),n=Math.max(e,i);t.setLayout({value:n},!0)})}function Bv(t,e,i,n,a,o,r){for(var s=[],l=[],u=[],h=[],c=0,d=0,f=0;f=0;y&&v.depth>p&&(p=v.depth),m.setLayout({depth:y?v.depth:c},!0),"vertical"===o?m.setLayout({dy:i},!0):m.setLayout({dx:i},!0);for(var x=0;xc-1?p:c-1;r&&"left"!==r&&Gv(t,r,o,M);var d="vertical"===o?(a-i)/M:(n-i)/M;Wv(t,d,o)}function Vv(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function Gv(t,e,i,n){if("right"===e){for(var a=[],o=t,r=0;o.length;){for(var s=0;s0;o--)l*=.99,Yv(s,l,r),Xv(s,a,i,n,r),Qv(s,l,r),Xv(s,a,i,n,r)}function Zv(t,e){var i=[],n="vertical"===e?"y":"x",a=pa(t,function(t){return t.getLayout()[n]});return a.keys.sort(function(t,e){return t-e}),f(a.keys,function(t){i.push(a.buckets.get(t))}),i}function Uv(t,e,i,n,a,o){var r=1/0;f(t,function(t){var e=t.length,s=0;f(t,function(t){s+=t.getLayout().value});var l="vertical"===o?(n-(e-1)*a)/s:(i-(e-1)*a)/s;r>l&&(r=l)}),f(t,function(t){f(t,function(t,e){var i=t.getLayout().value*r;"vertical"===o?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),f(e,function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)})}function Xv(t,e,i,n,a){var o="vertical"===a?"x":"y";f(t,function(t){t.sort(function(t,e){return t.getLayout()[o]-e.getLayout()[o]});for(var r,s,l,u=0,h=t.length,c="vertical"===a?"dx":"dy",d=0;h>d;d++)s=t[d],l=u-s.getLayout()[o],l>0&&(r=s.getLayout()[o]+l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;var f="vertical"===a?n:i;if(l=u-e-f,l>0)for(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0),u=r,d=h-2;d>=0;--d)s=t[d],l=s.getLayout()[o]+s.getLayout()[c]+e-u,l>0&&(r=s.getLayout()[o]-l,"vertical"===a?s.setLayout({x:r},!0):s.setLayout({y:r},!0)),u=s.getLayout()[o]})}function Yv(t,e,i){f(t.slice().reverse(),function(t){f(t,function(t){if(t.outEdges.length){var n=Jv(t.outEdges,jv,i)/Jv(t.outEdges,$v,i);if("vertical"===i){var a=t.getLayout().x+(n-Kv(t,i))*e;t.setLayout({x:a},!0)}else{var o=t.getLayout().y+(n-Kv(t,i))*e;t.setLayout({y:o},!0)}}})})}function jv(t,e){return Kv(t.node2,e)*t.getValue() }function qv(t,e){return Kv(t.node1,e)*t.getValue()}function Kv(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function $v(t){return t.getValue()}function Jv(t,e,i){for(var n=0,a=t.length,o=-1;++o=f&&((r>f||d>=0&&0>s)&&(r=f,s=d,a=l,o.length=0),RR(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:a}}function sy(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function ly(t,e,i,n){var a=i.payloadBatch,o=e.axis,r=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,u=fd(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function uy(t,e,i){var n=i.axesInfo=[];RR(e,function(e,i){var a=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})})}function hy(t,e,i,n){if(py(e)||!t.list.length)return void n({type:"hideTip"});var a=((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:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}function cy(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=BR(n)[a]||{},r=BR(n)[a]={};RR(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&RR(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];f(o,function(t,e){!r[e]&&l.push(t)}),f(r,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 dy(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 fy(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 py(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function gy(t,e,i){if(!mS.node){var n=e.getZr();GR(n).records||(GR(n).records={}),my(n,e);var a=GR(n).records[t]||(GR(n).records[t]={});a.handler=i}}function my(t,e){function i(i,n){t.on(i,function(i){var a=_y(e);FR(GR(t).records,function(t){t&&n(t,i,a.dispatchAction)}),vy(a.pendings,e)})}GR(t).initialized||(GR(t).initialized=!0,i("click",x(xy,"click")),i("mousemove",x(xy,"mousemove")),i("globalout",yy))}function vy(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function yy(t,e,i){t.handler("leave",null,i)}function xy(t,e,i,n){e.handler(t,i,n)}function _y(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function wy(t,e){if(!mS.node){var i=e.getZr(),n=(GR(i).records||{})[t];n&&(GR(i).records[t]=null)}}function by(){}function Sy(t,e,i,n){My(HR(i).lastProp,n)||(HR(i).lastProp=n,e?er(i,n,t):(i.stopAnimation(),i.attr(n)))}function My(t,e){if(S(t)&&S(e)){var i=!0;return f(e,function(e,n){i=i&&My(t[n],e)}),!!i}return t===e}function Iy(t,e){t[e.get("label.show")?"show":"hide"]()}function Ty(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Ay(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)})}function Dy(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 Cy(t,e,i,n,a){var o=i.get("value"),r=ky(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=VA(s.get("padding")||0),u=s.getFont(),h=Hi(r,u),c=a.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=a.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=a.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),Ly(c,d,f,n);var m=s.get("backgroundColor");m&&"auto"!==m||(m=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:r,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:m,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 Ly(t,e,i,n){var a=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,a)-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 ky(t,e,i,n,a){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:Xh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)}),b(r)?o=r.replace("{value}",o):w(r)&&(o=r(s))}return o}function Py(t,e,i){var n=Le();return Ne(n,n,i.rotation),Ee(n,n,i.position),ar([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Oy(t,e,i,n,a,o){var r=Uk.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),Cy(e,n,a,o,{position:Py(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Ey(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Ny(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Ry(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}}function zy(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function By(t){return"x"===t.dim?0:1}function Vy(t){return t.isHorizontal()?0:1}function Gy(t,e){var i=t.getRect();return[i[jR[e]],i[jR[e]]+i[qR[e]]]}function Fy(t,e,i){var n=new iA({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return ir(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Wy(t,e,i){if(t.count())for(var n,a=e.coordinateSystem,o=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=p(o,function(e){return p(e.indices,function(e){var i=a.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=Hy(l),h=u.y0,c=i/u.max,d=o.length,f=o[0].indices.length,g=0;f>g;++g){n=h[g]*c,t.setItemLayout(o[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:n,y:l[0][g][1]*c});for(var m=1;d>m;++m)n+=l[m-1][g][1]*c,t.setItemLayout(o[m].indices[g],{layerIndex:m,x:l[m][g][0],y0:n,y:l[m][g][1]*c})}}function Hy(t){for(var e,i=t.length,n=t[0].length,a=[],o=[],r=0,s={},l=0;n>l;++l){for(var u=0,e=0;i>u;++u)e+=t[u][l][1];e>r&&(r=e),a.push(e)}for(var h=0;n>h;++h)o[h]=(r-a[h])/2;r=0;for(var c=0;n>c;++c){var d=a[c]+o[c];d>r&&(r=d)}return s.y0=o,s.max=r,s}function Zy(t,e,i,n){var a=t.getItemLayout(e),o=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=i.get("symbolRotate"),u=(l||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,c=i.isAnimationEnabled(),d={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:u,animationModel:c?i:null,hoverAnimation:c&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};Uy(i,o,a,n,d),Yy(t,e,a,o,r,d.boundingLength,d.pxSign,h,n,d),jy(i,d.symbolScale,u,n,d);var f=d.symbolSize,p=i.get("symbolOffset");return _(p)&&(p=[br(p[0],f[0]),br(p[1],f[1])]),qy(i,f,a,o,r,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,n,d),d}function Uy(t,e,i,n,a){var o,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(_(s)){var c=[Xy(l,s[0])-u,Xy(l,s[1])-u];c[1]0?1:0>o?-1:0}function Xy(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Yy(t,e,i,n,a,o,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=br(f[c.index],d),f[h.index]=br(f[h.index],n?d:Math.abs(o)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*r}function jy(t,e,i,n,a){var o=t.get(nz)||0;o&&(oz.attr({scale:e.slice(),rotation:i}),oz.updateTransform(),o/=oz.getLineScale(),o*=e[n.valueDim.index]),a.valueLineWidth=o}function qy(t,e,i,n,a,o,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=D(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=br(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=zr(n),M=S?n:dx((y+b)/w),I=y-M*m;x=I/2/(_?M:M-1),w=m+2*x,b=_?0:2*x,S||"fixed"===n||(M=h?dx((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var T=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?T:"end"===s?u-T:u/2,o&&(A[0]+=o[0],A[1]+=o[1]);var C=d.bundlePosition=[];C[f.index]=i[f.xy],C[p.index]=i[p.xy];var L=d.barRectShape=r({},i);L[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+T)),L[f.wh]=i[f.wh];var k=d.clipShape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecSize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function Ky(t){var e=t.symbolPatternSize,i=Jh(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function $y(t,e,i,n){function a(t){var e=h.slice(),n=i.pxSign,a=t;return("start"===i.symbolRepeatDirection?n>0:0>n)&&(a=d-1-t),e[c.index]=p*(a-d/2+.5)+h[c.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function o(){ux(t,function(t){t.trigger("emphasis")})}function r(){ux(t,function(t){t.trigger("normal")})}var s=t.__pictorialBundle,l=i.symbolSize,u=i.valueLineWidth,h=i.pathPosition,c=e.valueDim,d=i.repeatTimes||0,f=0,p=l[e.valueDim.index]+u+2*i.symbolMargin;for(ux(t,function(t){t.__pictorialAnimationIndex=f,t.__pictorialRepeatTimes=d,d>f?hx(t,null,a(f),i,n):hx(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),ax(t,i),f++});d>f;f++){var g=Ky(i);g.__pictorialAnimationIndex=f,g.__pictorialRepeatTimes=d,s.add(g);var m=a(f);hx(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",o).on("mouseout",r),ax(g,i)}}function Jy(t,e,i,n){function a(){this.trigger("emphasis")}function o(){this.trigger("normal")}var r=t.__pictorialBundle,s=t.__pictorialMainPath;s?hx(s,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialMainPath=Ky(i),r.add(s),hx(s,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),s.on("mouseover",a).on("mouseout",o)),ax(s,i)}function Qy(t,e,i){var n=r({},e.barRectShape),a=t.__pictorialBarRect;a?hx(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new iA({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function tx(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,o=r({},i.clipShape),s=e.valueDim,l=i.animationModel,u=i.dataIndex;if(a)er(a,{shape:o},l,u);else{o[s.wh]=0,a=new iA({shape:o}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[s.wh]=i.clipShape[s.wh],AA[n?"updateProps":"initProps"](a,{shape:h},l,u)}}}function ex(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=ix,i.isAnimationEnabled=nx,i}function ix(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function nx(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ax(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function ox(t,e,i,n){var a=new CM,o=new CM;return a.add(o),a.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?$y(a,e,i):Jy(a,e,i),Qy(a,i,n),tx(a,e,i,n),a.__pictorialShapeStr=lx(t,i),a.__pictorialSymbolMeta=i,a}function rx(t,e,i){var n=i.animationModel,a=i.dataIndex,o=t.__pictorialBundle;er(o,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?$y(t,e,i,!0):Jy(t,e,i,!0),Qy(t,i,!0),tx(t,e,i,!0)}function sx(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var o=[];ux(n,function(t){o.push(t)}),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),f(o,function(t){er(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function lx(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function ux(t,e,i){f(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function hx(t,e,i,n,a,o){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&AA[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function cx(t,e,i){var n=i.color,a=i.dataIndex,o=i.itemModel,r=o.getModel("itemStyle").getItemStyle(["color"]),l=o.getModel("emphasis.itemStyle").getItemStyle(),u=o.getShallow("cursor");ux(t,function(t){t.setColor(n),t.setStyle(s({fill:n,opacity:i.opacity},r)),Vo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;Ec(d.style,h,o,n,e.seriesModel,a,c),Vo(d,h)}function dx(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function fx(t,e){return e=e||[0,0],p(["x","y"],function(i,n){var a=this.getAxis(i),o=e[n],r=t[n]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(o-r)-a.dataToCoord(o+r))},this)}function px(t,e){return e=e||[0,0],p([0,1],function(i){var n=e[i],a=t[i]/2,o=[],r=[];return o[i]=n-a,r[i]=n+a,o[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(o)[i]-this.dataToPoint(r)[i])},this)}function gx(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,a=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))}function mx(t,e){return p(["Radius","Angle"],function(i,n){var a=this["get"+i+"Axis"](),o=e[n],r=t[n]/2,s="dataTo"+i,l="category"===a.type?a.getBandWidth():Math.abs(a[s](o-r)-a[s](o+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function vx(t){var e,i=t.type;if("path"===i){var n=t.shape,a=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=Px(n);e=_o(o,null,a,n.layout||"center"),e.__customPathData=o}else if("image"===i)e=new Tn({}),e.__customImagePath=t.style.image;else if("text"===i)e=new ZT({}),e.__customText=t.style.text;else if("group"===i)e=new CM;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var r=xo(i);e=new r}return e.__customGraphicType=i,e.name=t.name,e}function yx(t,e,i,a,o,r,s){var l={},u=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var h=l.style={};f(["x","y","width","height"],function(e){xx(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){xx(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),ir(t,{style:{opacity:c}},a,e)}r?t.attr(l):er(t,l,a,e),i.hasOwnProperty("z2")&&t.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&t.attr("silent",i.silent),i.hasOwnProperty("invisible")&&t.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&t.attr("ignore",i.ignore),i.hasOwnProperty("info")&&t.attr("info",i.info);var d=i.styleEmphasis;Oo(t,d),s&&Go(t,d!==!1)}function xx(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function _x(t,e,i,n){function a(t){null==t&&(t=m),S&&(v=e.getItemModel(t),y=v.getModel(pz),x=v.getModel(gz),_=e.getItemVisual(t,"color"),S=!1)}function o(t,i){return null==i&&(i=m),e.get(e.getDimension(t||0),i)}function r(i,n){null==n&&(n=m),a(n);var o=v.getModel(dz).getItemStyle();null!=_&&(o.fill=_);var r=e.getItemVisual(n,"opacity");null!=r&&(o.opacity=r);var s=i?Cx(i,y):y;return Uo(o,s,null,{autoColor:_,isRectText:!0}),o.text=s.getShallow("show")?C(t.getFormattedLabel(n,"normal"),Oc(e,n)):null,i&&Lx(o,i),o}function l(i,n){null==n&&(n=m),a(n);var o=v.getModel(fz).getItemStyle(),r=i?Cx(i,x):x;return Uo(o,r,null,{isRectText:!0},!0),o.text=r.getShallow("show")?L(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),Oc(e,n)):null,i&&Lx(o,i),o}function u(t,i){return null==i&&(i=m),e.getItemVisual(i,t)}function h(t){if(p.getBaseAxis){var e=p.getBaseAxis();return Ch(s({axis:e},t),n)}}function c(){return i.getCurrentSeriesIndices()}function d(t){return Qo(t,i)}var f=t.get("renderItem"),p=t.coordinateSystem,g={};p&&(g=p.prepareCustoms?p.prepareCustoms():vz[p.type](p));var m,v,y,x,_,w=s({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:o,style:r,styleEmphasis:l,visual:u,barLayout:h,currentSeriesIndices:c,font:d},g.api||{}),b={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:g.coordSys,dataInsideLength:e.count(),encode:bx(t.getData())},S=!0;return function(t,i){return m=t,S=!0,f&&f(s({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},b),w)}}function bx(t){var e={};return f(t.dimensions,function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var o=a.coordDim,r=e[o]=e[o]||[];r[a.coordDimIndex]=n}}),e}function Sx(t,e,i,n,a,o){return t=Mx(t,e,i,n,a,o,!0),t&&o.setItemGraphicEl(e,t),t}function Mx(t,e,i,n,a,o,r){var s=!i;i=i||{};var l=i.type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&Ox(u)&&Px(u)!==t.__customPathData||"image"===l&&Ex(h,"image")&&h.image!==t.__customImagePath||"text"===l&&Ex(u,"text")&&h.text!==t.__customText)&&(a.remove(t),t=null),!s){var c=!t;return!t&&(t=vx(i)),yx(t,e,i,n,o,c,r),"group"===l&&Ix(t,e,i,n,o),a.add(t),t}}function Ix(t,e,i,n,a){var o=i.children,r=o?o.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=s===!1;if(r||l||u){if(l)return void Tx({oldChildren:t.children()||[],newChildren:o||[],dataIndex:e,animatableModel:n,group:t,data:a});u&&t.removeAll();for(var h=0;r>h;h++)o[h]&&Mx(t.childAt(h),e,o[h],n,t,a)}}function Tx(t){new Fu(t.oldChildren,t.newChildren,Ax,Ax,t).add(Dx).update(Dx).remove(kx).execute()}function Ax(t,e){var i=t&&t.name;return null!=i?i:mz+e}function Dx(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,a=null!=e?i.oldChildren[e]:null;Mx(a,i.dataIndex,n,i.animatableModel,i.group,i.data)}function Cx(t,e){var i=new pr({},e);return f(cz,function(e,n){t.hasOwnProperty(e)&&(i.option[n]=t[e])}),i}function Lx(t,e){for(var i in e)(e.hasOwnProperty(i)||!cz.hasOwnProperty(i))&&(t[i]=e[i])}function kx(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function Px(t){return t&&(t.pathData||t.d)}function Ox(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function Ex(t,e){return t&&t.hasOwnProperty(e)}function Nx(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Rx(t,e){return e.dim+t.model.componentIndex}function zx(t,e){var i={},n=Bx(m(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),a=t.coordinateSystem,o=a.getBaseAxis(),r=Rx(a,o),s=Nx(t),l=n[r][s],u=l.offset,h=l.width,c=a.getOtherAxis(o),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=e.mapDimension(c.dim),v=e.mapDimension(o.dim),y=ph(e,m),x="radius"!==o.dim||!t.get("roundCap",!0),_=c.getExtent()[0],w=0,b=e.count();b>w;w++){var S=e.get(m,w),M=e.get(v,w);if(!isNaN(S)){var I=S>=0?"p":"n",T=_;y&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var A,D,C,L;if("radius"===c.dim){var k=c.dataToRadius(S)-_,P=o.dataToAngle(M);Math.abs(k)k?-1:1)*p),A=T,D=T+k,C=P-u,L=C-h,y&&(i[s][M][I]=D)}else{var O=c.dataToAngle(S,x)-_,E=o.dataToRadius(M);Math.abs(O)O?-1:1)*g),A=E+u,D=A+h,C=T,L=T+O,y&&(i[s][M][I]=L)}e.setItemLayout(w,{cx:d,cy:f,r0:A,r:D,startAngle:-C*Math.PI/180,endAngle:-L*Math.PI/180})}}}},this)}function Bx(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=Rx(n,a),r=a.getExtent(),s="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=e[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[o]=l;var h=Nx(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=br(t.get("barWidth"),s),d=br(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandWidth,o=br(t.categoryGap,a),r=br(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*r);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+r)})}),i}function Vx(t,e){vk.call(this,"radius",t,e),this.type="category"}function Gx(t,e){e=e||[0,360],vk.call(this,"angle",t,e),this.type="category"}function Fx(t,e){return e.type||(e.data?"category":"value")}function Wx(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=br(n[0],a),t.cy=br(n[1],o);var r=t.getRadiusAxis(),s=Math.min(a,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:_(l)||(l=[0,l]),l=[br(l[0],s),br(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}function Hx(t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===e){var a=t.getData();f(a.mapDimension("radius",!0),function(t){n.scale.unionExtentFromData(a,gh(a,t))}),f(a.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(a,gh(a,t))})}}),Wh(i.scale,i.model),Wh(n.scale,n.model),"category"===i.type&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function Zx(t,e){if(t.type=e.get("type"),t.scale=Hh(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function Ux(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function Xx(t){var e=t.getRadiusAxis();return e.inverse?0:1}function Yx(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function jx(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function qx(t,e,i,n,a){var o=e.axis,r=o.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===o.dim){var d=Le();Ne(d,d,s),Ee(d,d,[n.cx,n.cy]),l=ar([r,-a],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Uk.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function Kx(t,e){e.update="updateView",Tu(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var a=i.coordinateSystem;f(a.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function $x(t){this._model=t}function Jx(t,e,i,n){var a=i.calendarModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem:null;return r===this?r[t](n):null}function Qx(t,e){var i=t.cellSize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=p([0,1],function(t){return Qr(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ts(t,e,{type:"box",ignoreSize:n})}function t_(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a[e]=a.hasOwnProperty(e)?a[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}function e_(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=$r(n,o,a);qA(e.get("orient"),t,e.get("itemGap"),r.width,r.height),Jr(t,n,o,a)}function i_(t,e){var i=VA(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new iA({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 n_(t,e,i,n,a,o){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,o||(r.stroke=a)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function a_(t,e,i,n){r_(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),o_(t,e,i,n)}function o_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function r_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function s_(t,e,i){var n=t.getOrient(),a=[1,1];a[n.index]=0,ts(e,i,{type:"box",ignoreSize:a})}function l_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(jz,function(t){return t+"transition:"+i}).join(";")}function u_(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"),Xz(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function h_(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),a=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(l_(i)),n&&(mS.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ei(n)),e.push("filter:alpha(opacity=70)"))),Xz(["width","color","radius"],function(i){var n="border-"+i,a=Yz(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(u_(a)),null!=o&&e.push("padding:"+VA(o).join("px ")+"px"),e.join(";")+";"}function c_(t,e){if(mS.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;xe(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}function d_(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function f_(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(pr.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new pr(i,e,e.ecModel))}return e}function p_(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function g_(t,e,i,n,a,o,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=r&&(e+u+r>a?e-=u+r:e+=r),[t,e]}function m_(t,e,i,n,a){var o=i.getOuterSize(),r=o.width,s=o.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function v_(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,u=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+u/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+u+o;break;case"left":r=e.x-n-o,s=e.y+u/2-a/2;break;case"right":r=e.x+l+o,s=e.y+u/2-a/2}return[r,s]}function y_(t){return"center"===t||"middle"===t}function x_(t){Qn(t,"label",["show"])}function __(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function w_(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function b_(t,e,i,n,a,o){var r=[],s=ph(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=D_(e,l,t),h=e.indicesOfNearest(l,u)[0]; r[a]=e.get(i,h),r[o]=e.get(n,h);var c=Ir(e.get(n,h));return c=Math.min(c,20),c>=0&&(r[o]=+r[o].toFixed(c)),r}function S_(t,e){var i=t.getData(),a=t.coordinateSystem;if(e&&!w_(e)&&!_(e.coord)&&a){var o=a.dimensions,r=M_(e,i,a,t);if(e=n(e),e.type&&oB[e.type]&&r.baseAxis&&r.valueAxis){var s=nB(o,r.baseAxis.dim),l=nB(o,r.valueAxis.dim);e.coord=oB[e.type](i,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;2>h;h++)oB[u[h]]&&(u[h]=D_(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function M_(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(I_(n,a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function I_(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var a=0;an?t.coord&&t.coord[n]:t.value}function D_(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,function(t){isNaN(t)||(n+=t,a++)}),n/a}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function C_(t,e,i){var n=e.coordinateSystem;t.each(function(a){var o,r=t.getItemModel(a),s=br(r.get("x"),i.getWidth()),l=br(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var u=t.get(n.dimensions[0],a),h=t.get(n.dimensions[1],a);o=n.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(a,o)})}function L_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new bL(n,i),o=p(i.get("data"),x(S_,e));return t&&(o=m(o,x(T_,t))),a.initData(o,null,t?A_:function(t){return t.value}),a}function k_(t){return!isNaN(t)&&!isFinite(t)}function P_(t,e,i,n){var a=1-t,o=n.dimensions[t];return k_(e[a])&&k_(i[a])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function O_(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(P_(1,i,n,t)||P_(0,i,n,t)))return!0}return T_(t,e[0])&&T_(t,e[1])}function E_(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=br(s.get("x"),a.getWidth()),u=br(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=r.dimensions;k_(t.get(h[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):k_(t.get(h[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}function N_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new bL(n,i),o=new bL(n,i),r=new bL([],i),l=p(i.get("data"),x(sB,e,t,i));t&&(l=m(l,x(O_,t)));var u=t?A_:function(t){return t.value};return a.initData(p(l,function(t){return t[0]}),null,u),o.initData(p(l,function(t){return t[1]}),null,u),r.initData(p(l,function(t){return t[2]})),r.hasItemOption=!0,{from:a,to:o,line:r}}function R_(t){return!isNaN(t)&&!isFinite(t)}function z_(t,e,i){var n=1-t;return R_(e[n])&&R_(i[n])}function B_(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(z_(1,i,n,t)||z_(0,i,n,t))?!0:T_(t,{coord:i,x:e.x0,y:e.y0})||T_(t,{coord:n,x:e.x1,y:e.y1})}function V_(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=br(s.get(i[0]),a.getWidth()),u=br(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];r.clampData&&r.clampData(d,d),o=r.dataToPoint(d,!0)}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);R_(h)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):R_(c)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}function G_(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return s({name:t},n)}),a=new bL(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],a=new bL(n,i));var r=p(i.get("data"),x(lB,e,t,i));t&&(r=m(r,x(B_,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(r,null,l),a.hasItemOption=!0,a}function F_(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),W_(t),H_(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});H_(n,"position")||(n.position=t.controlPosition),"none"!==n.position||H_(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){S(t)&&!_(t)&&(!H_(t,"value")&&H_(t,"name")&&(t.value=t.name),W_(t))})}function W_(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};f(n,function(t,e){o[e]||H_(a,e)||(a[e]=t)}),i.label&&!H_(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function H_(t,e){return t.hasOwnProperty(e)}function Z_(t,e){return $r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function U_(t,e,i,a){var o=_o(t.get(e).replace(/^path:\/\//,""),n(a||{}),new Si(i[0],i[1],i[2],i[3]),"center");return o}function X_(t,e,i,n,o,r){var s=e.get("color");if(o)o.setColor(s),i.add(o),r&&r.onUpdate(o);else{var l=t.get("symbol");o=Jh(l,-1,-1,2,2,s),o.setStyle("strokeNoScale",!0),i.add(o),r&&r.onCreate(o)}var u=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(u),n=a({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symbolOffset");if(c){var d=n.position=n.position||[0,0];d[0]+=br(c[0],h[0]),d[1]+=br(c[1],h[1])}var f=t.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function Y_(t,e,i,n,a){if(!t.dragging){var o=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}function j_(t){return u(xB,t)>=0}function q_(t,e){t=t.slice();var i=p(t,Xr);e=(e||[]).slice();var n=p(e,Xr);return function(a,o){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l=0}function a(t,n){var a=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(a=!0)})}),a}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 r(t){!n(t,s)&&a(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(r);while(l);return s}}function $_(t,e,i){var n=[1/0,-1/0];return wB(i,function(t){var i=t.getData();i&&wB(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:a&&(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 Q_(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=Ar(a,[0,500]);o=Math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+a[0].toFixed(o),r?null:+a[1].toFixed(o))}}function tw(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;wB(["min","max"],function(a){var o=i.get(a+"Span"),r=i.get(a+"ValueSpan");null!=r&&(r=t.getAxisModel().axis.scale.parse(r)),null!=r?o=wr(n[0]+r,n,[0,100],!0):null!=o&&(r=wr(o,[0,100],n,!0)-n[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=r})}function ew(t){var e={};return MB(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function iw(t,e){var i=t._rangePropMode,n=t.get("rangeMode");MB([["start","startValue"],["end","endValue"]],function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")})}function nw(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function aw(t){return"vertical"===t?"ns-resize":"ew-resize"}function ow(t,e){var i=lw(t),n=e.dataZoomId,a=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&u(e.allCoordIds,a)<0&&(delete i[n],t.count--)}),hw(i);var o=i[a];o||(o=i[a]={coordId:a,dataZoomInfos:{},count:0},o.controller=uw(t,o),o.dispatchAction=x(cw,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var r=dw(o.dataZoomInfos);o.controller.enable(r.controlType,r.opt),o.controller.setPointerChecker(e.containsPoint),xl(o,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function rw(t,e){var i=lw(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),hw(i)}function sw(t){return t.type+"\x00_"+t.id}function lw(t){var e=t.getZr();return e[FB]||(e[FB]={})}function uw(t,e){var i=new $f(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(a){if(i.isAvailableBehavior(a.dataZoomModel.option)){var o=(a.getRange||{})[t],r=o&&o(e.controller,i);!a.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:a.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function hw(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function cw(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function dw(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return f(t,function(t){var o=t.dataZoomModel,r=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),a&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function fw(t){return function(e,i,n,a){var o=this._range,r=o.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,a);return zN(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function pw(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function gw(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function mw(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return jB(e,function(e){var r=o[e]=a();jB(t[e],function(t,a){if(GO.isValidType(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new GO(o),"opacity"===a&&(o=n(o),o.type="colorAlpha",r.__hidden.__alphaForOpacity=new GO(o))}})}),o}function vw(t,e,i){var a;f(i,function(t){e.hasOwnProperty(t)&&gw(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasOwnProperty(i)&&gw(e[i])?t[i]=n(e[i]):delete t[i]})}function yw(t,e,i,n,a,o){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=n.call(a,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};f(t,function(t){var i=GO.prepareVisualTypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function xw(t,e,i,n){function a(t,a){function r(t){return a.getItemVisual(l,t)}function s(t,e){a.setItemVisual(l,t,e)}null!=n&&(n=a.getDimension(n));for(var l;null!=(l=t.next());){var u=a.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyVisual(h,r,s)}}}var o={};return f(t,function(t){var i=GO.prepareVisualTypes(e[t]);o[t]=i}),{progress:a}}function _w(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return ww(o,a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]=0)&&t(o,n,a)})}function Sw(t){return t[0]>t[1]&&t.reverse(),t}function Mw(t,e){return ua(t,e,{includeMainTypes:tV})}function Iw(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=Sw(p([0,1],function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))})),r=[];return r[t]=o,r[1-t]=[0/0,0/0],{values:o,xyMinMax:r}}function Tw(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Aw(t,e){var i=Dw(t),n=Dw(e),a=[i[0]/n[0],i[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function Dw(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function Cw(t,e,i,n,a){if(a){var o=t.getZr();if(!o[uV]){o[lV]||(o[lV]=Lw);var r=xl(o,lV,i,e);r(t,n)}}}function Lw(t,e){if(!t.isDisposed()){var i=t.getZr();i[uV]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[uV]=!1}}function kw(t,e,i,n){for(var a=0,o=e.length;o>a;a++){var r=e[a];if(t[r.brushType](n,i,r.selectors,r))return!0}}function Pw(t){var e=t.brushSelector;if(b(e)){var i=[];return f(qB,function(t,n){i[n]=function(i,n,a,o){var r=n.getItemLayout(i);return t[e](r,a,o)}}),i}if(w(e)){var n={};return f(qB,function(t,i){n[i]=e}),n}return e}function Ow(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function Ew(t){var e=t.selectors={};return f(qB[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function Nw(t){return new Si(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function Rw(t,e){return a({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new pr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function zw(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function Bw(t,e){fV[t]=e}function Vw(t){return fV[t]}function Gw(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function Fw(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Ww(t,e,i,n){function a(t){return l[t]}function o(t,e){l[t]=e}for(var r=e.targetVisuals[n],s=GO.prepareVisualTypes(r),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=r["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,a,o)}return l.color}function Hw(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,a=(i[1]-i[0])/n,o=i[0],r=[],s=0;n>=s&&oc;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=$r(h,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function Uw(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function Xw(t,e,i,n){return new JT({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){ZS(t.event)},ondragend:n})}function Yw(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function jw(t,e,i,n){return t?[[0,-EV(e,NV(i,0))],[zV,0],[0,EV(e,NV(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function qw(t,e,i){var n=RV/2,a=t.get("hoverLinkDataSize");return a&&(n=PV(a,e,i,!0)/2),n}function Kw(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function $w(t){return"vertical"===t?"ns-resize":"ew-resize"}function Jw(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function Qw(t){return 0===t.indexOf("my")}function tb(t){this.model=t}function eb(t){this.model=t}function ib(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var a=t.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.push(t);else{var o=a.getBaseAxis();if("category"===o.type){var r=o.dim+"_"+o.index;e[r]||(e[r]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function nb(t){var e=[];return f(t,function(t){var i=t.categoryAxis,n=t.valueAxis,a=n.dim,o=[" "].concat(p(t.series,function(t){return t.name})),r=[i.model.getCategories()];f(t.series,function(t){r.push(t.getRawData().mapArray(a,function(t){return t}))});for(var s=[o.join(JV)],l=0;lr;r++)n[r]=arguments[r];i.push((o?o+JV:"")+n.join(JV))}),i.join("\n")}).join("\n\n"+$V+"\n\n")}function ob(t){var e=ib(t);return{value:m([nb(e.seriesGroupByCategoryAxis),ab(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+$V+"\n\n"),meta:e.meta}}function rb(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function sb(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(JV)>=0?!0:void 0}function lb(t){for(var e=t.split(/\n+/g),i=rb(e.shift()).split(QV),n=[],a=p(i,function(t){return{name:t,data:[]}}),o=0;o=0;a--){var o=i[a];if(o[n])break}if(0>a){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var s=r.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)}function pb(t){var e=vb(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return tG(i,function(t,i){for(var a=e.length-1;a>=0;a--){var t=e[a][i];if(t){n[i]=t;break}}}),n}function gb(t){t[eG]=null}function mb(t){return vb(t).length}function vb(t){var e=t[eG];return e||(e=t[eG]=[{}]),e}function yb(t,e,i){(this._brushController=new Im(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function xb(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function _b(t,e){t.setIconStatus("back",mb(e)>1?"emphasis":"normal")}function wb(t,e,i,n,a){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var r=new bw(xb(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(a,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(o?{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}}:!1)}function bb(t){this.model=t}function Sb(t,e,i,n){var a=i.type,o=uG.hasOwnProperty(a)?uG[a]:xo(a),r=new o(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function Mb(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Mb(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Ib(t){return t=r({},t),f(["id","parentId","$action","hv","bounding"].concat(YA),function(e){delete t[e]}),t}function Tb(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Ab(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function Db(t,e,i){var n=r({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(a(o,n,!0),ts(o,n,{ignoreSize:!0}),is(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function Cb(t,e){t&&(t.hv=e.hv=[Tb(e,["left","right"]),Tb(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Lb(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}function kb(t){return cG(t)}function Pb(){if(!pG&&gG){pG=!0;var t=gG.styleSheets;t.length<31?gG.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function Ob(t){return parseInt(t,10)}function Eb(t,e){Pb(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var a=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}function Nb(t){return function(){SM('In IE8.0 VML mode painter not support method "'+t+'"')}}function Rb(t){return document.createElementNS(oF,t)}function zb(t){return uF(1e4*t)/1e4}function Bb(t){return gF>t&&t>-gF}function Vb(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==lF}function Gb(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==lF}function Fb(t,e){e&&Wb(t,"transform","matrix("+sF.call(e,",")+")")}function Wb(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function Hb(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function Zb(t,e,i,n){if(Vb(e,i)){var a=i?e.textFill:e.fill;a="transparent"===a?lF:a,Wb(t,"fill",a),Wb(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else Wb(t,"fill",lF);if(Gb(e,i)){var o=i?e.textStroke:e.stroke;o="transparent"===o?lF:o,Wb(t,"stroke",o);var r=i?e.textStrokeWidth:e.lineWidth,s=!i&&e.strokeNoScale?n.getLineScale():1;Wb(t,"stroke-width",r/s),Wb(t,"paint-order",i?"stroke":"fill"),Wb(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity);var l=e.lineDash;l?(Wb(t,"stroke-dasharray",e.lineDash.join(",")),Wb(t,"stroke-dashoffset",uF(e.lineDashOffset||0))):Wb(t,"stroke-dasharray",""),e.lineCap&&Wb(t,"stroke-linecap",e.lineCap),e.lineJoin&&Wb(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Wb(t,"stroke-miterlimit",e.miterLimit)}else Wb(t,"stroke",lF)}function Ub(t){for(var e=[],i=t.data,n=t.len(),a=0;n>a;){var o=i[a++],r="",s=0;switch(o){case rF.M:r="M",s=2;break;case rF.L:r="L",s=2;break;case rF.Q:r="Q",s=4;break;case rF.C:r="C",s=6;break;case rF.A:var l=i[a++],u=i[a++],h=i[a++],c=i[a++],d=i[a++],f=i[a++],p=i[a++],g=i[a++],m=Math.abs(f),v=Bb(m-fF)||(g?f>=fF:-f>=fF),y=f>0?f%fF:f%fF+fF,x=!1;x=v?!0:Bb(m)?!1:y>=dF==!!g;var _=zb(l+h*cF(d)),w=zb(u+c*hF(d));v&&(f=g?fF-1e-4:-fF+1e-4,x=!0,9===a&&e.push("M",_,w));var b=zb(l+h*cF(d+f)),S=zb(u+c*hF(d+f));e.push("A",zb(h),zb(c),uF(p*pF),+x,+g,b,S);break;case rF.Z:r="Z";break;case rF.R:var b=zb(i[a++]),S=zb(i[a++]),M=zb(i[a++]),I=zb(i[a++]);e.push("M",b,S,"L",b+M,S,"L",b+M,S+I,"L",b,S+I,"L",b,S)}r&&e.push(r);for(var T=0;s>T;T++)e.push(zb(i[a++]))}return e.join(" ")}function Xb(t,e,i,n,a,o,r){ke(wF),e&&i&&Pe(wF,i);var s=n.textRotation;if(a&&s){var l=n.textOrigin;"center"===l?(o=a.width/2+a.x,r=a.height/2+a.y):l&&(o=l[0]+a.x,r=l[1]+a.y),wF[4]-=o,wF[5]-=r,Ne(wF,wF,s),wF[4]+=o,wF[5]+=r}Fb(t,wF)}function Yb(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function jb(t,e,i,n){Wb(t,"dominant-baseline","middle"),Wb(t,"text-anchor",bF[e]),Wb(t,"x",i),Wb(t,"y",n)}function qb(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}function Kb(){}function $b(t,e){for(var i=0,n=e.length,a=0,o=0;n>i;i++){var r=e[i];if(r.removed){for(var s=[],l=o;la;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>3&&(n=zS.call(n,1));for(var o=e.length,r=0;o>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),o--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>4&&(n=zS.call(n,1,n.length-1));for(var o=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(a){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var VS=Math.log(2),GS="undefined"!=typeof window&&!!window.addEventListener,FS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,WS="___zrEVENTSAVED",HS=[],ZS=GS?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},US=function(){this._track=[]};US.prototype={constructor:US,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 a={points:[],touches:[],target:e,event:t},o=0,r=n.length;r>o;o++){var s=n[o],l=pe(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in XS)if(XS.hasOwnProperty(e)){var i=XS[e](this._track,t);if(i)return i}}};var XS={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,a=(t[i-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var o=Se(n)/Se(a);!isFinite(o)&&(o=1),e.pinchScale=o;var r=Me(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e} }}}},YS="silent";Ae.prototype.dispose=function(){};var jS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],qS=function(t,e,i,n){BS.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Ae,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};qS.prototype={constructor:qS,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(jS,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Ce(this,e,i),a=this._hovered,o=a.target;o&&!o.__zr&&(a=this.findHover(a.x,a.y),o=a.target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(a,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==o&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"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 a="on"+e,o=Ie(e,t,i);n&&(n[a]&&(o.cancelBubble=n[a].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[a]&&t[a].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),a={x:t,y:e},o=n.length-1;o>=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=De(n[o],t,e))&&(!a.topTarget&&(a.topTarget=n[o]),r!==YS)){a.target=n[o];break}}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new US);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var a=n.type;t.gestureEvent=a,this.dispatchToElement({target:n.target},a,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){qS.prototype[t]=function(e){var i,n,a=e.zrX,o=e.zrY,r=Ce(this,a,o);if("mouseup"===t&&r||(i=this.findHover(a,o),n=i.target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||ES(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(qS,BS),c(qS,le);var KS="undefined"==typeof Float32Array?Array:Float32Array,$S=(Object.freeze||Object)({create:Le,identity:ke,copy:Pe,mul:Oe,translate:Ee,rotate:Ne,scale:Re,invert:ze,clone:Be}),JS=ke,QS=5e-5,tM=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},eM=tM.prototype;eM.transform=null,eM.needLocalTransform=function(){return Ve(this.rotation)||Ve(this.position[0])||Ve(this.position[1])||Ve(this.scale[0]-1)||Ve(this.scale[1]-1)};var iM=[];eM.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&JS(n));n=n||Le(),i?this.getLocalTransform(n):JS(n),e&&(i?Oe(n,t.transform,n):Pe(n,t.transform)),this.transform=n;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(iM);var o=iM[0]<0?-1:1,r=iM[1]<0?-1:1,s=((iM[0]-o)*a+o)/iM[0]||0,l=((iM[1]-r)*a+r)/iM[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Le(),ze(this.invTransform,n)},eM.getLocalTransform=function(t){return tM.getLocalTransform(this,t)},eM.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)},eM.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var nM=[],aM=Le();eM.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,a=this.scale;Ve(e-1)&&(e=Math.sqrt(e)),Ve(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],a[0]=e,a[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},eM.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Oe(nM,t.invTransform,e),e=nM);var i=this.origin;i&&(i[0]||i[1])&&(aM[4]=i[0],aM[5]=i[1],Oe(nM,e,aM),nM[4]-=i[0],nM[5]-=i[1],e=nM),this.setLocalTransform(e)}},eM.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},eM.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&oe(i,i,n),i},eM.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},tM.getLocalTransform=function(t,e){e=e||[],JS(e);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Re(e,e,n),a&&Ne(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var oM={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-oM.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*oM.bounceIn(2*t):.5*oM.bounceOut(2*t-1)+.5}};Ge.prototype={constructor:Ge,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,a="string"==typeof n?oM[n]:n,o="function"==typeof a?a(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 rM=function(){this.head=null,this.tail=null,this._len=0},sM=rM.prototype;sM.insert=function(t){var e=new lM(t);return this.insertEntry(e),e},sM.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++},sM.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--},sM.len=function(){return this._len},sM.clear=function(){this.head=this.tail=null,this._len=0};var lM=function(t){this.value=t,this.next,this.prev},uM=function(t){this._list=new rM,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},hM=uM.prototype;hM.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new lM(e),r.key=t,i.insertEntry(r),n[t]=r}return a},hM.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},hM.clear=function(){this._list.clear(),this._map={}};var cM={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]},dM=new uM(20),fM=null,pM=ii,gM=ni,mM=(Object.freeze||Object)({parse:$e,lift:ti,toHex:ei,fastLerp:ii,fastMapToColor:pM,lerp:ni,mapToColor:gM,modifyHSL:ai,modifyAlpha:oi,stringify:ri}),vM=Array.prototype.slice,yM=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||si,this._setter=n||li,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};yM.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:mi(a)})}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,a=0,o=function(){a--,a||n._doneCallback()};for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=xi(this,t,o,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,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;il;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void SM('Property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new yM(i,e);return d.during(function(){a.dirty(n)}).done(function(){c.splice(u(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,a,o){_i(this,t,e,i,n,a,o)},animateFrom:function(t,e,i,n,a,o){_i(this,t,e,i,n,a,o,!0)}};var IM=function(t){tM.call(this,t),BS.call(this,t),MM.call(this,t),this.id=t.id||pS()};IM.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},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||a>u)},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 Si(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}}},Si.create=function(t){return new Si(t.x,t.y,t.width,t.height)};var CM=function(t){t=t||{},IM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};CM.prototype={constructor:CM,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 CM&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=u(n,t);return 0>a?this:(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof CM&&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,mS.canvasSupported&&ki(i,Pi)},_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 a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.clipPath}if(t.isGroup){for(var r=t._children,s=0;se;e++)this.delRoot(t[e]);else{var a=u(this._roots,t);a>=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof CM&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Pi};var OM={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},EM=function(t,e,i){return OM.hasOwnProperty(e)?i*=t.dpr:i},NM={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},RM=9,zM=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],BM=function(t){this.extendFrom(t,!1)};BM.prototype={constructor:BM,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,a=i&&i.style,o=!a||t.__attrCachedBy!==NM.STYLE_BIND;t.__attrCachedBy=NM.STYLE_BIND;for(var r=0;r0},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?Ei:Oi,a=n(t,e,i),o=e.colorStops,r=0;r=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;ea;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invTransform=r.invTransform,o.__clipPaths=r.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(a,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(rI)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var a=this;ZM(function(){a._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(sI).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n15)break}}o.__drawIndex=m,o.__drawIndex0&&t>n[0]){for(r=0;a-1>r&&!(n[r]t);r++);o=i[n[r]]}if(n.splice(r+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,a=this._zlevelList;for(n=0;n0?lI:0),this._needsManuallyCompositing),r.__builtin__||SM("ZLevel "+s+" has been used by unkown layer "+r.id),r!==a&&(r.__used=!0,r.__startIndex!==i&&(r.__dirty=!0),r.__startIndex=i,r.__drawIndex=r.incremental?-1:i,e(i),a=r),n.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawIndex<0&&(r.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?a(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ir;r++){var s=i[r],l=s.step(t,e);l&&(a.push(l),o.push(s))}for(var r=0;n>r;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(var r=0;n>r;r++)o[r].fire(a[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(ZM(t),!e._paused&&e._update())}var e=this;this._running=!0,ZM(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=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var i=new yM(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(fI,BS);var pI=300,gI=mS.domSupported,mI=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=p(t,function(t){var e=t.replace("mouse","pointer");return i.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:n}}(),vI={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},yI=Vn.prototype;yI.stopPropagation=yI.stopImmediatePropagation=yI.preventDefault=G;var xI={mousedown:function(t){t=xe(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=xe(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Zn(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=xe(this.dom,t),Zn(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=xe(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Bn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=xe(this.dom,t),Rn(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),xI.mousemove.call(this,t),xI.mousedown.call(this,t)},touchmove:function(t){t=xe(this.dom,t),Rn(t),this.handler.processGesture(t,"change"),xI.mousemove.call(this,t)},touchend:function(t){t=xe(this.dom,t),Rn(t),this.handler.processGesture(t,"end"),xI.mouseup.call(this,t),+new Date-this._lastTouchMoment=0||n&&u(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},BI=zI([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),VI={getLineStyle:function(t){var e=BI(this,t);return e.lineDash=this.getLineDash(e.lineWidth),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?!1:"dashed"===e?[n,n]:[i,i]}},GI=zI([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),FI={getAreaStyle:function(t,e){return GI(this,t,e)}},WI=Math.pow,HI=Math.sqrt,ZI=1e-8,UI=1e-4,XI=HI(3),YI=1/3,jI=F(),qI=F(),KI=F(),$I=Math.min,JI=Math.max,QI=Math.sin,tT=Math.cos,eT=2*Math.PI,iT=F(),nT=F(),aT=F(),oT=[],rT=[],sT={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},lT=[],uT=[],hT=[],cT=[],dT=Math.min,fT=Math.max,pT=Math.cos,gT=Math.sin,mT=Math.sqrt,vT=Math.abs,yT="undefined"!=typeof Float32Array,xT=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};xT.prototype={constructor:xT,_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,i){i=i||0,this._ux=vT(i/wM/t)||0,this._uy=vT(i/wM/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(sT.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=vT(t-this._xi)>this._ux||vT(e-this._yi)>this._uy||this._len<5;return this.addData(sT.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,a,o){return this.addData(sT.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(sT.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,a,o){return this.addData(sT.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=pT(a)*i+t,this._yi=gT(a)*i+e,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(sT.R,t,e,i,n),this},closePath:function(){this.addData(sT.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,a=0;e>a;a++)i+=t[a].len();yT&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;re.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=a+o),o%=a,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=r[n],f+=h*i,p+=c*i,this._dashIdx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?dT(f,t):fT(f,t),c>=0?dT(p,e):fT(p,e));h=f-t,c=p-e,this._dashOffset=-mT(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,a,o){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Ma,y=0,x=this._dashIdx,_=f.length,w=0;for(0>d&&(d=c+d),d%=c,r=0;1>r;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=mT(s*s+l*l);for(;_>x&&(w+=f[x],!(w>d));x++);for(r=(w-d)/y;1>=r;)u=v(g,t,i,a,r),h=v(m,e,n,o,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(a,o),s=a-u,l=o-h,this._dashOffset=-mT(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=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,a,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,yT&&(this.data=new Float32Array(t)))},getBoundingRect:function(){lT[0]=lT[1]=hT[0]=hT[1]=Number.MAX_VALUE,uT[0]=uT[1]=cT[0]=cT[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;oc;){var d=s[c++];switch(1===c&&(n=s[c],a=s[c+1],e=n,i=a),d){case sT.M:e=n=s[c++],i=a=s[c++],t.moveTo(n,a);break;case sT.L:o=s[c++],r=s[c++],(vT(o-n)>l||vT(r-a)>u||c===h-1)&&(t.lineTo(o,r),n=o,a=r);break;case sT.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case sT.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case sT.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=Math.abs(g-m)>.001,I=v+y;M?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,I,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,I,1-_),1===c&&(e=pT(v)*g+f,i=gT(v)*m+p),n=pT(I)*g+f,a=gT(I)*m+p;break;case sT.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case sT.Z:t.closePath(),n=e,a=i}}}},xT.CMD=sT;var _T=2*Math.PI,wT=2*Math.PI,bT=xT.CMD,ST=2*Math.PI,MT=1e-4,IT=[-1,-1,-1],TT=[-1,-1],AT=WM.prototype.getCanvasPattern,DT=Math.abs,CT=new xT(!0);eo.prototype={constructor:eo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||CT,a=i.hasStroke(),o=i.hasFill(),r=i.fill,s=i.stroke,l=o&&!!r.colorStops,u=a&&!!s.colorStops,h=o&&!!r.image,c=a&&!!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,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=AT.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=AT.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=i.fillOpacity){var v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new xT},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new xT),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasStroke()){var r=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),to(o,r/s,t,e)))return!0}if(a.hasFill())return Qa(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):In.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&&DT(t[0]-1)>1e-10&&DT(t[3]-1)>1e-10?Math.sqrt(DT(t[0]*t[3]-t[2]*t[1])):1}},eo.extend=function(t){var e=function(e){eo.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 a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};h(e,eo);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(eo,In);var LT=xT.CMD,kT=[[],[],[]],PT=Math.sqrt,OT=Math.atan2,ET=function(t,e){var i,n,a,o,r,s,l=t.data,u=LT.M,h=LT.C,c=LT.L,d=LT.R,f=LT.A,p=LT.Q;for(a=0,o=0;ar;r++){var s=kT[r];s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},NT=Math.sqrt,RT=Math.sin,zT=Math.cos,BT=Math.PI,VT=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},GT=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(VT(t)*VT(e))},FT=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;ao;o++)a+=ee(t[o-1],t[o]);var r=a/2;r=i>r?i:r;for(var o=0;r>o;o++){var s,l,u,h=o/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([lo(s[0],f[0],l[0],u[0],d,p,g),lo(s[1],f[1],l[1],u[1],d,p,g)])}return n},$T=function(t,e,i,n){var a,o,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)re(r,r,t[d]),se(s,s,t[d]);re(r,r,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)a=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(H(t[d]));continue}a=t[d-1],o=t[d+1]}Y(u,o,a),Q(u,u,e);var g=ee(p,a),m=ee(p,o),v=g+m;0!==v&&(g/=v,m/=v),Q(h,u,-g),Q(c,u,m);var y=U([],p,h),x=U([],p,c);n&&(se(y,y,r),re(y,y,s),se(x,x,r),re(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},JT=eo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){uo(t,e,!0)}}),QT=eo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){uo(t,e,!1)}}),tA=Math.round,eA={},iA=eo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(co(eA,e,this.style),i=eA.x,n=eA.y,a=eA.width,o=eA.height,eA.r=e.r,e=eA):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?rn(t,e):t.rect(i,n,a,o),t.closePath()}}),nA={},aA=eo.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,n,a,o;this.subPixelOptimize?(ho(nA,e,this.style),i=nA.x1,n=nA.y1,a=nA.x2,o=nA.y2):(i=e.x1,n=e.y1,a=e.x2,o=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),1>r&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineTo(a,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),oA=[],rA=eo.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,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(Ea(i,r,a,h,oA),r=oA[1],a=oA[2],Ea(n,s,o,h,oA),s=oA[1],o=oA[2]),t.quadraticCurveTo(r,s,a,o)):(1>h&&(Da(i,r,l,a,h,oA),r=oA[1],l=oA[2],a=oA[3],Da(n,s,u,o,h,oA),s=oA[1],u=oA[2],o=oA[3]),t.bezierCurveTo(r,s,l,u,a,o)))},pointAt:function(t){return po(this.shape,t,!1)},tangentAt:function(t){var e=po(this.shape,t,!0);return te(e,e)}}),sA=eo.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,a=Math.max(e.r,0),o=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*a+i,u*a+n),t.arc(i,n,a,o,r,!s)}}),lA=eo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i"'])/g,FA={"&":"&","<":"<",">":">",'"':""","'":"'"},WA=["a","b","c","d","e","f","g"],HA=function(t,e){return"{"+t+(null==e?"":e)+"}"},ZA=qi,UA=(Object.freeze||Object)({addCommas:Br,toCamelCase:Vr,normalizeCssArray:VA,encodeHTML:Gr,formatTpl:Fr,formatTplSimple:Wr,getTooltipMarker:Hr,formatTime:Ur,capitalFirst:Xr,truncateText:ZA,getTextBoundingRect:Yr,getTextRect:jr}),XA=f,YA=["left","right","top","bottom","width","height"],jA=[["width","left","right"],["height","top","bottom"]],qA=qr,KA=(x(qr,"vertical"),x(qr,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),$A=la(),JA=pr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){pr.call(this,t,e,i,n),this.uid=vr("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?es(t):{},o=e.getTheme();a(t,o.get(this.mainType)),a(t,this.getDefaultOption()),i&&ts(t,n,i)},mergeOption:function(t){a(this.option,t,!0);var e=this.layoutMode;e&&ts(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=$A(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},r=e.length-1;r>=0;r--)o=a(o,e[r],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});wa(JA,{registerWhenExtend:!0}),yr(JA),xr(JA,ns),c(JA,KA);var QA="";"undefined"!=typeof navigator&&(QA=navigator.platform||"");var tD={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:QA.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},eD=la(),iD={clearColorPalette:function(){eD(this).colorIdx=0,eD(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=eD(e),a=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var r=Jn(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?as(s,i):r;if(l=l||r,l&&l.length){var u=l[a];return t&&(o[t]=u),n.colorIdx=(a+1)%l.length,u}}},nD="original",aD="arrayRows",oD="objectRows",rD="keyedColumns",sD="unknown",lD="typedArray",uD="column",hD="row";os.seriesDataToSource=function(t){return new os({data:t,sourceFormat:I(t)?lD:nD,fromDataset:!1})},ya(os);var cD={Must:1,Might:2,Not:3},dD=la(),fD="\x00_ec_inner",pD=pr.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new pr(i),this._optionManager=n},setOption:function(t,e){O(!(fD 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)):ws.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&f(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var a=Jn(t[e]),s=ia(o.get(e),a);na(s),f(s,function(t){var i=t.option;S(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=Ss(e,i,t.exist))});var l=bs(o,n);i[e]=[],o.set(e,[]),f(s,function(t,n){var a=t.exist,s=t.option;if(O(S(s)||a,"Empty component definition"),s){var u=JA.getClass(e,t.keyInfo.subType,!0);if(a&&a.constructor===u)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var h=r({dependentModels:l,componentIndex:n},t.keyInfo);a=new u(s,this,this,h),r(a,h),a.init(s,this,this,h),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);o.get(e)[n]=a,i[e][n]=a.option},this),"series"===e&&Ms(this,o.get("series"))}var i=this.option,o=this._componentsMap,s=[];ls(this),f(t,function(t,e){null!=t&&(JA.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):a(i[e],t,!0))}),JA.topologicalTravel(s,JA.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(JA.hasClass(i)){for(var e=Jn(e),n=e.length-1;n>=0;n--)oa(e[n])&&e.splice(n,1);t[i]=e}}),delete t[fD],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,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var r;if(null!=i)_(i)||(i=[i]),r=m(p(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=_(n);r=m(o,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=a){var l=_(a);r=m(o,function(t){return l&&u(a,t.name)>=0||!l&&t.name===a})}else r=o.slice();return Is(r,t)},findComponents:function(t){function e(t){var e=a+"Index",i=a+"Id",n=a+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:a,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?m(e,t.filter):e}var n=t.query,a=t.mainType,o=e(n),r=o?this.queryComponents(o):this._componentsMap.get(a);return i(Is(r,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,a){e.call(i,n,t,a)})});else if(b(t))f(n.get(t),e,i);else if(S(t)){var a=this.findComponents(t);f(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return m(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 m(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){f(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)},this)},eachRawSeriesByType:function(t,e,i){return f(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=m(this._componentsMap.get("series"),t,e);Ms(this,i)},restoreData:function(t){var e=this._componentsMap;Ms(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),JA.topologicalTravel(i,JA.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!xs(e,t))&&e.restoreData()})})}});c(pD,iD);var gD=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],mD={};As.prototype={constructor:As,create:function(t,e){var i=[];f(mD,function(n){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},As.register=function(t,e){mD[t]=e},As.get=function(t){return mD[t]};var vD=f,yD=n,xD=p,_D=a,wD=/^(min|max)?(.+)$/;Ds.prototype={constructor:Ds,setOption:function(t,e){t&&f(Jn(t.series),function(t){t&&t.data&&I(t.data)&&N(t.data)}),t=yD(t);var i=this._optionBackup,n=Cs.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Os(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=xD(e.timelineOptions,yD),this._mediaList=xD(e.mediaList,yD),this._mediaDefault=yD(e.mediaDefault),this._currentMediaIndices=[],yD(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=yD(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,a=[],o=[];if(!i.length&&!n)return o;for(var r=0,s=i.length;s>r;r++)Ls(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!Ps(a,this._currentMediaIndices)&&(o=xD(a,function(t){return yD(-1===t?n.option:i[t].option)})),this._currentMediaIndices=a,o}};var bD=f,SD=S,MD=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],ID=function(t,e){bD(Gs(t.series),function(t){SD(t)&&Vs(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),bD(i,function(e){bD(Gs(t[e]),function(t){t&&(zs(t,"axisLabel"),zs(t.axisPointer,"label"))})}),bD(Gs(t.parallel),function(t){var e=t&&t.parallelAxisDefault;zs(e,"axisLabel"),zs(e&&e.axisPointer,"label")}),bD(Gs(t.calendar),function(t){Ns(t,"itemStyle"),zs(t,"dayLabel"),zs(t,"monthLabel"),zs(t,"yearLabel")}),bD(Gs(t.radar),function(t){zs(t,"name")}),bD(Gs(t.geo),function(t){SD(t)&&(Bs(t),bD(Gs(t.regions),function(t){Bs(t)}))}),bD(Gs(t.timeline),function(t){Bs(t),Ns(t,"label"),Ns(t,"itemStyle"),Ns(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(Ns(t,"label"),Ns(t,"itemStyle"))})}),bD(Gs(t.toolbox),function(t){Ns(t,"iconStyle"),bD(t.feature,function(t){Ns(t,"iconStyle")})}),zs(Fs(t.axisPointer),"label"),zs(Fs(t.tooltip).axisPointer,"label")},TD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],AD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],DD=function(t,e){ID(t,e),t.series=Jn(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=Ws(t,"pointer.color");null!=i&&Hs(t,"itemStyle.color",i)}Zs(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(AD,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){Zs(t)}))})},CD=function(t){var e=B();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(Us)},LD=Xs.prototype;LD.pure=!1,LD.persistent=!0,LD.getSource=function(){return this._source};var kD={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:qs},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(r!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=al(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;gn?n++:null}function e(){var t=n%r*a+Math.ceil(n/r),e=n>=i?null:o>t?t:n;return n++,e}var i,n,a,o,r,s={reset:function(l,u,h,c){n=l,i=u,a=h,o=c,r=Math.ceil(o/a),s.next=a>1&&o>0?e:t}};return s}();RD.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},RD.unfinished=function(){return this._progress&&this._dueIndex":"",m=p+s.join(p||", ");return{renderMode:n,content:m,style:u}}function o(t){return{renderMode:n,content:Gr(Br(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"
":"\n",l="richText"===n,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,m=this.getRawValue(t),v=_(m),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var x=p>1||v&&!p?a(m):o(p?Qs(c,t,d[0]):v?m[0]:m),w=x.content,b=r.seriesIndex+"at"+h,M=Hr({color:y,type:"item",renderMode:n,markerId:b});u[b]=y,++h;var I=c.getName(t),T=this.name;aa(this)||(T=""),T=T?Gr(T)+(e?": ":s):"";var A="string"==typeof M?M:M.content,D=e?A+T+w:T+A+(I?Gr(I)+": "+w:w);return{html:D,markers:u}},isAnimationEnabled:function(){if(mS.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,a=iD.getColorFromPalette.call(this,t,e,i);return a||(a=n.getColorFromPalette(t,e,i)),a},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(VD,ND),c(VD,iD);var GD=function(){this.group=new CM,this.uid=vr("viewComponent")};GD.prototype={constructor:GD,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var FD=GD.prototype;FD.updateView=FD.updateLayout=FD.updateVisual=function(){},va(GD),wa(GD,{registerWhenExtend:!0});var WD=function(){var t=la();return function(e){var i=t(e),n=e.pipelineContext,a=i.large,o=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(a^r||o^s)&&"reset"}},HD=la(),ZD=WD();fl.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){gl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){gl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var UD=fl.prototype;UD.updateView=UD.updateLayout=UD.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},va(fl,["dispose"]),wa(fl,{registerWhenExtend:!0}),fl.markUpdateMethod=function(t,e){HD(t).updateMethod=e};var XD={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},YD="\x00__throttleOriginMethod",jD="\x00__throttleRate",qD="\x00__throttleType",KD={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),a=t.get(n),o=!w(a)||a instanceof uA?null:a;(!a||o)&&(a=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",a);var r=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(r);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){o&&i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});var l=function(t,e){var i=t.getItemModel(e),a=i.get(n,!0),o=i.get(r,!0);null!=a&&t.setItemVisual(e,"color",a),null!=o&&t.setItemVisual(e,"borderColor",o)};return{dataEach:i.hasItemOption?l:null}}}},$D={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},JD=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=$D.aria,a=0;as)){var d=a();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var a,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";a=n(r?l+"withName":l+"withoutName"),a=i(a,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var h=t.getData();window.data=h,a+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;ff){var g=h.getName(f),m=Qs(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(a)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},QD=Math.PI,tC=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 iA({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new sA({shape:{startAngle:-QD/2,endAngle:-QD/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),a=new iA({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*QD/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*QD/2}).delay(300).start("circularInOut");var o=new CM;return o.add(n),o.add(a),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var r=n.shape.r;a.setShape({x:e-r,y:o-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},eC=wl.prototype;eC.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask; e&&e.dirty()})},eC.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,r=n&&n.modDataCount,s=null!=r?Math.ceil(r/o):null;return{step:o,modBy:s,modDataCount:r}}},eC.getPipeline=function(t){return this._pipelineMap.get(t)},eC.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,r=t.get("large")&&a>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:r}},eC.restorePipelines=function(t){var e=this,i=e._pipelineMap=B();t.eachSeries(function(t){var n=t.getProgressive(),a=t.uid;i.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Ol(e,t,t.dataTask)})},eC.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&Sl(this,n,a,e,i),n.overallReset&&Ml(this,n,a,e,i)},this)},eC.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,Ol(this,e,a)},eC.performDataProcessorTasks=function(t,e){bl(this,this._dataProcessorHandlers,t,e,{block:!0})},eC.performVisualTasks=function(t,e,i){bl(this,this._visualHandlers,t,e,i)},eC.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},eC.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var iC=eC.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},nC=kl(0);wl.wrapStageHandler=function(t,e){return w(t)&&(t={overallReset:t,seriesType:El(t)}),t.uid=vr("stageHandler"),e&&(t.visualType=e),t};var aC,oC={},rC={};Nl(oC,pD),Nl(rC,Ts),oC.eachSeriesByType=oC.eachRawSeriesByType=function(t){aC=t},oC.eachComponent=function(t){"series"===t.mainType&&t.subType&&(aC=t.subType)};var sC=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],lC={color:sC,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],sC]},uC="#eee",hC=function(){return{axisLine:{lineStyle:{color:uC}},axisTick:{lineStyle:{color:uC}},axisLabel:{textStyle:{color:uC}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:uC}}}},cC=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],dC={color:cC,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:uC},crossStyle:{color:uC},label:{color:"#000"}}},legend:{textStyle:{color:uC}},textStyle:{color:uC},title:{textStyle:{color:uC}},toolbox:{iconStyle:{normal:{borderColor:uC}}},dataZoom:{textStyle:{color:uC}},visualMap:{textStyle:{color:uC}},timeline:{lineStyle:{color:uC},itemStyle:{normal:{color:cC[1]}},label:{normal:{textStyle:{color:uC}}},controlStyle:{normal:{color:uC,borderColor:uC}}},timeAxis:hC(),logAxis:hC(),valueAxis:hC(),categoryAxis:hC(),line:{symbol:"circle"},graph:{color:cC},gauge:{title:{textStyle:{color:uC}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};dC.categoryAxis.splitLine.show=!1,JA.extend({type:"dataset",defaultOption:{seriesLayoutBy:uD,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){rs(this)}}),GD.extend({type:"dataset"});var fC=eo.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,a=e.cy,o=e.rx,r=e.ry,s=o*i,l=r*i;t.moveTo(n-o,a),t.bezierCurveTo(n-o,a-l,n-s,a-r,n,a-r),t.bezierCurveTo(n+s,a-r,n+o,a-l,n+o,a),t.bezierCurveTo(n+o,a+l,n+s,a+r,n,a+r),t.bezierCurveTo(n-s,a+r,n-o,a+l,n-o,a),t.closePath()}}),pC=/[\s,]+/;zl.prototype.parse=function(t,e){e=e||{};var i=Rl(t);if(!i)throw new Error("Illegal svg");var n=new CM;this._root=n;var a=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(r)&&(r=null),Fl(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(a){var h=E(a).split(pC);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=o&&null!=r&&(u=Ul(l,o,r),!e.ignoreViewBox)){var c=n;n=new CM,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==r||n.setClipPath(new iA({shape:{x:0,y:0,width:o,height:r}})),{root:n,width:o,height:r,viewBoxRect:l,viewBoxTransform:u}},zl.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){var a=mC[i];if(a){var o=a.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=o)}}else{var a=gC[i];a&&(n=a.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},zl.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var a=new ZT({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Vl(e,a),Fl(t,a,this._defs);var o=a.style.fontSize;o&&9>o&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=o/9,a.scale[1]*=o/9);var r=a.getBoundingRect();return this._textX+=r.width,e.add(a),a};var gC={g:function(t,e){var i=new CM;return Vl(e,i),Fl(t,i,this._defs),i},rect:function(t,e){var i=new iA;return Vl(e,i),Fl(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new UT;return Vl(e,i),Fl(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new aA;return Vl(e,i),Fl(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new fC;return Vl(e,i),Fl(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Gl(i));var n=new JT({shape:{points:i||[]}});return Vl(e,n),Fl(t,n,this._defs),n},polyline:function(t,e){var i=new eo;Vl(e,i),Fl(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Gl(n));var a=new QT({shape:{points:n||[]}});return a},image:function(t,e){var i=new Tn;return Vl(e,i),Fl(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var r=new CM;return Vl(e,r),Fl(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,r=new CM;return Vl(e,r),Fl(t,r,this._defs),this._textX+=a,this._textY+=o,r},path:function(t,e){var i=t.getAttribute("d")||"",n=oo(i);return Vl(e,n),Fl(t,n,this._defs),n}},mC={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),a=parseInt(t.getAttribute("y2")||0,10),o=new hA(e,i,n,a);return Bl(t,o),o},radialgradient:function(){}},vC={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},yC=/url\(\s*#(.*?)\)/,xC=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,_C=/([^\s:;]+)\s*:\s*([^:;]+)/g,wC=B(),bC={registerMap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),f(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var i=SC[e];i(t)}),wC.set(t,n)},retrieveMap:function(t){return wC.get(t)}},SC={geoJSON:function(t){var e=t.source;t.geoJSON=b(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Rl(t.source)}},MC=O,IC=f,TC=w,AC=S,DC=JA.parseClassType,CC="4.6.0",LC={zrender:"4.2.0"},kC=1,PC=1e3,OC=800,EC=900,NC=5e3,RC=1e3,zC=1100,BC=2e3,VC=3e3,GC=3500,FC=4e3,WC=5e3,HC={PROCESSOR:{FILTER:PC,SERIES_FILTER:OC,STATISTIC:NC},VISUAL:{LAYOUT:RC,PROGRESSIVE_LAYOUT:zC,GLOBAL:BC,CHART:VC,POST_CHART_LAYOUT:GC,COMPONENT:FC,BRUSH:WC}},ZC="__flagInMainProcess",UC="__optionUpdated",XC=/^[a-zA-Z0-9_]+$/;jl.prototype.on=Yl("on",!0),jl.prototype.off=Yl("off",!0),jl.prototype.one=Yl("one",!0),c(jl,BS);var YC=ql.prototype;YC._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[UC]){var e=this[UC].silent;this[ZC]=!0,$l(this),jC.update.call(this),this[ZC]=!1,this[UC]=!1,eu.call(this,e),iu.call(this,e)}else if(t.unfinished){var i=kC,n=this._model,a=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Ql(this,n),t.performVisualTasks(n),lu(this,this._model,a,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},YC.getDom=function(){return this._dom},YC.getZr=function(){return this._zr},YC.setOption=function(t,e,i){if(!this._disposed){var n;if(AC(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[ZC]=!0,!this._model||e){var a=new Ds(this._api),o=this._theme,r=this._model=new pD;r.scheduler=this._scheduler,r.init(null,null,o,a)}this._model.setOption(t,QC),i?(this[UC]={silent:n},this[ZC]=!1):($l(this),jC.update.call(this),this._zr.flush(),this[UC]=!1,this[ZC]=!1,eu.call(this,n),iu.call(this,n))}},YC.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},YC.getModel=function(){return this._model},YC.getOption=function(){return this._model&&this._model.getOption()},YC.getWidth=function(){return this._zr.getWidth()},YC.getHeight=function(){return this._zr.getHeight()},YC.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},YC.getRenderedCanvas=function(t){if(mS.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},YC.getSvgDataUrl=function(){if(mS.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},YC.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,i=this._model,n=[],a=this;IC(e,function(t){i.eachComponent({mainType:t},function(t){var e=a._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 IC(n,function(t){t.group.ignore=!1}),o}},YC.getConnectedDataURL=function(t){if(!this._disposed&&mS.canvasSupported){var e=this.group,i=Math.min,a=Math.max,o=1/0;if(oL[e]){var r=o,s=o,l=-o,u=-o,h=[],c=t&&t.pixelRatio||1;f(aL,function(o){if(o.group===e){var c=o.getRenderedCanvas(n(t)),d=o.getDom().getBoundingClientRect();r=i(d.left,r),s=i(d.top,s),l=a(d.right,l),u=a(d.bottom,u),h.push({dom:c,left:d.left,top:d.top})}}),r*=c,s*=c,l*=c,u*=c;var d=l-r,p=u-s,g=AS();g.width=d,g.height=p;var m=Yn(g);return t.connectedBackgroundColor&&m.add(new iA({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),IC(h,function(t){var e=new Tn({style:{x:t.left*c-r,y:t.top*c-s,image:t.dom}});m.add(e)}),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},YC.convertToPixel=x(Kl,"convertToPixel"),YC.convertFromPixel=x(Kl,"convertFromPixel"),YC.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=ua(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var a=t.coordinateSystem;if(a&&a.containPoint)i|=!!a.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i}},YC.getVisual=function(t,e){var i=this._model;t=ua(i,t,{defaultMainType:"series"});var n=t.seriesModel,a=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?a.indexOfRawIndex(t.dataIndex):null;return null!=o?a.getItemVisual(o,e):a.getVisual(e)},YC.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},YC.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var jC={prepareAndUpdate:function(t){$l(this),jC.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,a=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),a.create(e,i),o.performDataProcessorTasks(e,t),Ql(this,e),a.update(e,i),ou(e),o.performVisualTasks(e,t),ru(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(mS.canvasSupported)n.setBackgroundColor(r);else{var s=$e(r);r=ri(s,"rgb"),0===s[3]&&(r="transparent")}uu(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var a=[];e.eachComponent(function(o,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&a.push(s)}else a.push(s)});var o=B();e.eachSeries(function(a){var r=i._chartsMap[a.__viewId];if(r.updateTransform){var s=r.updateTransform(a,e,n,t);s&&s.update&&o.set(a.uid,1)}else o.set(a.uid,1)}),ou(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),lu(i,e,n,t,o),uu(e,this._api)}},updateView:function(t){var e=this._model;e&&(fl.markUpdateMethod(t,"updateView"),ou(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),ru(this,this._model,this._api,t),uu(e,this._api))},updateVisual:function(t){jC.update.call(this,t)},updateLayout:function(t){jC.update.call(this,t)}};YC.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[ZC]=!0,i&&$l(this),jC.update.call(this),this[ZC]=!1,eu.call(this,n),iu.call(this,n)}}},YC.showLoading=function(t,e){if(!this._disposed&&(AC(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nL[t])){var i=nL[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},YC.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},YC.makeActionFromEvent=function(t){var e=r({},t);return e.type=$C[t.type],e},YC.dispatchAction=function(t,e){if(!this._disposed&&(AC(e)||(e={silent:!!e}),KC[t.type]&&this._model)){if(this[ZC])return void this._pendingActions.push(t);tu.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&mS.browser.weChat&&this._throttledZrFlush(),eu.call(this,e.silent),iu.call(this,e.silent)}},YC.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0}},YC.on=Yl("on",!1),YC.off=Yl("off",!1),YC.one=Yl("one",!1);var qC=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];YC._initEvents=function(){IC(qC,function(t){var e=function(e){var i,n=this.getModel(),a=e.target,o="globalout"===t;if(o)i={};else if(a&&null!=a.dataIndex){var s=a.dataModel||n.getSeriesByIndex(a.seriesIndex);i=s&&s.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=r({},a.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),IC($C,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},YC.isDisposed=function(){return this._disposed},YC.clear=function(){this._disposed||this.setOption({series:[]},!0)},YC.dispose=function(){if(!this._disposed){this._disposed=!0,ca(this.getDom(),lL,"");var t=this._api,e=this._model;IC(this._componentsViews,function(i){i.dispose(e,t)}),IC(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete aL[this.id]}},c(ql,BS),pu.prototype={constructor:pu,normalizeQuery:function(t){var e={},i={},n={};if(b(t)){var a=DC(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};f(t,function(t,a){for(var s=!1,l=0;l0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(a)&&(i[a]=t,s=!0),s||(n[a]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,o=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,r,"mainType")&&i(l,r,"subType")&&i(l,r,"index","componentIndex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,o,"name")&&i(u,o,"dataIndex")&&i(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,o))},afterTrigger:function(){this.eventInfo=null}};var KC={},$C={},JC=[],QC=[],tL=[],eL=[],iL={},nL={},aL={},oL={},rL=new Date-0,sL=new Date-0,lL="_echarts_instance_",uL=yu;Lu(BC,KD),Su(DD),Mu(EC,CD),Pu("default",tC),Tu({type:"highlight",event:"highlight",update:"highlight"},G),Tu({type:"downplay",event:"downplay",update:"downplay"},G),bu("light",lC),bu("dark",dC);var hL={};Fu.prototype={constructor:Fu,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={},a={},o=[],r=[];for(Wu(e,n,o,"_oldKeyGetter",this),Wu(i,a,r,"_newKeyGetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var cL=B(["tooltip","label","itemName","itemId","seriesName"]),dL=S,fL="undefined",pL=-1,gL="e\x00\x00",mL={"float":typeof Float64Array===fL?Array:Float64Array,"int":typeof Int32Array===fL?Array:Int32Array,ordinal:Array,number:Array,time:Array},vL=typeof Uint32Array===fL?Array:Uint32Array,yL=typeof Int32Array===fL?Array:Int32Array,xL=typeof Uint16Array===fL?Array:Uint16Array,_L=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],wL=["_extent","_approximateExtent","_rawExtent"],bL=function(t,e){t=t||["x","y"];for(var i={},n=[],a={},o=0;oh;h++){var c=a[h];r[c]||(r[c]=rh()),n[c]||(n[c]=[]),$u(n,this._dimensionInfos[c],i,u,l),this._chunkCount=n[c].length}for(var d=new Array(o),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/i),m=f%i,v=0;o>v;v++){var c=a[v],y=this._dimValueGetterArrayRows(t[p]||d,c,p,v);n[c][g][m]=y;var x=r[c];yx[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},Ju(this)},SL._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,a=this._rawData,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=r[p];c[g]||(c[g]=rh());var m=l[g];0===m.otherDims.itemName&&(i=this._nameDimIdx=p),0===m.otherDims.itemId&&(this._idDimIdx=p),o[g]||(o[g]=[]),$u(o,m,n,f,e),this._chunkCount=o[g].length}for(var v=new Array(s),y=t;e>y;y++){v=a.getItem(y,v);for(var x=Math.floor(y/n),_=y%n,w=0;s>w;w++){var g=r[w],b=o[g][x],S=this._dimValueGetter(v,g,y,w);b[_]=S;var M=c[g];SM[1]&&(M[1]=S)}if(!a.pure){var I=u[y];if(v&&null==I)if(null!=v.name)u[y]=I=v.name;else if(null!=i){var T=r[i],A=o[T][x];if(A){I=A[_];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==v?null:v.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[y]=C)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},Ju(this)}},SL.count=function(){return this._count},SL.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;n>a;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else for(var i=ju(this),t=new i(this.count()),a=0;a=0&&e=0&&en;n++)i.push(this.get(t[n],e));return i},SL.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;n>i;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},SL.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=rh();if(!e)return i;var n,a=this.count(),o=!this._indices;if(o)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var r=n[0],s=n[1],l=0;a>l;l++){var u=this._getFast(t,this.getRawIndex(l));r>u&&(r=u),u>s&&(s=u)}return n=[r,s],this._extent[t]=n,n},SL.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},SL.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},SL.getCalculationInfo=function(t){return this._calculationInfo[t]},SL.setCalculationInfo=function(t,e){dL(t)?r(this._calculationInfo,t):this._calculationInfo[t]=e},SL.getSum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,a=this.count();a>n;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},SL.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},SL.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return null==n||isNaN(n)?pL:n},SL.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},SL.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i=n;){var o=(n+a)/2|0;if(e[o]t))return o;a=o-1}}return-1},SL.indicesOfNearest=function(t,e,i){var n=this._storage,a=n[t],o=[];if(!a)return o;null==i&&(i=1/0);for(var r=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=e-this.get(t,u),d=Math.abs(c);i>=d&&((r>d||d===r&&c>=0&&0>s)&&(r=d,s=c,l=0),c===s&&(o[l++]=u))}return o.length=l,o},SL.getRawIndex=th,SL.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;ir;r++)s[r]=this.get(t[r],o);s[r]=o,e.apply(i,s)}}},SL.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(nh(t),this.getDimension,this);for(var a=this.count(),o=ju(this),r=new o(a),s=[],l=t.length,u=0,h=t[0],c=0;a>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getFast(h,f);d=e.call(i,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getFast(h,f);s[m]=c,d=e.apply(i,s)}d&&(r[u++]=f)}return a>u&&(this._indices=r),this._count=u,this._extent={},this.getRawIndex=this._indices?eh:th,this}},SL.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var a=this.count(),o=ju(this),r=new o(a),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=u&&h>=y||isNaN(y))&&(r[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],w=t[e[1]][1],p=0;pv;v++){var y=g[v],S=b[v];(y>=u&&h>=y||isNaN(y))&&(S>=_&&w>=S||isNaN(S))&&(r[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var v=0;a>v;v++){var M=this.getRawIndex(v),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(r[s++]=M)}else for(var v=0;a>v;v++){for(var I=!0,M=this.getRawIndex(v),p=0;n>p;p++){var T=e[p],y=this._getFast(i,M);(yt[T][1])&&(I=!1)}I&&(r[s++]=this.getRawIndex(v))}return a>s&&(this._indices=r),this._count=s,this._extent={},this.getRawIndex=this._indices?eh:th,this}}},SL.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i),a},SL.map=function(t,e,i,n){i=i||n||this,t=p(nh(t),this.getDimension,this);var a=ah(this,t);a._indices=this._indices,a.getRawIndex=a._indices?eh:th;for(var o=a._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=a._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;xb[1]&&(b[1]=w)}}}return a},SL.downSample=function(t,e,i,n){for(var a=ah(this,[t]),o=a._storage,r=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=a._rawExtent[t],d=new(ju(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=Math.floor(_/h),b=_%h;l[w][b]=x,xc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=eh,a},SL.getItemModel=function(t){var e=this.hostModel;return new pr(this.getRawDataItem(t),e,e&&e.ecModel)},SL.diff=function(t){var e=this;return new Fu(t?t.getIndices():[],this.getIndices(),function(e){return ih(t,e)},function(t){return ih(e,t)})},SL.getVisual=function(t){var e=this._visual;return e&&e[t]},SL.setVisual=function(t,e){if(dL(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},SL.setLayout=function(t,e){if(dL(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},SL.getLayout=function(t){return this._layout[t]},SL.getItemLayout=function(t){return this._itemLayouts[t]},SL.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?r(this._itemLayouts[t]||{},e):e},SL.clearItemLayouts=function(){this._itemLayouts.length=0},SL.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},SL.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,dL(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},SL.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var ML=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};SL.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(ML,e)),this._graphicEls[t]=e},SL.getItemGraphicEl=function(t){return this._graphicEls[t]},SL.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n) })},SL.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new bL(e,this.hostModel)}if(t._storage=this._storage,Ku(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?eh:th,t},SL.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(k(arguments)))})},SL.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],SL.CHANGABLE_METHODS=["filterSelf","selectRange"];var IL=function(t,e){return e=e||{},sh(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},TL={cartesian2d:function(t,e,i,n){var a=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",a),i.set("y",o),dh(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),dh(o)&&(n.set("y",o),null==e.firstCategoryDimIndex&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,i,n){var a=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",a),dh(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var a=t.getReferringComponents("polar")[0],o=a.findAxisModel("radiusAxis"),r=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",r),dh(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),dh(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var a=t.ecModel,o=a.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=o.dimensions.slice();f(o.parallelAxisIndex,function(t,o){var s=a.getComponent("parallelAxis",t),l=r[o];i.set(l,s),dh(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}};xh.prototype.parse=function(t){return t},xh.prototype.getSetting=function(t){return this._setting[t]},xh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},xh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},xh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},xh.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},xh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},xh.prototype.getExtent=function(){return this._extent.slice()},xh.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},xh.prototype.isBlank=function(){return this._isBlank},xh.prototype.setBlank=function(t){this._isBlank=t},xh.prototype.getLabel=null,va(xh),wa(xh,{registerWhenExtend:!0}),_h.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,bh);return new _h({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var AL=_h.prototype;AL.getOrdinal=function(t){return wh(this).get(t)},AL.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=wh(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var DL=xh.prototype,CL=xh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new _h({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),DL.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return DL.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(DL.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this.isBlank()?void 0:this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:G,niceExtent:G});CL.create=function(){return new CL};var LL=Sr,kL=Sr,PL=xh.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),PL.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=Mh(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,a=this._intervalPrecision,o=[];if(!e)return o;var r=1e4;i[0]r)return[];var l=o.length?o[o.length-1]:n[1];return i[1]>l&&o.push(t?l+e:i[1]),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),a=1;as;){var c=Sr(r+(s+1)*h);c>n[0]&&ca&&(a=-a,n.reverse());var o=Sh(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 a=this._interval;t.fixMin||(e[0]=kL(Math.floor(e[0]/a)*a)),t.fixMax||(e[1]=kL(Math.ceil(e[1]/a)*a))}});PL.create=function(){return new PL};var OL="__ec_stack_",EL=.5,NL="undefined"!=typeof Float32Array?Float32Array:Array,RL={seriesType:"bar",plan:WD(),reset:function(t){function e(t,e){for(var i,c=t.count,d=new NL(2*c),f=new NL(c),p=[],g=[],m=0,v=0;null!=(i=t.next());)g[u]=e.get(r,i),g[1-u]=e.get(s,i),p=n.dataToPoint(g,null,p),d[m++]=p[0],d[m++]=p[1],f[v++]=i;e.setLayout({largePoints:d,largeDataIndices:f,barWidth:h,valueAxisStart:Bh(a,o,!1),valueAxisHorizontal:l})}if(Rh(t)&&zh(t)){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=n.getOtherAxis(a),r=i.mapDimension(o.dim),s=i.mapDimension(a.dim),l=o.isHorizontal(),u=l?0:1,h=Eh(Ph([t]),a,t).width;return h>EL||(h=EL),{progress:e}}}},zL=PL.prototype,BL=Math.ceil,VL=Math.floor,GL=1e3,FL=60*GL,WL=60*FL,HL=24*WL,ZL=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][1]o&&(o=e),null!=i&&o>i&&(o=i);var r=XL.length,s=ZL(XL,o,0,r),l=XL[Math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=a/u,c=Er(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(BL((n[0]-d)/u)*u+d),Math.round(VL((n[1]-d)/u)*u+d)];Th(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+kr(t)}});f(["contain","normalize"],function(t){UL.prototype[t]=function(e){return zL[t].call(this,this.parse(e))}});var XL=[["hh:mm:ss",GL],["hh:mm:ss",5*GL],["hh:mm:ss",10*GL],["hh:mm:ss",15*GL],["hh:mm:ss",30*GL],["hh:mm\nMM-dd",FL],["hh:mm\nMM-dd",5*FL],["hh:mm\nMM-dd",10*FL],["hh:mm\nMM-dd",15*FL],["hh:mm\nMM-dd",30*FL],["hh:mm\nMM-dd",WL],["hh:mm\nMM-dd",2*WL],["hh:mm\nMM-dd",6*WL],["hh:mm\nMM-dd",12*WL],["MM-dd\nyyyy",HL],["MM-dd\nyyyy",2*HL],["MM-dd\nyyyy",3*HL],["MM-dd\nyyyy",4*HL],["MM-dd\nyyyy",5*HL],["MM-dd\nyyyy",6*HL],["week",7*HL],["MM-dd\nyyyy",10*HL],["week",14*HL],["week",21*HL],["month",31*HL],["week",42*HL],["month",62*HL],["week",70*HL],["quarter",95*HL],["month",31*HL*4],["month",31*HL*5],["half-year",380*HL/2],["month",31*HL*8],["month",31*HL*10],["year",380*HL]];UL.create=function(t){return new UL({useUTC:t.ecModel.get("useUTC")})};var YL=xh.prototype,jL=PL.prototype,qL=Tr,KL=Sr,$L=Math.floor,JL=Math.ceil,QL=Math.pow,tk=Math.log,ek=xh.extend({type:"log",base:10,$constructor:function(){xh.apply(this,arguments),this._originalScale=new PL},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return p(jL.getTicks.call(this,t),function(t){var a=Sr(QL(this.base,t));return a=t===i[0]&&e.__fixMin?Vh(a,n[0]):a,a=t===i[1]&&e.__fixMax?Vh(a,n[1]):a},this)},getMinorTicks:jL.getMinorTicks,getLabel:jL.getLabel,scale:function(t){return t=YL.scale.call(this,t),QL(this.base,t)},setExtent:function(t,e){var i=this.base;t=tk(t)/tk(i),e=tk(e)/tk(i),jL.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=YL.getExtent.call(this);e[0]=QL(t,e[0]),e[1]=QL(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Vh(e[0],n[0])),i.__fixMax&&(e[1]=Vh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=tk(t[0])/tk(e),t[1]=tk(t[1])/tk(e),YL.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=Pr(i),a=t/i*n;for(.5>=a&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Sr(JL(e[0]/n)*n),Sr($L(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){jL.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){ek.prototype[t]=function(e){return e=tk(e)/tk(this.base),YL[t].call(this,e)}}),ek.create=function(){return new ek};var ik={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&&!A(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&&!A(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:G,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},nk=mo({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n+o),t.lineTo(i-a,n+o),t.closePath()}}),ak=mo({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n),t.lineTo(i,n+o),t.lineTo(i-a,n),t.closePath()}}),ok=mo({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=Math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),rk=mo({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveTo(a,o),t.lineTo(a+r,o+i),t.lineTo(a,o+i/4*3),t.lineTo(a-r,o+i),t.lineTo(a,o),t.closePath()}}),sk={line:aA,rect:iA,roundRect:iA,square:iA,circle:UT,diamond:ak,pin:ok,arrow:rk,triangle:nk},lk={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var o=Math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},uk={};f(sk,function(t,e){uk[e]=new t});var hk=mo({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=ji(t,e,i),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var a=uk[n];a||(n="rect",a=uk[n]),lk[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i)}}}),ck={isDimensionStacked:ph,enableDataStack:fh,getStackedDimension:gh},dk=(Object.freeze||Object)({createList:Qh,getLayoutRect:$r,dataStack:ck,createScale:tc,mixinAxisModelCommonMethods:ec,completeDimensions:sh,createDimensions:IL,createSymbol:Jh}),fk=1e-8;ac.prototype={constructor:ac,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(nc(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(nc(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=a.width/a.height;i?n||(n=i/o):i=o*n;for(var r=new Si(t,e,i,n),s=a.calculateTransform(r),l=this.geometries,u=0;u0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&f(n,function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new ac(e.name,a,e.cp);return o.properties=e,o})},gk=la(),mk=[0,1],vk=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};vk.prototype={constructor:vk,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.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Ar(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(),wc(i,n.count())),wr(t,mk,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),wc(i,n.count()));var a=wr(t,i,mk,e);return this.scale.scale(a)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=lc(this,e),n=i.ticks,a=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return bc(this,a,o,t.clamp),a},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&100>e||(e=5);var i=this.scale.getMinorTicks(e),n=p(i,function(t){return p(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return n},getViewLabels:function(){return sc(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),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,calculateCategoryInterval:function(){return vc(this)}};var yk=pk,xk={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){xk[t]=LS[t]});var _k={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){_k[t]=AA[t]});var wk=function(t){this._axes={},this._dimList=[],this.name=t||""};wk.prototype={constructor:wk,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Sc,this)},getAxesByScale:function(t){return t=t.toLowerCase(),m(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?[]:{},a=0;ae[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(bk,vk);var Sk={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)"]}}},Mk={};Mk.categoryAxis=a({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Sk),Mk.valueAxis=a({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Sk),Mk.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},Mk.valueAxis),Mk.logAxis=s({scale:!0,logBase:10},Mk.valueAxis);var Ik=["value","category","time","log"],Tk=function(t,e,i,n){f(Ik,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?es(e):{},l=n.getTheme();a(e,l.get(r+"Axis")),a(e,this.getDefaultOption()),e.type=i(t,e),o&&ts(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=_h.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},Mk[r+"Axis"],n],!0)})}),JA.registerSubTypeDefaulter(t+"Axis",x(i,t))},Ak=JA.extend({type:"cartesian2dAxis",axis:null,init:function(){Ak.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Ak.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Ak.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});a(Ak.prototype,ik);var Dk={offset:0};Tk("x",Ak,Ic,Dk),Tk("y",Ak,Ic,Dk),JA.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 Ck=Ac.prototype;Ck.type="grid",Ck.axisPointerEnabled=!0,Ck.getRect=function(){return this._rect},Ck.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){Wh(t.scale,t.model)}),f(i.y,function(t){Wh(t.scale,t.model)});var n={};f(i.x,function(t){Dc(i,"y",t,n)}),f(i.y,function(t){Dc(i,"x",t,n)}),this.resize(this.model,e)},Ck.resize=function(t,e,i){function n(){f(o,function(t){var e=t.isHorizontal(),i=e?[0,a.width]:[0,a.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),Lc(t,e?a.x:a.y)})}var a=$r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;n(),!i&&t.get("containLabel")&&(f(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Yh(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");a[i]-=e[i]+n,"top"===t.position?a.y+=e.height+n:"left"===t.position&&(a.x+=e.width+n)}}}),n())},Ck.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]}},Ck.getAxes=function(){return this._axesList.slice()},Ck.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,a=this._coordsList;nt&&(t=e),t},defaultOption:{clip:!0,roundCap:!1}});var Pk=zI([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ok={getBarItemStyle:function(t){var e=Pk(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Ek=mo({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r0||0,0),o=Math.max(e.r,0),r=.5*(o-a),s=a+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u),g=h?u-l<2*Math.PI:l-u<2*Math.PI;g&&(t.moveTo(c*a+i,d*a+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,o,l,u,!h),t.moveTo(f*o+i,p*o+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==a&&(t.arc(i,n,a,u,l,h),t.moveTo(c*a+i,p*a+n)),t.closePath()}}),Nk=["itemStyle","barBorderWidth"],Rk=[0,0];r(pr.prototype,Ok),Ru({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return("cartesian2d"===n||"polar"===n)&&(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e,i=this.group,n=t.getData(),a=this._data,o=t.coordinateSystem,r=o.getBaseAxis();"cartesian2d"===o.type?e=r.isHorizontal():"polar"===o.type&&(e="angle"===r.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Vc(o,n);i.removeClipPath();var h=t.get("roundCap",!0);n.diff(a).add(function(a){if(n.hasValue(a)){var r=n.getItemModel(a),c=Fk[o.type](n,a,r);if(l){var d=Vk[o.type](u,c);if(d)return void i.remove(f)}var f=Gk[o.type](a,c,e,s,!1,h);n.setItemGraphicEl(a,f),i.add(f),Hc(f,n,a,r,c,t,e,"polar"===o.type)}}).update(function(r,c){var d=a.getItemGraphicEl(c);if(!n.hasValue(r))return void i.remove(d);var f=n.getItemModel(r),p=Fk[o.type](n,r,f);if(l){var g=Vk[o.type](u,p);if(g)return void i.remove(d)}d?er(d,{shape:p},s,r):d=Gk[o.type](r,p,e,s,!0,h),n.setItemGraphicEl(r,d),i.add(d),Hc(d,n,r,f,p,t,e,"polar"===o.type)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===o.type?e&&Gc(t,s,e):e&&Fc(t,s,e)}).execute(),this._data=n},_renderLarge:function(t){this._clear(),Uc(t,this.group);var e=t.get("clip",!0)?Bc(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){Uc(e,this.group,!0)},dispose:G,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Fc(e.dataIndex,t,e):Gc(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var zk=Math.max,Bk=Math.min,Vk={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=zk(e.x,t.x),o=Bk(e.x+e.width,t.x+t.width),r=zk(e.y,t.y),s=Bk(e.y+e.height,t.y+t.height);e.x=a,e.y=r,e.width=o-a,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(){return!1}},Gk={cartesian2d:function(t,e,i,n,a){var o=new iA({shape:r({},e)});if(n){var s=o.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],AA[a?"updateProps":"initProps"](o,{shape:u},n,t)}return o},polar:function(t,e,i,n,a,o){var r=e.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},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}}},Wk=eo.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,a=this.__baseDimIdx,o=0;o=0?i:null},30,!1),Zk=Math.PI,Uk=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new CM;var i=new CM({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Uk.prototype={constructor:Uk,hasBuilder:function(t){return!!Xk[t]},add:function(t){Xk[t].call(this)},getGroup:function(){return this.group}};var Xk={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,a=[i[0],0],o=[i[1],0];n&&(oe(a,a,n),oe(o,o,n));var s=r({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new aA({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((a[0]-o[0])*(a[0]-o[0])+(a[1]-o[1])*(a[1]-o[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=Jh(l[i],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,r=[a[0]+o*Math.cos(t.rotation),a[1]-o*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=td(this,t,e),n=id(this,t,e);qc(t,n,i),ed(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=D(t.axisName,e.get("name"));if(i){var n,a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,Jc(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*Zk/180);var f;Jc(a)?n=jk(t.rotation,null!=d?d:t.rotation,o):(n=jc(t,a,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=D(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?ZA(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new ZT({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:qk(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterParams:w},x):null});Uo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Yk(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Yk=Uk.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},jk=Uk.innerTextLayout=function(t,e,i){var n,a,o=Cr(e-t);return Lr(o)?(a=i>0?"top":"bottom",n="center"):Lr(o-Zk)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&Zk>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:a}},qk=Uk.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},Kk=f,$k=x,Jk=Eu({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&ud(t),Jk.superApply(this,"render",arguments),pd(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){pd(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Jk.superApply(this,"remove",arguments)},dispose:function(t,e){gd(this,e),Jk.superApply(this,"dispose",arguments)}}),Qk=[];Jk.registerAxisPointerClass=function(t,e){Qk[t]=e},Jk.getAxisPointerClass=function(t){return t&&Qk[t]};var tP=["axisLine","axisTickLabel","axisName"],eP=["splitArea","splitLine","minorSplitLine"],iP=Jk.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new CM,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),r=md(o,t),s=new Uk(t,r);f(tP,s.add,s),this._axisGroup.add(s.getGroup()),f(eP,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),rr(a,this._axisGroup,t),iP.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),o=a.get("color");o=_(o)?o:[o];for(var r=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=a.getLineStyle(),p=0;p0&&Cd(i[a-1]);a--);for(;a>n&&Cd(i[n]);n++);}for(;a>n;)n+=Ld(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),xP=eo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:YT(eo.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,a=0,o=i.length,r=e.smoothMonotone,s=Od(i,e.smoothConstraint),l=Od(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Cd(i[o-1]);o--);for(;o>a&&Cd(i[a]);a++);}for(;o>a;){var u=Ld(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectNulls);Ld(t,n,a+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),a+=u+1,t.closePath()}}});fl.extend({type:"line",init:function(){var t=new CM,e=new wd;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=Id(n,o,y),_=Rd(n,o,x),w=t.get("showSymbol"),b=w&&!h&&Vd(t,o,n),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(a.remove(t),S.setItemGraphicEl(e,null))}),w||d.remove(),a.add(g);var M,I=!h&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(M=n.getArea(),null!=M.width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r1+=.5)),this._clipShapeForSymbol=M,f&&c.type===n.type&&I===this._step?(v&&!p?p=this._newPolygon(u,_,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath(Fd(n,!1,t)),w&&d.updateData(o,{isIgnore:b,clipShape:M}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Ed(this._stackedOnPoints,_)&&Ed(this._points,u)||(m?this._updateAnimation(o,_,n,i,I,y):(I&&(u=zd(u,n,I),_=zd(_,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:_})))):(w&&d.updateData(o,{isIgnore:b,clipShape:M}),I&&(u=zd(u,n,I),_=zd(_,n,I)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,_,n,m)),g.setClipPath(Fd(n,!0,t)));var T=Bd(o,n)||o.getVisual("color");f.useStyle(s(r.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var A=t.get("smooth");if(A=Nd(t.get("smooth")),f.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var D=o.getCalculationInfo("stackedOnSeries"),C=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),D&&(C=Nd(D.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=_,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=sa(a,n);if(!(o instanceof Array)&&null!=o&&o>=0){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;r=new vd(a,o),r.position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,a.setItemGraphicEl(o,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else fl.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=sa(a,n);if(null!=o&&o>=0){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else fl.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new yP({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 xP({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostModel,u=hP(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;a&&(h=zd(u.current,i,a),c=zd(u.stackedOnCurrent,i,a),d=zd(u.next,i,a),f=zd(u.stackedOnNext,i,a)),r.shape.__points=u.current,r.shape.points=h,er(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),er(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i1){var u;"string"==typeof i?u=bP[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,SP))}}}}};Lu(_P("line","circle","line")),Cu(wP("line")),Mu(HC.PROCESSOR.STATISTIC,MP("line"));var IP=function(t,e,i){e=_(e)&&{coordDimensions:e}||r({},e);var n=t.getSource(),a=IL(n,e),o=new bL(a,t);return o.initData(n,i),o},TP={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},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}},AP=Nu({type:"series.pie",init:function(t){AP.superApply(this,"init",arguments),this.legendVisualProvider=new Wd(y(this.getData,this),y(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){AP.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return IP(this,{coordDimensions:["value"],encodeDefaulter:x(gs,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,a=t.count();a>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:tl(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=AP.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Dr(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Qn(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});c(AP,TP);var DP=Ud.prototype;DP.updateData=function(t,e,i){var n=this.childAt(0),a=this.childAt(1),o=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=r({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(i){n.setShape(c);var f=l.getShallow("animationType");"scale"===f?(n.shape.r=h.r0,ir(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,er(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):er(n,{shape:c},l,e);var p=t.getItemVisual(e,"color");n.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),n.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");g&&n.attr("cursor",g),Zd(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation"));var m=!i&&"transition"===d;this._updateLabel(t,e,m),this.highDownOnUpdate=u.get("hoverAnimation")&&l.isAnimationEnabled()?function(t,e){"emphasis"===e?(a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut")):(a.ignore=a.normalIgnore,o.ignore=o.normalIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut"))}:null,Vo(this)},DP._updateLabel=function(t,e,i){var n=this.childAt(1),a=this.childAt(2),o=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(a.ignore=a.normalIgnore=a.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(er(n,{shape:h},o,e),er(a,{style:c},o,e)):(n.attr({shape:h}),a.attr({style:c})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=r.getModel("label"),f=r.getModel("emphasis.label"),p=r.getModel("labelLine"),g=r.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Ho(a.style,a.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),a.ignore=a.normalIgnore=!d.get("show"),a.hoverIgnore=!f.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!g.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=g.getModel("lineStyle").getLineStyle();var m=p.get("smooth");m&&m===!0&&(m=.4),n.setShape({smooth:m})},h(Ud,CM);var CP=(fl.extend({type:"pie",init:function(){var t=new CM;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),o=this._data,r=this.group,s=e.get("animation"),l=!o,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=x(Hd,this.uid,t,s,i),d=t.get("selectedMode");if(a.diff(o).add(function(t){var e=new Ud(a,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),a.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(a,t),i.off("click"),d&&i.on("click",c),r.add(i),a.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);r.remove(e)}).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=a.getItemLayout(0),p=1;isNaN(f.startAngle)&&p=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",Tu(e,function(i,n){var a={};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);a[i]=t.isSelected(i)||!1})}),{name:i.name,selected:a,seriesId:i.seriesId}})})}),LP=function(t){return{getTargetSeries:function(e){var i={},n=B();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getRawData(),i={},n=t.getData();n.each(function(t){var e=n.getRawIndex(t);i[e]=t}),e.each(function(a){var o,r=i[a],s=null!=r&&n.getItemVisual(r,"color",!0),l=null!=r&&n.getItemVisual(r,"borderColor",!0);if(s&&l||(o=e.getItemModel(a)),!s){var u=o.get("itemStyle.color")||t.getColorFromPalette(e.getName(a)||a+"",t.__paletteScope,e.count());null!=r&&n.setItemVisual(r,"color",u)}if(!l){var h=o.get("itemStyle.borderColor");null!=r&&n.setItemVisual(r,"borderColor",h)}})}}},kP=Math.PI/180,PP=function(t,e,i,n,a,o){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*kP;l.each(function(n){var o=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=br(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),w=_.get("length");w=br(w,i);var b=_.get("length2");if(b=br(b,i),!(o.angleD?-1:1)*b,B=R;S="edge"===m?0>D?a+v:a+i-v:z+(0>D?-g:g),M=B,I=[[O,E],[N,R],[z,B]]}T=P?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V,G=f.get("rotate");V="number"==typeof G?G*(Math.PI/180):G?0>D?-A+Math.PI:-A:0,h=!!V,o.label={x:S,y:M,position:p,height:k.height,len:w,len2:b,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:V,inside:P,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:L,font:x},P||u.push(o.label)}}),!h&&t.get("avoidLabelOverlap")&&Yd(u,r,s,e,i,n,a,o)},OP=2*Math.PI,EP=Math.PI/180,NP=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),a=qd(t,i),o=t.get("center"),r=t.get("radius");_(r)||(r=[0,r]),_(o)||(o=[o,o]);var s=br(a.width,i.getWidth()),l=br(a.height,i.getHeight()),u=Math.min(s,l),h=br(o[0],s)+a.x,c=br(o[1],l)+a.y,d=br(r[0],u/2),f=br(r[1],u/2),p=-t.get("startAngle")*EP,g=t.get("minAngle")*EP,m=0;e.each(n,function(t){!isNaN(t)&&m++});var v=e.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),w=t.get("roseType"),b=t.get("stillShowZeroSum"),S=e.getDataExtent(n);S[0]=0;var M=OP,I=0,T=p,A=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:w?0/0:f,viewRect:a});n="area"!==w?0===v&&b?y:t*y:OP/m,g>n?(n=g,M-=g):I+=t;var o=T+A*n;e.setItemLayout(i,{angle:n,startAngle:T,endAngle:o,clockwise:x,cx:h,cy:c,r0:d,r:w?wr(t,S,[d,f]):f,viewRect:a}),T=o}),OP>M&&m)if(.001>=M){var D=OP/m;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=D,n.startAngle=p+A*i*D,n.endAngle=p+A*(i+1)*D}})}else y=M/I,T=p,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),a=n.angle===g?g:t*y;n.startAngle=T,n.endAngle=T+A*a,T+=A*a}});PP(t,f,a.width,a.height,a.x,a.y)})},RP=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),a=0;a=0;s--){var l=2*s,u=n[l]-o/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&u+o>=t&&h+r>=e)return s}return-1}}),VP=Kd.prototype;VP.isPersistent=function(){return!this._incremental},VP.updateData=function(t,e){this.group.removeAll();var i=new BP({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},VP.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},VP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new go({silent:!0})),this.group.add(this._incremental)):this._incremental=null},VP.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new BP,this._incremental.addDisplayable(n,!0)):(n=new BP({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),n.incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},VP._setCommon=function(t,e,i,n){var a=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=Jh(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]=0&&(t.dataIndex=i+(t.startIndex||0))}))},VP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},VP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Ru({type:"scatter",render:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.updateData(e,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=wP().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext,a=n.large;return i&&a===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=a?new Kd:new wd,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Lu(_P("scatter","circle")),Cu(wP("scatter")),VD.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return mh(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var GP=3,FP=Qd.prototype;FP.stopEffectAnimation=function(){this.childAt(1).removeAll()},FP.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;GP>a;a++){var o=Jh(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/GP*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}Jd(n,t)},FP.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a0?JP:QP)}function a(t,e){return e.get(t>0?KP:$P)}var o=t.getData(),r=t.pipelineContext.large;return o.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:a(1,t),borderColorN:a(-1,t)}),e.isSeriesFiltered(t)?void 0:!r&&{progress:i}}},eO="undefined"!=typeof Float32Array?Float32Array:Array,iO={seriesType:"candlestick",plan:WD(),reset:function(t){function e(t,e){function i(t,e){var i=[];return i[r]=e,i[s]=t,isNaN(e)||isNaN(t)?[0/0,0/0]:n.dataToPoint(i)}function a(t,e,i){var n=e.slice(),a=e.slice();n[r]=MA(n[r]+o/2,1,!1),a[r]=MA(a[r]-o/2,1,!0),i?t.push(n,a):t.push(a,n)}function l(t,e,n){var a=i(t,n),l=i(e,n);return a[r]-=o/2,l[r]-=o/2,{x:a[0],y:a[1],width:s?o:l[0]-a[0],height:s?l[1]-a[1]:o}}function h(t){return t[r]=MA(t[r],1),t}for(var g;null!=(g=t.next());){var m=e.get(u,g),v=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),w=Math.min(v,y),b=Math.max(v,y),S=i(w,m),M=i(b,m),I=i(x,m),T=i(_,m),A=[];a(A,M,0),a(A,S,1),A.push(h(T),h(M),h(I),h(S)),e.setItemLayout(g,{sign:sf(e,g,v,y,d),initBaseline:v>y?M[s]:S[s],ends:A,brushRect:l(x,_,m)})}}function i(t,e){for(var i,a,o=new eO(4*t.count),l=0,h=[],g=[];null!=(a=t.next());){var m=e.get(u,a),v=e.get(c,a),y=e.get(d,a),x=e.get(f,a),_=e.get(p,a);isNaN(m)||isNaN(x)||isNaN(_)?(o[l++]=0/0,l+=3):(o[l++]=sf(e,a,v,y,d),h[r]=m,h[s]=x,i=n.dataToPoint(h,null,g),o[l++]=i?i[0]:0/0,o[l++]=i?i[1]:0/0,h[s]=_,i=n.dataToPoint(h,null,g),o[l++]=i?i[1]:0/0)}e.setLayout("largePoints",o)}var n=t.coordinateSystem,a=t.getData(),o=lf(t,a),r=0,s=1,l=["x","y"],u=a.mapDimension(l[r]),h=a.mapDimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return a.setLayout({candleWidth:o,isSimpleBox:1.3>=o}),null==u||h.length<4?void 0:{progress:t.pipelineContext.large?i:e}}};Su(qP),Lu(tO),Cu(iO),h(uf,vk),hf.prototype.getIndicatorAxes=function(){return this._indicatorAxes},hf.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},hf.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,a=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[a,o]},hf.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=Math.atan2(-i,e),r=1/0,s=-1,l=0;lh&&(a=u,s=l,r=h)}return[s,+(a&&a.coordToData(n))]},hf.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a)/2;this.cx=br(i[0],n),this.cy=br(i[1],a),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");("string"==typeof r||"number"==typeof r)&&(r=[0,r]),this.r0=br(r[0],o),this.r=br(r[1],o),f(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},hf.prototype.update=function(t){function e(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var i=this._indicatorAxes,n=this._model;f(i,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var a=e.getData();f(i,function(t){t.scale.unionExtentFromData(a,a.mapDimension(t.dim))})}},this);var a=n.get("splitNumber");f(i,function(t){var i=Gh(t.scale,t.model);Wh(t.scale,t.model);var n=t.model,o=t.scale,r=n.getMin(),s=n.getMax(),l=o.getInterval();if(null!=r&&null!=s)o.setExtent(+r,+s),o.setInterval((s-r)/a);else if(null!=r){var u;do u=r+l*a,o.setExtent(+r,u),o.setInterval(l),l=e(l);while(ui[0]&&isFinite(h)&&isFinite(i[0]))}else{var c=o.getTicks().length-1;c>a&&(l=e(l));var d=Math.round((i[0]+i[1])/2/l)*l,f=Math.round(a/2);o.setExtent(Sr(d-f*l),Sr(d+(a-f)*l)),o.setInterval(l)}})},hf.dimensions=[],hf.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var a=new hf(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},As.register("radar",hf);var nO=Mk.valueAxis,aO=(Ou({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),o=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),g=this.get("nameGap"),m=this.get("triggerEvent"),v=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var v=c;if(null!=p.color&&(v=s({color:p.color},c)),p=a(n(p),{boundaryGap:t,splitNumber:e,scale:i,axisLine:o,axisTick:l,axisType:u,axisLabel:h,name:p.text,nameLocation:"end",nameGap:g,nameTextStyle:v,triggerEvent:m},!1),d||(p.name=""),"string"==typeof f){var y=p.name;p.name=f.replace("{value}",null!=y?y:"")}else"function"==typeof f&&(p.name=f(p.name,p));var x=r(new pr(p,null,this.ecModel),ik);return x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this.getIndicatorModels=function(){return v}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:a({lineStyle:{color:"#bbb"}},nO.axisLine),axisLabel:cf(nO.axisLabel,!1),axisTick:cf(nO.axisTick,!1),axisType:"interval",splitLine:cf(nO.splitLine,!0),splitArea:cf(nO.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Eu({type:"radar",render:function(t){var e=this.group;e.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=p(i,function(t){var i=new Uk(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});f(n,function(t){f(aO,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var a=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=r.getModel("areaStyle"),h=o.get("show"),c=r.get("show"),d=l.get("color"),g=u.get("color");d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===a)for(var y=n[0].getTicksCoords(),x=i.cx,w=i.cy,b=0;b=b;b++){for(var A=[],D=0;D"+p(n,function(i){var n=e.get(e.mapDimension(i.dim),t);return Gr(i.name+" : "+n)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Ru({type:"radar",render:function(t){function e(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=df(t.getItemVisual(e,"symbolSize")),o=Jh(i,-1,-1,2,2,n);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function i(i,n,a,o,r,s){a.removeAll();for(var l=0;lf;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalAlpha=y,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getImageData(0,0,h.width,h.height),_=x.data,w=0,b=_.length,S=this.minOpacity,M=this.maxOpacity,I=M-S;b>w;){var y=_[w+3]/256,T=4*Math.floor(y*(lO-1));if(y>0){var A=o(y)?s:l;y>0&&(y=y*I+S),_[w++]=A[T],_[w++]=A[T+1],_[w++]=A[T+2],_[w++]=A[T+3]*y*256}else w+=4}return c.putImageData(x,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=AS()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}},Ru({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):yf(a)&&this._renderOnGeo(a,t,n,i)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,i,n){var a=e.coordinateSystem;a&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,a){var o,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");o=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f="itemStyle",p="emphasis.itemStyle",g="label",m="emphasis.label",v=t.getModel(f).getItemStyle(["color"]),y=t.getModel(p).getItemStyle(),x=t.getModel(g),_=t.getModel(m),w=l.type,b="cartesian2d"===w?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],S=i;n>S;S++){var M;if("cartesian2d"===w){if(isNaN(d.get(b[2],S)))continue;var I=l.dataToPoint([d.get(b[0],S),d.get(b[1],S)]);M=new iA({shape:{x:Math.floor(I[0]-o/2),y:Math.floor(I[1]-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}else{if(isNaN(d.get(b[1],S)))continue;M=new iA({z2:1,shape:l.dataToRect([d.get(b[0],S)]).contentShape,style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}var T=d.getItemModel(S);d.hasItemOption&&(v=T.getModel(f).getItemStyle(["color"]),y=T.getModel(p).getItemStyle(),x=T.getModel(g),_=T.getModel(m));var A=t.getRawValue(S),D="-";A&&null!=A[2]&&(D=A[2]),Ho(v,y,x,_,{labelFetcher:t,labelDataIndex:S,defaultText:D,isRectText:!0}),M.setStyle(v),Vo(M,d.hasItemOption?y:r({},y)),M.incremental=a,a&&(M.useHoverLayer=!0),c.add(M),d.setItemGraphicEl(S,M)}},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new gf;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=h,a[1]-=c,a.push(n),a}),y=i.getExtent(),x="visualMap.continuous"===i.type?vf(y,i.option.range):mf(y,i.getPieceList(),i.option.selected);s.update(v,p,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new Tn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var uO=f,hO="\x00__link_datas",cO="\x00__link_mainData",dO=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};dO.prototype={constructor:dO,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},b(t)&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].getNodeById(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].contains(t);if(a)return a}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a||0!==this.children.length&&(0===this.children.length||this.isExpand!==!1)||(e=this.getLeavesModel()),n.getModel(t,(a||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Af.prototype={constructor:Af,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Af.createTree=function(t,e,i,n){function a(t,e){var i=t.value;s=Math.max(s,_(i)?i.length:1),r.push(t);var n=new dO(t.name,o);e?Df(n,e):o.root=n,o._nodes.push(n);var l=t.children;if(l)for(var u=0;ur&&(r=t.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return Gr(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}); var fO=oe;c(Wf,tM),Hf.prototype={constructor:Hf,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Si(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Si(t,e,i,n)},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=this._rawTransformable;o.transform=a.calculateTransform(new Si(t,e,i,n)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=oe([],n,t),i=oe([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),Pe(this.transform||(this.transform=[]),e.transform||Le()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ze(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?fO(i,t,n):W(i,t)},pointToData:function(t){var e=this.invTransform;return e?fO([],t,e):[t[0],t[1]]},convertToPixel:x(Zf,"dataToPoint"),convertFromPixel:x(Zf,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(Hf,tM);var pO="\x00_ec_interaction_mutex";Tu({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c($f,BS);var gO={axisPointer:1,tooltip:1,brush:1};Ru({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new CM,this._controller=new $f(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i){var n=t.getData(),a=t.layoutInfo,o=this._mainGroup,r=t.get("layout");"radial"===r?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateViewCoordSys(t,a,r),this._updateController(t,e,i);var s=this._data,l={expandAndCollapse:t.get("expandAndCollapse"),layout:r,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(s).add(function(e){sp(n,e)&&up(n,e,null,o,t,l)}).update(function(e,i){var a=s.getItemGraphicEl(i);return sp(n,e)?void up(n,e,a,o,t,l):void(a&&hp(s,i,a,o,t,l))}).remove(function(e){var i=s.getItemGraphicEl(e);i&&hp(s,e,i,o,t,l)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),l.expandAndCollapse===!0&&n.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=n},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],a=[];Ra(i,n,a);var o=this._min,r=this._max;a[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinateSystem=new Hf;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=n,this._max=a},_updateController:function(t,e,i){var n=this._controller,a=this._controllerHost,o=this.group;n.setPointerChecker(function(e,n,a){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(n,a)&&!rp(e,i,t)}),n.enable(t.get("roam")),a.zoomLimit=t.get("scaleLimit"),a.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){Uf(a,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){Xf(a,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,a=n&&n[0]||1,o=e.getZoom(),r=(o-1)*i+1;return r/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Tu({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree,a=n.getNodeByDataIndex(i);a.isExpand=!a.isExpand})}),Tu({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=e.coordinateSystem,n=dp(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})});var mO=function(t,e){t.eachSeriesByType("tree",function(t){gp(t,e)})};Lu(_P("tree","circle")),Cu(mO),VD.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};_p(i);var n=t.levels||[];n=t.levels=wp(n,e);var a={};return a.levels=n,Af.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Br(_(i)?i[0]:i),a=e.getName(t);return Gr(a+": "+n)},getDataParams:function(t){var e=VD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=xp(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},r(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=B(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var vO=8,yO=8,xO=5;bp.prototype={constructor:bp,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var r=a.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),Jr(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),o=i.getTextRect(a),r=Math.max(o.width+2*vO,e.emptyItemWidth);e.totalWidth+=r+yO,e.renderList.push({node:n,text:a,width:r})}},_renderContent:function(t,e,i,n,a){for(var o=0,r=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=Kr(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-r,g=r,m=null);var v=new JT({shape:{points:Sp(o,0,g,l,d===c.length-1,0===d)},style:s(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:x(a,p)});this.group.add(v),Mp(v,t,p),o+=g+yO}},remove:function(){this.group.removeAll()}};var _O=y,wO=CM,bO=iA,SO=f,MO=3,IO=["label"],TO=["emphasis","label"],AO=["upperLabel"],DO=["emphasis","upperLabel"],CO=10,LO=1,kO=2,PO=zI([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),OO=function(t){var e=PO(t);return e.stroke=e.fill=e.lineWidth=null,e};Ru({type:"treemap",init:function(){this._containerGroup,this._storage=Tp(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(u(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=["treemapZoomToNode","treemapRootToNode"],r=mp(n,o,t),s=n&&n.type,l=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&r&&c?{rootNodeGroup:c.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);h||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,r)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new wO,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,a,o){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,h=d(l,u,i,o);h&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],h,a,o+1)}a?(e=t,SO(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Fu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function a(t){var e=Tp();return t&&SO(t,function(t,i){var n=e[i];SO(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function o(){SO(f,function(t){SO(t,function(t){t.parent&&t.parent.remove(t)})}),SO(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getData().tree,s=this._oldTree,l=Tp(),u=Tp(),h=this._storage,c=[],d=x(Ap,e,u,h,i,l,c);n(r.root?[r.root]:[],s&&s.root?[s.root]:[],t,r===s||!s,0);var f=a(h);return this._oldTree=r,this._storage=u,{lastsForAnimation:l,willDeleteEls:f,renderFinally:o}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=Ip();SO(e.willDeleteEls,function(t,e){SO(t,function(t){if(!t.invisible){var i,r=t.parent;if(n&&"drillDown"===n.direction)i=r===n.rootNodeGroup?{shape:{x:0,y:0,width:r.__tmNodeWidth,height:r.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;r.__tmWillDelete||(l=r.__tmNodeWidth/2,u=r.__tmNodeHeight/2),i="nodeGroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,a,o)}})}),SO(this._storage,function(t,i){SO(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))})},this),this._state="animating",s.done(_O(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new $f(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",_O(this._onPan,this)),e.on("zoom",_O(this._onZoom,this)));var i=new Si(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>MO||Math.abs(t.dy)>MO)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var o=new Si(a.x,a.y,a.width,a.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=Le();Ee(s,s,[-e,-i]),Re(s,s,[t.scale,t.scale]),Ee(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var a=n.hostTree.data.getItemModel(n.dataIndex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&window.open(o,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(yp(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new bp(this.group))).render(t,e,i.node,_O(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Tp(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var a=this._storage.background[n.getRawIndex()];if(a){var o=a.transformCoordToLocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}});for(var EO=function(){},NO=["treemapZoomToNode","treemapRender","treemapMove"],RO=0;ROn&&(o=n,a=i)}for(var a,o=1/0,r=0,s=e.length;s>r;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;s>r;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(Gp(c[1],t,h[1]))return r}else if(1/0===h[1]){if(Gp(c[0],h[0],t))return r}else if(Gp(c[0],h[0],t)&&Gp(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}return i?1/0===t?e.length-1:t===-1/0?0:a:void 0};var HO=_,ZO="itemStyle",UO={seriesType:"treemap",reset:function(t){var e=t.getData().tree,i=e.root,n=t.getModel(ZO);if(!i.isRemoved()){var a=p(e.levelModels,function(t){return t?t.get(ZO):null});Fp(i,{},a,n,t.getViewRoot().getAncestors(),t)}}},XO=Math.max,YO=Math.min,jO=D,qO=f,KO=["itemStyle","borderWidth"],$O=["itemStyle","gapWidth"],JO=["upperLabel","show"],QO=["upperLabel","height"],tE={seriesType:"treemap",reset:function(t,e,i,n){var a=i.getWidth(),o=i.getHeight(),s=t.option,l=$r(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=br(jO(l.width,u[0]),a),c=br(jO(l.height,u[1]),o),d=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],p=mp(n,f,t),g="treemapRender"===d||"treemapMove"===d?n.rootRect:null,m=t.getViewRoot(),v=vp(m);if("treemapMove"!==d){var y="treemapZoomToNode"===d?ig(t,p,m,h,c):g?[g.width,g.height]:[h,c],x=s.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var _={squareRatio:s.squareRatio,sort:x,leafDepth:s.leafDepth};m.hostTree.clearLayouts();var w={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};m.setLayout(w),qp(m,_,!1,0);var w=m.getLayout();qO(v,function(t,e){var i=(v[e+1]||m).getValue();t.setLayout(r({dataExtent:[i,i],borderWidth:0,upperHeight:0},w))})}var b=t.getData().tree.root;b.setLayout(ng(l,g,p),!0),t.setLayoutInfo(l),ag(b,new Si(-l.x,-l.y,a,o),v,m,0)}};Lu(UO),Cu(tE),VD.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t){var e={name:t.name,children:t.data};rg(e);var i=t.levels||[],n={};return n.levels=i,Af.createTree(e,this,n).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=VD.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=xp(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var eE={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},iE=2,nE=4,aE=sg.prototype;aE.updateData=function(t,e,i,n,o){this.node=e,e.piece=this,n=n||this._seriesModel,o=o||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=r({},h);c.label=null;var d=lg(e,n,o);cg(e,n,d);var f,p=u.getModel("itemStyle").getItemStyle();if("normal"===i)f=p;else{var g=u.getModel(i+".itemStyle").getItemStyle();f=a(g,p)}f=s({lineJoin:"bevel",fill:f.fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,er(l,{shape:{r:h.r}},n,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(er(l,{shape:c},n),l.useStyle(f)):er(l,{shape:c,style:f},n),this._updateLabel(n,d,i);var m=u.getShallow("cursor");if(m&&l.attr("cursor",m),t){var v=n.getShallow("highlightPolicy");this._initEvents(l,e,n,v)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel},aE.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):hg(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==eE.NONE&&i.piece.childAt(0).trigger("downplay"))})},aE.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},aE.onHighlight=function(){this.updateData(!1,this.node,"highlight")},aE.onDownplay=function(){this.updateData(!1,this.node,"downplay")},aE._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?o.get(t):e}var a=this.node.getModel(),o=a.getModel("label"),r="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),s=a.getModel("emphasis.label"),l=D(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);n("show")===!1&&(l="");var u=this.node.getLayout(),h=r.get("minAngle");null==h&&(h=o.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p,S<-Math.PI/2&&(S+=Math.PI)):"tangential"===b?(S=Math.PI/2-p,S>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI)):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},aE._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onEmphasis(n)},r=function(){a.onNormal()},s=function(){a.onDownplay()},l=function(){a.onHighlight()};i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",s).on("highlight",l)},h(sg,CM);var oE="sunburstRootToNode",rE=(fl.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function a(t,e){function i(t){return t.getId()}function n(i,n){var a=null==i?null:t[i],r=null==n?null:e[n];o(a,r)}(0!==t.length||0!==e.length)&&new Fu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function o(i,n){if(f||!i||i.getValue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),u.setItemGraphicEl(i.dataIndex,n.piece)):r(n);else if(i){var a=new sg(i,t,e);d.add(a),u.setItemGraphicEl(i.dataIndex,a)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",t,e):(l.virtualPiece=new sg(i,t,e),d.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(){l._rootToNode(n.parentNode)};n.piece._onclickEvent=a,l.virtualPiece.on("click",a)}else l.virtualPiece&&(d.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=t,this.api=i,this.ecModel=e;var u=t.getData(),h=u.tree.root,c=t.getViewRoot(),d=this.group,f=t.get("renderLabelForZeroData"),p=[];c.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(a(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var v=this.virtualPiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var a=n.getModel().get("nodeClick");if("rootToNode"===a)t._rootToNode(n);else if("link"===a){var o=n.getModel(),r=o.get("link");if(r){var s=o.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:oE,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var a=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),"sunburstRootToNode");Tu({type:rE,update:"updateView"},function(t,e){function i(e){var i=mp(t,[rE],e);if(i){var n=e.getViewRoot();n&&(t.direction=yp(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var sE="sunburstHighlight";Tu({type:sE,update:"updateView"},function(t,e){function i(e){var i=mp(t,[sE],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var lE="sunburstUnhighlight";Tu({type:lE,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var uE=Math.PI/180,hE=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 a=i.getWidth(),o=i.getHeight(),r=Math.min(a,o),s=br(e[0],a),l=br(e[1],o),u=br(n[0],r/2),h=br(n[1],r/2),c=-t.get("startAngle")*uE,d=t.get("minAngle")*uE,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&dg(g,v);var y=0;f(g.children,function(t){!isNaN(t.getValue())&&y++});var x=g.getValue(),w=Math.PI/(x||y)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),a=0===x&&T?w:n*w;d>a&&(a=d),i=e+A*a;var o=t.depth-m-(b?-1:1),h=u+M*o,c=u+M*(o+1),g=t.getModel();null!=g.get("r0")&&(h=br(g.get("r0"),r/2)),null!=g.get("r")&&(c=br(g.get("r"),r/2)),t.setLayout({angle:a,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(b){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})};Lu(x(LP,"sunburst")),Cu(x(hE,"sunburst")),Mu(x(RP,"sunburst"));for(var cE=[126,25],dE=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],fE=0;fEo;o++){var s=t.getName(o); i.set(s,!0),n.push({name:s,value:t.get(e,o),selected:tl(t,o,"selected")})}var l=AE.load(this.getMapType(),this.option.nameMap);return f(l.regions,function(t){var e=t.name;i.get(e)||(n.push({name:e}),a.push(e))}),this.updateSelectedMap(n),t.appendValues([],a),t},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=Br(this.getRawValue(t)),n=e.getName(t),a=this.seriesGroup,o=[],r=0;r"+Gr(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}});c(DE,TP),wg.prototype={constructor:wg,draw:function(t,e,i,n){var a="geo"===t.mainType,o=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){o||e.getHostGeoModel()!==t||(o=e.getData())});var r=t.coordinateSystem;this._updateBackground(r);var s=this._regionsGroup,l=this.group;r._roamTransformable.transform&&(l.transform=r._roamTransformable.transform.slice(),l.decomposeTransform());var u=r._rawTransformable.scale,h=r._rawTransformable.position;s.removeAll();var c=["itemStyle"],d=["emphasis","itemStyle"],p=["label"],g=["emphasis","label"],m=B();f(r.regions,function(e){var i=m.get(e.name)||m.set(e.name,new CM),n=new lA({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var r,v=t.getRegionModel(e.name)||t,y=v.getModel(c),x=v.getModel(d),_=yg(y),w=yg(x),b=v.getModel(p),S=v.getModel(g);if(o){r=o.indexOfName(e.name);var M=o.getItemVisual(r,"color",!0);M&&(_.fill=M)}var I=function(t){return[t[0]*u[0]+h[0],t[1]*u[1]+h[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i=0)&&(L=t);var P=new ZT({position:I(e.center.slice()),scale:[1/l.scale[0],1/l.scale[1]],z2:10,silent:!0});Ho(P.style,P.hoverStyle={},b,S,{labelFetcher:L,labelDataIndex:k,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(P)}if(o)o.setItemGraphicEl(r,i);else{var v=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:v&&v.option||{}}}var O=i.__regions||(i.__regions=[]);O.push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Vo(i,w),s.add(i)}),this._updateController(t,e,i),xg(this,t,s,i,n),_g(t,s)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&AE.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&f(AE.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1);var l=t.mainType;o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,Uf(s,t.dx,t.dy),i.dispatchAction(r(n(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,Xf(s,t.scale,t.originX,t.originY),i.dispatchAction(r(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setPointerChecker(function(e,n,o){return a.getViewRectAfterRoam().contain(n,o)&&!rp(e,i,t)})}};var CE="__seriesMapHighDown",LE="__seriesMapCallKey";Ru({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id){var o=this._mapDraw;o&&a.add(o.group)}else if(t.needsDrawMap){var o=this._mapDraw||new wg(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t){var e=t.originalData,i=this.group;e.each(e.mapDimension("value"),function(n,a){if(!isNaN(n)){var o=e.getItemLayout(a);if(o&&o.point){var s=o.point,l=o.offset,u=new UT({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:mA+1)});if(!l){var h=t.mainSeries.getData(),c=e.getName(a),d=h.indexOfName(c),f=e.getItemModel(a),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),v=C(t.getFormattedLabel(d,"normal"),c),y=C(t.getFormattedLabel(d,"emphasis"),v),_=m[CE],w=Math.random();if(!_){_=m[CE]={};var b=x(bg,!0),S=x(bg,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[LE]=w,r(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:y,normalText:v}),Sg(_,!1)}i.add(u)}}})}}),Tu({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var a=dp(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&f(e.seriesGroup,function(t){t.setCenter(a.center),t.setZoom(a.zoom)})}})}),Mg.prototype={constructor:Mg,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;ia;a++)e[a]=e[a]||[],e[a][0]=this._flatCoords[i+2*a],e[a][1]=this._flatCoords[i+2*a+1];return n}for(var o=this._getCoordsFromItemModel(t),a=0;al;){s++;var u=t[l++];n[r++]=o+e,n[r++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];a[o++]=c,a[o++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t){var e=new bL(["value"],this);return e.hasItemOption=!1,e.initData(t.data,[],function(t,i,n,a){if(t instanceof Array)return 0/0;e.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[a]:o:void 0}),e},formatTooltip:function(t){var e=this.getData(),i=e.getItemModel(t),n=i.get("name");if(n)return n;var a=i.get("fromName"),o=i.get("toName"),r=[];return null!=a&&r.push(a),null!=o&&r.push(o),Gr(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),VE=aA.prototype,GE=rA.prototype,FE=mo({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){this[Lg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:VE.buildPath,_buildPathCurve:GE.buildPath,pointAt:function(t){return this[Lg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:VE.pointAt,_pointAtCurve:GE.pointAt,tangentAt:function(t){var e=this.shape,i=Lg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:GE.tangentAt}),WE=["fromSymbol","toSymbol"],HE=Rg.prototype;HE.beforeUpdate=Ng,HE._createLine=function(t,e,i){var n=t.hostModel,a=t.getItemLayout(e),o=Og(a);o.shape.percent=0,ir(o,{shape:{percent:1}},n,e),this.add(o);var r=new ZT({name:"label",lineLabelOriginalOpacity:1});this.add(r),f(WE,function(i){var n=Pg(i,t,e);this.add(n),this[kg(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},HE.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),r={shape:{}};Eg(r.shape,o),er(a,r,n,e),f(WE,function(i){var n=t.getItemVisual(e,i),a=kg(i);if(this[a]!==n){this.remove(this.childOfName(i));var o=Pg(i,t,e);this.add(o)}this[a]=n},this),this._updateCommonStl(t,e,i)},HE._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,r=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle").getLineStyle(),r=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=L(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),a.hoverStyle=r,f(WE,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Sr(x):x}var _=m?g:null,w=v?C(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;(null!=_||null!=w)&&(Uo(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,Vo(this)},HE.highlight=function(){this.trigger("emphasis")},HE.downplay=function(){this.trigger("normal")},HE.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},HE.setLinePoints=function(t){var e=this.childOfName("line");Eg(e.shape,t),e.dirty()},h(Rg,CM);var ZE=zg.prototype;ZE.isPersistent=function(){return!0},ZE.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var a=Gg(t);t.diff(n).add(function(i){Bg(e,t,i,a)}).update(function(i,o){Vg(e,n,t,o,i,a)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},ZE.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},ZE.incrementalPrepareUpdate=function(t){this._seriesScope=Gg(t),this._lineData=null,this.group.removeAll()},ZE.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){a.updateSymbolPosition(n)});s||d.done(function(){a.remove(n)}),d.start()}this._period=r,this._loop=s}},UE.getLineLength=function(t){return ES(t.__p1,t.__cp1)+ES(t.__cp1,t.__p2)},UE.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},UE.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},UE.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=La,s=ka;o[0]=r(e[0],n[0],i[0],a),o[1]=r(e[1],n[1],i[1],a);var l=s(e[0],n[0],i[0],a),u=s(e[1],n[1],i[1],a);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},UE.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},h(Hg,CM);var XE=Zg.prototype;XE._createPolyline=function(t,e,i){var n=t.getItemLayout(e),a=new QT({shape:{points:n}});this.add(a),this._updateCommonStl(t,e,i)},XE.updateData=function(t,e,i){var n=t.hostModel,a=this.childAt(0),o={shape:{points:t.getItemLayout(e)}};er(a,o,n,e),this._updateCommonStl(t,e,i)},XE._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),o=t.getItemVisual(e,"color"),r=i&&i.lineStyle,l=i&&i.hoverLineStyle;(!i||t.hasItemOption)&&(r=a.getModel("lineStyle").getLineStyle(),l=a.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(s({strokeNoScale:!0,fill:"none",stroke:o},r)),n.hoverStyle=l,Vo(this)},XE.updateLayout=function(t,e){var i=this.childAt(0);i.setShape("points",t.getItemLayout(e))},h(Zg,CM);var YE=Ug.prototype;YE.createLine=function(t,e,i){return new Zg(t,e,i)},YE.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a=0&&!(n[o]<=e);o--);o=Math.min(o,a-2)}else{for(var o=r;a>o&&!(n[o]>e);o++);o=Math.min(o-1,a-2)}ae(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var l=i[o+1][0]-i[o][0],u=i[o+1][1]-i[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},h(Ug,Hg);var jE=mo({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a0){t.moveTo(i[a++],i[a++]);for(var r=1;o>r;r++)t.lineTo(i[a++],i[a++])}}else for(var a=0;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,a=0;a0)for(var r=e[a++],s=e[a++],l=1;o>l;l++){var u=e[a++],h=e[a++];if(Fa(r,s,u,h))return n}n++}else for(var n=0,a=0;a0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(Ha(r,s,c,d,u,h))return n}else if(Fa(r,s,u,h))return n;n++}return-1}}),qE=Xg.prototype;qE.isPersistent=function(){return!this._incremental},qE.updateData=function(t){this.group.removeAll();var e=new jE({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},qE.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new go({silent:!0})),this.group.add(this._incremental)):this._incremental=null},qE.incrementalUpdate=function(t,e){var i=new jE;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},qE.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},qE._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=e.getVisual("color");a&&t.setStyle("stroke",a),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},qE._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var KE={seriesType:"lines",plan:WD(),reset:function(t){function e(e,o){var r=[];if(a){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;hp;p++)d=i.dataToPoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setLayout("linesPoints",s)}else for(var h=e.start;hv;v++)m.push(i.dataToPoint(r[v]));else{m[0]=i.dataToPoint(r[0]),m[1]=i.dataToPoint(r[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setItemLayout(h,m)}}var i=t.coordinateSystem,n=t.get("polyline"),a=t.pipelineContext.large;return{progress:e}}};Ru({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t),o=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),a.updateData(n);var u=t.get("clip",!0)&&Bc(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t);a.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),a=t.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var o=KE.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),a=!!e.get("polyline"),o=e.pipelineContext,r=o.large;return i&&n===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new Xg:new zg(a?n?Ug:Zg:n?Hg:Rg),this._hasEffet=n,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),i="svg"===e.painter.getType();i||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var $E="lineStyle.opacity".split("."),JE={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=Yg(i.getShallow("symbol",!0)),a=Yg(i.getShallow("symbolSize",!0)),o=i.get($E);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),a[0]&&t.setItemVisual(e,"fromSymbolSize",a[0]),a[1]&&t.setItemVisual(e,"toSymbolSize",a[1]),t.setItemVisual(e,"opacity",o)}var i=Yg(t.get("symbol")),n=Yg(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("opacity",t.get($E)),{dataEach:a.hasItemOption?e:null}}};Cu(KE),Lu(JE);var QE=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},tN=QE.prototype;tN.type="graph",tN.isDirected=function(){return this._directed},tN.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[jg(t)]){var n=new qg(t,e);return n.hostGraph=this,this.nodes.push(n),i[jg(t)]=n,n}},tN.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},tN.getNodeById=function(t){return this._nodesMap[jg(t)]},tN.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),qg.isInstance(t)||(t=n[jg(t)]),qg.isInstance(e)||(e=n[jg(e)]),t&&e){var o=t.id+"-"+e.id;if(!a[o]){var r=new Kg(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}}},tN.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},tN.getEdge=function(t,e){qg.isInstance(t)&&(t=t.id),qg.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},tN.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},tN.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},tN.breadthFirstTraverse=function(t,e,i,n){if(qg.isInstance(e)||(e=this._nodesMap[jg(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;oa;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();o>a;a++)i[t.getRawIndex(a)].dataIndex=a;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var a=0,o=n.length;o>a;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();o>a;a++)n[e.getRawIndex(a)].dataIndex=a},tN.clone=function(){for(var t=new QE(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};c(qg,eN("hostGraph","data")),c(Kg,eN("hostGraph","edgeData")),QE.Node=qg,QE.Edge=Kg,ya(qg),ya(Kg);var iN=function(t,e,i,n,a){for(var o=new QE(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=mh(t,i);else{var m=As.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=IL(t,{coordDimensions:v});p=new bL(y,i),p.initData(t)}var x=new bL(["value"],i);return x.initData(l,s),a&&a(p,x),xf({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},nN=Nu({type:"series.graph",init:function(t){function e(){return i._categoriesData}nN.superApply(this,"init",arguments);var i=this;this.legendVisualProvider=new Wd(e,e),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){nN.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){nN.superApply(this,"mergeDefaultAndTheme",arguments),Qn(t,["edgeLabel"],["show"])},getInitialData:function(t,e){function i(t,i){function n(t){return t=this.parsePath(t),t&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t});var a=o.getModel("edgeLabel"),r=new pr({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new pr({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}var n=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;return a&&n?iN(a,n,this,!0,i).data:void 0 },getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),a=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),r=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Gr(l.join(" > ")),a.value&&(l+=" : "+Gr(a.value)),l}return nN.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=p(this.option.categories||[],function(t){return null!=t.value?t:r({value:0},t)}),e=new bL(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return nN.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),aN=[],oN=[],rN=[],sN=La,lN=NS,uN=Math.abs,hN=function(t,e){var i=[],n=Ea,a=[[],[],[]],o=[[],[]],r=[];e/=2,t.eachEdge(function(t){var s=t.getLayout(),l=t.getVisual("fromSymbol"),u=t.getVisual("toSymbol");s.__original||(s.__original=[H(s[0]),H(s[1])],s[2]&&s.__original.push(H(s[2])));var h=s.__original;if(null!=s[2]){if(W(a[0],h[0]),W(a[1],h[2]),W(a[2],h[1]),l&&"none"!==l){var c=Jg(t.node1),d=Qg(a,h[0],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],d,i),a[0][1]=i[3],a[1][1]=i[4]}if(u&&"none"!==u){var c=Jg(t.node2),d=Qg(a,h[1],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],d,i),a[1][1]=i[1],a[2][1]=i[2]}W(s[0],a[0]),W(s[1],a[2]),W(s[2],a[1])}else{if(W(o[0],h[0]),W(o[1],h[1]),Y(r,o[1],o[0]),te(r,r),l&&"none"!==l){var c=Jg(t.node1);X(o[0],o[0],r,c*e)}if(u&&"none"!==u){var c=Jg(t.node2);X(o[1],o[1],r,-c*e)}W(s[0],o[0]),W(s[1],o[1])}})},cN="__focusNodeAdjacency",dN="__unfocusNodeAdjacency",fN=["itemStyle","opacity"],pN=["lineStyle","opacity"];Ru({type:"graph",init:function(t,e){var i=new wd,n=new zg,a=this.group;this._controller=new $f(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,a=t.coordinateSystem;this._model=t;var o=this._symbolDraw,r=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):er(s,l,t)}hN(t.getGraph(),$g(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(e,a){var o=u.getItemModel(a);e.off("drag").off("dragend");var r=o.get("draggable");r&&e.on("drag",function(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(a),u.setItemLayout(a,e.position))},this).on("dragend",function(){c&&c.setUnfixed(a)},this),e.setDraggable(r&&c),e[cN]&&e.off("mouseover",e[cN]),e[dN]&&e.off("mouseout",e[dN]),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[cN]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[dN]=function(){n._dispatchUnfocus(i)}))},this),u.graph.eachEdge(function(e){var a=e.getGraphicEl();a[cN]&&a.off("mouseover",a[cN]),a[dN]&&a.off("mouseout",a[dN]),e.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[cN]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),a.on("mouseout",a[dN]=function(){n._dispatchUnfocus(i)}))});var f="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.get("label.rotate")||0,a=t.getSymbolPath();if(f){var o=u.getItemLayout(e),r=Math.atan2(o[1]-g,o[0]-p);0>r&&(r=2*Math.PI+r);var s=o[0]e&&(e=0),e*=u;var i=Math.asin(e/2/a);isNaN(i)&&(i=_N/2),wN[t.dataIndex]=i,l+=2*i});var h=(2*_N-l)/s/2,c=0;i.eachNode(function(t){var e=h+wN[t.dataIndex];c+=e,t.setLayout([a*Math.cos(c)+o,a*Math.sin(c)+r]),c+=e})}},SN=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&rm(t,"symbolSize")})},MN=X,IN=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),a=n.data,o=n.edgeData,r=t.getModel("force"),s=r.get("initLayout");t.preservedPoints?a.each(function(t){var e=a.getId(t);a.setItemLayout(t,i[e]||[0/0,0/0])}):s&&"none"!==s?"circular"===s&&rm(t,"value"):am(t);var l=a.getDataExtent("value"),u=o.getDataExtent("value"),h=r.get("repulsion"),c=r.get("edgeLength");_(h)||(h=[h,h]),_(c)||(c=[c,c]),c=[c[1],c[0]];var d=a.mapArray("value",function(t,e){var i=a.getItemLayout(e),n=wr(t,l,h);return isNaN(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:a.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),f=o.mapArray("value",function(t,e){var i=n.getEdgeByIndex(e),a=wr(t,u,c);isNaN(a)&&(a=(c[0]+c[1])/2);var o=i.getModel();return{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:a,curveness:o.get("lineStyle.curveness")||0,ignoreForceLayout:o.get("ignoreForceLayout")}}),e=t.coordinateSystem,p=e.getBoundingRect(),g=sm(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(t){for(var e=0,o=d.length;o>e;e++)d[e].fixed&&W(d[e].p,n.getNodeByIndex(e).getLayout());m(function(e,o,r){for(var s=0,l=e.length;l>s;s++)e[s].fixed||n.getNodeByIndex(s).setLayout(e[s].p),i[a.getId(s)]=e[s].p;for(var s=0,l=o.length;l>s;s++){var u=o[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],W(f[0],c),W(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)})},t.forceLayout=g,t.preservedPoints=i,g.step()}else t.forceLayout=null})},TN=function(t,e){var i=[];return t.eachSeriesByType("graph",function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var a=t.getData(),o=a.mapArray(function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]}),r=[],s=[];Ra(o,r,s),s[0]-r[0]===0&&(s[0]+=1,r[0]-=1),s[1]-r[1]===0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),u=lm(t,e,l);isNaN(l)&&(r=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-r[0],c=s[1]-r[1],d=u.width,f=u.height,p=t.coordinateSystem=new Hf;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(r[0],r[1],h,c),p.setViewRect(u.x,u.y,d,f),p.setCenter(t.get("center")),p.setZoom(t.get("zoom")),i.push(p)}}),i};Mu(mN),Lu(_P("graph","circle",null)),Lu(vN),Lu(yN),Cu(xN),Cu(HC.VISUAL.POST_CHART_LAYOUT,SN),Cu(IN),Au("graphView",{create:TN});var AN=VD.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});c(AN,WP,!0);var DN=["itemStyle"],CN=["emphasis","itemStyle"],LN=(fl.extend({type:"boxplot",render:function(t){var e=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var a="horizontal"===t.get("layout")?1:0;e.diff(n).add(function(t){if(e.hasValue(t)){var n=e.getItemLayout(t),o=um(n,e,t,a,!0);e.setItemGraphicEl(t,o),i.add(o)}}).update(function(t,o){var r=n.getItemGraphicEl(o);if(!e.hasValue(t))return void i.remove(r);var s=e.getItemLayout(t);r?hm(s,r,e,t):r=um(s,e,t,a),i.add(r),e.setItemGraphicEl(t,r)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},remove:function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})},dispose:G}),eo.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;4>n;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();no&&(e[1-n]=e[n]+c.sign*o),e},BN=f,VN=Math.min,GN=Math.max,FN=Math.floor,WN=Math.ceil,HN=Sr,ZN=Math.PI;xm.prototype={type:"parallel",constructor:xm,_init:function(t,e){var i=t.dimensions,n=t.parallelAxisIndex;BN(i,function(t,i){var a=n[i],o=e.getComponent("parallelAxis",a),r=this._axesMap.set(t,new RN(t,Hh(o),[0,0],o.get("type"),a)),s="category"===r.type;r.onBand=s&&o.get("boundaryGap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinateSystem=o.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],r=t[a];return o>=i&&o<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();BN(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Wh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=$r(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],u=this.dimensions.length,h=_m(e.get("axisExpandWidth"),l),c=_m(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");if(f)t=_m(f[1]-f[0],l),f[1]=f[0]+t;else{t=_m(h*(c-1),l);var p=e.get("axisExpandCenter")||FN(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[FN(HN(f[0]/h,1))+1,WN(HN(f[1]/h,1))-1],v=g/h*f[0];return{layout:o,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[a[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:v}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),BN(i,function(e,i){var o=(n.axisExpandable?bm:wm)(i,n),r={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},s={horizontal:ZN/2,vertical:0},l=[r[a].x+t.x,r[a].y+t.y],u=s[a],h=Le();Ne(h,h,u),Ee(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var a=this._axesMap,o=this.dimensions,r=[],s=[];f(o,function(e){r.push(t.mapDimension(e)),s.push(a.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),d=0,p=o.length;p>d;d++){var g=s[d].getActiveState(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,a=t.length;a>n;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return ar([t,0],i.transform)},getAxisLayout:function(t){return n(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),a=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&sa*(1-h[0])?(l="jump",r=s-a*(1-h[2])):(r=s-a*h[1])>=0&&(r=s-a*(1-h[1]))<=0&&(r=0),r*=e.axisExpandWidth/u,r?zN(r,n,o,"all"):l="none";else{var a=n[1]-n[0],d=o[1]*s/a;n=[GN(0,d-a/2)],n[1]=VN(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}},As.register("parallel",{create:Sm});var UN=JA.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return zI([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)Mr(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;a>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),XN={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};a(UN.prototype,ik),Tk("parallel",UN,Mm,XN),JA.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){JA.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&a(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=m(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}});var YN={type:"axisAreaSelect",event:"axisAreaSelected"};Tu(YN,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Tu("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var jN=x,qN=f,KN=p,$N=Math.min,JN=Math.max,QN=Math.pow,tR=1e4,eR=6,iR=6,nR="globalPan",aR={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},oR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},rR={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},sR=0;Im.prototype={constructor:Im,enableBrush:function(t){return this._brushType&&Am(this),t.brushType&&Tm(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){qN(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function i(t,i){return e(t.__brushOption,i)}function o(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var a=u[e]=null!=i?(l[i].__brushOption=n,l[i]):km(h,Lm(h,n));Em(h,a)}}function r(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return a(n(rR),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Fu(l,t,i,e).add(o).update(o).remove(r).execute(),this},unmount:function(){return this.enableBrush(!1),Bm(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(Im,BS);var lR={mousedown:function(t){if(this._dragging)rv(this,t);else if(!t.target||!t.target.draggable){iv(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=Rm(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(ev(this,t,n),this._dragging){iv(t);var a=av(this,t,n,!1);a&&Vm(this,a)}},mouseup:function(t){rv(this,t)}},uR={lineX:lv(0),lineY:lv(1),rect:{createCover:function(t,e){return Wm(jN(Km,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Fm(t);return Ym(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Hm(t,e,i,n)},updateCommon:Zm,contain:nv},polygon:{createCover:function(t,e){var i=new CM;return i.add(new QT({name:"main",style:Xm(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new JT({name:"main",draggable:!0,drift:jN($m,t,e),ondragend:jN(Vm,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:Qm(t,e,i)})},updateCommon:Zm,contain:nv}},hR=["axisLine","axisTickLabel","axisName"],cR=Eu({type:"parallelAxis",init:function(t,e){cR.superApply(this,"init",arguments),(this._brushController=new Im(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!fv(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new CM,this.group.add(this._axisGroup),t.get("show")){var o=gv(t,e),s=o.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=s.getAxisLayout(h),d=r({strokeContainThreshold:u},c),p=new Uk(t,d);f(hR,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;rr(a,this._axisGroup,g)}}},_refreshBrushController:function(t,e,i,n,a,o){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=Si.create({x:r[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:uv(u),isTargetByCursor:cv(u,o,n),getLinearBrushOtherExtent:hv(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(pv(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,a=p(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}}),dR=5;Eu({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(fR,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),xl(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){f(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(r({type:"parallelAxisExpand"},t))}});var fR={mousedown:function(t){mv(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(mv(this,"click")&&e){var i=[t.offsetX,t.offsetY],n=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2);if(n>dR)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==a.behavior&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&mv(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:!1})}}};Su(NN),VD.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return vv(t,this),mh(t,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,a){t===e&&n.push(i.getRawIndex(a))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var pR=.3,gR=(fl.extend({type:"parallel",init:function(){this._dataGroup=new CM,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=wv(l,s,t,c,h);Sv(e,l,t,d)}function o(e,i){var a=u.getItemGraphicEl(i),o=_v(l,e,c,h);l.setItemGraphicEl(e,a);var r=n&&n.animation===!1?null:t;er(a,{shape:{points:o}},r,e),Sv(a,l,e,d)}function r(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.dimensions,d=bv(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=xv(h,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var i=e.getData(),n=e.coordinateSystem,a=n.dimensions,o=bv(e),r=t.start;r=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*o,e.y+n(r)*o),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(r)*o,e.y-n(r)*o),t.lineTo(s,l)}})),yR=2*Math.PI,xR=(fl.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=Iv(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var o=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,c=(h-u)%yR,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=I;I++){var T=Math.cos(_),A=Math.sin(_);if(f.get("show")){var D=new aA({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-y)+l,y2:A*(h-y)+u},style:S,silent:!0});"auto"===S.stroke&&D.setStyle({stroke:n(I/m)}),s.add(D)}if(g.get("show")){var C=Tv(Sr(I/m*(d-c)+c),g.get("formatter")),L=g.get("distance"),k=n(I/m);s.add(new ZT({style:Uo({},g,{text:C,x:T*(h-y-L)+l,y:A*(h-y-L)+u,textVerticalAlign:-.4>A?"top":A>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(p.get("show")&&I!==m){for(var P=0;v>=P;P++){var T=Math.cos(_),A=Math.sin(_),O=new aA({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-x)+l,y2:A*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:n((I+P/v)/m)}),s.add(O),_+=b}_-=b}else _+=w}},_renderPointer:function(t,e,i,n,a,o,r){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[o,r],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var i=new vR({shape:{angle:o}});ir(i,{shape:{angle:wr(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);er(n,{shape:{angle:wr(c.get(d,e),u,h,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var i=c.getItemModel(e),o=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:br(o.get("width"),a.r),r:br(o.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(wr(c.get(d,e),u,[0,1],!0))),Vo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,i,n,a){var o=t.getData(),r=o.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+br(l[0],a.r),h=a.cy+br(l[1],a.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(r,0),p=n(wr(f,[c,d],[0,1],!0));this.group.add(new ZT({silent:!0,style:Uo({},s,{x:u,y:h,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),u=a.cx+br(l[0],a.r),h=a.cy+br(l[1],a.r),c=br(o.get("width"),a.r),d=br(o.get("height"),a.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(wr(p,[r,s],[0,1],!0));this.group.add(new ZT({silent:!0,style:Uo({},o,{x:u,y:h,text:Tv(p,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Nu({type:"series.funnel",init:function(t){xR.superApply(this,"init",arguments),this.legendVisualProvider=new Wd(y(this.getData,this),y(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(){return IP(this,{coordDimensions:["value"],encodeDefaulter:x(gs,this)})},_defaultLabelLine:function(t){Qn(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=xR.superCall(this,"getDataParams",t),n=e.mapDimension("value"),a=e.getSum(n);return i.percent=a?+(e.get(n,t)/a*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),_R=Av.prototype,wR=["itemStyle","opacity"];_R.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),l=t.getItemModel(e).get(wR);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),ir(n,{style:{opacity:l}},a,e)):er(n,{style:{opacity:l},shape:{points:r.points}},a,e);var u=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(s({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Vo(this)},_R._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=r.label,l=t.getItemVisual(e,"color");er(i,{shape:{points:s.linePoints||s.linePoints}},a,e),er(n,{style:{x:s.x,y:s.y}},a,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");Ho(n.style,n.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!u.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},h(Av,CM);var bR=(fl.extend({type:"funnel",render:function(t){var e=t.getData(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new Av(e,t);e.setItemGraphicEl(t,i),n.add(i)}).update(function(t,a){var o=i.getItemGraphicEl(a);o.updateData(e,t),n.add(o),e.setItemGraphicEl(t,o)}).remove(function(t){var e=i.getItemGraphicEl(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),function(t,e){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),a=t.get("sort"),o=Dv(t,e),r=Cv(i,a),s=[br(t.get("minSize"),o.width),br(t.get("maxSize"),o.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(o.height-d*(i.count()-1))/i.count(),p=o.y,g=function(t,e){var a,r=i.get(n,t)||0,l=wr(r,[u,h],s,!0);switch(c){case"left":a=o.x;break;case"center":a=o.x+(o.width-l)/2;break;case"right":a=o.x+o.width-l}return[[a,e],[a+l,e]]};"ascending"===a&&(f=-f,d=-d,p+=o.height,r=r.reverse());for(var m=0;m=0&&(r[o[s].depth]=new pr(o[s],this,e));if(a&&n){var l=iN(a,n,this,!0,i);return l.data}},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),a=n.data,o=a.source+" -- "+a.target;return n.value&&(o+=" : "+n.value),Gr(o)}if("node"===i){var r=this.getGraph().getNodeByIndex(t),s=r.getLayout().value,l=this.getDataParams(t,i).data.name;if(s)var o=l+" : "+s;return Gr(o)}return SR.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),MR=["itemStyle","opacity"],IR=["lineStyle","opacity"],TR=mo({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()}});Ru({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,a=t.getGraph(),o=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,o.removeAll(),o.attr("position",[r.x,r.y]),a.eachEdge(function(e){var i=new TR;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,a,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),w=x.get("localY"),b=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,a=(null!=w?w*l:y.y)+y.dy,r=(null!=M?M*s:b.x)+T.ty,u=null!=I?I*l:b.y,d=n,f=a*(1-v)+u*v,p=r,g=a*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,a=(null!=w?w*l:y.y)+T.sy,r=null!=M?M*s:b.x,u=(null!=I?I*l:b.y)+T.ty,d=n*(1-v)+r*v,f=a,p=n*v+r*(1-v),g=u),i.setShape({x1:n,y1:a,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}Vo(i,e.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),h.setItemGraphicEl(e.dataIndex,i)}),a.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),a=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new iA({shape:{x:null!=a?a*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();Ho(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),Vo(d,f),o.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"}),u.eachItemGraphicEl(function(e,a){var o=u.getItemModel(a);o.get("draggable")&&(e.drift=function(e,o){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=o,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),o.get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))}),e.off("mouseout").on("mouseout",function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),h.eachItemGraphicEl(function(e,a){var o=h.getItemModel(a);o.get("focusNodeAdjacency")&&(e.off("mouseover").on("mouseover",function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))}),e.off("mouseout").on("mouseout",function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),!this._data&&t.get("animation")&&o.setClipPath(Ev(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var a=this._model.getData(),o=a.graph,r=n.dataIndex,s=a.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=o.getNodeByIndex(r),h=o.getEdgeByIndex(l);if(o.eachNode(function(t){Pv(t,MR,.1)}),o.eachEdge(function(t){Pv(t,IR,.1)}),u){Ov(u,MR);var c=s.get("focusNodeAdjacency");"outEdges"===c?f(u.outEdges,function(t){t.dataIndex<0||(Ov(t,IR),Ov(t.node2,MR))}):"inEdges"===c?f(u.inEdges,function(t){t.dataIndex<0||(Ov(t,IR),Ov(t.node1,MR))}):"allEdges"===c&&f(u.edges,function(t){t.dataIndex<0||(Ov(t,IR),Ov(t.node1,MR),Ov(t.node2,MR))})}h&&(Ov(h,IR),Ov(h.node1,MR),Ov(h.node2,MR))}},unfocusNodeAdjacency:function(){var t=this._model.getGraph();t.eachNode(function(t){Pv(t,MR)}),t.eachEdge(function(t){Pv(t,IR)})}}),Tu({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var AR=function(t,e){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=Nv(t,e);t.layoutInfo=a;var o=a.width,r=a.height,s=t.getGraph(),l=s.nodes,u=s.edges;zv(l);var h=m(l,function(t){return 0===t.getLayout().value}),c=0!==h.length?0:t.get("layoutIterations"),d=t.get("orient"),f=t.get("nodeAlign");Rv(l,u,i,n,o,r,c,d,f)})},DR=function(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes;if(i.length){var n=1/0,a=-1/0;f(i,function(t){var e=t.getLayout().value;n>e&&(n=e),e>a&&(a=e)}),f(i,function(e){var i=new GO({type:"color",mappingMethod:"linear",dataExtent:[n,a],visual:t.get("color")}),o=i.mapValueToVisual(e.getLayout().value),r=e.getModel().get("itemStyle.color");null!=r?e.setVisual("color",r):e.setVisual("color",o)})}})};Cu(AR),Lu(DR);var CR=function(t,e,i,n,a){vk.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};CR.prototype={constructor:CR,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},h(CR,vk),ey.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:ey,_init:function(t){var e=this.dimension,i=new CR(e,Hh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();f(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Wh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=$r({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis(),n=i.orient;return"horizontal"===n?i.contain(i.toLocalCoord(t[0]))&&t[1]>=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=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}},As.register("single",{create:iy,dimensions:ey.prototype.dimensions});var LR=["axisLine","axisTickLabel","axisName"],kR="splitLine",PR=Jk.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=ny(t),r=new Uk(t,o);f(LR,r.add,r),a.add(r.getGroup()),t.get(kR+".show")&&this["_"+kR](t),PR.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),a=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr||_(r))return{point:[]};var s=o.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(p(l.dimensions,function(t){return o.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},RR=f,zR=x,BR=la(),VR=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],o=t,r=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){py(a)&&(a=NR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=py(a),u=o.axesInfo,h=s.axesInfo,c="leave"===n||py(a),d={},f={},p={list:[],map:{}},g={showPointer:zR(sy,f),showTooltip:zR(ly,p)};RR(s.coordSysMap,function(t,e){var i=l||t.containPoint(a);RR(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=dy(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointToData(a)),null!=o&&oy(t,o,g,!1,d)}})});var m={};return RR(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&RR(i.axesInfo,function(e,n){var a=f[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,fy(e),fy(t)))),m[t.key]=o}})}),RR(m,function(t,e){oy(h[e],t,g,!0,d)}),uy(f,h,d),hy(p,a,t,r),cy(h,r,i),d}},GR=(Ou({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),la()),FR=f,WR=Eu({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";gy("axisPointer",i,function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){wy(e.getZr(),"axisPointer"),WR.superApply(this._model,"remove",arguments)},dispose:function(t,e){wy("axisPointer",e),WR.superApply(this._model,"dispose",arguments)}}),HR=la(),ZR=n,UR=y;by.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==o){this._lastValue=a,this._lastStatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=x(Sy,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new CM,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Ay(r,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(a&&n.getBandWidth()>r)return!0;if(o){var s=hd(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=HR(t).pointerEl=new AA[i.type](ZR(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var a=HR(t).labelEl=new iA(ZR(e.label));t.add(a),Iy(a,n)}},updatePointerEl:function(t,e,i){var n=HR(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=HR(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),Iy(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=ur(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ZS(t.event)},onmousedown:UR(this._onHandleDragMove,this,0,0),drift:UR(this._onHandleDragMove,this),ondragend:UR(this._onHandleDragEnd,this)}),i.add(n)),Ay(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(a.getItemStyle(null,s));var l=a.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),xl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){Sy(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Ty(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Ty(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Ty(n)),HR(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]}}},by.prototype.constructor=by,va(by);var XR=by.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=zy(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=Dy(n),c=YR[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=md(r.model,i);Oy(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=md(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Py(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.grid,o=n.getGlobalExtent(!0),r=zy(a,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 u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),YR={line:function(t,e,i){var n=Ey([e,i[0]],[e,i[1]],By(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Ny([e-n/2,i[0]],[n,a],By(t))}}};Jk.registerAxisPointerClass("CartesianAxisPointer",XR),Su(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Mu(HC.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=nd(t,e)}),Tu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},VR);var jR=["x","y"],qR=["width","height"],KR=by.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=Gy(r,1-Vy(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=Dy(n),c=$R[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=ny(i);Oy(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=ny(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Py(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.coordinateSystem,o=Vy(n),r=Gy(a,o),s=t.position;s[o]+=e[o],s[o]=Math.min(r[1],s[o]),s[o]=Math.max(r[0],s[o]);var l=Gy(a,1-o),u=(l[1]+l[0])/2,h=[u,u];return h[o]=s[o],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),$R={line:function(t,e,i){var n=Ey([e,i[0]],[e,i[1]],Vy(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Ny([e-n/2,i[0]],[n,a],Vy(t))}}};Jk.registerAxisPointerClass("SingleAxisPointer",KR),Eu({type:"single"});var JR=2,QR=VD.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(){QR.superApply(this,"init",arguments),this.legendVisualProvider=new Wd(y(this.getData,this),y(this.getRawData,this))},fixData:function(t){var e=t.length,i=pa(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var a=n.length,o=-1,r=-1,s=0;a>s;++s){var l=n[s].dataList.length;l>o&&(o=l,r=s)}for(var u=0;a>u;++u)if(u!==r)for(var h=n[u].name,c=0;o>c;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;f>g;++g){var m=n[u].dataList[g][0];if(m===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],n=i.get("type"),a=m(t.data,function(t){return void 0!==t[2]}),o=this.fixData(a||[]),r=[],s=this.nameMap=B(),l=0,u=0;un;++n)i[n]=n;var a=t.mapDimension("single"),o=pa(i,function(e){return t.get("name",e)}),r=[];return o.buckets.each(function(e,i){e.sort(function(e,i){return t.get(a,e)-t.get(a,i)}),r.push({name:i,indices:e})}),r},getAxisTooltipData:function(t,e){_(t)||(t=t?[t]:[]);for(var i,n=this.getData(),a=this.getLayerSeries(),o=[],r=a.length,s=0;r>s;++s){for(var l=Number.MAX_VALUE,u=-1,h=a[s].indices.length,c=0;h>c;++c){var d=n.get(t[0],a[s].indices[c]),f=Math.abs(d-e);l>=f&&(i=d,l=f,u=a[s].indices[c])}o.push(u)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return(isNaN(n)||null==n)&&(n="-"),Gr(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Ru({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 a.remove(l[i]);for(var u,h=[],d=[],f=o[i].indices,p=0;pn[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:y(function(n){var a=e.dataToRadius(n[0]),o=i.dataToAngle(n[1]),r=t.coordToPoint([a,o]);return r.push(a,o*Math.PI/180),r}),size:y(mx,t)}}},hz=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}},cz=vA,dz=["itemStyle"],fz=["emphasis","itemStyle"],pz=["label"],gz=["emphasis","label"],mz="e\x00\x00",vz={cartesian2d:rz,geo:sz,singleAxis:lz,polar:uz,calendar:hz};VD.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(){return mh(this.getSource(),this)},getDataParams:function(t,e,i){var n=VD.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),fl.extend({type:"custom",_data:null,render:function(t,e,i,n){var a=this._data,o=t.getData(),r=this.group,s=_x(t,o,e,i);o.diff(a).add(function(e){Sx(null,e,s(e,n),t,r,o)}).update(function(e,i){var l=a.getItemGraphicEl(i);Sx(l,e,s(e,n),t,r,o)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=t.get("clip",!0)?Bc(t.coordinateSystem,!1,t):null;l?r.setClipPath(l):r.removeClipPath(),this._data=o},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,a){function o(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var r=e.getData(),s=_x(e,r,i,n),l=t.start;lc?c=f:(d.lastTickCount=a,d.lastAutoInterval=c),c}},h(Gx,vk);var xz=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Vx,this._angleAxis=new Gx,this._radiusAxis.polar=this._angleAxis.polar=this};xz.prototype={type:"polar",axisPointerEnabled:!0,constructor:xz,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),r=Math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=o>l?1:-1;o>l||l>r;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,a=-Math.sin(i)*e+this.cy;return[n,a]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return o*o>=a&&a>=r*r}}}};var _z=JA.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});a(_z.prototype,ik);var wz={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};Tk("angle",_z,Fx,wz.angle),Tk("radius",_z,Fx,wz.radius),Ou({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var bz={dimensions:xz.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var a=new xz(n);a.update=Hx;var o=a.getRadiusAxis(),r=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Zx(o,s),Zx(r,l),Wx(a,t,e),i.push(a),t.coordinateSystem=a,a.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};As.register("polar",bz);var Sz=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];Jk.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,a=i.getRadiusAxis().getExtent(),o=e.getTicksCoords(),r=e.getMinorTicksCoords(),s=p(e.getViewLabels(),function(t){var t=n(t);return t.coord=e.dataToCoord(t.tickValue),t});Yx(s),Yx(o),f(Sz,function(n){!t.get(n+".show")||e.scale.isBlank()&&"axisLine"!==n||this["_"+n](t,i,o,r,a,s)},this)}},_axisLine:function(t,e,i,n,a){var o,r=t.getModel("axisLine.lineStyle"),s=Xx(e),l=s?0:1;o=0===a[l]?new UT({shape:{cx:e.cx,cy:e.cy,r:a[s]},style:r.getLineStyle(),z2:1,silent:!0}):new qT({shape:{cx:e.cx,cy:e.cy,r:a[s],r0:a[l]},style:r.getLineStyle(),z2:1,silent:!0}),o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,n,a){var o=t.getModel("axisTick"),r=(o.get("inside")?-1:1)*o.get("length"),l=a[Xx(e)],u=p(i,function(t){return new aA({shape:Ux(e,[l,l+r],t.coord)})});this.group.add(SA(u,{style:s(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,a){if(n.length){for(var o=t.getModel("axisTick"),r=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*r.get("length"),u=a[Xx(e)],h=[],c=0;cd?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";r&&r[o]&&r[o].textStyle&&(n=new pr(r[o].textStyle,s,s.ecModel));var m=new ZT({silent:Uk.isLabelSilent(t)});this.group.add(m),Uo(m.style,n,{x:c[0],y:c[1],textFill:n.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g}),u&&(m.eventData=Uk.makeAxisEventDataBase(t),m.eventData.targetType="axisLabel",m.eventData.value=i.rawLabel)},this)},_splitLine:function(t,e,i,n,a){var o=t.getModel("splitLine"),r=o.getModel("lineStyle"),l=r.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;ci?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var a=t.getDay();return a=Math.abs((a+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:a,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return e=e||0,0===e?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(r[a[t]]=o[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=$r(r,l);f([0,1],function(t){i(o,t)||(o[t]=u[a[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/Cz)-Math.floor(t[0].time/Cz)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==o)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==o&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(a+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?-s+1:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+a),this.getDateInfo(o)}},$x.dimensions=$x.prototype.dimensions,$x.getDimensionsInfo=$x.prototype.getDimensionsInfo,$x.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var a=new $x(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},As.register("calendar",$x);var Lz=JA.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t){var e=es(t);Lz.superApply(this,"init",arguments),Qx(t,e)},mergeOption:function(t){Lz.superApply(this,"mergeOption",arguments),Qx(this.option,t)}}),kz={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},Pz={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Eu({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),a=i.getOrient();this._renderDayRect(t,n,e),this._renderLines(t,n,a,e),this._renderYearText(t,n,a,e),this._renderMonthText(t,a,e),this._renderWeekText(t,n,a,e)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new iA({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderLines:function(t,e,i,n){function a(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var a=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(a[0]),o._blpoints.push(a[a.length-1]),l&&o._drawSplitline(a,s,n)}var o=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){a(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}a(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,u,i),s,n),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new QT({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],o=0;7>o;o++){var r=n.getNextNDay(e.time,o),s=n.dataToRect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?Wr(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return("left"===n||"right"===n)&&(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new ZT({z2:30});Uo(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];b(a)&&(a=kz[a.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var p=o.getNextNDay(c,f),g=o.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new ZT({z2:30});r(Uo(v.style,a,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Ou({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Eu({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),o=t.getModel("subtextStyle"),r=t.get("textAlign"),s=C(t.get("textBaseline"),t.get("textVerticalAlign")),l=new ZT({style:Uo({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new ZT({style:Uo({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=$r(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new iA({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});var Oz=$D.legend.selector,Ez={all:{type:"all",title:n(Oz.all)},inverse:{type:"inverse",title:n(Oz.inverse)}},Nz=Ou({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){Nz.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){b(t)&&(t={type:t}),e[i]=a(t,Ez[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},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",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});Tu("legendToggleSelect","legendselectchanged",x(t_,"toggleSelected")),Tu("legendAllSelect","legendselectall",x(t_,"allSelect")),Tu("legendInverseSelect","legendinverseselect",x(t_,"inverseSelect")),Tu("legendSelect","legendselected",x(t_,"select")),Tu("legendUnSelect","legendunselected",x(t_,"unSelect"));var Rz=x,zz=f,Bz=CM,Vz=Eu({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Bz),this._backgroundEl,this.group.add(this._selectorGroup=new Bz),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var a=t.get("align"),o=t.get("orient");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===o?"right":"left");var r=t.get("selector",!0),l=t.get("selectorPosition",!0);!r||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderInner(a,t,e,i,r,o,l);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),d=$r(u,h,c),f=this.layoutInner(t,a,d,n,r,l),p=$r(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=i_(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,a,o,r){var s=this.getContentGroup(),l=B(),u=e.get("selectedMode"),h=[]; i.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),zz(e.getData(),function(a,o){var r=a.get("name");if(!this.newlineDisabled&&(""===r||"\n"===r))return void s.add(new Bz({newline:!0}));var c=i.getSeriesByName(r)[0];if(!l.get(r))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol"),v=this._createItem(r,o,a,e,g,m,t,f,p,u);v.on("click",Rz(a_,r,null,n,h)).on("mouseover",Rz(o_,c.name,null,n,h)).on("mouseout",Rz(r_,c.name,null,n,h)),l.set(r,!0)}else i.eachRawSeries(function(i){if(!l.get(r)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(r))return;var c=s.indexOfName(r),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(r,o,a,e,p,null,t,d,f,u);g.on("click",Rz(a_,null,r,n,h)).on("mouseover",Rz(o_,null,r,n,h)).on("mouseout",Rz(r_,null,r,n,h)),l.set(r,!0)}},this)},this),a&&this._createSelector(a,e,n,o,r)},_createSelector:function(t,e,i){function n(t){var n=t.type,o=new ZT({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});a.add(o);var r=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Ho(o.style,o.hoverStyle={},r,s,{defaultText:t.title,isRectText:!1}),Vo(o)}var a=this.getSelectorGroup();zz(t,function(t){n(t)})},_createItem:function(t,e,i,n,a,o,s,l,u,h){var c=n.get("itemWidth"),d=n.get("itemHeight"),f=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),g=n.get("symbolKeepAspect"),m=n.getModel("itemStyle"),v=n.isSelected(t),y=new Bz,x=i.getModel("textStyle"),_=i.get("icon"),w=i.getModel("tooltip"),b=w.parentModel;a=_||a;var S=Jh(a,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(n_(S,a,m,u,p,v)),!_&&o&&(o!==a||"none"===o)){var M=.8*d;"none"===o&&(o="circle");var I=Jh(o,(c-M)/2,(d-M)/2,M,M,v?l:f,null==g?!0:g);y.add(n_(I,o,m,u,p,v))}var T="left"===s?c+5:-5,A=s,D=n.get("formatter"),C=t;"string"==typeof D&&D?C=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(C=D(t)),y.add(new ZT({style:Uo({},x,{text:C,x:T,y:d/2,textFill:v?x.getTextColor():f,textAlign:A,textVerticalAlign:"middle"})}));var L=new iA({shape:y.getBoundingRect(),invisible:!0,tooltip:w.get("show")?r({content:t,formatter:b.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},w.option):null});return y.add(L),y.eachChild(function(t){t.silent=!0}),L.silent=!h,this.getContentGroup().add(y),Vo(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,a,o){var r=this.getContentGroup(),s=this.getSelectorGroup();qA(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(a){qA("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),Gz=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var v=t.get("pageButtonPosition",!0);"end"===v?g[n]+=i[a]-c[a]:p[n]+=c[a]+m}g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[a]=d?i[a]:h[a],y[o]=Math.max(h[o],c[o]),y[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[a],d){var x={x:0,y:0};x[a]=Math.max(i[a]-c[a]-m,0),x[o]=y[o],l.setClipPath(new iA({shape:x})),l.__rectSize=x[a]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&er(s,{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 a=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=a?"pointer":"default")});var n=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,r=null!=o?o+1:0,s=e.pageCount;n&&a&&n.setStyle("text",b(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+o}var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),o=this._containerGroup.__rectSize,r=t.getOrient().index,s=Hz[r],l=Zz[r],u=this._findTargetItemIndex(n),h=a.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:a.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;d>=m;++m)x=e(h[m]),(!x&&y.e>v.s+o||x&&!i(x,v.s))&&(v=y.i>v.i?y:x,v&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount)),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)x=e(h[m]),x&&i(y,x.s)||!(v.i=0;){var l=a.indexOf(r),u=a.substr(s+o.length,l-s-o.length);n["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},a=a.substr(l+1),s=a.indexOf("{marker")}this.el=new ZT({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var h=this;this.el.on("mouseover",function(){h._enterable&&(clearTimeout(h._hideTimeout),h._show=!0),h._inContent=!0}),this.el.on("mouseout",function(){h._enterable&&h._show&&h.hideLater(h._hideDelay),h._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),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},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var Kz=y,$z=f,Jz=br,Qz=new iA({shape:{x:-1,y:-1,width:2,height:2}});Eu({type:"tooltip",init:function(t,e){if(!mS.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=fa(n);var a;"html"===this._renderMode?(a=new c_(e.getDom(),e),this._newLine="
"):(a=new d_(e),this._newLine="\n"),this._tooltipContent=a}},render:function(t,e,i){if(!mS.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");gy("itemTooltip",this._api,Kz(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(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!mS.node){var a=p_(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=Qz;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},a)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=NR(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},a)}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:{}},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(p_(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,o=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=o&&null!=r){var s=e.getSeriesByIndex(a);if(s){var l=s.getData(),t=f_([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,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 a=t.dataByCoordSys;a&&a.length?this._showAxisTooltip(a,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,o=[e.offsetX,e.offsetY],r=[],s=[],l=f_([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};$z(t,function(t){$z(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var l=ky(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Xh(e.axis,n),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var m=g.markers;a(c,m)}else p=g;o.push(p)}});var d=l;r.push("html"!==u?o.join(h):(d?Gr(d)+h:"")+o.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),o[0],o[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),r=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=r.getData(),h=f_([u.getItemModel(s),r,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var a=n;n={content:a,formatter:a}}var o=new pr(n,this._tooltipModel,this._ecModel),r=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,r,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,o,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=Fr(h,i,!0);else if("function"==typeof h){var d=Kz(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,a,o,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,a,o,u,i,s)}},_updatePosition:function(t,e,i,n,a,o,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=a.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),_(e))i=Jz(e[0],s),n=Jz(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=$r(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=v_(e,d,u);i=p[0],n=p[1]}else{var p=g_(i,n,a,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=y_(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=y_(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=m_(i,n,a,s,l);i=p[0],n=p[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&$z(e,function(e,n){var a=e.dataByAxis||{},o=t[n]||{},r=o.dataByAxis||[];i&=a.length===r.length,i&&$z(a,function(t,e){var n=r[e]||{},a=t.seriesDataIndices||[],o=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===o.length,i&&$z(a,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){mS.node||(this._tooltipContent.hide(),wy("itemTooltip",e))}}),Tu({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Tu({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var tB=Br,eB=Gr,iB=Ou({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(mS.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var a=this.constructor,o=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[o];return i&&i.data?(s?s._mergeOption(i,e,!0):(n&&x_(i),f(i.data,function(t){t instanceof Array?(x_(t[0]),x_(t[1])):x_(t)}),s=new a(i,this,e),r(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)?p(i,tB).join(", "):tB(i),a=e.getName(t),o=eB(this.name);return(null!=i||a)&&(o+="
"),a&&(o+=eB(a),null!=i&&(o+=" : ")),null!=i&&(o+=eB(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});c(iB,ND),iB.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var nB=u,aB=x,oB={min:aB(b_,"min"),max:aB(b_,"max"),average:aB(b_,"average")},rB=Eu({type:"marker",init:function(){this.markerGroupMap=B()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var a=this.type+"Model";e.eachSeries(function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});rB.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(C_(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new wd),u=L_(a,t,e);e.setData(u),C_(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),o=w(n),s=w(a);if(o||s){var l=e.getRawValue(t),h=e.getDataParams(t);o&&(n=n(l,h)),s&&(a=a(l,h))}u.setItemVisual(t,{symbol:n,symbolSize:a,color:i.get("itemStyle.color")||r.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Su(function(t){t.markPoint=t.markPoint||{}}),iB.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var sB=function(t,e,i,o){var s=t.getData(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xAxis||null!=o.yAxis)){var u,h;if(null!=o.yAxis||null!=o.xAxis)u=e.getAxis(null!=o.yAxis?"y":"x"),h=D(o.yAxis,o.xAxis);else{var c=M_(o,s,e,t);u=c.valueAxis;var d=gh(s,c.valueDataDim);h=D_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,o=[g,m,{type:l,valueIndex:o.valueIndex,value:h}]}return o=[S_(t,o[0]),S_(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};rB.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,o=e.__to;a.each(function(e){E_(a,e,!0,t,i),E_(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[a.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function a(e,i,a){var o=e.getItemModel(i);E_(e,i,a,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||g[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new zg);this.group.add(u.group);var h=N_(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){a(c,t,!0),a(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Su(function(t){t.markLine=t.markLine||{}}),iB.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var lB=function(t,e,i,n){var a=S_(t,n[0]),r=S_(t,n[1]),s=D,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},uB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];rB.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var a=p(uB,function(a){return V_(n,e,a,t,i)});n.setItemLayout(e,a);var o=n.getItemGraphicEl(e);o.setShape("points",a)})}},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,{group:new CM});this.group.add(u.group),u.__keep=!0;var h=G_(a,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,p(uB,function(i){return V_(h,e,i,t,n)})),h.setItemVisual(e,{color:r.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new JT({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);er(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),a=n.getModel("label"),o=n.getModel("emphasis.label"),r=h.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle").getItemStyle(),{fill:oi(r,.4),stroke:r})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Ho(t.style,t.hoverStyle,a,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),Vo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Su(function(t){t.markArea=t.markArea||{}});var hB=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&F_(t)})};JA.registerSubTypeDefaulter("timeline",function(){return"slider"}),Tu({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),s({currentIndex:i.option.currentIndex},t)}),Tu({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var cB=JA.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(){cB.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,a=this._names=[];if("category"===i){var o=[];f(e,function(t,e){var i,r=ta(t);S(t)?(i=n(t),i.value=e):i=e,o.push(i),b(r)||null!=r&&!isNaN(r)||(r=""),a.push(r+"")}),e=o}var r={category:"ordinal",time:"time"}[i]||"number",s=this._data=new bL([{name:"value",type:r}],this);s.initData(e,a)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}}),dB=cB.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});c(dB,ND);var fB=GD.extend({type:"timeline"}),pB=function(t,e,i,n){vk.call(this,t,e,i),this.type=n||"value",this.model=null};pB.prototype={constructor:pB,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(pB,vk);var gB=y,mB=f,vB=Math.PI;fB.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),r=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Gr(r.scale.getLabel(t))},mB(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,a,r,t)},this),this._renderAxisLabel(n,o,r,t),this._position(n,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll() },dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=Z_(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:vB/2},l="vertical"===n?a.height:a.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*vB/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:a,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||o[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}var a=this._mainGroup,o=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var s=Le(),l=r.x,u=r.y+r.height;Ee(s,s,[-l,-u]),Ne(s,s,-vB/2),Ee(s,s,[l,u]),r=r.clone(),r.applyTransform(s)}var h=i(r),c=i(a.getBoundingRect()),d=i(o.getBoundingRect()),f=a.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}a.attr("position",f),o.attr("position",p),a.rotation=o.rotation=t.rotation,e(a),e(o)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=Hh(e,n);a.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var o=i.getDataExtent("value");a.setExtent(o[0],o[1]),a.niceTicks();var r=new pB("value",a,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new CM;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new aA({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),o=i.scale.getTicks();mB(o,function(t){var o=i.dataToCoord(t),r=a.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[o,0],onclick:gB(this._changeTimeline,this,t)},h=X_(r,s,e,u);Vo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var a=i.getLabelModel();if(a.get("show")){var o=n.getData(),r=i.getViewLabels();mB(r,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new ZT({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:gB(this._changeTimeline,this,a),silent:!1});Uo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Vo(h,Uo({},l))},this)}},_renderControl:function(t,e,i,n){function a(t,i,a,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:a},d=U_(n,i,u,c);e.add(d),Vo(d,l)}}var o=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-o/2,o,o],h=n.getPlayState(),c=n.get("inverse",!0);a(t.nextBtnPosition,"controlStyle.nextIcon",gB(this._changeTimeline,this,c?"-":"+")),a(t.prevBtnPosition,"controlStyle.prevIcon",gB(this._changeTimeline,this,c?"+":"-")),a(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),gB(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),o=n.getCurrentIndex(),r=a.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=gB(s._handlePointerDrag,s),t.ondragend=gB(s._handlePointerDragend,s),Y_(t,o,i,n,!0)},onUpdate:function(t){Y_(t,o,i,n)}};this._currentPointer=X_(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,a=Mr(n.getExtent().slice());i>a[1]&&(i=a[1]),is&&(n=s,e=o)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Su(hB),JA.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var yB=["x","y","z","radius","angle","single"],xB=["cartesian2d","polar","singleAxis"],_B=q_(yB,["axisIndex","axis","index","id"]),wB=f,bB=Mr,SB=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};SB.prototype={constructor:SB,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(j_(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.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,a=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var r;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(r=t)}),r},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,i,n,a){var r=a?"Span":"ValueSpan";zN(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=wr(t[s],i,n,!0),a&&(e[s]=o.parse(e[s]))}var i,n=this._dataExtent,a=this.getAxisModel(),o=a.axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];wB(["start","end"],function(e,a){var h=t[e],c=t[e+"Value"];"percent"===r[a]?(null==h&&(h=s[a]),c=o.parse(wr(h,s,n))):(i=!0,c=null==c?n[a]:o.parse(c),h=wr(c,n,s)),u[a]=c,l[a]=h}),bB(u),bB(l);var h=this._minMaxSpan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=$_(this,this._dimName,e),tw(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,Q_(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Q_(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(),a=t.get("filterMode"),o=this._valueWindow;"none"!==a&&wB(n,function(t){var n=t.getData(),r=n.mapDimension(i,!0);r.length&&("weakFilter"===a?n.filterSelf(function(t){for(var e,i,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(e=!0),c&&(i=!0)}return a&&e&&i}):wB(r,function(i){if("empty"===a)t.setData(n=n.map(i,function(t){return e(t)?t:0/0}));else{var r={};r[i]=o,n.selectRange(r)}}),wB(r,function(t){n.setApproximateExtent(o,t)}))})}}};var MB=f,IB=_B,TB=Ou({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=ew(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=ew(t);a(this.option,t,!0),a(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;mS.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),iw(this,t);var i=this.settledOption;MB([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[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,a){var o=this.dependentModels[e.axis][i],r=o.__dzAxisProxy||(o.__dzAxisProxy=new SB(e.name,i,this,a));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();IB(function(e){var i=e.axisIndex;t[i]=Jn(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;IB(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 a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):MB(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&IB(function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;r>o;o++)"category"===a[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")&&IB(function(e){var n=i[e.axisIndex],a=t.get(e.axisIndex),o=t.get(e.axisId),r=t.ecModel.queryComponents({mainType:e.axis,index:a,id:o})[0];a=r.componentIndex,u(n,a)<0&&n.push(a)})},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 IB(function(n){var a=t.get(n.axisIndex),o=this.dependentModels[n.axis][a];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 IB(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;IB(function(n){MB(this.get(n.axisIndex),function(a){t.call(e,n,a,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){var e=this.option,i=this.settledOption;MB([["start","startValue"],["end","endValue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),iw(this,t)},setCalculatedRange:function(t){var e=this.option;MB(["start","startValue","end","endValue"],function(i){e[i]=t[i]})},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()}}),AB=GD.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 a,o=0;o0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:CB(t,o,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var m=this.dataZoomModel;this._displayables.barGroup.add(new JT({shape:{points:c},style:s({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new QT({shape:{points:d},style:m.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(a,o){var r=t.getAxisProxy(a.name,o).getTargetSeriesModels();f(r,function(t){if(!(i||e!==!0&&u(VB,t.get("type"))<0)){var r,s=n.getComponent(a.axis,o).axis,l=nw(a.name),h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,o=this.dataZoomModel;n.add(t.filler=new DB({draggable:!0,cursor:aw(this._orient),drift:kB(this._onDragMove,this,"all"),ondragstart:kB(this._showDataInfo,this,!0),ondragend:kB(this._onDragEnd,this),onmouseover:kB(this._showDataInfo,this,!0),onmouseout:kB(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new DB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:EB,fill:"rgba(0,0,0,0)"}})),PB([0,1],function(t){var a=ur(o.get("handleIcon"),{cursor:aw(this._orient),draggable:!0,drift:kB(this._onDragMove,this,t),ondragend:kB(this._onDragEnd,this),onmouseover:kB(this._showDataInfo,this,!0),onmouseout:kB(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getBoundingRect();this._handleHeight=br(o.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,a.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textStyleModel;this.group.add(i[t]=new ZT({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=[CB(t[0],[0,100],e,!0),CB(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];zN(e,n,a,i.get("zoomLock")?"all":t,null!=o.minSpan?CB(o.minSpan,r,a,!0):null,null!=o.maxSpan?CB(o.maxSpan,r,a,!0):null);var s=this._range,l=this._range=LB([CB(n[0],a,r,!0),CB(n[1],a,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=LB(i.slice()),a=this._size;PB([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=nr(n.handles[t].parent,this.group),i=or(0===t?"right":"left",e),s=this._handleWidth/2+BB,l=ar([c[t]+(0===t?-s:s),this._size[1]/2],e);a[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===RB?"middle":i,textAlign:o===RB?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=LB(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");(null==a||"auto"===a)&&(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,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,n){this._dragging=!0,ZS(n.event);var a=this._displayables.barGroup.getLocalTransform(),o=ar([e,i],a,!0),r=this._updateInterval(t,o[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),r&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&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,a=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-a);this._updateView(),o&&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(PB(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}});Mu({getTargetSeries:function(t){var e=B();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var a=n.getAxisProxy(t.name,i);f(a.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),Tu("dataZoom",function(t,e){var i=K_(y(e.eachComponent,e,"dataZoom"),_B,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})})}),TB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var FB="\x00_ec_dataZoom_roams",WB=y,HB=AB.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){HB.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var a=p(e,function(t){return sw(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollMove"],function(t){r[t]=WB(ZB[t],this,e,n)},this),ow(i,{coordId:sw(o),allCoordIds:a,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){rw(this.api,this.dataZoomModel.id),HB.superApply(this,"dispose",arguments),this._range=null}}),ZB={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axisModels[0];if(r){var s=UB[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return zN(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:fw(function(t,e,i,n,a,o){var r=UB[n]([o.oldX,o.oldY],[o.newX,o.newY],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:fw(function(t,e,i,n,a,o){var r=UB[n]([0,0],[o.scrollDelta,o.scrollDelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrollDelta})},UB={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=o.inverse?-1:1),r},singleAxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=o.inverse?-1:1),s}},XB=["rect","polygon","keep","clear"],YB=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var a=t&&t.toolbox;_(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),pw(s),e&&!s.length&&s.push.apply(s,XB)}},jB=f,qB={lineX:_w(0),lineY:_w(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&nc(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var a=t.x,o=t.y,r=t.width,s=t.height,l=n[0];return nc(n,a,o)||nc(n,a+r,o)||nc(n,a,o+s)||nc(n,a+r,o+s)||Si.create(t).contain(l[0],l[1])||hr(a,o,a+r,o,n)||hr(a,o,a,o+s,n)||hr(a+r,o,a+r,o+s,n)||hr(a,o+s,a+r,o+s,n)?!0:void 0}}},KB=f,$B=u,JB=x,QB=["dataToPoint","pointToData"],tV=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],eV=bw.prototype;eV.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=oV[t.brushType](0,i,e);t.__rangeOffset={offset:rV[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},eV.matchOutputRanges=function(t,e,i){KB(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var a=oV[t.brushType](1,n,t.range);i(t,a.values,n,e)})},this)},eV.setInputRanges=function(t,e){KB(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=oV[t.brushType](0,i.coordSys,t.coordRange),a=t.__rangeOffset;t.range=a?rV[t.brushType](n.values,a.offset,Aw(n.xyMinMax,a.xyMinMax)):n.values}},this)},eV.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:uv(n),isTargetByCursor:cv(n,t,i.coordSysModel),getLinearBrushOtherExtent:hv(n)}})},eV.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&$B(n.coordSyses,e.coordinateSystem)>=0},eV.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Mw(e,t),a=0;a=0||$B(n,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:aV.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){KB(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:aV.geo})})}},nV=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],aV={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(nr(t)),e}},oV={lineX:JB(Iw,0),lineY:JB(Iw,1),rect:function(t,e,i){var n=e[QB[t]]([i[0][0],i[1][0]]),a=e[QB[t]]([i[0][1],i[1][1]]),o=[Sw([n[0],a[0]]),Sw([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=p(i,function(i){var a=e[QB[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a});return{values:a,xyMinMax:n}}},rV={lineX:JB(Tw,0),lineY:JB(Tw,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},sV=["inBrush","outOfBrush"],lV="__ecBrushSelect",uV="__ecInBrushSelectEvent",hV=HC.VISUAL.BRUSH;Cu(hV,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1});var n=e.brushTargetManager=new bw(e.option,t);n.setInputRanges(e.areas,t)})}),Lu(hV,function(t,e,i){var a,o,r=[];t.eachComponent({mainType:"brush"},function(e,i){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,a){var o=Pw(i);if(o&&!Ow(e,n)&&(f(b,function(n){o[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&a.push(n),w|=u(a)}),l(n)&&u(a))){var r=i.getData();r.each(function(t){kw(o,a,r,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:i,brushName:e.name,areas:n(e.areas),selected:[]};r.push(d);var g=e.option,m=g.brushLink,v=[],y=[],x=[],w=0;i||(a=g.throttleType,o=g.throttleDelay);var b=p(e.areas,function(t){return Ew(s({boundingRect:cV[t.brushType](t)},t))}),S=mw(e.option,sV,function(t){t.mappingMethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=x[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(i);var n=Pw(t),a=x[e],o=t.getData(),r=l(e)?function(t){return y[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return kw(n,a,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(a))&&yw(sV,S,o,r)})}),Cw(e,a,o,r,i)});{var cV={lineX:G,lineY:G,rect:function(t){return Nw(t.range) },polygon:function(t){for(var e,i=t.range,n=0,a=i.length;a>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&Nw(e)}},dV=["#ddd"];Ou({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&vw(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:dV},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return Rw(this.option,t)},this))},setBrushOption:function(t){this.brushOption=Rw(this.option,t),this.brushType=this.brushOption.brushType}})}Eu({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Im(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,zw.apply(this,arguments)},updateTransform:zw,updateView:zw,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n(t),$from:i})}}),Tu({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Tu({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),Tu({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var fV={},pV=$D.toolbox.brush;Gw.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:n(pV.title)};var gV=Gw.prototype;gV.render=gV.updateView=function(t,e){var i,n,a;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,n=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=n,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===n:"clear"===e?a:e===i)?"emphasis":"normal")})},gV.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},gV.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},Bw("brush",Gw),Su(YB);var mV=f,vV=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),mV(e,function(t){if(t){Fw(t,"splitList")&&!Fw(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&mV(e,function(t){S(t)&&(Fw(t,"start")&&!Fw(t,"min")&&(t.min=t.start),Fw(t,"end")&&!Fw(t,"max")&&(t.max=t.end))})}})};JA.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var yV=HC.VISUAL.COMPONENT;Lu(yV,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(xw(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Lu(yV,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var a=e.getVisualMeta(y(Ww,null,t,e))||{stops:[],outerColors:[]},o=e.getDataDimension(i),r=i.getDimensionInfo(o);null!=r&&(a.dimension=r.index,n.push(a))}}),t.getData().setVisual("visualMeta",n)}});var xV={get:function(t,e,i){var a=n((_V[t]||{})[e]);return i&&_(a)?a[a.length-1]:a}},_V={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]}},wV=GO.mapVisual,bV=GO.eachVisual,SV=_,MV=f,IV=Mr,TV=wr,AV=G,DV=Ou({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;mS.canvasSupported||(i.realtime=!1),!e&&vw(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=mw(this.option.controller,e,t),this.targetVisuals=mw(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=Jn(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 a,o,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),a=!0),o=e?t:a?[n(t[0]),n(t[1])]:n(t),b(u)?u.replace("{value}",a?o[0]:o).replace("{value2}",a?o[1]:o):w(u)?a?u(t[0],t[1]):u(t):a?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=IV([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){SV(r.color)&&!t.inRange&&(t.inRange={color:r.color.slice().reverse()}),t.inRange=t.inRange||{color:o.get("gradientColor")},MV(this.stateList,function(e){var i=t[e];if(b(i)){var n=xV.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},MV(n,function(t,e){if(GO.isValidType(e)){var i=xV.get(e,"inactive",h);null!=i&&(a[e]=i,"color"!==e||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,a=this.get("inactiveColor");MV(this.stateList,function(o){var r=this.itemSize,s=t[o];s||(s=t[o]={color:h?a:[a]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?r[0]:[r[0],r[0]])),s.symbol=wV(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;bV(l,function(t){t>u&&(u=t)}),s.symbolSize=wV(l,function(t){return TV(t,[0,u],[0,r[0]],!0)})}},this)}var o=this.ecModel,r=this.option,s={inRange:r.inRange,outOfRange:r.outOfRange},l=r.target||(r.target={}),u=r.controller||(r.controller={});a(l,s),a(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:AV,getValueState:AV,getVisualMeta:AV}),CV=[20,140],LV=DV.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(){LV.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){LV.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=CV[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=CV[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(){DV.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=Mr((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=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){a.push({value:e,color:t(e,i)})}for(var i=Hw(this,"outOfRange",this.getExtent()),n=Hw(this,"inRange",this.option.range.slice()),a=[],o=0,r=0,s=n.length,l=i.length;l>r&&(!n.length||i[r]<=n[0]);r++)i[r]o;o++,u=0)u&&a.length&&e(n[o],"outOfRange"),e(n[o],"inRange");for(var u=1;l>r;r++)(!n.length||n[n.length-1]o;o++){var r=t[0]+a*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"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 CM("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,a=i.handleThumbs,o=i.handleLabels;OV([0,1],function(r){var s=a[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=ar(i.handleLabelPoints[r],nr(s,this.group));o[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=PV(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",jw(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=ar(u.indicatorLabelPoint,nr(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i?i:"")+a.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,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]=EV(NV(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 a=[0,n[1]],o=i.getExtent();t=EV(NV(a[0],t),a[1]);var r=qw(i,o,a),s=[t-r,t+r],l=PV(t,a,o,!0),u=[PV(s[0],a,o,!0),PV(s[1],a,o,!0)];s[0]a[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):1/0===u[1]?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||Kw(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=ra(h,c);this._dispatchHighDown("downplay",Uw(d[0],i)),this._dispatchHighDown("highlight",Uw(d[1],i))}},_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 a=n.getData(e.dataType),o=a.get(i.getDataDimension(a),e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_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",Uw(t,this.visualMapModel)),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 a=nr(e,n?null:this.group);return AA[_(t)?"applyTransform":"transformDirection"](t,a,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()}}),VV={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Tu(VV,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Su(vV);{var GV=DV.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){GV.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();FV[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(a)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(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=GO.listVisualTypes(),a=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]=xV.get(n,"inRange"===t?"active":"inactive",a)})},this),DV.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,f(n,function(t){var e=this.getSelectedMapKey(t);a.hasOwnProperty(e)||(a[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);a[e]&&(o?a[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=GO.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=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){var a=GO.findPieceIndex(e,this._pieceList);a===t&&n.push(i)},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 r=a.getRepresentValue({interval:e});o||(o=a.getValueState(r));var s=t(r,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=[],a=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),r=o[o.length-1].interval[1],1/0!==r&&o.push({interval:[r,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}}}}),FV={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;l>r;s+=o){var u=r===a-1?n[1]:s+o;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),Rr(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),Jw(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 a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(r[0]=0),u[1]&&o[0]===-1/0&&(r[1]=0),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=GO.retrieveVisuals(t),e.push(n)},this),Jw(t,e),Rr(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)}};kV.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var a=t.piece,u=new CM;u.onclick=y(this._onItemClick,this,a),this._enableHoverLink(u,t.indexInModelPieceList);var h=i.getRepresentValue(a);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new ZT({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:a.text,textVerticalAlign:"middle",textAlign:s,textFont:o,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),r=a.getTextColor(),s=this._getItemAlign(),l=i.itemSize,u=this._getViewData(),h=u.endsText,c=D(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),qA(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:Uw(i.findTargetDataIndices(e),i)})}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 Zw(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var o=new CM,r=this.visualMapModel.textStyleModel;o.add(new ZT({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Jh(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,a=n(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(a[o]=!0,f(a,function(t,e){a[e]=e===o})):a[o]=!a[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}})}Su(vV);var WV=Ou({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){WV.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=Vw(e);i&&a(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});Eu({type:"toolbox",render:function(t,e,i,n){function a(a,r){var s,l=c[a],d=c[r],f=u[l],p=new pr(f,t,t.ecModel);if(n&&null!=n.newTitle&&(f.title=n.newTitle),l&&!d){if(Qw(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=Vw(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(o(p,s,l),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function o(n,a,o){var u=n.getModel("iconStyle"),h=n.getModel("emphasis.iconStyle"),c=a.getIcons?a.getIcons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var m=n.iconPaths={};f(c,function(o,c){var f=ur(o,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle(),f.setStyle({text:d[c],textAlign:h.get("textAlign"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding"),textFill:null});var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",r({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Vo(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var e=h.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({textFill:h.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:h.get("textBackgroundColor"),textPosition:h.get("textPosition")||i})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(n.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(a.onclick,a,e,i,c)),m[c]=f})}var s=this.group;if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new Fu(this._featureNames||[],c).add(a).update(a).remove(x(a,null)).execute(),this._featureNames=c,e_(s,t,i),s.add(i_(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var a=Hi(e,on(n)),o=t.position[0]+s.position[0],r=t.position[1]+s.position[1]+l,u=!1; r+a.height>i.getHeight()&&(n.textPosition="top",u=!0);var h=u?-5-a.height:l+8;o+a.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):o-a.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var HV=$D.toolbox.saveAsImage;tb.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:HV.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:HV.lang.slice()},tb.prototype.unusable=!mS.canvasSupported;var ZV=tb.prototype;ZV.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||mS.browser.ie||mS.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(o.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var h=i.get("lang"),c='',d=window.open();d.document.write(c)}else{var f=document.createElement("a");f.download=n+"."+a,f.target="_blank",f.href=o;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});f.dispatchEvent(p)}},Bw("saveAsImage",tb);var UV=$D.toolbox.magicType,XV="__ec_magicType_stack__";eb.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:n(UV.title),option:{},seriesIndex:{}};var YV=eb.prototype;YV.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var jV={line:function(t,e,i,n){return"bar"===t?a({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?a({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){var o=i.get("stack")===XV;return"line"===t||"bar"===t?(n.setIconStatus("stack",o?"normal":"emphasis"),a({id:e,stack:o?"":XV},n.get("option.stack")||{},!0)):void 0}},qV=[["line","bar"],["stack"]];YV.onclick=function(t,e,i){var o=this.model,r=o.get("seriesIndex."+i);if(jV[i]){var l={series:[]},h=function(e){var n=e.subType,a=e.id,r=jV[i](n,a,e,o);r&&(s(r,e.option),l.series.push(r));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;l[d]=l[d]||[];for(var g=0;p>=g;g++)l[d][p]=l[d][p]||{};l[d][p].boundaryGap="bar"===i}}};f(qV,function(t){u(t,i)>=0&&f(t,function(t){o.setIconStatus(t,"normal")})}),o.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},h);var c;if("stack"===i){var d=l.series&&l.series[0]&&l.series[0].stack===XV;c=d?a({stack:UV.title.tiled},UV.title):n(UV.title)}e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:c})}},Tu({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Bw("magicType",eb);var KV=$D.toolbox.dataView,$V=new Array(60).join("-"),JV=" ",QV=new RegExp("["+JV+"]+","g");cb.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n(KV.title),lang:n(KV.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},cb.prototype.onclick=function(t,e){function i(){n.removeChild(o),x._dom=null}var n=e.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=a.get("lang")||[];r.innerHTML=s[0]||a.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=a.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=a.get("optionToContent"),c=a.get("contentToOption"),d=ob(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:T(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=a.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=a.get("textColor"),u.style.borderColor=a.get("textareaBorderColor"),u.style.backgroundColor=a.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var x=this;_e(v,"click",i),_e(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):hb(u.value,p)}catch(n){throw i(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!a.get("readOnly")&&g.appendChild(y),g.appendChild(v),o.appendChild(r),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},cb.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},cb.prototype.dispose=function(t,e){this.remove(t,e)},Bw("dataView",cb),Tu({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];f(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var a=n.get("data");i.push({name:t.name,data:db(t.data,a)})}else i.push(r({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var tG=f,eG="\x00_ec_hist_store";TB.extend({type:"dataZoom.select"}),AB.extend({type:"dataZoom.select"});var iG=$D.toolbox.dataZoom,nG=f,aG="\x00_ec_\x00toolbox-dataZoom_";yb.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:n(iG.title)};var oG=yb.prototype;oG.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,wb(t,e,this,n,i),_b(t,e)},oG.onclick=function(t,e,i){rG[i].call(this)},oG.remove=function(){this._brushController.unmount()},oG.dispose=function(){this._brushController.dispose()};var rG={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(pb(this.ecModel))}};oG._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,o),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=zN(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(a[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){var a=i.getAxisModel(t,e.componentIndex);a&&(n=i)}),n}if(e.isEnd&&t.length){var a={},o=this.ecModel;this._brushController.updateCovers([]);var r=new bw(xb(this.model.option),o,{include:["grid"]});r.matchOutputRanges(t,o,function(t,e,n){if("cartesian2d"===n.type){var a=t.brushType;"rect"===a?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[a],n,e)}}),fb(o,a),this._dispatchZoomAction(a)}},oG._dispatchZoomAction=function(t){var e=[];nG(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Bw("dataZoom",yb),Su(function(t){function e(t,e){if(e){var a=t+"Index",o=e[a];null==o||"all"===o||_(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(i,r){if(null==o||"all"===o||-1!==u(o,r)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:aG+t+r};s[a]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),nG(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);_(n)||(t.dataZoom=n=[n]);var a=t.toolbox;if(a&&(_(a)&&(a=a[0]),a&&a.feature)){var o=a.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}});var sG=$D.toolbox.restore;bb.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:sG.title};var lG=bb.prototype;lG.onclick=function(t,e){gb(t),e.dispatchAction({type:"restore",from:this.uid})},Bw("restore",bb),Tu({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var uG={path:null,compoundPath:null,group:CM,image:Tn,text:ZT};Su(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var hG=Ou({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,hG.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var r=ia(a,o);na(r);var s=this._elOptionsToUpdate=[];f(r,function(t,e){var i=t.option;i&&(s.push(i),Ab(t,i),Db(a,e,i),Cb(a[e],i))},this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Eu({type:"graphic",init:function(){this._elMap=B(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(e){var a=e.$action,o=e.id,r=i.get(o),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=Ib(e);a&&"merge"!==a?"replace"===a?(Mb(r,i),Sb(o,l,h,i)):"remove"===a&&Mb(r,i):r?r.attr(h):Sb(o,l,h,i);var c=i.get(o);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Lb(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,o=e.getWidth(),r=e.getHeight(),s=0;s=0;s--){var l=i[s],u=a.get(l.id);if(u){var h=u.parent,d=h===n?{width:o,height:r}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Jr(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Mb(e,t)}),this._elMap=B()},dispose:function(){this._clear()}});var cG,dG="urn:schemas-microsoft-com:vml",fG="undefined"==typeof window?null:window,pG=!1,gG=fG&&fG.document;if(gG&&!mS.canvasSupported)try{!gG.namespaces.zrvml&&gG.namespaces.add("zrvml",dG),cG=function(t){return gG.createElement("')}}catch(mG){cG=function(t){return gG.createElement("<"+t+' xmlns="'+dG+'" class="zrvml">')}}var vG=xT.CMD,yG=Math.round,xG=Math.sqrt,_G=Math.abs,wG=Math.cos,bG=Math.sin,SG=Math.max;if(!mS.canvasSupported){var MG=",",IG="progid:DXImageTransform.Microsoft",TG=21600,AG=TG/2,DG=1e5,CG=1e3,LG=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=TG+","+TG,t.coordorigin="0,0"},kG=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},PG=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},OG=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},EG=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},NG=function(t,e,i){return(parseFloat(t)||0)*DG+(parseFloat(e)||0)*CG+i},RG=bn,zG=function(t,e,i){var n=$e(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=PG(n[0],n[1],n[2]),t.opacity=i*n[3])},BG=function(t){var e=$e(t);return[PG(e[0],e[1],e[2]),e[3]]},VG=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof uA){var a,o=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){a="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(oe(f,f,d),oe(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];o=180*Math.atan2(g,m)/Math.PI,0>o&&(o+=360),1e-6>o&&(o=0)}else{a="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&oe(f,f,d),y/=v[0]*TG,x/=v[1]*TG;var _=SG(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;b>I;I++){var T=w[I],A=BG(T.color);M.push(T.offset*l+s+" "+A[0]),(0===I||I===b-1)&&S.push(A)}if(b>=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=o,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===a&&(t.focusposition=r.join(","))}else zG(t,n,e.opacity)},GG=function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof uA||zG(t,e.stroke,e.opacity)},FG=function(t,e,i,n){var a="fill"===e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof uA&&EG(t,o),o||(o=kb(e)),a?VG(o,i,n):GG(o,i),OG(t,o)):(t[a?"filled":"stroked"]="false",EG(t,o))},WG=[[],[],[]],HG=function(t,e){var i,n,a,o,r,s,l=vG.M,u=vG.C,h=vG.L,c=vG.A,d=vG.Q,f=[],p=t.data,g=t.len();for(o=0;g>o;){switch(a=p[o++],n="",i=0,a){case l:n=" m ",i=1,r=p[o++],s=p[o++],WG[0][0]=r,WG[0][1]=s;break;case h:n=" l ",i=1,r=p[o++],s=p[o++],WG[0][0]=r,WG[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[o++],x=p[o++],_=p[o++],w=p[o++];a===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[o++],v=p[o++]),WG[0][0]=y,WG[0][1]=x,WG[1][0]=_,WG[1][1]=w,WG[2][0]=m,WG[2][1]=v,r=m,s=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=xG(e[0]*e[0]+e[1]*e[1]),I=xG(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[o++],D=p[o++],C=p[o++],L=p[o++],k=p[o++]+T,P=p[o++]+k+T;o++;var O=p[o++],E=A+wG(k)*C,N=D+bG(k)*L,y=A+wG(P)*C,x=D+bG(P)*L,R=O?" wa ":" at ";Math.abs(E-y)<1e-4&&(Math.abs(P-k)>.01?O&&(E+=270/TG):Math.abs(N-D)<1e-4?O&&A>E||!O&&E>A?x-=270/TG:x+=270/TG:O&&D>N||!O&&N>D?y+=270/TG:y-=270/TG),f.push(R,yG(((A-C)*M+b)*TG-AG),MG,yG(((D-L)*I+S)*TG-AG),MG,yG(((A+C)*M+b)*TG-AG),MG,yG(((D+L)*I+S)*TG-AG),MG,yG((E*M+b)*TG-AG),MG,yG((N*I+S)*TG-AG),MG,yG((y*M+b)*TG-AG),MG,yG((x*I+S)*TG-AG)),r=y,s=x;break;case vG.R:var z=WG[0],B=WG[1];z[0]=p[o++],z[1]=p[o++],B[0]=z[0]+p[o++],B[1]=z[1]+p[o++],e&&(oe(z,z,e),oe(B,B,e)),z[0]=yG(z[0]*TG-AG),B[0]=yG(B[0]*TG-AG),z[1]=yG(z[1]*TG-AG),B[1]=yG(B[1]*TG-AG),f.push(" m ",z[0],MG,z[1]," l ",B[0],MG,z[1]," l ",B[0],MG,B[1]," l ",z[0],MG,B[1]);break;case vG.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;i>V;V++){var G=WG[V];e&&oe(G,G,e),f.push(yG(G[0]*TG-AG),MG,yG(G[1]*TG-AG),i-1>V?MG:"")}}}return f.join("")};eo.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=kb("shape"),LG(i),this._vmlEl=i),FG(i,"fill",e,this),FG(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var r=e.lineWidth;if(a&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=xG(_G(s))}o.weight=r+"px"}var l=this.path||(this.path=new xT);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=HG(l,this.transform),i.style.zIndex=NG(this.zlevel,this.z,this.z2),OG(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},eo.prototype.onRemove=function(t){EG(t,this._vmlEl),this.removeRectText(t)},eo.prototype.onAdd=function(t){OG(t,this._vmlEl),this.appendRectText(t)};var ZG=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};Tn.prototype.brushVML=function(t){var e,i,n=this.style,a=n.image;if(ZG(a)){var o=a.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=a.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=a.width,i=a.height,r.width=s,r.height=l,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}a=o}else a===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(a){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=gG.createElement("div"),LG(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=xG(x[0]*x[0]+x[1]*x[1]),S=xG(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];oe(M,M,x),oe(I,I,x),oe(T,T,x),oe(A,A,x);var D=SG(M[0],I[0],T[0],A[0]),C=SG(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,MG,"M12=",x[2]/S,MG,"M21=",x[1]/b,MG,"M22=",x[3]/S,MG,"Dx=",yG(u*b+x[4]),MG,"Dy=",yG(h*S+x[5])),_.padding="0 "+yG(D)+"px "+yG(C)+"px 0",_.filter=IG+".Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=yG(u)+"px",_.top=yG(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=gG.createElement("div"),this._imageEl=k);var O=k.style;if(v){if(e&&i)O.width=yG(b*e*c/f)+"px",O.height=yG(S*i*d/p)+"px";else{var E=new Image,N=this;E.onload=function(){E.onload=null,e=E.width,i=E.height,O.width=yG(b*e*c/f)+"px",O.height=yG(S*i*d/p)+"px",N._imageWidth=e,N._imageHeight=i,N._imageSrc=a},E.src=a}P||(P=gG.createElement("div"),P.style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=yG((c+g*c/f)*b),R.height=yG((d+m*d/p)*S),R.filter=IG+".Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else O.width=yG(b*c)+"px",O.height=yG(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=n.opacity;1>B&&(z+=".Alpha(opacity="+yG(100*B)+") "),z+=IG+".AlphaImageLoader(src="+a+", SizingMethod=scale)",O.filter=z,y.style.zIndex=NG(this.zlevel,this.z,this.z2),OG(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},Tn.prototype.onRemove=function(t){EG(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Tn.prototype.onAdd=function(t){OG(t,this._vmlEl),this.appendRectText(t)};var UG,XG="normal",YG={},jG=0,qG=100,KG=document.createElement("div"),$G=function(t){var e=YG[t];if(!e){jG>qG&&(jG=0,YG={});var i,n=KG.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(a){}e={style:n.fontStyle||XG,variant:n.fontVariant||XG,weight:n.fontWeight||XG,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},YG[t]=e,jG++}return e};Fi("measureText",function(t,e){var i=gG;UG||(UG=i.createElement("div"),UG.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",gG.body.appendChild(UG));try{UG.style.font=e}catch(n){}return UG.innerHTML="",UG.appendChild(i.createTextNode(t)),{width:UG.offsetWidth}});for(var JG=new Si,QG=function(t,e,i,n){var a=this.style;this.__dirty&&sn(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var r=nn(o,a);o=[];for(var s=0;sI;++I)jb(S[I],v,_,w+I*p)}else{t.__text=o,t.__canCacheByTextString=b;for(var T=d.lines,A=T.length,I=0;A>I;I++){var D=S[I],C=T[I];D?D.__zrText!==C&&(D.innerHTML="",D.appendChild(document.createTextNode(C))):(D=S[I]=Rb("tspan"),r.appendChild(D),D.appendChild(document.createTextNode(C))),jb(D,v,_,w+I*p)}if(M>A){for(;M>I;I++)r.removeChild(S[I]);S.length=A}}}};yF.drawRectText=SF,yF.brush=function(t){var e=t.style;null!=e.text?SF(t,!1):qb(t)},Kb.prototype={diff:function(t,e,i){function n(){for(var i=-1*s;s>=i;i+=2){var n,l=u[i-1],h=u[i+1],c=(h?h.newPos:0)-i;l&&(u[i-1]=void 0);var d=l&&l.newPos+1=0&&r>c;if(d||f){if(!d||f&&l.newPos=o&&c+1>=r)return $b(a,n.components,e,t);u[i]=n}else u[i]=void 0}s++}i||(i=function(t,e){return t===e}),this.equals=i;var a=this;t=t.slice(),e=e.slice();var o=e.length,r=t.length,s=1,l=o+r,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],e,t,0);if(u[0].newPos+1>=o&&h+1>=r){for(var c=[],d=0;d=s;){var f=n();if(f)return f}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var a=e.length,o=i.length,r=t.newPos,s=r-n,l=0;a>r+1&&o>s+1&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var MF=new Kb,IF=function(t,e,i){return MF.diff(t,e,i)},TF="0",AF="1";Qb.prototype.createElement=Rb,Qb.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?(i=e.insertBefore(this.createElement("defs"),e.firstChild),i.contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},Qb.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},Qb.prototype.addDom=function(t){var e=this.getDefs(!0);e.appendChild(t)},Qb.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Qb.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return f(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},Qb.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;f(t,function(t){t[e._markLabel]=TF})},Qb.prototype.markUsed=function(t){t&&(t[this._markLabel]=AF)},Qb.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;f(e,function(e){e[i._markLabel]!==AF&&t.removeChild(e)})}},Qb.prototype.getSvgProxy=function(t){return t instanceof eo?mF:t instanceof Tn?vF:t instanceof ZT?yF:mF},Qb.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Qb.prototype.getSvgElement=function(t){return t.__svgEl},h(tS,Qb),tS.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;f(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var a,o=e.style[n],r=i.getDefs(!0);o._dom?(a=o._dom,r.contains(o._dom)||i.addDom(a)):a=i.add(o),i.markUsed(e);var s=a.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},tS.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return SM("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},tS.prototype.update=function(t){var e=this;Qb.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},tS.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void SM("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,a=i.length;a>n;++n){var o=this.createElement("stop");o.setAttribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexOf(!1)){var s=$e(r)[3],l=ei(r);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s)}else o.setAttribute("stop-color",i[n].color);e.appendChild(o)}t._dom=e},tS.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Qb.prototype.markUsed.call(this,e._dom),e=t.style.stroke,e&&e._dom&&Qb.prototype.markUsed.call(this,e._dom)}},h(eS,Qb),eS.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},eS.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,a,o=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(a=r[s].getAttribute("id"),n=r[s],o.contains(n)||o.appendChild(n)):(a="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,n=this.createElement("clipPath"),n.setAttribute("id",a),o.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);Oe(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+a+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},eS.prototype.markUsed=function(t){var e=this; t.__clipPaths&&f(t.__clipPaths,function(t){t._dom&&Qb.prototype.markUsed.call(e,t._dom),t._textDom&&Qb.prototype.markUsed.call(e,t._textDom)})},h(iS,Qb),iS.prototype.addWithoutUpdate=function(t,e){if(e&&nS(e.style)){var i;if(e._shadowDom){i=e._shadowDom;var n=this.getDefs(!0);n.contains(e._shadowDom)||this.addDom(i)}else i=this.add(e);this.markUsed(e);var a=i.getAttribute("id");t.style.filter="url(#"+a+")"}},iS.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},iS.prototype.update=function(t,e){var i=e.style;if(nS(i)){var n=this;Qb.prototype.update.call(this,e,function(){n.updateDom(e,e._shadowDom)})}else this.remove(t,e)},iS.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},iS.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,a,o,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,a=s.shadowOffsetY||0,o=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,a=s.textShadowOffsetY||0,o=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",a/u),i.setAttribute("flood-color",r);var h=o/2/l,c=o/2/u,d=h+" "+c;i.setAttribute("stdDeviation",d),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(i),t._shadowDom=e},iS.prototype.markUsed=function(t){t._shadowDom&&Qb.prototype.markUsed.call(this,t._shadowDom)};var DF=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=r({},i||{});var a=Rb("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new tS(n,a),this.clipPathManager=new eS(n,a),this.shadowManager=new iS(n,a);var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=a,this._viewport=o,t.appendChild(o),o.appendChild(a),this.resize(i.width,i.height),this._visibleList=[]};DF.prototype={constructor:DF,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();return t?{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}:void 0},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,a=t.length,o=[];for(e=0;a>e;e++){var r=t[e],s=oS(r),l=cS(r)||hS(r);r.invisible||(r.__dirty&&(s&&s.brush(r),this.clipPathManager.update(r),r.style&&(this.gradientManager.update(r.style.fill),this.gradientManager.update(r.style.stroke),this.shadowManager.update(l,r)),r.__dirty=!1),o.push(r))}var u,h=IF(n,o);for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var a=i.style;a.width=t+"px",a.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||aS(s[i])||aS(r.style[i]))-(aS(s[a])||0)-(aS(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:image/svg+xml;charset=UTF-8,"+t}},f(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){DF.prototype[t]=dS(t)}),Kn("svg",DF),t.version=CC,t.dependencies=LC,t.PRIORITY=HC,t.init=mu,t.connect=vu,t.disConnect=yu,t.disconnect=uL,t.dispose=xu,t.getInstanceByDom=_u,t.getInstanceById=wu,t.registerTheme=bu,t.registerPreprocessor=Su,t.registerProcessor=Mu,t.registerPostUpdate=Iu,t.registerAction=Tu,t.registerCoordinateSystem=Au,t.getCoordinateSystemDimensions=Du,t.registerLayout=Cu,t.registerVisual=Lu,t.registerLoading=Pu,t.extendComponentModel=Ou,t.extendComponentView=Eu,t.extendSeriesModel=Nu,t.extendChartView=Ru,t.setCanvasCreator=zu,t.registerMap=Bu,t.getMap=Vu,t.dataTool=hL,t.zrender=AI,t.number=BA,t.format=UA,t.throttle=yl,t.helper=dk,t.matrix=$S,t.vector=RS,t.color=mM,t.parseGeoJSON=pk,t.parseGeoJson=yk,t.util=xk,t.graphic=_k,t.List=bL,t.Model=pr,t.Axis=vk,t.env=mS});