2 lines
718 KiB
JavaScript
2 lines
718 KiB
JavaScript
/* 2020-9-22 15:23:28 | 版权所有 军懋国兴 */
|
||
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(pf=null),df[t]=e}function D(t){if(null==t||"object"!=_typeof(t))return t;var e=t,n=af.call(t);if("[object Array]"===n){if(!u(t)){e=[];for(var i=0,o=t.length;i<o;i++)e[i]=D(t[i])}}else if(of[n]){if(!u(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(i=0,o=t.length;i<o;i++)e[i]=D(t[i])}}}else if(!nf[n]&&!u(t)&&!_(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=D(t[r]));return e}function v(t,e,n){if(!B(e)||!B(t))return n?D(e):t;for(var i in e){var o,a;e.hasOwnProperty(i)&&(o=t[i],!B(a=e[i])||!B(o)||N(a)||N(o)||_(a)||_(o)||r(a)||r(o)||u(a)||u(o)?!n&&i in t||(t[i]=D(e[i])):v(o,a,n))}return t}function h(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=v(n,t[i],e);return n}function P(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function O(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function i(){return pf=pf||Xg().getContext("2d")}function M(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function a(t,e){function n(){}var i,o=t.prototype;for(i in n.prototype=e.prototype,t.prototype=new n,o)t.prototype[i]=o[i];(t.prototype.constructor=t).superClass=e}function o(t,e,n){O(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)}function R(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function z(t,e,n){if(t&&e)if(t.forEach&&t.forEach===sf)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function L(t,e,n){if(t&&e){if(t.map&&t.map===hf)return t.map(e,n);for(var i=[],o=0,a=t.length;o<a;o++)i.push(e.call(n,t[o],o,t));return i}}function b(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===cf)return t.reduce(e,n,i);for(var o=0,a=t.length;o<a;o++)n=e.call(i,n,t[o],o,t);return n}}function I(t,e,n){if(t&&e){if(t.filter&&t.filter===lf)return t.filter(e,n);for(var i=[],o=0,a=t.length;o<a;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}}function k(t,e){var n=uf.call(arguments,2);return function(){return t.apply(e,n.concat(uf.call(arguments)))}}function E(t){var e=uf.call(arguments,1);return function(){return t.apply(this,e.concat(uf.call(arguments)))}}function N(t){return"[object Array]"===af.call(t)}function f(t){return"function"==typeof t}function A(t){return"[object String]"===af.call(t)}function B(t){var e=_typeof(t);return"function"===e||!!t&&"object"==e}function r(t){return!!nf[af.call(t)]}function g(t){return!!of[af.call(t)]}function _(t){return"object"==_typeof(t)&&"number"==typeof t.nodeType&&"object"==_typeof(t.ownerDocument)}function m(t){return t!=t}function V(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]}function G(t,e){return null!=t?t:e}function F(t,e,n){return null!=t?t:null!=e?e:n}function s(){return Function.call.apply(uf,arguments)}function l(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 d(t,e){if(!t)throw new Error(e)}function p(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function c(t){t[gf]=!0}function u(t){return t[gf]}function y(t){function e(t,e){n?i.set(t,e):i.set(e,t)}var n=N(t);this.data={};var i=this;t instanceof y?t.each(e):t&&z(t,e)}function C(t){return new y(t)}function n(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var o=t.length,i=0;i<e.length;i++)n[i+o]=e[i];return n}function x(){}function w(t,e){var n=new mf(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n}function S(t,e){return t[0]=e[0],t[1]=e[1],t}function T(t){var e=new mf(2);return e[0]=t[0],e[1]=t[1],e}function W(t,e,n){return t[0]=e,t[1]=n,t}function H(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Z(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function U(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function X(t){return Math.sqrt(j(t))}function j(t){return t[0]*t[0]+t[1]*t[1]}function Y(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function q(t,e){var n=X(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function K(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function $(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function J(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function Q(t,e,n){var i=e[0],o=e[1];return t[0]=n[0]*i+n[2]*o+n[4],t[1]=n[1]*i+n[3]*o+n[5],t}function tt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function et(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function nt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function it(t,e){return{target:t,topTarget:e&&e.topTarget}}function ot(t,e){var n=t._$eventProcessor;return null!=e&&n&&n.normalizeQuery&&(e=n.normalizeQuery(e)),e}function at(t,e,n,i){return n=n||{},i||!ef.canvasSupported?rt(t,e,n):ef.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):rt(t,e,n),n}function rt(t,e,n){var i,o=(i=t).getBoundingClientRect?i.getBoundingClientRect():{left:0,top:0};n.zrX=e.clientX-o.left,n.zrY=e.clientY-o.top}function st(t,e,n){if(null!=(e=e||window.event).zrX)return e;var i,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!=o?e.targetTouches[0]:e.changedTouches[0])&&at(t,i,e,n):(at(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3);var a=e.button;return null==e.which&&void 0!==a&&Sf.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function lt(t,e,n){bf?t.addEventListener(e,n):t.attachEvent("on"+e,n)}function ut(t){return 1<t.which}function ht(t){Mf(this.event)}function ct(){}function dt(){var t=new Df(6);return pt(t),t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function gt(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 ft(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],a=e[0]*n[2]+e[2]*n[3],r=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function mt(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function vt(t,e,n){var i=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+r*u,t[1]=-i*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function yt(t,e,n){var i=n[0],o=n[1];return t[0]=e[0]*i,t[1]=e[1]*o,t[2]=e[2]*i,t[3]=e[3]*o,t[4]=e[4]*i,t[5]=e[5]*o,t}function xt(t,e){var n=e[0],i=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=n*r-a*i;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-r*o)*l,t[5]=(a*o-n*s)*l,t):null}function _t(t){var e=dt();return gt(e,t),e}function wt(t){return 5e-5<t||t<-5e-5}function bt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function St(t){return(t=Math.round(t))<0?0:255<t?255:t}function Mt(t){return t<0?0:1<t?1:t}function It(t){return St(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Tt(t){return Mt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function At(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Dt(t,e,n){return t+(e-t)*n}function Ct(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function Lt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function kt(t,e){Uf&&Lt(Uf,e),Uf=Zf.put(t,Uf||e.slice())}function Pt(t,e){if(t){e=e||[];var n=Zf.get(t);if(n)return Lt(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Hf)return Lt(e,Hf[i]),kt(t,e),e;if("#"!==i.charAt(0)){var o=i.indexOf("("),a=i.indexOf(")");if(-1!==o&&a+1===i.length){var r=i.substr(0,o),s=i.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void Ct(e,0,0,0,1);l=Tt(s.pop());case"rgb":return 3!==s.length?void Ct(e,0,0,0,1):(Ct(e,It(s[0]),It(s[1]),It(s[2]),l),kt(t,e),e);case"hsla":return 4!==s.length?void Ct(e,0,0,0,1):(s[3]=Tt(s[3]),Nt(s,e),kt(t,e),e);case"hsl":return 3!==s.length?void Ct(e,0,0,0,1):(Nt(s,e),kt(t,e),e);default:return}}Ct(e,0,0,0,1)}else{if(4===i.length)return 0<=(u=parseInt(i.substr(1),16))&&u<=4095?(Ct(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),kt(t,e),e):void Ct(e,0,0,0,1);if(7===i.length){var u=parseInt(i.substr(1),16);return 0<=u&&u<=16777215?(Ct(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),kt(t,e),e):void Ct(e,0,0,0,1)}}}}function Nt(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Tt(t[1]),o=Tt(t[2]),a=o<=.5?o*(i+1):o+i-o*i,r=2*o-a;return Ct(e=e||[],St(255*At(r,a,n+1/3)),St(255*At(r,a,n)),St(255*At(r,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ot(t,e){var n=Pt(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:t[i]<0&&(n[i]=0);return Gt(n,4===n.length?"rgba":"rgb")}}function Rt(t){var e=Pt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Et(t,e,n){if(e&&e.length&&0<=t&&t<=1){n=n||[];var i=t*(e.length-1),o=Math.floor(i),a=Math.ceil(i),r=e[o],s=e[a],l=i-o;return n[0]=St(Dt(r[0],s[0],l)),n[1]=St(Dt(r[1],s[1],l)),n[2]=St(Dt(r[2],s[2],l)),n[3]=Mt(Dt(r[3],s[3],l)),n}}function zt(t,e,n){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),o=Math.floor(i),a=Math.ceil(i),r=Pt(e[o]),s=Pt(e[a]),l=i-o,u=Gt([St(Dt(r[0],s[0],l)),St(Dt(r[1],s[1],l)),St(Dt(r[2],s[2],l)),Mt(Dt(r[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:a,value:i}:u}}function Bt(t,e,n,i){if(t=Pt(t))return t=function(t){if(t){var e,n,i,o,a,r=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.min(r,s,l),h=Math.max(r,s,l),c=h-u,d=(h+u)/2;0==c?n=e=0:(n=d<.5?c/(h+u):c/(2-h-u),i=((h-r)/6+c/2)/c,o=((h-s)/6+c/2)/c,a=((h-l)/6+c/2)/c,r===h?e=a-o:s===h?e=1/3+i-a:l===h&&(e=2/3+o-i),e<0&&(e+=1),1<e&&--e);var p=[360*e,n,d];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=(o=e,(o=Math.round(o))<0?0:360<o?360:o)),null!=n&&(t[1]=Tt(n)),null!=i&&(t[2]=Tt(i)),Gt(Nt(t),"rgba");var o}function Vt(t,e){if((t=Pt(t))&&null!=e)return t[3]=Mt(e),Gt(t,"rgba")}function Gt(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Ft(t,e){return t[e]}function Wt(t,e,n){t[e]=n}function Ht(t,e,n){return(e-t)*n+t}function Zt(t,e,n){return.5<n?e:t}function Ut(t,e,n,i,o){var a=t.length;if(1==o)for(s=0;s<a;s++)i[s]=Ht(t[s],e[s],n);else for(var r=a&&t[0].length,s=0;s<a;s++)for(var l=0;l<r;l++)i[s][l]=Ht(t[s][l],e[s][l],n)}function Xt(t,e,n){var i=t.length,o=e.length;if(i!==o)if(o<i)t.length=o;else for(r=i;r<o;r++)t.push(1===n?e[r]:jf.call(e[r]));for(var a=t[0]&&t[0].length,r=0;r<t.length;r++)if(1===n)isNaN(t[r])&&(t[r]=e[r]);else for(var s=0;s<a;s++)isNaN(t[r][s])&&(t[r][s]=e[r][s])}function jt(t,e,n,i,o,a,r,s,l){var u=t.length;if(1==l)for(c=0;c<u;c++)s[c]=Yt(t[c],e[c],n[c],i[c],o,a,r);else for(var h=t[0].length,c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=Yt(t[c][d],e[c][d],n[c][d],i[c][d],o,a,r)}function Yt(t,e,n,i,o,a,r){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*r+(-3*(e-n)-2*s-l)*a+s*o+e}function qt(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Kt(t,e,n,i,a,o){var r,s,l=t._getter,u=t._setter,h="spline"===e,c=i.length;if(c){var d,p=R(i[0].value),g=!1,f=!1,m=p?R((s=(r=i)[r.length-1].value)&&s[0])?2:1:0;i.sort(function(t,e){return t.time-e.time}),d=i[c-1].time;for(var v=[],y=[],x=i[0].value,_=!0,w=0;w<c;w++){v.push(i[w].time/d);var b,S=i[w].value;p&&function(t,e,n){if(t===e)return 1;var i=t.length;if(i===e.length){if(1===n){for(a=0;a<i;a++)if(t[a]!==e[a])return}else for(var o=t[0].length,a=0;a<i;a++)for(var r=0;r<o;r++)if(t[a][r]!==e[a][r])return;return 1}}(S,x,m)||!p&&S===x||(_=!1),"string"==typeof(x=S)&&((b=Pt(S))?(S=b,g=!0):f=!0),y.push(S)}if(o||!_){for(var M=y[c-1],w=0;w<c-1;w++)p?Xt(y[w],M,m):!isNaN(y[w])||isNaN(M)||f||g||(y[w]=M);p&&Xt(l(t._target,a),M,m);var I,T,A,D,C,L,k=0,P=0;g&&(L=[0,0,0,0]);var N=new bt({target:t._target,life:d,loop:t._loop,delay:t._delay,onframe:function(t,e){var n;if(e<0)n=0;else if(e<P){for(n=Math.min(k+1,c-1);0<=n&&!(v[n]<=e);n--);n=Math.min(n,c-2)}else{for(n=k;n<c&&!(v[n]>e);n++);n=Math.min(n-1,c-2)}P=e;var i,o=v[(k=n)+1]-v[n];if(0!=o)if(I=(e-v[n])/o,h)if(A=y[n],T=y[0===n?n:n-1],D=y[c-2<n?c-1:n+1],C=y[c-3<n?c-1:n+2],p)jt(T,A,D,C,I,I*I,I*I*I,l(t,a),m);else{if(g)i=jt(T,A,D,C,I,I*I,I*I*I,L,1),i=qt(L);else{if(f)return.5<I?D:A;i=Yt(T,A,D,C,I,I*I,I*I*I)}u(t,a,i)}else if(p)Ut(y[n],y[n+1],I,l(t,a),m);else{if(g)Ut(y[n],y[n+1],I,L,1),i=qt(L);else{if(f)return Zt(y[n],y[n+1],I);i=Ht(y[n],y[n+1],I)}u(t,a,i)}},ondestroy:n});return e&&"spline"!==e&&(N.easing=e),N}}}function $t(t,e,n,i,o,a,r,s){A(i)?(a=o,o=i,i=0):f(o)?(a=o,o="linear",i=0):f(i)?(a=i,i=0):n=f(n)?(a=n,500):n||500,t.stopAnimation(),function t(e,n,i,o,a,r,s){var l={},u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=i[h]?B(o[h])&&!R(o[h])?t(e,n?n+"."+h:h,i[h],o[h],a,r,s):(s?(l[h]=i[h],Jt(e,n,h,o[h])):l[h]=o[h],u++):null==o[h]||s||Jt(e,n,h,o[h]));0<u&&e.animate(n,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,n,i,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h<l.length;h++)l[h].done(function(){--u||a&&a()}).start(o,r)}function Jt(t,e,n,i){var o;e?((o={})[e]={},o[e][n]=i,t.attr(o)):t.attr(n,i)}function Qt(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}function te(t,e,n,i){var o=e+1;if(o===n)return 1;if(i(t[o++],t[e])<0){for(;o<n&&i(t[o],t[o-1])<0;)o++;!function(t,e,n){for(n--;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,o)}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function ee(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var a,r=t[i],s=e,l=i;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;var u=i-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(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ne(t,e,n,i,o,a){var r=0,s=0,l=1;if(0<a(t,e[n+o])){for(s=i-o;l<s&&0<a(t,e[n+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[n+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r,r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[n+h])?r=h+1:l=h}return l}function ie(t,e,n,i,o,a){var r=0,s=0,l=1;if(a(t,e[n+o])<0){for(s=o+1;l<s&&a(t,e[n+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r,r=o-l,l=o-u}else{for(s=i-o;l<s&&0<=a(t,e[n+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[n+h])<0?l=h:r=h+1}return l}function oe(g,f){function e(t){var e=s[t],n=l[t],i=s[t+1],o=l[t+1];l[t]=n+o,t===r-3&&(s[t+1]=s[t+2],l[t+1]=l[t+2]),r--;var a=ie(g[i],g,e,n,0,f);e+=a,0!=(n-=a)&&0!==(o=ne(g[e+n-1],g,i,o,o-1,f))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;o<e;o++)v[o]=g[t+o];var a=0,r=n,s=t;if(g[s++]=g[r++],0!=--i)if(1!==e){for(var l,u,h,c=m;;){u=l=0,h=!1;do{if(f(g[r],v[a])<0){if(g[s++]=g[r++],u++,(l=0)==--i){h=!0;break}}else if(g[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=ie(g[r],v,a,e,0,f))){for(o=0;o<l;o++)g[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(g[s++]=g[r++],0==--i){h=!0;break}if(0!==(u=ne(v[a],g,r,i,0,f))){for(o=0;o<u;o++)g[s+o]=g[r+o];if(s+=u,r+=u,0==(i-=u)){h=!0;break}}if(g[s++]=v[a++],1==--e){h=!0;break}c--}while(um<=l||um<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<i;o++)g[s+o]=g[r+o];g[s+i]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)g[s+o]=v[a+o]}}else{for(o=0;o<i;o++)g[s+o]=g[r+o];g[s+i]=v[a]}else for(o=0;o<e;o++)g[s+o]=v[a+o]}:function(t,e,n,i){var o=0;for(o=0;o<i;o++)v[o]=g[n+o];var a=t+e-1,r=i-1,s=n+i-1,l=0,u=0;if(g[s--]=g[a--],0!=--e)if(1!==i){for(var h=m;;){var c=0,d=0,p=!1;do{if(f(v[r],g[a])<0){if(g[s--]=g[a--],c++,(d=0)==--e){p=!0;break}}else if(g[s--]=v[r--],d++,c=0,1==--i){p=!0;break}}while((c|d)<h);if(p)break;do{if(0!=(c=e-ie(v[r],g,t,e,e-1,f))){for(e-=c,u=1+(s-=c),l=1+(a-=c),o=c-1;0<=o;o--)g[u+o]=g[l+o];if(0===e){p=!0;break}}if(g[s--]=v[r--],1==--i){p=!0;break}if(0!=(d=i-ne(g[a],v,0,i,i-1,f))){for(i-=d,u=1+(s-=d),l=1+(r-=d),o=0;o<d;o++)g[u+o]=v[l+o];if(i<=1){p=!0;break}}if(g[s--]=g[a--],0==--e){p=!0;break}h--}while(um<=c||um<=d);if(p)break;h<0&&(h=0),h+=2}if((m=h)<1&&(m=1),1===i){for(u=1+(s-=e),l=1+(a-=e),o=e-1;0<=o;o--)g[u+o]=g[l+o];g[s]=v[r]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)g[l+o]=v[o]}}else{for(u=1+(s-=e),l=1+(a-=e),o=e-1;0<=o;o--)g[u+o]=g[l+o];g[s]=v[r]}else for(l=s-(i-1),o=0;o<i;o++)g[l+o]=v[o]})(e,n,i,o)}var m=um,r=0,v=[],s=[],l=[];this.mergeRuns=function(){for(;1<r;){var t=r-2;if(1<=t&&l[t-1]<=l[t]+l[t+1]||2<=t&&l[t-2]<=l[t]+l[t-1])l[t-1]<l[t+1]&&t--;else if(l[t]>l[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<r;){var t=r-2;0<t&&l[t-1]<l[t+1]&&t--,e(t)}},this.pushRun=function(t,e){s[r]=t,l[r]=e,r+=1}}function ae(t,e,n,i){n=n||0;var o=(i=i||t.length)-n;if(!(o<2)){var a=0;if(o<lm)return ee(t,n,i,n+(a=te(t,n,i,e)),e),0;var r,s=new oe(t,e),l=function(t){for(var e=0;lm<=t;)e|=1&t,t>>=1;return t+e}(o);do{(a=te(t,n,i,e))<l&&(l<(r=o)&&(r=l),ee(t,n,n+r,n+a,e),a=r),s.pushRun(n,a),s.mergeRuns(),o-=a,n+=a}while(0!==o);s.forceMergeRuns()}}function re(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function se(){return!1}function le(t,e,n){var i=Xg(),o=e.getWidth(),a=e.getHeight(),r=i.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=a*n,i}function ue(t,e,n,i,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var a=wm.get(t),r={hostEl:n,cb:i,cbPayload:o};return a?ce(e=a.image)||a.pending.push(r):(e||(e=new Image),e.onload=e.onerror=he,wm.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function he(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function ce(t){return t&&t.width&&t.height}function de(t,e){var n=t+":"+(e=e||Tm);if(bm[n])return bm[n];for(var i,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((i=a[s],o=e,Am.measureText(i,o)).width,r);return Mm<Sm&&(Sm=0,bm={}),Sm++,bm[n]=r}function pe(t,e,n,i,o,a,r){return a?(l=i,u=be(t,{rich:a,truncate:r,font:e,textAlign:s=n,textPadding:o}),h=u.outerWidth,c=u.outerHeight,new Qt(ge(0,h,s),fe(0,c,l),h,c)):function(t,e,n,i,o,a){var r=we(t,e,o,a),s=de(t,e);o&&(s+=o[1]+o[3]);var l=r.outerHeight,u=new Qt(ge(0,s,n),fe(0,l,i),s,l);return u.lineHeight=r.lineHeight,u}(t,e,n,i,o,r);var s,l,u,h,c}function ge(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function fe(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function me(t,e,n){var i=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":i-=n,o+=s,l="right",u="middle";break;case"right":i+=n+r,o+=s,u="middle";break;case"top":i+=r/2,o-=n,l="center",u="bottom";break;case"bottom":i+=r/2,o+=a+n,l="center";break;case"inside":i+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":i+=n,o+=s,u="middle";break;case"insideRight":i+=r-n,o+=s,l="right",u="middle";break;case"insideTop":i+=r/2,o+=n,l="center";break;case"insideBottom":i+=r/2,o+=a-n,l="center",u="bottom";break;case"insideTopLeft":i+=n,o+=n;break;case"insideTopRight":i+=r-n,o+=n,l="right";break;case"insideBottomLeft":i+=n,o+=a-n,u="bottom";break;case"insideBottomRight":i+=r-n,o+=a-n,l="right",u="bottom"}return{x:i,y:o,textAlign:l,textVerticalAlign:u}}function ve(t,e,n,i,o){if(!e)return"";var a=(t+"").split("\n");o=ye(e,n,i,o);for(var r=0,s=a.length;r<s;r++)a[r]=xe(a[r],o);return a.join("\n")}function ye(t,e,n,i){(i=P({},i)).font=e;n=G(n,"...");i.maxIterations=G(i.maxIterations,2);var o=i.minChar=G(i.minChar,0);i.cnCharWidth=de("国",e);var a=i.ascCharWidth=de("a",e);i.placeholder=G(i.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=de(n);return r<l&&(n="",l=0),r=t-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=r,i.containerWidth=t,i}function xe(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";if((s=de(t,i))<=n)return t;for(var a=0;;a++){if(s<=o||a>=e.maxIterations){t+=e.ellipsis;break}var r=0===a?function(t,e,n,i){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?n:i}return a}(t,o,e.ascCharWidth,e.cnCharWidth):0<s?Math.floor(t.length*o/s):0,s=de(t=t.substr(0,r),i)}return""===t&&(t=e.placeholder),t}function _e(t){return de("国",t)}function we(t,e,n,i){null!=t&&(t+="");var o=_e(e),a=t?t.split("\n"):[],r=a.length*o,s=r;if(n&&(s+=n[0]+n[2]),t&&i){var l=i.outerHeight,u=i.outerWidth;if(null!=l&&l<s)t="",a=[];else if(null!=u)for(var h=ye(u-(n?n[1]+n[3]:0),e,i.ellipsis,{minChar:i.minChar,placeholder:i.placeholder}),c=0,d=a.length;c<d;c++)a[c]=xe(a[c],h)}return{lines:a,height:r,outerHeight:s,lineHeight:o}}function be(t,e){var n={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return n;for(var i,o=Im.lastIndex=0;null!=(i=Im.exec(t));){var a=i.index;o<a&&Se(n,t.substring(o,a)),Se(n,i[2],i[1]),o=Im.lastIndex}o<t.length&&Se(n,t.substring(o,t.length));var r=n.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;for(h&&(null!=d&&(d-=h[1]+h[3]),null!=p&&(p-=h[0]+h[2])),D=0;D<r.length;D++){for(var g=r[D],f=0,m=0,v=0;v<g.tokens.length;v++){var y=(C=g.tokens[v]).styleName&&e.rich[C.styleName]||{},x=C.textPadding=y.textPadding,_=C.font=y.font||e.font,w=C.textHeight=G(y.textHeight,_e(_));if(x&&(w+=x[0]+x[2]),C.height=w,C.lineHeight=F(y.textLineHeight,e.textLineHeight,w),C.textAlign=y&&y.textAlign||e.textAlign,C.textVerticalAlign=y&&y.textVerticalAlign||"middle",null!=p&&s+C.lineHeight>p)return{lines:[],width:0,height:0};C.textWidth=de(C.text,_);var b,S,M,I,T=y.textWidth,A=null==T||"auto"===T;"string"==typeof T&&"%"===T.charAt(T.length-1)?(C.percentWidth=T,u.push(C),T=0):(A&&(T=C.textWidth,(S=(b=y.textBackgroundColor)&&b.image)&&ce(S=function(t){if("string"!=typeof t)return t;var e=wm.get(t);return e&&e.image}(S))&&(T=Math.max(T,S.width*w/S.height))),T+=M=x?x[1]+x[3]:0,null!=(I=null!=d?d-m:null)&&I<T&&(!A||I<M?(C.text="",C.textWidth=T=0):(C.text=ve(C.text,I-M,_,c.ellipsis,{minChar:c.minChar}),C.textWidth=de(C.text,_),T=C.textWidth+M))),m+=C.width=T,y&&(f=Math.max(f,C.lineHeight))}g.width=m,s+=g.lineHeight=f,l=Math.max(l,m)}n.outerWidth=n.width=G(e.textWidth,l),n.outerHeight=n.height=G(e.textHeight,s),h&&(n.outerWidth+=h[1]+h[3],n.outerHeight+=h[0]+h[2]);for(var D=0;D<u.length;D++){var C=u[D],L=C.percentWidth;C.width=parseInt(L,10)/100*l}return n}function Se(t,e,n){for(var i=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s,l,u=o[r],h={styleName:n,text:u,isLineHolder:!u&&!i};r?a.push({tokens:[h]}):1===(l=(s=(a[a.length-1]||(a[0]={tokens:[]})).tokens).length)&&s[0].isLineHolder?s[0]=h:!u&&l&&!i||s.push(h)}}function Me(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&p(e)||t.textFont||t.font}function Ie(t,e){var n,i,o,a,r,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=o=a=c:c instanceof Array?1===c.length?n=i=o=a=c[0]:2===c.length?(n=o=c[0],i=a=c[1]):3===c.length?(n=c[0],i=a=c[1],o=c[2]):(n=c[0],i=c[1],o=c[2],a=c[3]):n=i=o=a=0,u<n+i&&(n*=u/(r=n+i),i*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<i+o&&(i*=h/(r=i+o),o*=h/r),h<n+a&&(n*=h/(r=n+a),a*=h/r),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}function Te(t){return Ae(t),z(t.rich,Ae),t}function Ae(t){var e,n;t&&(t.font=Me(t),"middle"===(e=t.textAlign)&&(e="center"),t.textAlign=null==e||Dm[e]?e:"left","center"===(n=t.textVerticalAlign||t.textBaseline)&&(n="middle"),t.textVerticalAlign=null==n||Cm[n]?n:"top",t.textPadding&&(t.textPadding=l(t.textPadding)))}function De(t,e,n,i,o,a){var r,s,l,u,h,c;i.rich?(s=e,l=n,u=i,h=o,(c=(r=t).__textCotentBlock)&&!r.__dirtyText||(c=r.__textCotentBlock=be(l,u)),function(t,e,n,i,o){var a=n.width,r=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=Oe(0,i,o),h=u.baseX,c=u.baseY,d=u.textAlign,p=u.textVerticalAlign;Ce(e,i,o,h,c);var g=ge(h,r,d),f=fe(c,s,p),m=g,v=f;l&&(m+=l[3],v+=l[0]);var y=m+a;ke(i)&&Pe(t,e,i,g,f,r,s);for(var x=0;x<n.lines.length;x++){for(var _,w=n.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)Le(t,e,_,i,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;0<=C&&"right"===(_=b[C]).textAlign;)Le(t,e,_,i,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)Le(t,e,_=b[T],i,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(r,s,c,u,h)):function(t,e,n,i,o,a){var r=a&&a.style,s=r&&"text"===a.type,l=i.font||Tm;s&&l===(r.font||Tm)||(e.font=l);var u=t.__computedFont;t.__styleFont!==l&&(t.__styleFont=l,u=t.__computedFont=e.font);var h=i.textPadding,c=t.__textCotentBlock;c&&!t.__dirtyText||(c=t.__textCotentBlock=we(n,u,h,i.truncate));var d=c.outerHeight,p=c.lines,g=c.lineHeight,f=Oe(0,i,o),m=f.baseX,v=f.baseY,y=f.textAlign||"left",x=f.textVerticalAlign;Ce(e,i,o,m,v);var _=fe(v,d,x),w=m,b=_,S=ke(i);{var M,I;(S||h)&&(M=de(n,u),h&&(M+=h[1]+h[3]),I=ge(m,M,y),S&&Pe(t,e,i,I,_,M,d),h&&(w=Ve(m,y,h),b+=h[0]))}for(e.textAlign=y,e.textBaseline="middle",E=0;E<Lm.length;E++){var T=Lm[E],A=T[0],D=T[1],C=i[A];s&&C===r[A]||(e[D]=cm(e,D,C||T[2]))}b+=g/2;var L=i.textStrokeWidth,k=s?r.textStrokeWidth:null,P=!s||L!==k,N=!s||P||i.textStroke!==r.textStroke,O=Ee(i.textStroke,L),R=ze(i.textFill);if(O&&(P&&(e.lineWidth=L),N&&(e.strokeStyle=O)),R&&(s&&i.textFill===r.textFill&&!r.textBackgroundColor||(e.fillStyle=R)),1===p.length)O&&e.strokeText(p[0],w,b),R&&e.fillText(p[0],w,b);else for(var E=0;E<p.length;E++)O&&e.strokeText(p[E],w,b),R&&e.fillText(p[E],w,b),b+=g}(t,e,n,i,o,a)}function Ce(t,e,n,i,o){var a;n&&e.textRotation&&("center"===(a=e.textOrigin)?(i=n.width/2+n.x,o=n.height/2+n.y):a&&(i=a[0]+n.x,o=a[1]+n.y),t.translate(i,o),t.rotate(-e.textRotation),t.translate(-i,-o))}function Le(t,e,n,i,o,a,r,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,h=a+o/2;"top"===u?h=a+n.height/2:"bottom"===u&&(h=a+o-n.height/2),!n.isLineHolder&&ke(l)&&Pe(t,e,l,"right"===s?r-n.width:"center"===s?r-n.width/2:r,h-n.height/2,n.width,n.height);var c=n.textPadding;c&&(r=Ve(r,s,c),h-=n.height/2-c[2]-n.textHeight/2),Re(e,"shadowBlur",F(l.textShadowBlur,i.textShadowBlur,0)),Re(e,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Re(e,"shadowOffsetX",F(l.textShadowOffsetX,i.textShadowOffsetX,0)),Re(e,"shadowOffsetY",F(l.textShadowOffsetY,i.textShadowOffsetY,0)),Re(e,"textAlign",s),Re(e,"textBaseline","middle"),Re(e,"font",n.font||Tm);var d=Ee(l.textStroke||i.textStroke,void 0),p=ze(l.textFill||i.textFill),g=G(l.textStrokeWidth,i.textStrokeWidth);d&&(Re(e,"lineWidth",g),Re(e,"strokeStyle",d),e.strokeText(n.text,r,h)),p&&(Re(e,"fillStyle",p),e.fillText(n.text,r,h))}function ke(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Pe(t,e,n,i,o,a,r){var s,l,u,h=n.textBackgroundColor,c=n.textBorderWidth,d=n.textBorderColor,p=A(h);Re(e,"shadowBlur",n.textBoxShadowBlur||0),Re(e,"shadowColor",n.textBoxShadowColor||"transparent"),Re(e,"shadowOffsetX",n.textBoxShadowOffsetX||0),Re(e,"shadowOffsetY",n.textBoxShadowOffsetY||0),(p||c&&d)&&(e.beginPath(),(s=n.textBorderRadius)?Ie(e,{x:i,y:o,width:a,height:r,r:s}):e.rect(i,o,a,r),e.closePath()),p?(Re(e,"fillStyle",h),null!=n.fillOpacity?(u=e.globalAlpha,e.globalAlpha=n.fillOpacity*n.opacity,e.fill(),e.globalAlpha=u):e.fill()):f(h)?(Re(e,"fillStyle",h(n)),e.fill()):!B(h)||(l=ue(l=h.image,null,t,Ne,h))&&ce(l)&&e.drawImage(l,i,o,a,r),c&&d&&(Re(e,"lineWidth",c),Re(e,"strokeStyle",d),null!=n.strokeOpacity?(u=e.globalAlpha,e.globalAlpha=n.strokeOpacity*n.opacity,e.stroke(),e.globalAlpha=u):e.stroke())}function Ne(t,e){e.image=t}function Oe(t,e,n){var i,o,a,r=e.x||0,s=e.y||0,l=e.textAlign,u=e.textVerticalAlign;return n&&((i=e.textPosition)instanceof Array?(r=n.x+Be(i[0],n.width),s=n.y+Be(i[1],n.height)):(r=(o=me(i,n,e.textDistance)).x,s=o.y,l=l||o.textAlign,u=u||o.textVerticalAlign),(a=e.textOffset)&&(r+=a[0],s+=a[1])),{baseX:r,baseY:s,textAlign:l,textVerticalAlign:u}}function Re(t,e,n){return t[e]=cm(t,e,n),t[e]}function Ee(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ze(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Be(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function Ve(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ge(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Fe(t){for(var e in t=t||{},Jf.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new pm(t.style,this),this._rect=null,this.__clipPaths=[]}function We(t){Fe.call(this,t)}function He(t){return parseInt(t,10)}function Ze(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function Ue(t){return"mousewheel"===t&&ef.browser.firefox?"DOMMouseScroll":t}function Xe(t,e,n){var i=t._gestureMgr;"start"===n&&i.clear();var o,a=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);"end"===n&&i.clear(),a&&(o=a.type,e.gestureEvent=o,t.handler.dispatchToElement({target:a.target},o,a.event))}function je(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Ye(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qe(i){z(Vm,function(t){i._handlers[t]=k(Wm[t],i)}),z(Fm,function(t){i._handlers[t]=k(Wm[t],i)}),z(Bm,function(t){var e,n;i._handlers[t]=(e=Wm[t],n=i,function(){if(!n._touching)return e.apply(n,arguments)})})}function Ke(n){function t(t,e){z(t,function(t){lt(n,Ue(t),e._handlers[t])},e)}wf.call(this),this.dom=n,this._touching=!1,this._touchTimer,this._gestureMgr=new Em,this._handlers={},qe(this),ef.pointerEventsSupported?t(Fm,this):(ef.touchEventsSupported&&t(Vm,this),t(Bm,this))}function $e(t,e){var n=new jm(tf(),t,e);return Xm[n.id]=n}function Je(t,e){Um[t]=e}function Qe(t){return t instanceof Array?t:null==t?[]:[t]}function tn(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}function en(t){return!$m(t)||Jm(t)||t instanceof Date?t:t.value}function nn(t,o){o=(o||[]).slice();var a=L(t||[],function(t,e){return{exist:t}});return Km(o,function(t,e){if($m(t)){for(n=0;n<a.length;n++)if(!a[n].option&&null!=t.id&&a[n].exist.id===t.id+"")return a[n].option=t,void(o[e]=null);for(var n=0;n<a.length;n++){var i=a[n].exist;if(!(a[n].option||null!=i.id&&null!=t.id||null==t.name||rn(t)||rn(i)||i.name!==t.name+""))return a[n].option=t,void(o[e]=null)}}}),Km(o,function(t,e){if($m(t)){for(var n=0;n<a.length;n++){var i=a[n].exist;if(!a[n].option&&!rn(i)&&null==t.id){a[n].option=t;break}}n>=a.length&&a.push({option:t})}}),a}function on(t){var r=C();Km(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),Km(t,function(t,e){var n=t.option;d(!n||null==n.id||!r.get(n.id)||r.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&r.set(n.id,t),t.keyInfo||(t.keyInfo={})}),Km(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if($m(i)){if(o.name=null!=i.name?i.name+"":n?n.name:Qm+e,n)o.id=n.id;else if(null!=i.id)o.id=i.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function an(t){var e=t.name;return e&&e.indexOf(Qm)}function rn(t){return $m(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function sn(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?N(t.dataIndex)?L(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?N(t.name)?L(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ln(){var e="__\0ec_inner_"+ev+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}function un(s,l,u){var t;A(l)&&((t={})[l+"Index"]=0,l=t);var e=u&&u.defaultMainType;!e||hn(l,e+"Index")||hn(l,e+"Id")||hn(l,e+"Name")||(l[e+"Index"]=0);var h={};return Km(l,function(t,e){var n,i,o,a,r,t=l[e];"dataIndex"!==e&&"dataIndexInside"!==e?(i=(n=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],o=(n[2]||"").toLowerCase(),!i||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&M(u.includeMainTypes,i)<0||(a={mainType:i},"index"===o&&"all"===t||(a[o]=t),r=s.queryComponents(a),h[i+"Models"]=r,h[i+"Model"]=r[0])):h[e]=t}),h}function hn(t,e){return t&&t.hasOwnProperty(e)}function cn(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function dn(t){return"auto"===t?ef.domSupported?"html":"richText":t||"html"}function pn(t){var e={main:"",sub:""};return t&&(t=t.split(nv),e.main=t[0]||"",e.sub=t[1]||""),e}function gn(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return P(e.prototype,t),e.extend=this.extend,e.superCall=mn,e.superApply=vn,a(e,this),e.superClass=n,e}}function fn(t){var e=["__\0is_clz",ov++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function mn(t,e){var n=s(arguments,2);return this.superClass.prototype[e].apply(t,n)}function vn(t,e,n){return this.superClass.prototype[e].apply(t,n)}function yn(n,t){t=t||{};var i,a={};return n.registerClass=function(t,e){return e&&(d(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(o=e),'componentType "'+o+'" illegal'),(e=pn(e)).sub?e.sub!==iv&&((i=a[(n=e).main])&&i[iv]||((i=a[n.main]={})[iv]=!0),i[e.sub]=t):a[e.main]=t),t;var n,i,o},n.getClass=function(t,e,n){var i=a[t];if(i&&i[iv]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=pn(t);var n=[],e=a[t.main];return e&&e[iv]?z(e,function(t,e){e!==iv&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=pn(t),!!a[t.main]},n.getAllClassMainTypes=function(){var n=[];return z(a,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=pn(t);var e=a[t.main];return e&&e[iv]},n.parseClassType=pn,t.registerWhenExtend&&(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)}),n}function xn(t){return-cv<t&&t<cv}function _n(t){return cv<t||t<-cv}function wn(t,e,n,i,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*i+3*a*n)}function bn(t,e,n,i,o){var a=1-o;return 3*(((e-t)*a+2*(n-e)*o)*a+(i-n)*o*o)}function Sn(t,e,n,i,o){var a,r,s,l,u=6*n-12*e+6*t,h=9*e+3*i-3*t-9*n,c=3*e-3*t,d=0;return xn(h)?_n(u)&&0<=(s=-c/u)&&s<=1&&(o[d++]=s):xn(a=u*u-4*h*c)?o[0]=-u/(2*h):0<a&&(l=(-u-(r=hv(a)))/(2*h),0<=(s=(-u+r)/(2*h))&&s<=1&&(o[d++]=s),0<=l&&l<=1&&(o[d++]=l)),d}function Mn(t,e,n,i,o,a){var r=(e-t)*o+t,s=(n-e)*o+e,l=(i-n)*o+n,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=i}function In(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function Tn(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function An(t,e,n){var i=t+n-2*e;return 0==i?.5:(t-e)/i}function Dn(t,e,n,i,o){var a=(e-t)*i+t,r=(n-e)*i+e,s=(r-a)*i+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=n}function Cn(t,e,n){if(0!==t.length){for(var i=t[0],o=i[0],a=i[0],r=i[1],s=i[1],l=1;l<t.length;l++)i=t[l],o=yv(o,i[0]),a=xv(a,i[0]),r=yv(r,i[1]),s=xv(s,i[1]);e[0]=o,e[1]=r,n[0]=a,n[1]=s}}function Ln(t,e,n,i,o,a){o[0]=yv(t,n),o[1]=yv(e,i),a[0]=xv(t,n),a[1]=xv(e,i)}function kn(t,e,n,i,o,a,r){if(0!==o){var s,l=o;if(!(e+l<r&&i+l<r||r<e-l&&r<i-l||t+l<a&&n+l<a||a<t-l&&a<n-l)){if(t===n)return Math.abs(a-t)<=l/2;var u=(s=(e-i)/(t-n))*a-r+(t*i-n*e)/(t-n);return u*u/(s*s+1)<=l/2*l/2}}}function Pn(t,e,n,i,o,a,r,s,l,u,h){if(0!==l){var c=l;return!(e+c<h&&i+c<h&&a+c<h&&s+c<h||h<e-c&&h<i-c&&h<a-c&&h<s-c||t+c<u&&n+c<u&&o+c<u&&r+c<u||u<t-c&&u<n-c&&u<o-c&&u<r-c)&&function(t,e,n,i,o,a,r,s,l,u,h){var c,d,p,g,f,m=.005,v=1/0;fv[0]=l,fv[1]=u;for(var y=0;y<1;y+=.05)mv[0]=wn(t,n,o,r,y),mv[1]=wn(e,i,a,s,y),(g=yf(fv,mv))<v&&(c=y,v=g);v=1/0;for(var x=0;x<32&&!(m<dv);x++)d=c-m,p=c+m,mv[0]=wn(t,n,o,r,d),mv[1]=wn(e,i,a,s,d),g=yf(mv,fv),0<=d&&g<v?(c=d,v=g):(vv[0]=wn(t,n,o,r,p),vv[1]=wn(e,i,a,s,p),f=yf(vv,fv),p<=1&&f<v?(c=p,v=f):m*=.5);return h&&(h[0]=wn(t,n,o,r,c),h[1]=wn(e,i,a,s,c)),hv(v)}(t,e,n,i,o,a,r,s,u,h,null)<=c/2}}function Nn(t,e,n,i,o,a,r,s,l){if(0!==r){var u=r;return!(e+u<l&&i+u<l&&a+u<l||l<e-u&&l<i-u&&l<a-u||t+u<s&&n+u<s&&o+u<s||s<t-u&&s<n-u&&s<o-u)&&function(t,e,n,i,o,a,r,s,l){var u,h=.005,c=1/0;fv[0]=r,fv[1]=s;for(var d=0;d<1;d+=.05)mv[0]=In(t,n,o,d),mv[1]=In(e,i,a,d),(v=yf(fv,mv))<c&&(u=d,c=v);c=1/0;for(var p=0;p<32&&!(h<dv);p++){var g=u-h,f=u+h;mv[0]=In(t,n,o,g),mv[1]=In(e,i,a,g);var m,v=yf(mv,fv);0<=g&&v<c?(u=g,c=v):(vv[0]=In(t,n,o,f),vv[1]=In(e,i,a,f),m=yf(vv,fv),f<=1&&m<c?(u=f,c=m):h*=.5)}return l&&(l[0]=In(t,n,o,u),l[1]=In(e,i,a,u)),hv(c)}(t,e,n,i,o,a,s,l,null)<=u/2}}function On(t){return(t%=Fv)<0&&(t+=Fv),t}function Rn(t,e,n,i,o,a){if(e<a&&i<a||a<e&&a<i)return 0;if(i===e)return 0;var r=i<e?1:-1,s=(a-e)/(i-e);1!=s&&0!=s||(r=i<e?.5:-.5);var l=s*(n-t)+t;return l===o?1/0:o<l?r:0}function En(t,e,n,i,o,a,r,s,l,u){if(e<u&&i<u&&a<u&&s<u||u<e&&u<i&&u<a&&u<s)return 0;var h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I,T,A,D,C,L,k,P,N,O=(p=Xv,k=(A=3*((d=a)-2*(c=i)+(h=e)))*(D=3*(c-h))-9*(T=s+3*(c-d)-h)*(C=h-u),P=D*D-3*A*C,N=0,xn(L=A*A-3*T*D)&&xn(k)?xn(A)?p[0]=0:0<=(S=-D/A)&&S<=1&&(p[N++]=S):xn(g=k*k-4*L*P)?(M=-(f=k/L)/2,0<=(S=-A/T+f)&&S<=1&&(p[N++]=S),0<=M&&M<=1&&(p[N++]=M)):0<g?(y=L*A+1.5*T*(-k-(m=hv(g))),0<=(S=(-A-((v=(v=L*A+1.5*T*(-k+m))<0?-uv(-v,gv):uv(v,gv))+(y=y<0?-uv(-y,gv):uv(y,gv))))/(3*T))&&S<=1&&(p[N++]=S)):(x=(2*L*A-3*T*k)/(2*hv(L*L*L)),_=Math.acos(x)/3,S=(-A-2*(w=hv(L))*(b=Math.cos(_)))/(3*T),M=(-A+w*(b+pv*Math.sin(_)))/(3*T),I=(-A+w*(b-pv*Math.sin(_)))/(3*T),0<=S&&S<=1&&(p[N++]=S),0<=M&&M<=1&&(p[N++]=M),0<=I&&I<=1&&(p[N++]=I)),N);if(0===O)return 0;for(var R,E,z,B=0,V=-1,G=0;G<O;G++){var F=Xv[G],W=0===F||1===F?.5:1;wn(t,n,o,r,F)<l||(V<0&&(V=Sn(e,i,a,s,jv),jv[1]<jv[0]&&1<V&&(z=void 0,z=jv[0],jv[0]=jv[1],jv[1]=z),R=wn(e,i,a,s,jv[0]),1<V&&(E=wn(e,i,a,s,jv[1]))),2==V?F<jv[0]?B+=R<e?W:-W:F<jv[1]?B+=E<R?W:-W:B+=s<E?W:-W:F<jv[0]?B+=R<e?W:-W:B+=s<R?W:-W)}return B}function zn(t,e,n,i,o,a,r,s){if(e<s&&i<s&&a<s||s<e&&s<i&&s<a)return 0;var l,u,h,c,d,p,g,f,m,v,y,x=(h=Xv,m=2*((u=i)-(l=e)),v=l-s,y=0,xn(f=l-2*u+a)?_n(m)&&0<=(p=-v/m)&&p<=1&&(h[y++]=p):xn(c=m*m-4*f*v)?0<=(p=-m/(2*f))&&p<=1&&(h[y++]=p):0<c&&(g=(-m-(d=hv(c)))/(2*f),0<=(p=(-m+d)/(2*f))&&p<=1&&(h[y++]=p),0<=g&&g<=1&&(h[y++]=g)),y);if(0===x)return 0;var _=An(e,i,a);if(0<=_&&_<=1){for(var w=0,b=In(e,i,a,_),S=0;S<x;S++)M=0===Xv[S]||1===Xv[S]?.5:1,(I=In(t,n,o,Xv[S]))<r||(Xv[S]<_?w+=b<e?M:-M:w+=a<b?M:-M);return w}var M=0===Xv[0]||1===Xv[0]?.5:1,I=In(t,n,o,Xv[0]);return I<r?0:a<e?M:-M}function Bn(t,e,n,i,o){for(var a,r,s=0,l=0,u=0,h=0,c=0,d=0;d<t.length;){var p=t[d++];switch(p===Hv.M&&1<d&&(n||(s+=Rn(l,u,h,c,i,o))),1==d&&(h=l=t[d],c=u=t[d+1]),p){case Hv.M:l=h=t[d++],u=c=t[d++];break;case Hv.L:if(n){if(kn(l,u,t[d],t[d+1],e,i,o))return!0}else s+=Rn(l,u,t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Hv.C:if(n){if(Pn(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=En(l,u,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Hv.Q:if(n){if(Nn(l,u,t[d++],t[d++],t[d],t[d+1],e,i,o))return!0}else s+=zn(l,u,t[d++],t[d++],t[d],t[d+1],i,o)||0;l=t[d++],u=t[d++];break;case Hv.A:var g=t[d++],f=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++],_=(t[d++],1-t[d++]),w=Math.cos(y)*m+g,b=Math.sin(y)*v+f;1<d?s+=Rn(l,u,w,b,i,o):(h=w,c=b);var S=(i-g)*v/m+g;if(n){if(function(t,e,n,i,o,a,r,s,l){if(0!==r){var u=r;s-=t,l-=e;var h,c=Math.sqrt(s*s+l*l);if(!(n<c-u||c+u<n)){if(Math.abs(i-o)%Wv<1e-4)return 1;(o=a?(h=i,i=On(o),On(h)):(i=On(i),On(o)))<i&&(o+=Wv);var d=Math.atan2(l,s);return d<0&&(d+=Wv),i<=d&&d<=o||i<=d+Wv&&d+Wv<=o}}}(g,f,v,y,y+x,_,e,S,o))return!0}else s+=function(t,e,n,i,o,a,r,s){if((s-=e)>n||s<-n)return 0;l=Math.sqrt(n*n-s*s),Xv[0]=-l,Xv[1]=l;var l,u=Math.abs(i-o);if(u<1e-4)return 0;if(u%Zv<1e-4)return o=Zv,p=a?1:-1,r>=Xv[i=0]+t&&r<=Xv[1]+t?p:0;(o=a?(l=i,i=On(o),On(l)):(i=On(i),On(o)))<i&&(o+=Zv);for(var h=0,c=0;c<2;c++){var d,p,g=Xv[c];r<g+t&&(p=a?1:-1,(d=Math.atan2(s,g))<0&&(d=Zv+d),(i<=d&&d<=o||i<=d+Zv&&d+Zv<=o)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),h+=p))}return h}(g,f,v,y,y+x,_,S,o);l=Math.cos(y+x)*m+g,u=Math.sin(y+x)*v+f;break;case Hv.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if(kn(h,c,w,c,e,i,o)||kn(w,c,w,b,e,i,o)||kn(w,b,h,b,e,i,o)||kn(h,b,h,c,e,i,o))return!0}else s+=Rn(w,c,w,b,i,o),s+=Rn(h,b,h,c,i,o);break;case Hv.Z:if(n){if(kn(l,u,h,c,e,i,o))return!0}else s+=Rn(l,u,h,c,i,o);l=h,u=c}}return n||(a=u,r=c,Math.abs(a-r)<Uv)||(s+=Rn(l,u,h,c,i,o)||0),0!==s}function Vn(t){Fe.call(this,t),this.path=null}function Gn(t,e,n,i,o,a,r,s,l,u,h){var c=l*(ry/180),d=ay(c)*(t-n)/2+oy(c)*(e-i)/2,p=-1*oy(c)*(t-n)/2+ay(c)*(e-i)/2,g=d*d/(r*r)+p*p/(s*s);1<g&&(r*=iy(g),s*=iy(g));var f=(o===a?-1:1)*iy((r*r*(s*s)-r*r*(p*p)-s*s*(d*d))/(r*r*(p*p)+s*s*(d*d)))||0,m=f*r*p/s,v=f*-s*d/r,y=(t+n)/2+ay(c)*m-oy(c)*v,x=(e+i)/2+oy(c)*m+ay(c)*v,_=ly([1,0],[(d-m)/r,(p-v)/s]),w=[(d-m)/r,(p-v)/s],b=[(-1*d-m)/r,(-1*p-v)/s],S=ly(w,b);sy(w,b)<=-1&&(S=ry),1<=sy(w,b)&&(S=0),0===a&&0<S&&(S-=2*ry),1===a&&S<0&&(S+=2*ry),h.addData(u,y,x,r,s,_,S,c,a)}function Fn(t,e){var n=function(t){if(!t)return new Gv;for(var e,n=0,i=0,o=n,a=i,r=new Gv,s=Gv.CMD,l=t.match(uy),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),p=c.match(hy)||[],g=p.length,f=0;f<g;f++)p[f]=parseFloat(p[f]);for(var m=0;m<g;){var v,y,x,_,w,b,S,M=n,I=i;switch(d){case"l":n+=p[m++],i+=p[m++],h=s.L,r.addData(h,n,i);break;case"L":n=p[m++],i=p[m++],h=s.L,r.addData(h,n,i);break;case"m":n+=p[m++],i+=p[m++],h=s.M,r.addData(h,n,i),o=n,a=i,d="l";break;case"M":n=p[m++],i=p[m++],h=s.M,r.addData(h,n,i),o=n,a=i,d="L";break;case"h":n+=p[m++],h=s.L,r.addData(h,n,i);break;case"H":n=p[m++],h=s.L,r.addData(h,n,i);break;case"v":i+=p[m++],h=s.L,r.addData(h,n,i);break;case"V":i=p[m++],h=s.L,r.addData(h,n,i);break;case"C":h=s.C,r.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),n=p[m-2],i=p[m-1];break;case"c":h=s.C,r.addData(h,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i),n+=p[m-2],i+=p[m-1];break;case"S":v=n,y=i;var T=r.len(),A=r.data;e===s.C&&(v+=n-A[T-4],y+=i-A[T-3]),h=s.C,M=p[m++],I=p[m++],n=p[m++],i=p[m++],r.addData(h,v,y,M,I,n,i);break;case"s":v=n,y=i;T=r.len(),A=r.data;e===s.C&&(v+=n-A[T-4],y+=i-A[T-3]),h=s.C,M=n+p[m++],I=i+p[m++],n+=p[m++],i+=p[m++],r.addData(h,v,y,M,I,n,i);break;case"Q":M=p[m++],I=p[m++],n=p[m++],i=p[m++],h=s.Q,r.addData(h,M,I,n,i);break;case"q":M=p[m++]+n,I=p[m++]+i,n+=p[m++],i+=p[m++],h=s.Q,r.addData(h,M,I,n,i);break;case"T":v=n,y=i;T=r.len(),A=r.data;e===s.Q&&(v+=n-A[T-4],y+=i-A[T-3]),n=p[m++],i=p[m++],h=s.Q,r.addData(h,v,y,n,i);break;case"t":v=n,y=i;T=r.len(),A=r.data;e===s.Q&&(v+=n-A[T-4],y+=i-A[T-3]),n+=p[m++],i+=p[m++],h=s.Q,r.addData(h,v,y,n,i);break;case"A":x=p[m++],_=p[m++],w=p[m++],b=p[m++],S=p[m++],Gn(M=n,I=i,n=p[m++],i=p[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=p[m++],_=p[m++],w=p[m++],b=p[m++],S=p[m++],Gn(M=n,I=i,n+=p[m++],i+=p[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),n=o,i=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){var e;t.setData?(t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e)):(e=t,n.rebuildPath(e))},e.applyTransform=function(t){ny(n,t),this.dirty(!0)},e}function Wn(t,e){return new Vn(Fn(t,e))}function Hn(t,e,n,i,o,a,r){var s=.5*(n-t),l=.5*(i-e);return(2*(e-n)+s+l)*r+(-3*(e-n)-2*s-l)*a+s*o+e}function Zn(t,e,n){var i=e.points,o=e.smooth;if(i&&2<=i.length){if(o&&"spline"!==o){var a=function(t,e,n,i){var o,a,r,s,l=[],u=[],h=[],c=[];if(i){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++){tt(r,r,t[d]),et(s,s,t[d])}tt(r,r,i[0]),et(s,s,i[1])}for(var d=0,p=t.length;d<p;d++){var g=t[d];if(n)o=t[d?d-1:p-1],a=t[(d+1)%p];else{if(0===d||d===p-1){l.push(T(t[d]));continue}o=t[d-1],a=t[d+1]}U(u,a,o),Y(u,u,e);var f=K(g,o),m=K(g,a),v=f+m;0!==v&&(f/=v,m/=v),Y(h,u,-f),Y(c,u,m);var y=H([],g,h),x=H([],g,c);i&&(et(y,y,r),tt(y,y,s),et(x,x,r),tt(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,o,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var r=i.length,s=0;s<(n?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=i[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(i=function(t,e){for(var n=t.length,i=[],o=0,a=1;a<n;a++){o+=K(t[a-1],t[a])}var r=o/2;for(r=r<n?n:r,a=0;a<r;a++){var s,l,u,h=a/(r-1)*(e?n:n-1),c=Math.floor(h),d=h-c,p=t[c%n];e?(s=t[(c-1+n)%n],l=t[(c+1)%n],u=t[(c+2)%n]):(s=t[0===c?c:c-1],l=t[c>n-2?n-1:c+1],u=t[c>n-3?n-1:c+2]);var g=d*d,f=d*g;i.push([Hn(s[0],p[0],l[0],u[0],d,g,f),Hn(s[1],p[1],l[1],u[1],d,g,f)])}return i}(i,n)),t.moveTo(i[0][0],i[0][1]);for(var s=1,c=i.length;s<c;s++)t.lineTo(i[s][0],i[s][1])}n&&t.closePath()}}function Un(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?bn:wn)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?bn:wn)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Tn:In)(t.x1,t.cpx1,t.x2,e),(n?Tn:In)(t.y1,t.cpy1,t.y2,e)]}function Xn(t){Fe.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function jn(t){return Vn.extend(t)}function Yn(t,e,n,i){var o=Wn(t,e);return n&&("center"===i&&(n=Kn(n,o.getBoundingRect())),$n(o,n)),o}function qn(t,n,i){var o=new We({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){var e;"center"===i&&(e={width:t.width,height:t.height},o.setStyle(Kn(n,e)))}});return o}function Kn(t,e){var n=e.width/e.height,i=t.height*n,o=i<=t.width?t.height:(i=t.width)/n;return{x:t.x+t.width/2-i/2,y:t.y+t.height/2-o/2,width:i,height:o}}function $n(t,e){var n;t.applyTransform&&(n=t.getBoundingRect().calculateTransform(e),t.applyTransform(n))}function Jn(t){var e=t.shape,n=t.style.lineWidth;return Ly(2*e.x1)===Ly(2*e.x2)&&(e.x1=e.x2=ti(e.x1,n,!0)),Ly(2*e.y1)===Ly(2*e.y2)&&(e.y1=e.y2=ti(e.y1,n,!0)),t}function Qn(t){var e=t.shape,n=t.style.lineWidth,i=e.x,o=e.y,a=e.width,r=e.height;return e.x=ti(e.x,n,!0),e.y=ti(e.y,n,!0),e.width=Math.max(ti(i+a,n,!1)-e.x,0===a?0:1),e.height=Math.max(ti(o+r,n,!1)-e.y,0===r?0:1),t}function ti(t,e,n){var i=Ly(2*t);return(i+Ly(e))%2==0?i/2:(i+(n?1:-1))/2}function ei(t){return null!=t&&"none"!==t}function ni(t){var e,n,i,o,a=t.__hoverStl;a&&!t.__highlighted&&(e=t.useHoverLayer,t.__highlighted=e?"layer":"plain",!(n=t.__zr)&&e||(o=(i=t).style,e&&(o=(i=n.addHover(t)).style),_i(o),e||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var n,i=t.__normalStl={},o=t.style;for(n in e)null!=e[n]&&(i[n]=o[n]);i.fill=o.fill,i.stroke=o.stroke}else t.__normalStl=null}}(i),o.extendFrom(a),ii(o,a,"fill"),ii(o,a,"stroke"),xi(o),e||(t.dirty(!1),t.z2+=1)))}function ii(t,e,n){!ei(e[n])&&ei(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=Oy.get(t);return e||(e=Ot(t,-.1),Ry<1e4&&(Oy.set(t,e),Ry++)),e}(t[n]))}function oi(t){t.__highlighted&&(function(t){var e=t.__highlighted;{var n,i;"layer"===e?t.__zr&&t.__zr.removeHover(t):e&&(n=t.style,(i=t.__normalStl)&&(_i(n),t.setStyle(i),xi(n),--t.z2))}}(t),t.__highlighted=!1)}function ai(t,e){t.isGroup?t.traverse(function(t){t.isGroup||e(t)}):e(t)}function ri(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(oi(t),ni(t))}function si(t){return t&&t.__isEmphasisEntered}function li(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||ai(this,ni)}function ui(t){this.__hoverSilentOnTouch&&t.zrByTouch||this.__isEmphasisEntered||ai(this,oi)}function hi(){this.__isEmphasisEntered=!0,ai(this,ni)}function ci(){this.__isEmphasisEntered=!1,ai(this,oi)}function di(t,e,n){t.isGroup?t.traverse(function(t){t.isGroup||ri(t,t.hoverStyle||e)}):ri(t,t.hoverStyle||e),pi(t,n)}function pi(t,e){var n,i=!1===e;t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,i&&!t.__hoverStyleTrigger||(t[n=i?"off":"on"]("mouseover",li)[n]("mouseout",ui),t[n]("emphasis",hi)[n]("normal",ci),t.__hoverStyleTrigger=!i)}function gi(t,e,n,i,o,a,r){var s,l=(o=o||Ny).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=n.getShallow("show"),d=i.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=f(o.defaultText)?o.defaultText(u,o):o.defaultText));var p=c?s:null,g=d?G(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==p&&null==g||(fi(t,n,a,o),fi(e,i,r,o,!0)),t.text=p,e.text=g}function fi(t,e,n,i,o){return mi(t,e,i,o),n&&P(t,n),t}function mi(t,e,n,i){var o,a;(n=n||Ny).isRectText&&("outside"===(o=e.getShallow("position")||(i?null:"inside"))&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset"),null!=(a=e.getShallow("rotate"))&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=G(e.getShallow("distance"),i?null:5));var r,s,l=e.ecModel,u=l&&l.option.textStyle,h=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||Ny).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}(e);if(h)for(var c in r={},h){h.hasOwnProperty(c)&&(s=e.getModel(["rich",c]),vi(r[c]={},s,u,n,i))}return t.rich=r,vi(t,e,u,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function vi(t,e,n,i,o,a){n=!o&&n||Ny,t.textFill=yi(e.getShallow("color"),i)||n.color,t.textStroke=yi(e.getShallow("textBorderColor"),i)||n.textBorderColor,t.textStrokeWidth=G(e.getShallow("textBorderWidth"),n.textBorderWidth),t.insideRawTextPosition=t.textPosition,o||(a&&(t.insideRollbackOpt=i,xi(t)),null==t.textFill&&(t.textFill=i.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.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"),a&&i.disableBox||(t.textBackgroundColor=yi(e.getShallow("backgroundColor"),i),t.textPadding=e.getShallow("padding"),t.textBorderColor=yi(e.getShallow("borderColor"),i),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")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function yi(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function xi(t){var e,n,i,o,a=t.insideRollbackOpt;a&&null==t.textFill&&(n=a.useInsideStyle,i=t.insideRawTextPosition,o=a.autoColor,!1!==n&&(!0===n||a.isRectText&&i&&"string"==typeof i&&0<=i.indexOf("inside"))?(e={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=o&&(e={textFill:null},t.textFill=o),e&&(t.insideRollback=e))}function _i(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function wi(t,e){var n=e||e.getModel("textStyle");return p([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function bi(t,e,n,i,o,a){var r,s,l,u;"function"==typeof o&&(a=o,o=null),i&&i.isAnimationEnabled()?(r=t?"Update":"",s=i.getShallow("animationDuration"+r),l=i.getShallow("animationEasing"+r),"function"==typeof(u=i.getShallow("animationDelay"+r))&&(u=u(o,i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),0<s?e.animateTo(n,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())):(e.stopAnimation(),e.attr(n),a&&a())}function Si(t,e,n,i,o){bi(!0,t,e,n,i,o)}function Mi(t,e,n,i,o){bi(!1,t,e,n,i,o)}function Ii(t,e){for(var n=pt([]);t&&t!==e;)ft(n,t.getLocalTransform(),n),t=t.parent;return n}function Ti(t,e,n){return e&&!R(e)&&(e=kf.getLocalTransform(e)),n&&(e=xt([],e)),Q([],t,e)}function Ai(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=Ti(a=["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0],e,n);return Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function Di(t,e,i,n){function o(t){var e={position:T(t.position),rotation:t.rotation};return t.shape&&(e.shape=P({},t.shape)),e}var a,r;t&&e&&(r={},t.traverse(function(t){!t.isGroup&&t.anid&&(r[t.anid]=t)}),a=r,e.traverse(function(t){var e,n;t.isGroup||!t.anid||(e=a[t.anid])&&(n=o(t),t.attr(o(e)),Si(t,n,i,t.dataIndex))}))}function Ci(t,i){return L(t,function(t){var e=t[0],e=ky(e,i.x);e=Py(e,i.x+i.width);var n=t[1],n=ky(n,i.y);return[e,Py(n,i.y+i.height)]})}function Li(t,e,n){var i=(e=P({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),O(i,n),new We(e)):Yn(t.replace("path://",""),e,n,"center")}function ki(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}function Pi(t,e,n){for(var i=0;i<e.length&&(!e[i]||null!=(t=t&&"object"==_typeof(t)?t[e[i]]:null));i++);return null==t&&n&&(t=n.get(e)),t}function Ni(t,e){var n=Wy(t).getParent;return n?n.call(t,e):t.parentModel}function Oi(t){return[t||"",Xy++,Math.random().toFixed(5)].join("_")}function Ri(t,e,n,i){var o=e[1]-e[0],a=n[1]-n[0];if(0==o)return 0==a?n[0]:(n[0]+n[1])/2;if(i)if(0<o){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*a+n[0]}function Ei(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?t.replace(/^\s+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zi(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Bi(t){return t.sort(function(t,e){return t-e}),t}function Vi(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Gi(t){var e=t.toString(),n=e.indexOf("e");if(0<n){var i=+e.slice(n+1);return i<0?-i:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Fi(t,e){var n=Math.log,i=Math.LN10,o=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Wi(t,e,n){if(!t[e])return 0;var i=b(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var o=Math.pow(10,n),a=L(t,function(t){return(isNaN(t)?0:t)/i*o*100}),r=100*o,s=L(a,function(t){return Math.floor(t)}),l=b(s,function(t,e){return t+e},0),u=L(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,p=u.length;d<p;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Hi(t){var e=2*Math.PI;return(t%e+e)%e}function Zi(t){return-jy<t&&t<jy}function Ui(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=qy.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],(e[2]||1)-1,+e[3]||1,n,+(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)}function Xi(t){return Math.pow(10,ji(t))}function ji(t){return Math.floor(Math.log(t)/Math.LN10)}function Yi(t,e){var n=ji(t),i=Math.pow(10,n),o=t/i;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,-20<=n?+t.toFixed(n<0?-n:0):t}function qi(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i<t.length;){for(var o=t[i].interval,a=t[i].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-n),e=o[r],n=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(i,1):i++}return t}function Ki(t){return 0<=t-parseFloat(t)}function $i(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Ji(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 Qi(t){return null==t?"":(t+"").replace(Jy,function(t,e){return Qy[e]})}function to(t,e,n){N(e)||(e=[e]);var i=e.length;if(!i)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=tx[a];t=t.replace(Hy(r),Hy(r,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(Hy(tx[l],s),n?Qi(u):u)}return t}function eo(n,t,i){return z(t,function(t,e){n=n.replace("{"+e+"}",i?Qi(t):t)}),n}function no(t,e){var n=(t=A(t)?{color:t,extraCssText:e}:t||{}).color,i=t.type,e=t.extraCssText,o=t.renderMode||"html",a=t.markerId||"X";return n?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Qi(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Qi(n)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:n}}:""}function io(t,e){return"0000".substr(0,e-(t+="").length)+t}function oo(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Ui(e),o=n?"UTC":"",a=i["get"+o+"FullYear"](),r=i["get"+o+"Month"]()+1,s=i["get"+o+"Date"](),l=i["get"+o+"Hours"](),u=i["get"+o+"Minutes"](),h=i["get"+o+"Seconds"](),c=i["get"+o+"Milliseconds"]();return t.replace("MM",io(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",io(s,2)).replace("d",s).replace("hh",io(l,2)).replace("h",l).replace("mm",io(u,2)).replace("m",u).replace("ss",io(h,2)).replace("s",h).replace("SSS",io(c,3))}function ao(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ro(h,c,d,p,g){var f=0,m=0;null==p&&(p=1/0),null==g&&(g=1/0);var v=0;c.eachChild(function(t,e){var n,i,o,a,r=t.position,s=t.getBoundingRect(),l=c.childAt(e+1),u=l&&l.getBoundingRect();v="horizontal"===h?(o=s.width+(u?-u.x+s.x:0),(n=f+o)>p||t.newline?(f=0,n=o,m+=v+d,s.height):Math.max(v,s.height)):(a=s.height+(u?-u.y+s.y:0),(i=m+a)>g||t.newline?(f+=v+d,m=0,i=a,s.width):Math.max(v,s.width)),t.newline||(r[0]=f,r[1]=m,"horizontal"===h?f=n+d:m=i+d)})}function so(t,e,n){n=$y(n||0);var i=e.width,o=e.height,a=Ei(t.left,i),r=Ei(t.top,o),s=Ei(t.right,i),l=Ei(t.bottom,o),u=Ei(t.width,i),h=Ei(t.height,o),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=p&&(isNaN(u)&&isNaN(h)&&(i/o<p?u=.8*i:h=.8*o),isNaN(u)&&(u=p*h),isNaN(h)&&(h=u/p)),isNaN(a)&&(a=i-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-n[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var g=new Qt(a+n[3],r+n[0],u,h);return g.margin=n,g}function lo(t,e,n,i,o){var a,r,s,l,u,h=!o||!o.hv||o.hv[0],c=!o||!o.hv||o.hv[1],d=o&&o.boundingMode||"all";(h||c)&&("raw"===d?r="group"===t.type?new Qt(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(r=t.getBoundingRect(),t.needLocalTransform()&&(a=t.getLocalTransform(),(r=r.clone()).applyTransform(a))),e=so(O({width:r.width,height:r.height},e),n,i),s=t.position,l=h?e.x-r.x:0,u=c?e.y-r.y:0,t.attr("position","raw"===d?[l,u]:[s[0]+l,s[1]+u]))}function uo(l,u,t){function e(t,e){var n={},i=0,o={},a=0;if(ix(t,function(t){o[t]=l[t]}),ix(t,function(t){h(u,t)&&(n[t]=o[t]=u[t]),c(n,t)&&i++,c(o,t)&&a++}),d[e])return c(u,t[1])?o[t[2]]=null:c(u,t[2])&&(o[t[1]]=null),o;if(2!==a&&i){if(2<=i)return n;for(var r=0;r<t.length;r++){var s=t[r];if(!h(n,s)&&h(l,s)){n[s]=l[s];break}}return n}return o}function h(t,e){return t.hasOwnProperty(e)}function c(t,e){return null!=t[e]&&"auto"!==t[e]}function n(t,e,n){ix(t,function(t){e[t]=n[t]})}B(t)||(t={});var d=t.ignoreSize;N(d)||(d=[d,d]);var i=e(ax[0],0),o=e(ax[1],1);n(ax[0],l,i),n(ax[1],l,o)}function ho(t){return co({},t)}function co(e,n){return n&&e&&ix(ox,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}function po(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:C(),categoryAxisMap:C()},i=mx[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}function go(t){return"category"===t.get("type")}function fo(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===_x?{}:[]),this.sourceFormat=t.sourceFormat||bx,this.seriesLayoutBy=t.seriesLayoutBy||Mx,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&C(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function mo(t){var e,n=t.option,i=n.data,o=g(i)?Sx:vx,a=!1,r=n.seriesLayoutBy,s=n.sourceHeader,l=n.dimensions,u=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);u&&(i=(e=u.option).source,o=Tx(u).sourceFormat,a=!0,r=r||e.seriesLayoutBy,null==s&&(s=e.sourceHeader),l=l||e.dimensions);var h=function(t,e,n,i,o){if(!t)return{dimensionsDefine:vo(o)};var a,r,s,l;{var u;e===yx?("auto"===i||null==i?yo(function(t){null!=t&&"-"!==t&&(A(t)?null==r&&(r=1):r=0)},n,t,10):r=i?1:0,o||1!==r||(o=[],yo(function(t,e){o[e]=null!=t?t:""},n,t)),a=o?o.length:n===Ix?t.length:t[0]?t[0].length:null):e===xx?o||(o=function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e){var i=[];return z(e,function(t,e){i.push(e)}),i}}(t),s=!0):e===_x?o||(o=[],s=!0,z(t,function(t,e){o.push(e)})):e===vx&&(u=en(t[0]),a=N(u)&&u.length||1)}return s&&z(o,function(t,e){"name"===(B(t)?t.name:t)&&(l=e)}),{startIndex:r,dimensionsDefine:vo(o),dimensionsDetectCount:a,potentialNameDimIndex:l}}(i,o,r,s,l),c=n.encode;!c&&u&&(c=function(t,e,n,i,o,a){var r=po(t),s={},l=[],u=[],h=t.subType,c=C(["pie","map","funnel"]),d=C(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(r&&null!=d.get(h)){var p=t.ecModel,g=Tx(p).datasetMap,f=e.uid+"_"+o,m=g.get(f)||g.set(f,{categoryWayDim:1,valueWayDim:0});z(r.coordSysDims,function(t){var e;null==r.firstCategoryDimIndex?(e=m.valueWayDim++,s[t]=e,u.push(e)):r.categoryAxisMap.get(t)?(s[t]=0,l.push(0)):(e=m.categoryWayDim++,s[t]=e,u.push(e))})}else if(null!=c.get(h)){for(var v,y,x=0;x<5&&null==v;x++)xo(n,i,o,a.dimensionsDefine,a.startIndex,x)||(v=x);null!=v&&(s.value=v,y=a.potentialNameDimIndex||Math.max(v-1,0),u.push(y),l.push(y))}return l.length&&(s.itemName=l),u.length&&(s.seriesName=u),s}(t,u,i,o,r,h)),Tx(t).source=new fo({data:i,fromDataset:a,seriesLayoutBy:r,sourceFormat:o,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:c})}function vo(t){if(t){var i=C();return L(t,function(t,e){if(null==(t=P({},B(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=i.get(t.name);return n?t.name+="-"+n.count++:i.set(t.name,{count:1}),t})}}function yo(t,e,n,i){if(null==i&&(i=1/0),e===Ix)for(a=0;a<n.length&&a<i;a++)t(n[a]?n[a][0]:null,a);else for(var o=n[0]||[],a=0;a<o.length&&a<i;a++)t(o[a],a)}function xo(t,e,n,i,o,a){function r(t){return(null==t||!isFinite(t)||""===t)&&(!(!A(t)||"-"===t)||void 0)}var s,l;if(g(t))return!1;if(i&&(l=B(l=i[a])?l.name:l),e===yx)if(n===Ix){for(var u=t[a],h=0;h<(u||[]).length&&h<5;h++)if(null!=(s=r(u[o+h])))return s}else for(h=0;h<t.length&&h<5;h++){var c=t[o+h];if(c&&null!=(s=r(c[a])))return s}else if(e===xx){if(!l)return;for(h=0;h<t.length&&h<5;h++)if((d=t[h])&&null!=(s=r(d[l])))return s}else if(e===_x){if(!l)return;if(!(u=t[l])||g(u))return!1;for(h=0;h<u.length&&h<5;h++)if(null!=(s=r(u[h])))return s}else if(e===vx)for(h=0;h<t.length&&h<5;h++){var d=t[h],p=en(d);if(!N(p))return!1;if(null!=(s=r(p[a])))return s}return!1}function _o(t){var n,e,i;this.option={},this.option[Ax]=1,this._componentsMap=C({series:[]}),this._seriesIndices,this._seriesIndicesMap,n=t,e=this._theme.option,i=n.color&&!n.colorLayer,z(e,function(t,e){"colorLayer"===e&&i||ux.hasClass(e)||("object"==_typeof(t)?n[e]=n[e]?v(n[e],t,!1):D(t):null==n[e]&&(n[e]=t))}),v(t,px,!1),this.mergeOption(t)}function wo(t,e){t._seriesIndicesMap=C(t._seriesIndices=L(e,function(t){return t.componentIndex})||[])}function bo(t,e){return e.hasOwnProperty("subType")?I(t,function(t){return t.subType===e.subType}):t}function So(e){z(Cx,function(t){this[t]=k(e[t],e)},this)}function Mo(){this._coordinateSystems=[]}function Io(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function To(t,e,n){var l={width:e,height:n,aspectratio:e/n},u=!0;return z(t,function(t,e){var n,i,o,a,r,s=e.match(Rx);s&&s[1]&&s[2]&&(n=s[1],i=s[2].toLowerCase(),o=l[i],a=t,("min"===(r=n)?a<=o:"max"===r?o<=a:o===a)||(u=!1))}),u}function Ao(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Gx.length;n<i;n++){var o=Gx[n],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?v(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?v(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function Do(t,e,n){var i,o;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,o=t[e].emphasis,i&&(n?(t[e].normal=t[e].emphasis=null,O(t[e],i)):t[e]=i),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o))}function Co(t){Do(t,"itemStyle"),Do(t,"lineStyle"),Do(t,"areaStyle"),Do(t,"label"),Do(t,"labelLine"),Do(t,"upperLabel"),Do(t,"edgeLabel")}function Lo(t,e){var n=Vx(t)&&t[e],i=Vx(n)&&n.textStyle;if(i)for(var o=0,a=tv.length;o<a;o++){e=tv[o];i.hasOwnProperty(e)&&(n[e]=i[e])}}function ko(t){t&&(Co(t),Lo(t,"label"),t.emphasis&&Lo(t.emphasis,"label"))}function Po(t){return N(t)?t:t?[t]:[]}function No(t){return(N(t)?t[0]:t)||{}}function Oo(e){z(Fx,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}function Ro(m){z(m,function(h,c){var d=[],p=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],g=h.data,f=h.isStackedByIndex,e=g.map(t,function(t,e,n){var i,o,a=g.get(h.stackedDimension,n);if(isNaN(a))return p;f?o=g.getRawIndex(n):i=g.get(h.stackedByDimension,n);for(var r=NaN,s=c-1;0<=s;s--){var l=m[s];if(f||(o=l.data.rawIndexOf(l.stackedByDimension,i)),0<=o){var u=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=a&&0<u||a<=0&&u<0){a+=u,r=u;break}}}return d[0]=a,d[1]=r,d});g.hostModel.setData(e),h.data=e})}function Eo(t,e){fo.isInstance(t)||(t=fo.seriesDataToSource(t)),this._source=t;var n=this._data=t.data,i=t.sourceFormat;i===Sx&&(this._offset=0,this._dimSize=e,this._data=n),P(this,Zx[i===yx?i+"_"+t.seriesLayoutBy:i])}function zo(){return this._data.length}function Bo(t){return this._data[t]}function Vo(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Go(t,e,n,i){return null!=n?t[n]:t}function Fo(t,e,n,i){return Wo(t[i],this._dimensionInfos[e])}function Wo(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Ui(t)),null==t||""===t?NaN:+t;var i=e&&e.ordinalMeta;return i?i.parseAndCollect(t):t}function Ho(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(n);return s&&(o=s.name,a=s.index),Ux[r](i,e,a,o)}}}function Zo(t,e,n){if(t){var i=t.getProvider().getSource().sourceFormat;if(i===vx||i===xx){var o=t.getRawDataItem(e);return i!==vx||B(o)||(o=null),o?o[n]:void 0}}}function Uo(t){return new Xo(t)}function Xo(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}function jo(t,e,n,i,o,a){n_.reset(n,i,o,a),t._callingProgress=e,t._callingProgress({start:n,end:i,count:i-n,next:n_.next},t.context)}function Yo(t){var n,i,e=t.name;an(t)||(t.name=(n=t.getRawData(),i=[],z(n.mapDimension("seriesName",!0),function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")||e))}function qo(t){return t.model.getRawData().count()}function Ko(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),$o}function $o(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Jo(e,n){z(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,E(Qo,n))})}function Qo(t){var e=ta(t);e&&e.setOutputEnd(this.count())}function ta(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i,o=n.currentTask;return!o||(i=o.agentStubMap)&&(o=i.get(t.uid)),o}}function ea(){this.group=new rm,this.uid=Oi("viewChart"),this.renderTask=Uo({plan:oa,reset:aa}),this.renderTask.context={view:this}}function na(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;n<t.childCount();n++)na(t.childAt(n),e)}function ia(e,t,n){var i=sn(e,t);null!=i?z(Qe(i),function(t){na(e.getItemGraphicEl(t),n)}):e.eachItemGraphicEl(function(t){na(t,n)})}function oa(t){return c_(t.model)}function aa(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&h_(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,n,i,o),p_[l]}function ra(t,n,i){function o(){c=(new Date).getTime(),d=null,t.apply(s,l||[])}var a,r,s,l,u,h=0,c=0,d=null;n=n||0;function e(){a=(new Date).getTime(),s=this,l=arguments;var t=u||n,e=u||i;u=null,r=a-(e?h:c)-t,clearTimeout(d),e?d=setTimeout(o,t):0<=r?o():d=setTimeout(o,-r),h=a}return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){u=t},e}function sa(t,e,n,i){var o=t[e];if(o){var a=o[g_]||o,r=o[m_];if(o[f_]!==n||r!==i){if(null==n||!i)return t[e]=a;(o=t[e]=ra(a,n,"debounce"===i))[g_]=a,o[m_]=i,o[f_]=n}return o}}function la(t,e){var n=t[e];n&&n[g_]&&(t[e]=n[g_])}function ua(t,e,n,i){this.ecInstance=t,this.api=e,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=C()}function ha(l,t,u,h,c){function d(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}var p;c=c||{},z(t,function(i,t){var e,n,o,a,r,s;c.visualType&&c.visualType!==i.visualType||(n=(e=l._stageTaskMap.get(i.uid)).seriesTaskMap,(o=e.overallTask)?((r=o.agentStubMap).each(function(t){d(c,t)&&(t.dirty(),a=!0)}),a&&o.dirty(),b_(o,h),s=l.getPerformArgs(o,c.block),r.each(function(t){t.perform(s)}),p|=o.perform(s)):n&&n.each(function(t,e){d(c,t)&&t.dirty();var n=l.getPerformArgs(t,c.block);n.skip=!i.performRawSeries&&u.isSeriesFiltered(t.context.model),b_(t,h),p|=t.perform(n)}))}),l.unfinished|=p}function ca(t){t.overallReset(t.ecModel,t.api,t.payload)}function da(t,e){return t.overallProgress&&pa}function pa(){this.agent.dirty(),this.getDownstream().dirty()}function ga(){this.agent&&this.agent.dirty()}function fa(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function ma(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Qe(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?L(e,function(t,e){return va(e)}):S_}function va(a){return function(t,e){var n=e.data,i=e.resetDefines[a];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(n,o);else i&&i.progress&&i.progress(t,n)}}function ya(t){return t.data.count()}function xa(t,e,n){var i=e.uid,o=t._pipelineMap.get(i);o.head||(o.head=n),o.tail&&o.tail.pipe(n),(o.tail=n).__idxInPipeline=o.count++,n.__pipeline=o}function _a(t,e){for(var n in e.prototype)t[n]=x}function wa(t){for(A(t)&&(t=(new DOMParser).parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function ba(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}function Sa(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),O(e.__inheritedStyle,t.__inheritedStyle))}function Ma(t){for(var e=p(t).split(P_),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),a=parseFloat(e[i+1]);n.push([o,a])}return n}function Ia(t,e,n,i){var o,a=e.__inheritedStyle||{},r="text"===e.type;if(1===t.nodeType&&(function(t,e){var n=t.getAttribute("transform");if(n){var i=null,o=[];(n=n.replace(/,/g," ")).replace(z_,function(t,e,n){o.push(e,n)});for(var a=o.length-1;0<a;a-=2){var r=o[a],s=o[a-1];switch(i=i||dt(),s){case"translate":r=p(r).split(P_),mt(i,i,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=p(r).split(P_),yt(i,i,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=p(r).split(P_),vt(i,i,parseFloat(r[0]));break;case"skew":r=p(r).split(P_),console.warn("Skew transform is not supported yet");break;case"matrix":r=p(r).split(P_),i[0]=parseFloat(r[0]),i[1]=parseFloat(r[1]),i[2]=parseFloat(r[2]),i[3]=parseFloat(r[3]),i[4]=parseFloat(r[4]),i[5]=parseFloat(r[5])}}}e.setLocalTransform(i)}(t,e),P(a,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,o,a={};for(B_.lastIndex=0;null!=(i=B_.exec(e));)a[i[1]]=i[2];for(o in R_)R_.hasOwnProperty(o)&&null!=a[o]&&(n[R_[o]]=a[o]);return n}(t)),!i))for(var s in R_){!R_.hasOwnProperty(s)||null!=(o=t.getAttribute(s))&&(a[R_[s]]=o)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";e.style=e.style||new pm;var h=e.style;null!=a.fill&&h.set(l,Ta(a.fill,n)),null!=a.stroke&&h.set(u,Ta(a.stroke,n)),z(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&r?"textStrokeWidth":t;null!=a[t]&&h.set(e,parseFloat(a[t]))}),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),z(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=a[t]&&h.set(t,a[t])}),a.lineDash&&(e.style.lineDash=p(a.lineDash).split(P_)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=a}function Ta(t,e){var n=e&&t&&t.match(E_);return n?e[p(n[1])]:t}function Aa(t,e,n){var i=e/t.width,o=n/t.height,a=Math.min(i,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+n/2]}}function Da(i){return function(t,e,n){t=t&&t.toLowerCase(),wf.prototype[i].call(this,t,e,n)}}function Ca(){wf.call(this)}function La(t,e,n){function i(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=rw[e]),this.id,this.group,this._dom=t;var o=this._zr=$e(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=ra(k(o.flush,o),17),(e=D(e))&&zx(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Mo;var a,r,s,l,u=this._api=(r=(a=this)._coordSysMgr,P(new So(a),{getCoordinateSystems:k(r.getCoordinateSystems,r),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return a._model.getComponent(e.mainType,e.index);t=t.parent}}}));ae(aw,i),ae(nw,i),this._scheduler=new ua(this,u,nw,aw),wf.call(this,this._ecEventProcessor=new Za),this._messageCenter=new Ca,this._initEvents(),this.resize=k(this.resize,this),this._pendingActions=[],o.animation.on("frame",this._onframe,this),l=this,(s=o).on("rendered",function(){l.trigger("rendered"),!s.animation.isFinished()||l[q_]||l._scheduler.unfinished||l._pendingActions.length||l.trigger("finished")}),c(this)}function ka(t,e,n){var i,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=un(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(i=s[t](o,e,n)))return i}}function Pa(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),Ba(t,"component",e,n),Ba(t,"chart",e,n),n.plan()}function Na(e,n,i,o,t){function a(t){t&&t.__alive&&t[n]&&t[n](t.__model,u,e._api,i)}var r,s,l,u=e._model;o?((r={})[o+"Id"]=i[o+"Id"],r[o+"Index"]=i[o+"Index"],r[o+"Name"]=i[o+"Name"],s={mainType:o,query:r},t&&(s.subType=t),null!=(l=i.excludeSeriesId)&&(l=C(Qe(l))),u&&u.eachComponent(s,function(t){l&&null!=l.get(t.id)||a(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)):H_(e._componentsViews.concat(e._chartsViews),a)}function Oa(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})}function Ra(e,t){var n=e.type,i=e.escapeConnect,o=tw[n],a=o.actionInfo,r=(s=(a.update||"update").split(":")).pop(),s=null!=s[0]&&X_(s[0]);this[Y_]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=L(e.batch,function(t){return(t=O(P({},t),e)).batch=null,t}));var h,c=[],d="highlight"===n||"downplay"===n;H_(l,function(t){(h=(h=o.action(t,this._model,this._api))||P({},t)).type=a.event||h.type,c.push(h),d?Na(this,r,t,"series"):s&&Na(this,r,t,s.main,s.sub)},this),"none"===r||d||s||(this[q_]?(Pa(this),J_.update.call(this,e),this[q_]=!1):J_[r].call(this,e)),h=u?{type:a.event||n,escapeConnect:i,batch:c}:c[0],this[Y_]=!1,t||this._messageCenter.trigger(h.type,h)}function Ea(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Ra.call(this,n,t)}}function za(t){t||this.trigger("updated")}function Ba(t,e,o,a){function n(t){var e,n="_ec_"+t.id+"_"+t.type,i=l[n];i||(e=X_(t.type),(i=new(r?s_.getClass(e.main,e.sub):ea.getClass(e.sub))).init(o,h),l[n]=i,s.push(i),u.add(i.group)),t.__viewId=i.__id=n,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||a.prepareView(i,t,o,h)}for(var r="component"===e,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;i<s.length;i++)s[i].__alive=!1;for(r?o.eachComponent(function(t,e){"series"!==t&&n(e)}):o.eachSeries(n),i=0;i<s.length;){var c=s[i];c.__alive?i++:(r||c.renderTask.dispose(),u.remove(c.group),c.dispose(o,h),s.splice(i,1),delete l[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Va(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Ga(t,e,n,i){var o,a,r,s,l;o=t,a=e,r=n,s=i,H_(l||o._componentsViews,function(t){var e=t.__model;t.render(e,a,r,s),Ha(e,t)}),H_(t._chartsViews,function(t){t.__alive=!1}),Fa(t,e,0,i),H_(t._chartsViews,function(t){t.__alive||t.remove(e,n)})}function Fa(a,t,e,r,s){var l,n,i,o,u,h=a._scheduler;t.eachSeries(function(t){var e=a._chartsMap[t.__viewId];e.__alive=!0;var n,i,o=e.renderTask;h.updatePayload(o,r),s&&s.get(t.uid)&&o.dirty(),l|=o.perform(h.getPerformArgs(o)),e.group.silent=!!t.get("silent"),Ha(t,e),n=e,i=t.get("blendMode")||null,n.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}),h.unfinished|=l,n=a._zr,i=t,o=n.storage,u=0,o.traverse(function(t){t.isGroup||u++}),u>i.get("hoverLayerThreshold")&&!ef.node&&o.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),x_(a._zr.dom,t)}function Wa(e,n){H_(ow,function(t){t(e,n)})}function Ha(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Za(){this.eventInfo}function Ua(t){uw[t]=!1}function Xa(t){return lw[n=dw,(e=t).getAttribute?e.getAttribute(n):e[n]];var e,n}function ja(t,e){rw[t]=e}function Ya(t){iw.push(t)}function qa(t,e){tr(nw,t,e,1e3)}function Ka(t,e,n){"function"==typeof e&&(n=e,e="");var i=U_(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,W_(K_.test(i)&&K_.test(e)),tw[i]||(tw[i]={action:n,actionInfo:t}),ew[e]=i}function $a(t,e){Mo.register(t,e)}function Ja(t,e){tr(aw,t,e,1e3,"layout")}function Qa(t,e){tr(aw,t,e,3e3,"visual")}function tr(t,e,n,i,o){(Z_(e)||U_(e))&&(n=e,e=i);var a=ua.wrapStageHandler(n,o);return a.__prio=e,a.__raw=n,t.push(a),a}function er(t,e){sw[t]=e}function nr(t){return ux.extend(t)}function ir(t){return s_.extend(t)}function or(t){return r_.extend(t)}function ar(t){return ea.extend(t)}function rr(t){return t}function sr(t,e,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||rr,this._newKeyGetter=i||rr,this.context=o}function lr(t,e,n,i,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[i](t[a],a),s=e[r];null==s?(n.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}function ur(a){var t={},r=t.encode={},s=C(),l=[],u=[];z(a.dimensions,function(t){var e,n,o=a.getDimensionInfo(t),i=o.coordDim;i&&(e=r[i],r.hasOwnProperty(i)||(e=r[i]=[]),e[o.coordDimIndex]=t,o.isExtraCoord||(s.set(i,1),"ordinal"===(n=o.type)||"time"===n||(l[0]=t)),o.defaultTooltip&&u.push(t)),fw.each(function(t,e){var n=r[e];r.hasOwnProperty(e)||(n=r[e]=[]);var i=o.otherDims[e];null!=i&&!1!==i&&(n[i]=o.name)})});var i=[],o={};s.each(function(t,e){var n=r[e];o[e]=n[0],i=i.concat(n)}),t.dataDimsOnCoord=i,t.encodeFirstDimNotExtra=o;var e=r.label;e&&e.length&&(l=e.slice());var n=r.tooltip;return n&&n.length?u=n.slice():u.length||(u=l.slice()),r.defaultedLabel=l,r.defaultedTooltip=u,t}function hr(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function cr(t){return 65535<t._rawCount?yw:xw}function dr(e,n){z(_w.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,z(ww,function(t){e[t]=D(n[t])}),e._calculationInfo=P(n._calculationInfo)}function pr(t,e,n){var i,o,a,r,s,l,u;return null!=e&&(o=t._chunkSize,a=Math.floor(n/o),r=n%o,s=t.dimensions[e],(l=t._storage[s][a])&&(i=l[r],(u=t._dimensionInfos[s].ordinalMeta)&&u.categories.length&&(i=u.categories[i]))),i}function gr(t){return t}function fr(t){return t<this._count&&0<=t?this._indices[t]:-1}function mr(t,e){var n=t._idList[e];return null==n&&(n=pr(t,t._idDimIdx,e)),null==n&&(n="e\0\0"+e),n}function vr(t){return N(t)||(t=[t]),t}function yr(t,e){var n=t.dimensions,i=new gw(L(n,t.getDimensionInfo,t),t.hostModel);dr(i,t);for(var o=i._storage={},a=t._storage,r=0;r<n.length;r++){var s=n[r];a[s]&&(0<=M(e,s)?(o[s]=function(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=function(t){var e=t.constructor;return e===Array?t.slice():new e(t)}(t[n]);return e}(a[s]),i._rawExtent[s]=[1/0,-1/0],i._extent[s]=null):o[s]=a[s])}return i}function xr(t,e,n){function l(t,e,n){null!=fw.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,d.set(e,!0))}fo.isInstance(e)||(e=fo.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i,o,a,r,s,u=(n.dimsDef||[]).slice(),h=C(n.encodeDef),c=C(),d=C(),p=[],g=(i=e,o=t,a=u,r=n.dimCount,s=Math.max(i.dimensionsDetectCount||1,o.length,a.length,r||0),z(o,function(t){var e=t.dimsDef;e&&(s=Math.max(s,e.length))}),s),f=0;f<g;f++){var m=u[f]=P({},B(u[f])?u[f]:{name:u[f]}),v=m.name,y=p[f]={otherDims:{}};null!=v&&null==c.get(v)&&(y.name=y.displayName=v,c.set(v,f)),null!=m.type&&(y.type=m.type),null!=m.displayName&&(y.displayName=m.displayName)}h.each(function(t,n){var i;1===(t=Qe(t).slice()).length&&t[0]<0?h.set(n,!1):(i=h.set(n,[]),z(t,function(t,e){A(t)&&(t=c.get(t)),null!=t&&t<g&&(i[e]=t,l(p[t],n,e))}))});var x=0;z(t,function(o,t){var a,r,s,e;A(o)?(a=o,o={}):(a=o.name,e=o.ordinalMeta,o.ordinalMeta=null,(o=D(o)).ordinalMeta=e,r=o.dimsDef,s=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var n=h.get(a);if(!1!==n){if(!(n=Qe(n)).length)for(var i=0;i<(r&&r.length||1);i++){for(;x<p.length&&null!=p[x].coordDim;)x++;x<p.length&&n.push(x++)}z(n,function(t,e){var n,i=p[t];l(O(i,o),a,e),null==i.name&&r&&(B(n=r[e])||(n={name:n}),i.name=i.displayName=n.name,i.defaultTooltip=n.defaultTooltip),s&&O(i.otherDims,s)})}});for(var _,w,b=n.generateCoord,S=null!=(M=n.generateCoordCount),M=b?M||1:0,I=b||"value",T=0;T<g;T++)null==(y=p[T]=p[T]||{}).coordDim&&(y.coordDim=_r(I,d,S),y.coordDimIndex=0,(!b||M<=0)&&(y.isExtraCoord=!0),M--),null==y.name&&(y.name=_r(y.coordDim,c)),null==y.type&&(_=e,w=T,y.name,xo(_.data,_.sourceFormat,_.seriesLayoutBy,_.dimensionsDefine,_.startIndex,w))&&(y.type="ordinal");return p}function _r(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function wr(t,n,e){var i,o,a,r,s,l,u,h=(e=e||{}).byIndex,c=e.stackedCoordDimension,d=!(!t||!t.get("stack"));return z(n,function(t,e){A(t)&&(n[e]=t={name:t}),d&&!t.isExtraCoord&&(h||i||!t.ordinalMeta||(i=t),o||"ordinal"===t.type||"time"===t.type||c&&c!==t.coordDim||(o=t))}),!o||h||i||(h=!0),o&&(a="__\0ecstackresult",r="__\0ecstackedover",i&&(i.createInvertedIndices=!0),s=o.coordDim,l=o.type,u=0,z(n,function(t){t.coordDim===s&&u++}),n.push({name:a,coordDim:s,coordDimIndex:u,type:l,isExtraCoord:!0,isCalculationCoord:!0}),u++,n.push({name:r,coordDim:r,coordDimIndex:u,type:l,isExtraCoord:!0,isCalculationCoord:!0})),{stackedDimension:o&&o.name,stackedByDimension:i&&i.name,isStackedByIndex:h,stackedOverDimension:r,stackResultDimension:a}}function br(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Sr(t,e){return br(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Mr(t,e,n){n=n||{},fo.isInstance(t)||(t=fo.seriesDataToSource(t));var i,o=e.get("coordinateSystem"),a=Mo.get(o),r=po(e);r&&(i=L(r.coordSysDims,function(t){var e,n={name:t},i=r.axisMap.get(t);return i&&(e=i.get("type"),n.type=hr(e)),n})),i=i||(a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=Mw(t,{coordDimensions:i,generateCoord:n.generateCoord});r&&z(u,function(t,e){var n=t.coordDim,i=r.categoryAxisMap.get(n);i&&(null==s&&(s=e),t.ordinalMeta=i.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=wr(e,u),c=new gw(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===vx){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!N(en(e))}}(t)?function(t,e,n,i){return i===s?n:this.defaultDimValueGetter(t,e,n,i)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function Ir(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Tr(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function Ar(t){return t._map||(t._map=C(t.categories))}function Dr(t){return B(t)&&null!=t.value?t.value:t+""}function Cr(t){return Gi(t)+2}function Lr(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function kr(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Lr(t,0,e),Lr(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Pr(t){return t.get("stack")||kw+t.seriesIndex}function Nr(t){return t.dim+t.index}function Or(t,e){var n=[];return e.eachSeriesByType(t,function(t){Vr(t)&&!Gr(t)&&n.push(t)}),n}function Rr(t){var u=[];return z(t,function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=n.getExtent(),o="category"===n.type?n.getBandWidth():Math.abs(i[1]-i[0])/e.count(),a=Ei(t.get("barWidth"),o),r=Ei(t.get("barMaxWidth"),o),s=t.get("barGap"),l=t.get("barCategoryGap");u.push({bandWidth:o,barWidth:a,barMaxWidth:r,barGap:s,barCategoryGap:l,axisKey:Nr(n),stackId:Pr(t)})}),Er(u)}function Er(t){var c={};z(t,function(t,e){var n=t.axisKey,i=t.bandWidth,o=c[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;c[n]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var u=t.barGap;null!=u&&(o.gap=u);var h=t.barCategoryGap;null!=h&&(o.categoryGap=h)});var d={};return z(c,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Ei(t.categoryGap,i),a=Ei(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(e,function(t,e){var n=t.maxWidth;n&&n<l&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;z(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;z(e,function(t,e){d[n][e]=d[n][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}function zr(t,e,n){if(t&&e){var i=t[Nr(e)];return null!=i&&null!=n&&(i=i[Pr(n)]),i}}function Br(t,e){var n=Or(t,e),T=Rr(n),A={};z(n,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=Pr(t),a=T[Nr(i)][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;A[o]=A[o]||[],e.setLayout({offset:r,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),d=br(e,h),p=l.isHorizontal(),g=Fr(0,l),f=0,m=e.count();f<m;f++){var v,y,x,_,w,b,S,M=e.get(h,f),I=e.get(c,f);isNaN(M)||(v=0<=M?"p":"n",y=g,d&&(A[o][I]||(A[o][I]={p:g,n:g}),y=A[o][I][v]),p?(_=y,w=(x=n.dataToPoint([M,I]))[1]+r,b=x[0]-g,S=s,Math.abs(b)<u&&(b=(b<0?-1:1)*u),d&&(A[o][I][v]+=b)):(_=(x=n.dataToPoint([I,M]))[0]+r,w=y,b=s,S=x[1]-g,Math.abs(S)<u&&(S=(S<=0?-1:1)*u),d&&(A[o][I][v]+=S)),e.setItemLayout(f,{x:_,y:w,width:b,height:S}))}},this)}function Vr(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Gr(t){return t.pipelineContext&&t.pipelineContext.large}function Fr(t,e){var n,i=e.getGlobalExtent(),o=i[0]>i[1]?(n=i[1],i[0]):(n=i[0],i[1]),a=e.toGlobalCoord(e.dataToCoord(0));return a<n&&(a=n),o<a&&(a=o),a}function Wr(t,e){return Ww(t,Fw(e))}function Hr(t,e){var n,i,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?n=e.getCategories().length:(N(i=e.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Ei(i[0],1),i[1]=Ei(i[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?n?0:NaN:h[0]-i[0]*o),null==s&&(s="ordinal"===a?n?n-1:NaN:h[1]+i[1]*o),"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=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(m(r)||m(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c,d,p,g,f=e.ecModel;return f&&"time"===a&&(z(d=Or("bar",f),function(t){c|=t.getBaseAxis()===e.axis}),c&&(p=Rr(d),r=(g=function(t,e,n,i){var o=n.axis.getExtent(),a=o[1]-o[0],r=zr(i,n.axis);if(void 0===r)return{min:t,max:e};var s=1/0;z(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;z(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=h/(1-(s+l)/a)-h;return{min:t-=s/u*c,max:e+=l/u*c}}(r,s,e,p)).min,s=g.max)),[r,s]}function Zr(t,e){var n=Hr(t,e),i=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:a,fixMin:i,fixMax:o,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 Ur(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Aw(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Lw;default:return(Ir.getClass(e)||Lw).create(t)}}function Xr(n){var e,i=n.getLabelModel().get("formatter"),o="category"===n.type?n.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(t){return t=n.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof i?function(t,e){return null!=o&&(e=t-o),i(jr(n,t),e)}:function(t){return n.scale.getLabel(t)}}function jr(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Yr(t){var e,n,i,o,a,r,s,l,u=t.model,h=t.scale;if(u.get("axisLabel.show")&&!h.isBlank()){var c,d,p="category"===t.type,g=h.getExtent(),f=p?h.count():(c=h.getTicks()).length,m=t.getLabelModel(),v=Xr(t),y=1;40<f&&(y=Math.ceil(f/40));for(var x=0;x<f;x+=y){var _=v(c?c[x]:g[0]+x),w=(e=m.getTextRect(_),n=m.get("rotate")||0,l=s=r=a=o=i=void 0,i=n*Math.PI/180,o=e.plain(),a=o.width,r=o.height,s=a*Math.cos(i)+r*Math.sin(i),l=a*Math.sin(i)+r*Math.cos(i),new Qt(o.x,o.y,s,l));d?d.union(w):d=w}return d}}function qr(t,e){var n,i;"image"!==this.type&&(n=this.style,(i=this.shape)&&"line"===i.symbolType?n.stroke=t:this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff"):(n.fill&&(n.fill=t),n.stroke&&(n.stroke=t)),this.dirty(!1))}function Kr(t,e,n,i,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?qn(t.slice(8),new Qt(e,n,i,o),r?"center":"cover"):0===t.indexOf("path://")?Yn(t.slice(7),{},new Qt(e,n,i,o),r?"center":"cover"):new eb({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=l,s.setColor=qr,s.setColor(a),s}function $r(t,e){return Math.abs(t-e)<ob}function Jr(t,e,n){var i=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];i+=Rn(o[0],o[1],r[0],r[1],e,n),o=r}var s=t[0];return $r(o[0],s[0])&&$r(o[1],s[1])||(i+=Rn(o[0],o[1],s[0],s[1],e,n)),0!==i}function Qr(t,e,n){var i;this.name=t,this.geometries=e,n=n?[n[0],n[1]]:[(i=this.getBoundingRect()).x+i.width/2,i.y+i.height/2],this.center=n}function ts(t,e,n){for(var i=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=(s=t.charCodeAt(r)-64)>>1^-(1&s),l=(l=t.charCodeAt(r+1)-64)>>1^-(1&l),o=s+=o,a=l+=a;i.push([s/n,l/n])}return i}function es(t){return"category"===t.type?(a=(o=t).getLabelModel(),r=is(o,a),!a.get("show")||o.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(e=(n=t).scale.getTicks(),i=Xr(n),{labels:L(e,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t}})});var n,e,i,o,a,r}function ns(t,e){return"category"===t.type?function(t,e){var n,i,o=os(t,"ticks"),a=us(e),r=as(o,a);if(r)return r;{var s;e.get("show")&&!t.scale.isBlank()||(n=[]),n=f(a)?ls(t,a,!0):"auto"===a?(s=is(t,t.getLabelModel()),i=s.labelCategoryInterval,L(s.labels,function(t){return t.tickValue})):ss(t,i=a,!0)}return rs(o,a,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:t.scale.getTicks()}}function is(t,e){var n,i,o,a=os(t,"labels"),r=us(e),s=as(a,r);return s||rs(a,r,{labels:f(r)?ls(t,r):ss(t,n="auto"===r?null!=(o=rb(i=t).autoInterval)?o:rb(i).autoInterval=i.calculateCategoryInterval():r),labelCategoryInterval:n})}function os(t,e){return rb(t)[e]||(rb(t)[e]=[])}function as(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function rs(t,e,n){return t.push({key:e,value:n}),n}function ss(t,e,n){function i(t){l.push(n?t:{formattedLabel:o(t),rawLabel:a.getLabel(t),tickValue:t})}var o=Xr(t),a=t.scale,r=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=a.count();0!==h&&1<u&&2<c/u&&(h=Math.round(Math.ceil(h/u)*u));var d=s.get("showMinLabel"),p=s.get("showMaxLabel");d&&h!==r[0]&&i(r[0]);for(var g=h;g<=r[1];g+=u)i(g);return p&&g!==r[1]&&i(r[1]),l}function ls(t,n,i){var o=t.scale,a=Xr(t),r=[];return z(o.getTicks(),function(t){var e=o.getLabel(t);n(t,e)&&r.push(i?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}function us(t){var e=t.get("interval");return null==e?"auto":e}function hs(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function cs(t,e){var n=t.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Ho(t,e,n[0]);if(i){for(var o=[],a=0;a<n.length;a++){var r=Ho(t,e,n[a]);o.push(r)}return o.join(" ")}}function ds(t,e,n){rm.call(this),this.updateData(t,e,n)}function ps(t){return[t[0]/2,t[1]/2]}function gs(t,e){this.parent.drift(t,e)}function fs(){si(this)||vs.call(this)}function ms(){si(this)||ys.call(this)}function vs(){var t,e;this.incremental||this.useHoverLayer||(e=(t=this.__symbolOriginalScale)[1]/t[0],this.animateTo({scale:[Math.max(1.1*t[0],t[0]+3),Math.max(1.1*t[1],t[1]+3*e)]},400,"elasticOut"))}function ys(){this.incremental||this.useHoverLayer||this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function xs(t){this.group=new rm,this._symbolCtor=t||ds}function _s(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function ws(t){return null==t||B(t)||(t={isIgnore:t}),t||{}}function bs(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function Ss(t,e,n){var i,o,a,r,s=t.getBaseAxis(),l=t.getOtherAxis(s),u=(o=n,a=0,r=l.scale.getExtent(),"start"===o?a=r[0]:"end"===o?a=r[1]:0<r[0]?a=r[0]:r[1]<0&&(a=r[1]),a),h=s.dim,c=l.dim,d=e.mapDimension(c),p=e.mapDimension(h),g="x"===c||"radius"===c?1:0,f=L(t.dimensions,function(t){return e.mapDimension(t)}),m=e.getCalculationInfo("stackResultDimension");return(i|=br(e,f[0]))&&(f[0]=m),(i|=br(e,f[1]))&&(f[1]=m),{dataDimsForPoint:f,valueStart:u,valueAxisDim:c,baseAxisDim:h,stacked:!!i,valueDim:d,baseDim:p,baseDataOffset:g,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Ms(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=n.get(t.baseDim,i),r[1-a]=o,e.dataToPoint(r)}function Is(t){return isNaN(t[0])||isNaN(t[1])}function Ts(t,e,n,i,o,a,r,s,l,u){return"none"!==u&&u?function(t,e,n,i,o,a,r,s,l,u,h){for(var c=0,d=n,p=0;p<i;p++){var g,f,m,v=e[d];if(o<=d||d<0)break;if(Is(v)){if(h){d+=a;continue}break}d===n?t[0<a?"moveTo":"lineTo"](v[0],v[1]):0<l?(g=e[c],m=(v[f="y"===u?1:0]-g[f])*l,bb(Mb,g),Mb[f]=g[f]+m,bb(Ib,v),Ib[f]=v[f]-m,t.bezierCurveTo(Mb[0],Mb[1],Ib[0],Ib[1],v[0],v[1])):t.lineTo(v[0],v[1]),c=d,d+=a}return p}.apply(this,arguments):function(t,e,n,i,o,a,r,s,l,u,h){for(var c,d,p=0,g=n,f=0;f<i;f++){var m=e[g];if(o<=g||g<0)break;if(Is(m)){if(h){g+=a;continue}break}if(g===n)t[0<a?"moveTo":"lineTo"](m[0],m[1]),bb(Mb,m);else if(0<l){var v=g+a,y=e[v];if(h)for(;y&&Is(e[v]);)y=e[v+=a];var x,_=.5,w=e[p];!(y=e[v])||Is(y)?bb(Ib,m):(Is(y)&&!h&&(y=m),U(Sb,y,w),d="x"===u||"y"===u?(x="x"===u?0:1,c=Math.abs(m[x]-w[x]),Math.abs(m[x]-y[x])):(c=vf(m,w),vf(m,y)),wb(Ib,m,Sb,-l*(1-(_=d/(d+c))))),xb(Mb,Mb,s),_b(Mb,Mb,r),xb(Ib,Ib,s),_b(Ib,Ib,r),t.bezierCurveTo(Mb[0],Mb[1],Ib[0],Ib[1],m[0],m[1]),wb(Mb,m,Sb,l*_)}else t.lineTo(m[0],m[1]);p=g,g+=a}return f}.apply(this,arguments)}function As(t,e){var n=[1/0,1/0],i=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}function Ds(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++){var i=t[n],o=e[n];if(i[0]!==o[0]||i[1]!==o[1])return}return 1}}function Cs(t){return"number"==typeof t?t:t?.5:0}function Ls(t){var e,n,i=t.getGlobalExtent();return t.onBand&&(e=t.getBandWidth()/2-1,n=i[1]>i[0]?1:-1,i[0]+=n*e,i[1]-=n*e),i}function ks(t,e,n,i){return("polar"===t.type?function(t,e,n,i){var o=t.getAngleAxis(),a=t.getRadiusAxis().getExtent().slice();a[0]>a[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;n&&(a[0]-=.5,a[1]+=.5);var l=new my({shape:{cx:zi(t.cx,1),cy:zi(t.cy,1),r0:zi(a[0],1),r:zi(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,Mi(l,{shape:{endAngle:-r[1]*s}},i)),l}:function(t,e,n,i){var o,a,r=Ls(t.getAxis("x")),s=Ls(t.getAxis("y")),l=t.getBaseAxis().isHorizontal(),u=Math.min(r[0],r[1]),h=Math.min(s[0],s[1]),c=Math.max(r[0],r[1])-u,d=Math.max(s[0],s[1])-h;n?(u-=.5,c+=.5,h-=.5,d+=.5):(o=i.get("lineStyle.width")||2,a=i.get("clipOverflow")?o/2:Math.max(c,d),l?(h-=a,d+=2*a):(u-=a,c+=2*a));var p=new _y({shape:{x:u,y:h,width:c,height:d}});return e&&(p.shape[l?"width":"height"]=0,Mi(p,{shape:{width:c,height:d}},i)),p})(t,e,n,i)}function Ps(t,e,n){for(var i=e.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(n){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=(l[o]+s[o])/2,c=[];u[o]=c[o]=h,u[1-o]=l[1-o],c[1-o]=s[1-o],a.push(u),a.push(c);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function Ns(t,e,n){var i=t.get("showAllSymbol"),o="auto"===i;if(!i||o){var a=n.getAxesByScale("ordinal")[0];if(a&&(!o||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*ds.getSymbolSize(e,r)[t.isHorizontal()?1:0]>i)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return z(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Os(t){return this._axes[t]}function Rs(t){kb.call(this,t)}function Es(t,e){return e.type||(e.data?"category":"value")}function zs(t,e){return t.getCoordSysModel()===e}function Bs(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}function Vs(t,e,n,i){function o(t){return t.dim+"_"+t.index}n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=n.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)Gs(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&Gs(r[h])&&!i[o(r[h])]){a=r[h];break}a&&(i[o(a)]=!0)}}function Gs(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=t.scale.getExtent(),n=e[0],i=e[1],!(0<n&&0<i||n<0&&i<0));var e,n,i}function Fs(e){return L(Fb,function(t){return e.getReferringComponents(t)[0]})}function Ws(t){return"cartesian2d"===t.get("coordinateSystem")}function Hs(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function Zs(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function Us(t){t&&(t.ignore=!0)}function Xs(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=pt([]);return vt(o,o,-t.rotation),n.applyTransform(ft([],o,t.getLocalTransform())),i.applyTransform(ft([],o,e.getLocalTransform())),n.intersect(i)}}function js(t){return"middle"===t||"center"===t}function Ys(t,e){var g,f,n,a,m,v,y,i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return g=i,n=e,a=(f=t).getComponent("tooltip"),m=f.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[],Xb(n.getCoordinateSystems(),function(c){function t(t,e,n){var i,o,a,r,s,l,u=n.model.getModel("axisPointer",m),h=u.get("show");h&&("auto"!==h||t||$s(u))&&(null==e&&(e=u.get("triggerTooltip")),i=(u=t?function(t,e,n,i,o,a){var r=e.getModel("axisPointer"),s={};Xb(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=D(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});{var u,h;null==l.show&&(l.show=!1),"cross"===o&&(u=r.get("label.show"),l.show=null==u||u,a||(h=s.lineStyle=r.get("crossStyle"))&&O(l,h.textStyle))}return t.model.getModel("axisPointer",new ki(s,n,i))}(n,p,m,f,t,e):u).get("snap"),o=Js(n.model),a=e||i||"category"===n.type,r=g.axesInfo[o]={key:o,axis:n,coordSys:c,axisPointerModel:u,triggerTooltip:e,involveSeries:a,snap:i,useHandle:$s(u),seriesModels:[]},d[o]=r,g.seriesInvolved|=a,null!=(s=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(qs(a[i+"AxisId"],n.id)||qs(a[i+"AxisIndex"],n.componentIndex)||qs(a[i+"AxisName"],n.name))return o}}(v,n))&&((l=y[s]||(y[s]={axesInfo:{}})).axesInfo[o]=r,l.mapper=v[s].mapper,r.linkGroup=l))}var e,d,p,n,i,o;c.axisPointerEnabled&&(e=Js(c.model),d=g.coordSysAxesInfo[e]={},p=(g.coordSysMap[e]=c).model.getModel("tooltip",a),Xb(c.getAxes(),jb(t,!1,null)),c.getTooltipAxes&&a&&p.get("show")&&(n="axis"===p.get("trigger"),i="cross"===p.get("axisPointer.type"),o=c.getTooltipAxes(p.get("axisPointer.axis")),(n||i)&&Xb(o.baseAxes,jb(t,!i||"cross",n)),i&&Xb(o.otherAxes,jb(t,"cross",!1))))}),i.seriesInvolved&&function(o,t){t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get("tooltip.trigger",!0),e=n.get("tooltip.show",!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get("axisPointer.show",!0)&&Xb(o.coordSysAxesInfo[Js(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})},this)}(i,t),i}function qs(t,e){return"all"===t||N(t)&&0<=M(t,e)||t===e}function Ks(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Js(t)]}function $s(t){return!!t.get("handle.show")}function Js(t){return t.type+"||"+t.id}function Qs(t,e,n,i,o,a){var r,s,l=Yb.getAxisPointerClass(t.axisPointerClass);l&&((r=(s=Ks(e))&&s.axisPointerModel)?(t._axisPointer||(t._axisPointer=new l)).render(e,r,i,a):tl(t,i))}function tl(t,e,n){var i=t._axisPointer;i&&i.dispose(e,n),t._axisPointer=null}function el(t,e,n){n=n||{};var i,o=t.coordinateSystem,a=e.axis,r={},s=a.getAxesOnZeroOf()[0],l=a.position,u=s?"onZero":l,h=a.dim,c=o.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},g=e.get("offset")||0,f="x"===h?[d[2]-g,d[3]+g]:[d[0]-g,d[1]+g];s&&(i=s.toGlobalCoord(s.dataToCoord(0)),f[p.onZero]=Math.max(Math.min(i,f[1]),f[0])),r.position=["y"===h?f[p[u]]:d[0],"x"===h?f[p[u]]:d[3]],r.rotation=Math.PI/2*("x"===h?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],r.labelOffset=s?f[p[l]]-f[p.onZero]:0,e.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),V(n.labelInside,e.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=e.get("axisLabel.rotate");return r.labelRotate="top"===u?-m:m,r.z2=1,r}function nl(t,e,n,i,o,a){gi(t,e,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:cs(o.getData(),a),isRectText:!0,autoColor:i}),il(t),il(e)}function il(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function ol(t,e,n){n.style.text=null,Si(n,{shape:{width:0}},e,t,function(){n.parent&&n.parent.remove(n)})}function al(t,e,n){n.style.text=null,Si(n,{shape:{r:n.shape.r0}},e,t,function(){n.parent&&n.parent.remove(n)})}function rl(t,e,n,i,o,a,r,s){var l=e.getItemVisual(n,"color"),u=e.getItemVisual(n,"opacity"),h=i.getModel("itemStyle"),c=i.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",h.get("barBorderRadius")||0),t.useStyle(O({fill:l,opacity:u},h.getBarItemStyle()));var d=i.getShallow("cursor");d&&t.attr("cursor",d);r?o.height:o.width;s||nl(t.style,c,i,l,a,n),di(t,c)}function sl(t,e,n){var i=t.getData(),o=[],a=i.getLayout("valueAxisHorizontal")?1:0;o[1-a]=i.getLayout("valueAxisStart");var r,s,l,u,h,c=new oS({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:o,__valueIdx:a});e.add(c),r=c,s=t,u=(l=i).getVisual("borderColor")||l.getVisual("color"),h=s.getModel("itemStyle").getItemStyle(["color","borderColor"]),r.useStyle(h),r.style.fill=null,r.style.stroke=u,r.style.lineWidth=l.getLayout("barWidth")}function ll(t,e,n,i){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){ul(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,n)})}function ul(t,e,n,i,o){var a=(e.startAngle+e.endAngle)/2,r=n?i:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function hl(t,e){function n(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function i(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}rm.call(this);var o=new my({z2:2}),a=new xy,r=new cy;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function cl(o,t,e,n,i,a,r){function s(t,e){for(var n=t;0<=n&&(o[n].y-=e,!(0<n&&o[n].y>o[n-1].y+o[n-1].height));n--);}function l(t,e,n,i,o,a){for(var r,s,l,u,h=e?Number.MAX_VALUE:0,c=0,d=t.length;c<d;c++){"center"!==t[c].position&&(r=Math.abs(t[c].y-i),s=t[c].len,l=t[c].len2,u=r<o+s?Math.sqrt((o+s+l)*(o+s+l)-r*r):Math.abs(t[c].x-n),e&&h<=u&&(u=h-10),!e&&u<=h&&(u=h+10),t[c].x=n+u*a,h=u)}}o.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=o.length,d=[],p=[],g=0;g<c;g++)(u=o[g].y-h)<0&&function(t,e,n){for(var i=t;i<e;i++)if(o[i].y+=n,t<i&&i+1<e&&o[i+1].y>o[i].y+o[i].height)return s(i,n/2);s(e-1,n/2)}(g,c,-u),h=o[g].y+o[g].height;for(r-h<0&&s(c-1,h-r),g=0;g<c;g++)o[g].y>=e?p.push(o[g]):d.push(o[g]);l(d,!1,t,e,n,i),l(p,!0,t,e,n,i)}function dl(){this.group=new rm}function pl(t,e,n){lb.call(this,t,e,n),this.type="value",this.angle=0,this.name="",this.model}function gl(t,e,n){this._model=t,this.dimensions=[],this._indicatorAxes=L(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,i=new pl(n,new Lw);return i.name=t.get("name"),(i.model=t).axis=i,this.dimensions.push(n),i},this),this.resize(t,n),this.cx,this.cy,this.r,this.r0,this.startAngle}function fl(t,e){return O({show:e},t)}function ml(){kf.call(this)}function vl(t){this.name=t,this.zoomLimit,kf.call(this),this._roamTransformable=new ml,this._rawTransformable=new ml,this._center,this._zoom}function yl(t,e,n,i){var o=n.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](i):null}function xl(t,e){var n,i,o,a,r=t.svgXML;try{d(null!=(i=(n=r&&(o=r,a={ignoreViewBox:!0,ignoreRootClip:!0},(new ba).parse(o,a))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var s,l,u=n.width,h=n.height,c=n.viewBoxRect;return e||(e=null==u||null==h?i.getBoundingRect():new Qt(0,0,0,0),null!=u&&(e.width=u),null!=h&&(e.height=h)),c&&(s=Aa(c,e.width,e.height),l=i,(i=new rm).add(l),l.scale=s.scale,l.position=s.position),i.setClipPath(new _y({shape:e.plain()})),{root:i,boundingRect:e}}function _l(a){return function(n,i){var o=[];return z(wl(n),function(t){var e=kS[t.type][a];e&&o.push(e(n,t,i))}),o}}function wl(t){return G_.retrieveMap(t)||[]}function bl(t,e,n,i){vl.call(this,t),this.map=e;var o=PS.load(e,n);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.nameCoordMap,this._invertLongitute=null==i||i,this.regions=o.regions,this._rect=o.boundingRect}function Sl(t,e,n,i){var o=n.geoModel,a=n.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](i):null}function Ml(t,e){var n,i,o=t.get("boundingCoords");null!=o&&(n=o[0],i=o[1],isNaN(n[0])||isNaN(n[1])||isNaN(i[0])||isNaN(i[1])||this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1]));var a,r,s=this.getBoundingRect(),l=t.get("layoutCenter"),u=t.get("layoutSize"),h=e.getWidth(),c=e.getHeight(),d=s.width/s.height*this.aspectScale,p=!1;l&&u&&(l=[Ei(l[0],h),Ei(l[1],c)],u=Ei(u,Math.min(h,c)),isNaN(l[0])||isNaN(l[1])||isNaN(u)||(p=!0)),p?(r={},1<d?(r.width=u,r.height=u/d):(r.height=u,r.width=u*d),r.y=l[1]-r.height/2,r.x=l[0]-r.width/2):((a=t.getBoxLayoutParams()).aspect=d,r=so(a,{width:h,height:c})),this.setViewRect(r.x,r.y,r.width,r.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Il(n,t){z(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})}function Tl(t,e){return Al(t)[e]}function Al(t){return t[RS]||(t[RS]={})}function Dl(n){this.pointerChecker,this._zr=n,this._opt={};var t=k,i=t(Cl,this),o=t(Ll,this),a=t(kl,this),r=t(Pl,this),s=t(Nl,this);wf.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=O(D(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",r),n.on("pinch",s))},this.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",a),n.off("mousewheel",r),n.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Cl(t){var e,n;ut(t)||t.target&&t.target.draggable||(e=t.offsetX,n=t.offsetY,this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0))}function Ll(t){var e,n,i,o,a,r;!ut(t)&&El("moveOnMouseMove",t,this._opt)&&this._dragging&&"pinch"!==t.gestureEvent&&!Tl(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,a=e-(i=this._x),r=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Mf(t.event),Rl(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:i,oldY:o,newX:e,newY:n}))}function kl(t){ut(t)||(this._dragging=!1)}function Pl(t){var e,n,i=El("zoomOnMouseWheel",t,this._opt),o=El("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,r=Math.abs(a),s=t.offsetX,l=t.offsetY;0!==a&&(i||o)&&(i&&(e=3<r?1.4:1<r?1.2:1.1,Ol(this,"zoom","zoomOnMouseWheel",t,{scale:0<a?e:1/e,originX:s,originY:l})),o&&Ol(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<a?1:-1)*(3<(n=Math.abs(a))?.4:1<n?.15:.05),originX:s,originY:l}))}function Nl(t){Tl(this._zr,"globalPan")||Ol(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Ol(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(Mf(i.event),Rl(t,e,n,i,o))}function Rl(t,e,n,i,o){o.isAvailableBehavior=k(El,null,n,i),t.trigger(e,o)}function El(t,e,n){var i=n[t];return!t||i&&(!A(i)||e.event[i+"Key"])}function zl(t,e,n){var i=t.target,o=i.position;o[0]+=e,o[1]+=n,i.dirty()}function Bl(t,e,n,i){var o,a,r=t.target,s=t.zoomLimit,l=r.position,u=r.scale,h=t.zoom=t.zoom||1;h*=e,s&&(o=s.min||0,a=s.max||1/0,h=Math.max(Math.min(a,h),o));var c=h/t.zoom;t.zoom=h,l[0]-=(n-l[0])*(c-1),l[1]-=(i-l[1])*(c-1),u[0]*=c,u[1]*=c,r.dirty()}function Vl(t,e,n){var i=e.getComponentByElement(t.topTarget),o=i&&i.coordinateSystem;return i&&i!==n&&!ES[i.mainType]&&o&&o.model!==n}function Gl(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function Fl(n,t){t.eachChild(function(e){z(e.__regions,function(t){e.trigger(n.isSelected(t.name)?"emphasis":"normal")})})}function Wl(t,e){var n=new rm;this.uid=Oi("ec_map_draw"),this._controller=new Dl(t.getZr()),this._controllerHost={target:e?n:null},this.group=n,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new rm),n.add(this._backgroundGroup=new rm)}function Hl(t,e,n){var i,o,a,r,s,l=t.getZoom(),u=t.getCenter(),h=e.zoom,c=t.dataToPoint(u);return null!=e.dx&&null!=e.dy&&(c[0]-=e.dx,c[1]-=e.dy,u=t.pointToData(c),t.setCenter(u)),null!=h&&(n&&(i=n.min||0,o=n.max||1/0,h=Math.max(Math.min(l*h,o),i)/l),t.scale[0]*=h,t.scale[1]*=h,a=t.position,r=(e.originX-a[0])*(h-1),s=(e.originY-a[1])*(h-1),a[0]-=r,a[1]-=s,t.updateTransform(),u=t.pointToData(c),t.setCenter(u),t.setZoom(h*l)),{center:t.getCenter(),zoom:t.getZoom()}}function Zl(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,ql(i,t,n),BS(t,function(e){BS(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,E(Ul,n))})}),i.wrapMethod("cloneShallow",E(jl,n)),BS(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,E(Xl,n))}),d(t[i.dataType]===i)}function Ul(t,e){var n,i;return(i=this)[GS]===i?ql((n=P({},this[VS]))[this.dataType]=e,n,t):Kl(e,this.dataType,this[GS],t),e}function Xl(t,e){return t.struct&&t.struct.update(this),e}function jl(n,i){return BS(i[VS],function(t,e){t!==i&&Kl(t.cloneShallow(),e,i,n)}),i}function Yl(t){var e=this[GS];return null==t||null==e?e:e[VS][t]}function ql(n,t,i){n[VS]={},BS(t,function(t,e){Kl(t,e,n,i)})}function Kl(t,e,n,i){(n[VS][e]=t)[GS]=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=Yl}function $l(e,t,n){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=L(t||[],function(t){return new ki(t,e,e.ecModel)}),this.leavesModel=new ki(n||{},e,e.ecModel)}function Jl(t,e){var n,i=t.isExpand?t.children:[],o=t.parentNode.children,a=t.hierNode.i?o[t.hierNode.i-1]:null;i.length?(function(t){for(var e=t.children,n=e.length,i=0,o=0;0<=--n;){var a=e[n];a.hierNode.prelim+=i,a.hierNode.modifier+=i,o+=a.hierNode.change,i+=a.hierNode.shift+o}}(t),n=(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-n):t.hierNode.prelim=n):a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a)),t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=nu(s),a=iu(a),s&&a;){o=nu(o),r=iu(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+i(s,a);0<d&&(function(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}(function(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}(s,t,n),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!nu(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!iu(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,n=t)}return n}(t,a,t.parentNode.hierNode.defaultAncestor||o[0],e)}function Ql(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function tu(t){return arguments.length?t:ou}function eu(t,e){var n={};return t-=Math.PI/2,n.x=e*Math.cos(t),n.y=e*Math.sin(t),n}function nu(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function iu(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function ou(t,e){return t.parentNode===e.parentNode?1:2}function au(t,e){var n=t.getItemLayout(e);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==t.getItemVisual(e,"symbol")}function ru(t,e,n){return n.itemModel=e,n.itemStyle=e.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=e.getModel("lineStyle").getLineStyle(),n.labelModel=e.getModel("label"),n.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function su(t,e,n,i,o,a){var r=!n,s=t.tree.getNodeByDataIndex(e),a=ru(s,s.getModel(),a),l=t.tree.root,u=s.parentNode!==l&&s.parentNode||s,h=t.getItemGraphicEl(u.dataIndex),c=u.getLayout(),d=h?{x:h.position[0],y:h.position[1],rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:c,p=s.getLayout();r?(n=new ds(t,e,a)).attr("position",[d.x,d.y]):n.updateData(t,e,a),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=p.rawX,n.__radialRawY=p.rawY,i.add(n),t.setItemGraphicEl(e,n),Si(n,{position:[p.x,p.y]},o);var g,f,m,v,y,x,_,w,b=n.getSymbolPath();"radial"===a.layout&&(v=(m=l.children[0]).getLayout(),y=m.children.length,p.x===v.x&&!0===s.isExpand?((x={}).x=(m.children[0].getLayout().x+m.children[y-1].getLayout().x)/2,x.y=(m.children[0].getLayout().y+m.children[y-1].getLayout().y)/2,(g=Math.atan2(x.y-v.y,x.x-v.x))<0&&(g=2*Math.PI+g),(f=x.x<v.x)&&(g-=Math.PI)):((g=Math.atan2(p.y-v.y,p.x-v.x))<0&&(g=2*Math.PI+g),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(f=p.x<v.x)&&(g-=Math.PI):(f=p.x>v.x)||(g-=Math.PI)),_=f?"left":"right",b.setStyle({textPosition:_,textRotation:-g,textOrigin:"center",verticalAlign:"middle"})),s.parentNode&&s.parentNode!==l&&(Si(w=(w=n.__edge)||(n.__edge=new Sy({shape:uu(a,d,d),style:O({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:uu(a,c,p),style:{opacity:1}},o),i.add(w))}function lu(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=ru(s,s.getModel(),a),u=s.parentNode!==l&&s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode!==l&&u.parentNode||u;Si(n,{position:[r.x+1,r.y+1]},o,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var h=n.__edge;h&&Si(h,{shape:uu(a,r,r),style:{opacity:0}},o,function(){i.remove(h)})}function uu(t,e,n){var i,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=n.x,h=n.y,"LR"!==c&&"RL"!==c||(i=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(i=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:i,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=n.rawX,h=n.rawY;var d=eu(s,u),p=eu(s,u+(h-u)*t.curvature),g=eu(l,h+(u-h)*t.curvature),f=eu(l,h);return{x1:d.x,y1:d.y,x2:f.x,y2:f.y,cpx1:p.x,cpy1:p.y,cpx2:g.x,cpy2:g.y}}function hu(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var a=o.length-1;0<=a;a--)i.push(o[a])}}function cu(t,e){var n,i=(n=e,so(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}));t.layoutInfo=i;var o,a,r,s,l,u,h,c,d,p,g=t.get("layout"),f=0,m=0,v=null,v="radial"===g?(f=2*Math.PI,m=Math.min(i.height,i.width)/2,tu(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(f=i.width,m=i.height,tu()),y=t.getData().tree.root,x=y.children[0];x&&(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var o=n.length-1;0<=o;o--){var a=n[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(y),function(t,e,n){for(var i,o=[t],a=[];i=o.pop();)if(a.push(i),i.isExpand){var r=i.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;i=a.pop();)e(i,n)}(x,Jl,v),y.hierNode.modifier=-x.hierNode.prelim,hu(x,Ql),hu(r=a=o=x,function(t){var e=t.getLayout().x;e<o.getLayout().x&&(o=t),e>a.getLayout().x&&(a=t),t.depth>r.depth&&(r=t)}),s=o===a?1:v(o,a)/2,l=s-o.getLayout().x,d=c=h=u=0,"radial"===g?(u=f/(a.getLayout().x+s+l),h=m/(r.depth-1||1),hu(x,function(t){c=(t.getLayout().x+l)*u,d=(t.depth-1)*h;var e=eu(c,d);t.setLayout({x:e.x,y:e.y,rawX:c,rawY:d},!0)})):"RL"===(p=t.getOrient())||"LR"===p?(h=m/(a.getLayout().x+s+l),u=f/(r.depth-1||1),hu(x,function(t){d=(t.getLayout().x+l)*h,c="LR"===p?(t.depth-1)*u:f-(t.depth-1)*u,t.setLayout({x:c,y:d},!0)})):"TB"!==p&&"BT"!==p||(u=f/(a.getLayout().x+s+l),h=m/(r.depth-1||1),hu(x,function(t){c=(t.getLayout().x+l)*u,d="TB"===p?(t.depth-1)*h:m-(t.depth-1)*h,t.setLayout({x:c,y:d},!0)})))}function du(t,e,n){if(t&&0<=M(e,t.type)){var i=n.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=i.getNodeById(o)),o&&i.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=i.getNodeById(a)))return{node:o}}}function pu(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function gu(t,e){return 0<=M(pu(t),e)}function fu(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}function mu(t){this.group=new rm,t.add(this.group)}function vu(d,u,h,c,p,n,g,t,e,i){function s(t,e){x?t.invisible||n.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function l(t,e,n,i,o,a){var r,s=g.getModel(),l=V(d.getFormattedLabel(g.dataIndex,"normal",null,null,a?"upperLabel":"label"),s.get("name"));!a&&f.isLeafRoot&&(l=(r=d.get("drillDownIcon",!0))?r+" "+l:l);var u=s.getModel(a?qS:jS),h=s.getModel(a?KS:YS),c=u.getShallow("show");gi(t,e,u,h,{defaultText:c?l:null,autoColor:n,isRectText:!0}),a&&(t.textRect=D(a)),t.truncate=c&&u.get("ellipsis")?{outerWidth:i,outerHeight:o,minChar:2}:null}function o(t,e,n,i){var o,a,r,s=null!=w&&h[t][w],l=p[t];return s?(h[t][w]=null,a=s,r=t,(l[_]={}).old="nodeGroup"===r?a.position.slice():P({},a.shape)):x||((s=new e({z:((o=n*$S+i)-1)/o})).__tmDepth=n,function(t,e){var n=t[_]={},i=g.parentNode;{var o,a,r;!i||c&&"drillDown"!==c.direction||(a=o=0,r=p.background[i.getRawIndex()],!c&&r&&r.old&&(o=r.old.width,a=r.old.height),n.old="nodeGroup"===e?[0,a]:{x:o,y:a,width:0,height:0})}n.fadein="nodeGroup"!==e}(l,s.__tmStorageName=t)),u[t][_]=s}if(g){var f=g.getLayout();if(f&&f.isInView){var m=f.width,v=f.height,y=f.borderWidth,x=f.invisible,_=g.getRawIndex(),w=t&&t.getRawIndex(),a=g.viewChildren,b=f.upperHeight,r=a&&a.length,S=g.getModel("itemStyle"),M=g.getModel("emphasis.itemStyle"),I=o("nodeGroup",ZS);if(I){if(e.add(I),I.attr("position",[f.x||0,f.y||0]),I.__tmNodeWidth=m,I.__tmNodeHeight=v,f.isAboveViewRoot)return I;var T,A=o("background",US,i,1);return A&&function(t,i,o){i.dataIndex=g.dataIndex,i.seriesIndex=d.seriesIndex,i.setShape({x:0,y:0,width:m,height:v});var a=g.getVisual("borderColor",!0),r=M.get("borderColor");s(i,function(){var t=WS(S);t.fill=a;var e,n=JS(M);n.fill=r,o?l(t,n,a,e=m-2*y,b,{x:y,y:0,width:e,height:b}):t.text=n.text=null,i.setStyle(t),di(i,n)}),t.add(i)}(I,A,r&&f.upperHeight),r||(T=o("content",US,i,2))&&function(t,n){n.dataIndex=g.dataIndex,n.seriesIndex=d.seriesIndex;var i=Math.max(m-2*y,0),o=Math.max(v-2*y,0);n.culling=!0,n.setShape({x:y,y:y,width:i,height:o});var a=g.getVisual("color",!0);s(n,function(){var t=WS(S);t.fill=a;var e=JS(M);l(t,e,a,i,o),n.setStyle(t),di(n,e)}),t.add(n)}(I,T),I}}}}function yu(t,e){var n=t.visual,i=[];B(n)?eM(n,function(t){i.push(t)}):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),Tu(t,i)}function xu(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t),n("color",i(e("color"),t))},_doMap:Mu([0,1])}}function _u(t){var e=this.option.visual;return e[Math.round(Ri(t,[0,1],[0,e.length-1],!0))]||{}}function wu(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function bu(t){var e=this.option.visual;return e[this.option.loop&&t!==iM?t%e.length:t]}function Su(){return this.option.visual[0]}function Mu(i){return{linear:function(t){return Ri(t,i,this.option.visual,!0)},category:bu,piecewise:function(t,e){var n=Iu.call(this,e);return null==n&&(n=Ri(t,i,this.option.visual,!0)),n},fixed:Su}}function Iu(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){var i=n[oM.findPieceIndex(t,n)];if(i&&i.visual)return i.visual[this.type]}}function Tu(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=L(e,function(t){return Pt(t)})),e}function Au(t,e,n){return t?e<=n:e<n}function Du(t,e,n,i,o,a){var r,s,l,u,h,c,d,p,g,f,m,v,y,x,_=t.getModel(),w=t.getLayout();w&&!w.invisible&&w.isInView&&(s=t.getModel(lM),f=s,m=e,v=n[t.depth],y=i,x=P({},m),z(["color","colorAlpha","colorSaturation"],function(t){var e=f.get(t,!0);null==e&&v&&(e=v[t]),null==e&&(e=m[t]),null==e&&(e=y.get(t)),null!=e&&(x[t]=e)}),l=x,u=s.get("borderColor"),null!=(h=s.get("borderColorSaturation"))&&(p=h,u=null!=(g=r=Cu(l))?Bt(g,null,null,p):null),t.setVisual("borderColor",u),(c=t.viewChildren)&&c.length?(d=function(t,e,n,i){if(i&&i.length){var o=ku(t,"color")||null!=n.color&&"none"!==n.color&&(ku(t,"colorAlpha")||ku(t,"colorSaturation"));if(o){var a=t.get("visualMin"),r=t.get("visualMax"),s=e.dataExtent.slice();null!=a&&a<s[0]&&(s[0]=a),null!=r&&r>s[1]&&(s[1]=r);var l=t.get("colorMappingBy"),u={type:o.name,dataExtent:s,visual:o.range};"color"!==u.type||"index"!==l&&"id"!==l?u.mappingMethod="linear":(u.mappingMethod="category",u.loop=!0);var h=new oM(u);return h.__drColorMappingBy=l,h}}}(_,w,l,c),z(c,function(t,e){(t.depth>=o.length||t===o[t.depth])&&Du(t,function(t,e,n,i,o,a){var r=P({},e);{var s,l,u;o&&(s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?i:"id"===l?a.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),r[s]=o.mapValueToVisual(u))}return r}(_,l,t,e,d,a),n,i,o,a)})):(r=Cu(l),t.setVisual("color",r)))}function Cu(t){var e=Lu(t,"color");if(e){var n=Lu(t,"colorAlpha"),i=Lu(t,"colorSaturation");return i&&(e=Bt(e,null,null,i)),n&&(e=Vt(e,n)),e}}function Lu(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function ku(t,e){var n=t.get(e);return sM(n)&&n.length?{name:e,range:n}:null}function Pu(t,e,n,i){if(!t.isRemoved()){var o=t.getLayout(),a=o.width,r=o.height,s=(p=t.getModel()).get(gM),l=p.get(fM)/2,u=Ou(p),h=Math.max(s,u),c=s-l,d=h-l,p=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var g=(a=hM(a-2*c,0))*(r=hM(r-c-d,0)),f=function(t,e,n,i,o,a){var r=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=a;if(o&&!l)return t.viewChildren=[];!function(t,i){i&&t.sort(function(t,e){var n="asc"===i?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==n?"asc"===i?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n})}(r=I(r,function(t){return!t.isRemoved()}),s);var u=function(t,e,n){for(var i=0,o=0,a=e.length;o<a;o++)i+=e[o].getValue();var r=t.get("visualDimension");{var s;e&&e.length?"value"===r&&n?(s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&s.reverse()):(s=[1/0,-1/0],pM(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})):s=[NaN,NaN]}return{sum:i,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===i?r-l-1:l].getValue();u/n*e<a&&(s=l,n-=u)}return"asc"===i?o.splice(0,r-s):o.splice(s,r-s),n}(e,n,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;h<c;h++){var d=r[h].getValue()/u.sum*n;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}(t,p,g,e,n,i);if(f.length){for(var m,v={x:c,y:d,width:a,height:r},y=cM(a,r),x=1/0,_=[],w=_.area=0,b=f.length;w<b;){var S=f[w];_.push(S),_.area+=S.getLayout().area;var M=function(t,e,n){for(var i,o=0,a=1/0,r=0,s=t.length;r<s;r++)(i=t[r].getLayout().area)&&(i<a&&(a=i),o<i&&(o=i));var l=t.area*t.area,u=e*e*n;return l?hM(u*o/l,l/(u*a)):1/0}(_,y,e.squareRatio),x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,Nu(_,y,v,l,!1),y=cM(v.width,v.height),1/(_.length=_.area=0))}_.length&&Nu(_,y,v,l,!0),n||null!=(m=p.get("childrenVisibleMin"))&&g<m&&(n=!0);for(w=0,b=f.length;w<b;w++)Pu(f[w],e,n,i+1)}}}function Nu(t,e,n,i,o){var a=e===n.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=n[s[a]],h=e?t.area/e:0;(o||h>n[l[r]])&&(h=n[l[r]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],g={},f=h?p.getLayout().area/h:0,m=g[l[r]]=hM(h-2*i,0),v=n[s[a]]+n[l[a]]-u,y=c===d-1||v<f?v:f,x=g[l[a]]=hM(y-2*i,0);g[s[r]]=n[s[r]]+cM(i,m/2),g[s[a]]=u+cM(i,x/2),u+=y,p.setLayout(g,!0)}n[s[r]]+=h,n[l[r]]-=h}function Ou(t){return t.get(mM)?t.get(vM):0}function Ru(t){return"_EC_"+t}function Eu(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function zu(t,e,n){this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}function Bu(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function Vu(t){return"_"+t+"Type"}function Gu(t,e,n){var i=e.getItemVisual(n,"color"),o=e.getItemVisual(n,t),a=e.getItemVisual(n,t+"Size");if(o&&"none"!==o){N(a)||(a=[a,a]);var r=Kr(o,-a[0]/2,-a[1]/2,a[0],a[1],i);return r.name=t,r}}function Fu(t,e){var n=e[0],i=e[1],o=e[2];t.x1=n[0],t.y1=n[1],t.x2=i[0],t.y2=i[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=NaN,t.cpy1=NaN)}function Wu(t,e,n){rm.call(this),this._createLine(t,e,n)}function Hu(t){this._ctor=t||Wu,this.group=new rm}function Zu(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 Uu(t){return isNaN(t[0])||isNaN(t[1])}function Xu(t){return!Uu(t[0])&&!Uu(t[1])}function ju(t,e,n){for(var i,o=t[0],a=t[1],r=t[2],s=1/0,l=n*n,u=.1,h=.1;h<=.9;h+=.1)kM[0]=OM(o[0],a[0],r[0],h),kM[1]=OM(o[1],a[1],r[1],h),(p=EM(RM(kM,e)-l))<s&&(s=p,i=h);for(var c=0;c<32;c++){var d=i+u;PM[0]=OM(o[0],a[0],r[0],i),PM[1]=OM(o[1],a[1],r[1],i),NM[0]=OM(o[0],a[0],r[0],d),NM[1]=OM(o[1],a[1],r[1],d);var p=RM(PM,e)-l;if(EM(p)<.01)break;var g=RM(NM,e)-l;u/=2,p<0?0<=g?i+=u:i-=u:0<=g?i-=u:i+=u}return i}function Yu(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function qu(t,e,n){var i=t.getGraphicEl(),o=Yu(t,e);null!=n&&(null==o&&(o=1),o*=n),i.downplay&&i.downplay(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function Ku(t,e){var n=Yu(t,e),i=t.getGraphicEl();i.highlight&&i.highlight(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}function $u(t){return t instanceof Array||(t=[t,t]),t}function Ju(t){var e,n=t.coordinateSystem;n&&"view"!==n.type||((e=t.getGraph()).eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),Qu(e))}function Qu(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,n=T(t.node1.getLayout()),i=T(t.node2.getLayout()),o=[n,i];+e&&o.push([(n[0]+i[0])/2-(n[1]-i[1])*e,(n[1]+i[1])/2-(i[0]-n[0])*e]),t.setLayout(o)})}function th(t){var e,n,i,o,a,r,s,l,u,h=t.coordinateSystem;h&&"view"!==h.type||(e=h.getBoundingRect(),i=(n=t.getData()).graph,o=0,a=n.getSum("value"),r=2*Math.PI/(a||n.count()),s=e.width/2+e.x,l=e.height/2+e.y,u=Math.min(e.width,e.height)/2,i.eachNode(function(t){var e=t.getValue("value");o+=r*(a?e:1)/2,t.setLayout([u*Math.cos(o)+s,u*Math.sin(o)+l]),o+=r*(a?e:1)/2}),n.setLayout({cx:s,cy:l}),i.eachEdge(function(t){var e,n=t.getModel().get("lineStyle.curveness")||0,i=T(t.node1.getLayout()),o=T(t.node2.getLayout()),a=(i[0]+o[0])/2,r=(i[1]+o[1])/2;+n&&(e=[s*(n*=3)+a*(1-n),l*n+r*(1-n)]),t.setLayout([i,o,e])}))}function eh(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}function nh(t,e){function n(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function i(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}rm.call(this);var o=new yy,a=new xy,r=new cy;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",n).on("normal",i).on("mouseover",n).on("mouseout",i)}function ih(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0<n||!(n<0)&&e?-1:1}}function oh(t,e){return Math.min(e[1],Math.max(e[0],t))}function ah(t,e,n){this._axesMap=C(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,n)}function rh(t,e){return YM(qM(t,e[0]),e[1])}function sh(t){wf.call(this),this._zr=t,this.group=new rm,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+gI++,this._handlers={},nI(fI,function(t,e){this._handlers[e]=k(t,this)},this)}function lh(t,e){var n,i,o,a=t._zr;t._enableGlobalPan||(n=a,i=hI,o=t._uid,Al(n)[i]=o),nI(t._handlers,function(t,e){a.on(e,t)}),t._brushType=e.brushType,t._brushOption=v(D(pI),e,!0)}function uh(t){var e,n,i,o,a=t._zr;e=a,n=hI,i=t._uid,(o=Al(e))[n]===i&&(o[n]=null),nI(t._handlers,function(t,e){a.off(e,t)}),t._brushType=t._brushOption=null}function hh(t,e){var n=mI[e.brushType].createCover(t,e);return n.__brushOption=e,ph(n,e),t.group.add(n),n}function ch(t,e){var n=fh(e);return n.endCreating&&(n.endCreating(t,e),ph(e,e.__brushOption)),e}function dh(t,e){var n=e.__brushOption;fh(e).updateCoverShape(t,e,n.range,n)}function ph(t,e){var n=e.z;null==n&&(n=sI),t.traverse(function(t){t.z=n,t.z2=n})}function gh(t,e){fh(e).updateCommon(t,e),dh(t,e)}function fh(t){return mI[t.__brushOption.brushType]}function mh(t,e,n){var i=t._panels;if(!i)return!0;var o,a=t._transform;return nI(i,function(t){t.isTargetByCursor(e,n,a)&&(o=t)}),o}function vh(t,e){var n=t._panels;if(!n)return!0;var i=e.__brushOption.panelId;return null==i||n[i]}function yh(e){var t=e._covers,n=t.length;return nI(t,function(t){e.group.remove(t)},e),t.length=0,n}function xh(t,e){var n=iI(t._covers,function(t){var e=t.__brushOption,n=D(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function _h(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function wh(e,n,t,i){var o=new rm;return o.add(new _y({name:"main",style:Ih(t),silent:!0,draggable:!0,cursor:"move",drift:eI(e,n,o,"nswe"),ondragend:eI(xh,n,{isEnd:!0})})),nI(i,function(t){o.add(new _y({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:eI(e,n,o,t),ondragend:eI(xh,n,{isEnd:!0})}))}),o}function bh(t,e,n,i){var o=i.brushStyle.lineWidth||0,a=aI(o,uI),r=n[0][0],s=n[1][0],l=r-o/2,u=s-o/2,h=n[0][1],c=n[1][1],d=h-a+o/2,p=c-a+o/2,g=h-r,f=c-s,m=g+o,v=f+o;Mh(t,e,"main",r,s,g,f),i.transformable&&(Mh(t,e,"w",l,u,a,v),Mh(t,e,"e",d,u,a,v),Mh(t,e,"n",l,u,m,a),Mh(t,e,"s",l,p,m,a),Mh(t,e,"nw",l,u,a,a),Mh(t,e,"ne",d,u,a,a),Mh(t,e,"sw",l,p,a,a),Mh(t,e,"se",d,p,a,a))}function Sh(i,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(Ih(t)),e.attr({silent:!a,cursor:a?"move":"default"}),nI(["w","e","n","s","se","sw","ne","nw"],function(t){var e=o.childOfName(t),n=function t(e,n){if(1<n.length)return"e"!==(o=[t(e,(n=n.split(""))[0]),t(e,n[1])])[0]&&"w"!==o[0]||o.reverse(),o.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},o=Ai({w:"left",e:"right",n:"top",s:"bottom"}[n],(a=e,Ii(a.group)));var a;return i[o]}(i,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?dI[n]+"-resize":null})})}function Mh(t,e,n,i,o,a,r){var s,l,u,h=e.childOfName(n);h&&h.setShape((s=Lh(t,e,[[i,o],[i+a,o+r]]),l=oI(s[0][0],s[1][0]),u=oI(s[0][1],s[1][1]),{x:l,y:u,width:aI(s[0][0],s[1][0])-l,height:aI(s[0][1],s[1][1])-u}))}function Ih(t){return O({strokeNoScale:!0},t.brushStyle)}function Th(t,e,n,i){var o=[oI(t,n),oI(e,i)],a=[aI(t,n),aI(e,i)];return[[o[0],a[0]],[o[1],a[1]]]}function Ah(t,e,n,i,o,a,r,s){var l=i.__brushOption,u=t(l.range),h=Ch(n,a,r);nI(o.split(""),function(t){var e=cI[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(Th(u[0][0],u[1][0],u[0][1],u[1][1])),gh(n,i),xh(n,{isEnd:!1})}function Dh(t,e,n,i,o){var a=e.__brushOption.range,r=Ch(t,n,i);nI(a,function(t){t[0]+=r[0],t[1]+=r[1]}),gh(t,e),xh(t,{isEnd:!1})}function Ch(t,e,n){var i=t.group,o=i.transformCoordToLocal(e,n),a=i.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function Lh(t,e,n){var i=vh(t,e);return i&&!0!==i?i.clipPath(n,t._transform):D(n)}function kh(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Ph(t,e,n){return t.childOfName("main").contain(e,n)}function Nh(t,e,n,i){var o,a,r,s=t._creatingCover,l=t._creatingPanel,u=t._brushOption;return t._track.push(n.slice()),function(t){var e=t._track;if(e.length){var n=e[e.length-1],i=e[0],o=n[0]-i[0],a=n[1]-i[1];return rI(o*o+a*a,.5)>lI}}(t)||s?(l&&!s&&("single"===u.brushMode&&yh(t),(a=D(u)).brushType=Oh(a.brushType,l),a.panelId=!0===l?null:l.panelId,s=t._creatingCover=hh(t,a),t._covers.push(s)),s&&(r=mI[Oh(t._brushType,l)],s.__brushOption.range=r.getCreatingRange(Lh(t,s,t._track)),i&&(ch(t,s),r.updateCommon(t,s)),dh(t,s),o={isEnd:i})):i&&"single"===u.brushMode&&u.removeOnClick&&mh(t,e,n)&&yh(t)&&(o={isEnd:i,removeOnClick:!0}),o}function Oh(t,e){return"auto"===t?e.defaultBrushType:t}function Rh(t){var e;this._dragging&&(kh(t),e=Nh(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0),this._dragging=!1,this._track=[],this._creatingCover=null,e&&xh(this,e))}function Eh(s){return{createCover:function(t,e){return wh(eI(Ah,function(t){var e=[t,[0,100]];return s&&e.reverse(),e},function(t){return t[s]}),t,e,[["w","e"],["n","s"]][s])},getCreatingRange:function(t){var e=_h(t);return[oI(e[0][s],e[1][s]),aI(e[0][s],e[1][s])]},updateCoverShape:function(t,e,n,i){var o,a=vh(t,e),r=[n,!0!==a&&a.getLinearBrushOtherExtent?a.getLinearBrushOtherExtent(s,t._transform):[0,[(o=t._zr).getWidth(),o.getHeight()][1-s]]];s&&r.reverse(),bh(t,e,r,i)},updateCommon:Sh,contain:Ph}}function zh(n){return n=Gh(n),function(t,e){return Ci(t,n)}}function Bh(o,a){return o=Gh(o),function(t){var e=null!=a?a:t,n=e?o.width:o.height,i=e?o.x:o.y;return[i,i+(n||0)]}}function Vh(i,o,a){return i=Gh(i),function(t,e,n){return i.contain(e[0],e[1])&&!Vl(t,o,a)}}function Gh(t){return Qt.create(t)}function Fh(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}function Wh(t,e,n,i){for(var o,a=[],r=0;r<n.length;r++){var s=n[r],l=t.get(t.mapDimension(s),e);o=l,("category"===i.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(i.dataToPoint(l,s))}return a}function Hh(t,e,n,i,o){var a=Wh(t,n,i,o),r=new xy({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(n,r),r}function Zh(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function Uh(t,e,n,i){var o=i.lineStyle;e.hasItemOption&&(o=e.getItemModel(n).getModel("lineStyle").getLineStyle()),t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(n,"color"),a.opacity=e.getItemVisual(n,"opacity"),i.smooth&&(t.shape.smooth=i.smooth)}function Xh(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function jh(t,e,n){var i=t.getGraphicEl(),o=Xh(t,e);null!=n&&(null==o&&(o=1),o*=n),i.downplay&&i.downplay(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function Yh(t,e){var n=Xh(t,e),i=t.getGraphicEl();i.highlight&&i.highlight(),i.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",n)})}function qh(){var h=[],e=[];return{key:function(t){return h.push(t),this},sortKeys:function(t){return e[h.length-1]=t,this},entries:function(t){return function n(t,i){if(i>=h.length)return t;var o=[],a=e[i++];return z(t,function(t,e){o.push({key:e,values:n(t,i)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}(function n(t,i){if(i>=h.length)return t;for(var e=-1,o=t.length,a=h[i++],r={},s={};++e<o;){var l=a(t[e]),u=s[l];u?u.push(t[e]):s[l]=[t[e]]}return z(s,function(t,e){r[e]=n(t,i)}),r}(t,0),0)}}}function Kh(t,e,n,i,o,a,r,s){var l,u;(function(t,e,n,i,o,a){for(var r=[],s=[],l=[],u=[],h=0,c=0;c<e.length;c++)r[c]=1;for(c=0;c<t.length;c++)s[c]=t[c].inEdges.length,0===s[c]&&l.push(t[c]);for(;l.length;){for(var d=0;d<l.length;d++){var p=l[d];"vertical"===a?(p.setLayout({y:h},!0),p.setLayout({dy:n},!0)):(p.setLayout({x:h},!0),p.setLayout({dx:n},!0));for(var g=0;g<p.outEdges.length;g++){var f=p.outEdges[g];r[e.indexOf(f)]=0;var m=f.node2;0==--s[t.indexOf(m)]&&u.push(m)}}++h,l=u,u=[]}for(c=0;c<r.length;c++);(function(t,e,n){z(t,function(t){t.outEdges.length||("vertical"===n?t.setLayout({y:e-1},!0):t.setLayout({x:e-1},!0))})})(t,h,a),function(t,i,o){z(t,function(t){var e,n;"vertical"===o?(e=t.getLayout().y*i,t.setLayout({y:e},!0)):(n=t.getLayout().x*i,t.setLayout({x:n},!0))})}(t,"vertical"===a?(o-n)/(h-1):(i-n)/(h-1),a)})(t,e,n,o,a,s),function(t,e,n,i,o,a,r){var s=qh().key(function(t){return"vertical"===t?function(t){return t.getLayout().y}:function(t){return t.getLayout().x}}(r)).sortKeys(function(t,e){return t-e}).entries(t).map(function(t){return t.values});(function(t,e,o,a,r,s){var l=[];z(t,function(t){var e,n=t.length,i=0;z(t,function(t){i+=t.getLayout().value}),e="vertical"===s?(a-(n-1)*r)/i:(o-(n-1)*r)/i,l.push(e)}),l.sort(function(t,e){return t-e});var i=l[0];z(t,function(t){z(t,function(t,e){var n=t.getLayout().value*i;"vertical"===s?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),z(e,function(t){var e=t.getValue()*i;t.setLayout({dy:e},!0)})})(s,e,n,i,o,r),$h(s,o,n,i,r);for(var l=1;0<a;a--)(function(t,o,a){z(t.slice().reverse(),function(t){z(t,function(t){var e,n,i;t.outEdges.length&&(e=nc(t.outEdges,Jh,a)/nc(t.outEdges,ec,a),"vertical"===a?(n=t.getLayout().x+(e-tc(t,a))*o,t.setLayout({x:n},!0)):(i=t.getLayout().y+(e-tc(t,a))*o,t.setLayout({y:i},!0)))})})})(s,l*=.99,r),$h(s,o,n,i,r),function(t,o,a){z(t,function(t){z(t,function(t){var e,n,i;t.inEdges.length&&(e=nc(t.inEdges,Qh,a)/nc(t.inEdges,ec,a),"vertical"===a?(n=t.getLayout().x+(e-tc(t,a))*o,t.setLayout({x:n},!0)):(i=t.getLayout().y+(e-tc(t,a))*o,t.setLayout({y:i},!0)))})})}(s,l,r),$h(s,o,n,i,r)}(t,e,a,o,i,r,s),u=s,z(l=t,function(t){"vertical"===u?(t.outEdges.sort(function(t,e){return t.node2.getLayout().x-e.node2.getLayout().x}),t.inEdges.sort(function(t,e){return t.node1.getLayout().x-e.node1.getLayout().x})):(t.outEdges.sort(function(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}),t.inEdges.sort(function(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}))}),z(l,function(t){var e=0,n=0;z(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),z(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}function $h(t,l,u,h,c){z(t,function(t){var e,n,i,o,a,r=0,s=t.length;if("vertical"===c){for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),i=0;i<s;i++)0<(n=r-(e=t[i]).getLayout().x)&&(o=e.getLayout().x+n,e.setLayout({x:o},!0)),r=e.getLayout().x+e.getLayout().dx+l;if(0<(n=r-l-h))for(o=e.getLayout().x-n,e.setLayout({x:o},!0),r=o,i=s-2;0<=i;--i)0<(n=(e=t[i]).getLayout().x+e.getLayout().dx+l-r)&&(o=e.getLayout().x-n,e.setLayout({x:o},!0)),r=e.getLayout().x}else{for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),i=0;i<s;i++)0<(n=r-(e=t[i]).getLayout().y)&&(a=e.getLayout().y+n,e.setLayout({y:a},!0)),r=e.getLayout().y+e.getLayout().dy+l;if(0<(n=r-l-u))for(a=e.getLayout().y-n,e.setLayout({y:a},!0),r=a,i=s-2;0<=i;--i)0<(n=(e=t[i]).getLayout().y+e.getLayout().dy+l-r)&&(a=e.getLayout().y-n,e.setLayout({y:a},!0)),r=e.getLayout().y}})}function Jh(t,e){return tc(t.node2,e)*t.getValue()}function Qh(t,e){return tc(t.node1,e)*t.getValue()}function tc(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function ec(t){return t.getValue()}function nc(t,e,n){for(var i=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],n);isNaN(r)||(i+=r)}return i}function ic(t,e,n,i,o){var a,r,s=t.ends,l=new DI({shape:{points:o?(a=i,r=t,L(s,function(t){return(t=t.slice())[a]=r.initBaseline,t})):s}});return oc(t,l,e,n,o),l}function oc(t,e,n,i,o){var a=n.hostModel;(0,Ey[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,i);var r=n.getItemModel(i),s=r.getModel(TI),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,di(e,r.getModel(AI).getItemStyle())}function ac(t,e,n){var i,o=t.ends;return new OI({shape:{points:n?(i=t,L(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function rc(t,e,n,i){var o=e.getItemModel(n),a=o.getModel(kI),r=e.getItemVisual(n,"color"),s=e.getItemVisual(n,"borderColor")||r,l=a.getItemStyle(NI);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=i,di(t,o.getModel(PI).getItemStyle())}function sc(t,e,n){var i=t.getData(),o=i.getLayout("largePoints"),a=new RI({shape:{points:o},__sign:1});e.add(a);var r=new RI({shape:{points:o},__sign:-1});e.add(r),lc(1,a,t,i),lc(-1,r,t,i),n&&(a.incremental=!0,r.incremental=!0)}function lc(t,e,n,i){var o=0<t?"P":"N",a=i.getVisual("borderColor"+o)||i.getVisual("color"+o),r=n.getModel(kI).getItemStyle(NI);e.useStyle(r),e.style.fill=null,e.style.stroke=a}function uc(t,e,n,i,o){return!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1}function hc(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function cc(t,e){rm.call(this);var n=new ds(t,e),i=new rm;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(t,e)}function dc(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=L(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),h([e,t[0],t[1]])}))}function pc(t,e,n){rm.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}function gc(t,e,n){rm.call(this),this._createPolyline(t,e,n)}function fc(t,e,n){pc.call(this,t,e,n),this._lastFrame=0,this._lastFramePercent=0}function mc(){this.group=new rm}function vc(t){return t instanceof Array||(t=[t,t]),t}function yc(){var t=Xg();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function xc(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b=t.getItemLayout(e),S=n.get("symbolRepeat"),M=n.get("symbolClip"),I=n.get("symbolPosition")||"start",T=(n.get("symbolRotate")||0)*Math.PI/180||0,A=n.get("symbolPatternSize")||2,D=n.isAnimationEnabled(),C={dataIndex:e,layout:b,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:M,symbolRepeat:S,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:A,rotation:T,animationModel:D?n:null,hoverAnimation:D&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};(function(t,e,n,i,o){var a,r=i.valueDim,s=t.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-(n[r.wh]<=0);{var c;a=N(s)?((c=[_c(l,s[0])-u,_c(l,s[1])-u])[1]<c[0]&&c.reverse(),c[h]):null!=s?_c(l,s)-u:e?i.coordSysExtent[r.index][h]-u:n[r.wh]}o.boundingLength=a,e&&(o.repeatCutLength=n[r.wh]),o.pxSign=0<a?1:a<0?-1:0})(n,S,b,i,C),u=t,h=e,c=b,d=S,p=C.boundingLength,g=C.pxSign,f=A,v=C,y=(m=i).valueDim,x=m.categoryDim,_=Math.abs(c[x.wh]),(w=N(w=u.getItemVisual(h,"symbolSize"))?w.slice():(null==w&&(w="100%"),[w,w]))[x.index]=Ei(w[x.index],_),w[y.index]=Ei(w[y.index],d?_:Math.abs(p)),v.symbolSize=w,(v.symbolScale=[w[0]/f,w[1]/f])[y.index]*=(m.isHorizontal?-1:1)*g,o=C.symbolScale,a=T,r=i,s=C,(l=n.get(nT)||0)&&(oT.attr({scale:o.slice(),rotation:a}),oT.updateTransform(),l/=oT.getLineScale(),l*=o[r.valueDim.index]),s.valueLineWidth=l;var L=C.symbolSize,k=n.get("symbolOffset");return N(k)&&(k=[Ei(k[0],L[0]),Ei(k[1],L[1])]),function(t,e,n,i,o,a,r,s,l,u,h){var c=u.categoryDim,d=u.valueDim,p=h.pxSign,g=Math.max(e[d.index]+r,0),f=g;{var m,v,y,x,_,w,b;i&&(m=Math.abs(s),v=V(t.get("symbolMargin"),"15%")+"",y=!1,v.lastIndexOf("!")===v.length-1&&(y=!0,v=v.slice(0,v.length-1)),v=Ei(v,e[d.index]),x=Math.max(g+2*v,0),_=y?0:2*v,w=Ki(i),b=w?i:Ec((m+_)/x),x=g+2*(v=(m-b*g)/2/(y?b:b-1)),_=y?0:2*v,w||"fixed"===i||(b=l?Ec((Math.abs(l)+_)/x):0),f=b*x-_,h.repeatTimes=b,h.symbolMargin=v)}var S=p*(f/2),M=h.pathPosition=[];M[c.index]=n[c.wh]/2,M[d.index]="start"===a?S:"end"===a?s-S:s/2,o&&(M[0]+=o[0],M[1]+=o[1]);var I=h.bundlePosition=[];I[c.index]=n[c.xy],I[d.index]=n[d.xy];var T=h.barRectShape=P({},n);T[d.wh]=p*Math.max(Math.abs(n[d.wh]),Math.abs(M[d.index]+S)),T[c.wh]=n[c.wh];var A=h.clipShape={};A[c.xy]=-n[c.xy],A[c.wh]=u.ecSize[c.wh],A[d.xy]=0,A[d.wh]=n[d.wh]}(n,L,b,S,k,I,C.valueLineWidth,C.boundingLength,C.repeatCutLength,i,C),C}function _c(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function wc(t){var e=t.symbolPatternSize,n=Kr(t.symbolType,-e/2,-e/2,e,e,t.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function bc(t,e,o,n){function i(t){var e=l.slice(),n=o.pxSign,i=t;return("start"===o.symbolRepeatDirection?0<n:n<0)&&(i=h-1-t),e[u.index]=d*(i-h/2+.5)+l[u.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}var a=t.__pictorialBundle,r=o.symbolSize,s=o.valueLineWidth,l=o.pathPosition,u=e.valueDim,h=o.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*o.symbolMargin;for(Nc(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=h,c<h?Oc(t,null,i(c),o,n):Oc(t,null,{scale:[0,0]},o,n,function(){a.remove(t)}),Cc(t,o),c++});c<h;c++){var p=wc(o);p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=h,a.add(p);var g=i(c);Oc(p,{position:g.position,scale:[0,0]},{scale:g.scale,rotation:g.rotation},o,n),p.on("mouseover",function(){Nc(t,function(t){t.trigger("emphasis")})}).on("mouseout",function(){Nc(t,function(t){t.trigger("normal")})}),Cc(p,o)}}function Sc(t,e,n,i){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?Oc(a,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(a=t.__pictorialMainPath=wc(n),o.add(a),Oc(a,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),Cc(a,n)}function Mc(t,e,n){var i=P({},e.barRectShape),o=t.__pictorialBarRect;o?Oc(o,null,{shape:i},e,n):(o=t.__pictorialBarRect=new _y({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function Ic(t,e,n,i){var o,a,r,s,l,u;n.symbolClip&&(o=t.__pictorialClipPath,a=P({},n.clipShape),r=e.valueDim,s=n.animationModel,l=n.dataIndex,o?Si(o,{shape:a},s,l):(a[r.wh]=0,o=new _y({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(u={})[r.wh]=n.clipShape[r.wh],Ey[i?"updateProps":"initProps"](o,{shape:u},s,l)))}function Tc(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=Ac,n.isAnimationEnabled=Dc,n}function Ac(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Dc(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Cc(t,e){t.off("emphasis").off("normal");var n=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:n.slice()},400,"elasticOut")})}function Lc(t,e,n,i){var o=new rm,a=new rm;return o.add(a),(o.__pictorialBundle=a).attr("position",n.bundlePosition.slice()),n.symbolRepeat?bc(o,e,n):Sc(o,0,n),Mc(o,n,i),Ic(o,e,n,i),o.__pictorialShapeStr=Pc(t,n),o.__pictorialSymbolMeta=n,o}function kc(t,e,n,i){var o=i.__pictorialBarRect;o&&(o.style.text=null);var a=[];Nc(i,function(t){a.push(t)}),i.__pictorialMainPath&&a.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),z(a,function(t){Si(t,{scale:[0,0]},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function Pc(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Nc(e,n,i){z(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function Oc(t,e,n,i,o,a){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&Ey[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,a)}function Rc(t,e,n){var i=n.color,o=n.dataIndex,a=n.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");Nc(t,function(t){t.setColor(i),t.setStyle(O({fill:i,opacity:n.opacity},r)),di(t,s),l&&(t.cursor=l),t.z2=n.z2});var u={},h=(e.valueDim.posDesc[+(0<n.boundingLength)],t.__pictorialBarRect);nl(h.style,u,a,i,e.seriesModel,o),di(h,u)}function Ec(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function zc(t,e,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,n),this.model=t}function Bc(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},a=i.position,r=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),V(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var h=e.rotate;return null==h&&(h=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-h:h,o.z2=1,o}function Vc(t,e,n,i,o){var a,r,s,l,u,h,c,d,p,g,f,m=t.axis;!m.scale.isBlank()&&m.containData(e)&&(t.involveSeries?(s=(a=(l=e,h=(u=t).axis,c=h.dim,d=l,p=[],g=Number.MAX_VALUE,f=-1,hT(u.seriesModels,function(e,t){var n,i,o=e.getData().mapDimension(c,!0);if(e.getAxisTooltipData)var a=e.getAxisTooltipData(o,l,h),r=a.dataIndices,s=a.nestestValue;else{if(!(r=e.getData().indicesOfNearest(o[0],l,"category"===h.type?.5:null)).length)return;s=e.getData().get(o[0],r[0])}null!=s&&isFinite(s)&&(n=l-s,(i=Math.abs(n))<=g&&((i<g||0<=n&&f<0)&&(g=i,f=n,d=s,p.length=0),hT(r,function(t){p.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}),{payloadBatch:p,snapToValue:d})).snapToValue,(r=a.payloadBatch)[0]&&null==o.seriesIndex&&P(o,r[0]),!i&&t.snap&&m.containData(s)&&null!=s&&(e=s),n.showPointer(t,e,r,o),n.showTooltip(t,a,s)):n.showPointer(t,e))}function Gc(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function Fc(t,e,n,i){var o,a,r,s=n.payloadBatch,l=e.axis,u=l.model,h=e.axisPointerModel;e.triggerTooltip&&s.length&&(a=Js(o=e.coordSys.model),(r=t.map[a])||(r=t.map[a]={coordSysId:o.id,coordSysIndex:o.componentIndex,coordSysType:o.type,coordSysMainType:o.mainType,dataByAxis:[]},t.list.push(r)),r.dataByAxis.push({axisDim:l.dim,axisIndex:u.componentIndex,axisType:u.type,axisId:u.id,value:i,valueLabelOpt:{precision:h.get("label.precision"),formatter:h.get("label.formatter")},seriesDataIndices:s.slice()}))}function Wc(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function Hc(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Zc(t,e,n){var i,h,c;function o(t,u){h.on(t,function(e){var i,o,t,n,a,r,s,l=(i=c,{dispatchAction:function t(e){var n=o[e.type];n?n.push(e):(e.dispatchAction=t,i.dispatchAction(e))},pendings:o={showTip:[],hideTip:[]}});gT(pT(h).records,function(t){t&&u(t,e,l.dispatchAction)}),n=c,r=(t=l.pendings).showTip.length,s=t.hideTip.length,r?a=t.showTip[r-1]:s&&(a=t.hideTip[s-1]),a&&(a.dispatchAction=null,n.dispatchAction(a))})}ef.node||(i=e.getZr(),pT(i).records||(pT(i).records={}),c=e,pT(h=i).initialized||(pT(h).initialized=!0,o("click",E(Xc,"click")),o("mousemove",E(Xc,"mousemove")),o("globalout",Uc)),(pT(i).records[t]||(pT(i).records[t]={})).handler=n)}function Uc(t,e,n){t.handler("leave",null,n)}function Xc(t,e,n,i){e.handler(t,n,i)}function jc(t,e){var n;ef.node||(n=e.getZr(),(pT(n).records||{})[t]&&(pT(n).records[t]=null))}function Yc(){}function qc(t,e,n,i){!function n(i,t){if(B(i)&&B(t)){var o=!0;return z(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}(mT(n).lastProp,i)&&(mT(n).lastProp=i,e?Si(n,i,t):(n.stopAnimation(),n.attr(i)))}function Kc(t,e){t[e.get("label.show")?"show":"hide"]()}function $c(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Jc(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function Qc(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function td(t,e,n,i,o){var a=ed(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),r=n.getModel("label"),s=$y(r.get("padding")||0),l=r.getFont(),u=pe(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=o.align;"right"===p&&(h[0]-=c),"center"===p&&(h[0]-=c/2);var g,f,m,v,y,x,_=o.verticalAlign;"bottom"===_&&(h[1]-=d),"middle"===_&&(h[1]-=d/2),g=h,f=c,m=d,y=(v=i).getWidth(),x=v.getHeight(),g[0]=Math.min(g[0]+f,y)-f,g[1]=Math.min(g[1]+m,x)-m,g[0]=Math.max(g[0],0),g[1]=Math.max(g[1],0);var w=r.get("backgroundColor");w&&"auto"!==w||(w=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:w,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function ed(t,e,o,n,i){t=e.scale.parse(t);var a,r=e.scale.getLabel(t,{precision:i.precision}),s=i.formatter;return s&&(a={value:jr(e,t),seriesData:[]},z(n,function(t){var e=o.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,i=e&&e.getDataParams(n);i&&a.seriesData.push(i)}),A(s)?r=s.replace("{value}",r):f(s)&&(r=s(a))),r}function nd(t,e,n){var i=dt();return vt(i,i,n.rotation),mt(i,i,n.position),Ti([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function id(t,e,n,i,o,a){var r=Wb.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get("label.margin"),td(e,i,o,a,{position:nd(i.axis,t,n),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function od(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function ad(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function rd(t,e,n,i,o,a){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:a,clockwise:!0}}function sd(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}function ld(t){return"x"===t.dim?0:1}function ud(t){return t.isHorizontal()?0:1}function hd(t,e){var n=t.getRect();return[n[wT[e]],n[wT[e]]+n[bT[e]]]}function cd(n,t,e){if(n.count())for(var i,o=t.coordinateSystem,a=t.getLayerSeries(),r=n.mapDimension("single"),s=n.mapDimension("value"),l=L(a,function(t){return L(t.indices,function(t){var e=o.dataToPoint(n.get(r,t));return e[1]=n.get(s,t),e})}),u=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],a=0,r={},s=0;s<n;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];a<u&&(a=u),i.push(u)}for(var h=0;h<n;++h)o[h]=(a-i[h])/2;for(var c=a=0;c<n;++c){var d=i[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),h=u.y0,c=e/u.max,d=a.length,p=a[0].indices.length,g=0;g<p;++g){i=h[g]*c,n.setItemLayout(a[0].indices[g],{layerIndex:0,x:l[0][g][0],y0:i,y:l[0][g][1]*c});for(var f=1;f<d;++f)i+=l[f-1][g][1]*c,n.setItemLayout(a[f].indices[g],{layerIndex:f,x:l[f][g][0],y0:i,y:l[f][g][1]*c})}}function dd(t,e,n){function i(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}rm.call(this);var a=new my({z2:CT});a.seriesIndex=e.seriesIndex;var r=new cy({z2:LT,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,n),this.on("emphasis",i).on("normal",o).on("mouseover",i).on("mouseout",o)}function pd(t,e,n){var i=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(i=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(i)return i;if(0===t.depth)return n.option.color[0];var r=n.option.color.length;return n.option.color[function(t){for(var e=t;1<e.depth;)e=e.parentNode;return M(t.getAncestors()[0].children,e)}(t)%r]}function gd(t,e){var n=t.children||[];t.children=function(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})}(n,e),n.length&&z(t.children,function(t){gd(t,e)})}function fd(a,r){return r=r||[0,0],L(["x","y"],function(t,e){var n=this.getAxis(t),i=r[e],o=a[e]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function md(a,r){return r=r||[0,0],L([0,1],function(t){var e=r[t],n=a[t]/2,i=[],o=[];return i[t]=e-n,o[t]=e+n,i[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function vd(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))}function yd(s,l){return L(["Radius","Angle"],function(t,e){var n=this["get"+t+"Axis"](),i=l[e],o=s[e]/2,a="dataTo"+t,r="category"===n.type?n.getBandWidth():Math.abs(n[a](i-o)-n[a](i+o));return"Angle"===t&&(r=r*Math.PI/180),r},this)}function xd(t,e,n,i,o){null==n[t]||o||(e[t]=n[t],n[t]=i[t])}function _d(o,a,e,t){function r(t){null==t&&(t=l),v&&(u=a.getItemModel(t),h=u.getModel(zT),c=u.getModel(BT),d=a.getItemVisual(t,"color"),v=!1)}var n=o.get("renderItem"),i=o.coordinateSystem,s={};i&&(s=i.prepareCustoms?i.prepareCustoms():GT[i.type](i));var l,u,h,c,d,p,g,f=O({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=l),a.get(a.getDimension(t||0),e)},style:function(t,e){null==e&&(e=l),r(e);var n=u.getModel(RT).getItemStyle();null!=d&&(n.fill=d);var i=a.getItemVisual(e,"opacity");return null!=i&&(n.opacity=i),fi(n,h,null,{autoColor:d,isRectText:!0}),n.text=h.getShallow("show")?G(o.getFormattedLabel(e,"normal"),cs(a,e)):null,t&&P(n,t),n},styleEmphasis:function(t,e){null==e&&(e=l),r(e);var n=u.getModel(ET).getItemStyle();return fi(n,c,null,{isRectText:!0},!0),n.text=c.getShallow("show")?F(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),cs(a,e)):null,t&&P(n,t),n},visual:function(t,e){return null==e&&(e=l),a.getItemVisual(e,t)},barLayout:function(t){if(i.getBaseAxis)return function(t){var e=[],n=t.axis;if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<t.count;o++)e.push(O({bandWidth:i,axisKey:"axis0",stackId:kw+o},t));for(var a=Er(e),r=[],o=0;o<t.count;o++){var s=a.axis0[kw+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(O({axis:i.getBaseAxis()},t))},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return wi(t,e)}},s.api||{}),m={context:{},seriesId:o.id,seriesName:o.name,seriesIndex:o.seriesIndex,coordSys:s.coordSys,dataInsideLength:a.count(),encode:(p=o.getData(),g={},z(p.dimensions,function(t,e){var n,i=p.getDimensionInfo(t);i.isExtraCoord||(n=i.coordDim,(g[n]=g[n]||[])[i.coordDimIndex]=e)}),g)},v=!0;return function(t,e){return l=t,v=!0,n&&n(O({dataIndexInside:t,dataIndex:a.getRawIndex(t),actionType:e?e.type:null},m),f)}}function wd(t,e,n,i,o,a){return(t=bd(t,e,n,i,o,a,!0))&&a.setItemGraphicEl(e,t),t}function bd(t,e,n,i,o,a,r){var s,l,u,h,c,d,p,g=!n,f=(n=n||{}).type,m=n.shape,v=n.style;if(t&&(g||null!=f&&f!==t.__customGraphicType||"path"===f&&((p=m)&&(p.hasOwnProperty("pathData")||p.hasOwnProperty("d")))&&Td(m)!==t.__customPathData||"image"===f&&Ad(v,"image")&&v.image!==t.__customImagePath||"text"===f&&Ad(m,"text")&&v.text!==t.__customText)&&(o.remove(t),t=null),!g){var y=!t;return t||("path"===(d=(s=n).type)?(h=null!=(u=s.shape).width&&null!=u.height?{x:u.x||0,y:u.y||0,width:u.width,height:u.height}:null,(l=Yn(c=Td(u),null,h,u.layout||"center")).__customPathData=c):"image"===d?(l=new We({})).__customImagePath=s.style.image:"text"===d?(l=new cy({})).__customText=s.style.text:l=new Ey[d.charAt(0).toUpperCase()+d.slice(1)],l.__customGraphicType=d,l.name=s.name,t=l),function(e,t,n,i,o,a){var r,s,l={},u=n.style||{};n.shape&&(l.shape=D(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===e.type&&n.style&&(r=l.style={},z(["x","y","width","height"],function(t){xd(t,r,u,e.style,o)})),"text"===e.type&&n.style&&(r=l.style={},z(["x","y"],function(t){xd(t,r,u,e.style,o)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)),"group"!==e.type&&(e.useStyle(u),o)&&(e.style.opacity=0,null==(s=u.opacity)&&(s=1),Mi(e,{style:{opacity:s}},i,t)),o?e.attr(l):Si(e,l,i,t),n.hasOwnProperty("z2")&&e.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&e.attr("silent",n.silent),n.hasOwnProperty("invisible")&&e.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&e.attr("ignore",n.ignore),n.hasOwnProperty("info")&&e.attr("info",n.info);var h=n.styleEmphasis,c=!1===h;e.__cusHasEmphStl&&null==h||!e.__cusHasEmphStl&&c||(ri(e,h),e.__cusHasEmphStl=!c),a&&pi(e,!c)}(t,e,n,i,y,r),"group"===f&&function(t,e,n,i,o){var a=n.children,r=a?a.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(r||l||u)if(l)!function(t){new sr(t.oldChildren,t.newChildren,Sd,Sd,t).add(Md).update(Md).remove(Id).execute()}({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:i,group:t,data:o});else{u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&bd(t.childAt(h),e,a[h],i,t,o)}}(t,e,n,i,a),o.add(t),t}}function Sd(t,e){var n=t&&t.name;return null!=n?n:VT+e}function Md(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null;bd(null!=e?n.oldChildren[e]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function Id(t){var e=this.context,n=e.oldChildren[t];n&&e.group.remove(n)}function Td(t){return t&&(t.pathData||t.d)}function Ad(t,e){return t&&t.hasOwnProperty(e)}function Dd(t,e,n,i){var o=n.type,a=new Ey[o.charAt(0).toUpperCase()+o.slice(1)](n);e.add(a),i.set(t,a),a.__ecGraphicId=t}function Cd(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){Cd(t,e)}),e.removeKey(t.__ecGraphicId),n.remove(t))}function Ld(e,t){var n;return z(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}function kd(t,e,n){var o,a={},r="toggleSelected"===t;return n.eachComponent("legend",function(i){r&&null!=o?i[o?"select":"unSelect"](e.name):(i[t](e.name),o=i.isSelected(e.name)),z(i.getData(),function(t){var e,n=t.get("name");"\n"!==n&&""!==n&&(e=i.isSelected(n),a.hasOwnProperty(n)?a[n]=a[n]&&e:a[n]=e)})}),{name:e.name,selected:a}}function Pd(t,e){var n=$y(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new _y({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}function Nd(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Od(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function Rd(t,e,n,i){var o=n.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function Ed(t,e,n){var i=[1,1];i[t.getOrient().index]=0,uo(e,n,{type:"box",ignoreSize:i})}function zd(o){var n,i,t,e,a,r,s=[],l=o.get("transitionDuration"),u=o.get("backgroundColor"),h=o.getModel("textStyle"),c=o.get("padding");return l&&s.push((r="left "+(a=l)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+a+"s cubic-bezier(0.23, 1, 0.32, 1)",L(tA,function(t){return t+"transition:"+r}).join(";"))),u&&(ef.canvasSupported?s.push("background-Color:"+u):(s.push("background-Color:#"+Rt(u)),s.push("filter:alpha(opacity=70)"))),JT(["width","color","radius"],function(t){var e="border-"+t,n=QT(e),i=o.get(n);null!=i&&s.push(e+":"+i+("color"===t?"":"px"))}),s.push((i=[],t=(n=h).get("fontSize"),(e=n.getTextColor())&&i.push("color:"+e),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px"),JT(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";"))),null!=c&&s.push("padding:"+$y(c).join("px ")+"px"),s.join(";")+";"}function Bd(n,t){if(ef.wxa)return null;var e=document.createElement("div"),i=this._zr=t.getZr();this.el=e,this._x=t.getWidth()/2,this._y=t.getHeight()/2,n.appendChild(e),this._container=n,this._show=!1,this._hideTimeout;var o=this;e.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},e.onmousemove=function(t){var e;t=t||window.event,o._enterable||(e=i.handler,st(n,t,!0),e.dispatch("mousemove",t))},e.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}function Vd(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}function Gd(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(ki.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),e=new ki(n,e,e.ecModel))}return e}function Fd(t,e){return t.dispatchAction||k(e.dispatchAction,e)}function Wd(t){return"center"===t||"middle"===t}function Hd(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Zd(t){return t.dim}function Ud(t,e){lb.call(this,"radius",t,e),this.type="category"}function Xd(t,e){e=e||[0,360],lb.call(this,"angle",t,e),this.type="category"}function jd(t,e){return e.type||(e.data?"category":"value")}function Yd(t,e){var n,i,o=this,a=o.getAngleAxis(),r=o.getRadiusAxis();a.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===o&&(z((e=t.getData()).mapDimension("radius",!0),function(t){r.scale.unionExtentFromData(e,Sr(e,t))}),z(e.mapDimension("angle",!0),function(t){a.scale.unionExtentFromData(e,Sr(e,t))}))}),Zr(a.scale,a.model),Zr(r.scale,r.model),"category"!==a.type||a.onBand||(n=a.getExtent(),i=360/a.scale.count(),a.inverse?n[1]+=i:n[1]-=i,a.setExtent(n[0],n[1]))}function qd(t,e){var n;t.type=e.get("type"),t.scale=Ur(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse^=e.get("clockwise"),n=e.get("startAngle"),t.setExtent(n,n+(t.inverse?-360:360))),(e.axis=t).model=e}function Kd(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function $d(t){return t.getRadiusAxis().inverse?0:1}function Jd(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}function Qd(i,t){t.update="updateView",Ka(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),z(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}function tp(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function ep(e,t,a){var n={};return fA(t,function(i){var o=n[i]=(t.prototype.__hidden=t.prototype,new t);function t(){}fA(e[i],function(t,e){var n;oM.isValidType(e)&&(n={type:e,visual:t},a&&a(n,i),o[e]=new oM(n),"opacity"===e&&((n=D(n)).type="colorAlpha",o.__hidden.__alphaForOpacity=new oM(n)))})}),n}function np(e,n,t){var i;z(t,function(t){n.hasOwnProperty(t)&&tp(n[t])&&(i=!0)}),i&&z(t,function(t){n.hasOwnProperty(t)&&tp(n[t])?e[t]=D(n[t]):delete e[t]})}function ip(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,n){if(t){var i=n.range;return op(t[a],i)}},rect:function(t,e,n){if(t){var i=n.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]<o[0]&&o.reverse(),op(o[0],i)||op(o[1],i)||op(i[0],o)||op(i[1],o)}}}}function op(t,e){return e[0]<=t&&t<=e[1]}function ap(t,e,n,i,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(function(t,e,n,i,o,a,r,s){var l=rp(n-t,o-r,i-e,a-s);if(function(t){return t<=1e-6&&-1e-6<=t}(l))return!1;var u=rp(o-t,o-r,a-e,a-s)/l;if(u<0||1<u)return!1;var h=rp(n-t,o-t,i-e,a-e)/l;return!(h<0||1<h)}(t,e,n,i,s[0],s[1],r[0],r[1]))return 1;r=s}}function rp(t,e,n,i){return t*i-e*n}function sp(t,e,n){var i=this._targetInfoList=[],o={},a=up(e,t);vA(SA,function(t,e){n&&n.include&&!(0<=yA(n.include,e))||t(a,i,o)})}function lp(t){return t[0]>t[1]&&t.reverse(),t}function up(t,e){return un(t,e,{includeMainTypes:wA})}function hp(t,e,n,i){var o=n.getAxis(["x","y"][t]),a=lp(L([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t])):o.toGlobalCoord(o.dataToCoord(i[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function cp(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function dp(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function pp(t,e){var n;t.isDisposed()||((n=t.getZr())[LA]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[LA]=!1)}function gp(t,e,n,i){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](i,n,r.selectors,r))return 1}}function fp(t){var r=t.brushSelector;if(A(r)){var e=[];return z(mA,function(a,t){e[t]=function(t,e,n,i){var o=e.getItemLayout(t);return a[r](o,n,i)}}),e}if(f(r)){var n={};return z(mA,function(t,e){n[e]=r}),n}return r}function mp(t){return new Qt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function vp(t,e){return v({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ki(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function yp(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function xp(t,e){OA[t]=e}function _p(t){return OA[t]}function wp(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}function bp(t,e,n){this._model=t}function Sp(t,e,n,i){var o=n.calendarModel,a=n.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](i):null}function Mp(t,i){var o=t.cellSize;N(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o];var e=L([0,1],function(t){return(null!=(e=i)[ax[n=t][0]]||null!=e[ax[n][1]]&&null!=e[ax[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t];var e,n});uo(t,i,{type:"box",ignoreSize:e})}function Ip(e,s,l){function u(t,n){n.nodes.push(t),s(function(e){z(l(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(t){var a,r={nodes:[],records:{}};if(s(function(t){r.records[t.name]={}}),!t)return r;for(u(t,r);a=!1,e(function(t){var n,i,o,e;e=t,0<=M(r.nodes,e)||(n=t,i=r,o=!1,s(function(e){z(l(n,e)||[],function(t){i.records[e.name][t]&&(o=!0)})}),!o)||(u(t,r),a=!0)}),a;);return r}}function Tp(t,e,n){var i=[1/0,-1/0];return jA(n,function(t){var n=t.getData();n&&jA(n.mapDimension(e,!0),function(t){var e=n.getApproximateExtent(t);e[0]<i[0]&&(i[0]=e[0]),e[1]>i[1]&&(i[1]=e[1])})}),i[1]<i[0]&&(i=[NaN,NaN]),function(t,e){var n=t.getAxisModel(),i=n.getMin(!0),o="category"===n.get("type"),a=o&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?e[0]=i:o&&(e[0]=0<a?0:NaN);var r=n.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN),n.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,i),i}function Ap(t,e){var n,i,o=t.getAxisModel(),a=t._percentWindow,r=t._valueWindow;a&&(n=Fi(r,[0,500]),n=Math.min(n,20),i=e||0===a[0]&&100===a[1],o.setRange(i?null:+r[0].toFixed(n),i?null:+r[1].toFixed(n)))}function Dp(e){var n={};return qA(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}function Cp(t,o){var a=t._rangePropMode,r=t.get("rangeMode");qA([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=o[t[0]],i=null!=o[t[1]];n&&!i?a[e]="percent":!n&&i?a[e]="value":r?a[e]=r[e]:n&&(a[e]="percent")})}function Lp(t){return"vertical"===t?"ns-resize":"ew-resize"}function kp(t,i){var e=Np(t),o=i.dataZoomId,a=i.coordId;z(e,function(t,e){var n=t.dataZoomInfos;n[o]&&M(i.allCoordIds,a)<0&&(delete n[o],t.count--)}),Op(e);var r,n,s=e[a];s||((s=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=(r=s,n=new Dl(t.getZr()),z(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];z(r.dataZoomInfos,function(t){var e,n;i.isAvailableBehavior(t.dataZoomModel.option)&&(n=(e=(t.getRange||{})[a])&&e(r.controller,i),!t.dataZoomModel.get("disabled",!0)&&n&&o.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]}))}),o.length&&r.dispatchAction(o)})}),n),s.dispatchAction=E(Rp,t)),s.dataZoomInfos[o]||s.count++,s.dataZoomInfos[o]=i;var l,u,h,c,d=(l=s.dataZoomInfos,h={type_true:2,type_move:1,type_false:0,type_undefined:-1},c=!0,z(l,function(t){var e=t.dataZoomModel,n=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");h["type_"+u]<h["type_"+n]&&(u=n),c&=e.get("preventDefaultMouseMove",!0)}),{controlType:u,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!c}});s.controller.enable(d.controlType,d.opt),s.controller.setPointerChecker(i.containsPoint),sa(s,"dispatchAction",i.dataZoomModel.get("throttle",!0),"fixRate")}function Pp(t){return t.type+"\0_"+t.id}function Np(t){var e=t.getZr();return e[sD]||(e[sD]={})}function Op(n){z(n,function(t,e){t.count||(t.controller.dispose(),delete n[e])})}function Rp(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Ep(l){return function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=l(a,r,t,e,n,i);return XM(s,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function zp(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Bp(t,e,n,i){for(var o=e.targetVisuals[i],a=oM.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(n,function(t){return r[t]},function(t,e){r[t]=e})}return r.color}function Vp(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],a=[],r=0;r<=200&&o<n[1];r++)a.push(o),o+=i;return a.push(n[1]),a}function Gp(t,e,n){var i=t.option,o=i.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?n[0]:i[l[c]];var d=[["x","width",3],["y","height",0]][r],p=so(h,a,i.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*a[d[1]]?0:1]}function Fp(e){return z(e||[],function(t){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null)}),e}function Wp(t,e,n,i){return new yy({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Mf(t.event)},ondragend:i})}function Hp(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function Zp(t){return"vertical"===t?"ns-resize":"ew-resize"}function Up(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}function Xp(t){tn(t,"label",["show"])}function jp(t,e,n,i,o,a){var r=[],s=br(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=Jp(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(n,u),r[a]=e.get(i,u);var h=Vi(e.get(i,u));return 0<=(h=Math.min(h,20))&&(r[a]=+r[a].toFixed(h)),r}function Yp(t,e){var n,i=t.getData(),o=t.coordinateSystem;if(e&&(n=e,isNaN(parseFloat(n.x))||isNaN(parseFloat(n.y)))&&!N(e.coord)&&o){var a=o.dimensions,r=qp(e,i,o,t);if((e=D(e)).type&&VD[e.type]&&r.baseAxis&&r.valueAxis){var s=zD(a,r.baseAxis.dim),l=zD(a,r.valueAxis.dim);e.coord=VD[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;h<2;h++)VD[u[h]]&&(u[h]=Jp(i,i.mapDimension(a[h]),u[h]));e.coord=u}}return e}function qp(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var o=0;o<i.length;o++){var a=n.getDimensionInfo(i[o]);if(a.name===e)return a.coordDim}}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function Kp(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y))))||t.containData(e.coord);var n}function $p(t,e,n,i){return i<2?t.coord&&t.coord[i]:t.value}function Jp(t,e,n){if("average"!==n)return"median"===n?t.getMedian(e):t.getDataExtent(e,!0)["max"===n?1:0];var i=0,o=0;return t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o}function Qp(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,n,i,o=s.getItemModel(t),a=Ei(o.get("x"),u.getWidth()),r=Ei(o.get("y"),u.getHeight());isNaN(a)||isNaN(r)?l.getMarkerPosition?i=l.getMarkerPosition(s.getValues(s.dimensions,t)):h&&(e=s.get(h.dimensions[0],t),n=s.get(h.dimensions[1],t),i=h.dataToPoint([e,n])):i=[a,r],isNaN(a)||(i[0]=a),isNaN(r)||(i[1]=r),s.setItemLayout(t,i)})}function tg(t){return!isNaN(t)&&!isFinite(t)}function eg(t,e,n,i){var o=1-t,a=i.dimensions[t];return tg(e[o])&&tg(n[o])&&e[t]===n[t]&&i.getAxis(a).containData(e[t])}function ng(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(eg(1,n,i,t)||eg(0,n,i,t)))return!0}return Kp(t,e[0])&&Kp(t,e[1])}function ig(t,e,n,i,o){var a,r,s,l,u,h,c=i.coordinateSystem,d=t.getItemModel(e),p=Ei(d.get("x"),o.getWidth()),g=Ei(d.get("y"),o.getHeight());isNaN(p)||isNaN(g)?(s=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(h=c.dimensions,a=t.get(h[0],e),r=t.get(h[1],e),c.dataToPoint([a,r])),"cartesian2d"===c.type&&(l=c.getAxis("x"),u=c.getAxis("y"),h=c.dimensions,tg(t.get(h[0],e))?s[0]=l.toGlobalCoord(l.getExtent()[n?0:1]):tg(t.get(h[1],e))&&(s[1]=u.toGlobalCoord(u.getExtent()[n?0:1]))),isNaN(p)||(s[0]=p),isNaN(g)||(s[1]=g)):s=[p,g],t.setItemLayout(e,s)}function og(t){return!isNaN(t)&&!isFinite(t)}function ag(t,e,n){var i=1-t;return og(e[i])&&og(n[i])}function rg(t,e){var n=e.coord[0],i=e.coord[1];return!("cartesian2d"!==t.type||!n||!i||!ag(1,n,i)&&!ag(0,n,i))||Kp(t,{coord:n,x:e.x0,y:e.y0})||Kp(t,{coord:i,x:e.x1,y:e.y1})}function sg(t,e,n,i,o){var a,r,s,l,u,h,c=i.coordinateSystem,d=t.getItemModel(e),p=Ei(d.get(n[0]),o.getWidth()),g=Ei(d.get(n[1]),o.getHeight());return isNaN(p)||isNaN(g)?(h=i.getMarkerPosition?i.getMarkerPosition(t.getValues(n,e)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),"cartesian2d"===c.type&&(r=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),og(l)?h[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):og(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(p)||(h[0]=p),isNaN(g)||(h[1]=g)):h=[p,g],h}function lg(t){var e=t.itemStyle||(t.itemStyle={}),n=e.emphasis||(e.emphasis={}),i=t.label||t.label||{},o=i.normal||(i.normal={}),a={normal:1,emphasis:1};z(i,function(t,e){a[e]||ug(o,e)||(o[e]=t)}),n.label&&!ug(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function ug(t,e){return t.hasOwnProperty(e)}function hg(t,e,n,i,o,a){var r=e.get("color");o?(o.setColor(r),n.add(o),a&&a.onUpdate(o)):((o=Kr(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),n.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),i=v({rectHover:!0,z2:100},i,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,i.scale=l;var u,h=t.get("symbolOffset");h&&((u=i.position=i.position||[0,0])[0]+=Ei(h[0],l[0]),u[1]+=Ei(h[1],l[1]));var c=t.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function cg(t,e,n,i,o){var a,r;t.dragging||(a=i.getModel("checkpointStyle"),r=n.dataToCoord(i.getData().get(["value"],e)),o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0))))}function dg(t){this.model=t}function pg(t){this.model=t}function gg(t){var o,a,r,h,e=(o={},a=[],r=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},r.push({axisDim:e.dim,axisIndex:e.index})),o[n].series.push(t)):a.push(t)}),{seriesGroupByCategoryAxis:o,other:a,meta:r});return{value:I([(h=[],z(e.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(L(t.series,function(t){return t.name})),a=[n.model.getCategories()];z(t.series,function(t){a.push(t.getRawData().mapArray(i,function(t){return t}))});for(var r=[o.join(oC)],s=0;s<a[0].length;s++){for(var l=[],u=0;u<a.length;u++)l.push(a[u][s]);r.push(l.join(oC))}h.push(r.join("\n"))}),h.join("\n\n"+iC+"\n\n")),L(e.other,function(t){var o=t.getRawData(),a=[t.name],r=[];return o.each(o.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],n=o.getName(e),i=0;i<t-1;i++)r[i]=arguments[i];a.push((n?n+oC:"")+r.join(oC))}),a.join("\n")}).join("\n\n"+iC+"\n\n")],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+iC+"\n\n"),meta:e.meta}}function fg(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function mg(t,r){var s={series:[]};return z(t.split(new RegExp("\n*"+iC+"\n*","g")),function(t,e){var n,i,o,a;0<=(a=t).slice(0,a.indexOf("\n")).indexOf(oC)?(n=function(t){for(var e=t.split(/\n+/g),n=[],i=L(fg(e.shift()).split(aC),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=fg(e[o]).split(aC);n.push(a.shift());for(var r=0;r<a.length;r++)i[r]&&(i[r].data[o]=a[r])}return{series:i,categories:n}}(t),o=(i=r[e]).axisDim+"Axis",i&&(s[o]=s[o]||[],s[o][i.axisIndex]={data:n.categories},s.series=s.series.concat(n.series))):(n=function(t){for(var e=t.split(/\n+/g),n=fg(e.shift()),i=[],o=0;o<e.length;o++){for(var a,r=fg(e[o]).split(aC),s=!1,l=isNaN(r[0])?(s=!0,a=r[0],r=r.slice(1),i[o]={name:a,value:[]},i[o].value):i[o]=[],u=0;u<r.length;u++)l.push(+r[u]);1===l.length&&(s?i[o].value=l[0]:i[o]=l[0])}return{name:n,data:i}}(t),s.series.push(n))}),s}function vg(t){this._dom=null,this.model=t}function yg(t){return t[sC]||(t[sC]=[{}])}function xg(t,e,n){(this._brushController=new sh(n.getZr())).on("brush",k(this._onBrush,this)).mount(),this._isZoomActive}function _g(e){var n={};return z(["xAxisIndex","yAxisIndex"],function(t){n[t]=e[t],null==n[t]&&(n[t]="all"),!1!==n[t]&&"none"!==n[t]||(n[t]=[])}),n}function wg(t,e){t.setIconStatus("back",1<yg(e).length?"emphasis":"normal")}function bg(t){this.model=t}function Sg(t){return pC(t)}function Mg(t){return parseInt(t,10)}function Ig(t,e){var n;!mC&&vC&&(mC=!0,(n=vC.styleSheets).length<31?vC.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):n[0].addRule(".zrvml","behavior:url(#default#VML)")),this.root=t,this.storage=e;var i=document.createElement("div"),o=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",o.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=o,this._vmlViewport=i,this.resize();var a=e.delFromStorage,r=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(o)},e.addToStorage=function(t){t.onAdd&&t.onAdd(o),r.call(e,t)},this._firstPaint=!0}function Tg(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ag(t){return YC(1e4*t)/1e4}function Dg(t){return t<tL&&-tL<t}function Cg(t,e){e&&Lg(t,"transform","matrix("+XC.call(e,",")+")")}function Lg(t,e,n){n&&("linear"===n.type||"radial"===n.type)||("string"==typeof n&&-1<n.indexOf("NaN")&&console.log(n),t.setAttribute(e,n))}function kg(t,e,n,i){var o,a,r,s,l,u;a=e,null!=(r=n?a.textFill:a.fill)&&r!==jC?(o="transparent"===(o=n?e.textFill:e.fill)?jC:o,"none"!==t.getAttribute("clip-path")&&o===jC&&(o="rgba(0, 0, 0, 0.002)"),Lg(t,"fill",o),Lg(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)):Lg(t,"fill",jC),l=e,null!=(u=n?l.textStroke:l.stroke)&&u!==jC?(Lg(t,"stroke",s="transparent"===(s=n?e.textStroke:e.stroke)?jC:s),Lg(t,"stroke-width",(n?e.textStrokeWidth:e.lineWidth)/(!n&&e.strokeNoScale?i.getLineScale():1)),Lg(t,"paint-order",n?"stroke":"fill"),Lg(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(Lg(t,"stroke-dasharray",e.lineDash.join(",")),Lg(t,"stroke-dashoffset",YC(e.lineDashOffset||0))):Lg(t,"stroke-dasharray",""),e.lineCap&&Lg(t,"stroke-linecap",e.lineCap),e.lineJoin&&Lg(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Lg(t,"stroke-miterlimit",e.miterLimit)):Lg(t,"stroke",jC)}function Pg(t){return"middle"===t?"middle":"bottom"===t?"after-edge":"hanging"}function Ng(){}function Og(t,e,n,i,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=o||"_dom",this.nextId=0}function Rg(t,e){Og.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function Eg(t,e){Og.call(this,t,e,"clipPath","__clippath_in_use__")}function zg(t,e){Og.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function Bg(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function Vg(t){return parseInt(t,10)}function Gg(t,e){return e&&t&&e.parentNode!==t}function Fg(t,e,n){var i;Gg(t,e)&&n&&((i=n.nextSibling)?t.insertBefore(e,i):t.appendChild(e))}function Wg(t,e){var n;Gg(t,e)&&((n=t.firstChild)?t.insertBefore(e,n):t.appendChild(e))}function Hg(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function Zg(t){return t.__textSvgEl}function Ug(t){return t.__svgEl}function Xg(){return df.createCanvas()}var jg,Yg,qg,Kg,$g,Jg,Qg=2311,tf=function(){return Qg++},ef="object"==("undefined"==typeof wx?"undefined":_typeof(wx))&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:(Yg={},qg=(jg=navigator.userAgent).match(/Firefox\/([\d.]+)/),Kg=jg.match(/MSIE\s([\d.]+)/)||jg.match(/Trident\/.+?rv:(([\d.]+))/),$g=jg.match(/Edge\/([\d.]+)/),Jg=/micromessenger/i.test(jg),qg&&(Yg.firefox=!0,Yg.version=qg[1]),Kg&&(Yg.ie=!0,Yg.version=Kg[1]),$g&&(Yg.edge=!0,Yg.version=$g[1]),Jg&&(Yg.weChat=!0),{browser:Yg,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!Yg.ie&&!Yg.edge,pointerEventsSupported:"onpointerdown"in window&&(Yg.edge||Yg.ie&&11<=Yg.version),domSupported:"undefined"!=typeof document}),nf={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},of={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},af=Object.prototype.toString,rf=Array.prototype,sf=rf.forEach,lf=rf.filter,uf=rf.slice,hf=rf.map,cf=rf.reduce,df={};df.createCanvas=function(){return document.createElement("canvas")};var pf,gf="__ec_primitive__";y.prototype={constructor:y,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=k(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}};var ff=(Object.freeze||Object)({$override:e,clone:D,merge:v,mergeAll:h,extend:P,defaults:O,createCanvas:Xg,getContext:i,indexOf:M,inherits:a,mixin:o,isArrayLike:R,each:z,map:L,reduce:b,filter:I,find:function(t,e,n){if(t&&e)for(var i=0,o=t.length;i<o;i++)if(e.call(n,t[i],i,t))return t[i]},bind:k,curry:E,isArray:N,isFunction:f,isString:A,isObject:B,isBuiltInObject:r,isTypedArray:g,isDom:_,eqNaN:m,retrieve:V,retrieve2:G,retrieve3:F,slice:s,normalizeCssArray:l,assert:d,trim:p,setAsPrimitive:c,isPrimitive:u,createHashMap:C,concatArray:n,noop:x}),mf="undefined"==typeof Float32Array?Array:Float32Array,vf=K,yf=$,xf=(Object.freeze||Object)({create:w,copy:S,clone:T,set:W,add:H,scaleAndAdd:Z,sub:U,len:X,length:X,lenSquare:j,lengthSquare:j,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Y,normalize:q,distance:K,dist:vf,distanceSquare:$,distSquare:yf,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:J,applyTransform:Q,min:tt,max:et});nt.prototype={constructor:nt,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(it(e,t),"dragstart",t.event))},_drag:function(t){var e,n,i,o,a,r,s=this._draggingTarget;s&&(e=t.offsetX,n=t.offsetY,i=e-this._x,o=n-this._y,this._x=e,this._y=n,s.drift(i,o,t),this.dispatchToElement(it(s,t),"drag",t.event),a=this.findHover(e,n,s).target,r=this._dropTarget,s!==(this._dropTarget=a)&&(r&&a!==r&&this.dispatchToElement(it(r,t),"dragleave",t.event),a&&a!==r&&this.dispatchToElement(it(a,t),"dragenter",t.event)))},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(it(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(it(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var _f=Array.prototype.slice,wf=function(t){this._$handlers={},this._$eventProcessor=t};wf.prototype={constructor:wf,one:function(t,e,n,i){var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;e=ot(this,e),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;return o[t].push({h:n,one:!0,query:e,ctx:i||this}),this},on:function(t,e,n,i){var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;e=ot(this,e),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;return o[t].push({h:n,one:!1,query:e,ctx:i||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var n=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],o=0,a=n[t].length;o<a;o++)n[t][o].h!==e&&i.push(n[t][o]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},trigger:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,o=i.length;3<o&&(i=_f.call(i,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(n&&n.filter&&null!=s.query&&!n.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(e.splice(r,1),a--):r++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],n=this._$eventProcessor;if(e){var i=arguments,o=i.length;4<o&&(i=_f.call(i,1,i.length-1));for(var a=i[i.length-1],r=e.length,s=0;s<r;){var l=e[s];if(n&&n.filter&&null!=l.query&&!n.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(e.splice(s,1),r--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(t),this}};var bf="undefined"!=typeof window&&!!window.addEventListener,Sf=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Mf=bf?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},If="silent";ct.prototype.dispose=function(){};function Tf(t,e,n,i){wf.call(this),this.storage=t,this.painter=e,this.painterRoot=i,n=n||new ct,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,nt.call(this),this.setHandlerProxy(n)}var Af=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];Tf.prototype={constructor:Tf,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(z(Af,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=this.findHover(e,n),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,n=t.toElement||t.relatedTarget;(n=n&&n.parentNode)&&9!=n.nodeType&&!(e=n===this.painterRoot););e||this.trigger("globalout",{event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i,o,a=(t=t||{}).target;if(!a||!a.silent){for(var r="on"+e,s={type:e,event:o=n,target:(i=t).target,topTarget:i.topTarget,cancelBubble:!1,offsetX:o.zrX,offsetY:o.zrY,gestureEvent:o.gestureEvent,pinchX:o.pinchX,pinchY:o.pinchY,pinchScale:o.pinchScale,wheelDelta:o.zrDelta,zrByTouch:o.zrByTouch,which:o.which,stop:ht};a&&(a[r]&&(s.cancelBubble=a[r].call(a,s)),a.trigger(e,s),a=a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,s),t.trigger&&t.trigger(e,s)}))}},findHover:function(t,e,n){for(var i,o=this.storage.getDisplayList(),a={x:t,y:e},r=o.length-1;0<=r;r--){if(o[r]!==n&&!o[r].ignore&&(i=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,n))return!1;o.silent&&(i=!0),o=o.parent}return!i||If}return!1}(o[r],t,e))&&(a.topTarget||(a.topTarget=o[r]),i!==If)){a.target=o[r];break}}return a}},z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(i){Tf.prototype[i]=function(t){var e=this.findHover(t.zrX,t.zrY),n=e.target;if("mousedown"===i)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===i)this._upEl=n;else if("click"===i){if(this._downEl!==this._upEl||!this._downPoint||4<vf(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,i,t)}}),o(Tf,wf),o(Tf,nt);var Df="undefined"==typeof Float32Array?Array:Float32Array,Cf=(Object.freeze||Object)({create:dt,identity:pt,copy:gt,mul:ft,translate:mt,rotate:vt,scale:yt,invert:xt,clone:_t}),Lf=pt,kf=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Pf=kf.prototype;Pf.transform=null,Pf.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)};var Nf=[];Pf.updateTransform=function(){var t,e,n,i,o,a=this.parent,r=a&&a.transform,s=this.needLocalTransform(),l=this.transform;s||r?(l=l||dt(),s?this.getLocalTransform(l):Lf(l),r&&(s?ft(l,a.transform,l):gt(l,a.transform)),this.transform=l,null!=(t=this.globalScaleRatio)&&1!==t&&(this.getGlobalScale(Nf),i=((Nf[0]-(e=Nf[0]<0?-1:1))*t+e)/Nf[0]||0,o=((Nf[1]-(n=Nf[1]<0?-1:1))*t+n)/Nf[1]||0,l[0]*=i,l[1]*=i,l[2]*=o,l[3]*=o),this.invTransform=this.invTransform||dt(),xt(this.invTransform,l)):l&&Lf(l)},Pf.getLocalTransform=function(t){return kf.getLocalTransform(this,t)},Pf.setTransform=function(t){var e=this.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)},Pf.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Of=[],Rf=dt();Pf.setLocalTransform=function(t){var e,n,i,o;t&&(e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=this.position,o=this.scale,wt(e-1)&&(e=Math.sqrt(e)),wt(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),i[0]=t[4],i[1]=t[5],o[0]=e,o[1]=n,this.rotation=Math.atan2(-t[1]/n,t[0]/e))},Pf.decomposeTransform=function(){var t,e,n;this.transform&&(t=this.parent,e=this.transform,t&&t.transform&&(ft(Of,t.invTransform,e),e=Of),(n=this.origin)&&(n[0]||n[1])&&(Rf[4]=n[0],Rf[5]=n[1],ft(Of,e,Rf),Of[4]-=n[0],Of[5]-=n[1],e=Of),this.setLocalTransform(e))},Pf.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[0]=1,t[1]=1),t},Pf.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Q(n,n,i),n},Pf.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Q(n,n,i),n},kf.getLocalTransform=function(t,e){Lf(e=e||[]);var n=t.origin,i=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return n&&(e[4]-=n[0],e[5]-=n[1]),yt(e,e,i),o&&vt(e,e,o),n&&(e[4]+=n[0],e[5]+=n[1]),e[4]+=a[0],e[5]+=a[1],e};var Ef={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-Ef.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Ef.bounceIn(2*t):.5*Ef.bounceOut(2*t-1)+.5}};bt.prototype={constructor:bt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var n=(t-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,o="string"==typeof i?Ef[i]:i,a="function"==typeof o?o(n):n;return this.fire("frame",a),1==n?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};function zf(){this.head=null,this.tail=null,this._len=0}var Bf=zf.prototype;Bf.insert=function(t){var e=new Gf(t);return this.insertEntry(e),e},Bf.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Bf.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Bf.len=function(){return this._len},Bf.clear=function(){this.head=this.tail=null,this._len=0};function Vf(t){this._list=new zf,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Gf=function(t){this.value=t,this.next,this.prev},Ff=Vf.prototype;Ff.put=function(t,e){var n,i,o,a=this._list,r=this._map,s=null;return null==r[t]&&(n=a.len(),i=this._lastRemovedEntry,n>=this._maxSize&&0<n&&(o=a.head,a.remove(o),delete r[o.key],s=o.value,this._lastRemovedEntry=o),i?i.value=e:i=new Gf(e),i.key=t,a.insertEntry(i),r[t]=i),s},Ff.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},Ff.clear=function(){this._list.clear(),this._map={}};function Wf(t,e,n,i){this._tracks={},this._target=t,this._loop=e||!1,this._getter=n||Ft,this._setter=i||Wt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}var Hf={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]},Zf=new Vf(20),Uf=null,Xf=(Object.freeze||Object)({parse:Pt,lift:Ot,toHex:Rt,fastLerp:Et,fastMapToColor:Et,lerp:zt,mapToColor:zt,modifyHSL:Bt,modifyAlpha:Vt,stringify:Gt}),jf=Array.prototype.slice;Wf.prototype={when:function(t,e){var n,i=this._tracks;for(n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:function(t){if(R(t)){var e=t.length;if(R(t[0])){for(var n=[],i=0;i<e;i++)n.push(jf.call(t[i]));return n}return jf.call(t)}return t}(o)})}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;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,n=0;n<e;n++)t[n].call(this)},start:function(t,e){var n,i,o,a,r=this,s=0;for(i in this._tracks){!this._tracks.hasOwnProperty(i)||(o=Kt(this,t,function(){--s||r._doneCallback()},this._tracks[i],i,e))&&(this._clipList.push(o),s++,this.animation&&this.animation.addClip(o),n=o)}return n&&(a=n.onframe,n.onframe=function(t,e){a(t,e);for(var n=0;n<r._onframeList.length;n++)r._onframeList[n](t,e)}),s||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,n=this.animation,i=0;i<e.length;i++){var o=e[i];t&&o.onframe(this._target,1),n&&n.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var Yf=1;"undefined"!=typeof window&&(Yf=Math.max(window.devicePixelRatio||1,1));function qf(){this.animators=[]}var Kf=Yf,$f=function(){};qf.prototype={constructor:qf,animate:function(t,e){var n,i=!1,o=this,a=this.__zr;if(t){for(var r=t.split("."),s=o,i="shape"===r[0],l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(n=s)}else n=o;if(n){var h=o.animators,c=new Wf(n,e);return c.during(function(t){o.dirty(i)}).done(function(){h.splice(M(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}$f('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,n=e.length,i=0;i<n;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,n,i,o,a){$t(this,t,e,n,i,o,a)},animateFrom:function(t,e,n,i,o,a){$t(this,t,e,n,i,o,a,!0)}};var Jf=function(t){kf.call(this,t),wf.call(this,t),qf.call(this,t),this.id=t.id||tf()};Jf.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var n=this.transform;(n=n||(this.transform=[1,0,0,1,0,0]))[4]+=t,n[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){var n;"position"===t||"scale"===t||"origin"===t?e&&((n=(n=this[t])||(this[t]=[]))[0]=e[0],n[1]=e[1]):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(B(t))for(var n in t)t.hasOwnProperty(n)&&this.attrKV(n,t[n]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},o(Jf,qf),o(Jf,kf),o(Jf,wf);var Qf,tm,em,nm,im=Q,om=Math.min,am=Math.max;Qt.prototype={constructor:Qt,union:function(t){var e=om(t.x,this.x),n=om(t.y,this.y);this.width=am(t.x+t.width,this.x+this.width)-e,this.height=am(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(Qf=[],tm=[],em=[],nm=[],function(t){var e,n;t&&(Qf[0]=em[0]=this.x,Qf[1]=nm[1]=this.y,tm[0]=nm[0]=this.x+this.width,tm[1]=em[1]=this.y+this.height,im(Qf,Qf,t),im(tm,tm,t),im(em,em,t),im(nm,nm,t),this.x=om(Qf[0],tm[0],em[0],nm[0]),this.y=om(Qf[1],tm[1],em[1],nm[1]),e=am(Qf[0],tm[0],em[0],nm[0]),n=am(Qf[1],tm[1],em[1],nm[1]),this.width=e-this.x,this.height=n-this.y)}),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,i=dt();return mt(i,i,[-this.x,-this.y]),yt(i,i,[e,n]),mt(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof Qt||(t=Qt.create(t));var e=this.x,n=this.x+this.width,i=this.y,o=this.y+this.height,a=t.x,r=t.x+t.width,s=t.y,l=t.y+t.height;return!(n<a||r<e||o<s||l<i)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new Qt(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}}},Qt.create=function(t){return new Qt(t.x,t.y,t.width,t.height)};var rm=function(t){for(var e in t=t||{},Jf.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};rm.prototype={constructor:rm,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){var n,i;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&(0<=(i=(n=this._children).indexOf(e))&&(n.splice(i,0,t),this._doAdd(t))),this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,n=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof rm&&t.addChildrenToStorage(e)),n&&n.refresh()},remove:function(t){var e=this.__zr,n=this.__storage,i=this._children,o=M(i,t);return o<0||(i.splice(o,1),t.parent=null,n&&(n.delFromStorage(t),t instanceof rm&&t.delChildrenFromStorage(n)),e&&e.refresh()),this},removeAll:function(){for(var t,e=this._children,n=this.__storage,i=0;i<e.length;i++)t=e[i],n&&(n.delFromStorage(t),t instanceof rm&&t.delChildrenFromStorage(n)),t.parent=null;return e.length=0,this},eachChild:function(t,e){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];t.call(e,o,i)}return this},traverse:function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n];t.call(e,i),"group"===i.type&&i.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.addToStorage(n),n instanceof rm&&n.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var n=this._children[e];t.delFromStorage(n),n instanceof rm&&n.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,n=new Qt(0,0,0,0),i=t||this._children,o=[],a=0;a<i.length;a++){var r,s,l=i[a];l.ignore||l.invisible||(r=l.getBoundingRect(),(s=l.getLocalTransform(o))?(n.copy(r),n.applyTransform(s),(e=e||n.clone()).union(n)):(e=e||r.clone()).union(r))}return e||n}},a(rm,Jf);function sm(){this._roots=[],this._displayList=[],this._displayListLen=0}var lm=32,um=7;sm.prototype={constructor:sm,traverse:function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,ef.canvasSupported&&ae(n,re)},_updateAndAddDisplayable:function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i){e=e?e.slice():[];for(var o=i,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,n)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof rm&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(n=0;n<this._roots.length;n++){var e=this._roots[n];e instanceof rm&&e.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var n=0,i=t.length;n<i;n++)this.delRoot(t[n]);else{var o=M(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof rm&&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:re};var hm={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},cm=function(t,e,n){return hm.hasOwnProperty(e)?n*=t.dpr:n},dm=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],pm=function(t){this.extendFrom(t,!1)};pm.prototype={constructor:pm,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,n){for(var i,o=this,a=n&&n.style,r=!a,s=0;s<dm.length;s++){var l=dm[s],u=l[0];!r&&o[u]===a[u]||(t[u]=cm(t,u,o[u]||l[1]))}!r&&o.fill===a.fill||(t.fillStyle=o.fill),!r&&o.stroke===a.stroke||(t.strokeStyle=o.stroke),!r&&o.opacity===a.opacity||(t.globalAlpha=null==o.opacity?1:o.opacity),!r&&o.blend===a.blend||(t.globalCompositeOperation=o.blend||"source-over"),this.hasStroke()&&(i=o.lineWidth,t.lineWidth=i/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1))},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var n in t)!t.hasOwnProperty(n)||!0!==e&&(!1===e?this.hasOwnProperty(n):null==t[n])||(this[n]=t[n])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,n){for(var i=("radial"===e.type?function(t,e,n){var i=n.width,o=n.height,a=Math.min(i,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*i+n.x,s=s*o+n.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}:function(t,e,n){var i=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,o=o*n.width+n.x,a=a*n.height+n.y,r=r*n.height+n.y),i=isNaN(i)?0:i,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(i,a,o,r)})(t,e,n),o=e.colorStops,a=0;a<o.length;a++)i.addColorStop(o[a].offset,o[a].color);return i}};for(var gm=pm.prototype,fm=0;fm<dm.length;fm++){var mm=dm[fm];mm[0]in gm||(gm[mm[0]]=mm[1])}pm.getGradient=gm.getGradient;function vm(t,e){this.image=t,this.repeat=e,this.type="pattern"}function ym(t,e,n){var i;n=n||Kf,"string"==typeof t?i=le(t,e,n):B(t)&&(t=(i=t).id),this.id=t;var o=(this.dom=i).style;o&&(i.onselectstart=se,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n}ym.prototype={constructor:ym,__dirty:!0,__used:!(vm.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=le("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var n=this.dpr,i=this.dom,o=i.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,a&&(a.width=t*n,a.height=e*n,1!=n&&this.ctxBack.scale(n,n))},clear:function(t,e){var n,i,o=this.dom,a=this.ctx,r=o.width,s=o.height,e=e||this.clearColor,l=this.motionBlur&&!t,u=this.lastFrameAlpha,h=this.dpr;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,r/h,s/h)),a.clearRect(0,0,r,s),e&&"transparent"!==e&&(e.colorStops?(n=e.__canvasGradient||pm.getGradient(a,e,{x:0,y:0,width:r,height:s}),e.__canvasGradient=n):e.image&&(n=vm.prototype.getCanvasPattern.call(e,a)),a.save(),a.fillStyle=n||e,a.fillRect(0,0,r,s),a.restore()),l&&(i=this.domBack,a.save(),a.globalAlpha=u,a.drawImage(i,0,0,r,s),a.restore())}};function xm(){}var _m="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},wm=new Vf(50),bm={},Sm=0,Mm=5e3,Im=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Tm="12px sans-serif",Am={measureText:function(t,e){var n=i();return n.font=e||Tm,n.measureText(t)}},Dm={left:1,right:1,center:1},Cm={top:1,bottom:1,middle:1},Lm=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],km=new Qt;Fe.prototype={constructor:Fe,type:"displayable",__dirty:!0,invisible:!(xm.prototype={constructor:xm,drawRectText:function(t,e){var n=this.style;e=n.textRect||e,this.__dirty&&Te(n);var i,o=n.text;null!=o&&(o+=""),Ge(o,n)&&(t.save(),i=this.transform,n.transformText?this.setTransform(t):i&&(km.copy(e),km.applyTransform(i),e=km),De(this,t,o,n,e),t.restore())}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(){},afterBrush:function(){},brush:function(){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var n=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Jf.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new pm(t,this),this.dirty(!1),this}},a(Fe,Jf),o(Fe,xm),We.prototype={constructor:We,type:"image",brush:function(t,e){var n=this.style,i=n.image;n.bind(t,this,e);var o,a,r,s,l,u,h,c,d,p=this._image=ue(i,this._image,this,this.onload);p&&ce(p)&&(o=n.x||0,a=n.y||0,r=n.width,s=n.height,l=p.width/p.height,null==r&&null!=s?r=s*l:null==s&&null!=r?s=r/l:null==r&&null==s&&(r=p.width,s=p.height),this.setTransform(t),n.sWidth&&n.sHeight?(u=n.sx||0,h=n.sy||0,t.drawImage(p,u,h,n.sWidth,n.sHeight,o,a,r,s)):n.sx&&n.sy?(c=r-(u=n.sx),d=s-(h=n.sy),t.drawImage(p,u,h,c,d,o,a,r,s)):t.drawImage(p,o,a,r,s),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect())))},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Qt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},a(We,Fe);function Pm(t,e,n){this.type="canvas";var i=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=P({},n||{}),this.dpr=n.devicePixelRatio||Kf,this._singleCanvas=i;var o=(this.root=t).style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a,r,s,l,u,h,c,d=this._zlevelList=[],p=this._layers={};this._layerConfig={},this._needsManuallyCompositing=!1,i?(a=t.width,r=t.height,null!=n.width&&(a=n.width),null!=n.height&&(r=n.height),this.dpr=n.devicePixelRatio||1,t.width=a*this.dpr,t.height=r*this.dpr,this._width=a,this._height=r,(s=new ym(t,this,this.dpr)).__builtin__=!0,s.initContext(),(p[314159]=s).zlevel=314159,d.push(314159),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),l=this._domRoot=(u=this._width,h=this._height,(c=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+u+"px","height:"+h+"px","padding:0","margin:0","border-width:0"].join(";")+";",c),t.appendChild(l)),this._hoverlayer=null,this._hoverElements=[]}var Nm=new Qt(0,0,0,0),Om=new Qt(0,0,0,0);Pm.prototype={constructor:Pm,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var i=0;i<n.length;i++){var o,a=n[i],r=this._layers[a];!r.__builtin__&&r.refresh&&(o=0===i?this._backgroundColor:null,r.refresh(o))}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var n=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(n.__from=t).__hoverMir=n,e&&n.setStyle(e),this._hoverElements.push(n),n}},removeHover:function(t){var e=t.__hoverMir,n=this._hoverElements,i=M(n,e);0<=i&&n.splice(i,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;e<t.length;e++){var n=t[e].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){ae(t,this.storage.displayableSortFunc);var i={};(n=n||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,n,!0,i))):(t.splice(o,1),r.__hoverMir=null,e--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,n){var i,o;this._redrawId===n&&(e=e||!1,this._updateLayerStatus(t),i=this._doPaintList(t,e),this._needsManuallyCompositing&&this._compositeManually(),i||(o=this,_m(function(){o._paintList(t,e,n)})))},_compositeManually:function(){var e=this.getLayer(314159).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},_doPaintList:function(t,e){for(var n=[],i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&n.push(s)}for(var a=!0,r=0;r<n.length;r++){var s=n[r],l=s.ctx,u={};l.save();var h,c=e?s.__startIndex:s.__drawIndex,d=!e&&s.incremental&&Date.now,p=d&&Date.now(),g=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;s.__startIndex===s.__endIndex?s.clear(!1,g):c===s.__startIndex&&((h=t[c]).incremental&&h.notClear&&!e||s.clear(!1,g)),-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var f=c;f<s.__endIndex;f++){var m=t[f];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,d&&15<Date.now()-p)break}s.__drawIndex=f,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return ef.wxa&&z(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,n,i){var o,a,r,s,l=e.ctx,u=t.transform;!e.__dirty&&!n||t.invisible||0===t.style.opacity||u&&!u[0]&&!u[3]||t.culling&&(a=t,r=this._width,s=this._height,Nm.copy(a.getBoundingRect()),a.transform&&Nm.applyTransform(a.transform),Om.width=r,Om.height=s,!Nm.intersect(Om))||(o=t.__clipPaths,i.prevElClipPaths&&!function(t,e){if(t!=e){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}(o,i.prevElClipPaths)||(i.prevElClipPaths&&(e.ctx.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(l.save(),function(t,e){for(var n=0;n<t.length;n++){var i=t[n];i.setTransform(e),e.beginPath(),i.buildPath(e,i.shape),e.clip(),i.restoreTransform(e)}}(o,l),i.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(l),t.brush(l,i.prevEl||null),(i.prevEl=t).afterBrush&&t.afterBrush(l))},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var n=this._layers[t];return n||((n=new ym("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]&&v(n,this._layerConfig[t],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},insertLayer:function(t,e){var n,i,o=this._layers,a=this._zlevelList,r=a.length,s=null,l=-1,u=this._domRoot;if(o[t])$f("ZLevel "+t+" has been used already");else if((i=e)&&(i.__builtin__||"function"==typeof i.resize&&"function"==typeof i.refresh)){if(0<r&&t>a[0]){for(l=0;l<r-1&&!(a[l]<t&&a[l+1]>t);l++);s=o[a[l]]}a.splice(l+1,0,t),(o[t]=e).virtual||(s?(n=s.dom).nextSibling?u.insertBefore(e.dom,n.nextSibling):u.appendChild(e.dom):u.firstChild?u.insertBefore(e.dom,u.firstChild):u.appendChild(e.dom))}else $f("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){for(var n,i=this._zlevelList,o=0;o<i.length;o++)n=i[o],t.call(e,this._layers[n],n)},eachBuiltinLayer:function(t,e){for(var n,i,o=this._zlevelList,a=0;a<o.length;a++)i=o[a],(n=this._layers[i]).__builtin__&&t.call(e,n,i)},eachOtherLayer:function(t,e){for(var n,i,o=this._zlevelList,a=0;a<o.length;a++)i=o[a],(n=this._layers[i]).__builtin__||t.call(e,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){n&&(n.__endIndex!==t&&(n.__dirty=!0),n.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(o=1;o<t.length;o++)if((r=t[o]).zlevel!==t[o-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}for(var n=null,i=0,o=0;o<t.length;o++){var a,r=t[o],s=r.zlevel;r.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,i=1):a=this.getLayer(s+(0<i?.01:0),this._needsManuallyCompositing),a.__builtin__||$f("ZLevel "+s+" has been used by unkown layer "+a.id),a!==n&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),n=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var n=this._layerConfig;n[t]?v(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||v(this._layers[o],n[t],!0)}}},delLayer:function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(M(n,t),1))},resize:function(e,n){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=n&&(i.height=n),e=this._getSize(0),n=this._getSize(1),t.style.display="",this._width!=e||n!=this._height){for(var o in t.style.width=e+"px",t.style.height=n+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,n);z(this._progressiveLayers,function(t){t.resize(e,n)}),this.refresh(!0)}this._width=e,this._height=n}else{if(null==e||null==n)return;this._width=e,this._height=n,this.getLayer(314159).resize(e,n)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new ym("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var n=e.dom.width,i=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,n,i):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[i]||He(s[n])||He(r.style[n]))-(He(s[o])||0)-(He(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,r-s),c=Math.max(u/2,s+r),d=Math.max(u/2,r-l),p=Math.max(u/2,l+r),g=o.width+h+c,f=o.height+d+p;n.width=g*e,n.height=f*e,i.scale(e,e),i.clearRect(0,0,g,f),i.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(i);var v=new We({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};function Rm(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,wf.call(this)}Rm.prototype={constructor:Rm,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),n=0;n<e.length;n++)this.addClip(e[n])},removeClip:function(t){var e=M(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),n=0;n<e.length;n++)this.removeClip(e[n]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,n=this._clips,i=n.length,o=[],a=[],r=0;r<i;r++){var s=n[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<i;)n[r]._needsRemove?(n[r]=n[i-1],n.pop(),i--):r++;for(i=o.length,r=0;r<i;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,_m(function t(){e._running&&(_m(t),e._paused||e._update())})},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){var n=new Wf(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(n),n}},o(Rm,wf);function Em(){this._track=[]}Em.prototype={constructor:Em,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},a=0,r=i.length;a<r;a++){var s=i[a],l=at(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in zm)if(zm.hasOwnProperty(e)){var n=zm[e](this._track,t);if(n)return n}}};var zm={pinch:function(t,e){var n,i=t.length;if(i){var o=(t[i-1]||{}).points,a=(t[i-2]||{}).points||o;if(a&&1<a.length&&o&&1<o.length){var r=Ze(o)/Ze(a);isFinite(r)||(r=1),e.pinchScale=r;var s=[((n=o)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},Bm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Vm=["touchstart","touchend","touchmove"],Gm={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Fm=L(Bm,function(t){var e=t.replace("mouse","pointer");return Gm[e]?e:t}),Wm={mousemove:function(t){t=st(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=st(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=st(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Xe(this,t,"start"),Wm.mousemove.call(this,t),Wm.mousedown.call(this,t),je(this)},touchmove:function(t){(t=st(this.dom,t)).zrByTouch=!0,Xe(this,t,"change"),Wm.mousemove.call(this,t),je(this)},touchend:function(t){(t=st(this.dom,t)).zrByTouch=!0,Xe(this,t,"end"),Wm.mouseup.call(this,t),new Date-this._lastTouchMoment<300&&Wm.click.call(this,t),je(this)},pointerdown:function(t){Wm.mousedown.call(this,t)},pointermove:function(t){Ye(t)||Wm.mousemove.call(this,t)},pointerup:function(t){Wm.mouseup.call(this,t)},pointerout:function(t){Ye(t)||Wm.mouseout.call(this,t)}};z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Wm[e]=function(t){t=st(this.dom,t),this.trigger(e,t)}});var Hm=Ke.prototype;Hm.dispose=function(){for(var t,e,n,i=Bm.concat(Vm),o=0;o<i.length;o++){var a=i[o];t=this.dom,e=Ue(a),n=this._handlers[a],bf?t.removeEventListener(e,n):t.detachEvent("on"+e,n)}},Hm.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},o(Ke,wf);var Zm=!ef.canvasSupported,Um={canvas:Pm},Xm={},jm=function(t,e,n){n=n||{},this.dom=e,this.id=t;var i=this,o=new sm,a=n.renderer;if(Zm){if(!Um.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Um[a]||(a="canvas");var r=new Um[a](e,o,n,t);this.storage=o,this.painter=r;var s=ef.node||ef.worker?null:new Ke(r.getViewportRoot());this.handler=new Tf(o,r,s,r.root),this.animation=new Rm({stage:{update:k(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,u=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(i)},o.addToStorage=function(t){u.call(o,t),t.addSelfToZr(i)}};jm.prototype={constructor:jm,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var n=this.painter.addHover(t,e);return this.refreshHover(),n}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,n){this.handler.on(t,e,n)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete Xm[t]}};function Ym(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,n){for(var i={},o=0;o<s.length;o++){var a,r=s[o][1];e&&0<=M(e,r)||n&&M(n,r)<0||null!=(a=t.getShallow(r))&&(i[s[o][0]]=a)}return i}}var qm=(Object.freeze||Object)({version:"4.0.5",init:$e,dispose:function(t){if(t)t.dispose();else{for(var e in Xm)Xm.hasOwnProperty(e)&&Xm[e].dispose();Xm={}}return this},getInstance:function(t){return Xm[t]},registerPainter:Je}),Km=z,$m=B,Jm=N,Qm="series\0",tv=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],ev=0,nv=".",iv="___EC__COMPONENT__CONTAINER___",ov=0,av=Ym([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),rv={getLineStyle:function(t){var e=av(this,t),n=this.getLineDash(e.lineWidth);return n&&(e.lineDash=n),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),n=Math.max(t,2),i=4*t;return"solid"===e||null==e?null:"dashed"===e?[i,i]:[n,n]}},sv=Ym([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),lv={getAreaStyle:function(t,e){return sv(this,t,e)}},uv=Math.pow,hv=Math.sqrt,cv=1e-8,dv=1e-4,pv=hv(3),gv=1/3,fv=w(),mv=w(),vv=w(),yv=Math.min,xv=Math.max,_v=Math.sin,wv=Math.cos,bv=2*Math.PI,Sv=w(),Mv=w(),Iv=w(),Tv=[],Av=[],Dv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Cv=[],Lv=[],kv=[],Pv=[],Nv=Math.min,Ov=Math.max,Rv=Math.cos,Ev=Math.sin,zv=Math.sqrt,Bv=Math.abs,Vv="undefined"!=typeof Float32Array,Gv=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};Gv.prototype={constructor:Gv,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Bv(1/Kf/t)||0,this._uy=Bv(1/Kf/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=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(Dv.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var n=Bv(t-this._xi)>this._ux||Bv(e-this._yi)>this._uy||this._len<5;return this.addData(Dv.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,o,a){return this.addData(Dv.C,t,e,n,i,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,o,a):this._ctx.bezierCurveTo(t,e,n,i,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Dv.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,o,a){return this.addData(Dv.A,t,e,n,n,i,o-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,a),this._xi=Rv(o)*n+t,this._yi=Ev(o)*n+e,this},arcTo:function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Dv.R,t,e,n,i),this},closePath:function(){this.addData(Dv.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!Vv||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,o=0;o<e;o++)n+=t[o].len();for(Vv&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[i++]=a[r];this._len=i},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var n=0;n<arguments.length;n++)e[this._len++]=arguments[n];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var n,i,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=zv(h*h+c*c),p=l,g=u,f=r.length;for(a<0&&(a=o+a),p-=(a%=o)*(h/=d),g-=a*(c/=d);0<h&&p<=t||h<0&&t<=p||0==h&&(0<c&&g<=e||c<0&&e<=g);)p+=h*(n=r[i=this._dashIdx]),g+=c*n,this._dashIdx=(i+1)%f,0<h&&p<l||h<0&&l<p||0<c&&g<u||c<0&&u<g||s[i%2?"moveTo":"lineTo"]((0<=h?Nv:Ov)(p,t),(0<=c?Nv:Ov)(g,e));h=p-t,c=g-e,this._dashOffset=-zv(h*h+c*c)},_dashedBezierTo:function(t,e,n,i,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,f=this._xi,m=this._yi,v=wn,y=0,x=this._dashIdx,_=p.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(f,t,n,o,r+.1)-v(f,t,n,o,r),l=v(m,e,i,a,r+.1)-v(m,e,i,a,r),y+=zv(s*s+l*l);for(;x<_&&!((w+=p[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(f,t,n,o,r),h=v(m,e,i,a,r),x%2?g.moveTo(u,h):g.lineTo(u,h),r+=p[x]/y,x=(x+1)%_;x%2!=0&&g.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-zv(s*s+l*l)},_dashedQuadraticTo:function(t,e,n,i){var o=n,a=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Vv&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Cv[0]=Cv[1]=kv[0]=kv[1]=Number.MAX_VALUE,Lv[0]=Lv[1]=Pv[0]=Pv[1]=-Number.MAX_VALUE;for(var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g=this.data,f=0,m=0,v=0,y=0,x=0;x<g.length;){var _=g[x++];switch(1==x&&(v=f=g[x],y=m=g[x+1]),_){case Dv.M:f=v=g[x++],m=y=g[x++],kv[0]=v,kv[1]=y,Pv[0]=v,Pv[1]=y;break;case Dv.L:Ln(f,m,g[x],g[x+1],kv,Pv),f=g[x++],m=g[x++];break;case Dv.C:(function(t,e,n,i,o,a,r,s,l,u){var h,c=Sn,d=wn,p=c(t,n,o,r,Tv);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<p;h++){var g=d(t,n,o,r,Tv[h]);l[0]=yv(g,l[0]),u[0]=xv(g,u[0])}for(p=c(e,i,a,s,Av),h=0;h<p;h++){var f=d(e,i,a,s,Av[h]);l[1]=yv(f,l[1]),u[1]=xv(f,u[1])}l[0]=yv(t,l[0]),u[0]=xv(t,u[0]),l[0]=yv(r,l[0]),u[0]=xv(r,u[0]),l[1]=yv(e,l[1]),u[1]=xv(e,u[1]),l[1]=yv(s,l[1]),u[1]=xv(s,u[1])})(f,m,g[x++],g[x++],g[x++],g[x++],g[x],g[x+1],kv,Pv),f=g[x++],m=g[x++];break;case Dv.Q:t=f,e=m,n=g[x++],i=g[x++],o=g[x],a=g[x+1],r=kv,s=Pv,p=d=c=h=u=l=void 0,u=In,h=xv(yv((l=An)(t,n,o),1),0),c=xv(yv(l(e,i,a),1),0),d=u(t,n,o,h),p=u(e,i,a,c),r[0]=yv(t,o,d),r[1]=yv(e,a,p),s[0]=xv(t,o,d),s[1]=xv(e,a,p),f=g[x++],m=g[x++];break;case Dv.A:var w=g[x++],b=g[x++],S=g[x++],M=g[x++],I=g[x++],T=g[x++]+I,A=(g[x++],1-g[x++]);1==x&&(v=Rv(I)*S+w,y=Ev(I)*M+b),function(t,e,n,i,o,a,r,s,l){var u,h=tt,c=et,d=Math.abs(o-a);if(d%bv<1e-4&&1e-4<d)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;Sv[0]=wv(o)*n+t,Sv[1]=_v(o)*i+e,Mv[0]=wv(a)*n+t,Mv[1]=_v(a)*i+e,h(s,Sv,Mv),c(l,Sv,Mv),(o%=bv)<0&&(o+=bv),(a%=bv)<0&&(a+=bv),a<o&&!r?a+=bv:o<a&&r&&(o+=bv),r&&(u=a,a=o,o=u);for(var p=0;p<a;p+=Math.PI/2)o<p&&(Iv[0]=wv(p)*n+t,Iv[1]=_v(p)*i+e,h(s,Iv,s),c(l,Iv,l))}(w,b,S,M,I,T,A,kv,Pv),f=Rv(T)*S+w,m=Ev(T)*M+b;break;case Dv.R:Ln(v=f=g[x++],y=m=g[x++],v+g[x++],y+g[x++],kv,Pv);break;case Dv.Z:f=v,m=y}tt(Cv,Cv,kv),et(Lv,Lv,Pv)}return 0===x&&(Cv[0]=Cv[1]=Lv[0]=Lv[1]=0),new Qt(Cv[0],Cv[1],Lv[0]-Cv[0],Lv[1]-Cv[1])},rebuildPath:function(t){for(var e,n,i,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1==c&&(e=i=s[c],n=o=s[c+1]),d){case Dv.M:e=i=s[c++],n=o=s[c++],t.moveTo(i,o);break;case Dv.L:a=s[c++],r=s[c++],(Bv(a-i)>l||Bv(r-o)>u||c===h-1)&&(t.lineTo(a,r),i=a,o=r);break;case Dv.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case Dv.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case Dv.A:var p=s[c++],g=s[c++],f=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<f?f:m,b=m<f?1:f/m,S=m<f?m/f:1,M=v+y;.001<Math.abs(f-m)?(t.translate(p,g),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-p,-g)):t.arc(p,g,w,v,M,1-_),1==c&&(e=Rv(v)*f+p,n=Ev(v)*m+g),i=Rv(M)*f+p,o=Ev(M)*m+g;break;case Dv.R:e=i=s[c],n=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case Dv.Z:t.closePath(),i=e,o=n}}}},Gv.CMD=Dv;var Fv=2*Math.PI,Wv=2*Math.PI,Hv=Gv.CMD,Zv=2*Math.PI,Uv=1e-4,Xv=[-1,-1,-1],jv=[-1,-1],Yv=vm.prototype.getCanvasPattern,qv=Math.abs,Kv=new Gv(!0);Vn.prototype={constructor:Vn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var n,i=this.style,o=this.path||Kv,a=i.hasStroke(),r=i.hasFill(),s=i.fill,l=i.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;i.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(t,s,n)),h&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,l,n))),u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Yv.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Yv.call(l,t));var p,g=i.lineDash,f=i.lineDashOffset,m=!!t.setLineDash,v=this.getGlobalScale();o.setScale(v[0],v[1]),this.__dirtyPath||g&&!m&&a?(o.beginPath(t),g&&!m&&(o.setLineDash(g),o.setLineDashOffset(f)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&(null!=i.fillOpacity?(p=t.globalAlpha,t.globalAlpha=i.fillOpacity*i.opacity,o.fill(t),t.globalAlpha=p):o.fill(t)),g&&m&&(t.setLineDash(g),t.lineDashOffset=f),a&&(null!=i.strokeOpacity?(p=t.globalAlpha,t.globalAlpha=i.strokeOpacity*i.opacity,o.stroke(t),t.globalAlpha=p):o.stroke(t)),g&&m&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new Gv},getBoundingRect:function(){var t,e=this._rect,n=this.style,i=!e;if(i&&(t=(t=this.path)||(this.path=new Gv),this.__dirtyPath&&(t.beginPath(),this.buildPath(t,this.shape,!1)),e=t.getBoundingRect()),this._rect=e,n.hasStroke()){var o,a,r=this._rectWithStroke||(this._rectWithStroke=e.clone());return(this.__dirty||i)&&(r.copy(e),o=n.lineWidth,a=n.strokeNoScale?this.getLineScale():1,n.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),1e-10<a&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)),r}return e},contain:function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),Bn(a,r/s,!0,t,e)))return!0}if(o.hasFill())return Bn(a,0,!1,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):Fe.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var n=this.shape;if(n){if(B(t))for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);else n[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<qv(t[0]-1)&&1e-10<qv(t[3]-1)?Math.sqrt(qv(t[0]*t[3]-t[2]*t[1])):1}},Vn.extend=function(o){function t(t){Vn.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var n,i=this.shape;for(n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)}for(var e in a(t,Vn),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},a(Vn,Fe);function $v(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var Jv=Gv.CMD,Qv=[[],[],[]],ty=Math.sqrt,ey=Math.atan2,ny=function(t,e){for(var n,i,o,a,r=t.data,s=Jv.M,l=Jv.C,u=Jv.L,h=Jv.R,c=Jv.A,d=Jv.Q,p=0,g=0;p<r.length;){switch(n=r[p++],g=p,i=0,n){case s:case u:i=1;break;case l:i=3;break;case d:i=2;break;case c:var f=e[4],m=e[5],v=ty(e[0]*e[0]+e[1]*e[1]),y=ty(e[2]*e[2]+e[3]*e[3]),x=ey(-e[1]/y,e[0]/v);r[p]*=v,r[p++]+=f,r[p]*=y,r[p++]+=m,r[p++]*=v,r[p++]*=y,r[p++]+=x,r[p++]+=x,g=p+=2;break;case h:a[0]=r[p++],a[1]=r[p++],Q(a,a,e),r[g++]=a[0],r[g++]=a[1],a[0]+=r[p++],a[1]+=r[p++],Q(a,a,e),r[g++]=a[0],r[g++]=a[1]}for(o=0;o<i;o++)(a=Qv[o])[0]=r[p++],a[1]=r[p++],Q(a,a,e),r[g++]=a[0],r[g++]=a[1]}},iy=Math.sqrt,oy=Math.sin,ay=Math.cos,ry=Math.PI,sy=function(t,e){return(t[0]*e[0]+t[1]*e[1])/($v(t)*$v(e))},ly=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sy(t,e))},uy=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,hy=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,cy=function(t){Fe.call(this,t)};cy.prototype={constructor:cy,type:"text",brush:function(t,e){var n=this.style;this.__dirty&&Te(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),Ge(i,n)&&(this.setTransform(t),De(this,t,i,n,null,e),this.restoreTransform(t))},getBoundingRect:function(){var t,e,n=this.style;return this.__dirty&&Te(n),this._rect||(null!=n.text?0:0,(t=pe(n.text+"",n.font,n.textAlign,n.textVerticalAlign,n.textPadding,n.rich)).x+=n.x||0,t.y+=n.y||0,Ee(n.textStroke,n.textStrokeWidth)&&(e=n.textStrokeWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect}},a(cy,Fe);function dy(l){return ef.browser.ie&&11<=ef.browser.version?function(){var t,e=this.__clipPaths,n=this.style;if(e)for(var i=0;i<e.length;i++){var o=e[i],a=o&&o.shape,r=o&&o.type;if(a&&("sector"===r&&a.startAngle===a.endAngle||"rect"===r&&(!a.width||!a.height))){for(s=0;s<fy.length;s++)fy[s][2]=n[fy[s][0]],n[fy[s][0]]=fy[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(var s=0;s<fy.length;s++)n[fy[s][0]]=fy[s][2]}:l}function py(t){this.colorStops=t||[]}var gy=Vn.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),fy=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],my=Vn.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:dy(Vn.prototype.brush),buildPath:function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+n,h*o+i),t.lineTo(u*a+n,h*a+i),t.arc(n,i,a,r,s,!l),t.lineTo(Math.cos(s)*o+n,Math.sin(s)*o+i),0!==o&&t.arc(n,i,o,s,r,l),t.closePath()}}),vy=Vn.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,o,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,o,!0)}}),yy=Vn.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Zn(t,e,!0)}}),xy=Vn.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Zn(t,e,!1)}}),_y=Vn.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width,a=e.height;e.r?Ie(t,e):t.rect(n,i,o,a),t.closePath()}}),wy=Vn.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var n=e.x1,i=e.y1,o=e.x2,a=e.y2,r=e.percent;0!==r&&(t.moveTo(n,i),r<1&&(o=n*(1-r)+o*r,a=i*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),by=[],Sy=Vn.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 n=e.x1,i=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(n,i),null==l||null==u?(h<1&&(Dn(n,r,o,h,by),r=by[1],o=by[2],Dn(i,s,a,h,by),s=by[1],a=by[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(Mn(n,r,l,o,h,by),r=by[1],l=by[2],o=by[3],Mn(i,s,u,a,h,by),s=by[1],u=by[2],a=by[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return Un(this.shape,t,!1)},tangentAt:function(t){var e=Un(this.shape,t,!0);return q(e,e)}}),My=Vn.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 n=e.cx,i=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+n,u*o+i),t.arc(n,i,o,a,r,!s)}}),Iy=Vn.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,n=0;n<e.length;n++)t=t||e[n].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Vn.prototype.getBoundingRect.call(this)}});py.prototype={constructor:py,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function Ty(t,e,n,i,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,py.call(this,o)}Ty.prototype={constructor:Ty},a(Ty,py);function Ay(t,e,n,i,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==n?.5:n,this.type="radial",this.global=o||!1,py.call(this,i)}Ay.prototype={constructor:Ay},a(Ay,py),Xn.prototype.incremental=!0,Xn.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Xn.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Xn.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Xn.prototype.eachPendingDisplayable=function(t){for(e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Xn.prototype.update=function(){for(this.updateTransform(),t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},Xn.prototype.brush=function(t,e){for(n=this._cursor;n<this._displayables.length;n++)(i=this._displayables[n]).beforeBrush&&i.beforeBrush(t),i.brush(t,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(t);this._cursor=n;for(var n=0;n<this._temporaryDisplayables.length;n++){var i=this._temporaryDisplayables[n];i.beforeBrush&&i.beforeBrush(t),i.brush(t,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Dy=[];Xn.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Qt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Dy)),t.union(i)}this._rect=t}return this._rect},Xn.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},a(Xn,Fe);function Cy(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var r=new Vn(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(n);var e=t.getContext();e&&t.rebuildPath(e)},r}var Ly=Math.round,ky=Math.max,Py=Math.min,Ny={},Oy=C(),Ry=0,Ey=(Object.freeze||Object)({extendShape:jn,extendPath:function(t,e){return Vn.extend(Fn(t,e))},makePath:Yn,makeImage:qn,mergePath:Cy,resizePath:$n,subPixelOptimizeLine:Jn,subPixelOptimizeRect:Qn,subPixelOptimize:ti,setElementHoverStyle:ri,isInEmphasis:si,setHoverStyle:di,setAsHoverStyleTrigger:pi,setLabelStyle:gi,setTextStyle:fi,setText:function(t,e,n){var i,o={isRectText:!0};!1===n?i=!0:o.autoColor=n,mi(t,e,o,i)},getFont:wi,updateProps:Si,initProps:Mi,getTransform:Ii,applyTransform:Ti,transformDirection:Ai,groupTransition:Di,clipPointsByRect:Ci,clipRectByRect:function(t,e){var n=ky(t.x,e.x),i=Py(t.x+t.width,e.x+e.width),o=ky(t.y,e.y),a=Py(t.y+t.height,e.y+e.height);if(n<=i&&o<=a)return{x:n,y:o,width:i-n,height:a-o}},createIcon:Li,Group:rm,Image:We,Text:cy,Circle:gy,Sector:my,Ring:vy,Polygon:yy,Polyline:xy,Rect:_y,Line:wy,BezierCurve:Sy,Arc:My,IncrementalDisplayable:Xn,CompoundPath:Iy,LinearGradient:Ty,RadialGradient:Ay,BoundingRect:Qt}),zy=["textStyle","color"],By={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(zy):null)},getFont:function(){return wi({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return pe(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},Vy=Ym([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Gy={getItemStyle:function(t,e){var n=Vy(this,t,e),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Fy=o,Wy=ln();ki.prototype={constructor:ki,init:null,mergeOption:function(t){v(this.option,t,!0)},get:function(t,e){return null==t?this.option:Pi(this.option,this.parsePath(t),!e&&Ni(this,t))},getShallow:function(t,e){var n=this.option,i=null==n?n:n[t],o=!e&&Ni(this,t);return null==i&&o&&(i=o.getShallow(t)),i},getModel:function(t,e){var n;return new ki(null==t?this.option:Pi(this.option,t=this.parsePath(t)),e=e||(n=Ni(this,t))&&n.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(D(this.option))},setReadOnly:function(){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Wy(this).getParent=t},isAnimationEnabled:function(){if(!ef.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},gn(ki),fn(ki),Fy(ki,rv),Fy(ki,lv),Fy(ki,By),Fy(ki,Gy);function Hy(t,e){return"{"+t+(null==e?"":e)+"}"}var Zy,Uy,Xy=0,jy=1e-4,Yy=9007199254740991,qy=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Ky=(Object.freeze||Object)({linearMap:Ri,parsePercent:Ei,round:zi,asc:Bi,getPrecision:Vi,getPrecisionSafe:Gi,getPixelPrecision:Fi,getPercentWithPrecision:Wi,MAX_SAFE_INTEGER:Yy,remRadian:Hi,isRadianAroundZero:Zi,parseDate:Ui,quantity:Xi,nice:Yi,quantile:function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),o=+t[i-1],a=n-i;return a?o+a*(t[i]-o):o},reformIntervals:qi,isNumeric:Ki}),$y=l,Jy=/([&<>"'])/g,Qy={"&":"&","<":"<",">":">",'"':""","'":"'"},tx=["a","b","c","d","e","f","g"],ex=ve,nx=(Object.freeze||Object)({addCommas:$i,toCamelCase:Ji,normalizeCssArray:$y,encodeHTML:Qi,formatTpl:to,formatTplSimple:eo,getTooltipMarker:no,formatTime:oo,capitalFirst:ao,truncateText:ex,getTextRect:pe}),ix=z,ox=["left","right","top","bottom","width","height"],ax=[["width","left","right"],["height","top","bottom"]],rx=ro,sx=(E(ro,"vertical"),E(ro,"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")}}}),lx=ln(),ux=ki.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,n,i){ki.call(this,t,e,n,i),this.uid=Oi("ec_cpt_model")},init:function(t,e,n){this.mergeDefaultAndTheme(t,n)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?ho(t):{};v(t,e.getTheme().get(this.mainType)),v(t,this.getDefaultOption()),n&&uo(t,i,n)},mergeOption:function(t){v(this.option,t,!0);var e=this.layoutMode;e&&uo(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=lx(this);if(!t.defaultOption){for(var e=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&e.push(i),n=n.superClass}for(var o={},a=e.length-1;0<=a;a--)o=v(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function hx(l){var u={},h=[];return z(l,function(n){var t,e,i,o,a,r=cx(u,n),s=(t=r.originalDeps=(o=n,a=[],z(ux.getClassesByMainType(o),function(t){a=a.concat(t.prototype.dependencies||[])}),a=L(a,function(t){return pn(t).main}),"dataset"!==o&&M(a,"dataset")<=0&&a.unshift("dataset"),a),e=l,i=[],z(t,function(t){0<=M(e,t)&&i.push(t)}),i);r.entryCount=s.length,0===r.entryCount&&h.push(n),z(s,function(t){M(r.predecessor,t)<0&&r.predecessor.push(t);var e=cx(u,t);M(e.successor,t)<0&&e.successor.push(n)})}),{graph:u,noEntryList:h}}function cx(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}yn(ux,{registerWhenExtend:!0}),Uy={},(Zy=ux).registerSubTypeDefaulter=function(t,e){t=pn(t),Uy[t.main]=e},Zy.determineSubType=function(t,e){var n,i=e.type;return i||(n=pn(t).main,Zy.hasSubTypes(t)&&Uy[n]&&(i=Uy[n](e))),i},ux.topologicalTravel=function(t,e,n,i){function o(t){r[t].entryCount--,0===r[t].entryCount&&s.push(t)}if(t.length){var a=hx(e),r=a.graph,s=a.noEntryList,l={};for(z(t,function(t){l[t]=!0});s.length;){var u=s.pop(),h=r[u],c=!!l[u];c&&(n.call(i,u,h.originalDeps.slice()),delete l[u]),z(h.successor,c?function(t){l[t]=!0,o(t)}:o)}z(l,function(){throw new Error("Circle dependency may exists")})}},o(ux,sx);var dx="";"undefined"!=typeof navigator&&(dx=navigator.platform||"");var px={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:dx.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},gx=ln(),fx={clearColorPalette:function(){gx(this).colorIdx=0,gx(this).colorNameMap={}},getColorFromPalette:function(t,e,n){var i=gx(e=e||this),o=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Qe(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(s,n):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),i.colorIdx=(o+1)%l.length,u}}},mx={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),go(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),go(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],n.set("single",o),go(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",r),go(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),go(r)&&(i.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();z(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];a.set(i,n),go(n)&&null==o.firstCategoryDimIndex&&(r.set(i,n),o.firstCategoryDimIndex=e)})}},vx="original",yx="arrayRows",xx="objectRows",_x="keyedColumns",bx="unknown",Sx="typedArray",Mx="column",Ix="row";fo.seriesDataToSource=function(t){return new fo({data:t,sourceFormat:g(t)?Sx:vx,fromDataset:!1})},fn(fo);var Tx=ln(),Ax="\0_ec_inner",Dx=ki.extend({init:function(t,e,n,i){n=n||{},this.option=null,this._theme=new ki(n),this._optionManager=i},setOption:function(t,e){d(!(Ax in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e,n,i,o=!1,a=this._optionManager;return t&&"recreate"!==t||(e=a.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(e)):_o.call(this,e),o=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=a.getTimelineOption(this))&&(this.mergeOption(n),o=!0),t&&"recreate"!==t&&"media"!==t||(i=a.getMediaOption(this,this._api)).length&&z(i,function(t){this.mergeOption(t,o=!0)},this),o},mergeOption:function(i){var l=this.option,u=this._componentsMap,n=[];Tx(this).datasetMap=C(),z(i,function(t,e){null!=t&&(ux.hasClass(e)?e&&n.push(e):l[e]=null==l[e]?D(t):v(l[e],t,!0))}),ux.topologicalTravel(n,ux.getAllClassMainTypes(),function(r,t){var e=Qe(i[r]),n=nn(u.get(r),e);on(n),z(n,function(t,e){var n,i,o,a=t.option;B(a)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(n=r,i=a,o=t.exist,i.type?i.type:o?o.subType:ux.determineSubType(n,i)))});var s=function(e,t){N(t)||(t=t?[t]:[]);var n={};return z(t,function(t){n[t]=(e.get(t)||[]).slice()}),n}(u,t);l[r]=[],u.set(r,[]),z(n,function(t,e){var n,i,o=t.exist,a=t.option;d(B(a)||o,"Empty component definition"),a?(n=ux.getClass(r,t.keyInfo.subType,!0),o&&o instanceof n?(o.name=t.keyInfo.name,o.mergeOption(a,this),o.optionUpdated(a,!1)):(i=P({dependentModels:s,componentIndex:e},t.keyInfo),P(o=new n(a,this,this,i),i),o.init(a,this,this,i),o.optionUpdated(null,!0))):(o.mergeOption({},this),o.optionUpdated({},!1)),u.get(r)[e]=o,l[r][e]=o.option},this),"series"===r&&wo(this,u.get("series"))},this),this._seriesIndicesMap=C(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var i=D(this.option);return z(i,function(t,e){if(ux.hasClass(e)){for(var n=(t=Qe(t)).length-1;0<=n;n--)rn(t[n])&&t.splice(n,1);i[e]=t}}),delete i[Ax],i},getTheme:function(){return this._theme},getComponent:function(t,e){var n=this._componentsMap.get(t);if(n)return n[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var n,i,o=t.index,a=t.id,r=t.name,s=this._componentsMap.get(e);return s&&s.length?bo(null!=o?(N(o)||(o=[o]),I(L(o,function(t){return s[t]}),function(t){return!!t})):null!=a?(n=N(a),I(s,function(t){return n&&0<=M(a,t.id)||!n&&t.id===a})):null!=r?(i=N(r),I(s,function(t){return i&&0<=M(r,t.name)||!i&&t.name===r})):s.slice(),t):[]},findComponents:function(t){var e,n,i,o,a=t.query,r=t.mainType,s=(e=r+"Index",n=r+"Id",i=r+"Name",!a||null==a[e]&&null==a[n]&&null==a[i]?null:{mainType:r,index:a[e],id:a[n],name:a[i]});return o=bo(s?this.queryComponents(s):this._componentsMap.get(r),t),t.filter?I(o,t.filter):o},eachComponent:function(t,i,o){var e=this._componentsMap;"function"==typeof t?(o=i,i=t,e.each(function(t,n){z(t,function(t,e){i.call(o,n,t,e)})})):A(t)?z(e.get(t),i,o):B(t)&&z(this.findComponents(t),i,o)},getSeriesByName:function(e){return I(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return I(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(n,i){z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},eachRawSeries:function(t,e){z(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(n,i,o){z(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,n){return z(this.getSeriesByType(t),e,n)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){wo(this,I(this._componentsMap.get("series"),t,e))},restoreData:function(n){var i=this._componentsMap;wo(this,i.get("series"));var o=[];i.each(function(t,e){o.push(e)}),ux.topologicalTravel(o,ux.getAllClassMainTypes(),function(e,t){z(i.get(e),function(t){"series"===e&&function(t,e){if(e){var n=e.seiresIndex,i=e.seriesId,o=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=o&&t.name!==o}}(t,n)||t.restoreData()})})}});o(Dx,fx);var Cx=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],Lx={};Mo.prototype={constructor:Mo,create:function(i,o){var a=[];z(Lx,function(t,e){var n=t.create(i,o);a=a.concat(n||[])}),this._coordinateSystems=a},update:function(e,n){z(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Mo.register=function(t,e){Lx[t]=e},Mo.get=function(t){return Lx[t]};var kx=z,Px=D,Nx=L,Ox=v,Rx=/^(min|max)?(.+)$/;Io.prototype={constructor:Io,setOption:function(t,e){t&&z(Qe(t.series),function(t){t&&t.data&&g(t.data)&&c(t.data)}),t=Px(t,!0);var o,n,i=this._optionBackup,a=function(t,n,i){var e,o,a,r=[],s=[],l=t.timeline;return t.baseOption&&(o=t.baseOption),(l||t.options)&&(o=o||{},r=(t.options||[]).slice()),t.media&&(o=o||{},a=t.media,kx(a,function(t){t&&t.option&&(t.query?s.push(t):e=e||t)})),(o=o||t).timeline||(o.timeline=l),kx([o].concat(r).concat(L(s,function(t){return t.option})),function(e){kx(n,function(t){t(e,i)})}),{baseOption:o,timelineOptions:r,mediaDefault:e,mediaList:s}}.call(this,t,e,!i);this._newBaseOption=a.baseOption,i?(o=i.baseOption,n=a.baseOption,kx(n=n||{},function(t,e){var n,i;null!=t&&(n=o[e],ux.hasClass(e)?(t=Qe(t),i=nn(n=Qe(n),t),o[e]=Nx(i,function(t){return t.option&&t.exist?Ox(t.exist,t.option,!0):t.exist||t.option})):o[e]=Ox(n,t,!0))}),a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Nx(e.timelineOptions,Px),this._mediaList=Nx(e.mediaList,Px),this._mediaDefault=Px(e.mediaDefault),this._currentMediaIndices=[],Px(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,n,i=this._timelineOptions;return!i.length||(n=t.getComponent("timeline"))&&(e=Px(i[n.getCurrentIndex()],!0)),e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),n=this._mediaList,i=this._mediaDefault,o=[],a=[];if(!n.length&&!i)return a;for(var r,s,l=0,u=n.length;l<u;l++)To(n[l].query,t,e)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&(r=o,s=this._currentMediaIndices,r.join(",")!==s.join(","))&&(a=Nx(o,function(t){return Px(-1===t?i.option:n[t].option)})),this._currentMediaIndices=o,a}};function Ex(e,t){Bx(Po(e.series),function(t){Vx(t)&&function(t){if(Vx(t)){Ao(t),Co(t),Lo(t,"label"),Lo(t,"upperLabel"),Lo(t,"edgeLabel"),t.emphasis&&(Lo(t.emphasis,"label"),Lo(t.emphasis,"upperLabel"),Lo(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(Ao(e),ko(e));var n=t.markLine;n&&(Ao(n),ko(n));var i=t.markArea;i&&ko(i);var o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!g(a))for(s=0;s<a.length;s++)ko(a[s]);z(t.categories,function(t){Co(t)})}if(o&&!g(o))for(s=0;s<o.length;s++)ko(o[s]);if((e=t.markPoint)&&e.data)for(var r=e.data,s=0;s<r.length;s++)ko(r[s]);if((n=t.markLine)&&n.data)for(var l=n.data,s=0;s<l.length;s++)N(l[s])?(ko(l[s][0]),ko(l[s][1])):ko(l[s]);"gauge"===t.type?(Lo(t,"axisLabel"),Lo(t,"title"),Lo(t,"detail")):"treemap"===t.type?(Do(t.breadcrumb,"itemStyle"),z(t.levels,function(t){Co(t)})):"tree"===t.type&&Co(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Bx(n,function(t){Bx(Po(e[t]),function(t){t&&(Lo(t,"axisLabel"),Lo(t.axisPointer,"label"))})}),Bx(Po(e.parallel),function(t){var e=t&&t.parallelAxisDefault;Lo(e,"axisLabel"),Lo(e&&e.axisPointer,"label")}),Bx(Po(e.calendar),function(t){Do(t,"itemStyle"),Lo(t,"dayLabel"),Lo(t,"monthLabel"),Lo(t,"yearLabel")}),Bx(Po(e.radar),function(t){Lo(t,"name")}),Bx(Po(e.geo),function(t){Vx(t)&&(ko(t),Bx(Po(t.regions),function(t){ko(t)}))}),Bx(Po(e.timeline),function(t){ko(t),Do(t,"label"),Do(t,"itemStyle"),Do(t,"controlStyle",!0);var e=t.data;N(e)&&z(e,function(t){B(t)&&(Do(t,"label"),Do(t,"itemStyle"))})}),Bx(Po(e.toolbox),function(t){Do(t,"iconStyle"),Bx(t.feature,function(t){Do(t,"iconStyle")})}),Lo(No(e.axisPointer),"label"),Lo(No(e.tooltip).axisPointer,"label")}function zx(n,t){Ex(n,t),n.series=Qe(n.series),z(n.series,function(t){var e,n;B(t)&&("pie"!==(e=t.type)&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e&&null!=(n=function(t,e){e=e.split(",");for(var n=t,i=0;i<e.length&&null!=(n=n&&n[e[i]]);i++);return n}(t,"pointer.color"))&&function(t,e,n,i){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];!i&&null!=a[e[r]]||(a[e[r]]=n)}(t,"itemStyle.normal.color",n),Oo(t))}),n.dataRange&&(n.visualMap=n.dataRange),z(Wx,function(t){var e=n[t];e&&(N(e)||(e=[e]),z(e,function(t){Oo(t)}))})}var Bx=z,Vx=B,Gx=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],Fx=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Wx=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Hx=Eo.prototype;Hx.pure=!1;var Zx={arrayRows_column:{pure:Hx.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Vo},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=[],n=this._data,i=0;i<n.length;i++){var o=n[i];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:zo,getItem:Bo,appendData:Vo},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var o=this._data[n[i].name];e.push(o?o[t]:null)}return e},appendData:function(t){var o=this._data;z(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},original:{count:zo,getItem:Bo,appendData:Vo},typedArray:{persistent:!(Hx.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var n=this._dimSize*t,i=0;i<this._dimSize;i++)e[i]=this._data[n+i];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},Ux={arrayRows:Go,objectRows:function(t,e,n,i){return null!=n?t[i]:t},keyedColumns:Go,original:function(t,e,n){var i=en(t);return null!=n&&i instanceof Array?i[n]:i},typedArray:Go},Xx={arrayRows:Fo,objectRows:function(t,e){return Wo(t[e],this._dimensionInfos[e])},keyedColumns:Fo,original:function(t,e,n,i){var o,a=t&&(null==t.value?t:t.value);return this._rawData.pure||(!$m(o=t)||o instanceof Array)||(this.hasItemOption=!0),Wo(a instanceof Array?a[i]:a,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},jx=/\{@(.+?)\}/g,Yx={getDataParams:function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),a=n.getName(t),r=n.getRawDataItem(t),s=n.getItemVisual(t,"color"),l=this.ecModel.getComponent("tooltip"),u=dn(l&&l.get("renderMode")),h=this.mainType,c="series"===h;return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:i,color:s,marker:no({color:s,renderMode:u}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(i,t,e,n,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(i),s=this.getDataParams(i,e);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]);return"function"==typeof l?(s.status=t,l(s)):"string"==typeof l?to(l,s).replace(jx,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),Ho(a,i,e)}):void 0},getRawValue:function(t,e){return Ho(this.getData(e),t)},formatTooltip:function(){}},qx=Xo.prototype;qx.perform=function(t){function e(t){return 1<=t||(t=1),t}var n,i,o=this._upstream,a=t&&t.skip;this._dirty&&o&&((n=this.context).data=n.outputData=o.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(i=this._plan(this.context));var r,s=e(this._modBy),l=this._modDataCount||0,u=e(t&&t.modBy),h=t&&t.modDataCount||0;s===u&&l===h||(i="reset"),!this._dirty&&"reset"!==i||(this._dirty=!1,r=function(t,e){var n,i;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((n=t._reset(t.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),N(n)&&!n.length&&(n=null)),t._progress=n,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),i}(this,a)),this._modBy=u,this._modDataCount=h;var c=t&&t.step;if(this._dueEnd=o?o._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!a&&(r||d<p)){var g=this._progress;if(N(g))for(var f=0;f<g.length;f++)jo(this,g[f],d,p,u,h);else jo(this,g,d,p,u,h)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Kx,$x,Jx,Qx,t_,e_,n_=e_={reset:function(t,e,n,i){$x=t,Kx=e,Jx=n,Qx=i,t_=Math.ceil(Qx/Jx),e_.next=1<Jx&&0<Qx?o_:i_}};function i_(){return $x<Kx?$x++:null}function o_(){var t=$x%t_*Jx+Math.ceil($x/t_),e=Kx<=$x?null:t<Qx?t:$x;return $x++,e}qx.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},qx.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},qx.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},qx.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},qx.getUpstream=function(){return this._upstream},qx.getDownstream=function(){return this._downstream},qx.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var a_=ln(),r_=ux.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Uo({count:qo,reset:Ko}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),mo(this);var i=this.getInitialData(t,n);Jo(i,this),this.dataTask.context.data=i,a_(this).dataBeforeProcessed=i,Yo(this)},mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?ho(t):{},o=this.subType;ux.hasClass(o),v(t,e.getTheme().get(this.subType)),v(t,this.getDefaultOption()),tn(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&uo(t,i,n)},mergeOption:function(t,e){t=v(this.option,t,!0),this.fillDataTextStyle(t.data);var n=this.layoutMode;n&&uo(this.option,t,n),mo(this);var i=this.getInitialData(t,e);Jo(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,a_(this).dataBeforeProcessed=i,Yo(this)},fillDataTextStyle:function(t){if(t&&!g(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&tn(t[n],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=ta(this);if(e){var n=e.context.data;return null==t?n:n.getLinkedData(t)}return a_(this).data},setData:function(t){var e,n=ta(this);n&&((e=n.context).data!==t&&n.modifyOutputEnd&&n.setOutputEnd(t.count()),e.outputData=t,n!==this.dataTask&&(e.data=t)),a_(this).data=t},getSource:function(){return Tx(this).source},getRawData:function(){return a_(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(o,h,t,c){var d=this,e="html"===(c=c||"html")?"<br/>":"\n",p="richText"===c,g={},f=0,m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,i=this.getRawValue(o),r=N(i),v=m.getItemVisual(o,"color");B(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var s,l=(1<n||r&&!n?function(t){function e(t,e){var n,i,o,a,r,s=m.getDimensionInfo(e);s&&!1!==s.otherDims.tooltip&&(n=s.type,i="sub"+d.seriesIndex+"at"+f,a="string"==typeof(o=no({color:v,type:"subItem",renderMode:c,markerId:i}))?o:o.content,(r=(l?a+Qi(s.displayName||"-")+": ":"")+Qi("ordinal"===n?t+"":"time"===n?h?"":oo("yyyy/MM/dd hh:mm:ss",t):$i(t)))&&u.push(r),p&&(g[i]=v,++f))}var l=b(t,function(t,e,n){var i=m.getDimensionInfo(n);return t|(i&&!1!==i.tooltip&&null!=i.displayName)},0),u=[];a.length?z(a,function(t){e(Ho(m,o,t),t)}):z(t,e);var n=l?p?"\n":"<br/>":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:g}}(i):(s=n?Ho(m,o,a[0]):r?i[0]:i,{renderMode:c,content:Qi($i(s)),style:g})).content,u=d.seriesIndex+"at"+f,y=no({color:v,type:"item",renderMode:c,markerId:u});g[u]=v,++f;var x=m.getName(o),_=this.name;an(this)||(_=""),_=_?Qi(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?Qi(x)+": "+l:l),markers:g}},isAnimationEnabled:function(){if(ef.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel;return fx.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},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});o(r_,Yx),o(r_,fx);var s_=function(){this.group=new rm,this.uid=Oi("viewComponent")};s_.prototype={constructor:s_,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var l_=s_.prototype;l_.updateView=l_.updateLayout=l_.updateVisual=function(t,e,n,i){},gn(s_),yn(s_,{registerWhenExtend:!0});function u_(){var s=ln();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,o=e.progressiveRender,a=e.large=n.large,r=e.progressiveRender=n.progressiveRender;return!!(i^a||o^r)&&"reset"}}var h_=ln(),c_=u_(),d_=ea.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){ia(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){ia(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};d_.updateView=d_.updateLayout=d_.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},gn(ea),yn(ea,{registerWhenExtend:!0}),ea.markUpdateMethod=function(t,e){h_(t).updateMethod=e};var p_={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)}}},g_="\0__throttleOriginMethod",f_="\0__throttleRate",m_="\0__throttleType",v_={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),o=e.get(i)||e.getColorFromPalette(e.name,null,t.getSeriesCount());if(n.setVisual("color",o),!t.isSeriesFiltered(e))return"function"!=typeof o||o instanceof py||n.each(function(t){n.setItemVisual(t,"color",o(e.getDataParams(t)))}),{dataEach:n.hasItemOption?function(t,e){var n=t.getItemModel(e).get(i,!0);null!=n&&t.setItemVisual(e,"color",n)}:null}}},y_={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:""}}}},x_=function(t,e){function c(t,e){if("string"!=typeof t)return t;var n=t;return z(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}function d(t){var e=r.get(t);if(null!=e)return e;for(var n=t.split("."),i=y_.aria,o=0;o<n.length;++o)i=i[n[o]];return i}var p,g,n,f,i,o,m,a,r=e.getModel("aria");r.get("show")&&(r.get("description")?t.setAttribute("aria-label",r.get("description")):(p=0,e.eachSeries(function(t,e){++p},this),g=r.get("data.maxCount")||10,n=r.get("series.maxCount")||10,f=Math.min(p,n),p<1||((a=e.getModel("title").option)&&a.length&&(a=a[0]),o=(i=a&&a.text)?c(d("general.withTitle"),{title:i}):d("general.withoutTitle"),m=[],o+=c(d(1<p?"series.multiple.prefix":"series.single.prefix"),{seriesCount:p}),e.eachSeries(function(t,e){if(e<f){var n=t.get("name"),i="series."+(1<p?"multiple":"single")+".",o=c(o=d(n?i+"withName":i+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(h=t.subType,y_.series.typeNames[h]||"自定义图")}),a=t.getData();(window.data=a).count()>g?o+=c(d("data.partialData"),{displayCnt:g}):o+=d("data.allData");for(var r,s,l=[],u=0;u<a.count();u++){u<g&&(r=a.getName(u),s=Ho(a,u),l.push(c(d(r?"data.withName":"data.withoutName"),{name:r,value:s})))}o+=l.join(d("data.separator.middle"))+d("data.separator.end"),m.push(o)}var h}),o+=m.join(d("series.multiple.separator.middle"))+d("series.multiple.separator.end"),t.setAttribute("aria-label",o))))},__=Math.PI,w_=ua.prototype;w_.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},w_.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,o=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},w_.getPipeline=function(t){return this._pipelineMap.get(t)},w_.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:r,large:a}},w_.restorePipelines=function(t){var i=this,o=i._pipelineMap=C();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),xa(i,t,t.dataTask)})},w_.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),o=this.api;z(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,o,t,a,r){function e(t){var e=t.uid,n=s.get(e)||s.set(e,Uo({plan:fa,reset:ma,count:ya}));n.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:i},xa(i,t,n)}var s=t.seriesTaskMap||(t.seriesTaskMap=C()),n=o.seriesType,l=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(e):n?a.eachRawSeriesByType(n,e):l&&l(a,r).each(e);var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,o),t.overallReset&&function(i,t,e,n,o){function a(t){var e=t.uid,n=s.get(e);n||(n=s.set(e,Uo({reset:da,onDirty:ga})),r.dirty()),n.context={model:t,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,xa(i,t,n)}var r=e.overallTask=e.overallTask||Uo({reset:ca});r.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:i};var s=r.agentStubMap=r.agentStubMap||C(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=t.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,z(n.getSeries(),a));var d=i._pipelineMap;s.each(function(t,e){d.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}(this,t,e,i,o)},this)},w_.prepareView=function(t,e,n,i){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=n,a.api=i,o.__block=!t.incrementalPrepareRender,xa(this,e,o)},w_.performDataProcessorTasks=function(t,e){ha(this,this._dataProcessorHandlers,t,e,{block:!0})},w_.performVisualTasks=function(t,e,n){ha(this,this._visualHandlers,t,e,n)},w_.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},w_.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 b_=w_.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},S_=va(0);ua.wrapStageHandler=function(t,e){return f(t)&&(t={overallReset:t,seriesType:function(t){M_=null;try{t(I_,T_)}catch(t){}return M_}(t)}),t.uid=Oi("stageHandler"),e&&(t.visualType=e),t};var M_,I_={},T_={};_a(I_,Dx),_a(T_,So),I_.eachSeriesByType=I_.eachRawSeriesByType=function(t){M_=t},I_.eachComponent=function(t){"series"===t.mainType&&t.subType&&(M_=t.subType)};var A_=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],D_={color:A_,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],A_]},C_=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],L_={color:C_,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:C_[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:C_},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};L_.categoryAxis.splitLine.show=!1,ux.extend({type:"dataset",defaultOption:{seriesLayoutBy:Mx,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,n=bx;if(g(e))n=Sx;else if(N(e)){0===e.length&&(n=yx);for(var i=0,o=e.length;i<o;i++){var a=e[i];if(null!=a){if(N(a)){n=yx;break}if(B(a)){n=xx;break}}}}else if(B(e)){for(var r in e)if(e.hasOwnProperty(r)&&R(e[r])){n=_x;break}}else if(null!=e)throw new Error("Invalid data");Tx(t).sourceFormat=n}(this)}}),s_.extend({type:"dataset"});var k_=Vn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.rx,a=e.ry,r=.5522848*o,s=.5522848*a;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-s,n-r,i-a,n,i-a),t.bezierCurveTo(n+r,i-a,n+o,i-s,n+o,i),t.bezierCurveTo(n+o,i+s,n+r,i+a,n,i+a),t.bezierCurveTo(n-r,i+a,n-o,i+s,n-o,i),t.closePath()}}),P_=/[\s,]+/;ba.prototype.parse=function(t,e){e=e||{};var n=wa(t);if(!n)throw new Error("Illegal svg");var i=new rm;this._root=i;var o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),r=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),Ia(n,i,null,!0);for(var s,l,u,h,c=n.firstChild;c;)this._parseNode(c,i),c=c.nextSibling;return!o||4<=(u=p(o).split(P_)).length&&(s={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])}),s&&null!=a&&null!=r&&(l=Aa(s,a,r),!e.ignoreViewBox)&&(h=i,(i=new rm).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()),e.ignoreRootClip||null==a||null==r||i.setClipPath(new _y({shape:{x:0,y:0,width:a,height:r}})),{root:i,width:a,height:r,viewBoxRect:s,viewBoxTransform:l}},ba.prototype._parseNode=function(t,e){var n,i,o,a,r=t.nodeName.toLowerCase();"defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine?(a=O_[r])&&(i=a.call(this,t),(o=t.getAttribute("id"))&&(this._defs[o]=i)):(a=N_[r])&&(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"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},ba.prototype._parseText=function(t,e){var n,i;1===t.nodeType&&(n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0,this._textX+=parseFloat(n),this._textY+=parseFloat(i));var o=new cy({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Sa(e,o),Ia(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var N_={g:function(t,e){var n=new rm;return Sa(e,n),Ia(t,n,this._defs),n},rect:function(t,e){var n=new _y;return Sa(e,n),Ia(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),n},circle:function(t,e){var n=new gy;return Sa(e,n),Ia(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),n},line:function(t,e){var n=new wy;return Sa(e,n),Ia(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),n},ellipse:function(t,e){var n=new k_;return Sa(e,n),Ia(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),n},polygon:function(t,e){var n=(n=t.getAttribute("points"))&&Ma(n),i=new yy({shape:{points:n||[]}});return Sa(e,i),Ia(t,i,this._defs),i},polyline:function(t,e){var n=new Vn;Sa(e,n),Ia(t,n,this._defs);var i=(i=t.getAttribute("points"))&&Ma(i);return new xy({shape:{points:i||[]}})},image:function(t,e){var n=new We;return Sa(e,n),Ia(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||0,i=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(a);var r=new rm;return Sa(e,r),Ia(t,r,this._defs),r},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new rm;return Sa(e,r),Ia(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var n=Wn(t.getAttribute("d")||"");return Sa(e,n),Ia(t,n,this._defs),n}},O_={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),n=parseInt(t.getAttribute("y1")||0,10),i=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new Ty(e,n,i,o);return function(t,e){for(var n,i,o=t.firstChild;o;){1===o.nodeType&&(n=0<(n=o.getAttribute("offset")).indexOf("%")?parseInt(n,10)/100:n?parseFloat(n):0,i=o.getAttribute("stop-color")||"#000000",e.addColorStop(n,i)),o=o.nextSibling}}(t,a),a},radialgradient:function(){}},R_={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"},E_=/url\(\s*#(.*?)\)/,z_=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,B_=/([^\s:;]+)\s*:\s*([^:;]+)/g,V_=C(),G_={registerMap:function(t,e,n){var i=N(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(n=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:n}]);return z(i,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,F_[e])(t)}),V_.set(t,i)},retrieveMap:function(t){return V_.get(t)}},F_={geoJSON:function(t){var e=t.source;t.geoJSON=A(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=wa(t.source)}},W_=d,H_=z,Z_=f,U_=B,X_=ux.parseClassType,j_={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},Y_="__flagInMainProcess",q_="__optionUpdated",K_=/^[a-zA-Z0-9_]+$/;Ca.prototype.on=Da("on"),Ca.prototype.off=Da("off"),Ca.prototype.one=Da("one"),o(Ca,wf);var $_=La.prototype;$_._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[q_]){var e=this[q_].silent;this[Y_]=!0,Pa(this),J_.update.call(this),this[Y_]=!1,this[q_]=!1,Ea.call(this,e),za.call(this,e)}else if(t.unfinished){var n=1,i=this._model;this._api,t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Oa(this,i),t.performVisualTasks(i),Fa(this,this._model,0,"remain"),n-=new Date-o}while(0<n&&t.unfinished);t.unfinished||this._zr.flush()}}},$_.getDom=function(){return this._dom},$_.getZr=function(){return this._zr},$_.setOption=function(t,e,n){var i,o,a,r;U_(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[Y_]=!0,this._model&&!e||(o=new Io(this._api),a=this._theme,(r=this._model=new Dx(null,null,a,o)).scheduler=this._scheduler,r.init(null,null,a,o)),this._model.setOption(t,iw),n?(this[q_]={silent:i},this[Y_]=!1):(Pa(this),J_.update.call(this),this._zr.flush(),this[q_]=!1,this[Y_]=!1,Ea.call(this,i),za.call(this,i))},$_.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},$_.getModel=function(){return this._model},$_.getOption=function(){return this._model&&this._model.getOption()},$_.getWidth=function(){return this._zr.getWidth()},$_.getHeight=function(){return this._zr.getHeight()},$_.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},$_.getRenderedCanvas=function(t){if(ef.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},$_.getSvgDataUrl=function(){if(ef.svgSupported){var t=this._zr;return z(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},$_.getDataURL=function(t){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;H_(e,function(t){n.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return H_(i,function(t){t.group.ignore=!1}),a},$_.getConnectedDataURL=function(o){if(ef.canvasSupported){var a=this.group,r=Math.min,s=Math.max;if(uw[a]){var l=1/0,u=1/0,h=-1/0,c=-1/0,d=[],n=o&&o.pixelRatio||1;z(lw,function(t,e){var n,i;t.group===a&&(n=t.getRenderedCanvas(D(o)),i=t.getDom().getBoundingClientRect(),l=r(i.left,l),u=r(i.top,u),h=s(i.right,h),c=s(i.bottom,c),d.push({dom:n,left:i.left,top:i.top}))});var t=(h*=n)-(l*=n),e=(c*=n)-(u*=n),i=Xg();i.width=t,i.height=e;var p=$e(i);return H_(d,function(t){var e=new We({style:{x:t.left*n-l,y:t.top*n-u,image:t.dom}});p.add(e)}),p.refreshImmediately(),i.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},$_.convertToPixel=E(ka,"convertToPixel"),$_.convertFromPixel=E(ka,"convertFromPixel"),$_.containPixel=function(t,o){var a;return z(t=un(this._model,t),function(t,i){0<=i.indexOf("Models")&&z(t,function(t){var e,n=t.coordinateSystem;n&&n.containPoint?a|=!!n.containPoint(o):"seriesModels"!==i||(e=this._chartsMap[t.__viewId])&&e.containPoint&&(a|=e.containPoint(o,t))},this)},this),!!a},$_.getVisual=function(t,e){var n=(t=un(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),i=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=i?n.getItemVisual(i,e):n.getVisual(e)},$_.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},$_.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var J_={prepareAndUpdate:function(t){Pa(this),J_.update.call(this,t)},update:function(t){var e,n,i=this._model,o=this._api,a=this._zr,r=this._coordSysMgr,s=this._scheduler;i&&(s.restoreData(i,t),s.performSeriesTasks(i),r.create(i,o),s.performDataProcessorTasks(i,t),Oa(this,i),r.update(i,o),Va(i),s.performVisualTasks(i,t),Ga(this,i,o,t),n=i.get("backgroundColor")||"transparent",ef.canvasSupported?a.setBackgroundColor(n):(n=Gt(e=Pt(n),"rgb"),0===e[3]&&(n="transparent")),Wa(i,o))},updateTransform:function(o){var a,i,r=this._model,s=this,l=this._api;r&&(a=[],r.eachComponent(function(t,e){var n,i=s.getViewOfComponentModel(e);i&&i.__alive&&(!i.updateTransform||(n=i.updateTransform(e,r,l,o))&&n.update)&&a.push(i)}),i=C(),r.eachSeries(function(t){var e,n=s._chartsMap[t.__viewId];(!n.updateTransform||(e=n.updateTransform(t,r,l,o))&&e.update)&&i.set(t.uid,1)}),Va(r),this._scheduler.performVisualTasks(r,o,{setDirty:!0,dirtyMap:i}),Fa(s,r,0,o,i),Wa(r,this._api))},updateView:function(t){var e=this._model;e&&(ea.markUpdateMethod(t,"updateView"),Va(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Ga(this,this._model,this._api,t),Wa(e,this._api))},updateVisual:function(t){J_.update.call(this,t)},updateLayout:function(t){J_.update.call(this,t)}};$_.resize=function(t){this._zr.resize(t);var e,n,i=this._model;this._loadingFX&&this._loadingFX.resize(),i&&(e=i.resetOption("media"),n=t&&t.silent,this[Y_]=!0,e&&Pa(this),J_.update.call(this),this[Y_]=!1,Ea.call(this,n),za.call(this,n))},$_.showLoading=function(t,e){var n,i;U_(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),sw[t]&&(n=sw[t](this._api,e),i=this._zr,this._loadingFX=n,i.add(n))},$_.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},$_.makeActionFromEvent=function(t){var e=P({},t);return e.type=ew[t.type],e},$_.dispatchAction=function(t,e){U_(e)||(e={silent:!!e}),tw[t.type]&&this._model&&(this[Y_]?this._pendingActions.push(t):(Ra.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&ef.browser.weChat&&this._throttledZrFlush(),Ea.call(this,e.silent),za.call(this,e.silent)))},$_.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},$_.on=Da("on"),$_.off=Da("off"),$_.one=Da("one");var Q_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];$_._initEvents=function(){H_(Q_,function(u){this._zr.on(u,function(t){var e,n,i,o,a,r,s=this.getModel(),l=t.target;"globalout"===u?n={}:l&&null!=l.dataIndex?n=(e=l.dataModel||s.getSeriesByIndex(l.seriesIndex))&&e.getDataParams(l.dataIndex,l.dataType,l)||{}:l&&l.eventData&&(n=P({},l.eventData)),n&&(i=n.componentType,o=n.componentIndex,"markLine"!==i&&"markPoint"!==i&&"markArea"!==i||(i="series",o=n.seriesIndex),r=(a=i&&null!=o&&s.getComponent(i,o))&&this["series"===a.mainType?"_chartsMap":"_componentsMap"][a.__viewId],n.event=t,n.type=u,this._ecEventProcessor.eventInfo={targetEl:l,packedEvent:n,model:a,view:r},this.trigger(u,n))},this)},this),H_(ew,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},$_.isDisposed=function(){return this._disposed},$_.clear=function(){this.setOption({series:[]},!0)},$_.dispose=function(){var e,n;this._disposed||(this._disposed=!0,cn(this.getDom(),dw,""),e=this._api,n=this._model,H_(this._componentsViews,function(t){t.dispose(n,e)}),H_(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete lw[this.id])},o(La,wf),Za.prototype={constructor:Za,normalizeQuery:function(t){var e,s,l,u={},h={},c={};return A(t)?(e=X_(t),u.mainType=e.main||null,u.subType=e.sub||null):(s=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1},z(t,function(t,e){for(var n=!1,i=0;i<s.length;i++){var o,a=s[i],r=e.lastIndexOf(a);0<r&&r===e.length-a.length&&("data"!==(o=e.slice(0,r))&&(u.mainType=o,u[a.toLowerCase()]=t,n=!0))}l.hasOwnProperty(e)&&(h[e]=t,n=!0),n||(c[e]=t)})),{cptQuery:u,dataQuery:h,otherQuery:c}},filter:function(t,e){function n(t,e,n,i){return null==t[n]||e[i||n]===t[n]}var i=this.eventInfo;if(!i)return!0;var o=i.targetEl,a=i.packedEvent,r=i.model,s=i.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return n(l,r,"mainType")&&n(l,r,"subType")&&n(l,r,"index","componentIndex")&&n(l,r,"name")&&n(l,r,"id")&&n(u,a,"name")&&n(u,a,"dataIndex")&&n(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a))},afterTrigger:function(){this.eventInfo=null}};var tw={},ew={},nw=[],iw=[],ow=[],aw=[],rw={},sw={},lw={},uw={},hw=+new Date,cw=+new Date,dw="_echarts_instance_",pw=Ua;Qa(2e3,v_),Ya(zx),qa(5e3,function(t){var a=C();t.eachSeries(function(t){var e=t.get("stack");if(e){var n=a.get(e)||a.set(e,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&i.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),a.each(Ro)}),er("default",function(i,t){O(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var o=new _y({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new My({shape:{startAngle:-__/2,endAngle:-__/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),r=new _y({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*__/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*__/2}).delay(300).start("circularInOut");var e=new rm;return e.add(a),e.add(r),e.add(o),e.resize=function(){var t=i.getWidth()/2,e=i.getHeight()/2;a.setShape({cx:t,cy:e});var n=a.shape.r;r.setShape({x:t-n,y:e-n,width:2*n,height:2*n}),o.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},e.resize(),e}),Ka({type:"highlight",event:"highlight",update:"highlight"},x),Ka({type:"downplay",event:"downplay",update:"downplay"},x),ja("light",D_),ja("dark",L_);sr.prototype={constructor:sr,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,n={},i=[],o=[];for(lr(t,{},i,"_oldKeyGetter",this),lr(e,n,o,"_newKeyGetter",this),a=0;a<t.length;a++)null!=(s=n[r=i[a]])?((u=s.length)?(1===u&&(n[r]=null),s=s.unshift()):n[r]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a);for(var a=0;a<o.length;a++){var r=o[a];if(n.hasOwnProperty(r)){var s=n[r];if(null==s)continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};function gw(t,e){t=t||["x","y"];for(var n={},i=[],o={},a=0;a<t.length;a++){var r=t[a];A(r)&&(r={name:r});var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},i.push(s),(n[s]=r).index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=ur(this),this._invertedIndicesMap=o,this._calculationInfo={}}var fw=C(["tooltip","label","itemName","itemId","seriesName"]),mw=B,vw={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},yw="undefined"==typeof Uint32Array?Array:Uint32Array,xw="undefined"==typeof Uint16Array?Array:Uint16Array,_w=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],ww=["_extent","_approximateExtent","_rawExtent"],bw=gw.prototype;bw.type="list",bw.hasItemOption=!0,bw.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},bw.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},bw.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},bw.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return!0===e?(i||[]).slice():i&&i[e]},bw.initData=function(t,e,n){(fo.isInstance(t)||R(t))&&(t=new Eo(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Xx[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},bw.getProvider=function(){return this._rawData},bw.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);var i=e.count();e.persistent||(i+=n),this._initDataFromProvider(n,i)},bw._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,g=p-1,f=0;f<s;f++){c[k=r[f]]||(c[k]=[1/0,-1/0]);var m=l[k];0===m.otherDims.itemName&&(n=this._nameDimIdx=f),0===m.otherDims.itemId&&(this._idDimIdx=f);var v=vw[m.type];a[k]||(a[k]=[]);var y=a[k][g];if(y&&y.length<i){for(var x=new v(Math.min(e-g*i,i)),_=0;_<y.length;_++)x[_]=y[_];a[k][g]=x}for(L=p*i;L<e;L+=i)a[k].push(new v(Math.min(e-L,i)));this._chunkCount=a[k].length}for(var w=new Array(s),b=t;b<e;b++){w=o.getItem(b,w);for(var S,M,I,T,A,D=Math.floor(b/i),C=b%i,L=0;L<s;L++){var k=r[L],P=a[k][D],N=this._dimValueGetter(w,k,b,L);P[C]=N;var O=c[k];N<O[0]&&(O[0]=N),N>O[1]&&(O[1]=N)}o.pure||(S=u[b],w&&null==S&&(null!=w.name?u[b]=S=w.name:null==n||(I=a[M=r[n]][D])&&(S=I[C],(T=l[M].ordinalMeta)&&T.categories.length&&(S=T.categories[S]))),null==(A=null==w?null:w.id)&&null!=S&&(d[S]=d[S]||0,0<d[A=S]&&(A+="__ec__"+d[S]),d[S]++),null!=A&&(h[b]=A))}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},z(E=(R=this)._invertedIndicesMap,function(t,e){var n=R._dimensionInfos[e].ordinalMeta;if(n){for(t=E[e]=new yw(n.categories.length),i=0;i<t.length;i++)t[i]=NaN;for(var i=0;i<R._count;i++)t[R.get(e,i)]=i}})}var R,E},bw.count=function(){return this._count},bw.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array)for(i=new e(n),o=0;o<n;o++)i[o]=t[o];else i=new e(t.buffer,0,n)}else for(var i=new(e=cr(this))(this.count()),o=0;o<i.length;o++)i[o]=o;return i},bw.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var n=this._storage;if(!n[t])return NaN;e=this.getRawIndex(e);var i=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return n[t][i][o]},bw.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var n=this._storage[t];if(!n)return NaN;var i=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return n[i][o]},bw._getFast=function(t,e){var n=Math.floor(e/this._chunkSize),i=e%this._chunkSize;return this._storage[t][n][i]},bw.getValues=function(t,e){var n=[];N(t)||(e=t,t=this.dimensions);for(var i=0,o=t.length;i<o;i++)n.push(this.get(t[i],e));return n},bw.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=this._dimensionInfos,i=0,o=e.length;i<o;i++)if("ordinal"!==n[e[i]].type&&isNaN(this.get(e[i],t)))return!1;return!0},bw.getDataExtent=function(t){t=this.getDimension(t);var e=[1/0,-1/0];if(!this._storage[t])return e;var n,i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var o=(n=e)[0],a=n[1],r=0;r<i;r++){var s=this._getFast(t,this.getRawIndex(r));s<o&&(o=s),a<s&&(a=s)}return n=[o,a],this._extent[t]=n},bw.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},bw.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},bw.getCalculationInfo=function(t){return this._calculationInfo[t]},bw.setCalculationInfo=function(t,e){mw(t)?P(this._calculationInfo,t):this._calculationInfo[t]=e},bw.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},bw.getMedian=function(t){var n=[];this.each(t,function(t,e){isNaN(t)||n.push(t)});var e=[].concat(n).sort(function(t,e){return t-e}),i=this.count();return 0===i?0:i%2==1?e[(i-1)/2]:(e[i/2]+e[i/2-1])/2},bw.rawIndexOf=function(t,e){var n=(t&&this._invertedIndicesMap[t])[e];return null==n||isNaN(n)?-1:n},bw.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},bw.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var a=(i+o)/2|0;if(e[a]<t)i=1+a;else{if(!(e[a]>t))return a;o=a-1}}return-1},bw.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r<s;r++){var l=e-this.get(t,r),u=Math.abs(l);l<=n&&u<=o&&((u<o||0<=l&&a<0)&&(o=u,a=l,i.length=0),i.push(r))}return i},bw.getRawIndex=gr,bw.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},bw.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||pr(this,this._nameDimIdx,e)||""},bw.getId=function(t){return mr(this,this.getRawIndex(t))},bw.each=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;for(var o=(t=L(vr(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(o){case 0:e.call(n,a);break;case 1:e.call(n,this.get(t[0],a),a);break;case 2:e.call(n,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(n,s)}}},bw.filterSelf=function(t,e,n,i){if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this,t=L(vr(t),this.getDimension,this);for(var o=this.count(),a=new(cr(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c=this.getRawIndex(h);if(0===s)p=e.call(n,h);else if(1===s)var d=this._getFast(u,c),p=e.call(n,d,h);else{for(var g=0;g<s;g++)r[g]=this._getFast(u,c);r[g]=h,p=e.apply(n,r)}p&&(a[l++]=c)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?fr:gr,this}},bw.selectRange=function(t){if(this._count){var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);var i=n.length;if(i){var o=this.count(),a=new(cr(this))(o),r=0,s=n[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===i){for(var d=this._storage[n[0]],p=0;p<this._chunkCount;p++)for(var g=d[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<f;m++)((w=g[m])>=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===i){for(var d=this._storage[s],v=this._storage[n[1]],y=t[n[1]][0],x=t[n[1]][1],p=0;p<this._chunkCount;p++)for(var g=d[p],_=v[p],f=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<f;m++){var w=g[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===i)for(m=0;m<o;m++)M=this.getRawIndex(m),((w=this._getFast(s,M))>=l&&w<=u||isNaN(w))&&(a[r++]=M);else for(m=0;m<o;m++){for(var S=!0,M=this.getRawIndex(m),p=0;p<i;p++){var I=n[p];((w=this._getFast(e,M))<t[I][0]||w>t[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?fr:gr,this}}},bw.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},n),o},bw.map=function(t,e,n,i){n=n||i||this;var o=yr(this,t=L(vr(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?fr:gr;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)h[p]=this.get(t[p],d);h[l]=d;var g=e&&e.apply(n,h);if(null!=g){"object"!=_typeof(g)&&(r[0]=g,g=r);for(var f=this.getRawIndex(d),m=Math.floor(f/s),v=f%s,y=0;y<g.length;y++){var x=t[y],_=g[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},bw.downSample=function(t,e,n,i){for(var o=yr(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(cr(this))(u),p=0,g=0;g<u;g+=s){u-g<s&&(s=u-g,r.length=s);for(var f=0;f<s;f++){var m=this.getRawIndex(g+f),v=Math.floor(m/h),y=m%h;r[f]=l[v][y]}var x=n(r),_=this.getRawIndex(Math.min(g+i(r,x)||0,u-1)),w=_%h;(l[Math.floor(_/h)][w]=x)<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[p++]=_}return o._count=p,o._indices=d,o.getRawIndex=fr,o},bw.getItemModel=function(t){var e=this.hostModel;return new ki(this.getRawDataItem(t),e,e&&e.ecModel)},bw.diff=function(e){var n=this;return new sr(e?e.getIndices():[],this.getIndices(),function(t){return mr(e,t)},function(t){return mr(n,t)})},bw.getVisual=function(t){var e=this._visual;return e&&e[t]},bw.setVisual=function(t,e){if(mw(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},bw.setLayout=function(t,e){if(mw(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},bw.getLayout=function(t){return this._layout[t]},bw.getItemLayout=function(t){return this._itemLayouts[t]},bw.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?P(this._itemLayouts[t]||{},e):e},bw.clearItemLayouts=function(){this._itemLayouts.length=0},bw.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],o=i&&i[e];return null!=o||n?o:this.getVisual(e)},bw.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=i,mw(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],o[a]=!0);else i[e]=n,o[e]=!0},bw.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Sw(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}bw.setItemGraphicEl=function(t,e){var n=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Sw,e)),this._graphicEls[t]=e},bw.getItemGraphicEl=function(t){return this._graphicEls[t]},bw.eachItemGraphicEl=function(n,i){z(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},bw.cloneShallow=function(t){var e,n;return t||(e=L(this.dimensions,this.getDimensionInfo,this),t=new gw(e,this.hostModel)),t._storage=this._storage,dr(t,this),this._indices?(n=this._indices.constructor,t._indices=new n(this._indices)):t._indices=null,t.getRawIndex=t._indices?fr:gr,t},bw.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(s(arguments)))})},bw.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],bw.CHANGABLE_METHODS=["filterSelf","selectRange"];function Mw(t,e){return xr((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}Ir.prototype.parse=function(t){return t},Ir.prototype.getSetting=function(t){return this._setting[t]},Ir.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Ir.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Ir.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Ir.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Ir.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Ir.prototype.getExtent=function(){return this._extent.slice()},Ir.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Ir.prototype.isBlank=function(){return this._isBlank},Ir.prototype.setBlank=function(t){this._isBlank=t},Ir.prototype.getLabel=null,gn(Ir),yn(Ir,{registerWhenExtend:!0}),Tr.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&L(n,Dr);return new Tr({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var Iw=Tr.prototype;Iw.getOrdinal=function(t){return Ar(this).get(t)},Iw.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=Ar(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var Tw=Ir.prototype,Aw=Ir.extend({type:"ordinal",init:function(t,e){t&&!N(t)||(t=new Tr({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),Tw.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Tw.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Tw.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:x,niceExtent:x});Aw.create=function(){return new Aw};var Dw=zi,Cw=zi,Lw=Ir.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Lw.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=Cr(t)},getTicks:function(){return function(t,e,n,i){var o=[];if(!t)return o;e[0]<n[0]&&o.push(e[0]);for(var a=n[0];a<=n[1]&&(o.push(a),(a=Dw(a+t,i))!==o[o.length-1]);)if(1e4<o.length)return[];return e[1]>(o.length?o[o.length-1]:n[1])&&o.push(e[1]),o}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Gi(t)||0:"auto"===n&&(n=this._intervalPrecision),$i(t=Cw(t,n,!0))},niceTicks:function(t,e,n){t=t||5;var i,o=this._extent,a=o[1]-o[0];isFinite(a)&&(a<0&&(a=-a,o.reverse()),i=function(t,e,n,i){var o={},a=t[1]-t[0],r=o.interval=Yi(a/e,!0);null!=n&&r<n&&(r=o.interval=n),null!=i&&i<r&&(r=o.interval=i);var s=o.intervalPrecision=Cr(r);return kr(o.niceTickExtent=[Dw(Math.ceil(t[0]/r)*r,s),Dw(Math.floor(t[1]/r)*r,s)],t),o}(o,t,e,n),this._intervalPrecision=i.intervalPrecision,this._interval=i.interval,this._niceExtent=i.niceTickExtent)},niceExtent:function(t){var e,n=this._extent;n[0]===n[1]&&(0!==n[0]?(e=n[0],t.fixMax||(n[1]+=e/2),n[0]-=e/2):n[1]=1);var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=Cw(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=Cw(Math.ceil(n[1]/o)*o))}});Lw.create=function(){return new Lw};var kw="__ec_stack_",Pw="undefined"!=typeof Float32Array?Float32Array:Array,Nw={seriesType:"bar",plan:u_(),reset:function(t){if(Vr(t)&&Gr(t)){var e=t.getData(),s=t.coordinateSystem,n=s.getBaseAxis(),l=s.getOtherAxis(n),u=e.mapDimension(l.dim),h=e.mapDimension(n.dim),c=l.isHorizontal(),d=c?0:1,p=zr(Rr([t]),n,t).width;return.5<p||(p=.5),{progress:function(t,e){for(var n,i=new Pw(2*t.count),o=[],a=[],r=0;null!=(n=t.next());)a[d]=e.get(u,n),a[1-d]=e.get(h,n),o=s.dataToPoint(a,null,o),i[r++]=o[0],i[r++]=o[1];e.setLayout({largePoints:i,barWidth:p,valueAxisStart:Fr(0,l),valueAxisHorizontal:c})}}}}},Ow=Lw.prototype,Rw=Math.ceil,Ew=Math.floor,zw=Lw.extend({type:"time",getLabel:function(t){var e=this._stepLvl,n=new Date(t);return oo(e[0],n,this.getSetting("useUTC"))},niceExtent:function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=864e5,n[1]+=864e5),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-864e5),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(n[0]=zi(Ew(n[0]/i)*i)),t.fixMax||(n[1]=zi(Rw(n[1]/i)*i))},niceTicks:function(t,e,n){t=t||10;var i=this._extent,o=i[1]-i[0],a=o/t;null!=e&&a<e&&(a=e),null!=n&&n<a&&(a=n);var r=Bw.length,s=function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(Bw,a,0,r),l=Bw[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Yi(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,c=[Math.round(Rw((i[0]-h)/u)*u+h),Math.round(Ew((i[1]-h)/u)*u+h)];kr(c,i),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Ui(t)}});z(["contain","normalize"],function(e){zw.prototype[e]=function(t){return Ow[e].call(this,this.parse(t))}});var Bw=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];zw.create=function(t){return new zw({useUTC:t.ecModel.get("useUTC")})};var Vw=Ir.prototype,Gw=Lw.prototype,Fw=Gi,Ww=zi,Hw=Math.floor,Zw=Math.ceil,Uw=Math.pow,Xw=Math.log,jw=Ir.extend({type:"log",base:10,$constructor:function(){Ir.apply(this,arguments),this._originalScale=new Lw},getTicks:function(){var n=this._originalScale,i=this._extent,o=n.getExtent();return L(Gw.getTicks.call(this),function(t){var e=zi(Uw(this.base,t)),e=t===i[0]&&n.__fixMin?Wr(e,o[0]):e;return t===i[1]&&n.__fixMax?Wr(e,o[1]):e},this)},getLabel:Gw.getLabel,scale:function(t){return t=Vw.scale.call(this,t),Uw(this.base,t)},setExtent:function(t,e){var n=this.base;t=Xw(t)/Xw(n),e=Xw(e)/Xw(n),Gw.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Vw.getExtent.call(this);e[0]=Uw(t,e[0]),e[1]=Uw(t,e[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(e[0]=Wr(e[0],i[0])),n.__fixMax&&(e[1]=Wr(e[1],i[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Xw(t[0])/Xw(e),t[1]=Xw(t[1])/Xw(e),Vw.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=Xi(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;var o=[zi(Zw(e[0]/i)*i),zi(Hw(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},niceExtent:function(t){Gw.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});z(["contain","normalize"],function(e){jw.prototype[e]=function(t){return t=Xw(t)/Xw(this.base),Vw[e].call(this,t)}}),jw.create=function(){return new jw};var Yw={getMin:function(t){var e=this.option,n=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!m(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(t){var e=this.option,n=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!m(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:x,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},qw=jn({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+o,i+a),t.lineTo(n-o,i+a),t.closePath()}}),Kw=jn({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,a=e.height/2;t.moveTo(n,i-a),t.lineTo(n+o,i),t.lineTo(n,i+a),t.lineTo(n-o,i),t.closePath()}}),$w=jn({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=i-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),p=.6*r,g=.7*r;t.moveTo(n-h,l+s),t.arc(n,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*p,l+s+d*p,n,i-g,n,i),t.bezierCurveTo(n,i-g,n-h+c*p,l+s+d*p,n-h,l+s),t.closePath()}}),Jw=jn({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,a=e.y,r=i/3*2;t.moveTo(o,a),t.lineTo(o+r,a+n),t.lineTo(o,a+n/4*3),t.lineTo(o-r,a+n),t.lineTo(o,a),t.closePath()}}),Qw={line:function(t,e,n,i,o){o.x1=t,o.y1=e+i/2,o.x2=t+n,o.y2=e+i/2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){var a=Math.min(n,i);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},tb={};z({line:wy,rect:_y,roundRect:_y,square:_y,circle:gy,diamond:Kw,pin:$w,arrow:Jw,triangle:qw},function(t,e){tb[e]=new t});var eb=jn({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,n){var i=e.symbolType,o=tb[i];"none"!==e.symbolType&&(o=o||tb[i="rect"],Qw[i](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,n))}}),nb={isDimensionStacked:br,enableDataStack:wr,getStackedDimension:Sr},ib=(Object.freeze||Object)({createList:function(t){return Mr(t.getSource(),t)},getLayoutRect:so,dataStack:nb,createScale:function(t,e){var n=e;ki.isInstance(e)||o(n=new ki(e),Yw);var i=Ur(n);return i.setExtent(t[0],t[1]),Zr(i,n),i},mixinAxisModelCommonMethods:function(t){o(t,Yw)},completeDimensions:xr,createDimensions:Mw,createSymbol:Kr}),ob=1e-8;Qr.prototype={constructor:Qr,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++)"polygon"===r[s].type&&(Cn(r[s].exterior,o,a),tt(n,n,o),et(i,i,a));return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Qt(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i<o;i++)if("polygon"===n[i].type){var a=n[i].exterior,r=n[i].interiors;if(Jr(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(Jr(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=o.width/o.height;n?i=i||n/a:n=a*i;for(var r=new Qt(t,e,n,i),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)Q(h[d],h[d],s);for(var p=0;p<(c?c.length:0);p++)for(d=0;d<c[p].length;d++)Q(c[p][d],c[p][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Qr(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function ab(t){return function(t){if(!t.UTF8Encoding)return;var e=t.UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++)for(var o=n[i].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=ts(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=ts(h,r[s][u],e)}}t.UTF8Encoding=!1}(t),L(I(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,n=t.geometry,i=n.coordinates,o=[];"Polygon"===n.type&&o.push({type:"polygon",exterior:i[0],interiors:i.slice(1)}),"MultiPolygon"===n.type&&z(i,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Qr(e.name,o,e.cp);return a.properties=e,a})}var rb=ln(),sb=[0,1],lb=function(t,e,n){this.dim=t,this.scale=e,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};lb.prototype={constructor:lb,contain:function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return n<=t&&t<=i},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Fi(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var n=this._extent;n[0]=t,n[1]=e},dataToCoord:function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&hs(n=n.slice(),i.count()),Ri(t,sb,n,e)},coordToData:function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&hs(n=n.slice(),i.count());var o=Ri(t,n,sb,e);return this.scale.scale(o)},pointToData:function(){},getTicksCoords:function(t){var e,n,i,o,a,r,s,l,u,h=(t=t||{}).tickModel||this.getTickModel(),c=ns(this,h),d=L(c.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),p=h.get("alignWithLabel");return e=this,n=d,c.tickCategoryInterval,i=p,o=t.clamp,u=n.length,e.onBand&&!i&&u&&(r=e.getExtent(),1===u?(n[0].coord=r[0],a=n[1]={coord:r[0]}):(s=n[1].coord-n[0].coord,z(n,function(t){t.coord-=s/2}),a={coord:n[u-1].coord+s},n.push(a)),l=r[0]>r[1],g(n[0].coord,r[0])&&(o?n[0].coord=r[0]:n.shift()),o&&g(r[0],n[0].coord)&&n.unshift({coord:r[0]}),g(r[1],a.coord)&&(o?a.coord=r[1]:n.pop()),o&&g(a.coord,r[1])&&n.push({coord:r[1]})),d;function g(t,e){return l?e<t:t<e}},getViewLabels:function(){return es(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(t){var e,n,i=(n=(e=t).getLabelModel(),{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),o=Xr(t),a=(i.axisRotate-i.labelRotate)/180*Math.PI,r=t.scale,s=r.getExtent(),l=r.count();if(s[1]-s[0]<1)return 0;var u=1;40<l&&(u=Math.max(1,Math.floor(l/40)));for(var h=s[0],c=t.dataToCoord(h+1)-t.dataToCoord(h),d=Math.abs(c*Math.cos(a)),p=Math.abs(c*Math.sin(a)),g=0,f=0;h<=s[1];h+=u)var m=pe(o(h),i.font,"center","top"),v=1.3*m.width,y=1.3*m.height,g=Math.max(g,v,7),f=Math.max(f,y,7);var x=g/d,_=f/p;isNaN(x)&&(x=1/0),isNaN(_)&&(_=1/0);var w=Math.max(0,Math.floor(Math.min(x,_))),b=rb(t.model),S=b.lastAutoInterval,M=b.lastTickCount;return null!=S&&null!=M&&Math.abs(S-w)<=1&&Math.abs(M-l)<=1&&w<S?w=S:(b.lastTickCount=l,b.lastAutoInterval=w),w}(this)}};var ub=ab,hb={};z(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){hb[t]=ff[t]});var cb={};z(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){cb[t]=Ey[t]}),r_.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(){return Mr(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var db=ds.prototype,pb=ds.getSymbolSize=function(t,e){var n=t.getItemVisual(e,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};db._createSymbol=function(t,e,n,i,o){this.removeAll();var a=Kr(t,-1,-1,2,2,e.getItemVisual(n,"color"),o);a.attr({z2:100,culling:!0,scale:ps(i)}),a.drift=gs,this._symbolType=t,this.add(a)},db.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},db.getSymbolPath=function(){return this.childAt(0)},db.getScale=function(){return this.childAt(0).scale},db.highlight=function(){this.childAt(0).trigger("emphasis")},db.downplay=function(){this.childAt(0).trigger("normal")},db.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},db.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},db.updateData=function(t,e,n){this.silent=!1;var i,o,a,r,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=pb(t,e),h=s!==this._symbolType;h?(i=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,i)):((o=this.childAt(0)).silent=!1,Si(o,{scale:ps(u)},l,e)),this._updateCommon(t,e,u,n),h&&(o=this.childAt(0),a=n&&n.fadeIn,r={scale:o.scale.slice()},a&&(r.style={opacity:o.style.opacity}),o.scale=[0,0],a&&(o.style.opacity=0),Mi(o,r,l,e)),this._seriesModel=l};var gb=["itemStyle"],fb=["emphasis","itemStyle"],mb=["label"],vb=["emphasis","label"];db._updateCommon=function(e,t,n,i){var o=this.childAt(0),a=e.hostModel,r=e.getItemVisual(t,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var s,l=i&&i.itemStyle,u=i&&i.hoverItemStyle,h=i&&i.symbolRotate,c=i&&i.symbolOffset,d=i&&i.labelModel,p=i&&i.hoverLabelModel,g=i&&i.hoverAnimation,f=i&&i.cursorStyle;!i||e.hasItemOption?(l=(s=i&&i.itemModel?i.itemModel:e.getItemModel(t)).getModel(gb).getItemStyle(["color"]),u=s.getModel(fb).getItemStyle(),h=s.getShallow("symbolRotate"),c=s.getShallow("symbolOffset"),d=s.getModel(mb),p=s.getModel(vb),g=s.getShallow("hoverAnimation"),f=s.getShallow("cursor")):u=P({},u);var m=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Ei(c[0],n[0]),Ei(c[1],n[1])]),f&&o.attr("cursor",f),o.setColor(r,i&&i.symbolInnerColor),o.setStyle(l);var v=e.getItemVisual(t,"opacity");null!=v&&(m.opacity=v);var y=e.getItemVisual(t,"liftZ"),x=o.__z2Origin;null!=y?null==x&&(o.__z2Origin=o.z2,o.z2+=y):null!=x&&(o.z2=x,o.__z2Origin=null);var _=i&&i.useNameLabel;gi(m,u,d,p,{labelFetcher:a,labelDataIndex:t,defaultText:function(t){return _?e.getName(t):cs(e,t)},isRectText:!0,autoColor:r}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,di(o),o.__symbolOriginalScale=ps(n),g&&a.isAnimationEnabled()&&o.on("mouseover",fs).on("mouseout",ms).on("emphasis",vs).on("normal",ys)},db.fadeOut=function(t,e){var n=this.childAt(0);this.silent=n.silent=!0,e&&e.keepLabel||(n.style.text=null),Si(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},a(ds,rm);var yb=xs.prototype;yb.updateData=function(o,a){a=ws(a);var r=this.group,s=o.hostModel,l=this._data,u=this._symbolCtor,h=bs(o);l||r.removeAll(),o.diff(l).add(function(t){var e,n=o.getItemLayout(t);_s(o,n,t,a)&&((e=new u(o,t,h)).attr("position",n),o.setItemGraphicEl(t,e),r.add(e))}).update(function(t,e){var n=l.getItemGraphicEl(e),i=o.getItemLayout(t);_s(o,i,t,a)?(n?(n.updateData(o,t,h),Si(n,{position:i},s)):(n=new u(o,t)).attr("position",i),r.add(n),o.setItemGraphicEl(t,n)):r.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){r.remove(e)})}).execute(),this._data=o},yb.isPersistent=function(){return!0},yb.updateLayout=function(){var i=this._data;i&&i.eachItemGraphicEl(function(t,e){var n=i.getItemLayout(e);t.attr("position",n)})},yb.incrementalPrepareUpdate=function(t){this._seriesScope=bs(t),this._data=null,this.group.removeAll()},yb.incrementalUpdate=function(t,e,n){n=ws(n);for(var i=t.start;i<t.end;i++){var o,a=e.getItemLayout(i);_s(e,a,i,n)&&((o=new this._symbolCtor(e,i,this._seriesScope)).traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),o.attr("position",a),this.group.add(o),e.setItemGraphicEl(i,o))}},yb.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var xb=tt,_b=et,wb=Z,bb=S,Sb=[],Mb=[],Ib=[],Tb=Vn.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:dy(Vn.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,o=n.length,a=As(n,e.smoothConstraint);if(e.connectNulls){for(;0<o&&Is(n[o-1]);o--);for(;i<o&&Is(n[i]);i++);}for(;i<o;)i+=Ts(t,n,i,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Ab=Vn.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:dy(Vn.prototype.brush),buildPath:function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,a=n.length,r=e.smoothMonotone,s=As(n,e.smoothConstraint),l=As(i,e.smoothConstraint);if(e.connectNulls){for(;0<a&&Is(n[a-1]);a--);for(;o<a&&Is(n[o]);o++);}for(;o<a;){var u=Ts(t,n,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);Ts(t,i,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});ea.extend({type:"line",init:function(){var t=new rm,e=new xs;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,f=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],o=0,a=e.count();o<a;o++)i.push(Ms(n,t,e,o));return i}(i,a,Ss(i,a,v)),x=t.get("showSymbol"),_=x&&!u&&Ns(t,a,i),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(g);var b=!u&&t.get("step");d&&h.type===i.type&&b===this._step?(m&&!p?p=this._newPolygon(l,y,i,f):p&&!m&&(g.remove(p),p=this._polygon=null),g.setClipPath(ks(i,!1,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:ks(i,!1,!0,t)}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Ds(this._stackedOnPoints,y)&&Ds(this._points,l)||(f?this._updateAnimation(a,y,i,n,b,v):(b&&(l=Ps(l,i,b),y=Ps(y,i,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:ks(i,!1,!0,t)}),b&&(l=Ps(l,i,b),y=Ps(y,i,b)),d=this._newPolyline(l,i,f),m&&(p=this._newPolygon(l,y,i,f)),g.setClipPath(ks(i,!0,!1,t)));var S=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,o,a=n.length-1;0<=a;a--){var r=n[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){o=n[a];break}}if(o){var u=e.getAxis(i),h=L(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var p=h[0].coord-10,g=h[c-1].coord+10,f=g-p;if(f<.001)return"transparent";z(h,function(t){t.offset=(t.coord-p)/f}),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 m=new Ty(0,0,0,0,h,!0);return m[i]=p,m[i+"2"]=g,m}}}(a,i)||a.getVisual("color");d.useStyle(O(r.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var M,I,T=t.get("smooth"),T=Cs(t.get("smooth"));d.setShape({smooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p&&(M=a.getCalculationInfo("stackedOnSeries"),I=0,p.useStyle(O(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),M&&(I=Cs(M.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})),this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=b,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=sn(o,i);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new ds(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else ea.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=sn(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):ea.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Tb({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Ab({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,o,a,r,s){for(var l,u,h=(l=t,u=[],e.diff(l).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),c=[],d=[],p=[],g=[],f=[],m=[],v=[],y=Ss(o,e,r),x=Ss(a,t,s),_=0;_<h.length;_++){var w=h[_],b=!0;switch(w.cmd){case"=":var S=t.getItemLayout(w.idx),M=e.getItemLayout(w.idx1);(isNaN(S[0])||isNaN(S[1]))&&(S=M.slice()),c.push(S),d.push(M),p.push(n[w.idx]),g.push(i[w.idx1]),v.push(e.getRawIndex(w.idx1));break;case"+":I=w.idx,c.push(o.dataToPoint([e.get(y.dataDimsForPoint[0],I),e.get(y.dataDimsForPoint[1],I)])),d.push(e.getItemLayout(I).slice()),p.push(Ms(y,o,e,I)),g.push(i[I]),v.push(e.getRawIndex(I));break;case"-":var I=w.idx,T=t.getRawIndex(I);T!==I?(c.push(t.getItemLayout(I)),d.push(a.dataToPoint([t.get(x.dataDimsForPoint[0],I),t.get(x.dataDimsForPoint[1],I)])),p.push(n[I]),g.push(Ms(x,a,t,I)),v.push(T)):b=!1}b&&(f.push(w),m.push(m.length))}m.sort(function(t,e){return v[t]-v[e]});for(var A=[],D=[],C=[],L=[],k=[],_=0;_<m.length;_++)I=m[_],A[_]=c[I],D[_]=d[I],C[_]=p[I],L[_]=g[I],k[_]=f[I];return{current:A,next:D,stackedOnCurrent:C,stackedOnNext:L,status:k}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,p=u.stackedOnNext;o&&(h=Ps(u.current,n,o),c=Ps(u.stackedOnCurrent,n,o),d=Ps(u.next,n,o),p=Ps(u.stackedOnNext,n,o)),r.shape.__points=u.current,r.shape.points=h,Si(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Si(s,{shape:{points:d,stackedOnPoints:p}},l));for(var g,f=[],m=u.status,v=0;v<m.length;v++){"="!==m[v].cmd||(g=t.getItemGraphicEl(m[v].idx1))&&f.push({el:g,ptIdx:v})}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<f.length;t++)f[t].el.attr("position",r.shape.__points[f[t].ptIdx])})},remove:function(){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});function Db(t,a,r){return{seriesType:t,performRawSeries:!0,reset:function(l,t){var e=l.getData(),n=l.get("symbol")||a,u=l.get("symbolSize"),i=l.get("symbolKeepAspect");if(e.setVisual({legendSymbol:r||n,symbol:n,symbolSize:u,symbolKeepAspect:i}),!t.isSeriesFiltered(l)){var o="function"==typeof u;return{dataEach:e.hasItemOption||o?function(t,e){var n,i,o,a,r,s;"function"==typeof u&&(n=l.getRawValue(e),i=l.getDataParams(e),t.setItemVisual(e,"symbolSize",u(n,i))),t.hasItemOption&&(a=(o=t.getItemModel(e)).getShallow("symbol",!0),r=o.getShallow("symbolSize",!0),s=o.getShallow("symbolKeepAspect",!0),null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s))}:null}}}}}function Cb(t){return{seriesType:t,plan:u_(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var p=L(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),g=p.length,n=e.getCalculationInfo("stackResultDimension");return br(e,p[0])&&(p[0]=n),br(e,p[1])&&(p[1]=n),g&&{progress:function(t,e){for(var n,i,o,a=t.end-t.start,r=d&&new Float32Array(a*g),s=t.start,l=0,u=[],h=[];s<t.end;s++){o=1===g?(n=e.get(p[0],s),!isNaN(n)&&c.dataToPoint(n,null,h)):(n=u[0]=e.get(p[0],s),i=u[1]=e.get(p[1],s),!isNaN(n)&&!isNaN(i)&&c.dataToPoint(u,null,h)),d?(r[l++]=o?o[0]:NaN,r[l++]=o?o[1]:NaN):e.setItemLayout(s,o&&o.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",r)}}}}}}function Lb(t){return Math.round(t.length/2)}function kb(t){this._axes={},this._dimList=[],this.name=t||""}var Pb={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};kb.prototype={constructor:kb,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return L(this._dimList,Os,this)},getAxesByScale:function(e){return e=e.toLowerCase(),I(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var n=this._dimList,i=t instanceof Array?[]:{},o=0;o<n.length;o++){var a=n[o],r=this._axes[a];i[a]=r[e](t[a])}return i}},Rs.prototype={constructor:Rs,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,n){var i=this.getAxis("x"),o=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(t[0])),n[1]=o.toGlobalCoord(o.dataToCoord(t[1])),n},clampData:function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),a=i.getExtent(),r=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var n=this.getAxis("x"),i=this.getAxis("y");return(e=e||[])[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},a(Rs,kb);function Nb(t,e,n,i,o){lb.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom"}Nb.prototype={constructor:Nb,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},a(Nb,lb);var Ob={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)"]}}},Rb={};Rb.categoryAxis=v({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Ob),Rb.valueAxis=v({boundaryGap:[0,0],splitNumber:5},Ob),Rb.timeAxis=O({scale:!0,min:"dataMin",max:"dataMax"},Rb.valueAxis),Rb.logAxis=O({scale:!0,logBase:10},Rb.valueAxis);function Eb(a,t,r,e){z(zb,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?ho(t):{};v(t,e.getTheme().get(o+"Axis")),v(t,this.getDefaultOption()),t.type=r(a,t),n&&uo(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Tr.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:h([{},Rb[o+"Axis"],e],!0)})}),ux.registerSubTypeDefaulter(a+"Axis",E(r,a))}var zb=["value","category","time","log"],Bb=ux.extend({type:"cartesian2dAxis",axis:null,init:function(){Bb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Bb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Bb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});v(Bb.prototype,Yw);var Vb={offset:0};Eb("x",Bb,Es,Vb),Eb("y",Bb,Es,Vb),ux.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 Gb=Bs.prototype;Gb.type="grid",Gb.axisPointerEnabled=!0,Gb.getRect=function(){return this._rect},Gb.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),z(n.x,function(t){Zr(t.scale,t.model)}),z(n.y,function(t){Zr(t.scale,t.model)});var i={};z(n.x,function(t){Vs(n,"y",t,i)}),z(n.y,function(t){Vs(n,"x",t,i)}),this.resize(this.model,e)},Gb.resize=function(t,e,n){function i(){z(o,function(t){var e,n,i,o,a=t.isHorizontal(),r=a?[0,l.width]:[0,l.height],s=t.inverse?1:0;t.setExtent(r[s],r[1-s]),e=t,n=a?l.x:l.y,i=e.getExtent(),o=i[0]+i[1],e.toGlobalCoord="x"===e.dim?function(t){return t+n}:function(t){return o-t+n},e.toLocalCoord="x"===e.dim?function(t){return t-n}:function(t){return o-t+n}})}var l=so(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=l;var o=this._axesList;i(),!n&&t.get("containLabel")&&(z(o,function(t){var e,n,i;t.model.get("axisLabel.inside")||(e=Yr(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get("axisLabel.margin"),l[n]-=e[n]+i,"top"===t.position?l.y+=e.height+i:"left"===t.position&&(l.x+=e.width+i))}),i())},Gb.getAxis=function(t,e){var n=this._axesMap[t];if(null!=n){if(null==e)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[e]}},Gb.getAxes=function(){return this._axesList.slice()},Gb.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}B(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},Gb.getCartesians=function(){return this._coordsList.slice()},Gb.convertToPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},Gb.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(t,e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},Gb._findConvertTarget=function(t,e){var n,i,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;return o?M(l,n=o.coordinateSystem)<0&&(n=null):a&&r?n=this.getCartesian(a.componentIndex,r.componentIndex):a?i=this.getAxis("x",a.componentIndex):r?i=this.getAxis("y",r.componentIndex):s&&s.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:i}},Gb.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Gb._initCartesian=function(r,t,e){function n(a){return function(t,e){var n,i,o;zs(t,r)&&(n=t.get("position"),"x"===a?"top"!==n&&"bottom"!==n&&s[n="bottom"]&&(n="top"===n?"bottom":"top"):"left"!==n&&"right"!==n&&s[n="left"]&&(n="left"===n?"right":"left"),s[n]=!0,o="category"===(i=new Nb(a,Ur(t),[0,0],t.get("type"),n)).type,i.onBand=o&&t.get("boundaryGap"),i.inverse=t.get("inverse"),(t.axis=i).model=t,i.grid=this,i.index=e,this._axesList.push(i),l[a][e]=i,u[a]++)}}var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);z((this._axesMap=l).x,function(o,a){z(l.y,function(t,e){var n="x"+a+"y"+e,i=new Rs(n);i.grid=this,i.model=r,this._coordsMap[n]=i,this._coordsList.push(i),i.addAxis(o),i.addAxis(t)},this)},this)},Gb._updateScale=function(t,l){function u(e,n){z(e.mapDimension(n.dim,!0),function(t){n.scale.unionExtentFromData(e,Sr(e,t))})}z(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){if(Ws(t)){var e=Fs(t),n=e[0],i=e[1];if(!zs(n,l)||!zs(i,l))return;var o=this.getCartesian(n.componentIndex,i.componentIndex),a=t.getData(),r=o.getAxis("x"),s=o.getAxis("y");"list"===a.type&&(u(a,r),u(a,s))}},this)},Gb.getTooltipAxes=function(i){var o=[],a=[];return z(this.getCartesians(),function(t){var e=null!=i&&"auto"!==i?t.getAxis(i):t.getBaseAxis(),n=t.getOtherAxis(e);M(o,e)<0&&o.push(e),M(a,n)<0&&a.push(n)}),{baseAxes:o,otherAxes:a}};var Fb=["xAxis","yAxis"];Bs.create=function(i,o){var a=[];return i.eachComponent("grid",function(t,e){var n=new Bs(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){var e,n,i,o;Ws(t)&&(n=(e=Fs(t))[0],i=e[1],o=n.getCoordSysModel().coordinateSystem,t.coordinateSystem=o.getCartesian(n.componentIndex,i.componentIndex))}),a},Bs.dimensions=Bs.prototype.dimensions=Rs.prototype.dimensions,Mo.register("cartesian2d",Bs);function Wb(t,e){this.opt=e,this.axisModel=t,O(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new rm;var n=new rm({position:e.position.slice(),rotation:e.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n}var Hb=Math.PI;Wb.prototype={constructor:Wb,hasBuilder:function(t){return!!Zb[t]},add:function(t){Zb[t].call(this)},getGroup:function(){return this.group}};var Zb={axisLine:function(){var t,e,a,n,r,s,i,o,l,u,h=this.opt,c=this.axisModel;c.get("axisLine.show")&&(t=this.axisModel.axis.getExtent(),e=this._transform,a=[t[0],0],n=[t[1],0],e&&(Q(a,a,e),Q(n,n,e)),r=P({lineCap:"round"},c.getModel("axisLine.lineStyle").getLineStyle()),this.group.add(new wy(Jn({anid:"line",shape:{x1:a[0],y1:a[1],x2:n[0],y2:n[1]},style:r,strokeContainThreshold:h.strokeContainThreshold||5,silent:!0,z2:1}))),s=c.get("axisLine.symbol"),i=c.get("axisLine.symbolSize"),"number"==typeof(o=c.get("axisLine.symbolOffset")||0)&&(o=[o,o]),null!=s&&("string"==typeof s&&(s=[s,s]),"string"!=typeof i&&"number"!=typeof i||(i=[i,i]),l=i[0],u=i[1],z([{rotate:h.rotation+Math.PI/2,offset:o[0],r:0},{rotate:h.rotation-Math.PI/2,offset:o[1],r:Math.sqrt((a[0]-n[0])*(a[0]-n[0])+(a[1]-n[1])*(a[1]-n[1]))}],function(t,e){var n,i,o;"none"!==s[e]&&null!=s[e]&&(n=Kr(s[e],-l/2,-u/2,l,u,r.stroke,!0),i=t.r+t.offset,o=[a[0]+i*Math.cos(h.rotation),a[1]-i*Math.sin(h.rotation)],n.attr({rotation:t.rotate,position:o,silent:!0}),this.group.add(n))},this)))},axisTickLabel:function(){var t=this.axisModel,e=this.opt,n=function(t,e,n){var i=e.axis;if(e.get("axisTick.show")&&!i.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),r=o.get("length"),s=i.getTicksCoords(),l=[],u=[],h=t._transform,c=[],d=0;d<s.length;d++){var p=s[d].coord;l[0]=p,u[l[1]=0]=p,u[1]=n.tickDirection*r,h&&(Q(l,l,h),Q(u,u,h));var g=new wy(Jn({anid:"tick_"+s[d].tickValue,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:O(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(g),c.push(g)}return c}}(this,t,e);!function(t,e,n){var i=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");n=n||[];var a=(e=e||[])[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],h=n[1],c=n[n.length-1],d=n[n.length-2];!1===i?(Us(a),Us(u)):Xs(a,r)&&(i?(Us(r),Us(h)):(Us(a),Us(u))),!1===o?(Us(s),Us(c)):Xs(l,s)&&(o?(Us(l),Us(d)):(Us(s),Us(c)))}(t,function(u,h,c){var d=h.axis;if(V(c.axisLabelShow,h.get("axisLabel.show"))&&!d.scale.isBlank()){var p=h.getModel("axisLabel"),g=p.get("margin"),t=d.getViewLabels(),e=(V(c.labelRotate,p.get("rotate"))||0)*Hb/180,f=Ub(c.rotation,e,c.labelDirection),m=h.getCategories(!0),v=[],y=Zs(h),x=h.get("triggerEvent");return z(t,function(t,e){var n=t.tickValue,i=t.formattedLabel,o=t.rawLabel,a=p;m&&m[n]&&m[n].textStyle&&(a=new ki(m[n].textStyle,p,h.ecModel));var r=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(n),c.labelOffset+c.labelDirection*g],l=new cy({anid:"label_"+n,position:s,rotation:f.rotation,silent:y,z2:10});fi(l.style,a,{text:i,textAlign:a.getShallow("align",!0)||f.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||f.textVerticalAlign,textFill:"function"==typeof r?r("category"===d.type?o:"value"===d.type?n+"":n,e):r}),x&&(l.eventData=Hs(h),l.eventData.targetType="axisLabel",l.eventData.value=o),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}}(this,t,e),n)},axisName:function(){var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I,T=this.opt,A=this.axisModel,D=V(T.axisName,A.get("name"));D&&(e=A.get("nameLocation"),n=T.nameDirection,i=A.getModel("nameTextStyle"),o=A.get("nameGap")||0,r=(a=this.axisModel.axis.getExtent())[0]>a[1]?-1:1,s=["start"===e?a[0]-r*o:"end"===e?a[1]+r*o:(a[0]+a[1])/2,js(e)?T.labelOffset+n*o:0],null!=(l=A.get("nameRotate"))&&(l=l*Hb/180),js(e)?t=Ub(T.rotation,null!=l?l:T.rotation,n):(x=e,_=a,b=Hi((l||0)-T.rotation),S=_[0]>_[1],M="start"===x&&!S||"start"!==x&&S,I=Zi(b-Hb/2)?(w=M?"bottom":"top","center"):Zi(b-1.5*Hb)?(w=M?"top":"bottom","center"):(w="middle",b<1.5*Hb&&Hb/2<b?M?"left":"right":M?"right":"left"),t={rotation:b,textAlign:I,textVerticalAlign:w},null!=(u=T.axisNameAvailableWidth)&&(u=Math.abs(u/Math.sin(t.rotation)),isFinite(u)||(u=null))),h=i.getFont(),d=(c=A.get("nameTruncate",!0)||{}).ellipsis,p=V(T.nameTruncateMaxWidth,c.maxWidth,u),g=null!=d&&null!=p?ex(D,p,h,d,{minChar:2,placeholder:c.placeholder}):D,f=A.get("tooltip",!0),(v={componentType:m=A.mainType,name:D,$vars:["name"]})[m+"Index"]=A.componentIndex,fi((y=new cy({anid:"name",__fullText:D,__truncatedText:g,position:s,rotation:t.rotation,silent:Zs(A),z2:1,tooltip:f&&f.show?P({content:D,formatter:function(){return D},formatterParams:v},f):null})).style,i,{text:g,textFont:h,textFill:i.getTextColor()||A.get("axisLine.lineStyle.color"),textAlign:t.textAlign,textVerticalAlign:t.textVerticalAlign}),A.get("triggerEvent")&&(y.eventData=Hs(A),y.eventData.targetType="axisName",y.eventData.name=D),this._dumbGroup.add(y),y.updateTransform(),this.group.add(y),y.decomposeTransform())}},Ub=Wb.innerTextLayout=function(t,e,n){var i,o=Hi(e-t),a=Zi(o)?(i=0<n?"top":"bottom","center"):Zi(o-Hb)?(i=0<n?"bottom":"top","center"):(i="middle",0<o&&o<Hb?0<n?"right":"left":0<n?"left":"right");return{rotation:o,textAlign:a,textVerticalAlign:i}},Xb=z,jb=E,Yb=ir({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,n,i){var o,a,r,s,l,u,h,c;this.axisPointerClass&&(c=Ks(t))&&(o=c.axisPointerModel,a=c.axis.scale,r=o.option,s=o.get("status"),null!=(l=o.get("value"))&&(l=a.parse(l)),u=$s(o),null==s&&(r.status=u?"show":"hide"),(h=a.getExtent().slice())[0]>h[1]&&h.reverse(),(null==l||l>h[1])&&(l=h[1]),l<h[0]&&(l=h[0]),r.value=l,u&&(r.status=c.axis.scale.isBlank()?"hide":"show")),Yb.superApply(this,"render",arguments),Qs(this,t,0,n,0,!0)},updateAxisPointer:function(t,e,n){Qs(this,t,0,n,0,!1)},remove:function(t,e){var n=this._axisPointer;n&&n.remove(e),Yb.superApply(this,"remove",arguments)},dispose:function(t,e){tl(this,e),Yb.superApply(this,"dispose",arguments)}}),qb=[];Yb.registerAxisPointerClass=function(t,e){qb[t]=e},Yb.getAxisPointerClass=function(t){return t&&qb[t]};var Kb=["axisLine","axisTickLabel","axisName"],$b=["splitArea","splitLine"],Jb=Yb.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var o,a,r,s=this._axisGroup;this._axisGroup=new rm,this.group.add(this._axisGroup),e.get("show")&&(a=el(o=e.getCoordSysModel(),e),r=new Wb(e,a),z(Kb,r.add,r),this._axisGroup.add(r.getGroup()),z($b,function(t){e.get(t+".show")&&this["_"+t](e,o)},this),Di(s,this._axisGroup,e),Jb.superCall(this,"render",e,t,n,i))},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var n=t.axis;if(!n.scale.isBlank())for(var i=t.getModel("splitLine"),o=i.getModel("lineStyle"),a=N(a=o.get("color"))?a:[a],r=e.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),h=[],c=[],d=o.getLineStyle(),p=0;p<u.length;p++){var g=n.toGlobalCoord(u[p].coord);s?(h[0]=g,h[1]=r.y,c[0]=g,c[1]=r.y+r.height):(h[0]=r.x,h[1]=g,c[0]=r.x+r.width,c[1]=g);var f=l++%a.length,m=u[p].tickValue;this._axisGroup.add(new wy(Jn({anid:null!=m?"line_"+u[p].tickValue:null,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:O({stroke:a[f]},d),silent:!0})))}},_splitArea:function(t,e){var n=t.axis;if(!n.scale.isBlank()){var i=t.getModel("splitArea"),o=i.getModel("areaStyle"),a=o.get("color"),r=e.coordinateSystem.getRect(),s=n.getTicksCoords({tickModel:i,clamp:!0});if(s.length){var l=a.length,u=this._splitAreaColors,h=C(),c=0;if(u)for(f=0;f<s.length;f++){var d=u.get(s[f].tickValue);if(null!=d){c=(d+(l-1)*f)%l;break}}for(var p=n.toGlobalCoord(s[0].coord),g=o.getAreaStyle(),a=N(a)?a:[a],f=1;f<s.length;f++){var m,v,y,x,_=n.toGlobalCoord(s[f].coord),p=n.isHorizontal()?(m=p,v=r.y,y=_-m,x=r.height,m+y):(m=r.x,v=p,y=r.width,v+(x=_-v)),w=s[f-1].tickValue;null!=w&&h.set(w,c),this._axisGroup.add(new _y({anid:null!=w?"area_"+w:null,shape:{x:m,y:v,width:y,height:x},style:O({fill:a[c]},g),silent:!0})),c=(c+1)%l}this._splitAreaColors=h}}}});Jb.extend({type:"xAxis"}),Jb.extend({type:"yAxis"}),ir({type:"grid",render:function(t){this.group.removeAll(),t.get("show")&&this.group.add(new _y({shape:t.coordinateSystem.getRect(),style:O({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Ya(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Qa(Db("line","circle","line")),Ja(Cb("line")),qa(j_.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t){var e,n,i,o,a,r,s=t.getData(),l=t.get("sampling"),u=t.coordinateSystem;"cartesian2d"===u.type&&l&&(e=u.getBaseAxis(),n=u.getOtherAxis(e),o=(i=e.getExtent())[1]-i[0],1<(a=Math.round(s.count()/o))&&("string"==typeof l?r=Pb[l]:"function"==typeof l&&(r=l),r&&t.setData(s.downSample(s.mapDimension(n.dim),1/a,r,Lb))))}});var Qb=r_.extend({type:"series.__base_bar__",getInitialData:function(){return Mr(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),o=i.getLayout("offset"),a=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});Qb.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t}});var tS=Ym([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),eS=["itemStyle","barBorderWidth"];P(ki.prototype,{getBarItemStyle:function(t){var e,n=tS(this,t);return!this.getBorderLineDash||(e=this.getBorderLineDash())&&(n.lineDash=e),n}}),ar({type:"bar",render:function(t,e,n){this._updateDrawMode(t);var i=t.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n)),this.group},incrementalPrepareRender:function(t){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(a){var r,s=this.group,l=a.getData(),u=this._data,h=a.coordinateSystem,t=h.getBaseAxis();"cartesian2d"===h.type?r=t.isHorizontal():"polar"===h.type&&(r="angle"===t.dim);var c=a.isAnimationEnabled()?a:null;l.diff(u).add(function(t){var e,n,i;l.hasValue(t)&&(e=l.getItemModel(t),n=iS[h.type](l,t,e),i=nS[h.type](l,t,e,n,r,c),l.setItemGraphicEl(t,i),s.add(i),rl(i,l,t,e,n,a,r,"polar"===h.type))}).update(function(t,e){var n,i,o=u.getItemGraphicEl(e);l.hasValue(t)?(n=l.getItemModel(t),i=iS[h.type](l,t,n),o?Si(o,{shape:i},c,t):o=nS[h.type](l,t,n,i,r,c,!0),l.setItemGraphicEl(t,o),s.add(o),rl(o,l,t,n,i,a,r,"polar"===h.type)):s.remove(o)}).remove(function(t){var e=u.getItemGraphicEl(t);"cartesian2d"===h.type?e&&ol(t,c,e):e&&al(t,c,e)}).execute(),this._data=l},_renderLarge:function(t){this._clear(),sl(t,this.group)},_incrementalRenderLarge:function(t,e){sl(e,this.group,!0)},dispose:x,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?n.eachItemGraphicEl(function(t){("sector"===t.type?al:ol)(t.dataIndex,e,t)}):t.removeAll(),this._data=null}});var nS={cartesian2d:function(t,e,n,i,o,a,r){var s,l,u=new _y({shape:P({},i)});return a&&(s=o?"height":"width",l={},u.shape[s]=0,l[s]=i[s],Ey[r?"updateProps":"initProps"](u,{shape:l},a,e)),u},polar:function(t,e,n,i,o,a,r){var s,l,u=i.startAngle<i.endAngle,h=new my({shape:O({clockwise:u},i)});return a&&(s=o?"r":"endAngle",l={},h.shape[s]=o?0:i.startAngle,l[s]=i[s],Ey[r?"updateProps":"initProps"](h,{shape:l},a,e)),h}},iS={cartesian2d:function(t,e,n){var i,o,a=t.getItemLayout(e),r=(i=a,o=n.get(eS)||0,Math.min(o,Math.abs(i.width),Math.abs(i.height))),s=0<a.width?1:-1,l=0<a.height?1:-1;return{x:a.x+s*r/2,y:a.y+l*r/2,width:a.width-s*r,height:a.height-l*r}},polar:function(t,e){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},oS=Vn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__valueIdx,a=0;a<n.length;a+=2)i[this.__valueIdx]=n[a+o],t.moveTo(i[0],i[1]),t.lineTo(n[a],n[a+1])}});Ja(E(Br,"bar")),Ja(Nw),Qa({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});function aS(t,e,n){e=N(e)?{coordDimensions:e}:P({},e);var i=t.getSource(),o=Mw(i,e),a=new gw(o,t);return a.initData(i,n),a}var rS={updateSelectedMap:function(t){this._targetList=N(t)?t.slice():[],this._selectTargetMap=b(t||[],function(t,e){return t.set(e.name,e),t},C())},select:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),n&&(n.selected=!0)},unSelect:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);n&&(n.selected=!1)},toggleSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=n)return this[n.selected?"unSelect":"select"](t,e),n.selected},isSelected:function(t,e){var n=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return n&&n.selected}},sS=or({type:"series.pie",init:function(t){sS.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){sS.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return aS(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,o=t.count();i<o;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Zo(t,i,"selected")});return n},getDataParams:function(t){var e=this.getData(),n=sS.superCall(this,"getDataParams",t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=Wi(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(t){tn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.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,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{rotate:!1,show:!0,position:"outer"},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationEasing:"cubicOut"}});o(sS,rS);var lS=hl.prototype;lS.updateData=function(t,e,n){function i(){a.stopAnimation(!0),a.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut")}function o(){a.stopAnimation(!0),a.animateTo({shape:{r:l.r}},300,"elasticOut")}var a=this.childAt(0),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=P({},l);u.label=null,n?(a.setShape(u),"scale"===r.getShallow("animationType")?(a.shape.r=l.r0,Mi(a,{shape:{r:l.r}},r,e)):(a.shape.endAngle=l.startAngle,Si(a,{shape:{endAngle:l.endAngle}},r,e))):Si(a,{shape:u},r,e);var h=t.getItemVisual(e,"color");a.useStyle(O({lineJoin:"bevel",fill:h},s.getModel("itemStyle").getItemStyle())),a.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var c=s.getShallow("cursor");c&&a.attr("cursor",c),ul(this,t.getItemLayout(e),r.isSelected(null,e),r.get("selectedOffset"),r.get("animation")),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),s.get("hoverAnimation")&&r.isAnimationEnabled()&&a.on("mouseover",i).on("mouseout",o).on("emphasis",i).on("normal",o),this._updateLabel(t,e),di(this)},lS._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Si(n,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},o,e),Si(i,{style:{x:r.x,y:r.y}},o,e),i.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");gi(i.style,i.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!h.get("show"),n.hoverIgnore=!c.get("show"),n.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(h.getModel("lineStyle").getLineStyle()),n.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=h.get("smooth");d&&!0===d&&(d=.4),n.setShape({smooth:d})},a(hl,rm),ea.extend({type:"pie",init:function(){var t=new rm;this._sectorGroup=t},render:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g;i&&i.from===this.uid||(o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=E(ll,this.uid,t,s,n),c=t.get("selectedMode"),o.diff(a).add(function(t){var e=new hl(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",h),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var n=a.getItemGraphicEl(e);n.updateData(o,t),n.off("click"),c&&n.on("click",h),r.add(n),o.setItemGraphicEl(t,n)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&l&&0<o.count()&&"scale"!==u?(d=o.getItemLayout(0),p=Math.max(n.getWidth(),n.getHeight())/2,g=k(r.removeClipPath,r),r.setClipPath(this._createClipPath(d.cx,d.cy,p,d.startAngle,d.clockwise,g,t))):r.removeClipPath(),this._data=o)},dispose:function(){},_createClipPath:function(t,e,n,i,o,a,r){var s=new my({shape:{cx:t,cy:e,r0:0,r:n,startAngle:i,endAngle:i,clockwise:o}});return Mi(s,{shape:{endAngle:i+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(i*i+o*o);return a<=n.r&&a>=n.r0}}});function uS(n,t){z(t,function(a){a.update="updateView",Ka(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:n,query:t},function(n){n[a.method]&&n[a.method](t.name,t.dataIndex);var i=n.getData();i.each(function(t){var e=i.getName(t);o[e]=n.isSelected(e)||!1})}),{name:t.name,selected:o}})})}function hS(i){return{getTargetSeries:function(t){var e={},n=C();return t.eachSeriesByType(i,function(t){t.__paletteScope=e,n.set(t.uid,t)}),n},reset:function(o){var a=o.getRawData(),r={},s=o.getData();s.each(function(t){var e=s.getRawIndex(t);r[e]=t}),a.each(function(t){var e,n=r[t],i=null!=n&&s.getItemVisual(n,"color",!0);i?a.setItemVisual(t,"color",i):(e=a.getItemModel(t).get("itemStyle.color")||o.getColorFromPalette(a.getName(t)||t+"",o.__paletteScope,a.count()),a.setItemVisual(t,"color",e),null!=n&&s.setItemVisual(n,"color",e))})}}}function cS(M,I,t,e){var T,A,D=M.getData(),C=[],L=!1;D.each(function(t){var e=D.getItemLayout(t),n=D.getItemModel(t),i=n.getModel("label"),o=i.get("position")||n.get("emphasis.label.position"),a=n.getModel("labelLine"),r=a.get("length"),s=a.get("length2"),l=(e.startAngle+e.endAngle)/2,u=Math.cos(l),h=Math.sin(l);T=e.cx,A=e.cy;var c,d,p,g,f,m,v,y,x="inside"===o||"inner"===o,_="center"===o?(m=e.cx,v=e.cy,"center"):(m=(c=(x?(e.r+e.r0)/2*u:e.r*u)+T)+3*u,v=(d=(x?(e.r+e.r0)/2*h:e.r*h)+A)+3*h,x||(m=(f=(p=c+u*(r+I-e.r))+(u<0?-1:1)*s)+(u<0?-5:5),y=[[c,d],[p,v=g=d+h*(r+I-e.r)],[f,g]]),x?"center":0<u?"left":"right"),w=i.getFont(),b=i.get("rotate")?u<0?-l+Math.PI:-l:0,S=pe(M.getFormattedLabel(t,"normal")||D.getName(t),w,_,"top");L=!!b,e.label={x:m,y:v,position:o,height:S.height,len:r,len2:s,linePoints:y,textAlign:_,verticalAlign:"middle",rotation:b,inside:x},x||C.push(e.label)}),!L&&M.get("avoidLabelOverlap")&&function(t,e,n,i,o){for(var a=[],r=[],s=0;s<t.length;s++)t[s].x<e?a.push(t[s]):r.push(t[s]);for(cl(r,e,n,i,1,0,o),cl(a,e,n,i,-1,0,o),s=0;s<t.length;s++){var l,u=t[s].linePoints;u&&(l=u[1][0]-u[2][0],t[s].x<e?u[2][0]=t[s].x+3:u[2][0]=t[s].x-3,u[1][1]=u[2][1]=t[s].y,u[1][0]=u[2][0]+l)}}(C,T,A,I,e)}function dS(t){return{seriesType:t,reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1;return!0})}}}var pS=2*Math.PI,gS=Math.PI/180;uS("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Qa(hS("pie")),Ja(E(function(t,e,T,n){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),n=t.get("center"),i=t.get("radius");N(i)||(i=[0,i]),N(n)||(n=[n,n]);var a=T.getWidth(),r=T.getHeight(),s=Math.min(a,r),l=Ei(n[0],a),u=Ei(n[1],r),h=Ei(i[0],s/2),c=Ei(i[1],s/2),d=-t.get("startAngle")*gS,p=t.get("minAngle")*gS,g=0;o.each(e,function(t){isNaN(t)||g++});var f=o.getSum(e),m=Math.PI/(f||g)*2,v=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),_=o.getDataExtent(e);_[0]=0;var w,b=pS,S=0,M=d,I=v?1:-1;o.each(e,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:l,cy:u,r0:h,r:y?NaN:c}):((n="area"!==y?0===f&&x?m:t*m:pS/g)<p?b-=n=p:S+=t,i=M+I*n,o.setItemLayout(e,{angle:n,startAngle:M,endAngle:i,clockwise:v,cx:l,cy:u,r0:h,r:y?Ri(t,_,[h,c]):c}),M=i)}),b<pS&&g&&(b<=.001?(w=pS/g,o.each(e,function(t,e){var n;isNaN(t)||((n=o.getItemLayout(e)).angle=w,n.startAngle=d+I*e*w,n.endAngle=d+I*(e+1)*w)})):(m=b/S,M=d,o.each(e,function(t,e){var n,i;isNaN(t)||(i=(n=o.getItemLayout(e)).angle===p?p:t*m,n.startAngle=M,n.endAngle=M+I*i,M+=I*i)}))),cS(t,c,0,r)})},"pie")),qa(dS("pie")),r_.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(){return Mr(this.getSource(),this)},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8}}});var fS=jn({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&i[0]<4))for(var r=0;r<n.length;){var s=n[r++],l=n[r++];isNaN(s)||isNaN(l)||(a.x=s-i[0]/2,a.y=l-i[1]/2,a.width=i[0],a.height=i[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,n=e.points,i=e.size;if(i[0]<4){this.setTransform(t);for(var o=0;o<n.length;){var a=n[o++],r=n[o++];isNaN(a)||isNaN(r)||t.fillRect(a-i[0]/2,r-i[1]/2,i[0],i[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var n=this.shape,i=n.points,o=n.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=i.length/2-1;0<=s;s--){var l=2*s,u=i[l]-a/2,h=i[1+l]-r/2;if(u<=t&&h<=e&&t<=u+a&&e<=h+r)return s}return-1}}),mS=dl.prototype;mS.isPersistent=function(){return!this._incremental},mS.updateData=function(t){this.group.removeAll();var e=new fS({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},mS.updateLayout=function(t){var i;this._incremental||(i=t.getLayout("symbolPoints"),this.group.eachChild(function(t){var e,n;null!=t.startIndex&&(e=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2,i=new Float32Array(i.buffer,n,e)),t.setShape("points",i)}))},mS.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new Xn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},mS.incrementalUpdate=function(t,e){var n;this._incremental?(n=new fS,this._incremental.addDisplayable(n,!0)):((n=new fS({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental)},mS._setCommon=function(n,t,e){var i=t.hostModel,o=t.getVisual("symbolSize");n.setShape("size",o instanceof Array?o:[o,o]),n.symbolProxy=Kr(t.getVisual("symbol"),0,0,0,0),n.setColor=n.symbolProxy.setColor;var a=n.shape.size[0]<4;n.useStyle(i.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=t.getVisual("color");r&&n.setColor(r),e||(n.seriesIndex=i.seriesIndex,n.on("mousemove",function(t){n.dataIndex=null;var e=n.findDataIndex(t.offsetX,t.offsetY);0<=e&&(n.dataIndex=e+(n.startIndex||0))}))},mS.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},mS._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},ar({type:"scatter",render:function(t){var e=t.getData();this._updateSymbolDraw(e,t).updateData(e),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData();this._updateSymbolDraw(e,t).incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||1e4<e.count()||!this._symbolDraw.isPersistent())return{update:!0};var n=Cb().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_updateSymbolDraw:function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=new(i?dl:xs),this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Qa(Db("scatter","circle")),Ja(Cb("scatter")),a(pl,lb),gl.prototype.getIndicatorAxes=function(){return this._indicatorAxes},gl.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},gl.prototype.coordToPoint=function(t,e){var n=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(n),this.cy-t*Math.sin(n)]},gl.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var o,a=Math.atan2(-n,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coodToData(i))]},gl.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),a=Math.min(i,o)/2;this.cx=Ei(n[0],i),this.cy=Ei(n[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Ei(r[0],a),this.r=Ei(r[1],a),z(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var n=this.startAngle+e*Math.PI*2/this._indicatorAxes.length,n=Math.atan2(Math.sin(n),Math.cos(n));t.angle=n},this)},gl.prototype.update=function(i,t){function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),n=t/e;return 2===n?n=5:n*=2,n*e}var o=this._indicatorAxes,a=this._model;z(o,function(t){t.scale.setExtent(1/0,-1/0)}),i.eachSeriesByType("radar",function(t,e){var n;"radar"===t.get("coordinateSystem")&&i.getComponent("radar",t.get("radarIndex"))===a&&(n=t.getData(),z(o,function(t){t.scale.unionExtentFromData(n,n.mapDimension(t.dim))}))},this);var p=a.get("splitNumber");z(o,function(t,e){var n=Hr(t.scale,t.model);Zr(t.scale,t.model);var i,o,a=t.model,r=t.scale,s=a.getMin(),l=a.getMax(),u=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/p);else if(null!=s)for(;i=s+u*p,r.setExtent(+s,i),r.setInterval(u),u=d(u),i<n[1]&&isFinite(i)&&isFinite(n[1]););else if(null!=l)for(;o=l-u*p,r.setExtent(o,+l),r.setInterval(u),u=d(u),o>n[0]&&isFinite(o)&&isFinite(n[0]););else{r.getTicks().length-1>p&&(u=d(u));var h=Math.round((n[0]+n[1])/2/u)*u,c=Math.round(p/2);r.setExtent(zi(h-c*u),zi(h+(p-c)*u)),r.setInterval(u)}})},gl.dimensions=[],gl.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new gl(t,0,n);i.push(e),t.coordinateSystem=e}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Mo.register("radar",gl);var vS=Rb.valueAxis,yS=(nr({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),t=L(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e,n=h;null!=t.color&&(n=O({color:t.color},h)),t=v(D(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisLabel:u,name:t.text,nameLocation:"end",nameGap:p,nameTextStyle:n,triggerEvent:g},!1),c||(t.name=""),"string"==typeof d?(e=t.name,t.name=d.replace("{value}",null!=e?e:"")):"function"==typeof d&&(t.name=d(t.name,t));var i=P(new ki(t,null,this.ecModel),Yw);return i.mainType="radar",i.componentIndex=this.componentIndex,i},this);this.getIndicatorModels=function(){return t}},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:v({lineStyle:{color:"#bbb"}},vS.axisLine),axisLabel:fl(vS.axisLabel,!1),axisTick:fl(vS.axisTick,!1),splitLine:fl(vS.splitLine,!0),splitArea:fl(vS.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);ir({type:"radar",render:function(t){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;z(L(e.getIndicatorAxes(),function(t){return new Wb(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){z(yS,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,n){var i=n%e.length;return t[i]=t[i]||[],i}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),r=t.getModel("splitArea"),s=a.getModel("lineStyle"),l=r.getModel("areaStyle"),u=a.get("show"),h=r.get("show"),c=s.get("color"),d=l.get("color"),c=N(c)?c:[c],d=N(d)?d:[d],p=[],g=[];if("circle"===o)for(var f=n[0].getTicksCoords(),m=i.cx,v=i.cy,y=0;y<f.length;y++)u&&p[e(p,c,y)].push(new gy({shape:{cx:m,cy:v,r:f[y].coord}})),h&&y<f.length-1&&g[e(g,d,y)].push(new vy({shape:{cx:m,cy:v,r0:f[y].coord,r:f[y+1].coord}}));else for(var x,_=L(n,function(t,e){var n=t.getTicksCoords();return x=null==x?n.length-1:Math.min(n.length-1,x),L(n,function(t){return i.coordToPoint(t.coord,e)})}),w=[],y=0;y<=x;y++){for(var b=[],S=0;S<n.length;S++)b.push(_[S][y]);b[0]&&b.push(b[0].slice()),u&&p[e(p,c,y)].push(new xy({shape:{points:b}})),h&&w&&g[e(g,d,y-1)].push(new yy({shape:{points:b.concat(w)}})),w=b.slice().reverse()}var M=s.getLineStyle(),I=l.getAreaStyle();z(g,function(t,e){this.group.add(Cy(t,{style:O({stroke:"none",fill:d[e%d.length]},I),silent:!0}))},this),z(p,function(t,e){this.group.add(Cy(t,{style:O({fill:"none",stroke:c[e%c.length]},M),silent:!0}))},this)}}});var xS=r_.extend({type:"series.radar",dependencies:["radar"],init:function(t){xS.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(){return aS(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(i){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(i);return Qi(""===e?this.name:e)+"<br/>"+L(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return Qi(t.name+" : "+n)}).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});ar({type:"radar",render:function(l){function u(t,e){var n,i=t.getItemVisual(e,"symbol")||"circle",o=t.getItemVisual(e,"color");if("none"!==i){var a=(N(n=t.getItemVisual(e,"symbolSize"))||(n=[+n,+n]),n),r=Kr(i,-1,-1,2,2,o);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function s(t,e,n,i,o,a){n.removeAll();for(var r=0;r<e.length-1;r++){var s=u(i,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),Ey[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),n.add(s))}}function h(t){return L(t,function(t){return[e.cx,e.cy]})}var e=l.coordinateSystem,v=this.group,y=l.getData(),c=this._data;y.diff(c).add(function(t){var e,n,i,o,a,r=y.getItemLayout(t);r&&(e=new yy,n=new xy,i={shape:{points:r}},e.shape.points=h(r),n.shape.points=h(r),Mi(e,i,l,t),Mi(n,i,l,t),o=new rm,a=new rm,o.add(n),o.add(e),o.add(a),s(n.shape.points,r,a,y,t,!0),y.setItemGraphicEl(t,o))}).update(function(t,e){var n=c.getItemGraphicEl(e),i=n.childAt(0),o=n.childAt(1),a=n.childAt(2),r={shape:{points:y.getItemLayout(t)}};r.shape.points&&(s(i.shape.points,r.shape.points,a,y,t,!1),Si(i,r,l),Si(o,r,l),y.setItemGraphicEl(t,n))}).remove(function(t){v.remove(c.getItemGraphicEl(t))}).execute(),y.eachItemGraphicEl(function(t,e){function n(){r.attr("ignore",d)}function i(){r.attr("ignore",c)}var o=y.getItemModel(e),a=t.childAt(0),r=t.childAt(1),s=t.childAt(2),l=y.getItemVisual(e,"color");v.add(t),a.useStyle(O(o.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),a.hoverStyle=o.getModel("emphasis.lineStyle").getLineStyle();var u=o.getModel("areaStyle"),h=o.getModel("emphasis.areaStyle"),c=u.isEmpty()&&u.parentModel.isEmpty(),d=(d=h.isEmpty()&&h.parentModel.isEmpty())&&c;r.ignore=c,r.useStyle(O(u.getAreaStyle(),{fill:l,opacity:.7})),r.hoverStyle=h.getAreaStyle();var p=o.getModel("itemStyle").getItemStyle(["color"]),g=o.getModel("emphasis.itemStyle").getItemStyle(),f=o.getModel("label"),m=o.getModel("emphasis.label");s.eachChild(function(t){t.setStyle(p),t.hoverStyle=D(g),gi(t.style,t.hoverStyle,f,m,{labelFetcher:y.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:y.get(y.dimensions[t.__dimIdx],e),autoColor:l,isRectText:!0})}),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",n).on("mouseover",n).on("normal",i).on("mouseout",i),di(t)}),this._data=y},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),Qa(hS("radar")),Qa(Db("radar","circle")),Ja(function(t){t.eachSeriesByType("radar",function(t){var e=t.getData(),n=[],i=t.coordinateSystem;if(i){for(var o=i.getIndicatorAxes(),a=0;a<o.length;a++)e.each(e.mapDimension(o[a].dim),function(t,e){n[e]=n[e]||[],n[e][a]=i.dataToPoint(t,a)});e.each(function(t){n[t][0]&&n[t].push(n[t][0].slice()),e.setItemLayout(t,n[t])})}})}),qa(dS("radar")),Ya(function(n){var i,t=n.polar;t&&(N(t)||(t=[t]),i=[],z(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),n.radar=n.radar||[],N(n.radar)||(n.radar=[n.radar]),n.radar.push(t)):i.push(t)}),n.polar=i),z(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});var _S=Q;o(ml,kf),vl.prototype={constructor:vl,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,n,i){return this._rect=new Qt(t,e,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new Qt(t,e,n,i)},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Qt(t,e,n,i)),a.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();return[t.x+t.width/2,t.y+t.height/2]},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,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom(),i=Q([],i,t),n=Q([],n,t);e.origin=i,e.position=[n[0]-i[0],n[1]-i[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),gt(this.transform||(this.transform=[]),e.transform||dt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],xt(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,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?_S(n,t,i):S(n,t)},pointToData:function(t){var e=this.invTransform;return e?_S([],t,e):[t[0],t[1]]},convertToPixel:E(yl,"dataToPoint"),convertFromPixel:E(yl,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},o(vl,kf);for(var wS=[126,25],bS=[[[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]]],SS=0;SS<bS.length;SS++)for(var MS=0;MS<bS[SS].length;MS++)bS[SS][MS][0]/=10.5,bS[SS][MS][1]/=-14,bS[SS][MS][0]+=wS[0],bS[SS][MS][1]+=wS[1];var IS={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},TS={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},AS=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],DS=ln(),CS={load:function(h,t){var e=DS(t).parsed;if(e)return e;var n,i,c=t.specialAreas||{},o=t.geoJSON;try{n=o?ab(o):[]}catch(h){throw new Error("Invalid geoJson format\n"+h.message)}return z(n,function(t){var e,n,i,o,a,r,s,l=t.name;a=t,"china"!==h||(r=IS[a.name])&&((s=a.center)[0]+=r[0]/10.5,s[1]+=-r[1]/14),n=t,"world"!==h||(i=TS[n.name])&&((o=n.center)[0]=i[0],o[1]=i[1]),e=t,"china"===h&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:AS[0]});var u=c[l];u&&t.transformTo(u.left,u.top,u.width,u.height)}),i=n,"china"===h&&i.push(new Qr("南海诸岛",L(bS,function(t){return{type:"polygon",exterior:t}}),wS)),DS(t).parsed={regions:n,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}(n)}}},LS=ln(),kS={geoJSON:CS,svg:{load:function(t,e){var n=LS(e).originRoot;if(n)return{root:n,boundingRect:LS(e).boundingRect};var i=xl(e);return LS(e).originRoot=i.root,LS(e).boundingRect=i.boundingRect,i},makeGraphic:function(t,e,n){var i=LS(e),o=i.rootMap||(i.rootMap=C());if(s=o.get(n))return s;var a=i.originRoot,r=i.boundingRect,s=i.originRootHostKey?xl(e,r).root:(i.originRootHostKey=n,a);return o.set(n,s)},removeGraphic:function(t,e,n){var i=LS(e),o=i.rootMap;o&&o.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},PS={load:function(i,o){var a,r=[],s=C(),l=C();return z(wl(i),function(t){var e=kS[t.type].load(i,t);z(e.regions,function(t){var e=t.name;o&&o.hasOwnProperty(e)&&(t=t.cloneShallow(e=o[e])),r.push(t),s.set(e,t),l.set(e,t.center)});var n=e.boundingRect;n&&(a?a.union(n):a=n.clone())}),{regions:r,regionsMap:s,nameCoordMap:l,boundingRect:a||new Qt(0,0,0,0)}},makeGraphic:_l("makeGraphic"),removeGraphic:_l("removeGraphic")};bl.prototype={constructor:bl,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return!0;return!1},transformTo:function(t,e,n,i){var o=this.getBoundingRect(),a=this._invertLongitute,o=o.clone();a&&(o.y=-o.y-o.height);var r,s=this._rawTransformable;s.transform=o.calculateTransform(new Qt(t,e,n,i)),s.decomposeTransform(),a&&((r=s.scale)[1]=-r[1]),s.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,n=0;n<e.length;n++)if(e[n].contain(t))return e[n]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,n){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return vl.prototype.dataToPoint.call(this,t,e,n)},convertToPixel:E(Sl,"dataToPoint"),convertFromPixel:E(Sl,"pointToData")},o(bl,vl);var NS={dimensions:bl.prototype.dimensions,create:function(t,s){var l=[];t.eachComponent("geo",function(t,e){var n=t.get("map"),i=t.get("aspectScale"),o=!0,a=G_.retrieveMap(n);a&&a[0]&&"svg"===a[0].type?(null==i&&(i=1),o=!1):null==i&&(i=.75);var r=new bl(n+e,n,t.get("nameMap"),o);r.aspectScale=i,r.zoomLimit=t.get("scaleLimit"),l.push(r),Il(r,t),(t.coordinateSystem=r).model=t,r.resize=Ml,r.resize(t,s)}),t.eachSeries(function(t){var e;"geo"===t.get("coordinateSystem")&&(e=t.get("geoIndex")||0,t.coordinateSystem=l[e])});var n={};return t.eachSeriesByType("map",function(t){var e;t.getHostGeoModel()||(e=t.getMapType(),n[e]=n[e]||[],n[e].push(t))}),z(n,function(t,e){var n=new bl(e,e,h(L(t,function(t){return t.get("nameMap")})));n.zoomLimit=V.apply(null,L(t,function(t){return t.get("scaleLimit")})),l.push(n),n.resize=Ml,n.aspectScale=t[0].get("aspectScale"),n.resize(t[0],s),z(t,function(t){Il(t.coordinateSystem=n,t)})}),l},getFilledRegions:function(t,e,n){for(var i=(t||[]).slice(),o=C(),a=0;a<i.length;a++)o.set(i[a].name,i[a]);return z(PS.load(e,n).regions,function(t){var e=t.name;o.get(e)||i.push({name:e})}),i}};$a("geo",NS);var OS=r_.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(t){OS.superApply(this,"init",arguments),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return aS(this,["value"])},mergeOption:function(t){OS.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this._createSelectableList())},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),n=[],i=0,o=t.count();i<o;i++)n.push({name:t.getName(i),value:t.get(e,i),selected:Zo(t,i,"selected")});return NS.getFilledRegions(n,this.getMapType(),this.option.nameMap)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(){},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(),n=$i(this.getRawValue(t)),i=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(i),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(Qi(o[r].name))}return a.join(", ")+"<br />"+Qi(i+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.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)"}}}});o(OS,rS);var RS="\0_ec_interaction_mutex";Ka({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),o(Dl,wf);var ES={axisPointer:1,tooltip:1,brush:1};Wl.prototype={constructor:Wl,draw:function(x,t,e,n,i){var _="geo"===x.mainType,w=x.getData&&x.getData();_&&t.eachComponent({mainType:"series",subType:"map"},function(t){w||t.getHostGeoModel()!==x||(w=t.getData())});var o=x.coordinateSystem;this._updateBackground(o);var b=this._regionsGroup,a=this.group,S=o.scale,r={position:o.position,scale:S};!b.childAt(0)||i?a.attr(r):Si(a,r,x),b.removeAll();var s,l,u,h,c,M=["itemStyle"],I=["emphasis","itemStyle"],T=["label"],A=["emphasis","label"],D=C();z(o.regions,function(t){var e=D.get(t.name)||D.set(t.name,new rm),n=new Iy({shape:{paths:[]}});e.add(n);var i,o,a=(g=x.getRegionModel(t.name)||x).getModel(M),r=g.getModel(I),s=Gl(a),l=Gl(r),u=g.getModel(T),h=g.getModel(A);w&&(i=w.indexOfName(t.name),(o=w.getItemVisual(i,"color",!0))&&(s.fill=o)),z(t.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new yy({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new yy({shape:{points:t.interiors[e]}}))}}),n.setStyle(s),n.style.strokeNoScale=!0,n.culling=!0;var c,d,p,g,f=u.get("show"),m=h.get("show"),v=w&&isNaN(w.get(w.mapDimension("value"),i)),y=w&&w.getItemLayout(i);(_||v&&(f||m)||y&&y.showLabel)&&(d=_?t.name:i,(!w||0<=i)&&(c=x),gi((p=new cy({position:t.center.slice(),scale:[1/S[0],1/S[1]],z2:10,silent:!0})).style,p.hoverStyle={},u,h,{labelFetcher:c,labelDataIndex:d,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(p)),w?w.setItemGraphicEl(i,e):(g=x.getRegionModel(t.name),n.eventData={componentType:"geo",componentIndex:x.componentIndex,geoIndex:x.componentIndex,name:t.name,region:g&&g.option||{}}),(e.__regions||(e.__regions=[])).push(t),di(e,l,{hoverSilentOnTouch:!!x.get("selectedMode")}),b.add(e)}),this._updateController(x,t,e),s=this,l=x,h=e,c=n,(u=b).off("click"),u.off("mousedown"),l.get("selectedMode")&&(u.on("mousedown",function(){s._mouseDownFlag=!0}),u.on("click",function(t){if(s._mouseDownFlag){s._mouseDownFlag=!1;for(var e,n=t.target;!n.__regions;)n=n.parent;n&&((e={type:("geo"===l.mainType?"geo":"map")+"ToggleSelect",batch:L(n.__regions,function(t){return{name:t.name,from:c.uid}})})[l.mainType+"Id"]=l.id,h.dispatchAction(e),Fl(l,u))}})),Fl(x,b)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&PS.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&z(PS.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(i,t,o){function n(){var t={type:"geoRoam",componentType:s};return t[s+"Id"]=i.id,t}var a=i.coordinateSystem,e=this._controller,r=this._controllerHost;r.zoomLimit=i.get("scaleLimit"),r.zoom=a.getZoom(),e.enable(i.get("roam")||!1);var s=i.mainType;e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,zl(r,t.dx,t.dy),o.dispatchAction(P(n(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){var e;this._mouseDownFlag=!1,Bl(r,t.scale,t.originX,t.originY),o.dispatchAction(P(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup&&(e=this.group.scale,this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])}))},this),e.setPointerChecker(function(t,e,n){return a.getViewRectAfterRoam().contain(e,n)&&!Vl(t,o,i)})}},ar({type:"map",render:function(t,e,n,i){var o,a;i&&"mapToggleSelect"===i.type&&i.from===this.uid||((o=this.group).removeAll(),t.getHostGeoModel()||(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id?(a=this._mapDraw)&&o.add(a.group):t.needsDrawMap?(a=this._mapDraw||new Wl(n,!0),o.add(a.group),a.draw(t,e,n,this,i),this._mapDraw=a):(this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null),t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)))},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(v){var y=v.originalData,x=this.group;y.each(y.mapDimension("value"),function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,g,f,m;isNaN(t)||(n=y.getItemLayout(e))&&n.point&&(i=n.point,o=n.offset,a=new gy({style:{fill:v.getData().getVisual("color")},shape:{cx:i[0]+9*o,cy:i[1],r:3},silent:!0,z2:o?8:10}),o||(r=v.mainSeries.getData(),s=y.getName(e),l=r.indexOfName(s),u=y.getItemModel(e),h=u.getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),p=G(v.getFormattedLabel(e,"normal"),s),g=G(v.getFormattedLabel(e,"emphasis"),p),f=function(){var t=fi({},c,{text:c.get("show")?g:null},{isRectText:!0,useInsideStyle:!1},!0);a.style.extendFrom(t),a.__mapOriginalZ2=a.z2,a.z2+=1},m=function(){fi(a.style,h,{text:h.get("show")?p:null,textPosition:h.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=a.__mapOriginalZ2&&(a.z2=a.__mapOriginalZ2,a.__mapOriginalZ2=null)},d.on("mouseover",f).on("mouseout",m).on("emphasis",f).on("normal",m),m()),x.add(a))})}}),Ka({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var o=i.componentType||"series";t.eachComponent({mainType:o,query:i},function(t){var e,n=t.coordinateSystem;"geo"===n.type&&(e=Hl(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o&&z(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))})}),Ja(function(n){var o={};n.eachSeriesByType("map",function(t){var l,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(l={},z(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var n,i,o=s.getName(e),a=r.getRegion(o);a&&!isNaN(t)&&(n=l[o]||0,i=r.dataToPoint(a.center),l[o]=n+1,s.setItemLayout(e,{point:i,offset:n}))})}),(i=t.getData()).each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!l[e],i.setItemLayout(t,n)}),o[e]=!0)})}),Qa(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),n=t.getModel("itemStyle"),i=n.get("areaColor"),o=n.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:i,color:o})})}),qa(j_.PROCESSOR.STATISTIC,function(t){var i={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),n=e?"o"+e.id:"i"+t.getMapType();(i[n]=i[n]||[]).push(t)}),z(i,function(t,e){for(var l,u,h,n=(l=L(t,function(t){return t.getData()}),u=t[0].get("mapValueCalculation"),h={},z(l,function(i){i.each(i.mapDimension("value"),function(t,e){var n="ec-"+i.getName(e);h[n]=h[n]||[],isNaN(t)||h[n].push(t)})}),l[0].map(l[0].mapDimension("value"),function(t,e){for(var n="ec-"+l[0].getName(e),i=0,o=1/0,a=-1/0,r=h[n].length,s=0;s<r;s++)o=Math.min(o,h[n][s]),a=Math.max(a,h[n][s]),i+=h[n][s];return 0===r?NaN:"min"===u?o:"max"===u?a:"average"===u?i/r:i})),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(i=0;i<t.length;i++)(t[i].seriesGroup=t)[i].needsDrawMap=0===i&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}),Ya(function(t){var e=[];z(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,O(t,t.mapLocation))})}),uS("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);function zS(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}var BS=z,VS="\0__link_datas",GS="\0__link_mainData";zS.prototype={constructor:zS,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),A(t=t||{})&&(t={order:t});var i,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var r=0;!i&&r<a.length;r++)a[r].eachNode(t,e,n);"postorder"===o&&e.call(n,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.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){0<=this.dataIndex&&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,n=this.hostTree,i=n.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),i.getModel(t,(o||e||n.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){0<=this.dataIndex&&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)}},$l.prototype={constructor:$l,type:"tree",eachNode:function(t,e,n){this.root.eachNode(t,e,n)},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,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},$l.createTree=function(t,e,n){var h=new $l(e,n.levels,n.leaves),c=[],d=1;(function t(e,n){var i=e.value;d=Math.max(d,N(i)?i.length:1),c.push(e);var o,a,r,s=new zS(e.name,h);n?(o=s,r=(a=n).children,o.parentNode!==a&&(r.push(o),o.parentNode=a)):h.root=s,h._nodes.push(s);var l=e.children;if(l)for(var u=0;u<l.length;u++)t(l[u],s)})(t),h.root.updateDepthAndHeight(0);var i=Mw(c,{coordDimensions:["value"],dimensionsCount:d}),o=new gw(i,e);return o.initData(c),Zl({mainData:o,struct:h,structAttr:"tree"}),h.update(),h},r_.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i={};i.leaves=n;var o=$l.createTree(e,this,i),a=0;o.eachNode("preorder",function(t){t.depth>a&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;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<=r}),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,n=e.root.children[0],i=e.getNodeByDataIndex(t),o=i.getValue(),a=i.name;i&&i!==n;)a=i.parentNode.name+"."+a,i=i.parentNode;return Qi(a+(isNaN(o)||null==o?"":" : "+o))},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}}),ar({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new rm,this._controller=new Dl(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(i,t,n){var o=i.getData(),e=i.layoutInfo,a=this._mainGroup,r=i.get("layout");"radial"===r?a.attr("position",[e.x+e.width/2,e.y+e.height/2]):a.attr("position",[e.x,e.y]),this._updateViewCoordSys(i),this._updateController(i,t,n);var s=this._data,l={expandAndCollapse:i.get("expandAndCollapse"),layout:r,orient:i.getOrient(),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(s).add(function(t){au(o,t)&&su(o,t,null,a,i,l)}).update(function(t,e){var n=s.getItemGraphicEl(e);au(o,t)?su(o,t,n,a,i,l):n&&lu(s,e,n,a,i,l)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&lu(s,t,e,a,i,l)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===l.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var n=t.getData(),i=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])});var e=[],o=[];Cn(i,e,o),o[0]-e[0]==0&&(o[0]+=1,--e[0]),o[1]-e[1]==0&&(o[1]+=1,--e[1]);var a=t.coordinateSystem=new vl;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!Vl(t,a,o)}),e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){zl(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Bl(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),n=this._getNodeGlobalScale(t),i=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scale,o=i&&i[0]||1;return((e.getZoom()-1)*n+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Ka({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=i.dataIndex,n=t.getData().tree.getNodeByDataIndex(e);n.isExpand=!n.isExpand})}),Ka({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=Hl(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})}),Qa(Db("tree","circle")),Ja(function(t,e){t.eachSeriesByType("tree",function(t){cu(t,e)})}),r_.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/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 n={name:t.name,children:t.data};!function n(t){var i=0;z(t.children,function(t){n(t);var e=t.value;N(e)&&(e=e[0]),i+=e});var e=t.value;N(e)&&(e=e[0]),null!=e&&!isNaN(e)||(e=i),e<0&&(e=0),N(t.value)?t.value[0]=e:t.value=e}(n);var i=t.levels||[],i=t.levels=function(t,e){var i,n=e.get("color");if(n)return z(t=t||[],function(t){var e=new ki(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)}),i||((t[0]||(t[0]={})).color=n.slice()),t}(i,e),o={};return o.levels=i,$l.createTree(n,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=$i(N(n)?n[0]:n);return Qi(e.getName(t)+": "+i)},getDataParams:function(t){var e=r_.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=fu(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=C(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},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 FS=5;mu.prototype={constructor:mu,render:function(t,e,n,i){var o,a,r,s=t.getModel("breadcrumb"),l=this.group;l.removeAll(),s.get("show")&&n&&(a=(o=s.getModel("itemStyle")).getModel("textStyle"),r={pos:{left:s.get("left"),right:s.get("right"),top:s.get("top"),bottom:s.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:s.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,r,a),this._renderContent(t,r,o,a,i),lo(l,r.pos,r.box))},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var o=i.getModel().get("name"),a=n.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:i,text:o,width:r})}},_renderContent:function(t,e,n,i,o){for(var a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b=0,S=e.emptyItemWidth,M=t.get("breadcrumb.height"),I=(p=e.pos,g=e.box,m=g.width,v=g.height,y=Ei(p.x,m),x=Ei(p.y,v),_=Ei(p.x2,m),w=Ei(p.y2,v),(isNaN(y)||isNaN(parseFloat(p.x)))&&(y=0),(isNaN(_)||isNaN(parseFloat(p.x2)))&&(_=m),(isNaN(x)||isNaN(parseFloat(p.y)))&&(x=0),(isNaN(w)||isNaN(parseFloat(p.y2)))&&(w=v),f=$y(f||0),{width:Math.max(_-y-f[1]-f[3],0),height:Math.max(w-x-f[0]-f[2],0)}),T=e.totalWidth,A=e.renderList,D=A.length-1;0<=D;D--){var C=A[D],L=C.node,k=C.width,P=C.text;I.width<T&&(T-=k-S,k=S,P=null);var N=new yy({shape:{points:(s=b,l=0,u=k,h=M,c=D===A.length-1,d=void 0,d=[[c?s:s-FS,l],[s+u,l],[s+u,l+h],[c?s:s-FS,l+h]],0===D||d.splice(2,0,[s+u+FS,l+h/2]),c||d.push([s,l+h/2]),d)},style:O(n.getItemStyle(),{lineJoin:"bevel",text:P,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:E(o,L)});this.group.add(N),a=t,r=L,N.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&fu(r,a)},b+=k+8}},remove:function(){this.group.removeAll()}};function WS(t){var e=JS(t);return e.stroke=e.fill=e.lineWidth=null,e}var HS=k,ZS=rm,US=_y,XS=z,jS=["label"],YS=["emphasis","label"],qS=["upperLabel"],KS=["emphasis","upperLabel"],$S=10,JS=Ym([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);ar({type:"treemap",init:function(){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,n,i){var o,a,r,s,l,u,h,c;M(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0||(this.seriesModel=t,this.api=n,this.ecModel=e,o=du(i,["treemapZoomToNode","treemapRootToNode"],t),a=i&&i.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:i.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u),s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(n),this._renderBreadcrumb(t,n,o))},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new ZS,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,n){var i=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=E(vu,e,r,s,n,a,l);!function a(r,s,l,u,h){function t(t){return t.getId()}function n(t,e){var n=null!=t?r[t]:null,i=null!=e?s[e]:null,o=c(n,i,l,h);o&&a(n&&n.viewChildren||[],i&&i.viewChildren||[],o,u,h+1)}u?XS(s=r,function(t,e){t.isRemoved()||n(e,e)}):new sr(s,r,t,t).add(n).update(n).remove(E(n,null)).execute()}(i.root?[i.root]:[],o&&o.root?[o.root]:[],t,i===o||!o,0);var u,h=(u={nodeGroup:[],background:[],content:[]},s&&XS(s,function(t,e){var n=u[e];XS(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),u);return this._oldTree=i,this._storage=r,{lastsForAnimation:a,willDeleteEls:h,renderFinally:function(){XS(h,function(t){XS(t,function(t){t.parent&&t.parent.remove(t)})}),XS(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){var l,u,h,o,r,c;e.get("animation")&&(l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),r=[],c={},h={add:function(t,e,n,i,o){return A(i)&&(o=i,i=0),!c[t.id]&&(c[t.id]=1,r.push({el:t,target:e,time:n,delay:i,easing:o}),!0)},done:function(t){return o=t,this},start:function(){for(var t=r.length,e=0,n=r.length;e<n;e++){var i=r[e];i.el.animateTo(i.target,i.time,i.delay,i.easing,function(){--t||(r.length=0,c={},o&&o())})}return this}},XS(a.willDeleteEls,function(t,r){XS(t,function(t,e){var n,i,o,a;t.invisible||(n=t.parent,(a=s&&"drillDown"===s.direction?n===s.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}}:(o=i=0,n.__tmWillDelete||(i=n.__tmNodeWidth/2,o=n.__tmNodeHeight/2),"nodeGroup"===r?{position:[i,o],style:{opacity:0}}:{shape:{x:i,y:o,width:0,height:0},style:{opacity:0}}))&&h.add(t,a,l,u))})}),XS(this._storage,function(t,o){XS(t,function(t,e){var n=a.lastsForAnimation[o][e],i={};n&&("nodeGroup"===o?n.old&&(i.position=t.position.slice(),t.attr("position",n.old)):(n.old&&(i.shape=P({},t.shape),t.setShape(n.old)),n.fadein?(t.setStyle("opacity",0),i.style={opacity:1}):1!==t.style.opacity&&(i.style={opacity:1})),h.add(t,i,l,u))})},this),this._state="animating",h.done(HS(function(){this._state="ready",a.renderFinally()},this)).start())},_resetController:function(t){var e=this._controller;e||((e=this._controller=new Dl(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",HS(this._onPan,this)),e.on("zoom",HS(this._onZoom,this)));var i=new Qt(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&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},_onZoom:function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var a=new Qt(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,n-=r.y;var s=dt();mt(s,s,[-e,-n]),yt(s,s,[t.scale,t.scale]),mt(s,s,[e,n]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){var e,n,i,o,a,r;"ready"===this._state&&(!(e=this.seriesModel.get("nodeClick",!0))||(n=this.findTarget(t.offsetX,t.offsetY))&&((i=n.node).getLayout().isLeafRoot?this._rootToNode(n):"zoomToNode"===e?this._zoomToNode(n):"link"===e&&(a=(o=i.hostTree.data.getItemModel(i.dataIndex)).get("link",!0),r=o.get("target",!0)||"blank",a&&window.open(a,r))))},this)},_renderBreadcrumb:function(e,t,n){(n=n||(null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2)))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new mu(this.group))).render(e,t,n.node,HS(function(t){"animating"!==this._state&&(gu(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},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(o,a){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var n=e.transformCoordToLocal(o,a),i=e.shape;if(!(i.x<=n[0]&&n[0]<=i.x+i.width&&i.y<=n[1]&&n[1]<=i.y+i.height))return!1;r={node:t,offsetX:n[0],offsetY:n[1]}}},this),r}});for(var QS=["treemapZoomToNode","treemapRender","treemapMove"],tM=0;tM<QS.length;tM++)Ka({type:QS[tM],update:"updateView"},function(){});Ka({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n,i=du(o,["treemapZoomToNode","treemapRootToNode"],t);i&&((n=t.getViewRoot())&&(o.direction=gu(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node))})});var eM=z,nM=B,iM=-1,oM=function(t){var e=t.mappingMethod,n=t.type,i=this.option=D(t);this.type=n,this.mappingMethod=e,this._normalizeData=rM[e];var o,a,r=aM[n];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[e],"piecewise"===e?(yu(i),a=(o=i).pieceList,o.hasSpecialVisual=!1,z(a,function(t,e){t.originIndex=e,null!=t.visual&&(o.hasSpecialVisual=!0)})):"category"===e?i.categories?function(t){var i,e=t.categories,n=t.visual,o=t.categoryMap={};eM(e,function(t,e){o[t]=e}),N(n)||(i=[],B(n)?eM(n,function(t,e){var n=o[e];i[null!=n?n:iM]=t}):i[iM]=n,n=Tu(t,i));for(var a=e.length-1;0<=a;a--)null==n[a]&&(delete o[e[a]],e.pop())}(i):yu(i,!0):(d("linear"!==e||i.dataExtent),yu(i))};oM.prototype={constructor:oM,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return k(this._normalizeData,this)}};var aM=oM.visualHandlers={color:{applyVisual:wu("color"),getColorMapper:function(){var o=this.option;return k("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),bu.call(this,t)}:function(t,e,n){var i=!!n;return e||(t=this._normalizeData(t)),n=Et(t,o.parsedVisual,n),i?n:Gt(n,"rgba")},this)},_doMap:{linear:function(t){return Gt(Et(t,this.option.parsedVisual),"rgba")},category:bu,piecewise:function(t,e){var n=Iu.call(this,e);return null==n&&(n=Gt(Et(t,this.option.parsedVisual),"rgba")),n},fixed:Su}},colorHue:xu(function(t,e){return Bt(t,e)}),colorSaturation:xu(function(t,e){return Bt(t,null,e)}),colorLightness:xu(function(t,e){return Bt(t,null,null,e)}),colorAlpha:xu(Vt),opacity:{applyVisual:wu("opacity"),_doMap:Mu([0,1])},liftZ:{applyVisual:wu("liftZ"),_doMap:{linear:Su,category:Su,piecewise:Su,fixed:Su}},symbol:{applyVisual:function(t,e,n){var i=this.mapValueToVisual(t);if(A(i))n("symbol",i);else if(nM(i))for(var o in i)i.hasOwnProperty(o)&&n(o,i[o])},_doMap:{linear:_u,category:bu,piecewise:function(t,e){var n=Iu.call(this,e);return null==n&&(n=_u.call(this,t)),n},fixed:Su}},symbolSize:{applyVisual:wu("symbolSize"),_doMap:Mu([0,1])}},rM={linear:function(t){return Ri(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,n=oM.findPieceIndex(t,e,!0);if(null!=n)return Ri(n,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?iM:e},fixed:x};oM.listVisualTypes=function(){var n=[];return z(aM,function(t,e){n.push(e)}),n},oM.addVisualHandler=function(t,e){aM[t]=e},oM.isValidType=function(t){return aM.hasOwnProperty(t)},oM.eachVisual=function(t,e,n){B(t)?z(t,e,n):e.call(n,t)},oM.mapVisual=function(t,i,o){var a,r=N(t)?[]:B(t)?{}:(a=!0,null);return oM.eachVisual(t,function(t,e){var n=i.call(o,t,e);a?r=n:r[e]=n}),r},oM.retrieveVisuals=function(n){var i,o={};return n&&eM(aM,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},oM.prepareVisualTypes=function(t){if(nM(t)){var n=[];eM(t,function(t,e){n.push(e)}),t=n}else{if(!N(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},oM.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},oM.findPieceIndex=function(i,t,e){function n(t,e){var n=Math.abs(t-i);n<a&&(a=n,o=e)}for(var o,a=1/0,r=0,s=t.length;r<s;r++){var l=t[r].value;if(null!=l){if(l===i||"string"==typeof l&&l===i+"")return r;e&&n(l,r)}}for(r=0,s=t.length;r<s;r++){var u=t[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(Au(c[1],i,h[1]))return r}else if(h[1]===1/0){if(Au(c[0],h[0],i))return r}else if(Au(c[0],h[0],i)&&Au(c[1],i,h[1]))return r;e&&n(h[0],r),e&&n(h[1],r)}}if(e)return i===1/0?t.length-1:i===-1/0?0:o};var sM=N,lM="itemStyle",uM={seriesType:"treemap",reset:function(t){var e=t.getData().tree,n=e.root,i=t.getModel(lM);n.isRemoved()||Du(n,{},L(e.levelModels,function(t){return t?t.get(lM):null}),i,t.getViewRoot().getAncestors(),t)}},hM=Math.max,cM=Math.min,dM=V,pM=z,gM=["itemStyle","borderWidth"],fM=["itemStyle","gapWidth"],mM=["upperLabel","show"],vM=["upperLabel","height"],yM={seriesType:"treemap",reset:function(t,e,n,i){var o,a,r,s,l=n.getWidth(),u=n.getHeight(),h=t.option,c=so(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),d=h.size||[],p=Ei(dM(c.width,d[0]),l),g=Ei(dM(c.height,d[1]),u),f=i&&i.type,m=du(i,["treemapZoomToNode","treemapRootToNode"],t),v="treemapRender"===f||"treemapMove"===f?i.rootRect:null,y=t.getViewRoot(),x=pu(y);"treemapMove"!==f&&(o="treemapZoomToNode"===f?function(t,e,n,i,o){var a=(e||{}).node,r=[i,o];if(!a||a===n)return r;for(var s,l=i*o,u=l*t.option.zoomToNodeRatio;s=a.parentNode;){for(var h=0,c=s.children,d=0,p=c.length;d<p;d++)h+=c[d].getValue();var g=a.getValue();if(0===g)return r;u*=h/g;var f=s.getModel(),m=f.get(gM);(u+=4*m*m+(3*m+Math.max(m,Ou(f)))*Math.pow(u,.5))>Yy&&(u=Yy),a=s}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,o*v]}(t,m,y,p,g):v?[v.width,v.height]:[p,g],(a=h.sort)&&"asc"!==a&&"desc"!==a&&(a="desc"),r={squareRatio:h.squareRatio,sort:a,leafDepth:h.leafDepth},y.hostTree.clearLayouts(),s={x:0,y:0,width:o[0],height:o[1],area:o[0]*o[1]},y.setLayout(s),Pu(y,r,!1,0),s=y.getLayout(),pM(x,function(t,e){var n=(x[e+1]||y).getValue();t.setLayout(P({dataExtent:[n,n],borderWidth:0,upperHeight:0},s))}));var _=t.getData().tree.root;_.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;var o=n.node,a=o.getLayout();if(!a)return i;for(var r=[a.width/2,a.height/2],s=o;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]}}(c,v,m),!0),t.setLayoutInfo(c),function e(t,n,i,o,a){var r,s=t.getLayout(),l=i[a],u=l&&l===t;l&&!u||a===i.length&&t!==o||(t.setLayout({isInView:!0,invisible:!u&&!n.intersect(s),isAboveViewRoot:u},!0),r=new Qt(n.x-s.x,n.y-s.y,n.width,n.height),pM(t.viewChildren||[],function(t){e(t,r,i,o,a+1)}))}(_,new Qt(-c.x,-c.y,l,u),x,y,0)}};Qa(uM),Ja(yM);function xM(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}var _M=xM.prototype;_M.type="graph",_M.isDirected=function(){return this._directed},_M.addNode=function(t,e){t=t||""+e;var n=this._nodesMap;if(!n[Ru(t)]){var i=new Eu(t,e);return(i.hostGraph=this).nodes.push(i),n[Ru(t)]=i}},_M.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},_M.getNodeById=function(t){return this._nodesMap[Ru(t)]},_M.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Eu.isInstance(t)||(t=i[Ru(t)]),Eu.isInstance(e)||(e=i[Ru(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new zu(t,e,n);return(r.hostGraph=this)._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r}}},_M.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},_M.getEdge=function(t,e){Eu.isInstance(t)&&(t=t.id),Eu.isInstance(e)&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},_M.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&t.call(e,n[o],o)},_M.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&0<=n[o].node1.dataIndex&&0<=n[o].node2.dataIndex&&t.call(e,n[o],o)},_M.breadthFirstTraverse=function(t,e,n,i){if(Eu.isInstance(e)||(e=this._nodesMap[Ru(e)]),e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(i,e,null))for(var r=[e];r.length;)for(var s=r.shift(),l=s[o],a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(i,h,s))return;r.push(h),h.__visited=!0}}}},_M.update=function(){for(var t=this.data,n=this.edgeData,e=this.nodes,i=this.edges,o=0,a=e.length;o<a;o++)e[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)e[t.getRawIndex(o)].dataIndex=o;n.filterSelf(function(t){var e=i[n.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(o=0,a=i.length;o<a;o++)i[o].dataIndex=-1;for(o=0,a=n.count();o<a;o++)i[n.getRawIndex(o)].dataIndex=o},_M.clone=function(){for(var t=new xM(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(i=0;i<n.length;i++){var o=n[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},Eu.prototype={constructor:Eu,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},zu.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function wM(n,i){return{getValue:function(t){var e=this[n][i];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[n][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[n][i].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[n][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[n][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][i].getRawIndex(this.dataIndex)}}}o(Eu,wM("hostGraph","data")),o(zu,wM("hostGraph","edgeData")),xM.Node=Eu,xM.Edge=zu,fn(Eu),fn(zu);function bM(t,e,n,i,o){for(var a=new xM(i),r=0;r<t.length;r++)a.addNode(V(t[r].id,t[r].name,r),r);for(var s=[],l=[],u=0,r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(V(h.id,c+" > "+d)),u++)}var p,g,f,m,v=n.get("coordinateSystem");"cartesian2d"===v||"polar"===v?p=Mr(t,n):(M(f=(g=Mo.get(v))&&"view"!==g.type&&g.dimensions||[],"value")<0&&f.concat(["value"]),m=Mw(t,{coordDimensions:f}),(p=new gw(m,n)).initData(t));var y=new gw(["value"],n);return y.initData(l,s),o&&o(p,y),Zl({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var SM=or({type:"series.graph",init:function(t){SM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){SM.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){SM.superApply(this,"mergeDefaultAndTheme",arguments),tn(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],n=t.data||t.nodes||[],l=this;if(n&&e)return bM(n,e,this,!0,function(t,e){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?o:t&&"emphasis"===t[0]&&"label"===t[1]?r:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),o=new ki({label:i.option},i.parentModel,s),a=l.getModel("emphasis.edgeLabel"),r=new ki({emphasis:{label:a.option}},a.parentModel,s);e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"!==n)return SM.superApply(this,"formatTooltip",arguments);var i=this.getData(),o=this.getDataParams(t,n),a=i.graph.getEdgeByIndex(t),r=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Qi(l.join(" > ")),o.value&&(l+=" : "+Qi(o.value)),l},_updateCategoriesData:function(){var t=L(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new gw(["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 SM.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,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}}}}),MM=wy.prototype,IM=Sy.prototype,TM=jn({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Bu(e)?MM:IM).buildPath(t,e)},pointAt:function(t){return Bu(this.shape)?MM.pointAt.call(this,t):IM.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Bu(e)?[e.x2-e.x1,e.y2-e.y1]:IM.tangentAt.call(this,t);return q(n,n)}}),AM=["fromSymbol","toSymbol"],DM=Wu.prototype;DM.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var i=1,o=this.parent;o;)o.scale&&(i/=o.scale[0]),o=o.parent;var a,r,s,l,u,h,c,d,p,g,f,m,v,y=this.childOfName("line");(this.__dirty||y.__dirty)&&(a=y.shape.percent,r=y.pointAt(0),q(l=U([],s=y.pointAt(a),r),l),t&&(t.attr("position",r),u=y.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(u[1],u[0])),t.attr("scale",[i*a,i*a])),e&&(e.attr("position",s),u=y.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(u[1],u[0])),e.attr("scale",[i*a,i*a])),n.ignore||(n.attr("position",s),p=5*i,"end"===n.__position?(h=[l[0]*p+s[0],l[1]*p+s[1]],c=.8<l[0]?"left":l[0]<-.8?"right":"center",d=.8<l[1]?"top":l[1]<-.8?"bottom":"middle"):"middle"===n.__position?(g=a/2,f=[(u=y.tangentAt(g))[1],-u[0]],m=y.pointAt(g),0<f[1]&&(f[0]=-f[0],f[1]=-f[1]),h=[m[0]+f[0]*p,m[1]+f[1]*p],c="center",d="bottom",v=-Math.atan2(u[1],u[0]),s[0]<r[0]&&(v=Math.PI+v),n.attr("rotation",v)):(h=[-l[0]*p+r[0],-l[1]*p+r[1]],c=.8<l[0]?"right":l[0]<-.8?"left":"center",d=.8<l[1]?"bottom":l[1]<-.8?"top":"middle"),n.attr({style:{textVerticalAlign:n.__verticalAlign||d,textAlign:n.__textAlign||c},position:h,scale:[i,i]})))}},DM._createLine=function(n,i,t){var e,o,a=n.hostModel,r=(e=n.getItemLayout(i),Fu((o=new TM({name:"line"})).shape,e),o);r.shape.percent=0,Mi(r,{shape:{percent:1}},a,i),this.add(r);var s=new cy({name:"label"});this.add(s),z(AM,function(t){var e=Gu(t,n,i);this.add(e),this[Vu(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},DM.updateData=function(o,a,t){var e=o.hostModel,n=this.childOfName("line"),i=o.getItemLayout(a),r={shape:{}};Fu(r.shape,i),Si(n,r,e,a),z(AM,function(t){var e,n=o.getItemVisual(a,t),i=Vu(t);this[i]!==n&&(this.remove(this.childOfName(t)),e=Gu(t,o,a),this.add(e)),this[i]=n},this),this._updateCommonStl(o,a,t)},DM._updateCommonStl=function(t,e,n){var i,o=t.hostModel,a=this.childOfName("line"),r=n&&n.lineStyle,s=n&&n.hoverLineStyle,l=n&&n.labelModel,u=n&&n.hoverLabelModel;n&&!t.hasItemOption||(r=(i=t.getItemModel(e)).getModel("lineStyle").getLineStyle(),s=i.getModel("emphasis.lineStyle").getLineStyle(),l=i.getModel("label"),u=i.getModel("emphasis.label"));var h=t.getItemVisual(e,"color"),c=F(t.getItemVisual(e,"opacity"),r.opacity,1);a.useStyle(O({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},r)),a.hoverStyle=s,z(AM,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,p,g,f=l.getShallow("show"),m=u.getShallow("show"),v=this.childOfName("label");(f||m)&&(d=h||"#000",null==(g=o.getFormattedLabel(e,"normal",t.dataType)))&&(g=null==(p=o.getRawValue(e))?t.getName(e):isFinite(p)?zi(p):p);var y=f?g:null,x=m?G(o.getFormattedLabel(e,"emphasis",t.dataType),g):null,_=v.style;null==y&&null==x||(fi(v.style,l,{text:y},{autoColor:d}),v.__textAlign=_.textAlign,v.__verticalAlign=_.textVerticalAlign,v.__position=l.get("position")||"middle"),v.hoverStyle=null!=x?{text:x,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},v.ignore=!f&&!m,di(this)},DM.highlight=function(){this.trigger("emphasis")},DM.downplay=function(){this.trigger("normal")},DM.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},DM.setLinePoints=function(t){var e=this.childOfName("line");Fu(e.shape,t),e.dirty()},a(Wu,rm);var CM=Hu.prototype;CM.isPersistent=function(){return!0},CM.updateData=function(l){var u=this,e=u.group,h=u._lineData;u._lineData=l,h||e.removeAll();var c=Zu(l);l.diff(h).add(function(t){var e,n,i,o,a;e=u,i=t,o=c,Xu((n=l).getItemLayout(i))&&(a=new e._ctor(n,i,o),n.setItemGraphicEl(i,a),e.group.add(a))}).update(function(t,e){var n,i,o,a,r,s;n=u,i=l,o=e,a=t,r=c,s=h.getItemGraphicEl(o),Xu(i.getItemLayout(a))?(s?s.updateData(i,a,r):s=new n._ctor(i,a,r),i.setItemGraphicEl(a,s),n.group.add(s)):n.group.remove(s)}).remove(function(t){e.remove(h.getItemGraphicEl(t))}).execute()},CM.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},CM.incrementalPrepareUpdate=function(t){this._seriesScope=Zu(t),this._lineData=null,this.group.removeAll()},CM.incrementalUpdate=function(t,e){for(var n,i=t.start;i<t.end;i++){Xu(e.getItemLayout(i))&&((n=new this._ctor(e,i,this._seriesScope)).traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),this.group.add(n),e.setItemGraphicEl(i,n))}},CM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},CM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};function LM(t,l){function u(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}var h=[],c=Dn,d=[[],[],[]],p=[[],[]],g=[];l/=2,t.eachEdge(function(t,e){var n=t.getLayout(),i=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");n.__original||(n.__original=[T(n[0]),T(n[1])],n[2]&&n.__original.push(T(n[2])));var a,r,s=n.__original;null!=n[2]?(S(d[0],s[0]),S(d[1],s[2]),S(d[2],s[1]),i&&"none"!==i&&(a=u(t.node1),r=ju(d,s[0],a*l),c(d[0][0],d[1][0],d[2][0],r,h),d[0][0]=h[3],d[1][0]=h[4],c(d[0][1],d[1][1],d[2][1],r,h),d[0][1]=h[3],d[1][1]=h[4]),o&&"none"!==o&&(a=u(t.node2),r=ju(d,s[1],a*l),c(d[0][0],d[1][0],d[2][0],r,h),d[1][0]=h[1],d[2][0]=h[2],c(d[0][1],d[1][1],d[2][1],r,h),d[1][1]=h[1],d[2][1]=h[2]),S(n[0],d[0]),S(n[1],d[2]),S(n[2],d[1])):(S(p[0],s[0]),S(p[1],s[1]),U(g,p[1],p[0]),q(g,g),i&&"none"!==i&&(a=u(t.node1),Z(p[0],p[0],g,a*l)),o&&"none"!==o&&(a=u(t.node2),Z(p[1],p[1],g,-a*l)),S(n[0],p[0]),S(n[1],p[1]))})}var kM=[],PM=[],NM=[],OM=In,RM=yf,EM=Math.abs,zM=["itemStyle","opacity"],BM=["lineStyle","opacity"];ar({type:"graph",init:function(t,e){var n=new xs,i=new Hu,o=this.group;this._controller=new Dl(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(o,t,a){var e=o.coordinateSystem;this._model=o,this._nodeScaleRatio=o.get("nodeScaleRatio");var n,i=this._symbolDraw,r=this._lineDraw,s=this.group;"view"===e.type&&(n={position:e.position,scale:e.scale},this._firstRender?s.attr(n):Si(s,n,o)),LM(o.getGraph(),this._getNodeGlobalScale(o));var l=o.getData();i.updateData(l);var u=o.getEdgeData();r.updateData(u),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var h=o.forceLayout,c=o.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,c),l.eachItemGraphicEl(function(t,e){var n=l.getItemModel(e);t.off("drag").off("dragend");var i=n.get("draggable");i&&t.on("drag",function(){h&&(h.warmUp(),this._layouting||this._startForceLayoutIteration(h,c),h.setFixed(e),l.setItemLayout(e,t.position))},this).on("dragend",function(){h&&h.setUnfixed(e)},this),t.setDraggable(i&&h),t.off("mouseover",t.__focusNodeAdjacency),t.off("mouseout",t.__unfocusNodeAdjacency),n.get("focusNodeAdjacency")&&(t.on("mouseover",t.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))},this),l.graph.eachEdge(function(t){var e=t.getGraphicEl();e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){a.dispatchAction({type:"unfocusNodeAdjacency",seriesId:o.id})}))});var d="circular"===o.get("layout")&&o.get("circular.rotateLabel"),p=l.getLayout("cx"),g=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var n,i,o,a,r=t.getSymbolPath();d?(n=l.getItemLayout(e),(i=Math.atan2(n[1]-g,n[0]-p))<0&&(i=2*Math.PI+i),(o=n[0]<p)&&(i-=Math.PI),a=o?"left":"right",r.setStyle({textRotation:-i,textPosition:a,textOrigin:"center"}),r.hoverStyle&&(r.hoverStyle.textPosition=a)):r.setStyle({textRotation:0})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,n,i){var o=this._model.getData().graph,a=i.dataIndex,r=i.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){qu(t,zM,.1)}),o.eachEdge(function(t){qu(t,BM,.1)}),s&&(Ku(s,zM),z(s.edges,function(t){t.dataIndex<0||(Ku(t,BM),Ku(t.node1,zM),Ku(t.node2,zM))})),l&&(Ku(l,BM),Ku(l.node1,zM),Ku(l.node2,zM)))},unfocusNodeAdjacency:function(){var t=this._model.getData().graph;t.eachNode(function(t){qu(t,zM)}),t.eachEdge(function(t){qu(t,BM)})},_startForceLayoutIteration:function(t,n){var i=this;!function e(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!Vl(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){zl(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Bl(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),LM(o.getGraph(),this._getNodeGlobalScale(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),n=this._getNodeGlobalScale(t),i=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scale,o=i&&i[0]||1;return((e.getZoom()-1)*n+1)/o},updateLayout:function(t){LM(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),Ka({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),Ka({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){}),Ka({type:"graphRoam",event:"graphRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=Hl(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});var VM=Z;qa(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),i=t.getGraph().data,o=e.mapArray(e.getName);i.filterSelf(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var n=0;n<a.length;n++)if(!a[n].isSelected(e))return!1}return!0})},this)}),Qa(Db("graph","circle",null)),Qa(function(t){var r={};t.eachSeriesByType("graph",function(i){var o=i.getCategoriesData(),n=i.getData(),a={};o.each(function(t){var e=o.getName(t);a["ec-"+e]=t;var n=o.getItemModel(t).get("itemStyle.color")||i.getColorFromPalette(e,r);o.setItemVisual(t,"color",n)}),o.count()&&n.each(function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=a["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",o.getItemVisual(e,"color")))})})}),Qa(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=$u(t.get("edgeSymbol")),n=$u(t.get("edgeSymbolSize")),u="lineStyle.color".split("."),h="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",n&&n[0]),l.setVisual("toSymbolSize",n&&n[1]),l.setVisual("color",t.get(u)),l.setVisual("opacity",t.get(h)),l.each(function(t){var e=l.getItemModel(t),n=s.getEdgeByIndex(t),i=$u(e.getShallow("symbol",!0)),o=$u(e.getShallow("symbolSize",!0)),a=e.get(u),r=e.get(h);switch(a){case"source":a=n.node1.getVisual("color");break;case"target":a=n.node2.getVisual("color")}i[0]&&n.setVisual("fromSymbol",i[0]),i[1]&&n.setVisual("toSymbol",i[1]),o[0]&&n.setVisual("fromSymbolSize",o[0]),o[1]&&n.setVisual("toSymbolSize",o[1]),n.setVisual("color",a),n.setVisual("opacity",r)})})}),Ja(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];z(n.dimensions,function(t){o=o.concat(i.mapDimension(t,!0))});for(var a=0;a<i.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=i.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?i.setItemLayout(a,n.dataToPoint(r)):i.setItemLayout(a,[NaN,NaN])}Qu(i.graph)}else e&&"none"!==e||Ju(t)})}),Ja(function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&th(t)})}),Ja(function(t){t.eachSeriesByType("graph",function(t){var c,d,p,e,n,i,o,a,r,s,l,u,h,g,f,m=t.coordinateSystem;m&&"view"!==m.type||("force"===t.get("layout")?(c=t.preservedPoints||{},d=t.getGraph(),p=d.data,e=d.edgeData,i=(n=t.getModel("force")).get("initLayout"),t.preservedPoints?p.each(function(t){var e=p.getId(t);p.setItemLayout(t,c[e]||[NaN,NaN])}):i&&"none"!==i?"circular"===i&&th(t):Ju(t),o=p.getDataExtent("value"),a=e.getDataExtent("value"),r=n.get("repulsion"),s=n.get("edgeLength"),N(r)||(r=[r,r]),N(s)||(s=[s,s]),s=[s[1],s[0]],l=p.mapArray("value",function(t,e){var n=p.getItemLayout(e),i=Ri(t,o,r);return isNaN(i)&&(i=(r[0]+r[1])/2),{w:i,rep:i,fixed:p.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),u=e.mapArray("value",function(t,e){var n=d.getEdgeByIndex(e),i=Ri(t,a,s);return isNaN(i)&&(i=(s[0]+s[1])/2),{n1:l[n.node1.dataIndex],n2:l[n.node2.dataIndex],d:i,curveness:n.getModel().get("lineStyle.curveness")||0}}),h=(m=t.coordinateSystem).getBoundingRect(),g=function(p,g,t){for(var e=t.rect,n=e.width,i=e.height,f=[e.x+n/2,e.y+i/2],m=null==t.gravity?.1:t.gravity,o=0;o<p.length;o++){var a=p[o];a.p||(a.p=w(n*(Math.random()-.5)+f[0],i*(Math.random()-.5)+f[1])),a.pp=T(a.p),a.edges=null}var v=.6;return{warmUp:function(){v=.5},setFixed:function(t){p[t].fixed=!0},setUnfixed:function(t){p[t].fixed=!1},step:function(t){for(var e=[],n=p.length,i=0;i<g.length;i++){var o=g[i],a=o.n1;U(e,(u=o.n2).p,a.p);var r=X(e)-o.d,s=u.w/(a.w+u.w);isNaN(s)&&(s=0),q(e,e),a.fixed||VM(a.p,a.p,e,s*r*v),u.fixed||VM(u.p,u.p,e,-(1-s)*r*v)}for(i=0;i<n;i++)(d=p[i]).fixed||(U(e,f,d.p),VM(d.p,d.p,e,m*v));for(i=0;i<n;i++)for(var a=p[i],l=i+1;l<n;l++){var u=p[l];U(e,u.p,a.p),0===(r=X(e))&&(W(e,Math.random()-.5,Math.random()-.5),r=1);var h=(a.rep+u.rep)/r/r;a.fixed||VM(a.pp,a.pp,e,h),u.fixed||VM(u.pp,u.pp,e,-h)}for(var c=[],i=0;i<n;i++){var d=p[i];d.fixed||(U(c,d.p,d.pp),VM(d.p,d.p,c,v),S(d.pp,d.p))}v*=.992,t&&t(p,g,v<.01)}}}(l,u,{rect:h,gravity:n.get("gravity")}),f=g.step,g.step=function(h){for(var t=0,e=l.length;t<e;t++)l[t].fixed&&S(l[t].p,d.getNodeByIndex(t).getLayout());f(function(t,e,n){for(var i=0,o=t.length;i<o;i++)t[i].fixed||d.getNodeByIndex(i).setLayout(t[i].p),c[p.getId(i)]=t[i].p;for(i=0,o=e.length;i<o;i++){var a=e[i],r=d.getEdgeByIndex(i),s=a.n1.p,l=a.n2.p,u=r.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],S(u[0],s),S(u[1],l),+a.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(u)}h&&h(n)})},t.forceLayout=g,t.preservedPoints=c,g.step()):t.forceLayout=null)})}),$a("graphView",{create:function(t,f){var m=[];return t.eachSeriesByType("graph",function(t){var n,e,i,o,a,r,s,l,u,h,c,d,p,g=t.get("coordinateSystem");g&&"view"!==g||(e=[],i=[],Cn((n=t.getData()).mapArray(function(t){var e=n.getItemModel(t);return[+e.get("x"),+e.get("y")]}),e,i),i[0]-e[0]==0&&(i[0]+=1,--e[0]),i[1]-e[1]==0&&(i[1]+=1,--e[1]),o=(i[0]-e[0])/(i[1]-e[1]),c=f,d=o,(p=t.getBoxLayoutParams()).aspect=d,a=so(p,{width:c.getWidth(),height:c.getHeight()}),isNaN(o)&&(e=[a.x,a.y],i=[a.x+a.width,a.y+a.height]),r=i[0]-e[0],s=i[1]-e[1],l=a.width,u=a.height,(h=t.coordinateSystem=new vl).zoomLimit=t.get("scaleLimit"),h.setBoundingRect(e[0],e[1],r,s),h.setViewRect(a.x,a.y,l,u),h.setCenter(t.get("center")),h.setZoom(t.get("zoom")),m.push(h))}),m}}),r_.extend({type:"series.gauge",getInitialData:function(t){var e=t.data||[];return N(e)||(e=[e]),t.data=e,aS(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var GM=Vn.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var n=Math.cos,i=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-n(r)*a*(o/3<=a?1:2),l=e.y-i(r)*a*(o/3<=a?1:2),r=e.angle-Math.PI/2;t.moveTo(s,l),t.lineTo(e.x+n(r)*a,e.y+i(r)*a),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(r)*a,e.y-i(r)*a),t.lineTo(s,l)}}),FM=2*Math.PI,WM=(ea.extend({type:"gauge",render:function(t,e,n){this.group.removeAll();var i,o,a,r,s,l,u=t.get("axisLine.lineStyle.color"),h=(o=n,a=(i=t).get("center"),r=o.getWidth(),s=o.getHeight(),l=Math.min(r,s),{cx:Ei(a[0],o.getWidth()),cy:Ei(a[1],o.getHeight()),r:Ei(i.get("radius"),l/2)});this._renderMain(t,e,n,u,h)},dispose:function(){},_renderMain:function(t,e,n,i,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,h=(u-l)%FM,c=l,d=r.get("width"),p=0;p<i.length;p++){var g=Math.min(Math.max(i[p][0],0),1),f=new my({shape:{startAngle:c,endAngle:u=l+h*g,cx:o.cx,cy:o.cy,clockwise:s,r0:o.r-d,r:o.r},silent:!0});f.setStyle({fill:i[p][1]}),f.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),a.add(f),c=u}function m(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]}var v;s||(v=l,l=u,u=v),this._renderTicks(t,e,n,m,o,l,u,s),this._renderPointer(t,e,n,m,o,l,u,s),this._renderTitle(t,e,n,m,o),this._renderDetail(t,e,n,m,o)},_renderTicks:function(t,e,n,i,o,a,r){for(var s=this.group,l=o.cx,u=o.cy,h=o.r,c=+t.get("min"),d=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),f=t.getModel("axisLabel"),m=t.get("splitNumber"),v=g.get("splitNumber"),y=Ei(p.get("length"),h),x=Ei(g.get("length"),h),_=a,w=(r-a)/m,b=w/v,S=p.getModel("lineStyle").getLineStyle(),M=g.getModel("lineStyle").getLineStyle(),I=0;I<=m;I++){var T,A,D,C,L=Math.cos(_),k=Math.sin(_);if(p.get("show")&&(T=new wy({shape:{x1:L*h+l,y1:k*h+u,x2:L*(h-y)+l,y2:k*(h-y)+u},style:S,silent:!0}),"auto"===S.stroke&&T.setStyle({stroke:i(I/m)}),s.add(T)),f.get("show")&&(A=eh(zi(I/m*(d-c)+c),f.get("formatter")),D=f.get("distance"),C=i(I/m),s.add(new cy({style:fi({},f,{text:A,x:L*(h-y-D)+l,y:k*(h-y-D)+u,textVerticalAlign:k<-.4?"top":.4<k?"bottom":"middle",textAlign:L<-.4?"left":.4<L?"right":"center"},{autoColor:C}),silent:!0}))),g.get("show")&&I!==m){for(var P=0;P<=v;P++){var L=Math.cos(_),k=Math.sin(_),N=new wy({shape:{x1:L*h+l,y1:k*h+u,x2:L*(h-x)+l,y2:k*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&N.setStyle({stroke:i((I+P/v)/m)}),s.add(N),_+=b}_-=b}else _+=w}},_renderPointer:function(i,t,e,o,a,n,r){var s,l,u,h,c=this.group,d=this._data;i.get("pointer.show")?(s=[+i.get("min"),+i.get("max")],l=[n,r],u=i.getData(),h=u.mapDimension("value"),u.diff(d).add(function(t){var e=new GM({shape:{angle:n}});Mi(e,{shape:{angle:Ri(u.get(h,t),s,l,!0)}},i),c.add(e),u.setItemGraphicEl(t,e)}).update(function(t,e){var n=d.getItemGraphicEl(e);Si(n,{shape:{angle:Ri(u.get(h,t),s,l,!0)}},i),c.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=d.getItemGraphicEl(t);c.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Ei(i.get("width"),a.r),r:Ei(i.get("length"),a.r)}),t.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(Ri(u.get(h,e),s,[0,1],!0))),di(t,n.getModel("emphasis.itemStyle").getItemStyle())}),this._data=u):d&&d.eachItemGraphicEl(function(t){c.remove(t)})},_renderTitle:function(t,e,n,i,o){var a,r,s,l,u,h,c=t.getData(),d=c.mapDimension("value"),p=t.getModel("title");p.get("show")&&(a=p.get("offsetCenter"),r=o.cx+Ei(a[0],o.r),s=o.cy+Ei(a[1],o.r),l=+t.get("min"),u=+t.get("max"),h=i(Ri(t.getData().get(d,0),[l,u],[0,1],!0)),this.group.add(new cy({silent:!0,style:fi({},p,{x:r,y:s,text:c.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:h,forceRich:!0})})))},_renderDetail:function(t,e,n,i,o){var a,r,s,l,u,h,c,d,p=t.getModel("detail"),g=+t.get("min"),f=+t.get("max");p.get("show")&&(a=p.get("offsetCenter"),r=o.cx+Ei(a[0],o.r),s=o.cy+Ei(a[1],o.r),l=Ei(p.get("width"),o.r),u=Ei(p.get("height"),o.r),d=i(Ri(c=(h=t.getData()).get(h.mapDimension("value"),0),[g,f],[0,1],!0)),this.group.add(new cy({silent:!0,style:fi({},p,{x:r,y:s,text:eh(c,p.get("formatter")),textWidth:isNaN(l)?null:l,textHeight:isNaN(u)?null:u,textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})})))}}),or({type:"series.funnel",init:function(t){WM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(){return aS(this,["value"])},_defaultLabelLine:function(t){tn(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),n=WM.superCall(this,"getDataParams",t),i=e.mapDimension("value"),o=e.getSum(i);return n.percent=o?+(e.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},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}}}})),HM=nh.prototype,ZM=["itemStyle","opacity"];HM.updateData=function(t,e,n){var i=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=null==(s=t.getItemModel(e).get(ZM))?1:s;i.useStyle({}),n?(i.setShape({points:r.points}),i.setStyle({opacity:0}),Mi(i,{style:{opacity:s}},o,e)):Si(i,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");i.setStyle(O({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),di(this)},HM._updateLabel=function(t,e){var n=this.childAt(1),i=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Si(n,{shape:{points:r.linePoints||r.linePoints}},o,e),Si(i,{style:{x:r.x,y:r.y}},o,e),i.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");gi(i.style,i.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!h.get("show"),n.hoverIgnore=!c.get("show"),n.setStyle({stroke:s}),n.setStyle(h.getModel("lineStyle").getLineStyle()),n.hoverStyle=c.getModel("lineStyle").getLineStyle()},a(nh,rm),ea.extend({type:"funnel",render:function(t){var i=t.getData(),o=this._data,a=this.group;i.diff(o).add(function(t){var e=new nh(i,t);i.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var n=o.getItemGraphicEl(e);n.updateData(i,t),a.add(n),i.setItemGraphicEl(t,n)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),Qa(hS("funnel")),Ja(function(t,S,e){t.eachSeriesByType("funnel",function(t){var e,o=t.getData(),a=o.mapDimension("value"),n=t.get("sort"),r=(e=S,so(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),i=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?i[t]-i[e]:i[e]-i[t]}),o}(o,n),s=[Ei(t.get("minSize"),r.width),Ei(t.get("maxSize"),r.width)],l=o.getDataExtent(a),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);function c(t,e){var n,i=Ri(o.get(a,t)||0,[u,h],s,!0);switch(d){case"left":n=r.x;break;case"center":n=r.x+(r.width-i)/2;break;case"right":n=r.x+r.width-i}return[[n,e],[n+i,e]]}var d=t.get("funnelAlign"),p=t.get("gap"),g=(r.height-p*(o.count()-1))/o.count(),f=r.y;"ascending"===n&&(g=-g,p=-p,f+=r.height,i=i.reverse());for(var m,v=0;v<i.length;v++){var y=i[v],x=i[v+1],_=o.getItemModel(y).get("itemStyle.height");null==_?_=g:(_=Ei(_,r.height),"ascending"===n&&(_=-_));var w=c(y,f),b=c(x,f+_);f+=_+p,o.setItemLayout(y,{points:w.concat(b.slice().reverse())})}(m=o).each(function(t){var e,n,i,o,a,r,s,l,u=m.getItemModel(t),h=u.getModel("label").get("position"),c=u.getModel("labelLine"),d=m.getItemLayout(t),p=d.points,g="inner"===h||"inside"===h||"center"===h;g?(r="center",s=[[e=(p[0][0]+p[1][0]+p[2][0]+p[3][0])/4,l=(p[0][1]+p[1][1]+p[2][1]+p[3][1])/4],[e,l]]):(a=c.get("length"),r="left"===h?(n=(p[3][0]+p[0][0])/2,i=(p[3][1]+p[0][1])/2,e=(o=n-a)-5,"right"):(n=(p[1][0]+p[2][0])/2,i=(p[1][1]+p[2][1])/2,e=(o=n+a)+5,"left"),s=[[n,i],[o,i]],l=i),d.label={linePoints:s,x:e,y:l,verticalAlign:"middle",textAlign:r,inside:g}})})}),qa(dS("funnel"));function UM(t,e,n,i,o){lb.call(this,t,e,n),this.type=i||"value",this.axisIndex=o}UM.prototype={constructor:UM,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},a(UM,lb);function XM(t,e,n,i,o,a){e[0]=oh(e[0],n),e[1]=oh(e[1],n),t=t||0;var r=n[1]-n[0];null!=o&&(o=oh(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===i&&(o=a=Math.abs(e[1]-e[0]),i=0);var s=ih(e,i);e[i]+=t;var l=o||0,u=n.slice();s.sign<0?u[0]+=l:u[1]-=l,e[i]=oh(e[i],u),h=ih(e,i),null!=o&&(h.sign!==s.sign||h.span<o)&&(e[1-i]=e[i]+s.sign*o);var h=ih(e,i);return null!=a&&h.span>a&&(e[1-i]=e[i]+h.sign*a),e}var jM=z,YM=Math.min,qM=Math.max,KM=Math.floor,$M=Math.ceil,JM=zi,QM=Math.PI;ah.prototype={type:"parallel",constructor:ah,_init:function(t,r){var e=t.dimensions,s=t.parallelAxisIndex;jM(e,function(t,e){var n=s[e],i=r.getComponent("parallelAxis",n),o=this._axesMap.set(t,new UM(t,Ur(i),[0,0],i.get("type"),n)),a="category"===o.type;o.onBand=a&&i.get("boundaryGap"),o.inverse=i.get("inverse"),(i.axis=o).model=i,o.coordinateSystem=i.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return n<=a&&a<=n+e.axisLength&&i<=r&&r<=i+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,i){i.eachSeries(function(t){var n;e.contains(t,i)&&(n=t.getData(),jM(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Zr(e.scale,e.model)},this))},this)},resize:function(t,e){this._rect=so(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,n=this._rect,i=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=n[o[r]],l=[0,s],u=this.dimensions.length,h=rh(e.get("axisExpandWidth"),l),c=rh(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3<u&&c<u&&1<c&&0<h&&0<s,p=e.get("axisExpandWindow");p?(t=rh(p[1]-p[0],l),p[1]=p[0]+t):(t=rh(h*(c-1),l),(p=[h*(e.get("axisExpandCenter")||KM(u/2))-t/2])[1]=p[0]+t);var g=(s-t)/(u-c);g<3&&(g=0);var f=[KM(JM(p[0]/h,1))+1,$M(JM(p[1]/h,1))-1],m=g/h*p[0];return{layout:a,pixelDimIndex:r,layoutBase:n[i[r]],layoutLength:s,axisBase:n[i[1-r]],axisLength:n[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:p,axisCount:u,winInnerIndices:f,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect,t=this._axesMap,e=this.dimensions,u=this._makeLayoutInfo(),h=u.layout;t.each(function(t){var e=[0,u.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),jM(e,function(t,e){var n=(u.axisExpandable?function(t,e){var n,i,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(n=o-(r-1-t)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:i}}:function(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}})(e,u),i={horizontal:{x:n.position,y:u.axisLength},vertical:{x:0,y:n.position}},o={horizontal:QM/2,vertical:0},a=[i[h].x+l.x,i[h].y+l.y],r=o[h],s=dt();vt(s,s,r),mt(s,s,a),this._axesLayout[t]={position:a,rotation:r,transform:s,axisNameAvailableWidth:n.axisNameAvailableWidth,axisLabelShow:n.axisLabelShow,nameTruncateMaxWidth:n.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(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];z(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l,u=this.hasAxisBrushed(),h=n;h<i;h++){if(u){l="active";for(var c=e.getValues(r,h),d=0,p=a.length;d<p;d++)if("inactive"===s[d].getActiveState(c[d])){l="inactive";break}}else l="normal";t(l,h)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(t,e){return Ti([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return D(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),o=i[1]-i[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var r,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];return u?(c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?XM(r,i,a,"all"):l="none"):(o=i[1]-i[0],(i=[qM(0,a[1]*s/o-o/2)])[1]=YM(a[1],i[0]+o),i[0]=i[1]-o),{axisExpandWindow:i,behavior:l}}},Mo.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new ah(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,a.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0],t.coordinateSystem=e.coordinateSystem)}),a}});var tI=ux.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Ym([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var n=e.length-1;0<=n;n--)Bi(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}});v(tI.prototype,Yw),Eb("parallel",tI,function(t,e){return e.type||(e.data?"category":"value")},{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}),ux.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(){ux.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&v(e,t,!0),this._initDimensions()},contains:function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},setAxisExpand:function(e){z(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[];z(I(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),n.push(t.componentIndex)})}}),Ka({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),Ka("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var eI=E,nI=z,iI=L,oI=Math.min,aI=Math.max,rI=Math.pow,sI=1e4,lI=6,uI=6,hI="globalPan",cI={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},dI={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},pI={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},gI=0;sh.prototype={constructor:sh,enableBrush:function(t){return this._brushType&&uh(this),t.brushType&&lh(this,t),this},setPanels:function(t){var e;return t&&t.length?(e=this._panels={},z(t,function(t){e[t.panelId]=D(t)})):this._panels=null,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){nI(this._covers,t,e)},updateCovers:function(o){function n(t,e){return(null!=t.id?t.id:i+e)+"-"+t.brushType}function t(t,e){var n,i=o[t];null!=e&&a[e]===l?r[t]=a[e]:(n=r[t]=null!=e?(a[e].__brushOption=i,a[e]):ch(s,hh(s,i)),gh(s,n))}o=L(o,function(t){return v(D(pI),t,!0)});var i="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new sr(a,o,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),yh(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},o(sh,wf);var fI={mousedown:function(t){var e;this._dragging?Rh.call(this,t):t.target&&t.target.draggable||(kh(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=mh(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e,n=this.group.transformCoordToLocal(t.offsetX,t.offsetY);(function(t,e,n){if(t._brushType){var i=t._zr,o=t._covers,a=mh(t,e,n);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&mI[s.brushType].contain(o[r],n[0],n[1]))return}a&&i.setCursorStyle("crosshair")}})(this,t,n),this._dragging&&(kh(t),(e=Nh(this,t,n,!1))&&xh(this,e))},mouseup:Rh},mI={lineX:Eh(0),lineY:Eh(1),rect:{createCover:function(t,e){return wh(eI(Ah,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=_h(t);return Th(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,n,i){bh(t,e,n,i)},updateCommon:Sh,contain:Ph},polygon:{createCover:function(t,e){var n=new rm;return n.add(new xy({name:"main",style:Ih(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new yy({name:"main",draggable:!0,drift:eI(Dh,t,e),ondragend:eI(xh,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n){e.childAt(0).setShape({points:Lh(t,e,n)})},updateCommon:Sh,contain:Ph}},vI=["axisLine","axisTickLabel","axisName"],yI=ir({type:"parallelAxis",init:function(t,e){yI.superApply(this,"init",arguments),(this._brushController=new sh(e.getZr())).on("brush",k(this._onBrush,this))},render:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g,f,m;g=t,f=e,(m=i)&&"axisAreaSelect"===m.type&&f.findComponents({mainType:"parallelAxis",query:m})[0]===g||(this.axisModel=t,this.api=n,this.group.removeAll(),o=this._axisGroup,this._axisGroup=new rm,this.group.add(this._axisGroup),t.get("show")&&(p=t,r=(a=e.getComponent("parallel",p.get("parallelIndex"))).coordinateSystem,l=(s=t.getAreaSelectStyle()).width,u=t.axis.dim,h=P({strokeContainThreshold:l},r.getAxisLayout(u)),c=new Wb(t,h),z(vI,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(h,s,t,a,l,n),d=i&&!1===i.animation?null:t,Di(o,this._axisGroup,d)))},_refreshBrushController:function(t,e,n,i,o,a){var r,s,l=n.axis.getExtent(),u=l[1]-l[0],h=Math.min(30,.1*Math.abs(u)),c=Qt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=h,c.width+=2*h,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:zh(c),isTargetByCursor:Vh(c,a,i),getLinearBrushOtherExtent:Bh(c,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((s=(r=n).axis,L(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[s.dataToCoord(t[0],!0),s.dataToCoord(t[1],!0)]}})))},_onBrush:function(t,e){var n=this.axisModel,i=n.axis,o=L(t,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});!n.option.realtime!==e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},dispose:function(){this._brushController.dispose()}});ir({type:"parallel",render:function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},z(xI,function(t,e){n.getZr().on(e,this._handlers[e]=k(t,this))},this)),sa(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,n){z(this._handlers,function(t,e){n.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(P({type:"parallelAxisExpand"},t))}});var xI={mousedown:function(t){Fh(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Fh(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){var e,n,i;!this._mouseDownPoint&&Fh(this,"mousemove")&&("jump"===(i=(n=(e=this._model).coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY])).behavior)&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null}))}};Ya(function(t){var i,e,n;(e=t).parallel||(n=!1,z(e.series,function(t){t&&"parallel"===t.type&&(n=!0)}),n&&(e.parallel=[{}])),z(Qe((i=t).parallelAxis),function(t){var e,n;B(t)&&(e=t.parallelIndex||0,(n=Qe(i.parallel)[e])&&n.parallelAxisDefault&&v(t,n.parallelAxisDefault,!1))})}),r_.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t,e,n,i,o=this.getSource();return e=this,(t=o).encodeDefine||(n=e.ecModel.getComponent("parallel",e.get("parallelIndex")))&&(i=t.encodeDefine=C(),z(n.dimensions,function(t){var e=+t.replace("dim","");i.set(t,e)})),Mr(o,this)},getRawIndicesByActiveState:function(n){var t=this.coordinateSystem,i=this.getData(),o=[];return t.eachActiveState(i,function(t,e){n===t&&o.push(i.getRawIndex(e))}),o},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 _I=(ea.extend({type:"parallel",init:function(){this._dataGroup=new rm,this.group.add(this._dataGroup),this._data,this._initialized},render:function(o,t,e,a){var n,i,r,s,l,u,h,c,d=this._dataGroup,p=o.getData(),g=this._data,f=o.coordinateSystem,m=f.dimensions,v=Zh(o);p.diff(g).add(function(t){Uh(Hh(p,d,t,m,f),p,t,v)}).update(function(t,e){var n=g.getItemGraphicEl(e),i=Wh(p,t,m,f);p.setItemGraphicEl(t,n),Si(n,{shape:{points:i}},a&&!1===a.animation?null:o,t),Uh(n,p,t,v)}).remove(function(t){var e=g.getItemGraphicEl(t);d.remove(e)}).execute(),this._initialized||(this._initialized=!0,r=o,s=function(){setTimeout(function(){d.removeClipPath()})},l=(i=f).model,u=i.getRect(),h=new _y({shape:{x:u.x,y:u.y,width:u.width,height:u.height}}),c="horizontal"===l.get("layout")?"width":"height",h.setShape(c,0),Mi(h,{shape:{width:u.width,height:u.height}},r,s),n=h,d.setClipPath(n)),this._data=p},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var n=e.getData(),i=e.coordinateSystem,o=i.dimensions,a=Zh(e),r=t.start;r<t.end;r++){var s=Hh(n,this._dataGroup,r,o,i);s.incremental=!0,Uh(s,n,r,a)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}}),["lineStyle","normal","opacity"]);Qa({seriesType:"parallel",reset:function(t,e){var n=t.getModel("itemStyle"),i=t.getModel("lineStyle"),o=e.get("color"),a=i.get("color")||n.get("color")||o[t.seriesIndex%o.length],r=t.get("inactiveOpacity"),s=t.get("activeOpacity"),l=t.getModel("lineStyle").getLineStyle(),u=t.coordinateSystem,h=t.getData(),c={normal:l.opacity,active:s,inactive:r};return h.setVisual("color",a),{progress:function(t,o){u.eachActiveState(o,function(t,e){var n,i=c[t];"normal"!==t||!o.hasItemOption||null!=(n=o.getItemModel(e).get(_I,!0))&&(i=n),o.setItemVisual(e,"opacity",i)},t.start,t.end)}}}});var wI=r_.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,n=t.data||t.nodes;if(n&&e)return bM(n,e,this,!0).data},setNodePosition:function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,n){if("edge"!==n)return wI.superCall(this,"formatTooltip",t,e);var i=this.getDataParams(t,n),o=i.data,a=o.source+" -- "+o.target;return i.value&&(a+=" : "+i.value),Qi(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(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},itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),bI=["itemStyle","opacity"],SI=["lineStyle","opacity"],MI=jn({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 n=e.extent;"vertical"===e.orient?(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()}});ar({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(w,t,i){var e,n,o,a,r=this,s=w.getGraph(),b=this.group,l=w.layoutInfo,S=l.width,M=l.height,u=w.getData(),I=w.getData("edge"),T=w.get("orient");this._model=w,b.removeAll(),b.attr("position",[l.x,l.y]),s.eachEdge(function(t){var e=new MI;e.dataIndex=t.dataIndex,e.seriesIndex=w.seriesIndex,e.dataType="edge";var n,i,o,a,r,s,l,u,h=t.getModel("lineStyle"),c=h.get("curveness"),d=t.node1.getLayout(),p=t.node1.getModel(),g=p.get("localX"),f=p.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),y=v.get("localX"),x=v.get("localY"),_=t.getLayout();switch(e.shape.extent=Math.max(1,_.dy),u="vertical"===(e.shape.orient=T)?(n=(null!=g?g*S:d.x)+_.sy,i=(null!=f?f*M:d.y)+d.dy,o=(null!=y?y*S:m.x)+_.ty,r=n,s=i*(1-c)+(a=null!=x?x*M:m.y)*c,l=o,i*c+a*(1-c)):(n=(null!=g?g*S:d.x)+d.dx,i=(null!=f?f*M:d.y)+_.sy,r=n*(1-c)+(o=null!=y?y*S:m.x)*c,s=i,l=n*c+o*(1-c),a=(null!=x?x*M:m.y)+_.ty),e.setShape({x1:n,y1:i,x2:o,y2:a,cpx1:r,cpy1:s,cpx2:l,cpy2:u}),e.setStyle(h.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}di(e,t.getModel("emphasis.lineStyle").getItemStyle()),b.add(e),I.setItemGraphicEl(t.dataIndex,e)}),s.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),o=n.get("localY"),a=n.getModel("label"),r=n.getModel("emphasis.label"),s=new _y({shape:{x:null!=i?i*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle()}),l=t.getModel("emphasis.itemStyle").getItemStyle();gi(s.style,l,a,r,{labelFetcher:w,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),di(s,l),b.add(s),u.setItemGraphicEl(t.dataIndex,s),s.dataType="node"}),u.eachItemGraphicEl(function(t,n){var e=u.getItemModel(n);e.get("draggable")&&(t.drift=function(t,e){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:w.id,dataIndex:u.getRawIndex(n),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),e.get("focusNodeAdjacency")&&(t.off("mouseover").on("mouseover",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,dataIndex:t.dataIndex})}),t.off("mouseout").on("mouseout",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:w.id})}))}),I.eachItemGraphicEl(function(t,e){I.getItemModel(e).get("focusNodeAdjacency")&&(t.off("mouseover").on("mouseover",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,edgeDataIndex:t.dataIndex})}),t.off("mouseout").on("mouseout",function(){r._focusAdjacencyDisabled||i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:w.id})}))}),!this._data&&w.get("animation")&&b.setClipPath((e=b.getBoundingRect(),n=w,o=function(){b.removeClipPath()},Mi(a=new _y({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}}),{shape:{width:e.width+20,height:e.height+20}},n,o),a)),this._data=w.getData()},dispose:function(){},focusNodeAdjacency:function(t,e,n,i){var o,a,r,s=this._model.getData(),l=s.graph,u=i.dataIndex,h=s.getItemModel(u),c=i.edgeDataIndex;null==u&&null==c||(o=l.getNodeByIndex(u),a=l.getEdgeByIndex(c),l.eachNode(function(t){jh(t,bI,.1)}),l.eachEdge(function(t){jh(t,SI,.1)}),o&&(Yh(o,bI),"outEdges"===(r=h.get("focusNodeAdjacency"))?z(o.outEdges,function(t){t.dataIndex<0||(Yh(t,SI),Yh(t.node2,bI))}):"inEdges"===r?z(o.inEdges,function(t){t.dataIndex<0||(Yh(t,SI),Yh(t.node1,bI))}):"allEdges"===r&&z(o.edges,function(t){t.dataIndex<0||(Yh(t,SI),Yh(t.node1,bI),Yh(t.node2,bI))})),a&&(Yh(a,SI),Yh(a.node1,bI),Yh(a.node2,bI)))},unfocusNodeAdjacency:function(){var t=this._model.getGraph();t.eachNode(function(t){jh(t,bI)}),t.eachEdge(function(t){jh(t,SI)})}}),Ka({type:"dragNode",event:"dragNode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),Ja(function(t,h,e){t.eachSeriesByType("sankey",function(t){var e,n=t.get("nodeWidth"),i=t.get("nodeGap"),o=(e=h,so(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})),a=(t.layoutInfo=o).width,r=o.height,s=t.getGraph(),l=s.nodes,u=s.edges;z(l,function(t){var e=nc(t.outEdges,ec),n=nc(t.inEdges,ec),i=Math.max(e,n);t.setLayout({value:i},!0)}),Kh(l,u,n,i,a,r,0!==I(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"))})}),Qa(function(t,e){t.eachSeriesByType("sankey",function(i){var o,a,t=i.getGraph().nodes;t.length&&(o=1/0,a=-1/0,z(t,function(t){var e=t.getLayout().value;e<o&&(o=e),a<e&&(a=e)}),z(t,function(t){var e=new oM({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:i.get("color")}).mapValueToVisual(t.getLayout().value);t.setVisual("color",e);var n=t.getModel().get("itemStyle.color");null!=n&&t.setVisual("color",n)}))})});var II={_baseAxisDim:null,getInitialData:function(t,e){var n,i,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",n=o.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=a.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l,u=["x","y"],h="horizontal"===t.layout?0:1,c=this._baseAxisDim=u[h],d=u[1-h],p=[o,a],g=p[h].get("type"),f=p[1-h].get("type"),m=t.data;m&&i&&(l=[],z(m,function(t,e){var n;t.value&&N(t.value)?(n=t.value.slice(),t.value.unshift(e)):N(t)?(n=t.slice(),t.unshift(e)):n=t,l.push(n)}),t.data=l);var v=this.defaultValueDimensions;return aS(this,{coordDimensions:[{name:c,type:hr(g),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:hr(f),dimsDef:v.slice()}],dimensionsCount:v.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};o(r_.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}}),II,!0);var TI=["itemStyle"],AI=["emphasis","itemStyle"],DI=(ea.extend({type:"boxplot",render:function(t){var o=t.getData(),a=this.group,r=this._data;this._data||a.removeAll();var s="horizontal"===t.get("layout")?1:0;o.diff(r).add(function(t){var e;o.hasValue(t)&&(e=ic(o.getItemLayout(t),o,t,s,!0),o.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var n,i=r.getItemGraphicEl(e);o.hasValue(t)?(n=o.getItemLayout(t),i?oc(n,i,o,t):i=ic(n,o,t,s),a.add(i),o.setItemGraphicEl(t,i)):a.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},remove:function(){var e=this.group,t=this._data;this._data=null,t&&t.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:x}),Vn.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])}})),CI=["itemStyle","borderColor"],LI=z;Qa(function(i,t){var o=i.get("color");i.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],n=t.getData();n.setVisual({legendSymbol:"roundRect",color:t.get(CI)||e}),i.isSeriesFiltered(t)||n.each(function(t){var e=n.getItemModel(t);n.setItemVisual(t,{color:e.get(CI,!0)})})})}),Ja(function(t){var i,o,e=(i=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=M(o,e);n<0&&(n=o.length,o[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),i);LI(e,function(n){var t=n.seriesModels;t.length&&(function(t){var e,n,i,o=t.axis,a=t.seriesModels,r=a.length,s=t.boxWidthList=[],l=t.boxOffsetList=[],u=[];"category"===o.type?n=o.getBandWidth():(i=0,LI(a,function(t){i=Math.max(i,t.getData().count())}),e=o.getExtent(),Math.abs(e[1]-e[0])),LI(a,function(t){var e=t.get("boxWidth");N(e)||(e=[e,e]),u.push([Ei(e[0],n)||0,Ei(e[1],n)||0])});var h=.8*n-2,c=h/r*.3,d=(h-c*(r-1))/r,p=d/2-h/2;LI(a,function(t,e){l.push(p),p+=c+d,s.push(Math.min(Math.max(d,u[e][0]),u[e][1]))})}(n),LI(t,function(t,e){!function(t,r,e){function n(t,e,n){var i,o=l.get(e,n),a=[];return a[u]=t,a[h]=o,isNaN(t)||isNaN(o)?i=[NaN,NaN]:(i=s.dataToPoint(a))[u]+=r,i}function i(t,e,n){var i=e.slice(),o=e.slice();i[u]+=a,o[u]-=a,n?t.push(i,o):t.push(o,i)}function o(t,e){var n=e.slice(),i=e.slice();n[u]-=a,i[u]+=a,t.push(n,i)}var s=t.coordinateSystem,l=t.getData(),a=e/2,u="horizontal"===t.get("layout")?0:1,h=1-u,c=["x","y"],d=l.mapDimension(c[u]),p=l.mapDimension(c[h],!0);if(!(null==d||p.length<5))for(var g=0;g<l.count();g++){var f=l.get(d,g),m=n(f,p[2],g),v=n(f,p[0],g),y=n(f,p[1],g),x=n(f,p[3],g),_=n(f,p[4],g),w=[];i(w,y,0),i(w,x,1),w.push(v,y,_,x),o(w,v),o(w,_),o(w,m),l.setItemLayout(g,{initBaseline:m[h],ends:w})}}(t,n.boxOffsetList[e],n.boxWidthList[e])}))})}),o(r_.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)}}),II,!0);var kI=["itemStyle"],PI=["emphasis","itemStyle"],NI=["color","color0","borderColor","borderColor0"],OI=(ea.extend({type:"candlestick",render:function(t){this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(o){var a=o.getData(),r=this._data,s=this.group,l=a.getLayout("isSimpleBox");this._data||s.removeAll(),a.diff(r).add(function(t){var e,n;a.hasValue(t)&&(Mi(e=ac(n=a.getItemLayout(t),0,!0),{shape:{points:n.ends}},o,t),rc(e,a,t,l),s.add(e),a.setItemGraphicEl(t,e))}).update(function(t,e){var n,i=r.getItemGraphicEl(e);a.hasValue(t)?(n=a.getItemLayout(t),i?Si(i,{shape:{points:n.ends}},o,t):i=ac(n),rc(i,a,t,l),s.add(i),a.setItemGraphicEl(t,i)):s.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=a},_renderLarge:function(t){this._clear(),sc(t,this.group)},_incrementalRenderNormal:function(t,e){for(var n,i,o=e.getData(),a=o.getLayout("isSimpleBox");null!=(n=t.next());){rc(i=ac(o.getItemLayout(n)),o,n,a),i.incremental=!0,this.group.add(i)}},_incrementalRenderLarge:function(t,e){sc(e,this.group,!0)},remove:function(){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:x}),Vn.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))}})),RI=Vn.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var n,i=e.points,o=0;o<i.length;){this.__sign===i[o++]?(n=i[o++],t.moveTo(n,i[o++]),t.lineTo(n,i[o++])):o+=3}}}),EI=["itemStyle","borderColor"],zI=["itemStyle","borderColor0"],BI=["itemStyle","color"],VI=["itemStyle","color0"],GI={seriesType:"candlestick",plan:u_(),performRawSeries:!0,reset:function(t,e){function a(t,e){return e.get(0<t?BI:VI)}function r(t,e){return e.get(0<t?EI:zI)}var n=t.getData(),i=t.pipelineContext.large;if(n.setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!i&&{progress:function(t,e){for(var n;null!=(n=t.next());){var i=e.getItemModel(n),o=e.getItemLayout(n).sign;e.setItemVisual(n,{color:a(o,i),borderColor:r(o,i)})}}}}},FI="undefined"!=typeof Float32Array?Float32Array:Array,WI={seriesType:"candlestick",plan:u_(),reset:function(t){var e,n,i,o,a,r,s,l,b=t.coordinateSystem,u=t.getData(),S=(n=u,o=(e=t).getBaseAxis(),a="category"===o.type?o.getBandWidth():(i=o.getExtent(),Math.abs(i[1]-i[0])/n.count()),r=Ei(G(e.get("barMaxWidth"),a),a),s=Ei(G(e.get("barMinWidth"),1),a),null!=(l=e.get("barWidth"))?Ei(l,a):Math.max(Math.min(a/2,r),s)),h=["x","y"],M=u.mapDimension(h[0]),c=u.mapDimension(h[1],!0),I=c[0],T=c[1],A=c[2],D=c[3];if(u.setLayout({candleWidth:S,isSimpleBox:S<=1.3}),!(null==M||c.length<4))return{progress:t.pipelineContext.large?function(t,e){for(var n,i,o=new FI(5*t.count),a=0,r=[],s=[];null!=(i=t.next());){var l=e.get(M,i),u=e.get(I,i),h=e.get(T,i),c=e.get(A,i),d=e.get(D,i);isNaN(l)||isNaN(c)||isNaN(d)?(o[a++]=NaN,a+=4):(o[a++]=uc(e,i,u,h,T),r[0]=l,r[1]=c,n=b.dataToPoint(r,null,s),o[a++]=n?n[0]:NaN,o[a++]=n?n[1]:NaN,r[1]=d,n=b.dataToPoint(r,null,s),o[a++]=n?n[1]:NaN)}e.setLayout("largePoints",o)}:function(t,e){function n(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:b.dataToPoint(n)}function i(t,e,n){var i=e.slice(),o=e.slice();i[0]=ti(i[0]+S/2,1,!1),o[0]=ti(o[0]-S/2,1,!0),n?t.push(i,o):t.push(o,i)}function o(t){return t[0]=ti(t[0],1),t}for(var a,r,s,l,u;null!=(a=t.next());){var h=e.get(M,a),c=e.get(I,a),d=e.get(T,a),p=e.get(A,a),g=e.get(D,a),f=Math.min(c,d),m=Math.max(c,d),v=n(f,h),y=n(m,h),x=n(p,h),_=n(g,h),w=[];i(w,y,0),i(w,v,1),w.push(o(_),o(y),o(x),o(v)),e.setItemLayout(a,{sign:uc(e,a,c,d,T),initBaseline:d<c?y[1]:v[1],ends:w,brushRect:(r=g,u=l=void 0,l=n(p,s=h),u=n(r,s),l[0]-=S/2,u[0]-=S/2,{x:l[0],y:l[1],width:S,height:u[1]-l[1]})})}}}}};Ya(function(t){t&&N(t.series)&&z(t.series,function(t){B(t)&&"k"===t.type&&(t.type="candlestick")})}),Qa(GI),Ja(WI),r_.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return Mr(this.getSource(),this)},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 HI=cc.prototype;HI.stopEffectAnimation=function(){this.childAt(1).removeAll()},HI.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),o=0;o<3;o++){var a=Kr(e,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),i.add(a)}hc(i,t)},HI.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],o=0;o<i.length;o++){var a=i[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}hc(n,t)},HI.highlight=function(){this.trigger("emphasis")},HI.downplay=function(){this.trigger("normal")},HI.updateData=function(t,e){var n=t.hostModel;this.childAt(0).updateData(t,e);var i,o=this.childAt(1),a=t.getItemModel(e),r=t.getItemVisual(e,"symbol"),s=(N(i=t.getItemVisual(e,"symbolSize"))||(i=[+i,+i]),i),l=t.getItemVisual(e,"color");o.attr("scale",s),o.traverse(function(t){t.attr({fill:l})});var u,h=a.getShallow("symbolOffset");h&&((u=o.position)[0]=Ei(h[0],s[0]),u[1]=Ei(h[1],s[1])),o.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var c,d,p,g={};g.showEffectOn=n.get("showEffectOn"),g.rippleScale=a.get("rippleEffect.scale"),g.brushType=a.get("rippleEffect.brushType"),g.period=1e3*a.get("rippleEffect.period"),g.effectOffset=e/t.count(),g.z=a.getShallow("z")||0,g.zlevel=a.getShallow("zlevel")||0,g.symbolType=r,g.color=l,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===g.showEffectOn?(this._effectCfg?this.updateEffectAnimation(g):this.startEffectAnimation(g),this._effectCfg=g):(this._effectCfg=null,this.stopEffectAnimation(),c=this.childAt(0),d=function(){c.highlight(),"render"!==g.showEffectOn&&this.startEffectAnimation(g)},p=function(){c.downplay(),"render"!==g.showEffectOn&&this.stopEffectAnimation()},this.on("mouseover",d,this).on("mouseout",p,this).on("emphasis",d,this).on("normal",p,this)),this._effectCfg=g},HI.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},a(cc,rm),ar({type:"effectScatter",init:function(){this._symbolDraw=new xs(cc)},render:function(t){var e=t.getData(),n=this._symbolDraw;n.updateData(e),this.group.add(n.group)},updateTransform:function(t){var e=t.getData();this.group.dirty();var n=Cb().reset(t);n.progress&&n.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=_t(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Qa(Db("effectScatter","circle")),Ja(Cb("effectScatter"));var ZI="undefined"==typeof Uint32Array?Array:Uint32Array,UI="undefined"==typeof Float64Array?Array:Float64Array,XI=r_.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],dc(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),XI.superApply(this,"init",arguments)},mergeOption:function(t){var e;t.data=t.data||[],dc(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))),XI.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=n(this._flatCoords,e.flatCoords),this._flatCoordsOffset=n(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}for(var a=this._getCoordsFromItemModel(t),o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var n=t.length,i=new ZI(n),o=new UI(n),a=0,r=0,s=0,l=0;l<n;){s++;var u=t[l++];i[r++]=a+e,i[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t){var a=new gw(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(t,e,n,i){if(t instanceof Array)return NaN;a.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[i]:o:void 0}),a},formatTooltip:function(t){var e=this.getData().getItemModel(t),n=e.get("name");if(n)return n;var i=e.get("fromName"),o=e.get("toName"),a=[];return null!=i&&a.push(i),null!=o&&a.push(o),Qi(a.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,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),jI=pc.prototype;jI.createLine=function(t,e,n){return new Wu(t,e,n)},jI._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");N(i)||(i=[i,i]);var a=n.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Kr(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(n.getItemStyle(["color"])),r.attr("scale",i),r.setColor(a),r.attr("scale",i),this._symbolType=o,this._updateEffectAnimation(t,n,e))},jI._updateEffectAnimation=function(e,t,n){var i,o,a,r,s,l,u,h,c,d=this.childAt(1);d&&(i=this,o=e.getItemLayout(n),a=1e3*t.get("period"),r=t.get("loop"),s=t.get("constantSpeed"),u="function"==typeof(l=V(t.get("delay"),function(t){return t/e.count()*a/3})),d.ignore=!0,this.updateAnimationPoints(d,o),0<s&&(a=this.getLineLength(d)/s*1e3),a===this._period&&r===this._loop||(d.stopAnimation(),h=l,u&&(h=l(n)),0<d.__t&&(h=-a*d.__t),d.__t=0,c=d.animate("",r).when(a,{__t:1}).delay(h).during(function(){i.updateSymbolPosition(d)}),r||c.done(function(){i.remove(d)}),c.start()),this._period=a,this._loop=r)},jI.getLineLength=function(t){return vf(t.__p1,t.__cp1)+vf(t.__cp1,t.__p2)},jI.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]},jI.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},jI.updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,a=t.position,r=In,s=Tn;a[0]=r(e[0],i[0],n[0],o),a[1]=r(e[1],i[1],n[1],o);var l=s(e[0],i[0],n[0],o),u=s(e[1],i[1],n[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},jI.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},a(pc,rm);var YI=gc.prototype;YI._createPolyline=function(t,e,n){var i=t.getItemLayout(e),o=new xy({shape:{points:i}});this.add(o),this._updateCommonStl(t,e,n)},YI.updateData=function(t,e,n){var i=t.hostModel;Si(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},YI._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(O({strokeNoScale:!0,fill:"none",stroke:a},r)),i.hoverStyle=s,di(this)},YI.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},a(gc,rm);var qI=fc.prototype;qI.createLine=function(t,e,n){return new gc(t,e,n)},qI.updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];i+=vf(a,r),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}},qI.getLineLength=function(t){return this._length},qI.updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(i[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(i[r]>e);r++);r=Math.min(r-1,o-2)}J(t.position,n[r],n[r+1],(e-i[r])/(i[r+1]-i[r]));var s=n[r+1][0]-n[r][0],l=n[r+1][1]-n[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},a(fc,pc);var KI=jn({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(r=0;r<n.length;){var o=n[r++];if(0<o){t.moveTo(n[r++],n[r++]);for(var a=1;a<o;a++)t.lineTo(n[r++],n[r++])}}else for(var r=0;r<n.length;){var s,l,u=n[r++],h=n[r++],c=n[r++],d=n[r++];t.moveTo(u,h),0<i?(s=(u+c)/2-(h-d)*i,l=(h+d)/2-(c-u)*i,t.quadraticCurveTo(s,l,c,d)):t.lineTo(c,d)}},findDataIndex:function(){var t=this.shape,e=t.segs,n=t.curveness;if(t.polyline)for(var i=0,o=0;o<e.length;){var a=e[o++];if(0<a)for(var r=e[o++],s=e[o++],l=1;l<a;l++)if(kn(r,s,u=e[o++],h=e[o++]))return i;i++}else for(i=0,o=0;o<e.length;){var r=e[o++],s=e[o++],u=e[o++],h=e[o++];if(0<n){if(Nn(r,s,(r+u)/2-(s-h)*n,(s+h)/2-(u-r)*n,u,h))return i}else if(kn(r,s,u,h))return i;i++}return-1}}),$I=mc.prototype;$I.isPersistent=function(){return!this._incremental},$I.updateData=function(t){this.group.removeAll();var e=new KI({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},$I.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new Xn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},$I.incrementalUpdate=function(t,e){var n=new KI;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},$I.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},$I._setCommon=function(n,t,e){var i=t.hostModel;n.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),n.useStyle(i.getModel("lineStyle").getLineStyle()),n.style.strokeNoScale=!0;var o=t.getVisual("color");o&&n.setStyle("stroke",o),n.setStyle("fill"),e||(n.seriesIndex=i.seriesIndex,n.on("mousemove",function(t){n.dataIndex=null;var e=n.findDataIndex(t.offsetX,t.offsetY);0<e&&(n.dataIndex=e+n.__startIndex)}))},$I._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var JI={seriesType:"lines",plan:u_(),reset:function(f){var m=f.coordinateSystem,v=f.get("polyline"),y=f.pipelineContext.large;return{progress:function(t,e){var n=[];if(y){var i,o=t.end-t.start;if(v){for(var a=0,r=t.start;r<t.end;r++)a+=f.getLineCoordsCount(r);i=new Float32Array(o+2*a)}else i=new Float32Array(4*o);for(var s=0,l=[],r=t.start;r<t.end;r++){c=f.getLineCoords(r,n),v&&(i[s++]=c);for(var u=0;u<c;u++)l=m.dataToPoint(n[u],!1,l),i[s++]=l[0],i[s++]=l[1]}e.setLayout("linesPoints",i)}else for(r=t.start;r<t.end;r++){var h=e.getItemModel(r),c=f.getLineCoords(r,n),d=[];if(v)for(var p=0;p<c;p++)d.push(m.dataToPoint(n[p]));else{d[0]=m.dataToPoint(n[0]),d[1]=m.dataToPoint(n[1]);var g=h.get("lineStyle.curveness");+g&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*g,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*g])}e.setItemLayout(r,d)}}}}};ar({type:"lines",init:function(){},render:function(t,e,n){var i=t.getData(),o=this._updateLineDraw(i,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(i),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=JI.reset(t);a.progress&&a.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return n&&i===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=a?new mc:new Hu(o?i?fc:gc:i?pc:Wu),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||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 QI="lineStyle.opacity".split("."),tT={seriesType:"lines",reset:function(t){var e=vc(t.get("symbol")),n=vc(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),i.setVisual("opacity",t.get(QI)),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=vc(n.getShallow("symbol",!0)),o=vc(n.getShallow("symbolSize",!0)),a=n.get(QI);i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};Ja(JI),Qa(tT),r_.extend({type:"series.heatmap",getInitialData:function(){return Mr(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=Mo.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}}),yc.prototype={update:function(t,e,n,i,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=n;for(var p=0;p<d;++p){var g=t[p],f=g[0],m=g[1],v=i(g[2]);c.globalAlpha=v,c.drawImage(r,f-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){var M,v=x[_+3]/256,I=4*Math.floor(255*v);0<v?(M=a(v)?s:l,0<v&&(v=v*S+b),x[_++]=M[I],x[_++]=M[1+I],x[_++]=M[2+I],x[_++]=M[3+I]*v*256):_+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=Xg()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},_getGradient:function(t,e,n){for(var i=this._gradientPixels,o=i[n]||(i[n]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[n](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},ar({type:"heatmap",render:function(n,t,e){var i;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o,a=n.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(n,e,0,n.getData().count()):"lng"===(o=a.dimensions)[0]&&"lat"===o[1]&&this._renderOnGeo(a,n,i,e)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,n,i){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,n,i,o){var a,r,s,l,u=t.coordinateSystem;"cartesian2d"===u.type&&(a=u.getAxis("x"),r=u.getAxis("y"),s=a.getBandWidth(),l=r.getBandWidth());for(var h=this.group,c=t.getData(),d=t.getModel("itemStyle").getItemStyle(["color"]),p=t.getModel("emphasis.itemStyle").getItemStyle(),g=t.getModel("label"),f=t.getModel("emphasis.label"),m=u.type,v="cartesian2d"===m?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],y=n;y<i;y++){if("cartesian2d"===m){if(isNaN(c.get(v[2],y)))continue;var x=u.dataToPoint([c.get(v[0],y),c.get(v[1],y)]),_=new _y({shape:{x:x[0]-s/2,y:x[1]-l/2,width:s,height:l},style:{fill:c.getItemVisual(y,"color"),opacity:c.getItemVisual(y,"opacity")}})}else{if(isNaN(c.get(v[1],y)))continue;_=new _y({z2:1,shape:u.dataToRect([c.get(v[0],y)]).contentShape,style:{fill:c.getItemVisual(y,"color"),opacity:c.getItemVisual(y,"opacity")}})}var w=c.getItemModel(y);c.hasItemOption&&(d=w.getModel("itemStyle").getItemStyle(["color"]),p=w.getModel("emphasis.itemStyle").getItemStyle(),g=w.getModel("label"),f=w.getModel("emphasis.label"));var b=t.getRawValue(y),S="-";b&&null!=b[2]&&(S=b[2]),gi(d,p,g,f,{labelFetcher:t,labelDataIndex:y,defaultText:S,isRectText:!0}),_.setStyle(d),di(_,c.hasItemOption?p:P({},p)),(_.incremental=o)&&(_.useHoverLayer=!0),h.add(_),c.setItemGraphicEl(y,_)}},_renderOnGeo:function(o,t,e,n){var i=e.targetVisuals.inRange,a=e.targetVisuals.outOfRange,r=t.getData(),s=this._hmLayer||this._hmLayer||new yc;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=o.getViewRect().clone(),u=o.getRoamTransform();l.applyTransform(u);var h,c,d,p,g,f,m,v,y,x=Math.max(l.x,0),_=Math.max(l.y,0),w=Math.min(l.width+l.x,n.getWidth()),b=Math.min(l.height+l.y,n.getHeight()),S=w-x,M=b-_,I=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],T=r.mapArray(I,function(t,e,n){var i=o.dataToPoint([t,e]);return i[0]-=x,i[1]-=_,i.push(n),i}),A=e.getExtent(),D="visualMap.continuous"===e.type?(m=A,v=e.option.range,y=m[1]-m[0],v=[(v[0]-m[0])/y,(v[1]-m[0])/y],function(t){return t>=v[0]&&t<=v[1]}):(h=A,c=e.getPieceList(),d=e.option.selected,p=h[1]-h[0],g=(c=L(c,function(t){return{interval:[(t.interval[0]-h[0])/p,(t.interval[1]-h[0])/p]}})).length,f=0,function(t){for(e=f;e<g;e++)if((n=c[e].interval)[0]<=t&&t<=n[1]){f=e;break}if(e===g)for(var e=f-1;0<=e;e--){var n=c[e].interval;if(n[0]<=t&&t<=n[1]){f=e;break}}return 0<=e&&e<g&&d[e]});s.update(T,S,M,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},D);var C=new We({style:{width:S,height:M,x:x,y:_,image:s.canvas},silent:!0});this.group.add(C)},dispose:function(){}});var eT=Qb.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,eT.superApply(this,"getInitialData",arguments)}}),nT=["itemStyle","borderWidth"],iT=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],oT=new gy;ar({type:"pictorialBar",render:function(t,e,n){var c=this.group,d=t.getData(),p=this._data,i=t.coordinateSystem,o=!!i.getBaseAxis().isHorizontal(),a=i.grid.getRect(),g={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:iT[+o],categoryDim:iT[1-o]};return d.diff(p).add(function(t){var e,n,i;d.hasValue(t)&&(e=Tc(d,t),n=xc(d,t,e,g),i=Lc(d,g,n),d.setItemGraphicEl(t,i),c.add(i),Rc(i,g,n))}).update(function(t,e){var n,i,o,a,r,s,l,u,h=p.getItemGraphicEl(e);d.hasValue(t)?(n=Tc(d,t),i=xc(d,t,n,g),o=Pc(d,i),h&&o!==h.__pictorialShapeStr&&(c.remove(h),d.setItemGraphicEl(t,null),h=null),h?(a=h,r=g,l=(s=i).animationModel,u=s.dataIndex,Si(a.__pictorialBundle,{position:s.bundlePosition.slice()},l,u),s.symbolRepeat?bc(a,r,s,!0):Sc(a,0,s,!0),Mc(a,s,!0),Ic(a,r,s,!0)):h=Lc(d,g,i,!0),d.setItemGraphicEl(t,h),h.__pictorialSymbolMeta=i,c.add(h),Rc(h,g,i)):c.remove(h)}).remove(function(t){var e=p.getItemGraphicEl(t);e&&kc(p,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=d,this.group},dispose:x,remove:function(e){var t=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){kc(n,t.dataIndex,e,t)}):t.removeAll()}}),Ja(E(Br,"pictorialBar")),Qa(Db("pictorialBar","roundRect"));function aT(t,e,n,i,o){lb.call(this,t,e,n),this.type=i||"value",this.position=o||"bottom",this.orient=null}aT.prototype={constructor:aT,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},a(aT,lb),Mo.register("single",{create:function(i,o){var a=[];return i.eachComponent("singleAxis",function(t,e){var n=new zc(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,a.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0],t.coordinateSystem=e&&e.coordinateSystem)}),a},dimensions:(zc.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:zc,_init:function(t){var e=this.dimension,n=new aT(e,Ur(t),[0,0],t.get("type"),t.get("position")),i="category"===n.type;n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),n.orient=t.get("orient"),(t.axis=n).model=t,(n.coordinateSystem=this)._axis=n},update:function(t){t.eachSeries(function(t){var e;t.coordinateSystem===this&&(z((e=t.getData()).mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Zr(this._axis.scale,this._axis.model))},this)},resize:function(t,e){this._rect=so({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,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},_updateAxisTransform:function(t,e){var n=t.getExtent(),i=n[0]+n[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return i-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(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.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(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i}}).dimensions});var rT=["axisLine","axisTickLabel","axisName"],sT=Yb.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var o=this.group;o.removeAll();var a=Bc(t),r=new Wb(t,a);z(rT,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),sT.superCall(this,"render",t,e,n,i)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){for(var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),o=i.get("width"),a=(a=i.get("color"))instanceof Array?a:[a],r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:n}),c=[],d=[],p=0;p<h.length;++p){var g=e.toGlobalCoord(h[p].coord);s?(c[0]=g,c[1]=r.y,d[0]=g,d[1]=r.y+r.height):(c[0]=r.x,c[1]=g,d[0]=r.x+r.width,d[1]=g);var f=u++%a.length;l[f]=l[f]||[],l[f].push(new wy(Jn({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0})))}for(p=0;p<l.length;++p)this.group.add(Cy(l[p],{style:{stroke:a[p%a.length],lineDash:i.getLineDash(o),lineWidth:o},silent:!0}))}}}),lT=ux.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});v(lT.prototype,Yw),Eb("single",lT,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});function uT(t,e){var n,i=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var a=n.getData(),r=sn(a,t);if(null==r||r<0||N(r))return{point:[]};var s,l=a.getItemGraphicEl(r),u=n.coordinateSystem;return n.getTooltipPosition?i=n.getTooltipPosition(r)||[]:u&&u.dataToPoint?i=u.dataToPoint(a.getValues(L(u.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[]:l&&((s=l.getBoundingRect().clone()).applyTransform(l.transform),i=[s.x+s.width/2,s.y+s.height/2]),{point:i,el:l}}var hT=z,cT=E,dT=ln(),pT=(nr({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}}}),ln()),gT=z,fT=ir({type:"axisPointer",render:function(t,e,n){var i=e.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Zc("axisPointer",n,function(t,e,n){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){jc(e.getZr(),"axisPointer"),fT.superApply(this._model,"remove",arguments)},dispose:function(t,e){jc("axisPointer",e),fT.superApply(this._model,"dispose",arguments)}}),mT=ln(),vT=D,yT=k;gn((Yc.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,n,i){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h,c=this._moveAnimation=this.determineAnimation(t,e);r?(h=E(qc,e,c),this.updatePointerEl(r,l,h,e),this.updateLabelEl(r,l,h,e)):(r=this._group=new rm,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),n.getZr().add(r)),Jc(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"!==n&&null!=n)return!0===n;var r=this.animationThreshold;if(o&&i.getBandWidth()>r)return!0;if(a){var s=Ks(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(){},createPointerEl:function(t,e){var n,i=e.pointer;i&&(n=mT(t).pointerEl=new Ey[i.type](vT(e.pointer)),t.add(n))},createLabelEl:function(t,e,n,i){var o;e.label&&(o=mT(t).labelEl=new _y(vT(e.label)),t.add(o),Kc(o,i))},updatePointerEl:function(t,e,n){var i=mT(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var o=mT(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{shape:e.label.shape,position:e.label.position}),Kc(o,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),r=n.get("status");if(!a.get("show")||!r||"hide"===r)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Li(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Mf(t.event)},onmousedown:yT(this._onHandleDragMove,this,0,0),drift:yT(this._onHandleDragMove,this),ondragend:yT(this._onHandleDragEnd,this)}),i.add(o)),Jc(o,n,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");N(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),sa(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){qc(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$c(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n,i=this._handle;i&&(this._dragging=!0,n=this.updateHandleTransform($c(i),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=n,i.stopAnimation(),i.attr($c(n)),mT(i).lastProp=null,this._doDispatchAxisPointer())},_doDispatchAxisPointer:function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},_onHandleDragEnd:function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=Yc);var xT=Yc.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.grid,u=i.get("type"),h=sd(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0));u&&"none"!==u&&(a=Qc(i),(r=_T[u](s,c,h,a)).style=a,t.graphicKey=r.type,t.pointer=r),id(e,t,el(l.model,n),n,i,o)},getHandleTransform:function(t,e,n){var i=el(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:nd(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),r=sd(o,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}}}),_T={line:function(t,e,n,i){var o=od([e,n[0]],[e,n[1]],ld(t));return Jn({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:ad([e-i/2,n[0]],[i,o],ld(t))}}};Yb.registerAxisPointerClass("CartesianAxisPointer",xT),Ya(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!N(e)&&(t.axisPointer.link=[e]))}),qa(j_.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Ys(t,e)}),Ka({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i,o,a,r,s,l,u,h,c=t.currTrigger,d=[t.x,t.y],p=t,g=t.dispatchAction||k(n.dispatchAction,n),f=e.getComponent("axisPointer").coordSysAxesInfo;if(f){Hc(d)&&(d=uT({seriesIndex:p.seriesIndex,dataIndex:p.dataIndex},e).point);var m=Hc(d),v=p.axesInfo,y=f.axesInfo,x="leave"===c||Hc(d),_={},w={},b={list:[],map:{}},S={showPointer:cT(Gc,w),showTooltip:cT(Fc,b)};hT(f.coordSysMap,function(t,e){var a=m||t.containPoint(d);hT(f.coordSysAxesInfo[e],function(t,e){var n,i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(v,t);x||!a||v&&!o||(null!=(n=o&&o.value)||m||(n=i.pointToData(d)),null!=n&&Vc(t,n,S,!1,_))})});var M={};return hT(y,function(o,t){var a=o.linkGroup;a&&!w[t]&&hT(a.axesInfo,function(t,e){var n,i=w[e];t!==o&&i&&(n=i.value,a.mapper&&(n=o.axis.scale.parse(a.mapper(n,Wc(t),Wc(o)))),M[o.key]=n)})}),hT(M,function(t,e){Vc(y[e],t,S,!0,_)}),l=w,u=y,h=_.axesInfo=[],hT(u,function(t,e){var n=t.axisPointerModel.option,i=l[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&h.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),i=b,a=t,r=g,!Hc(o=d)&&i.list.length?(s=((i.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},r({type:"showTip",escapeConnect:!0,x:o[0],y:o[1],tooltipOption:a.tooltipOption,position:a.position,dataIndexInside:s.dataIndexInside,dataIndex:s.dataIndex,seriesIndex:s.seriesIndex,dataByCoordSys:i.list})):r({type:"hideTip"}),function(t,e){var n=e.getZr(),i=dT(n).axisPointerLastHighlights||{},o=dT(n).axisPointerLastHighlights={};hT(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&hT(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var a=[],r=[];z(i,function(t,e){o[e]||r.push(t)}),z(o,function(t,e){i[e]||a.push(t)}),r.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,batch:r}),a.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,batch:a})}(y,n),_}});var wT=["x","y"],bT=["width","height"],ST=Yc.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.coordinateSystem,u=hd(l,1-ud(s)),h=l.dataToPoint(e)[0],c=i.get("type");c&&"none"!==c&&(a=Qc(i),(r=MT[c](s,h,u,a)).style=a,t.graphicKey=r.type,t.pointer=r),id(e,t,Bc(n),n,i,o)},getHandleTransform:function(t,e,n){var i=Bc(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:nd(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.coordinateSystem,a=ud(i),r=hd(o,a),s=t.position;s[a]+=e[a],s[a]=Math.min(r[1],s[a]),s[a]=Math.max(r[0],s[a]);var l=hd(o,1-a),u=(l[1]+l[0])/2,h=[u,u];return h[a]=s[a],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),MT={line:function(t,e,n,i){var o=od([e,n[0]],[e,n[1]],ud(t));return Jn({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:ad([e-i/2,n[0]],[i,o],ud(t))}}};Yb.registerAxisPointerClass("SingleAxisPointer",ST),ir({type:"single"});var IT=r_.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){IT.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,n=L(qh().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),i=n.length,o=-1,a=-1,r=0;r<i;++r){var s=n[r].dataList.length;o<s&&(o=s,a=r)}for(var l=0;l<i;++l)if(l!==a)for(var u=n[l].name,h=0;h<o;++h){for(var c=n[a].dataList[h][0],d=n[l].dataList.length,p=-1,g=0;g<d;++g)if(n[l].dataList[g][0]===c){p=g;break}-1===p&&(t[e]=[],t[e][0]=c,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){for(var n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=I(t.data,function(t){return void 0!==t[2]}),o=this.fixData(i||[]),a=[],r=this.nameMap=C(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=Mw(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:hr(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new gw(u,this);return h.initData(o),h},getLayerSeries:function(){for(var n=this.getData(),t=n.count(),e=[],i=0;i<t;++i)e[i]=i;for(var o=L(qh().key(function(t){return n.get("name",t)}).entries(e),function(t){return{name:t.key,indices:t.values}}),a=n.mapDimension("single"),r=0;r<o.length;++r)o[r].indices.sort(function(t,e){return n.get(a,t)-n.get(a,e)});return o},getAxisTooltipData:function(t,e){N(t)||(t=t?[t]:[]);for(var n,i=this.getData(),o=this.getLayerSeries(),a=[],r=o.length,s=0;s<r;++s){for(var l=Number.MAX_VALUE,u=-1,h=o[s].indices.length,c=0;c<h;++c){var d=i.get(t[0],o[s].indices[c]),p=Math.abs(d-e);p<=l&&(n=d,l=p,u=o[s].indices[c])}a.push(u)}return{dataIndices:a,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),n=e.getName(t),i=e.get(e.mapDimension("value"),t);return!isNaN(i)&&null!=i||(i="-"),Qi(n+" : "+i)},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}}}});ar({type:"themeRiver",init:function(){this._layers=[]},render:function(T){function t(t){return t.name}function e(t,e,n){var i,o,a,r,s=this._layers;if("remove"!==t){for(var l,u=[],h=[],c=C[e].indices,d=0;d<c.length;d++){var p=A.getItemLayout(c[d]),g=p.x,f=p.y0,m=p.y;u.push([g,f]),h.push([g,f+m]),l=A.getItemVisual(c[d],"color")}var v,y,x,_=A.getItemLayout(c[0]),w=A.getItemModel(c[d-1]),b=w.getModel("label"),S=b.get("margin");"add"===t?(v=L[e]=new rm,y=new Ab({shape:{points:u,stackedOnPoints:h,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),x=new cy({style:{x:_.x-S,y:_.y0+_.y/2}}),v.add(y),v.add(x),D.add(v),y.setClipPath((i=y.getBoundingRect(),o=T,a=function(){y.removeClipPath()},Mi(r=new _y({shape:{x:i.x-10,y:i.y-10,width:0,height:i.height+20}}),{shape:{width:i.width+20,height:i.height+20}},o,a),r))):(v=s[n],y=v.childAt(0),x=v.childAt(1),D.add(v),L[e]=v,Si(y,{shape:{points:u,stackedOnPoints:h}},T),Si(x,{style:{x:_.x-S,y:_.y0+_.y/2}},T));var M=w.getModel("emphasis.itemStyle"),I=w.getModel("itemStyle");fi(x.style,b,{text:b.get("show")?T.getFormattedLabel(c[d-1],"normal")||A.getName(c[d-1]):null,textVerticalAlign:"middle"}),y.setStyle(P({fill:l},I.getItemStyle(["color"]))),di(y,M.getItemStyle())}else D.remove(s[e])}var A=T.getData(),D=this.group,C=T.getLayerSeries(),n=A.getLayout("layoutInfo"),i=n.rect,o=n.boundaryGap;D.attr("position",[0,i.y+o[0]]);var L={};new sr(this._layersSeries||[],C,t,t).add(k(e,this,"add")).update(k(e,this,"update")).remove(k(e,this,"remove")).execute(),this._layersSeries=C,this._layers=L},dispose:function(){}}),Ja(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var a=t.get("boundaryGap"),r=n.getAxis();i.boundaryGap=a,"horizontal"===r.orient?(a[0]=Ei(a[0],o.height),a[1]=Ei(a[1],o.height),cd(e,t,o.height-a[0]-a[1])):(a[0]=Ei(a[0],o.width),a[1]=Ei(a[1],o.width),cd(e,t,o.width-a[0]-a[1])),e.setLayout("layoutInfo",i)})}),Qa(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=C();a.each(function(t){l.set(a.getRawIndex(t),t)}),r.each(function(t){var e=r.getName(t),n=s[(o.nameMap.get(e)-1)%s.length];r.setItemVisual(t,"color",n);var i=l.get(t);null!=i&&a.setItemVisual(i,"color",n)})})}),qa(dS("themeRiver")),r_.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t){var e={name:t.name,children:t.data};!function n(t){var i=0;z(t.children,function(t){n(t);var e=t.value;N(e)&&(e=e[0]),i+=e});var e=t.value;N(e)&&(e=e[0]),null!=e&&!isNaN(e)||(e=i),e<0&&(e=0),N(t.value)?t.value[0]=e:t.value=e}(e);var n=t.levels||[],i={};return i.levels=n,$l.createTree(e,this,i).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=r_.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=fu(n,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 TT="none",AT="ancestor",DT="self",CT=2,LT=4,kT=dd.prototype;kT.updateData=function(t,e,n,i,o){(this.node=e).piece=this,i=i||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout();s||console.log(e.getLayout());var l=P({},s);l.label=null;var u=pd(e,0,o),h=r.getModel("itemStyle").getItemStyle(),c=O({lineJoin:"bevel",fill:(c="normal"===n?h:v(r.getModel(n+".itemStyle").getItemStyle(),h)).fill||u},c);t?(a.setShape(l),a.shape.r=s.r0,Si(a,{shape:{r:s.r}},i,e.dataIndex),a.useStyle(c)):"object"==_typeof(c.fill)&&c.fill.type||"object"==_typeof(a.style.fill)&&a.style.fill.type?(Si(a,{shape:l},i),a.useStyle(c)):Si(a,{shape:l,style:c},i),this._updateLabel(i,u,n);var d,p=r.getShallow("cursor");p&&a.attr("cursor",p),t&&(d=i.getShallow("highlightPolicy"),this._initEvents(a,e,i,d)),this._seriesModel=i||this._seriesModel,this._ecModel=o||this._ecModel},kT.onEmphasis=function(o){var a=this;this.node.hostTree.root.eachNode(function(t){var e,n,i;t.piece&&(a.node===t?t.piece.updateData(!1,t,"emphasis"):(e=t,n=a.node,(i=o)!==TT&&(i===DT?e===n:i===AT?e===n||e.isAncestorOf(n):e===n||e.isDescendantOf(n))?t.piece.childAt(0).trigger("highlight"):o!==TT&&t.piece.childAt(0).trigger("downplay")))})},kT.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},kT.onHighlight=function(){this.updateData(!1,this.node,"highlight")},kT.onDownplay=function(){this.updateData(!1,this.node,"downplay")},kT._updateLabel=function(t,e,n){function i(t){var e=r.get(t);return null==e?a.get(t):e}var o=this.node.getModel(),a=o.getModel("label"),r="normal"===n||"emphasis"===n?a:o.getModel(n+".label"),s=o.getModel("emphasis.label"),l=V(t.getFormattedLabel(this.node.dataIndex,"normal",null,null,"label"),this.node.name);!1===i("show")&&(l="");var u=this.node.getLayout(),h=r.get("minAngle");null==h&&(h=a.get("minAngle")),h=h/180*Math.PI;var c=u.endAngle-u.startAngle;null!=h&&Math.abs(c)<h&&(l="");var d=this.childAt(1);gi(d.style,d.hoverStyle||{},a,s,{defaultText:r.getShallow("show")?l:null,autoColor:e,useInsideStyle:!0});var p,g=(u.startAngle+u.endAngle)/2,f=Math.cos(g),m=Math.sin(g),v=i("position"),y=i("distance")||0,x=i("align");"outside"===v?(p=u.r+y,x=g>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(p=u.r0+y,g>Math.PI/2&&(x="right")):"right"===x&&(p=u.r-y,g>Math.PI/2&&(x="left")):(p=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:i("verticalAlign")||"middle",opacity:i("opacity")});var _=p*f+u.cx,w=p*m+u.cy;d.attr("position",[_,w]);var b=i("rotate"),S=0;"radial"===b?(S=-g)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-g)>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)},kT._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(i)}function a(){r.onNormal()}var r=this;n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},a(dd,rm),ea.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){function n(t,e){var n,i;h||!t||t.getValue()||(t=null),t!==s&&e!==s&&(e&&e.piece?t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):(i=e)&&i.piece&&(u.remove(i.piece),i.piece=null):t&&(n=new dd(t,o,a),u.add(n),r.setItemGraphicEl(t.dataIndex,n)))}var i=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,l=o.getViewRoot(),u=this.group,h=o.get("renderLabelForZeroData"),c=[];l.eachNode(function(t){c.push(t)});var d,p,g,f,m,v,y,x=this._oldChildren||[];function _(t){return t.getId()}function w(t,e){n(null==t?null:v[t],null==e?null:y[e])}y=x,0===(v=c).length&&0===y.length||new sr(y,v,_,_).add(w).update(w).remove(E(w,null)).execute(),g=s,0<(f=l).depth?(i.virtualPiece?i.virtualPiece.updateData(!1,g,"normal",o,a):(i.virtualPiece=new dd(g,o,a),u.add(i.virtualPiece)),f.piece._onclickEvent&&f.piece.off("click",f.piece._onclickEvent),m=function(){i._rootToNode(f.parentNode)},f.piece._onclickEvent=m,i.virtualPiece.on("click",m)):i.virtualPiece&&(u.remove(i.virtualPiece),i.virtualPiece=null),e&&e.highlight&&e.highlight.piece?(d=o.getShallow("highlightPolicy"),e.highlight.piece.onEmphasis(d)):e&&e.unhighlight&&(!(p=this.virtualPiece)&&s.children.length&&(p=s.children[0].piece),p&&p.onNormal()),this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){function t(a){var r=!1;s.seriesModel.getViewRoot().eachNode(function(t){var e,n,i,o;!r&&t.piece&&t.piece.childAt(0)===a.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?s._rootToNode(t):"link"!==e||(i=(n=t.getModel()).get("link"))&&(o=n.get("target",!0)||"_blank",window.open(i,o)),r=!0)})}var s=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,o=t[1]-n.cy,a=Math.sqrt(i*i+o*o);return a<=n.r&&a>=n.r0}}});var PT="sunburstRootToNode";Ka({type:PT,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n,i=du(o,[PT],t);i&&((n=t.getViewRoot())&&(o.direction=gu(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node))})});var NT="sunburstHighlight";Ka({type:NT,update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){var n=du(i,[NT],t);n&&(i.highlight=n.node)})}),Ka({type:"sunburstUnhighlight",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){n.unhighlight=!0})});var OT=Math.PI/180;Qa(E(hS,"sunburst")),Ja(E(function(t,e,A,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");N(n)||(n=[0,n]),N(e)||(e=[e,e]);var i=A.getWidth(),o=A.getHeight(),c=Math.min(i,o),d=Ei(e[0],i),p=Ei(e[1],o),g=Ei(n[0],c/2),a=Ei(n[1],c/2),r=-t.get("startAngle")*OT,f=t.get("minAngle")*OT,m=t.getData().tree.root,s=t.getViewRoot(),v=s.depth,l=t.get("sort");null!=l&&gd(s,l);var u=0;z(s.children,function(t){isNaN(t.getValue())||u++});var h,y,x=s.getValue(),_=Math.PI/(x||u)*2,w=0<s.depth,b=s.height-(w?-1:1),S=(a-g)/(b||1),M=t.get("clockwise"),I=t.get("stillShowZeroSum"),T=M?1:-1;w&&(h=g+S,y=2*Math.PI,m.setLayout({angle:y,startAngle:r,endAngle:r+y,clockwise:M,cx:d,cy:p,r0:g,r:h})),function e(t,n){if(t){var i,o,a,r,s,l,u,h=n;return t!==m&&(i=t.getValue(),(o=0===x&&I?_:i*_)<f&&(o=f),h=n+T*o,a=t.depth-v-(w?-1:1),r=g+S*a,s=g+S*(1+a),null!=(l=t.getModel()).get("r0")&&(r=Ei(l.get("r0"),c/2)),null!=l.get("r")&&(s=Ei(l.get("r"),c/2)),t.setLayout({angle:o,startAngle:n,endAngle:h,clockwise:M,cx:d,cy:p,r0:r,r:s})),t.children&&t.children.length&&(u=0,z(t.children,function(t){u+=e(t,n+u)})),h-n}}(s,r)})},"sunburst")),qa(E(dS,"sunburst"));var RT=["itemStyle"],ET=["emphasis","itemStyle"],zT=["label"],BT=["emphasis","label"],VT="e\0\0",GT={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:k(fd,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:k(md,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:k(vd,e)}}},polar:function(o){var a=o.getRadiusAxis(),r=o.getAngleAxis(),t=a.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:k(function(t){var e=a.dataToRadius(t[0]),n=r.dataToAngle(t[1]),i=o.coordToPoint([e,n]);return i.push(e,n*Math.PI/180),i}),size:k(yd,o)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};r_.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(){return Mr(this.getSource(),this)},getDataParams:function(t,e,n){var i=r_.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),ea.extend({type:"custom",_data:null,render:function(n,t,e,i){var o=this._data,a=n.getData(),r=this.group,s=_d(n,a,t,e);a.diff(o).add(function(t){wd(null,t,s(t,i),n,r,a)}).update(function(t,e){wd(o.getItemGraphicEl(e),t,s(t,i),n,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,n,i,o){for(var a=e.getData(),r=_d(e,a,n,i),s=t.start;s<t.end;s++)wd(null,s,r(s,o),e,this.group,a).traverse(function(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)})},dispose:x,filterForExposedEvent:function(t,e,n){var i=e.element;if(null==i||n.name===i)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1}}),Ya(function(t){var e=t.graphic;N(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var FT=nr({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,FT.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var n=this.option,i=(e?n:t).elements,f=n.elements=e?[]:n.elements,o=[];this._flatten(i,o);var a=nn(f,o);on(a);var m=this._elOptionsToUpdate=[];z(a,function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,g=t.option;g&&(m.push(g),c=g,p=(h=t).exist,c.id=h.keyInfo.id,!c.type&&p&&(c.type=p.type),null==c.parentId&&((d=c.parentOption)?c.parentId=d.id:p&&(c.parentId=p.parentId)),c.parentOption=null,o=f,a=e,s=P({},r=g),l=o[a],"merge"===(u=r.$action||"merge")?l?(v(l,s,!0),uo(l,s,{ignoreSize:!0}),co(r,l)):o[a]=s:"replace"===u?o[a]=s:"remove"===u&&l&&(o[a]=null),n=f[e],i=g,n&&(n.hv=i.hv=[Ld(i,["left","right"]),Ld(i,["top","bottom"])],"group"===n.type&&(null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0))))},this);for(var r=f.length-1;0<=r;r--)null==f[r]?f.splice(r,1):delete f[r].$action},_flatten:function(t,n,i){z(t,function(t){var e;t&&(i&&(t.parentOption=i),n.push(t),e=t.children,"group"===t.type&&e&&this._flatten(e,n,t),delete t.children)},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});ir({type:"graphic",init:function(){this._elMap=C(),this._lastGraphicModel},render:function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},_updateElements:function(p){var g,f,t=p.useElOptionsToUpdate();t&&(g=this._elMap,f=this.group,z(t,function(t){var e=t.$action,n=t.id,i=g.get(n),o=t.parentId,a=null!=o?g.get(o):f,r=t.style;"text"===t.type&&r&&(t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke")&&r.stroke&&(r.textStroke=r.stroke));var s,l=(s=P({},s=t),z(["id","parentId","$action","hv","bounding"].concat(ox),function(t){delete s[t]}),s);e&&"merge"!==e?"replace"===e?(Cd(i,g),Dd(n,a,l,g)):"remove"===e&&Cd(i,g):i?i.attr(l):Dd(n,a,l,g);var u,h,c,d=g.get(n);d&&(d.__ecGraphicWidth=t.width,d.__ecGraphicHeight=t.height,h=p,c=(u=d).eventData,u.silent||u.ignore||c||(c=u.eventData={componentType:"graphic",componentIndex:h.componentIndex,name:u.name}),c&&(c.info=u.info))}))},_relocate:function(t,e){for(var n=t.option.elements,i=this.group,o=this._elMap,a=n.length-1;0<=a;a--){var r,s=n[a],l=o.get(s.id);l&&lo(l,s,(r=l.parent)===i?{width:e.getWidth(),height:e.getHeight()}:{width:r.__ecGraphicWidth||0,height:r.__ecGraphicHeight||0},null,{hv:s.hv,boundingMode:s.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){Cd(t,e)}),this._elMap=C()},dispose:function(){this._clear()}});var WT=nr({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{}},mergeOption:function(t){WT.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},_updateData:function(a){var r=[],s=[];a.eachRawSeries(function(t){var e,n,i,o=t.name;s.push(o),t.legendDataProvider?(i=(n=t.legendDataProvider()).mapArray(n.getName),a.isSeriesFiltered(t)||(s=s.concat(i)),i.length?r=r.concat(i):e=!0):e=!0,e&&an(t)&&r.push(t.name)}),this._availableNames=s;var t=L(this.get("data")||r,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new ki(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&z(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=M(this._availableNames,t)},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Ka("legendToggleSelect","legendselectchanged",E(kd,"toggleSelected")),Ka("legendSelect","legendselected",E(kd,"select")),Ka("legendUnSelect","legendunselected",E(kd,"unSelect"));var HT=E,ZT=z,UT=rm,XT=ir({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new UT),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,n){var i,o,a,r,s,l,u;this.resetInner(),t.get("show",!0)&&((i=t.get("align"))&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(i,t,e,n),s=so(o=t.getBoxLayoutParams(),a={width:n.getWidth(),height:n.getHeight()},r=t.get("padding")),u=so(O({width:(l=this.layoutInner(t,i,s)).width,height:l.height},o),a,r),this.group.attr("position",[u.x-l.x,u.y-l.y]),this.group.add(this._backgroundEl=Pd(l,t)))},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(l,u,h,c){var d=this.getContentGroup(),p=C(),g=u.get("selectedMode"),f=[];h.eachRawSeries(function(t){t.get("legendHoverLink")||f.push(t.id)}),ZT(u.getData(),function(o,a){var t,e,n,i,r,s=o.get("name");this.newlineDisabled||""!==s&&"\n"!==s?(t=h.getSeriesByName(s)[0],p.get(s)||(t?("function"==typeof(n=(e=t.getData()).getVisual("color"))&&(n=n(t.getDataParams(0))),i=e.getVisual("legendSymbol")||"roundRect",r=e.getVisual("symbol"),this._createItem(s,a,o,u,i,r,l,n,g).on("click",HT(Nd,s,c)).on("mouseover",HT(Od,t.name,null,c,f)).on("mouseout",HT(Rd,t.name,null,c,f)),p.set(s,!0)):h.eachRawSeries(function(t){if(!p.get(s)&&t.legendDataProvider){var e=t.legendDataProvider(),n=e.indexOfName(s);if(n<0)return;var i=e.getItemVisual(n,"color");this._createItem(s,a,o,u,"roundRect",null,l,i,g).on("click",HT(Nd,s,c)).on("mouseover",HT(Od,null,s,c,f)).on("mouseout",HT(Rd,null,s,c,f)),p.set(s,!0)}},this))):d.add(new UT({newline:!0}))},this)},_createItem:function(t,e,n,i,o,a,r,s,l){var u,h=i.get("itemWidth"),c=i.get("itemHeight"),d=i.get("inactiveColor"),p=i.get("symbolKeepAspect"),g=i.isSelected(t),f=new UT,m=n.getModel("textStyle"),v=n.get("icon"),y=n.getModel("tooltip"),x=y.parentModel;o=v||o,f.add(Kr(o,0,0,h,c,g?s:d,null==p||p)),v||!a||a===o&&"none"!==a||(u=.8*c,"none"===a&&(a="circle"),f.add(Kr(a,(h-u)/2,(c-u)/2,u,u,g?s:d,null==p||p)));var _="left"===r?h+5:-5,w=r,b=i.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),f.add(new cy({style:fi({},m,{text:S,x:_,y:c/2,textFill:g?m.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new _y({shape:f.getBoundingRect(),invisible:!0,tooltip:y.get("show")?P({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]}},y.option):null});return f.add(M),f.eachChild(function(t){t.silent=!0}),M.silent=!l,this.getContentGroup().add(f),di(f),f.__legendDataIndex=e,f},layoutInner:function(t,e,n){var i=this.getContentGroup();rx(t.get("orient"),i,t.get("itemGap"),n.width,n.height);var o=i.getBoundingRect();return i.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()}});qa(function(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}),ux.registerSubTypeDefaulter("legend",function(){return"plain"});var jT=WT.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,n,i){var o=ho(t);jT.superCall(this,"init",t,e,n,i),Ed(this,t,o)},mergeOption:function(t,e){jT.superCall(this,"mergeOption",t,e),Ed(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),YT=rm,qT=["width","height"],KT=["x","y"],$T=XT.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){$T.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new YT),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new YT),this._showController},resetInner:function(){$T.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a){function n(t,e){var n=t+"DataIndex",i=Li(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:k(r._pageGo,r,n,o,a)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});i.name=t,s.add(i)}var r=this;$T.superCall(this,"renderInner",t,o,e,a);var s=this._controllerGroup,l=o.get("pageIconSize",!0);N(l)||(l=[l,l]),n("pagePrev",0);var i=o.getModel("pageTextStyle");s.add(new cy({name:"pageText",style:{textFill:i.getTextColor(),font:i.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),n("pageNext",1)},layoutInner:function(t,e,n){var i=this.getContentGroup(),o=this._containerGroup,a=this._controllerGroup,r=t.getOrient().index,s=qT[r],l=qT[1-r],u=KT[1-r];rx(t.get("orient"),i,t.get("itemGap"),r?n.width:null,r?null:n.height),rx("horizontal",a,t.get("pageButtonItemGap",!0));var h=i.getBoundingRect(),c=a.getBoundingRect(),d=this._showController=h[s]>n[s],p=[-h.x,-h.y];p[r]=i.position[r];var g=[0,0],f=[-c.x,-c.y],m=G(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?f[r]+=n[s]-c[s]:g[r]+=c[s]+m),f[1-r]+=h[l]/2-c[l]/2,i.attr("position",p),o.attr("position",g),a.attr("position",f);var v,y=this.group.getBoundingRect();(y={x:0,y:0})[s]=d?n[s]:h[s],y[l]=Math.max(h[l],c[l]),y[u]=Math.min(0,c[u]+f[1-r]),o.__rectSize=n[s],d?((v={x:0,y:0})[s]=Math.max(n[s]-c[s]-m,0),v[l]=y[l],o.setClipPath(new _y({shape:v})),o.__rectSize=v[s]):a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&Si(i,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,o){var a=this._controllerGroup;z(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],n=a.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=i.get("pageFormatter"),n=o.pageIndex,r=null!=n?n+1:0,s=o.pageCount;t&&e&&t.setStyle("text",A(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){function i(t){var e=t.getBoundingRect().clone();return e[p]+=t.position[h],e}var e,n,o,a,r=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),u=this._containerGroup.__rectSize,h=t.getOrient().index,c=qT[h],d=qT[1-h],p=KT[h],g=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===r&&(a=t)}):a=s.childAt(0);var f=u?Math.ceil(l[c]/u):0;if(a){var m=a.getBoundingRect(),v=a.position[h]+m[p];g[h]=-v-l[p],e=Math.floor(f*(v+m[p]+u/2)/l[c]),e=l[c]&&f?Math.max(0,Math.min(f-1,e)):-1;var y={x:0,y:0};y[c]=u,y[d]=l[d],y[p]=-g[h]-l[p];var x,_=s.children();if(s.eachChild(function(t,e){var n=i(t);n.intersect(y)&&(null==x&&(x=e),o=t.__legendDataIndex),e===_.length-1&&n[p]+n[c]<=y[p]+y[c]&&(o=null)}),null!=x){var w=i(_[x]);if(y[p]=w[p]+w[c]-y[c],x<=0&&w[p]>=y[p])n=null;else{for(;0<x&&i(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:g,pageIndex:e,pageCount:f,pagePrevDataIndex:n,pageNextDataIndex:o}}});Ka("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),nr({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var JT=z,QT=Ji,tA=["","-webkit-","-moz-","-o-"];Bd.prototype={constructor:Bd,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+zd(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n,i=this._zr;i&&i.painter&&(n=i.painter.getViewportRootOffset())&&(t+=n.offsetLeft,e+=n.offsetTop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(k(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t,e=this.el.clientWidth,n=this.el.clientHeight;return document.defaultView&&document.defaultView.getComputedStyle&&((t=document.defaultView.getComputedStyle(this.el))&&(e+=parseInt(t.paddingLeft,10)+parseInt(t.paddingRight,10)+parseInt(t.borderLeftWidth,10)+parseInt(t.borderRightWidth,10),n+=parseInt(t.paddingTop,10)+parseInt(t.paddingBottom,10)+parseInt(t.borderTopWidth,10)+parseInt(t.borderBottomWidth,10))),{width:e,height:n}}},Vd.prototype={constructor:Vd,_enterable:!0,update:function(){},show:function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},o=t,a=o.indexOf("{marker");0<=a;){var r=o.indexOf("|}"),s=o.substr(a+"{marker".length,r-a-"{marker".length);-1<s.indexOf("sub")?i["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:i["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new cy({style:{rich:i,text:t,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._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.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(k(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var eA=k,nA=z,iA=Ei,oA=new _y({shape:{x:-1,y:-1,width:2,height:2}});ir({type:"tooltip",init:function(t,e){var n,i;ef.node||(n=t.getComponent("tooltip").get("renderMode"),this._renderMode=dn(n),"html"===this._renderMode?(i=new Bd(e.getDom(),e),this._newLine="<br/>"):(i=new Vd(e),this._newLine="\n"),this._tooltipContent=i)},render:function(t,e,n){var i;ef.node||(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent"),(i=this._tooltipContent).update(),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow())},_initGlobalListener:function(){var i=this._tooltipModel.get("triggerOn");Zc("itemTooltip",this._api,eA(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t,e=this._tooltipModel,n=this._ecModel,i=this._api;null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")&&(t=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY})}))},manuallyShowTip:function(t,e,n,i){if(i.from!==this.uid&&!ef.node){var o=Fd(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var r=oA;r.position=[i.x,i.y],r.update(),r.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:r},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,event:{},dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var s=uT(i,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el,event:{}},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target,event:{}},o))}},manuallyHideTip:function(t,e,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(Fd(i,n))},_manuallyAxisShowTip:function(t,e,n,i){var o=i.seriesIndex,a=i.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=Gd([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:i.position}),!0}},_tryShow:function(t,e){var n,i=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e)))},_showOrMove:function(t,e){var n=t.get("showDelay");e=k(e,this),clearTimeout(this._showTimout),0<n?this._showTimout=setTimeout(e,n):e()},_showAxisTooltip:function(t,e){var d=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],o=[],p=[],a=Gd([e.tooltipOption,n]),g=this._renderMode,r=this._newLine,f={};nA(t,function(t){nA(t.dataByAxis,function(s){var l,t,u=d.getComponent(s.axisDim+"Axis",s.axisIndex),h=s.value,c=[];u&&null!=h&&(l=ed(h,u.axis,d,s.seriesDataIndices,s.valueLabelOpt),z(s.seriesDataIndices,function(t){var e,n,i,o=d.getSeriesByIndex(t.seriesIndex),a=t.dataIndexInside,r=o&&o.getDataParams(a);r.axisDim=s.axisDim,r.axisIndex=s.axisIndex,r.axisType=s.axisType,r.axisId=s.axisId,r.axisValue=jr(u.axis,h),r.axisValueLabel=l,r&&(p.push(r),B(n=o.formatTooltip(a,!0,null,g))?(e=n.html,i=n.markers,v(f,i)):e=n,c.push(e))}),t=l,"html"!==g?o.push(c.join(r)):o.push((t?Qi(t)+r:"")+c.join(r)))})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var s=e.position;this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,s,i[0],i[1],this._tooltipContent,p):this._showTooltipContent(a,o,p,Math.random(),i[0],i[1],s,void 0,f)})},_showSeriesItemTooltip:function(t,e,n){var i,o,a,r,s,l=this._ecModel,u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,d=e.dataIndex,p=e.dataType,g=c.getData(),f=Gd([g.getItemModel(d),c,h&&(h.coordinateSystem||{}).model,this._tooltipModel]),m=f.get("trigger");null!=m&&"item"!==m||(o=c.getDataParams(d,p),a=c.formatTooltip(d,!1,p,this._renderMode),r=B(a)?(i=a.html,a.markers):(i=a,null),s="item_"+c.name+"_"+d,this._showOrMove(f,function(){this._showTooltipContent(f,i,o,s,t.offsetX,t.offsetY,t.position,t.target,r)}),n({type:"showTip",dataIndexInside:d,dataIndex:g.getRawIndex(d),seriesIndex:u,from:this.uid}))},_showComponentItemTooltip:function(t,e,n){var i=e.tooltip;"string"==typeof i&&(i={content:i,formatter:i});var o=new ki(i,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),n({type:"showTip",from:this.uid})},_showTooltipContent:function(n,t,i,e,o,a,r,s,l){var u,h,c,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),r=r||n.get("position"),c=t,h&&"string"==typeof h?c=to(h,i,!0):"function"==typeof h&&(d=eA(function(t,e){t===this._ticket&&(u.setContent(e,l,n),this._updatePosition(n,r,o,a,u,i,s))},this),this._ticket=e,c=h(i,e,d)),u.setContent(c,l,n),u.show(n),this._updatePosition(n,r,o,a,u,i,s))},_updatePosition:function(t,e,n,i,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u,h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I,T,A=o.getSize(),D=t.get("align"),C=t.get("verticalAlign"),L=r&&r.getBoundingRect().clone();r&&L.applyTransform(r.transform),"function"==typeof e&&(e=e([n,i],a,o.el,L,{viewSize:[s,l],contentSize:A.slice()})),N(e)?(n=iA(e[0],s),i=iA(e[1],l)):B(e)?(e.width=A[0],e.height=A[1],n=(u=so(e,{width:s,height:l})).x,i=u.y,C=D=null):i=(n="string"==typeof e&&r?(x=function(t,e,n){var i=n[0],o=n[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-i/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-i/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-i/2,r=e.y+l+5;break;case"left":a=e.x-i-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}(e,L,A))[0]:(h=n,c=i,d=s,p=l,g=D?null:20,f=C?null:20,m=o.getOuterSize(),v=m.width,y=m.height,null!=g&&(d<h+v+g?h-=v+g:h+=g),null!=f&&(p<c+y+f?c-=y+f:c+=f),(x=[h,c])[0]),x[1]),D&&(n-=Wd(D)?A[0]/2:"right"===D?A[0]:0),C&&(i-=Wd(C)?A[1]/2:"bottom"===C?A[1]:0),t.get("confine")&&(_=n,w=i,b=s,S=l,M=o.getOuterSize(),I=M.width,T=M.height,_=Math.min(_+I,b)-I,w=Math.min(w+T,S)-T,n=(x=[_=Math.max(_,0),w=Math.max(w,0)])[0],i=x[1]),o.moveTo(n,i)},_updateContentNotChangedOnAxis:function(i){var t=this._lastDataByCoordSys,r=!!t&&t.length===i.length;return r&&nA(t,function(t,e){var n=t.dataByAxis||{},a=(i[e]||{}).dataByAxis||[];(r&=n.length===a.length)&&nA(n,function(t,e){var n=a[e]||{},i=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(r&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&i.length===o.length)&&nA(i,function(t,e){var n=o[e];r&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=i,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){ef.node||(this._tooltipContent.hide(),jc("itemTooltip",e))}}),Ka({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Ka({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Ud.prototype={constructor:Ud,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:lb.prototype.dataToCoord,radiusToData:lb.prototype.coordToData},a(Ud,lb);var aA=ln();Xd.prototype={constructor:Xd,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:lb.prototype.dataToCoord,angleToData:lb.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),i=e.count();if(n[1]-n[0]<1)return 0;var o=n[0],a=this.dataToCoord(o+1)-this.dataToCoord(o),r=Math.abs(a),s=pe(o,t.getFont(),"center","top"),l=Math.max(s.height,7)/r;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=aA(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-i)<=1&&u<c?u=c:(h.lastTickCount=i,h.lastAutoInterval=u),u}},a(Xd,lb);function rA(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Ud,this._angleAxis=new Xd,this._radiusAxis.polar=this._angleAxis.polar=this}rA.prototype={type:"polar",axisPointerEnabled:!0,constructor:rA,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=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),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 n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),o=i.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);i.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=l<a?1:-1;l<a||r<l;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]}};var sA=ux.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});v(sA.prototype,Yw);var lA={splitNumber:5};Eb("angle",sA,jd,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Eb("radius",sA,jd,lA),nr({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),Mo.register("polar",{dimensions:rA.prototype.dimensions,create:function(n,s){var l=[];return n.eachComponent("polar",function(t,e){var n=new rA(e);n.update=Yd;var i=n.getRadiusAxis(),o=n.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");qd(i,a),qd(o,r),function(t,e,n){var i=e.get("center"),o=n.getWidth(),a=n.getHeight();t.cx=Ei(i[0],o),t.cy=Ei(i[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=Ei(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}(n,t,s),l.push(n),(t.coordinateSystem=n).model=t}),n.eachSeries(function(t){var e;"polar"===t.get("coordinateSystem")&&(e=n.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0],t.coordinateSystem=e.coordinateSystem)}),l}});var uA=["axisLine","axisLabel","axisTick","splitLine","splitArea"];Yb.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e){var n,i,o,a,r;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),a=n.getTicksCoords(),Jd(r=L(n.getViewLabels(),function(t){return(t=D(t)).coord=n.dataToCoord(t.tickValue),t})),Jd(a),z(uA,function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,a,o,r)},this))},_axisLine:function(t,e,n,i){var o=t.getModel("axisLine.lineStyle"),a=new gy({shape:{cx:e.cx,cy:e.cy,r:i[$d(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,n,i){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),r=i[$d(e)],s=L(n,function(t){return new wy({shape:Kd(e,[r,r+a],t.coord)})});this.group.add(Cy(s,{style:O(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(c,d,t,p,e){var g=c.getCategories(!0),f=c.getModel("axisLabel"),m=f.get("margin");z(e,function(t,e){var n=f,i=t.tickValue,o=p[$d(d)],a=d.coordToPoint([o+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";g&&g[i]&&g[i].textStyle&&(n=new ki(g[i].textStyle,f,f.ecModel));var h=new cy({silent:!0});this.group.add(h),fi(h.style,n,{x:a[0],y:a[1],textFill:n.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u})},this)},_splitLine:function(t,e,n,i){for(var o=t.getModel("splitLine").getModel("lineStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=0;l<n.length;l++){var u=a++%r.length;s[u]=s[u]||[],s[u].push(new wy({shape:Kd(e,i,n[l].coord)}))}for(l=0;l<s.length;l++)this.group.add(Cy(s[l],{style:O({stroke:r[l%r.length]},o.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,n,i){if(n.length){for(var o=t.getModel("splitArea").getModel("areaStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=Math.PI/180,u=-n[0].coord*l,h=Math.min(i[0],i[1]),c=Math.max(i[0],i[1]),d=t.get("clockwise"),p=1;p<n.length;p++){var g=a++%r.length;s[g]=s[g]||[],s[g].push(new my({shape:{cx:e.cx,cy:e.cy,r0:h,r:c,startAngle:u,endAngle:-n[p].coord*l,clockwise:d},silent:!0})),u=-n[p].coord*l}for(p=0;p<s.length;p++)this.group.add(Cy(s[p],{style:O({fill:r[p%r.length]},o.getAreaStyle()),silent:!0}))}}});var hA=["axisLine","axisTickLabel","axisName"],cA=["splitLine","splitArea"];Yb.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e){var n,i,t,o,a,r,s,l,u,h,c;this.group.removeAll(),e.get("show")&&(n=e.axis,t=(i=n.polar).getAngleAxis(),o=n.getTicksCoords(),a=t.getExtent()[0],r=n.getExtent(),h=e,c=a,s={position:[(u=i).cx,u.cy],rotation:c/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:h.getModel("axisLabel").get("rotate"),z2:1},l=new Wb(e,s),z(hA,l.add,l),this.group.add(l.getGroup()),z(cA,function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,a,r,o)},this))},_splitLine:function(t,e,n,i,o){for(var a=t.getModel("splitLine").getModel("lineStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=0;u<o.length;u++){var h=r++%s.length;l[h]=l[h]||[],l[h].push(new gy({shape:{cx:e.cx,cy:e.cy,r:o[u].coord},silent:!0}))}for(u=0;u<l.length;u++)this.group.add(Cy(l[u],{style:O({stroke:s[u%s.length],fill:null},a.getLineStyle()),silent:!0}))},_splitArea:function(t,e,n,i,o){if(o.length){for(var a=t.getModel("splitArea").getModel("areaStyle"),r=0,s=(s=a.get("color"))instanceof Array?s:[s],l=[],u=o[0].coord,h=1;h<o.length;h++){var c=r++%s.length;l[c]=l[c]||[],l[c].push(new my({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(Cy(l[h],{style:O({fill:s[h%s.length]},a.getAreaStyle()),silent:!0}))}}});var dA=Yc.extend({makeElOption:function(t,e,n,i,o){var a=n.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I=a.polar,T=I.getOtherAxis(a).getExtent(),A=a["dataTo"+ao(a.dim)](e),D=i.get("type");D&&"none"!==D&&(r=Qc(i),(s=pA[D](a,I,A,T,r)).style=r,t.graphicKey=s.type,t.pointer=s),td(t,n,i,o,(l=e,u=n,h=I,c=i.get("label.margin"),w=u.axis,b=w.dataToCoord(l),S=(S=h.getAngleAxis().getExtent()[0])/180*Math.PI,M=h.getRadiusAxis().getExtent(),m="radius"===w.dim?(vt(d=dt(),d,S),mt(d,d,[h.cx,h.cy]),y=Ti([b,-c],d),p=u.getModel("axisLabel").get("rotate")||0,f=(g=Wb.innerTextLayout(S,p*Math.PI/180,-1)).textAlign,g.textVerticalAlign):(v=M[1],y=h.coordToPoint([v+c,b]),x=h.cx,_=h.cy,f=Math.abs(y[0]-x)/v<.3?"center":y[0]>x?"left":"right",Math.abs(y[1]-_)/v<.3?"middle":y[1]>_?"top":"bottom"),{position:y,align:f,verticalAlign:m}))}}),pA={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:od(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),a=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:rd(e.cx,e.cy,i[0],i[1],(-n-o/2)*a,(o/2-n)*a)}:{type:"Sector",shape:rd(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};Yb.registerAxisPointerClass("PolarAxisPointer",dA),Ja(E(function(t,e,n){n.getWidth(),n.getHeight();var k={},P=function(t){var p={};z(t,function(t,e){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),o=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(o[1]-o[0])/n.count(),r=p[Zd(i)]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},s=r.stacks;p[Zd(i)]=r;var l=Hd(t);s[l]||r.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var u=Ei(t.get("barWidth"),a),h=Ei(t.get("barMaxWidth"),a),c=t.get("barGap"),d=t.get("barCategoryGap");u&&!s[l].width&&(u=Math.min(r.remainedWidth,u),s[l].width=u,r.remainedWidth-=u),h&&(s[l].maxWidth=h),null!=c&&(r.gap=c),null!=d&&(r.categoryGap=d)});var d={};return z(p,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Ei(t.categoryGap,i),a=Ei(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(e,function(t,e){var n=t.maxWidth;n&&n<l&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;z(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;z(e,function(t,e){d[n][e]=d[n][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}(I(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(),n=t.coordinateSystem,i=n.getBaseAxis(),o=Hd(t),a=P[Zd(i)][o],r=a.offset,s=a.width,l=n.getOtherAxis(i),u=t.coordinateSystem.cx,h=t.coordinateSystem.cy,c=t.get("barMinHeight")||0,d=t.get("barMinAngle")||0;k[o]=k[o]||[];for(var p=e.mapDimension(l.dim),g=e.mapDimension(i.dim),f=br(e,p),m=l.getExtent()[0],v=0,y=e.count();v<y;v++){var x,_,w,b,S,M,I,T,A,D,C=e.get(p,v),L=e.get(g,v);isNaN(C)||(x=0<=C?"p":"n",_=m,f&&(k[o][L]||(k[o][L]={p:m,n:m}),_=k[o][L][x]),"radius"===l.dim?(I=l.dataToRadius(C)-m,T=i.dataToAngle(L),Math.abs(I)<c&&(I=(I<0?-1:1)*c),b=(w=_)+I,M=(S=T-r)-s,f&&(k[o][L][x]=b)):(A=l.dataToAngle(C,!0)-m,D=i.dataToRadius(L),Math.abs(A)<d&&(A=(A<0?-1:1)*d),b=(w=D+r)+s,M=(S=_)+A,f&&(k[o][L][x]=M)),e.setItemLayout(v,{cx:u,cy:h,r0:w,r:b,startAngle:-S*Math.PI/180,endAngle:-M*Math.PI/180}))}}},this)},"bar")),ir({type:"polar"}),o(ux.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){ux.prototype.init.apply(this,arguments),tn(t,"label",["show"])},optionUpdated:function(){var t=this.option,n=this;t.regions=NS.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=b(t.regions||[],function(t,e){return e.name&&t.set(e.name,new ki(e,n)),t},C()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new ki(null,this,this.ecModel)},getFormattedLabel:function(t,e){var n=this.getRegionModel(t).get("label."+e+".formatter"),i={name:t};return"function"==typeof n?(i.status=e,n(i)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),rS),ir({type:"geo",init:function(t,e){var n=new Wl(e,!0);this._mapDraw=n,this.group.add(n.group)},render:function(t,e,n,i){var o;i&&"geoToggleSelect"===i.type&&i.from===this.uid||(o=this._mapDraw,t.get("show")?o.draw(t,e,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent"))},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),Qd("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),Qd("select",{type:"geoSelect",event:"geoselected"}),Qd("unSelect",{type:"geoUnSelect",event:"geounselected"});var gA=["rect","polygon","keep","clear"],fA=z,mA={lineX:ip(0),lineY:ip(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Jr(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=i[0];return!!(Jr(i,o,a)||Jr(i,o+r,a)||Jr(i,o,a+s)||Jr(i,o+r,a+s)||Qt.create(t).contain(l[0],l[1])||ap(o,a,o+r,a,i)||ap(o,a,o,a+s,i)||ap(o+r,a,o+r,a+s,i)||ap(o,a+s,o+r,a+s,i))||void 0}}},vA=z,yA=M,xA=E,_A=["dataToPoint","pointToData"],wA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],bA=sp.prototype;bA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){var i;(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,i=TA[t.brushType](0,n,e),t.__rangeOffset={offset:AA[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax})})},bA.matchOutputRanges=function(t,i,o){vA(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&z(t.coordSyses,function(t){var e=TA[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},bA.setInputRanges=function(t,u){vA(t,function(t){var e,n,i,o,a,r,s,l=this.findTargetInfo(t,u);t.range=t.range||[],l&&!0!==l&&(t.panelId=l.panelId,e=TA[t.brushType](0,l.coordSys,t.coordRange),n=t.__rangeOffset,t.range=n?AA[t.brushType](e.values,n.offset,(i=e.xyMinMax,o=n.xyMinMax,a=dp(i),r=dp(o),s=[a[0]/r[0],a[1]/r[1]],isNaN(s[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s)):e.values)},this)},bA.makePanelOpts=function(n,i){return L(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:zh(e),isTargetByCursor:Vh(e,n,t.coordSysModel),getLinearBrushOtherExtent:Bh(e)}})},bA.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=yA(i.coordSyses,e.coordinateSystem)},bA.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=up(e,t),o=0;o<n.length;o++){var a=n[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<MA.length;o++)if(MA[o](i,a))return a}return!0};var SA={grid:function(t,i){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,n=C(),r={},s={};(o||a||e)&&(vA(o,function(t){var e=t.axis.grid.model;n.set(e.id,e),r[e.id]=!0}),vA(a,function(t){var e=t.axis.grid.model;n.set(e.id,e),s[e.id]=!0}),vA(e,function(t){n.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),n.each(function(t){var e=t.coordinateSystem,n=[];vA(e.getCartesians(),function(t,e){(0<=yA(o,t.getAxis("x").model)||0<=yA(a,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:IA.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){vA(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:IA.geo})})}},MA=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,o=t.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&i&&(o=i.axis.grid.model),o&&o===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],IA={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ii(t)),e}},TA={lineX:xA(hp,0),lineY:xA(hp,1),rect:function(t,e,n){var i=e[_A[t]]([n[0][0],n[1][0]]),o=e[_A[t]]([n[0][1],n[1][1]]),a=[lp([i[0],o[0]]),lp([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(n,i,t){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:L(t,function(t){var e=i[_A[n]](t);return o[0][0]=Math.min(o[0][0],e[0]),o[1][0]=Math.min(o[1][0],e[1]),o[0][1]=Math.max(o[0][1],e[0]),o[1][1]=Math.max(o[1][1],e[1]),e}),xyMinMax:o}}},AA={lineX:xA(cp,0),lineY:xA(cp,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return L(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}},DA=["inBrush","outOfBrush"],CA="__ecBrushSelect",LA="__ecInBrushSelectEvent",kA=j_.VISUAL.BRUSH;Ja(kA,function(e,t,n){e.eachComponent({mainType:"brush"},function(t){n&&"takeGlobalCursor"===n.type&&t.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1}),(t.brushTargetManager=new sp(t.option,e)).setInputRanges(t.areas,e)})}),Qa(kA,function(h,t,e){var o,a,n,i,r,s,l,c=[];h.eachComponent({mainType:"brush"},function(s,t){function l(t){return"all"===n||i[t]}function y(t){return!!t.length}function r(e,t,n){var i,o,a,r=fp(e);r&&(o=t,null==(a=s.option.seriesIndex)||"all"===a||!(N(a)?M(a,o)<0:o!==a))&&(z(u,function(t){r[t.brushType]&&s.brushTargetManager.controlSeries(t,e,h)&&n.push(t),b|=y(n)}),l(t)&&y(n))&&(i=e.getData()).each(function(t){gp(r,n,i,t)&&(_[t]=1)})}var x={brushId:s.id,brushIndex:t,brushName:s.name,areas:D(s.areas),selected:[]};c.push(x);var e=s.option,n=e.brushLink,i=[],_=[],w=[],b=0;t||(o=e.throttleType,a=e.throttleDelay);var u=L(s.areas,function(t){return n=O({boundingRect:PA[t.brushType](t)},t),i=n.selectors={},z(mA[n.brushType],function(e,t){i[t]=function(t){return e(t,i,n)}}),n;var n,i}),S=ep(s.option,DA,function(t){t.mappingMethod="fixed"});N(n)&&z(n,function(t){i[t]=1}),h.eachSeries(function(t,e){var n,i,o,a=w[e]=[];"parallel"===t.subType?(i=e,o=(n=t).coordinateSystem,b|=o.hasAxisBrushed(),l(i)&&o.eachActiveState(n.getData(),function(t,e){"active"===t&&(_[e]=1)})):r(t,e,a)}),h.eachSeries(function(t,e){var n={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};x.selected.push(n);var u,h,c,d,p,g,f,i=fp(t),o=w[e],a=t.getData(),r=l(e)?function(t){return _[t]?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return gp(i,o,a,t)?(n.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};function m(t){return h.getItemVisual(g,t)}function v(t,e){h.setItemVisual(g,t,e)}function s(t,e){g=null==p?t:e;var n=h.getRawDataItem(g);if(!n||!1!==n.visualMap)for(var i=c.call(d,t),o=u[i],a=f[i],r=0,s=a.length;r<s;r++){var l=a[r];o[l]&&o[l].applyVisual(t,m,v)}}(l(e)?b:y(o))&&(u=S,h=a,c=r,f={},z(DA,function(t){var e=oM.prepareVisualTypes(u[t]);f[t]=e}),null==p?h.each(s):h.each([p],s))})}),n=t,i=o,r=a,s=c,e&&((l=n.getZr())[LA]||(l[CA]||(l[CA]=pp),sa(l,CA,r,i)(n,s)))});var PA={lineX:x,lineY:x,rect:function(t){return mp(t.range)},polygon:function(t){for(var e,n=t.range,i=0,o=n.length;i<o;i++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=n[i];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&mp(e)}},NA=["#ddd"];nr({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 n=this.option;e||np(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:NA},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){t&&(this.areas=L(t,function(t){return vp(this.option,t)},this))},setBrushOption:function(t){this.brushOption=vp(this.option,t),this.brushType=this.brushOption.brushType}}),ir({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new sh(e.getZr())).on("brush",k(this._onBrush,this)).mount()},render:function(t){return this.model=t,yp.apply(this,arguments)},updateTransform:yp,updateView:yp,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:n,areas:D(t),$from:n})}}),Ka({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),Ka({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var OA={},RA=y_.toolbox.brush;wp.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:D(RA.title)};var EA=wp.prototype;EA.render=EA.updateView=function(e,t,n){var i,o,a;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=o,z(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},EA.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return z(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},EA.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},xp("brush",wp),Ya(function(t,e){var n,i,o,a,r,s,l,u=t&&t.brush;N(u)||(u=u?[u]:[]),u.length&&(n=[],z(u,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}),N(i=t&&t.toolbox)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]),(r=(a=(o=i.feature||(i.feature={})).brush||(o.brush={})).type||(a.type=[])).push.apply(r,n),l={},z(s=r,function(t){l[t]=1}),s.length=0,z(l,function(t,e){s.push(e)}),e&&!r.length&&r.push.apply(r,gA))}),bp.prototype={constructor:bp,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Ui(t)).getFullYear(),n=(n=t.getMonth()+1)<10?"0"+n:n,i=(i=t.getDate())<10?"0"+i:i,o=t.getDay();return{y:e,m:n,d:i,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){function n(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 i=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[i,7]:[7,i];z([0,1],function(t){n(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=so(r,l);z([0,1],function(t){n(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){N(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,o=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];var a=n.day,r=this._getRangeInfo([i.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var n=this.dataToPoint(t,e);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,i):this._getDateByWeeksAndDay(e,n-1,i)},convertToPixel:E(Sp,"dataToPoint"),convertFromPixel:E(Sp,"pointToData"),_initRangeOption:function(){var t,e,n,i=this._model.get("range"),o=i;N(o)&&1===o.length&&(o=o[0]),/^\d{4}$/.test(o)&&(i=[o+"-01-01",o+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(o)&&((e=(t=this.getDateInfo(o)).date).setMonth(e.getMonth()+1),n=this.getNextNDay(e,-1),i=[t.formatedDate,n.formatedDate]),/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(o)&&(i=[o,o]);var a=this._getRangeInfo(i);return a.start.time>a.end.time&&i.reverse(),i},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,i=new Date(t[0].time),o=i.getDate(),a=t[1].date.getDate();if(i.setDate(o+n-1),i.getDate()!==a)for(var r=0<i.getTime()-t[1].time?1:-1;i.getDate()!==a&&0<(i.getTime()-t[1].time)*r;)n-=r,i.setDate(o+n-1);var s=Math.floor((n+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&e<i.fweek||t===i.weeks&&e>i.lweek)return!1;var o=7*(t-1)-i.fweek+e,a=new Date(i.start.time);return a.setDate(i.start.d+o),this.getDateInfo(a)}},bp.dimensions=bp.prototype.dimensions,bp.getDimensionsInfo=bp.prototype.getDimensionsInfo,bp.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new bp(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},Mo.register("calendar",bp);var zA=ux.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,e,n,i){var o=ho(t);zA.superApply(this,"init",arguments),Mp(t,o)},mergeOption:function(t,e){zA.superApply(this,"mergeOption",arguments),Mp(this.option,t)}}),BA={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},VA={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};ir({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var n=t.coordinateSystem,i=n.getRangeInfo(),o=n.getOrient();this._renderDayRect(t,i,e),this._renderLines(t,i,o,e),this._renderYearText(t,i,o,e),this._renderMonthText(t,o,e),this._renderWeekText(t,i,o,e)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=i.getCellWidth(),r=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new _y({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});n.add(u)}},_renderLines:function(n,t,i,o){function e(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(n,t,i);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}var a=this,r=n.coordinateSystem,s=n.getModel("splitLine.lineStyle").getLineStyle(),l=n.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=t.start,c=0;h.time<=t.end.time;c++){e(h.formatedDate),0===c&&(h=r.getDateInfo(t.start.y+"-"+t.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}e(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,o)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},_drawSplitline:function(t,e,n){var i=new xy({z2:20,shape:{points:t},style:e});n.add(i)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=i.getNextNDay(e.time,a),s=i.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===n?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?eo(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,o){e=e.slice();var a=["center","bottom"];"bottom"===i?(e[1]+=o,a=["center","top"]):"left"===i?e[0]-=o:"right"===i?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==i&&"right"!==i||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,g,f,m=t.getModel("yearLabel");m.get("show")&&(o=m.get("margin"),a=(a=m.get("position"))||("horizontal"!==n?"top":"left"),s=((r=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+r[1][0])/2,l=(r[0][1]+r[1][1])/2,h={top:[s,r[u="horizontal"===n?0:1][1]],bottom:[s,r[1-u][1]],left:[r[1-u][0],l],right:[r[u][0],l]},c=e.start.y,+e.end.y>+e.start.y&&(c=c+"-"+e.end.y),d=m.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:c},g=this._formatterLabel(d,p),fi((f=new cy({z2:30})).style,m,{text:g}),f.attr(this._yearTextPositionControl(f,h[a],n,a,o)),i.add(f))},_monthTextPositionControl:function(t,e,n,i,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(a="center"),"start"===i&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===i&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),r=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];A(o)&&(o=BA[o.toUpperCase()]||[]);for(var u="start"===r?0:1,h="horizontal"===e?0:1,a="start"===r?-a:a,c="center"===s,d=0;d<l[u].length-1;d++){var p,g=l[u][d].slice(),f=this._firstDayOfMonth[d];c&&(p=this._firstDayPoints[d],g[h]=(p[h]+l[0][d+1][h])/2);var m=i.get("formatter"),v=o[f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},x=this._formatterLabel(m,y),_=new cy({z2:30});P(fi(_.style,i,{text:x}),this._monthTextPositionControl(g,c,e,r,a)),n.add(_)}}},_weekTextPositionControl:function(t,e,n,i,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===n;return"horizontal"===e?(s=s+i+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+i+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,n,i){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek();A(s)&&(s=VA[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()],l=Ei(l,c["horizontal"===n?0:1]);"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var p=a.getNextNDay(h,d),g=a.dataToRect([p.time],!1).center,f=Math.abs((d+u)%7),m=new cy({z2:30});P(fi(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,n,r,l,c)),i.add(m)}}}}),nr({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"}}}),ir({type:"title",render:function(t,e,n){var i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w;this.group.removeAll(),t.get("show")&&(i=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=t.get("textBaseline"),u=(l=new cy({style:fi({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),h=t.get("subtext"),c=new cy({style:fi({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0),l.silent=!d&&!g,c.silent=!p&&!g,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),p&&c.on("click",function(){window.open(p,"_"+t.get("subtarget"))}),l.eventData=c.eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c),f=i.getBoundingRect(),(m=t.getBoxLayoutParams()).width=f.width,m.height=f.height,v=so(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]),y={textAlign:r,textVerticalAlign:s},l.setStyle(y),c.setStyle(y),f=i.getBoundingRect(),x=v.margin,(_=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),Qn(w=new _y({shape:{x:f.x-x[3],y:f.y-x[0],width:f.width+x[1]+x[3],height:f.height+x[0]+x[2],r:t.get("borderRadius")},style:_,silent:!0})),i.add(w))}}),ux.registerSubTypeDefaulter("dataZoom",function(){return"slider"});function GA(t,e,n,i){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n}var FA,WA,HA,ZA,UA=["cartesian2d","polar","singleAxis"],XA=(WA=["axisIndex","axis","index","id"],HA=L(FA=(FA=["x","y","z","radius","angle","single"]).slice(),ao),ZA=L(WA=WA.slice(),ao),function(o,a){z(FA,function(t,e){for(var n={name:t,capital:HA[e]},i=0;i<WA.length;i++)n[WA[i]]=t+ZA[i];o.call(a,n)})}),jA=z,YA=Bi;GA.prototype={constructor:GA,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var o=[],a=this.ecModel;return a.eachSeries(function(t){var e,n,i;i=t.get("coordinateSystem"),0<=M(UA,i)&&(e=this._dimName,n=a.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0],this._axisIndex===(n&&n.componentIndex)&&o.push(t))},this),o},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,n,t=this._dimName,i=this.ecModel,o=this.getAxisModel(),a="x"===t||"y"===t?(e="gridIndex","x"===t?"y":"x"):(e="polarIndex","angle"===t?"radius":"angle");return i.eachComponent(a+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(n=t)}),n},getMinMaxSpan:function(){return D(this._minMaxSpan)},calculateDataWindow:function(e){var i=this._dataExtent,o=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],s=[e.start,e.end],l=[];return jA(["startValue","endValue"],function(t){l.push(null!=e[t]?o.parse(e[t]):null)}),jA([0,1],function(t){var e=l[t],n=s[t];"percent"===a[t]?(null==n&&(n=r[t]),e=o.parse(Ri(n,r,i,!0))):n=Ri(e,i,r,!0),l[t]=e,s[t]=n}),{valueWindow:YA(l),percentWindow:YA(s)}},reset:function(t){var e,n,i,o,a;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=Tp(this,this._dimName,e),n=this.calculateDataWindow(t.option),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,o=(i=this)._minMaxSpan={},a=i._dataZoomModel,jA(["min","max"],function(t){o[t+"Span"]=a.get(t+"Span");var e,n=a.get(t+"ValueSpan");null!=n&&(o[t+"ValueSpan"]=n,null!=(n=i.getAxisModel().axis.scale.parse(n)))&&(e=i._dataExtent,o[t+"Span"]=Ri(e[0]+n,e,[0,100],!0))}),Ap(this))},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Ap(this,!0))},filterData:function(t){var e,n,i,c;t===this._dataZoomModel&&(e=this._dimName,n=this.getTargetSeriesModels(),i=t.get("filterMode"),c=this._valueWindow,"none"!==i&&jA(n,function(n){var u=n.getData(),h=u.mapDimension(e,!0);h.length&&("weakFilter"===i?u.filterSelf(function(t){for(var e,n,i,o=0;o<h.length;o++){var a=u.get(h[o],t),r=!isNaN(a),s=a<c[0],l=a>c[1];if(r&&!s&&!l)return!0;r&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):jA(h,function(t){var e;"empty"===i?n.setData(u.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,u.selectRange(e))}),jA(h,function(t){u.setApproximateExtent(c,t)}))}))}};var qA=z,KA=XA,$A=nr({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=Dp(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=Dp(t);v(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;ef.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),Cp(this,t),qA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new GA(t.name,e,this,i));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();KA(function(t){var e=t.axisIndex;n[e]=Qe(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;KA(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t,a=!0,e=this.get("orient",!0),r=this.option,n=this.dependentModels;a&&(n[(t="vertical"===e?"y":"x")+"Axis"].length?(r[t+"AxisIndex"]=[0],a=!1):qA(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&KA(function(t){if(a){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,o=n.length;i<o;i++)"category"===n[i].get("type")&&e.push(i);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(o){this._isSeriesHasAllAxesTypeOf(o,"value")&&KA(function(t){var e=r[t.axisIndex],n=o.get(t.axisIndex),i=o.get(t.axisId);M(e,n=o.ecModel.queryComponents({mainType:t.axis,index:n,id:i})[0].componentIndex)<0&&e.push(n)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){e=e||t.name},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(i,o){var a=!0;return KA(function(t){var e=i.get(t.axisIndex),n=this.dependentModels[t.axis][e];n&&n.get("type")===o||(a=!1)},this),a},_setDefaultThrottle:function(t){var e;t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle&&(e=this.ecModel.option,this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20)},getFirstTargetAxisModel:function(){var n;return KA(function(t){var e;null!=n||(e=this.get(t.axisIndex)).length&&(n=this.dependentModels[t.axis][e[0]])},this),n},eachTargetAxis:function(n,i){var o=this.ecModel;KA(function(e){qA(this.get(e.axisIndex),function(t){n.call(i,e,t,this,o)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var n=this.getAxisProxy(t,e);return n&&n.getAxisModel()},setRawRange:function(e,t){var n=this.option;qA([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=e[t[0]],n[t[1]]=e[t[1]])},this),t||Cp(this,e)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e,n=this._axisProxies;for(e in n)if(n.hasOwnProperty(e)&&n[e].hostedBy(this))return n[e];for(e in n)if(n.hasOwnProperty(e)&&!n[e].hostedBy(this))return n[e]},getRangePropMode:function(){return this._rangePropMode.slice()}}),JA=s_.extend({type:"dataZoom",render:function(t,e,n){this.dataZoomModel=t,this.ecModel=e,this.api=n},getTargetCoordInfo:function(){var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var n,i=o.getComponent(t.axis,e);i&&(n=i.getCoordSysModel())&&function(t,e,n,i){for(var o,a=0;a<n.length;a++)if(n[a].model===t){o=n[a];break}o||n.push(o={model:t,axisModels:[],coordIndex:i}),o.axisModels.push(e)}(n,i,a[n.mainType]||(a[n.mainType]=[]),n.componentIndex)},this),a}}),QA=($A.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),_y),tD=Ri,eD=Bi,nD=k,iD=z,oD="horizontal",aD=["line","bar","candlestick","scatter"],rD=JA.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,n,i){rD.superApply(this,"render",arguments),sa(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){rD.superApply(this,"remove",arguments),la(this,"_dispatchZoomAction")},dispose:function(){rD.superApply(this,"dispose",arguments),la(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new rm;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,n=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},o=this._orient===oD?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},a=ho(t.option);z(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=so(a,i,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n!==oD||o?n===oD&&o?{scale:r?[-1,1]:[-1,-1]}:"vertical"!==n||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.barGroup;n.add(new QA({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),n.add(new QA({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:k(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t,e,n,i,o,a,r,s,l,u,h,c,d,p,g,f=this._dataShadowInfo=this._prepareDataShadowInfo();f&&(t=this._size,n=(e=f.series).getRawData(),null!=(i=e.getShadowDim?e.getShadowDim():f.otherDim)&&(o=.3*((a=n.getDataExtent(i))[1]-a[0]),a=[a[0]-o,a[1]+o],s=[0,t[1]],l=[0,t[0]],u=[[t[0],0],[0,0]],h=[],c=l[1]/(n.count()-1),d=0,p=Math.round(n.count()/t[0]),n.each([i],function(t,e){var n,i;0<p&&e%p?d+=c:(i=(n=null==t||isNaN(t)||""===t)?0:tD(t,a,s,!0),n&&!r&&e?(u.push([u[u.length-1][0],0]),h.push([h[h.length-1][0],0])):!n&&r&&(u.push([d,0]),h.push([d,0])),u.push([d,i]),h.push([d,i]),d+=c,r=n)}),g=this.dataZoomModel,this._displayables.barGroup.add(new yy({shape:{points:u},style:O({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new xy({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))))},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(a,r){z(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){var e,n,i,o;l||!0!==s&&M(aD,t.get("type"))<0||(n=u.getComponent(a.axis,r).axis,i={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],o=t.coordinateSystem,null!=i&&o.getOtherAxis&&(e=o.getOtherAxis(n).inverse),i=t.getData().mapDimension(i),l={thisAxis:n,series:t,thisDim:a.name,otherDim:i,otherAxisInverse:e})},this)},this),l}},_renderHandle:function(){var t=this._displayables,a=t.handles=[],r=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new QA({draggable:!0,cursor:Lp(this._orient),drift:nD(this._onDragMove,this,"all"),onmousemove:function(t){Mf(t.event)},ondragstart:nD(this._showDataInfo,this,!0),ondragend:nD(this._onDragEnd,this),onmouseover:nD(this._showDataInfo,this,!0),onmouseout:nD(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new QA(Qn({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),iD([0,1],function(t){var e=Li(l.get("handleIcon"),{cursor:Lp(this._orient),draggable:!0,drift:nD(this._onDragMove,this,t),onmousemove:function(t){Mf(t.event)},ondragend:nD(this._onDragEnd,this),onmouseover:nD(this._showDataInfo,this,!0),onmouseout:nD(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),n=e.getBoundingRect();this._handleHeight=Ei(l.get("handleSize"),this._size[1]),this._handleWidth=n.width/n.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var i=l.get("handleColor");null!=i&&(e.style.fill=i),s.add(a[t]=e);var o=l.textStyleModel;this.group.add(r[t]=new cy({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:o.getTextColor(),textFont:o.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[tD(t[0],[0,100],e,!0),tD(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];XM(e,i,o,n.get("zoomLock")?"all":t,null!=a.minSpan?tD(a.minSpan,r,o,!0):null,null!=a.maxSpan?tD(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=eD([tD(i[0],o,r,!0),tD(i[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var i=this._displayables,o=this._handleEnds,e=eD(o.slice()),a=this._size;iD([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scale:[n/2,n/2],position:[o[t],a[1]/2-n/2]})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Ii(s.handles[t].parent,this.group),n=Ai(0===t?"right":"left",e),i=this._handleWidth/2+5,o=Ti([c[t]+(0===t?-i:i),this._size[1]/2],e);l[t].setStyle({x:o[0],y:o[1],textVerticalAlign:u===oD?"middle":n,textAlign:u===oD?n:"center",text:h[t]})}var n,i,o,a,r=this.dataZoomModel,s=this._displayables,l=s.handleLabels,u=this._orient,h=["",""];!r.get("showDetail")||(n=r.findRepresentativeAxisProxy())&&(i=n.getAxisModel().axis,o=this._range,a=t?n.calculateDataWindow({start:o[0],end:o[1]}).valueWindow:n.getDataValueWindow(),h=[this._formatLabel(a[0],i),this._formatLabel(a[1],i)]);var c=eD(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),o=n.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return f(i)?i(t,a):A(i)?i.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,n){this._dragging=!0;var i=Ti([e,n],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e,n,i,o=this._size,a=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);a[0]<0||a[0]>o[0]||a[1]<0||a[1]>o[1]||(n=((e=this._handleEnds)[0]+e[1])/2,i=this._updateInterval("all",a[0]-n),this._updateView(),i&&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,e,n;return iD(this.getTargetCoordInfo(),function(t){var e;!n&&t.length&&(e=t[0].model.coordinateSystem,n=e.getRect&&e.getRect())}),n||(t=this.api.getWidth(),e=this.api.getHeight(),n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}),n}});$A.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var sD="\0_ec_dataZoom_roams",lD=k,uD=JA.extend({type:"dataZoom.inside",init:function(){this._range},render:function(r,t,s,e){uD.superApply(this,"render",arguments),this._range=r.getPercentRange(),z(this.getTargetCoordInfo(),function(t,o){var a=L(t,function(t){return Pp(t.model)});z(t,function(e){var i=e.model,n={};z(["pan","zoom","scrollMove"],function(t){n[t]=lD(hD[t],this,e,o)},this),kp(s,{coordId:Pp(i),allCoordIds:a,containsPoint:function(t,e,n){return i.coordinateSystem.containPoint([e,n])},dataZoomId:r.id,dataZoomModel:r,getRange:n})},this)},this)},dispose:function(){var t,n,e;t=this.api,n=this.dataZoomModel.id,z(e=Np(t),function(t){t.controller.dispose();var e=t.dataZoomInfos;e[n]&&(delete e[n],t.count--)}),Op(e),uD.superApply(this,"dispose",arguments),this._range=null}}),hD={zoom:function(t,e,n,i){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=cD[e](null,[i.originX,i.originY],r,n,t),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/i.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return XM(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Ep(function(t,e,n,i,o,a){var r=cD[i]([a.oldX,a.oldY],[a.newX,a.newY],e,o,n);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Ep(function(t,e,n,i,o,a){return cD[i]([0,0],[a.scrollDelta,a.scrollDelta],e,o,n).signal*(t[1]-t[0])*a.scrollDelta})},cD={grid:function(t,e,n,i,o){var a=n.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,n,i,o){var a=n.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,n,i,o){var a=n.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};qa({getTargetSeries:function(t){var i=C();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){z(n.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){i.set(t.uid,t)})})}),i},modifyOutputEnd:!0,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).reset(n,i)}),t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setRawRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]},!0)})}}),Ka("dataZoom",function(n,t){var i=Ip(k(t.eachComponent,t,"dataZoom"),XA,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:n},function(t,e){o.push.apply(o,i(t).nodes)}),z(o,function(t,e){t.setRawRange({start:n.start,end:n.end,startValue:n.startValue,endValue:n.endValue})})});function dD(t){var e=t&&t.visualMap;N(e)||(e=e?[e]:[]),pD(e,function(t){var e;t&&(zp(t,"splitList")&&!zp(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),(e=t.pieces)&&N(e)&&pD(e,function(t){B(t)&&(zp(t,"start")&&!zp(t,"min")&&(t.min=t.start),zp(t,"end")&&!zp(t,"max")&&(t.max=t.end))}))})}var pD=z;ux.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var gD=j_.VISUAL.COMPONENT;Qa(gD,{createOnAllSeries:!0,reset:function(i,t){var o=[];return t.eachComponent("visualMap",function(t){var e,c,d,p,g,n=i.pipelineContext;!t.isTargetSeries(i)||n&&n.large||o.push((e=t.stateList,c=t.targetVisuals,d=k(t.getValueState,t),p=t.getDataDimension(i.getData()),g={},z(e,function(t){var e=oM.prepareVisualTypes(c[t]);g[t]=e}),{progress:function(t,n){null!=p&&(p=n.getDimension(p));for(var i;null!=(i=t.next());){var e=n.getRawDataItem(i);if(e&&!1===e.visualMap)return;for(var o=null!=p?n.get(p,i,!0):i,a=d(o),r=c[a],s=g[a],l=0,u=s.length;l<u;l++){var h=s[l];r[h]&&r[h].applyVisual(o,function(t){return n.getItemVisual(i,t)},function(t,e){n.setItemVisual(i,t,e)})}}}}))}),o}}),Qa(gD,{createOnAllSeries:!0,reset:function(o,t){var a=o.getData(),r=[];t.eachComponent("visualMap",function(t){var e,n,i;t.isTargetSeries(o)&&(e=t.getVisualMeta(k(Bp,null,o,t))||{stops:[],outerColors:[]},n=t.getDataDimension(a),null!=(i=a.getDimensionInfo(n))&&(e.dimension=i.index,r.push(e)))}),o.getData().setVisual("visualMeta",r)}});var fD=function(t,e,n){var i=D((mD[t]||{})[e]);return n&&N(i)?i[i.length-1]:i},mD={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]}},vD=oM.mapVisual,yD=oM.eachVisual,xD=N,_D=z,wD=Bi,bD=Ri,SD=nr({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,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,n)},optionUpdated:function(t,e){var n=this.option;ef.canvasSupported||(n.realtime=!1),e||np(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=k(t,this),this.controllerVisuals=ep(this.option.controller,e,t),this.targetVisuals=ep(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=Qe(t),n},eachTargetSeries:function(e,n){z(this.getTargetSeriesIndices(),function(t){e.call(n,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},formatValueText:function(t,e,n){function i(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return n=n||["<",">"],N(t)&&(t=t.slice(),o=!0),a=e?t:o?[i(t[0]),i(t[1])]:i(t),A(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):f(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?n[0]+" "+a[1]:t[1]===l[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=wD([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,o=i.length-1;0<=o;o--){var a=i[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(i){xD(n.color)&&!i.inRange&&(i.inRange={color:n.color.slice().reverse()}),i.inRange=i.inRange||{color:e.get("gradientColor")},_D(this.stateList,function(t){var e,n=i[t];A(n)&&((e=fD(n,"active",u))?(i[t]={},i[t][n]=e):delete i[t])},this)}var e=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},o=n.target||(n.target={}),a=n.controller||(n.controller={});v(o,i),v(a,i);var u=this.isCategory();t.call(this,o),t.call(this,a),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},_D(i,function(t,e){var n;!oM.isValidType(e)||null!=(n=fD(e,"inactive",u))&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}))}.call(this,o,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");_D(this.stateList,function(t){var e=this.itemSize,n=a[t];null==(n=n||(a[t]={color:u?l:[l]})).symbol&&(n.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),n.symbol=vD(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i,o=n.symbolSize;null!=o&&(i=-1/0,yD(o,function(t){i<t&&(i=t)}),n.symbolSize=vD(o,function(t){return bD(t,[0,i],[0,e[0]],!0)}))},this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:x,getValueState:x,getVisualMeta:x}),MD=[20,140],ID=SD.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(t,e){ID.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){ID.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=MD[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=MD[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):N(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(){SD.prototype.completeVisualOption.apply(this,arguments),z(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=Bi((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getVisualMeta:function(n){function t(t,e){o.push({value:t,color:n(t,e)})}for(var e=Vp(0,0,this.getExtent()),i=Vp(0,0,this.option.range.slice()),o=[],a=0,r=0,s=i.length,l=e.length;r<l&&(!i.length||e[r]<=i[0]);r++)e[r]<i[a]&&t(e[r],"outOfRange");for(u=1;a<s;a++,u=0)u&&o.length&&t(i[a],"outOfRange"),t(i[a],"inRange");for(var u=1;r<l;r++)(!i.length||i[i.length-1]<e[r])&&(u&&(o.length&&t(o[o.length-1].value,"outOfRange"),u=0),t(e[r],"outOfRange"));var h=o.length;return{stops:o,outerColors:[h?o[0].color:"transparent",h?o[h-1].color:"transparent"]}}}),TD=ir({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,n,i){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,n=$y(e.get("padding")||0),i=t.getBoundingRect();t.add(new _y({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(n,i,o){function a(t){return l[t]}function r(t,e){l[t]=e}var t,e=(o=o||{}).forceState,s=this.visualMapModel,l={};"symbol"===i&&(l.symbol=s.get("itemSymbol")),"color"===i&&(t=s.get("contentColor"),l.color=t);var u=s.controllerVisuals[e||s.getValueState(n)];return z(oM.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),oM.dependsOn(t,i)&&e&&e.applyVisual(n,a,r)}),l[i]},positionGroup:function(t){var e=this.visualMapModel,n=this.api;lo(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:x}),AD=Ri,DD=z,CD=Math.min,LD=Math.max,kD=TD.extend({type:"visualMap.continuous",init:function(){kD.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var n=t.get("text");this._renderEndsText(e,n,0),this._renderEndsText(e,n,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,n){var i,o,a,r,s,l,u,h,c;e&&(i=null!=(i=e[1-n])?i+"":"",a=(o=this.visualMapModel).get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===n?-a:r[1]+a],s),u=this._applyTransform(0===n?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel,this.group.add(new cy({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:i,textFont:c.getFont(),textFill:c.getTextColor()}})))},_renderBar:function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,a=this._useHandle,r=Gp(e,this.api,i),s=n.barGroup=this._createBarGroup(r);s.add(n.outOfRange=Wp()),s.add(n.inRange=Wp(null,a?Zp(this._orient):null,k(this._dragHandle,this,"all",!1),k(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=LD(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,o,r),this._createHandle(s,1,i,u,o,r)),this._createIndicator(s,i,u,o),t.add(s)},_createHandle:function(t,e,n,i,o){var a,r=k(this._dragHandle,this,e,!1),s=k(this._dragHandle,this,e,!0),l=Wp((a=i,0===e?[[0,0],[a,0],[a,-a]]:[[0,0],[a,0],[a,a]]),Zp(this._orient),r,s);l.position[0]=n[0],t.add(l);var u=this.visualMapModel.textStyleModel,h=new cy({draggable:!0,drift:r,onmousemove:function(t){Mf(t.event)},ondragend:s,style:{x:0,y:0,text:"",textFont:u.getFont(),textFill:u.getTextColor()}});this.group.add(h);var c=["horizontal"===o?i/2:1.5*i,"horizontal"===o?0===e?-1.5*i:1.5*i:0===e?-i/2:i/2],d=this._shapes;d.handleThumbs[e]=l,d.handleLabelPoints[e]=c,d.handleLabels[e]=h},_createIndicator:function(t,e,n,i){var o=Wp([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new cy({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===i?n/2:9,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,n,i){var o;this._useHandle&&(this._dragging=!e,e||(o=this._applyTransform([n,i],this._shapes.barGroup,!0),this._updateInterval(t,o[1]),this._updateView()),e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():Hp(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1))},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),i=[0,t.itemSize[1]];this._handleEnds=[AD(e[0],n,i,!0),AD(e[1],n,i,!0)]},_updateInterval:function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];XM(e,i,o,t,0);var a=n.getExtent();this._dataInterval=[AD(i[0],o,a,!0),AD(i[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,n,a,"inRange"),s=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,n,i){var o={forceState:i,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(n,r);return{barColor:new Ty(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+i*o;if(a>t[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new rm("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{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(i,o){var a,r,s,l;this._useHandle&&(a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels,DD([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=i[t];var n=Ti(a.handleLabelPoints[t],Ii(e,this.group));l[t].setStyle({x:n[0],y:n[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this))},_showIndicator:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p=this.visualMapModel,g=p.getExtent(),f=p.itemSize,m=[0,f[1]],v=AD(t,g,m,!0),y=this._shapes,x=y.indicator;x&&(x.position[1]=v,x.attr("invisible",!1),x.setShape("points",(u=!!n,h=i,c=v,d=f[1],u?[[0,-CD(h,LD(c,0))],[6,0],[0,CD(h,LD(d-c,0))]]:[[0,0],[5,-5],[5,5]])),o=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),x.setStyle("fill",o),a=Ti(y.indicatorLabelPoint,Ii(x,this.group)),(r=y.indicatorLabel).attr("invisible",!1),s=this._applyTransform("left",y.barGroup),l=this._orient,r.setStyle({text:(n||"")+p.formatValueText(e),textVerticalAlign:"horizontal"===l?s:"middle",textAlign:"horizontal"===l?"center":s,x:a[0],y:a[1]}))},_enableHoverLinkToSeries:function(){var i=this;this._shapes.barGroup.on("mousemove",function(t){var e,n;i._hovering=!0,i._dragging||(e=i.visualMapModel.itemSize,(n=i._applyTransform([t.offsetX,t.offsetY],i._shapes.barGroup,!0,!0))[1]=CD(LD(0,n[1]),e[1]),i._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=e[0]))}).on("mouseout",function(){i._hovering=!1,i._dragging||i._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 n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y=this.visualMapModel,x=y.itemSize;function _(t,e,n){for(var i=0,o=t.length;i<o;i++)for(var a=t[i].seriesId,r=Qe(t[i].dataIndex),s=n&&n[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function w(t,e){var n,i,o=[];for(n in t){t.hasOwnProperty(n)&&null!=t[n]&&(e?o.push(+n):(i=w(t[n],!0)).length&&o.push({seriesId:n,dataIndex:i}))}return o}y.option.hoverLink&&(n=[0,x[1]],i=y.getExtent(),t=CD(LD(n[0],t),n[1]),g=i,f=n,m=6,(v=y.get("hoverLinkDataSize"))&&(m=AD(v,g,f,!0)/2),a=[t-(o=m),t+o],r=AD(t,n,i,!0),s=[AD(a[0],n,i,!0),AD(a[1],n,i,!0)],a[0]<n[0]&&(s[0]=-1/0),n[1]<a[1]&&(s[1]=1/0),e&&(s[0]===-1/0?this._showIndicator(r,s[1],"< ",o):s[1]===1/0?this._showIndicator(r,s[0],"> ",o):this._showIndicator(r,r,"≈ ",o)),l=this._hoverLinkDataIndices,u=[],(e||Hp(y))&&(u=this._hoverLinkDataIndices=y.findTargetDataIndices(s)),c=u,p={},_(l||[],d={}),_(c||[],p,d),h=[w(d),w(p)],this._dispatchHighDown("downplay",Fp(h[0])),this._dispatchHighDown("highlight",Fp(h[1])))},_hoverLinkFromSeriesMouseOver:function(t){var e,n,i,o=t.target,a=this.visualMapModel;o&&null!=o.dataIndex&&(e=this.ecModel.getSeriesByIndex(o.seriesIndex),a.isTargetSeries(e)&&(i=(n=e.getData(o.dataType)).get(a.getDataDimension(n),o.dataIndex,!0),isNaN(i)||this._showIndicator(i,i)))},_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",Fp(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var o=Ii(e,i?null:this.group);return Ey[N(t)?"applyTransform":"transformDirection"](t,o,n)},_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()}});Ka({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),Ya(dD);var PD=SD.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){PD.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();ND[this._mode].call(this),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=D(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=L(this._pieceList,function(t){t=D(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function i(t,e,n){return t&&t[e]&&(B(t[e])?t[e].hasOwnProperty(n):t[e]===n)}var o=this.option,n={},t=oM.listVisualTypes(),a=this.isCategory();z(o.pieces,function(e){z(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),z(n,function(t,e){var n=0;z(this.stateList,function(t){n|=i(o,t,e)||i(o.target,t,e)},this),n||z(this.stateList,function(t){(o[t]||(o[t]={}))[e]=fD(e,"inRange"===t?"active":"inactive",a)})},this),SD.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i,n=this.option,o=this._pieceList,a=(e?n:t).selected||{};n.selected=a,z(o,function(t,e){var n=this.getSelectedMapKey(t);a.hasOwnProperty(n)||(a[n]=!0)},this),"single"===n.selectedMode&&(i=!1,z(o,function(t,e){var n=this.getSelectedMapKey(t);a[n]&&(i?a[n]=!1:i=!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&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=D(t)},getValueState:function(t){var e=oM.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){oM.findPieceIndex(t,this._pieceList)===i&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getRepresentValue:function(t){var e;return this.isCategory()||null!=t.value?t.value:(e=t.interval||[])[0]===-1/0&&e[1]===1/0?0:(e[0]+e[1])/2},getVisualMeta:function(o){function n(t,e){var n=s.getRepresentValue({interval:t});e=e||s.getValueState(n);var i=o(n,e);t[0]===-1/0?r[0]=i:t[1]===1/0?r[1]=i:a.push({value:t[0],color:i},{value:t[1],color:i})}if(!this.isCategory()){var t,a=[],r=[],s=this,e=this._pieceList.slice();e.length?((t=e[0].interval[0])!==-1/0&&e.unshift({interval:[-1/0,t]}),(t=e[e.length-1].interval[1])!==1/0&&e.push({interval:[t,1/0]})):e.push({interval:[-1/0,1/0]});var i=-1/0;return z(e,function(t){var e=t.interval;e&&(e[0]>i&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}}}),ND={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),o=t.splitNumber,o=Math.max(parseInt(o,10),1);t.splitNumber=o;for(var a=(i[1]-i[0])/o;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=r+o;r<l;s+=a){var u=r===o-1?i[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[i[1],1/0],close:[0,0]}),qi(e),z(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;z(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),Up(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;z(t.pieces,function(t,e){B(t)||(t={value:t});var n={text:"",index:e};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],a=n.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],a[u]=r[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=oM.retrieveVisuals(t),d.push(n)},this),Up(t,d),qi(d),z(d,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};TD.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),n=e.endsText,d=V(r.get("showLabel",!0),!n);n&&this._renderEndsText(a,n[0],c,d,h),z(e.viewPieceList,function(t){var e=t.piece,n=new rm;n.onclick=k(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);var i,o=r.getRepresentValue(e);this._createItemSymbol(n,o,[0,0,c[0],c[1]]),d&&(i=this.visualMapModel.getValueState(o),n.add(new cy({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===i?.5:1}}))),a.add(n)},this),n&&this._renderEndsText(a,n[1],c,d,h),rx(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,n){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:Fp(e.findTargetDataIndices(n))})}t.on("mouseover",k(e,this,"highlight")).on("mouseout",k(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return Gp(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,i,o){var a,r;e&&(a=new rm,r=this.visualMapModel.textStyleModel,a.add(new cy({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a))},_getViewData:function(){var t=this.visualMapModel,e=L(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return("horizontal"===i?o:!o)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(Kr(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=D(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,z(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}}),Ya(dD);var OD=$i,RD=Qi,ED=nr({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(ef.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,i,e,o){var a=this.constructor,r=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[r];e&&e.data?(n?n.mergeOption(e,i,!0):(o&&Xp(e),z(e.data,function(t){t instanceof Array?(Xp(t[0]),Xp(t[1])):Xp(t)}),P(n=new a(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[r]=n):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=N(n)?L(n,OD).join(", "):OD(n),o=e.getName(t),a=RD(this.name);return null==n&&!o||(a+="<br />"),o&&(a+=RD(o),null!=n&&(a+=" : ")),null!=n&&(a+=RD(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});o(ED,Yx),ED.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 zD=M,BD=E,VD={min:BD(jp,"min"),max:BD(jp,"max"),average:BD(jp,"average")},GD=ir({type:"marker",init:function(){this.markerGroupMap=C()},render:function(t,n,i){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";n.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,n,i)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});GD.extend({type:"markPoint",updateTransform:function(t,e,n){e.eachSeries(function(t){var e=t.markPointModel;e&&(Qp(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,i,e,n){var o,a,r,s,l,u,h=t.coordinateSystem,c=t.id,d=t.getData(),p=this.markerGroupMap,g=p.get(c)||p.set(c,new xs),f=(a=t,r=i,s=(o=h)?L(o&&o.dimensions,function(t){return O({name:t},a.getData().getDimensionInfo(a.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],l=new gw(s,r),u=L(r.get("data"),E(Yp,a)),o&&(u=I(u,E(Kp,o))),l.initData(u,null,o?$p:function(t){return t.value}),l);i.setData(f),Qp(i.getData(),t,n),f.each(function(t){var e=f.getItemModel(t),n=e.getShallow("symbolSize");"function"==typeof n&&(n=n(i.getRawValue(t),i.getDataParams(t))),f.setItemVisual(t,{symbolSize:n,color:e.get("itemStyle.color")||d.getVisual("color"),symbol:e.getShallow("symbol")})}),g.updateData(f),this.group.add(g.group),f.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=i})}),g.__keep=!0,g.group.silent=i.get("silent")||t.get("silent")}}),Ya(function(t){t.markPoint=t.markPoint||{}}),ED.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"}});function FD(t,e,n,i){var o,a,r,s,l,u,h,c,d=t.getData(),p=i.type;return N(i)||"min"!==p&&"max"!==p&&"average"!==p&&"median"!==p&&null==i.xAxis&&null==i.yAxis||(r=null!=i.yAxis||null!=i.xAxis?(a=null!=i.yAxis?"y":"x",e.getAxis(a),V(i.yAxis,i.xAxis)):(a=(o=qp(i,d,e,t)).valueDataDim,o.valueAxis,Jp(d,a,p)),l=1-(s="x"===a?0:1),h={},(u=D(i)).type=null,u.coord=[],h.coord=[],u.coord[l]=-1/0,h.coord[l]=1/0,0<=(c=n.get("precision"))&&"number"==typeof r&&(r=+r.toFixed(Math.min(c,20))),u.coord[s]=h.coord[s]=r,i=[u,h,{type:p,valueIndex:i.valueIndex,value:r}]),(i=[Yp(t,i[0]),Yp(t,i[1]),P({},i[2])])[2].type=i[2].type||"",v(i[2],i[0]),v(i[2],i[1]),i}GD.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var n,i,o,t=e.markLineModel;t&&(n=t.getData(),i=t.__from,o=t.__to,i.each(function(t){ig(i,t,!0,e,a),ig(o,t,!1,e,a)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},renderSeries:function(o,n,t,a){function e(t,e,n){var i=t.getItemModel(e);ig(t,e,n,o,a),t.setItemVisual(e,{symbolSize:i.get("symbolSize")||f[n?0:1],symbol:i.get("symbol",!0)||g[n?0:1],color:i.get("itemStyle.color")||s.getVisual("color")})}var i=o.coordinateSystem,r=o.id,s=o.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new Hu);this.group.add(u.group);var h=function(t,e,n){var i=t?L(t&&t.dimensions,function(t){return O({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}],o=new gw(i,n),a=new gw(i,n),r=new gw([],n),s=L(n.get("data"),E(FD,e,t,n));t&&(s=I(s,E(ng,t)));var l=t?$p:function(t){return t.value};return o.initData(L(s,function(t){return t[0]}),null,l),a.initData(L(s,function(t){return t[1]}),null,l),r.initData(L(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(i,o,n),c=h.from,d=h.to,p=h.line;n.__from=c,n.__to=d,n.setData(p);var g=n.get("symbol"),f=n.get("symbolSize");N(g)||(g=[g,g]),"number"==typeof f&&(f=[f,f]),h.from.each(function(t){e(c,t,!0),e(d,t,!1)}),p.each(function(t){var e=p.getItemModel(t).get("lineStyle.color");p.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),p.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),p.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(p),h.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=n})}),u.__keep=!0,u.group.silent=n.get("silent")||o.get("silent")}}),Ya(function(t){t.markLine=t.markLine||{}}),ED.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"}}}});function WD(t,e,n,i){var o=Yp(t,i[0]),a=Yp(t,i[1]),r=V,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=h([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}var HD=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];GD.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(n){var i,t=n.markAreaModel;t&&(i=t.getData()).each(function(e){var t=L(HD,function(t){return sg(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},renderSeries:function(n,r,t,i){var e=n.coordinateSystem,o=n.id,a=n.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new rm});this.group.add(l.group),l.__keep=!0;var u=function(t,n,e){var i,o=t?(i=L(t&&t.dimensions,function(t){var e=n.getData();return O({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new gw(L(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),e)):new gw(i=[{name:"value",type:"float"}],e),a=L(e.get("data"),E(WD,n,t,e));t&&(a=I(a,E(rg,t)));var r=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,n,r);r.setData(u),u.each(function(e){u.setItemLayout(e,L(HD,function(t){return sg(u,e,t,n,i)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new yy({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var n=l.__data.getItemGraphicEl(e);Si(n,{shape:{points:u.getItemLayout(t)}},r,t),l.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=u.getItemVisual(e,"color");t.useStyle(O(n.getModel("itemStyle").getItemStyle(),{fill:Vt(a,.4),stroke:a})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),gi(t.style,t.hoverStyle,i,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),di(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||n.get("silent")}}),Ya(function(t){t.markArea=t.markArea||{}}),ux.registerSubTypeDefaulter("timeline",function(){return"slider"}),Ka({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var n=e.getComponent("timeline");return n&&null!=t.currentIndex&&(n.setCurrentIndex(t.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),e.resetOption("timeline"),O({currentIndex:n.option.currentIndex},t)}),Ka({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var n=e.getComponent("timeline");n&&null!=t.playState&&n.setPlayState(t.playState)});var ZD=ux.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,n){this._data,this._names,this.mergeDefaultAndTheme(t,n),this._initData()},mergeOption:function(t){ZD.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:(e<=t&&(t=e-1),t<0&&(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 o,t=this.option,e=t.data||[],n=t.axisType,a=this._names=[];"category"===n&&(o=[],z(e,function(t,e){var n,i=en(t);B(t)?(n=D(t)).value=e:n=e,o.push(n),A(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o);var i={category:"ordinal",time:"time"}[n]||"number";(this._data=new gw([{name:"value",type:i}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});o(ZD.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:[]}}),Yx);function UD(t,e,n,i){lb.call(this,t,e,n),this.type=i||"value",this.model=null}var XD=s_.extend({type:"timeline"});UD.prototype={constructor:UD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},a(UD,lb);var jD=k,YD=z,qD=Math.PI;XD.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(e,t,n){var i,o,a,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("mainGroup"),a=this._createGroup("labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return Qi(r.scale.getLabel(t))},YD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,a,r,e),this._position(i,e)),this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n,i,o=t.get("label.position"),a=t.get("orient"),r=(i=e,so((n=t).getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},n.get("padding")));null==o||"auto"===o?o="horizontal"===a?r.y+r.height/2<e.getHeight()/2?"-":"+":r.x+r.width/2<e.getWidth()/2?"+":"-":isNaN(o)&&(o={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][o]);var s,l,u,h,c={horizontal:"center",vertical:0<=o||"+"===o?"left":"right"},d={horizontal:0<=o||"+"===o?"top":"bottom",vertical:"middle"},p={horizontal:0,vertical:qD/2},g="vertical"===a?r.height:r.width,f=t.getModel("controlStyle"),m=f.get("show",!0),v=m?f.get("itemSize"):0,y=m?f.get("itemGap"):0,x=v+y,_=(_=t.get("label.rotate")||0)*qD/180,w=f.get("position",!0),b=m&&f.get("showPlayBtn",!0),S=m&&f.get("showPrevBtn",!0),M=m&&f.get("showNextBtn",!0),I=0,T=g;return"left"===w||"bottom"===w?(b&&(s=[0,0],I+=x),S&&(l=[I,0],I+=x)):(b&&(s=[T-v,0],T-=x),S&&(l=[0,0],I+=x)),M&&(u=[T-v,0],T-=x),h=[I,T],t.get("inverse")&&h.reverse(),{viewRect:r,mainLength:g,orient:a,rotation:p[a],labelRotation:_,labelPosOpt:o,labelAlign:t.get("label.align")||c[a],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||d[a],playPosition:s,prevBtnPosition:l,nextBtnPosition:u,axisExtent:h,controlSize:v,controlGap:y}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function i(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}var o,a,r,s=this._mainGroup,l=this._labelGroup,u=t.viewRect;"vertical"===t.orient&&(mt(o=dt(),o,[-(a=u.x),-(r=u.y+u.height)]),vt(o,o,-qD/2),mt(o,o,[a,r]),(u=u.clone()).applyTransform(o));var h=n(u),c=n(s.getBoundingRect()),d=n(l.getBoundingRect()),p=s.position,g=l.position;g[0]=p[0]=h[0][0];var f,m=t.labelPosOpt;isNaN(m)?(i(p,c,h,1,f="+"===m?0:1),i(g,d,h,1,1-f)):(i(p,c,h,1,f=0<=m?0:1),g[1]=p[1]+m),s.attr("position",p),l.attr("position",g),s.rotation=l.rotation=t.rotation,e(s),e(l)},_createAxis:function(t,e){var n=e.getData(),i=e.get("axisType"),o=Ur(e,i);o.getTicks=function(){return n.mapArray(["value"],function(t){return t})};var a=n.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new UD("value",o,t.axisExtent,i);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new rm;return this.group.add(e),e},_renderAxisLine:function(t,e,n,i){var o=n.getExtent();i.get("lineStyle.show")&&e.add(new wy({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:P({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var h=u.getData(),e=l.scale.getTicks();YD(e,function(t){var e=l.dataToCoord(t),n=h.getItemModel(t),i=n.getModel("itemStyle"),o=n.getModel("emphasis.itemStyle"),a={position:[e,0],onclick:jD(this._changeTimeline,this,t)},r=hg(n,i,s,a);di(r,o.getItemStyle()),n.get("tooltip")?(r.dataIndex=t,r.dataModel=u):r.dataIndex=r.dataModel=null},this)},_renderAxisLabel:function(s,l,u,t){var h,e;u.getLabelModel().get("show")&&(h=t.getData(),e=u.getViewLabels(),YD(e,function(t){var e=t.tickValue,n=h.getItemModel(e),i=n.getModel("label"),o=n.getModel("emphasis.label"),a=u.dataToCoord(t.tickValue),r=new cy({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:jD(this._changeTimeline,this,e),silent:!1});fi(r.style,i,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),di(r,fi({},o))},this))},_renderControl:function(t,l,e,u){function n(t,e,n,i){var o,a,r,s;t&&(a=e,r=g,s={position:t,origin:[h/2,0],rotation:i?-c:0,rectHover:!0,style:d,onclick:n},o=Yn(u.get(a).replace(/^path:\/\//,""),D(s||{}),new Qt(r[0],r[1],r[2],r[3]),"center"),l.add(o),di(o,p))}var h=t.controlSize,c=t.rotation,d=u.getModel("controlStyle").getItemStyle(),p=u.getModel("emphasis.controlStyle").getItemStyle(),g=[0,-h/2,h,h],i=u.getPlayState(),o=u.get("inverse",!0);n(t.nextBtnPosition,"controlStyle.nextIcon",jD(this._changeTimeline,this,o?"-":"+")),n(t.prevBtnPosition,"controlStyle.prevIcon",jD(this._changeTimeline,this,o?"+":"-")),n(t.playPosition,"controlStyle."+(i?"stopIcon":"playIcon"),jD(this._handlePlayClick,this,!i),!0)},_renderCurrentPointer:function(t,e,n,i){var o=i.getData(),a=i.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=jD(s._handlePointerDrag,s),t.ondragend=jD(s._handlePointerDragend,s),cg(t,a,n,i,!0)},onUpdate:function(t){cg(t,a,n,i)}};this._currentPointer=hg(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,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var n=this._toAxisCoord(t)[0],i=Bi(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var o=this._findNearestTick(n),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(jD(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return Ti(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(o){var a,t=this.model.getData(),r=1/0,s=this._axis;return t.each(["value"],function(t,e){var n=s.dataToCoord(t),i=Math.abs(n-o);i<r&&(r=i,a=e)}),a},_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})}}),Ya(function(t){var e=t&&t.timeline;N(e)||(e=e?[e]:[]),z(e,function(t){var e,n,i,o;t&&(i=(e=t).type,(o={number:"value",time:"time"})[i]&&(e.axisType=o[i],delete e.type),lg(e),ug(e,"controlPosition")&&(ug(n=e.controlStyle||(e.controlStyle={}),"position")||(n.position=e.controlPosition),"none"!==n.position||ug(n,"show")||(n.show=!1,delete n.position),delete e.controlPosition),z(e.data||[],function(t){B(t)&&!N(t)&&(!ug(t,"value")&&ug(t,"name")&&(t.value=t.name),lg(t))}))})});var KD=nr({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){KD.superApply(this,"optionUpdated",arguments),z(this.option.feature,function(t,e){var n=_p(e);n&&v(t,n.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});ir({type:"toolbox",render:function(h,c,d,s){function t(t,e){var n,i=g[t],o=g[e],a=new ki(l[i],h,h.ecModel);if(i&&!o){if(0===i.indexOf("my"))n={model:a,onclick:a.option.onclick,featureName:i};else{var r=_p(i);if(!r)return;n=new r(a,c,d)}u[i]=n}else{if(!(n=u[o]))return;n.model=a,n.ecModel=c,n.api=d}i||!o?a.get("show")&&!n.unusable?(function(i,o,t){var a=i.getModel("iconStyle"),r=i.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():i.get("icon"),s=i.get("title")||{};{var n,l;"string"==typeof e&&(n=e,l=s,s={},(e={})[t]=n,s[t]=l)}var u=i.iconPaths={};z(e,function(t,e){var n=Li(t,{},{x:-p/2,y:-p/2,width:p,height:p});n.setStyle(a.getItemStyle()),n.hoverStyle=r.getItemStyle(),di(n),h.get("showTitle")&&(n.__title=s[e],n.on("mouseover",function(){var t=r.getItemStyle();n.setStyle({text:s[e],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){n.setStyle({textFill:null})})),n.trigger(i.get("iconStatus."+e)||"normal"),m.add(n),n.on("click",k(o.onclick,o,c,d,e)),u[e]=n})}(a,n,i),a.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},n.render&&n.render(a,c,d,s)):n.remove&&n.remove(c,d):n.dispose&&n.dispose(c,d)}var p,l,u,g,e,n,i,o,a,r,f,m=this.group;m.removeAll(),h.get("show")&&(p=+h.get("itemSize"),l=h.get("feature")||{},u=this._features||(this._features={}),g=[],z(l,function(t,e){g.push(e)}),new sr(this._featureNames||[],g).add(t).update(t).remove(E(t,null)).execute(),this._featureNames=g,e=m,i=d,o=(n=h).getBoxLayoutParams(),a=n.get("padding"),r={width:i.getWidth(),height:i.getHeight()},f=so(o,r,a),rx(n.get("orient"),e,n.get("itemGap"),f.width,f.height),lo(e,o,r,a),m.add(Pd(m.getBoundingRect(),h)),m.eachChild(function(t){var e,n,i,o,a=t.__title,r=t.hoverStyle;r&&a&&(e=pe(a,Me(r)),n=t.position[0]+m.position[0],i=!1,t.position[1]+m.position[1]+p+e.height>d.getHeight()&&(r.textPosition="top",i=!0),o=i?-5-e.height:p+8,n+e.width/2>d.getWidth()?(r.textPosition=["100%",o],r.textAlign="right"):n-e.width/2<0&&(r.textPosition=[0,o],r.textAlign="left"))}))},updateView:function(t,e,n,i){z(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){z(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){z(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var $D=y_.toolbox.saveAsImage;dg.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:$D.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:$D.lang.slice()},dg.prototype.unusable=!ef.canvasSupported,dg.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=n.get("type",!0)||"png";o.download=i+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||ef.browser.ie||ef.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,i+"."+a)}else{var c=n.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(p)}},xp("saveAsImage",dg);var JD=y_.toolbox.magicType;pg.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:D(JD.title),option:{},seriesIndex:{}};var QD=pg.prototype;QD.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return z(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var tC={line:function(t,e,n,i){if("bar"===t)return v({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(t,e,n,i){if("line"===t)return v({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(t,e,n,i){if("line"===t||"bar"===t)return v({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return v({id:e,stack:""},i.get("option.tiled")||{},!0)}},eC=[["line","bar"],["stack","tiled"]];QD.onclick=function(u,t,h){var c,d=this.model,e=d.get("seriesIndex."+h);tC[h]&&(c={series:[]},z(eC,function(t){0<=M(t,h)&&z(t,function(t){d.setIconStatus(t,"normal")})}),d.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,i=tC[h](e,n,t,d);i&&(O(i,t.option),c.series.push(i));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;c[r]=c[r]||[];for(var l=0;l<=s;l++)c[r][s]=c[r][s]||{};c[r][s].boundaryGap="bar"===h}}}),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:c}))},Ka({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),xp("magicType",pg);var nC=y_.toolbox.dataView,iC=new Array(60).join("-"),oC="\t",aC=new RegExp("["+oC+"]+","g");vg.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:D(nC.title),lang:D(nC.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},vg.prototype.onclick=function(t,e){function n(){i.removeChild(a),x._dom=null}var i=e.getDom(),o=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h,c=o.get("optionToContent"),d=o.get("contentToOption"),p=gg(t);"function"==typeof c?"string"==typeof(h=c(e.getOption()))?l.innerHTML=h:_(h)&&l.appendChild(h):(l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=p.value);var g=p.meta,f=document.createElement("div");f.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:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;lt(v,"click",n),lt(y,"click",function(){var t;try{t="function"==typeof d?d(l,e.getOption()):mg(u.value,g)}catch(t){throw n(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),n()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,o.get("readOnly")||f.appendChild(y),f.appendChild(v),lt(u,"keydown",function(t){var e,n,i;9===(t.keyCode||t.which)&&(e=this.value,n=this.selectionStart,i=this.selectionEnd,this.value=e.substring(0,n)+oC+e.substring(i),this.selectionStart=this.selectionEnd=n+1,Mf(t))}),a.appendChild(r),a.appendChild(l),a.appendChild(f),l.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},vg.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},vg.prototype.dispose=function(t,e){this.remove(t,e)},xp("dataView",vg),Ka({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,a){var r=[];z(t.newOption.series,function(t){var e,n,i,o=a.getSeriesByName(t.name)[0];o?(e=o.get("data"),r.push({name:t.name,data:(n=t.data,i=e,L(n,function(t,e){var n=i&&i[e];return B(n)&&!N(n)?(B(t)&&!N(t)&&(t=t.value),O({value:t},n)):t}))})):r.push(P({type:"scatter"},t))}),a.mergeOption(O({series:r},t.newOption))});var rC=z,sC="\0_ec_hist_store";$A.extend({type:"dataZoom.select"}),JA.extend({type:"dataZoom.select"});var lC=y_.toolbox.dataZoom,uC=z;xg.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:D(lC.title)};var hC=xg.prototype;hC.render=function(t,e,n,i){this.model=t,this.ecModel=e,this.api=n,function(t,e,n,i,o){var a=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(a="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new sp(_g(t.option),e,{include:["grid"]});n._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,i,n),wg(t,e)},hC.onclick=function(t,e,n){cC[n].call(this)},hC.remove=function(t,e){this._brushController.unmount()},hC.dispose=function(t,e){this._brushController.dispose()};var cC={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=yg(t),e=i[i.length-1];1<i.length&&i.pop();var o={};return rC(e,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){o[e]=t;break}}),o}(this.ecModel))}};hC._onBrush=function(t,e){function o(t,e,n){var i,o,a,r=e.getAxis(t),s=r.model,l=(i=t,o=s,c.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,o.componentIndex)&&(a=t)}),a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(n=XM(0,n.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(h[l.id]={dataZoomId:l.id,startValue:n[0],endValue:n[1]})}var h,c,a,n,r;e.isEnd&&t.length&&(h={},c=this.ecModel,this._brushController.updateCovers([]),new sp(_g(this.model.option),c,{include:["grid"]}).matchOutputRanges(t,c,function(t,e,n){var i;"cartesian2d"===n.type&&("rect"===(i=t.brushType)?(o("x",n,e[0]),o("y",n,e[1])):o({lineX:"x",lineY:"y"}[i],n,e))}),n=h,r=yg(a=c),rC(n,function(t,e){for(var n,i,o=r.length-1;0<=o&&!r[o][e];o--);o<0&&((n=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(i=n.getPercentRange(),r[0][e]={dataZoomId:e,start:i[0],end:i[1]}))}),r.push(n),this._dispatchZoomAction(h))},hC._dispatchZoomAction=function(t){var n=[];uC(t,function(t,e){n.push(D(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},xp("dataZoom",xg),Ya(function(r){function t(i,t){var o,a,e,n;t&&(null==(a=t[o=i+"Index"])||"all"===a||N(a)||(a=!1===a||"none"===a?[]:[a]),e=function(t,e){var n;null!=a&&"all"!==a&&-1===M(a,e)||((n={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+e})[o]=e,s.push(n))},N(n=r[i])||(n=n?[n]:[]),uC(n,e))}var s,e,n;r&&(N(s=r.dataZoom||(r.dataZoom=[]))||(r.dataZoom=s=[s]),(e=r.toolbox)&&(N(e)&&(e=e[0]),e&&e.feature)&&(t("xAxis",n=e.feature.dataZoom),t("yAxis",n)))});var dC=y_.toolbox.restore;bg.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:dC.title},bg.prototype.onclick=function(t,e,n){t[sC]=null,e.dispatchAction({type:"restore",from:this.uid})},xp("restore",bg),Ka({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var pC,gC="urn:schemas-microsoft-com:vml",fC="undefined"==typeof window?null:window,mC=!1,vC=fC&&fC.document;if(vC&&!ef.canvasSupported)try{vC.namespaces.zrvml||vC.namespaces.add("zrvml",gC),pC=function(t){return vC.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){pC=function(t){return vC.createElement("<"+t+' xmlns="'+gC+'" class="zrvml">')}}var yC=Gv.CMD,xC=Math.round,_C=Math.sqrt,wC=Math.abs,bC=Math.cos,SC=Math.sin,MC=Math.max;if(!ef.canvasSupported){var IC=21600,TC=IC/2,AC=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=IC+","+IC,t.coordorigin="0,0"},DC=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},CC=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},LC=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},kC=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},PC=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},NC=function(t,e,n){var i=Pt(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=DC(i[0],i[1],i[2]),t.opacity=n*i[3])},OC=function(t,e,n){var i,o,a=e.fill;if(null!=a)if(a instanceof py){var r,s,l,u,h,c,d,p,g,f,m=0,v=[0,0],y=0,x=1,_=n.getBoundingRect(),w=_.width,b=_.height;"linear"===a.type?(r="gradient",c=n.transform,h=[a.x*w,a.y*b],s=[a.x2*w,a.y2*b],c&&(Q(h,h,c),Q(s,s,c)),l=s[0]-h[0],u=s[1]-h[1],(m=180*Math.atan2(l,u)/Math.PI)<0&&(m+=360),m<1e-6&&(m=0)):(r="gradientradial",h=[a.x*w,a.y*b],c=n.transform,d=n.scale,p=w,g=b,v=[(h[0]-_.x)/p,(h[1]-_.y)/g],c&&Q(h,h,c),p/=d[0]*IC,g/=d[1]*IC,y=0/(f=MC(p,g)),x=2*a.r/f-y);var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M,I,T,A,D=S.length,C=[],L=[],k=0;k<D;k++){var P=S[k],N=(i=P.color,o=void 0,o=Pt(i),[DC(o[0],o[1],o[2]),o[3]]);L.push(P.offset*x+y+" "+N[0]),0!==k&&k!==D-1||C.push(N)}2<=D&&(M=C[0][0],I=C[1][0],T=C[0][1]*e.opacity,A=C[1][1]*e.opacity,t.type=r,t.method="none",t.focus="100%",t.angle=m,t.color=M,t.color2=I,t.colors=L.join(","),t.opacity=A,t.opacity2=T),"radial"===r&&(t.focusposition=v.join(","))}else NC(t,a,e.opacity)},RC=function(t,e,n,i){var o,a,r="fill"==e,s=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof py&&LC(t,s),s=s||Sg(e),r?OC(s,n,i):(o=s,null!=(a=n).lineDash&&(o.dashstyle=a.lineDash.join(" ")),null==a.stroke||a.stroke instanceof py||NC(o,a.stroke,a.opacity)),CC(t,s)):(t[r?"filled":"stroked"]="false",LC(t,s))},EC=[[],[],[]];Vn.prototype.brushVML=function(t){var e=this.style,n=this._vmlEl;n||(n=Sg("shape"),AC(n),this._vmlEl=n),RC(n,"fill",e,this),RC(n,"stroke",e,this);var i,o,a=this.transform,r=null!=a,s=n.getElementsByTagName("stroke")[0];s&&(i=e.lineWidth,r&&!e.strokeNoScale&&(o=a[0]*a[3]-a[1]*a[2],i*=_C(wC(o))),s.weight=i+"px");var l=this.path||(this.path=new Gv);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(t,e){for(var n,i,o,a,r,s=yC.M,l=yC.C,u=yC.L,h=yC.A,c=yC.Q,d=[],p=t.data,g=t.len(),f=0;f<g;){switch(i="",n=0,o=p[f++]){case s:i=" m ",n=1,a=p[f++],r=p[f++],EC[0][0]=a,EC[0][1]=r;break;case u:i=" l ",n=1,a=p[f++],r=p[f++],EC[0][0]=a,EC[0][1]=r;break;case c:case l:i=" c ",n=3;var m,v,y=p[f++],x=p[f++],_=p[f++],w=p[f++];o===c?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(a+2*y)/3,x=(r+2*x)/3):(m=p[f++],v=p[f++]),EC[0][0]=y,EC[0][1]=x,EC[1][0]=_,EC[1][1]=w,a=EC[2][0]=m,r=EC[2][1]=v;break;case h:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=_C(e[0]*e[0]+e[1]*e[1]),I=_C(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[f++],D=p[f++],C=p[f++],L=p[f++],k=p[f++]+T,P=p[f++]+k+T;f++;var N=p[f++],O=A+bC(k)*C,R=D+SC(k)*L,y=A+bC(P)*C,x=D+SC(P)*L,E=N?" wa ":" at ";Math.abs(O-y)<1e-4&&(.01<Math.abs(P-k)?N&&(O+=.0125):Math.abs(R-D)<1e-4?N&&O<A||!N&&A<O?x-=.0125:x+=.0125:N&&R<D||!N&&D<R?y+=.0125:y-=.0125),d.push(E,xC(((A-C)*M+b)*IC-TC),",",xC(((D-L)*I+S)*IC-TC),",",xC(((A+C)*M+b)*IC-TC),",",xC(((D+L)*I+S)*IC-TC),",",xC((O*M+b)*IC-TC),",",xC((R*I+S)*IC-TC),",",xC((y*M+b)*IC-TC),",",xC((x*I+S)*IC-TC)),a=y,r=x;break;case yC.R:var z=EC[0],B=EC[1];z[0]=p[f++],z[1]=p[f++],B[0]=z[0]+p[f++],B[1]=z[1]+p[f++],e&&(Q(z,z,e),Q(B,B,e)),z[0]=xC(z[0]*IC-TC),B[0]=xC(B[0]*IC-TC),z[1]=xC(z[1]*IC-TC),B[1]=xC(B[1]*IC-TC),d.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case yC.Z:d.push(" x ")}if(0<n){d.push(i);for(var V=0;V<n;V++){var G=EC[V];e&&Q(G,G,e),d.push(xC(G[0]*IC-TC),",",xC(G[1]*IC-TC),V<n-1?",":"")}}}return d.join("")}(l,this.transform),n.style.zIndex=kC(this.zlevel,this.z,this.z2),CC(t,n),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Vn.prototype.onRemove=function(t){LC(t,this._vmlEl),this.removeRectText(t)},Vn.prototype.onAdd=function(t){CC(t,this._vmlEl),this.appendRectText(t)};We.prototype.brushVML=function(t){var e,n,i,o,a,r,s,l,u,h,c,d,p,g,f,m,v,y,x,_,w,b,S,M,I,T,A,D,C,L,k,P,N,O,R,E,z,B=this.style,V=B.image;"object"==_typeof(s=V)&&s.tagName&&"IMG"===s.tagName.toUpperCase()?((i=V.src)===this._imageSrc?(e=this._imageWidth,n=this._imageHeight):(a=(o=V.runtimeStyle).width,r=o.height,o.width="auto",o.height="auto",e=V.width,n=V.height,o.width=a,o.height=r,this._imageSrc=i,this._imageWidth=e,this._imageHeight=n),V=i):V===this._imageSrc&&(e=this._imageWidth,n=this._imageHeight),V&&(l=B.x||0,u=B.y||0,h=B.width,c=B.height,d=B.sWidth,p=B.sHeight,g=B.sx||0,f=B.sy||0,m=d&&p,(v=this._vmlEl)||(v=vC.createElement("div"),AC(v),this._vmlEl=v),x=v.style,_=!1,b=w=1,this.transform&&(y=this.transform,w=_C(y[0]*y[0]+y[1]*y[1]),b=_C(y[2]*y[2]+y[3]*y[3]),_=y[1]||y[2]),_?(M=[l+h,u],I=[l,u+c],T=[l+h,u+c],Q(S=[l,u],S,y),Q(M,M,y),Q(I,I,y),Q(T,T,y),A=MC(S[0],M[0],I[0],T[0]),D=MC(S[1],M[1],I[1],T[1]),(C=[]).push("M11=",y[0]/w,",","M12=",y[2]/b,",","M21=",y[1]/w,",","M22=",y[3]/b,",","Dx=",xC(l*w+y[4]),",","Dy=",xC(u*b+y[5])),x.padding="0 "+xC(A)+"px "+xC(D)+"px 0",x.filter="progid:DXImageTransform.Microsoft.Matrix("+C.join("")+", SizingMethod=clip)"):(y&&(l=l*w+y[4],u=u*b+y[5]),x.filter="",x.left=xC(l)+"px",x.top=xC(u)+"px"),L=this._imageEl,k=this._cropEl,L||(L=vC.createElement("div"),this._imageEl=L),P=L.style,m?(e&&n?(P.width=xC(w*e*h/d)+"px",P.height=xC(b*n*c/p)+"px"):(N=new Image,O=this,N.onload=function(){N.onload=null,e=N.width,n=N.height,P.width=xC(w*e*h/d)+"px",P.height=xC(b*n*c/p)+"px",O._imageWidth=e,O._imageHeight=n,O._imageSrc=V},N.src=V),k||((k=vC.createElement("div")).style.overflow="hidden",this._cropEl=k),(R=k.style).width=xC((h+g*h/d)*w),R.height=xC((c+f*c/p)*b),R.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-g*h/d*w+",Dy="+-f*c/p*b+")",k.parentNode||v.appendChild(k),L.parentNode!=k&&k.appendChild(L)):(P.width=xC(w*h)+"px",P.height=xC(b*c)+"px",v.appendChild(L),k&&k.parentNode&&(v.removeChild(k),this._cropEl=null)),E="",(z=B.opacity)<1&&(E+=".Alpha(opacity="+xC(100*z)+") "),E+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+V+", SizingMethod=scale)",P.filter=E,v.style.zIndex=kC(this.zlevel,this.z,this.z2),CC(t,v),null!=B.text&&this.drawRectText(t,this.getBoundingRect()))},We.prototype.onRemove=function(t){LC(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},We.prototype.onAdd=function(t){CC(t,this._vmlEl),this.appendRectText(t)};var zC,BC={},VC=0,GC=document.createElement("div");Am.measureText=function(t,e){var n=vC;zC||((zC=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",vC.body.appendChild(zC));try{zC.style.font=e}catch(t){}return zC.innerHTML="",zC.appendChild(n.createTextNode(t)),{width:zC.offsetWidth}};for(var FC=new Qt,WC=[xm,Fe,We,Vn,cy],HC=0;HC<WC.length;HC++){var ZC=WC[HC].prototype;ZC.drawRectText=function(t,e,n,i){var o=this.style;if(this.__dirty&&Te(o),null!=(r=o.text)&&(r+=""),r){if(o.rich){for(var a=be(r,o),r=[],s=0;s<a.lines.length;s++){for(var l=a.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);r.push(u.join(""))}r=r.join("\n")}var c=o.textAlign,d=o.textVerticalAlign,p=function(t){var e=BC[t];if(!e){100<VC&&(VC=0,BC={});var n,i=GC.style;try{i.font=t,n=i.fontFamily.split(",")[0]}catch(t){}e={style:i.fontStyle||"normal",variant:i.fontVariant||"normal",weight:i.fontWeight||"normal",size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},BC[t]=e,VC++}return e}(o.font),g=p.style+" "+p.variant+" "+p.weight+" "+p.size+'px "'+p.family+'"';n=n||pe(r,g,c,d);var f,m,v,y,x,_=this.transform;_&&!i&&(FC.copy(e),FC.applyTransform(_),e=FC),i?(y=e.x,x=e.y):(f=o.textPosition,m=o.textDistance,f instanceof Array?(y=e.x+PC(f[0],e.width),x=e.y+PC(f[1],e.height),c=c||"left"):(y=(v=me(f,e,m)).x,x=v.y,c=c||v.textAlign,d=d||v.textVerticalAlign)),y=ge(y,n.width,c),x=fe(x,n.height,d),x+=n.height/2;var w,b,S,M=Sg,I=this._textVmlEl;I?b=(w=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),w=M("path"),b=M("textpath"),S=M("skew"),b.style["v-text-align"]="left",AC(I),w.textpathok=!0,b.on=!0,I.from="0 0",I.to="1000 0.05",CC(I,S),CC(I,w),CC(I,b),this._textVmlEl=I);var T=[y,x],A=I.style;_&&i?(Q(T,T,_),S.on=!0,S.matrix=_[0].toFixed(3)+","+_[2].toFixed(3)+","+_[1].toFixed(3)+","+_[3].toFixed(3)+",0,0",S.offset=(xC(T[0])||0)+","+(xC(T[1])||0),S.origin="0 0",A.left="0px",A.top="0px"):(S.on=!1,A.left=xC(y)+"px",A.top=xC(x)+"px"),b.string=String(r).replace(/&/g,"&").replace(/"/g,""");try{b.style.font=g}catch(t){}RC(I,"fill",{fill:o.textFill,opacity:o.opacity},this),RC(I,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash},this),I.style.zIndex=kC(this.zlevel,this.z,this.z2),CC(t,I)}},ZC.removeRectText=function(t){LC(t,this._textVmlEl),this._textVmlEl=null},ZC.appendRectText=function(t){CC(t,this._textVmlEl)}}cy.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},cy.prototype.onRemove=function(t){this.removeRectText(t)},cy.prototype.onAdd=function(t){this.appendRectText(t)}}Ig.prototype={constructor:Ig,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,n=0;n<t.length;n++){var i=t[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(e),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(e),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,e),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var n,t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;this._width==t&&this._height==e||(this._width=t,this._height=e,(n=this._vmlViewport.style).width=t+"px",n.height=e+"px")},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Mg(e.width))-Mg(e.paddingLeft)-Mg(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Mg(e.height))-Mg(e.paddingTop)-Mg(e.paddingBottom)|0}},z(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;Ig.prototype[t]=(e=t,function(){$f('In IE8.0 VML mode painter not support method "'+e+'"')})}),Je("vml",Ig);var UC=Gv.CMD,XC=Array.prototype.join,jC="none",YC=Math.round,qC=Math.sin,KC=Math.cos,$C=Math.PI,JC=2*Math.PI,QC=180/$C,tL=1e-4,eL={};eL.brush=function(t){var e=t.style,n=t.__svgEl;n||(n=Tg("path"),t.__svgEl=n),t.path||t.createPathProxy();var i,o=t.path;t.__dirtyPath&&(o.beginPath(),t.buildPath(o,t.shape),t.__dirtyPath=!1,(i=function(t){for(var e=[],n=t.data,i=t.len(),o=0;o<i;){var a="",r=0;switch(n[o++]){case UC.M:a="M",r=2;break;case UC.L:a="L",r=2;break;case UC.Q:a="Q",r=4;break;case UC.C:a="C",r=6;break;case UC.A:var s=n[o++],l=n[o++],u=n[o++],h=n[o++],c=n[o++],d=n[o++],p=n[o++],g=n[o++],f=Math.abs(d),m=Dg(f-JC)&&!Dg(f),v=!1,v=JC<=f||!Dg(f)&&(-$C<d&&d<0||$C<d)==!!g,y=Ag(s+u*KC(c)),x=Ag(l+h*qC(c));m&&(d=g?JC-1e-4:1e-4-JC,v=!0,9===o&&e.push("M",y,x));var _=Ag(s+u*KC(c+d)),w=Ag(l+h*qC(c+d));e.push("A",Ag(u),Ag(h),YC(p*QC),+v,+g,_,w);break;case UC.Z:a="Z";break;case UC.R:var _=Ag(n[o++]),w=Ag(n[o++]),b=Ag(n[o++]),S=Ag(n[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M<r;M++)e.push(Ag(n[o++]))}return e.join(" ")}(o)).indexOf("NaN")<0&&Lg(n,"d",i)),kg(n,e,!1,t),Cg(n,t.transform),null!=e.text&&aL(t,t.getBoundingRect())};var nL={brush:function(t){var e,n,i,o,a,r,s,l=t.style,u=l.image;u instanceof HTMLImageElement&&(u=u.src),u&&(e=l.x||0,n=l.y||0,i=l.width,o=l.height,(a=t.__svgEl)||(a=Tg("image"),t.__svgEl=a),u!==t.__imageSrc&&(r="href",s=u,a.setAttributeNS("http://www.w3.org/1999/xlink",r,s),t.__imageSrc=u),Lg(a,"width",i),Lg(a,"height",o),Lg(a,"x",e),Lg(a,"y",n),Cg(a,t.transform),null!=l.text&&aL(t,t.getBoundingRect()))}},iL={},oL=new Qt,aL=function(t,e,n){var i=t.style;t.__dirty&&Te(i);var o=i.text;if(null!=o){o+="";var a=t.__textSvgEl;a||(a=Tg("text"),t.__textSvgEl=a);var r=i.textPosition,s=i.textDistance,l=i.textAlign||"left";"number"==typeof i.fontSize&&(i.fontSize+="px");var u,h,c,d=i.font||[i.fontStyle||"",i.fontWeight||"",i.fontSize||"",i.fontFamily||""].join(" ")||Tm,p=Pg(i.textVerticalAlign),g=(n=pe(o,d,l,p)).lineHeight;r instanceof Array?(h=e.x+r[0],c=e.y+r[1]):(h=(u=me(r,e,s)).x,c=u.y,p=Pg(u.textVerticalAlign),l=u.textAlign),Lg(a,"alignment-baseline",p),d&&(a.style.font=d);var f,m,v,y,x=i.textPadding;Lg(a,"x",h),Lg(a,"y",c),kg(a,i,!0,t),t instanceof cy||t.style.transformText?Cg(a,t.transform):(t.transform?(oL.copy(e),oL.applyTransform(t.transform),e=oL):(f=t.transformCoordToGlobal(e.x,e.y),e.x=f[0],e.y=f[1],t.transform=pt(dt())),"center"===(m=i.textOrigin)?(h=n.width/2+h,c=n.height/2+c):m&&(h=m[0]+h,c=m[1]+c),v=-i.textRotation||0,vt(y=dt(),y,v),mt(y,y,f=[t.transform[4],t.transform[5]]),Cg(a,y));var _=o.split("\n"),w=_.length,b=l;"left"===b?(b="start",x&&(h+=x[3])):"right"===b?(b="end",x&&(h-=x[1])):"center"===b&&(b="middle",x&&(h+=(x[3]-x[1])/2));var S=0;if("after-edge"===p?(S=-n.height+g,x&&(S-=x[2])):"middle"===p?(S=(-n.height+g)/2,x&&(c+=(x[0]-x[2])/2)):x&&(S+=x[0]),t.__text!==o||t.__textFont!==d){var M=t.__tspanList||[];for(t.__tspanList=M,T=0;T<w;T++)(A=M[T])?A.innerHTML="":(A=M[T]=Tg("tspan"),a.appendChild(A),Lg(A,"alignment-baseline",p),Lg(A,"text-anchor",b)),Lg(A,"x",h),Lg(A,"y",c+T*g+S),A.appendChild(document.createTextNode(_[T]));for(;T<M.length;T++)a.removeChild(M[T]);M.length=w,t.__text=o,t.__textFont=d}else if(t.__tspanList.length)for(var I=t.__tspanList.length,T=0;T<I;++T){var A=t.__tspanList[T];A&&(Lg(A,"x",h),Lg(A,"y",c+T*g+S))}}};iL.drawRectText=aL,iL.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],aL(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Ng.prototype={diff:function(l,u,t){t=t||function(t,e){return t===e},this.equals=t;var h=this;l=l.slice();var c=(u=u.slice()).length,d=l.length,p=1,e=c+d,g=[{newPos:-1,components:[]}],n=this.extractCommon(g[0],u,l,0);if(g[0].newPos+1>=c&&d<=n+1){for(var i=[],o=0;o<u.length;o++)i.push(o);return[{indices:i,count:u.length}]}for(;p<=e;){var a=function(){for(var t,e=-1*p;e<=p;e+=2){var n,i=g[e-1],o=g[e+1],a=(o?o.newPos:0)-e;i&&(g[e-1]=void 0);var r=i&&i.newPos+1<c,s=o&&0<=a&&a<d;if(r||s){if(!r||s&&i.newPos<o.newPos?(n={newPos:(t=o).newPos,components:t.components.slice(0)},h.pushComponent(n.components,void 0,!0)):((n=i).newPos++,h.pushComponent(n.components,!0,void 0)),a=h.extractCommon(n,u,l,e),n.newPos+1>=c&&d<=a+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e<n;e++){var a=t[e];if(a.removed){for(var r=[],s=o;s<o+a.count;s++)r.push(s);a.indices=r,o+=a.count}else{for(r=[],s=i;s<i+a.count;s++)r.push(s);a.indices=r,i+=a.count,a.added||(o+=a.count)}}return t}(n.components);g[e]=n}else g[e]=void 0}p++}();if(a)return a}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var o=e.length,a=n.length,r=t.newPos,s=r-i,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],n[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 rL=new Ng;Og.prototype.createElement=Tg,Og.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)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},Og.prototype.update=function(t,e){var n,i;t&&(n=this.getDefs(!1),t[this._domName]&&n.contains(t[this._domName])?"function"==typeof e&&e(t):(i=this.add(t))&&(t[this._domName]=i))},Og.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Og.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Og.prototype.getDoms=function(){var n=this.getDefs(!1);if(!n)return[];var i=[];return z(this._tagNames,function(t){var e=n.getElementsByTagName(t);i=i.concat([].slice.call(e))}),i},Og.prototype.markAllUnused=function(){var e=this;z(this.getDoms(),function(t){t[e._markLabel]="0"})},Og.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Og.prototype.removeUnused=function(){var e,n=this.getDefs(!1);n&&z((e=this).getDoms(),function(t){"1"!==t[e._markLabel]&&n.removeChild(t)})},Og.prototype.getSvgProxy=function(t){return t instanceof Vn?eL:t instanceof We?nL:t instanceof cy?iL:eL},Og.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Og.prototype.getSvgElement=function(t){return t.__svgEl},a(Rg,Og),Rg.prototype.addWithoutUpdate=function(a,r){var s;r&&r.style&&(s=this,z(["fill","stroke"],function(t){var e,n,i,o;!r.style[t]||"linear"!==r.style[t].type&&"radial"!==r.style[t].type||(n=r.style[t],i=s.getDefs(!0),n._dom?(e=n._dom,i.contains(n._dom)||s.addDom(e)):e=s.add(n),s.markUsed(r),o=e.getAttribute("id"),a.setAttribute(t,"url(#"+o+")"))}))},Rg.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return $f("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},Rg.prototype.update=function(n){var i=this;Og.prototype.update.call(this,n,function(){var t=n.type,e=n._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?i.updateDom(n,n._dom):(i.removeDom(n),i.add(n))})},Rg.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 $f("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,o=n.length;i<o;++i){var a=this.createElement("stop");a.setAttribute("offset",100*n[i].offset+"%"),a.setAttribute("stop-color",n[i].color),e.appendChild(a)}t._dom=e},Rg.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e._dom&&Og.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&Og.prototype.markUsed.call(this,e._dom))},a(Eg,Og),Eg.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var n=this.getTextSvgElement(t);n&&this.updateDom(n,t.__clipPaths,!0),this.markUsed(t)},Eg.prototype.updateDom=function(t,e,n){var i,o,a,r,s,l,u,h;e&&0<e.length?(a=this.getDefs(!0),(r=e[0])[s=n?"_textDom":"_dom"]?(o=r[s].getAttribute("id"),i=r[s],a.contains(i)||a.appendChild(i)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(i),r[s]=i),l=this.getSvgProxy(r),r.transform&&r.parent.invTransform&&!n?(u=Array.prototype.slice.call(r.transform),ft(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u):l.brush(r),h=this.getSvgElement(r),i.innerHTML="",i.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(i,e.slice(1),n)):t&&t.setAttribute("clip-path","none")},Eg.prototype.markUsed=function(t){var e=this;t.__clipPaths&&0<t.__clipPaths.length&&z(t.__clipPaths,function(t){t._dom&&Og.prototype.markUsed.call(e,t._dom),t._textDom&&Og.prototype.markUsed.call(e,t._textDom)})},a(zg,Og),zg.prototype.addWithoutUpdate=function(t,e){var n,i,o;e&&Bg(e.style)&&((i=e.style)._shadowDom?(n=i._shadowDom,this.getDefs(!0).contains(i._shadowDom)||this.addDom(n)):n=this.add(e),this.markUsed(e),o=n.getAttribute("id"),t.style.filter="url(#"+o+")")},zg.prototype.add=function(t){var e=this.createElement("filter"),n=t.style;return n._shadowDomId=n._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+n._shadowDomId),this.updateDom(t,e),this.addDom(e),e},zg.prototype.update=function(t,e){var n,i=e.style;Bg(i)?(n=this,Og.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})):this.remove(t,i)},zg.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},zg.prototype.updateDom=function(t,e){var n,i,o,a,r=0===(r=e.getElementsByTagName("feDropShadow")).length?this.createElement("feDropShadow"):r[0],s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,i=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,i=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}r.setAttribute("dx",n/l),r.setAttribute("dy",i/u),r.setAttribute("flood-color",a);var h=o/2/l+" "+o/2/u;r.setAttribute("stdDeviation",h),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(r),s._shadowDom=e},zg.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&Og.prototype.markUsed.call(this,e._shadowDom)};function sL(t,e,n,i){this.root=t,this.storage=e,this._opts=n=P({},n||{});var o=Tg("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new Rg(i,o),this.clipPathManager=new Eg(i,o),this.shadowManager=new zg(i,o);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=a,t.appendChild(a),a.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]}sL.prototype={constructor:sL,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();for(var e,n=this._svgRoot,i=this._visibleList,o=t.length,a=[],r=0;r<o;r++){var s=(e=m=t[r])instanceof Vn?eL:e instanceof We?nL:e instanceof cy?iL:eL,l=Ug(m)||Zg(m);m.invisible||(m.__dirty&&(s&&s.brush(m),this.clipPathManager.update(m),m.style&&(this.gradientManager.update(m.style.fill),this.gradientManager.update(m.style.stroke),this.shadowManager.update(l,m)),m.__dirty=!1),a.push(m))}var u,h,c,d=(u=i,h=a,rL.diff(u,h,c));for(r=0;r<d.length;r++)if((g=d[r]).removed)for(f=0;f<g.count;f++){var l=Ug(m=i[g.indices[f]]),p=Zg(m);Hg(n,l),Hg(n,p)}for(r=0;r<d.length;r++){var g=d[r];if(g.added)for(f=0;f<g.count;f++){l=Ug(m=a[g.indices[f]]),p=Zg(m);v?Fg(n,l,v):Wg(n,l),l?Fg(n,p,l):v?Fg(n,p,v):Wg(n,p),Fg(n,p,l),v=p||l||v,this.gradientManager.addWithoutUpdate(l,m),this.shadowManager.addWithoutUpdate(v,m),this.clipPathManager.markUsed(m)}else if(!g.removed)for(var f=0;f<g.count;f++){var m=a[g.indices[f]],v=l=Zg(m)||Ug(m)||v;this.gradientManager.markUsed(m),this.gradientManager.addWithoutUpdate(l,m),this.shadowManager.markUsed(m),this.shadowManager.addWithoutUpdate(l,m),this.clipPathManager.markUsed(m)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(Tg("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var n=this._viewport;n.style.display="none";var i,o,a=this._opts;null!=t&&(a.width=t),null!=e&&(a.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width===t&&this._height===e||(this._width=t,this._height=e,(i=n.style).width=t+"px",i.height=e+"px",(o=this._svgRoot).setAttribute("width",t),o.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[i]||Vg(s[n])||Vg(r.style[n]))-(Vg(s[o])||0)-(Vg(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},z(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;sL.prototype[t]=(e=t,function(){$f('In SVG mode painter not support method "'+e+'"')})}),Je("svg",sL),t.version="4.2.0",t.dependencies={zrender:"4.0.5"},t.PRIORITY=j_,t.init=function(t,e,n){var i=Xa(t);if(i)return i;var o,a,r=new La(t,e,n);return r.id="ec_"+hw++,lw[r.id]=r,cn(t,dw,r.id),o=r,a="__connectUpdateStatus",H_(ew,function(t,e){o._messageCenter.on(e,function(t){if(uw[o.group]&&0!==o[a]){if(t&&t.escapeConnect)return;var e=o.makeActionFromEvent(t),n=[];H_(lw,function(t){t!==o&&t.group===o.group&&n.push(t)}),s(n,0),H_(n,function(t){1!==t[a]&&t.dispatchAction(e)}),s(n,2)}})}),r;function s(t,e){for(var n=0;n<t.length;n++)t[n][a]=e}},t.connect=function(e){var t;return N(e)&&(t=e,e=null,H_(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+cw++,H_(t,function(t){t.group=e})),uw[e]=!0,e},t.disConnect=Ua,t.disconnect=pw,t.dispose=function(t){"string"==typeof t?t=lw[t]:t instanceof La||(t=Xa(t)),t instanceof La&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=Xa,t.getInstanceById=function(t){return lw[t]},t.registerTheme=ja,t.registerPreprocessor=Ya,t.registerProcessor=qa,t.registerPostUpdate=function(t){ow.push(t)},t.registerAction=Ka,t.registerCoordinateSystem=$a,t.getCoordinateSystemDimensions=function(t){var e=Mo.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=Ja,t.registerVisual=Qa,t.registerLoading=er,t.extendComponentModel=nr,t.extendComponentView=ir,t.extendSeriesModel=or,t.extendChartView=ar,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,n){G_.registerMap(t,e,n)},t.getMap=function(t){var e=G_.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=qm,t.number=Ky,t.format=nx,t.throttle=ra,t.helper=ib,t.matrix=Cf,t.vector=xf,t.color=Xf,t.parseGeoJSON=ab,t.parseGeoJson=ub,t.util=hb,t.graphic=cb,t.List=gw,t.Model=ki,t.Axis=lb,t.env=ef}); |