12 lines
433 KiB
JavaScript
12 lines
433 KiB
JavaScript
// +----------------------------------------------------------------------
|
||
// | vaeThink [ Programming makes me happy ]
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2018 http://www.vaeThink.com All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||
// +----------------------------------------------------------------------
|
||
// | Author: 听雨 < 389625819@qq.com >
|
||
// +---------------------------------------------------------------------
|
||
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};layui.define(function(t){var e,i;e=this,i=function(t){function e(t,e){"createCanvas"===t&&(Gu=null),Fu[t]=e}function i(t){if(null==t||"object"!=(void 0===t?"undefined":_typeof(t)))return t;var e=t,n=Ou.call(t);if("[object Array]"===n){if(!z(t)){e=[];for(var r=0,o=t.length;r<o;r++)e[r]=i(t[r])}}else if(Lu[n]){if(!z(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(r=0,o=t.length;r<o;r++)e[r]=i(t[r])}}}else if(!Pu[n]&&!z(t)&&!M(t))for(var s in e={},t)t.hasOwnProperty(s)&&(e[s]=i(t[s]));return e}function n(t,e,r){if(!w(e)||!w(t))return r?i(e):t;for(var o in e)if(e.hasOwnProperty(o)){var a=t[o],s=e[o];!w(s)||!w(a)||y(s)||y(a)||M(s)||M(a)||b(s)||b(a)||z(s)||z(a)?!r&&o in t||(t[o]=i(e[o])):n(a,s,r)}return t}function r(t,e){for(var i=t[0],r=1,o=t.length;r<o;r++)i=n(i,t[r],e);return i}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function a(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function s(){return Gu||(Gu=Hu().getContext("2d")),Gu}function l(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function h(t,e){function i(){}var n=t.prototype;for(var r in i.prototype=e.prototype,t.prototype=new i,n)t.prototype[r]=n[r];t.prototype.constructor=t,t.superClass=e}function u(t,e,i){a(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function c(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function d(t,e,i){if(t&&e)if(t.forEach&&t.forEach===Eu)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;n<r;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function f(t,e,i){if(t&&e){if(t.map&&t.map===Bu)return t.map(e,i);for(var n=[],r=0,o=t.length;r<o;r++)n.push(e.call(i,t[r],r,t));return n}}function p(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===Vu)return t.reduce(e,i,n);for(var r=0,o=t.length;r<o;r++)i=e.call(n,i,t[r],r,t);return i}}function g(t,e,i){if(t&&e){if(t.filter&&t.filter===Nu)return t.filter(e,i);for(var n=[],r=0,o=t.length;r<o;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function m(t,e){var i=Ru.call(arguments,2);return function(){return t.apply(e,i.concat(Ru.call(arguments)))}}function v(t){var e=Ru.call(arguments,1);return function(){return t.apply(this,e.concat(Ru.call(arguments)))}}function y(t){return"[object Array]"===Ou.call(t)}function x(t){return"function"==typeof t}function _(t){return"[object String]"===Ou.call(t)}function w(t){var e=void 0===t?"undefined":_typeof(t);return"function"===e||!!t&&"object"==e}function b(t){return!!Pu[Ou.call(t)]}function S(t){return!!Lu[Ou.call(t)]}function M(t){return"object"==(void 0===t?"undefined":_typeof(t))&&"number"==typeof t.nodeType&&"object"==_typeof(t.ownerDocument)}function I(t){return t!=t}function T(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function C(t,e){return null!=t?t:e}function D(t,e,i){return null!=t?t:null!=e?e:i}function A(){return Function.call.apply(Ru,arguments)}function k(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function P(t,e){if(!t)throw new Error(e)}function L(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}function O(t){t[Wu]=!0}function z(t){return t[Wu]}function E(t){function e(t,e){i?n.set(t,e):n.set(e,t)}var i=y(t),n=this;t instanceof E?t.each(e):t&&d(t,e)}function N(t){return new E(t)}function R(){}function B(t,e){var i=new Uu(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function V(t,e){return t[0]=e[0],t[1]=e[1],t}function F(t){var e=new Uu(2);return e[0]=t[0],e[1]=t[1],e}function H(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function G(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function W(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function Z(t){return Math.sqrt(U(t))}function U(t){return t[0]*t[0]+t[1]*t[1]}function X(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function j(t,e){var i=Z(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function Y(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function q(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function $(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function K(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function Q(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function J(){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 tt(t,e){return{target:t,topTarget:e&&e.topTarget}}function et(){}function it(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return!n||Ju}return!1}function nt(){var t=new ic(6);return rt(t),t}function rt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ot(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 at(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],a=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function st(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function lt(t,e,i){var n=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+a*h,t[1]=-n*h+a*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t}function ht(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function ut(t,e){var i=e[0],n=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=i*a-o*n;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-a*r)*l,t[5]=(o*r-i*s)*l,t):null}function ct(t){return t>oc||t<-oc}function dt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function ft(t){return(t=Math.round(t))<0?0:t>255?255:t}function pt(t){return t<0?0:t>1?1:t}function gt(t){return ft(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function mt(t){return pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function vt(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function yt(t,e,i){return t+(e-t)*i}function xt(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function _t(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function wt(t,e){vc&&_t(vc,e),vc=mc.put(t,vc||e.slice())}function bt(t,e){if(t){e=e||[];var i=mc.get(t);if(i)return _t(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in gc)return _t(e,gc[n]),wt(t,e),e;if("#"!==n.charAt(0)){var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===n.length){var a=n.substr(0,r),s=n.substr(r+1,o-(r+1)).split(","),l=1;switch(a){case"rgba":if(4!==s.length)return void xt(e,0,0,0,1);l=mt(s.pop());case"rgb":return 3!==s.length?void xt(e,0,0,0,1):(xt(e,gt(s[0]),gt(s[1]),gt(s[2]),l),wt(t,e),e);case"hsla":return 4!==s.length?void xt(e,0,0,0,1):(s[3]=mt(s[3]),St(s,e),wt(t,e),e);case"hsl":return 3!==s.length?void xt(e,0,0,0,1):(St(s,e),wt(t,e),e);default:return}}xt(e,0,0,0,1)}else{if(4===n.length)return(h=parseInt(n.substr(1),16))>=0&&h<=4095?(xt(e,(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1),wt(t,e),e):void xt(e,0,0,0,1);if(7===n.length){var h=parseInt(n.substr(1),16);return h>=0&&h<=16777215?(xt(e,(16711680&h)>>16,(65280&h)>>8,255&h,1),wt(t,e),e):void xt(e,0,0,0,1)}}}}function St(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=mt(t[1]),r=mt(t[2]),o=r<=.5?r*(n+1):r+n-r*n,a=2*r-o;return xt(e=e||[],ft(255*vt(a,o,i+1/3)),ft(255*vt(a,o,i)),ft(255*vt(a,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Mt(t,e){var i=bt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return At(i,4===i.length?"rgba":"rgb")}}function It(t){var e=bt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Tt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=e[r],s=e[o],l=n-r;return i[0]=ft(yt(a[0],s[0],l)),i[1]=ft(yt(a[1],s[1],l)),i[2]=ft(yt(a[2],s[2],l)),i[3]=pt(yt(a[3],s[3],l)),i}}function Ct(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),o=Math.ceil(n),a=bt(e[r]),s=bt(e[o]),l=n-r,h=At([ft(yt(a[0],s[0],l)),ft(yt(a[1],s[1],l)),ft(yt(a[2],s[2],l)),pt(yt(a[3],s[3],l))],"rgba");return i?{color:h,leftIndex:r,rightIndex:o,value:n}:h}}function Dt(t,e){if((t=bt(t))&&null!=e)return t[3]=pt(e),At(t,"rgba")}function At(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function kt(t,e){return t[e]}function Pt(t,e,i){t[e]=i}function Lt(t,e,i){return(e-t)*i+t}function Ot(t,e,i){return i>.5?e:t}function zt(t,e,i,n,r){var o=t.length;if(1==r)for(s=0;s<o;s++)n[s]=Lt(t[s],e[s],i);else for(var a=o&&t[0].length,s=0;s<o;s++)for(var l=0;l<a;l++)n[s][l]=Lt(t[s][l],e[s][l],i)}function Et(t,e,i){var n=t.length,r=e.length;if(n!==r)if(n>r)t.length=r;else for(a=n;a<r;a++)t.push(1===i?e[a]:wc.call(e[a]));for(var o=t[0]&&t[0].length,a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<o;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function Nt(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(o=0;o<n;o++)if(t[o]!==e[o])return!1}else for(var r=t[0].length,o=0;o<n;o++)for(var a=0;a<r;a++)if(t[o][a]!==e[o][a])return!1;return!0}function Rt(t,e,i,n,r,o,a,s,l){var h=t.length;if(1==l)for(c=0;c<h;c++)s[c]=Bt(t[c],e[c],i[c],n[c],r,o,a);else for(var u=t[0].length,c=0;c<h;c++)for(var d=0;d<u;d++)s[c][d]=Bt(t[c][d],e[c][d],i[c][d],n[c][d],r,o,a)}function Bt(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function Vt(t){if(c(t)){var e=t.length;if(c(t[0])){for(var i=[],n=0;n<e;n++)i.push(wc.call(t[n]));return i}return wc.call(t)}return t}function Ft(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Ht(t,e,i,n,r,o){var a,s,l=t._getter,h=t._setter,u="spline"===e,d=n.length;if(d){var f,p=c(n[0].value),g=!1,m=!1,v=p?c((s=(a=n)[a.length-1].value)&&s[0])?2:1:0;n.sort(function(t,e){return t.time-e.time}),f=n[d-1].time;for(var y=[],x=[],_=n[0].value,w=!0,b=0;b<d;b++){y.push(n[b].time/f);var S=n[b].value;if(p&&Nt(S,_,v)||!p&&S===_||(w=!1),_=S,"string"==typeof S){var M=bt(S);M?(S=M,g=!0):m=!0}x.push(S)}if(o||!w){var I=x[d-1];for(b=0;b<d-1;b++)p?Et(x[b],I,v):!isNaN(x[b])||isNaN(I)||m||g||(x[b]=I);p&&Et(l(t._target,r),I,v);var T,C,D,A,k,P=0,L=0;if(g)var O=[0,0,0,0];var z=new dt({target:t._target,life:f,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<L){for(i=Math.min(P+1,d-1);i>=0&&!(y[i]<=e);i--);i=Math.min(i,d-2)}else{for(i=P;i<d&&!(y[i]>e);i++);i=Math.min(i-1,d-2)}P=i,L=e;var n=y[i+1]-y[i];if(0!==n)if(T=(e-y[i])/n,u)if(D=x[i],C=x[0===i?i:i-1],A=x[i>d-2?d-1:i+1],k=x[i>d-3?d-1:i+2],p)Rt(C,D,A,k,T,T*T,T*T*T,l(t,r),v);else{if(g)o=Rt(C,D,A,k,T,T*T,T*T*T,O,1),o=Ft(O);else{if(m)return Ot(D,A,T);o=Bt(C,D,A,k,T,T*T,T*T*T)}h(t,r,o)}else if(p)zt(x[i],x[i+1],T,l(t,r),v);else{var o;if(g)zt(x[i],x[i+1],T,O,1),o=Ft(O);else{if(m)return Ot(x[i],x[i+1],T);o=Lt(x[i],x[i+1],T)}h(t,r,o)}},ondestroy:i});return e&&"spline"!==e&&(z.easing=e),z}}}function Gt(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function Wt(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r<i&&n(t[r],t[r-1])<0;)r++;!function(t,e,i){for(i--;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,r)}else for(;r<i&&n(t[r],t[r-1])>=0;)r++;return r-e}function Zt(t,e,i,n,r){for(n===e&&n++;n<i;n++){for(var o,a=t[n],s=e,l=n;s<l;)r(a,t[o=s+l>>>1])<0?l=o:s=o+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=a}}function Ut(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])>0){for(s=n-r;l<s&&o(t,e[i+r+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(t,e[i+r-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}for(a++;a<l;){var u=a+(l-a>>>1);o(t,e[i+u])>0?a=u+1:l=u}return l}function Xt(t,e,i,n,r,o){var a=0,s=0,l=1;if(o(t,e[i+r])<0){for(s=r+1;l<s&&o(t,e[i+r-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=a;a=r-l,l=r-h}else{for(s=n-r;l<s&&o(t,e[i+r+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var u=a+(l-a>>>1);o(t,e[i+u])<0?l=u:a=u+1}return l}function jt(t,e){function i(i){var l=n[i],h=r[i],u=n[i+1],c=r[i+1];r[i]=h+c,i===a-3&&(n[i+1]=n[i+2],r[i+1]=r[i+2]),a--;var d=Xt(t[u],t,l,h,0,e);l+=d,0!=(h-=d)&&0!==(c=Ut(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,r,a){var l=0;for(l=0;l<n;l++)s[l]=t[i+l];var h=0,u=r,c=i;if(t[c++]=t[u++],0!=--a)if(1!==n){for(var d,f,p,g=o;;){d=0,f=0,p=!1;do{if(e(t[u],s[h])<0){if(t[c++]=t[u++],f++,d=0,0==--a){p=!0;break}}else if(t[c++]=s[h++],d++,f=0,1==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Xt(t[u],s,h,n,0,e))){for(l=0;l<d;l++)t[c+l]=s[h+l];if(c+=d,h+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[u++],0==--a){p=!0;break}if(0!==(f=Ut(s[h],t,u,a,0,e))){for(l=0;l<f;l++)t[c+l]=t[u+l];if(c+=f,u+=f,0==(a-=f)){p=!0;break}}if(t[c++]=s[h++],1==--n){p=!0;break}g--}while(d>=Rc||f>=Rc);if(p)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===n){for(l=0;l<a;l++)t[c+l]=t[u+l];t[c+a]=s[h]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=s[h+l]}}else{for(l=0;l<a;l++)t[c+l]=t[u+l];t[c+a]=s[h]}else for(l=0;l<n;l++)t[c+l]=s[h+l]}(l,h,u,c):function(i,n,r,a){var l=0;for(l=0;l<a;l++)s[l]=t[r+l];var h=i+n-1,u=a-1,c=r+a-1,d=0,f=0;if(t[c--]=t[h--],0!=--n)if(1!==a){for(var p=o;;){var g=0,m=0,v=!1;do{if(e(s[u],t[h])<0){if(t[c--]=t[h--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=s[u--],m++,g=0,1==--a){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!=(g=n-Xt(s[u],t,i,n,n-1,e))){for(n-=g,f=1+(c-=g),d=1+(h-=g),l=g-1;l>=0;l--)t[f+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=s[u--],1==--a){v=!0;break}if(0!=(m=a-Ut(t[h],s,0,a,a-1,e))){for(a-=m,f=1+(c-=m),d=1+(u-=m),l=0;l<m;l++)t[f+l]=s[d+l];if(a<=1){v=!0;break}}if(t[c--]=t[h--],0==--n){v=!0;break}p--}while(g>=Rc||m>=Rc);if(v)break;p<0&&(p=0),p+=2}if((o=p)<1&&(o=1),1===a){for(f=1+(c-=n),d=1+(h-=n),l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=s[u]}else{if(0===a)throw new Error;for(d=c-(a-1),l=0;l<a;l++)t[d+l]=s[l]}}else{for(f=1+(c-=n),d=1+(h-=n),l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=s[u]}else for(d=c-(a-1),l=0;l<a;l++)t[d+l]=s[l]}(l,h,u,c))}var n,r,o=Rc,a=0,s=[];n=[],r=[],this.mergeRuns=function(){for(;a>1;){var t=a-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;a>1;){var t=a-2;t>0&&r[t-1]<r[t+1]&&t--,i(t)}},this.pushRun=function(t,e){n[a]=t,r[a]=e,a+=1}}function Yt(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(r<2)){var o=0;if(r<Nc)return void Zt(t,i,n,i+(o=Wt(t,i,n,e)),e);var a=new jt(t,e),s=function(t){for(var e=0;t>=Nc;)e|=1&t,t>>=1;return t+e}(r);do{if((o=Wt(t,i,n,e))<s){var l=r;l>s&&(l=s),Zt(t,i,i+l,i+o,e),o=l}a.pushRun(i,o),a.mergeRuns(),r-=o,i+=o}while(0!==r);a.forceMergeRuns()}}function qt(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function $t(){return!1}function Kt(t,e,i){var n=Hu(),r=e.getWidth(),o=e.getHeight(),a=n.style;return a&&(a.position="absolute",a.left=0,a.top=0,a.width=r+"px",a.height=o+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=o*i,n}function Qt(t){if("string"==typeof t){var e=qc.get(t);return e&&e.image}return t}function Jt(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=qc.get(t),a={hostEl:i,cb:n,cbPayload:r};return o?!ee(e=o.image)&&o.pending.push(a):(!e&&(e=new Image),e.onload=te,qc.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function te(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function ee(t){return t&&t.width&&t.height}function ie(t,e){var i,n,r=t+":"+(e=e||td);if($c[r])return $c[r];for(var o=(t+"").split("\n"),a=0,s=0,l=o.length;s<l;s++)a=Math.max((i=o[s],n=e,ed.measureText(i,n)).width,a);return Kc>Qc&&(Kc=0,$c={}),Kc++,$c[r]=a,a}function ne(t,e,i,n,r,o,a){return o?(l=n,h=fe(t,{rich:o,truncate:a,font:e,textAlign:s=i,textPadding:r}),u=h.outerWidth,c=h.outerHeight,new Gt(re(0,u,s),oe(0,c,l),u,c)):function(t,e,i,n,r,o){var a=de(t,e,r,o),s=ie(t,e);r&&(s+=r[1]+r[3]);var l=a.outerHeight,h=new Gt(re(0,s,i),oe(0,l,n),s,l);return h.lineHeight=a.lineHeight,h}(t,e,i,n,r,a);var s,l,h,u,c}function re(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function oe(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function ae(t,e,i){var n=e.x,r=e.y,o=e.height,a=e.width,s=o/2,l="left",h="top";switch(t){case"left":n-=i,r+=s,l="right",h="middle";break;case"right":n+=i+a,r+=s,h="middle";break;case"top":n+=a/2,r-=i,l="center",h="bottom";break;case"bottom":n+=a/2,r+=o+i,l="center";break;case"inside":n+=a/2,r+=s,l="center",h="middle";break;case"insideLeft":n+=i,r+=s,h="middle";break;case"insideRight":n+=a-i,r+=s,l="right",h="middle";break;case"insideTop":n+=a/2,r+=i,l="center";break;case"insideBottom":n+=a/2,r+=o-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,r+=i;break;case"insideTopRight":n+=a-i,r+=i,l="right";break;case"insideBottomLeft":n+=i,r+=o-i,h="bottom";break;case"insideBottomRight":n+=a-i,r+=o-i,l="right",h="bottom"}return{x:n,y:r,textAlign:l,textVerticalAlign:h}}function se(t,e,i,n,r){if(!e)return"";var o=(t+"").split("\n");r=le(e,i,n,r);for(var a=0,s=o.length;a<s;a++)o[a]=he(o[a],r);return o.join("\n")}function le(t,e,i,n){(n=o({},n)).font=e;i=C(i,"...");n.maxIterations=C(n.maxIterations,2);var r=n.minChar=C(n.minChar,0);n.cnCharWidth=ie("国",e);var a=n.ascCharWidth=ie("a",e);n.placeholder=C(n.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<r&&s>=a;l++)s-=a;var h=ie(i);return h>s&&(i="",h=0),s=t-h,n.ellipsis=i,n.ellipsisWidth=h,n.contentWidth=s,n.containerWidth=t,n}function he(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var o=ie(t,n);if(o<=i)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ue(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=ie(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function ue(t,e,i,n){for(var r=0,o=0,a=t.length;o<a&&r<e;o++){var s=t.charCodeAt(o);r+=0<=s&&s<=127?i:n}return o}function ce(t){return ie("国",t)}function de(t,e,i,n){null!=t&&(t+="");var r=ce(e),o=t?t.split("\n"):[],a=o.length*r,s=a;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",o=[];else if(null!=h)for(var u=le(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=o.length;c<d;c++)o[c]=he(o[c],u)}return{lines:o,height:a,outerHeight:s,lineHeight:r}}function fe(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=Jc.lastIndex=0;null!=(n=Jc.exec(t));){var o=n.index;o>r&&pe(i,t.substring(r,o)),pe(i,n[2],n[1]),r=Jc.lastIndex}r<t.length&&pe(i,t.substring(r,t.length));var a=i.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;for(u&&(null!=d&&(d-=u[1]+u[3]),null!=f&&(f-=u[0]+u[2])),k=0;k<a.length;k++){for(var p=a[k],g=0,m=0,v=0;v<p.tokens.length;v++){var y=(P=p.tokens[v]).styleName&&e.rich[P.styleName]||{},x=P.textPadding=y.textPadding,_=P.font=y.font||e.font,w=P.textHeight=C(y.textHeight,ce(_));if(x&&(w+=x[0]+x[2]),P.height=w,P.lineHeight=D(y.textLineHeight,e.textLineHeight,w),P.textAlign=y&&y.textAlign||e.textAlign,P.textVerticalAlign=y&&y.textVerticalAlign||"middle",null!=f&&s+P.lineHeight>f)return{lines:[],width:0,height:0};P.textWidth=ie(P.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))P.percentWidth=b,h.push(P),b=0;else{if(S){b=P.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&ee(I=Qt(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var A=null!=d?d-m:null;null!=A&&A<b&&(!S||A<T?(P.text="",P.textWidth=b=0):(P.text=se(P.text,A-T,_,c.ellipsis,{minChar:c.minChar}),P.textWidth=ie(P.text,_),b=P.textWidth+T))}m+=P.width=b,y&&(g=Math.max(g,P.lineHeight))}p.width=m,p.lineHeight=g,s+=g,l=Math.max(l,m)}i.outerWidth=i.width=C(e.textWidth,l),i.outerHeight=i.height=C(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(var k=0;k<h.length;k++){var P=h[k],L=P.percentWidth;P.width=parseInt(L,10)/100*l}return i}function pe(t,e,i){for(var n=""===e,r=e.split("\n"),o=t.lines,a=0;a<r.length;a++){var s=r[a],l={styleName:i,text:s,isLineHolder:!s&&!n};if(a)o.push({tokens:[l]});else{var h=(o[o.length-1]||(o[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||n)&&h.push(l)}}}function ge(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&L(e)||t.textFont||t.font}function me(t,e){var i,n,r,o,a,s=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?i=n=r=o=c:c instanceof Array?1===c.length?i=n=r=o=c[0]:2===c.length?(i=r=c[0],n=o=c[1]):3===c.length?(i=c[0],n=o=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],o=c[3]):i=n=r=o=0,i+n>h&&(i*=h/(a=i+n),n*=h/a),r+o>h&&(r*=h/(a=r+o),o*=h/a),n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.arc(s+h-n,l+n,n,-Math.PI/2,0),t.lineTo(s+h,l+u-r),0!==r&&t.arc(s+h-r,l+u-r,r,0,Math.PI/2),t.lineTo(s+o,l+u),0!==o&&t.arc(s+o,l+u-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}function ve(t){return ye(t),d(t.rich,ye),t}function ye(t){if(t){t.font=ge(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||id[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||nd[i]?i:"top",t.textPadding&&(t.textPadding=k(t.textPadding))}}function xe(t,e,i,n,r){var o,a,s,l,h,u;n.rich?(a=e,s=i,l=n,h=r,(u=(o=t).__textCotentBlock)&&!o.__dirty||(u=o.__textCotentBlock=fe(s,l)),function(t,e,i,n,r){var o=i.width,a=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Ie(s,n,r),u=h.baseX,c=h.baseY,d=h.textAlign,f=h.textVerticalAlign;_e(e,n,r,u,c);var p=re(u,a,d),g=oe(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+o;be(n)&&Se(t,e,n,p,g,a,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,C=m,D=y,A=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)we(t,e,_,n,M,v,C,"left"),I-=_.width,C+=_.width,T++;for(;A>=0&&"right"===(_=b[A]).textAlign;)we(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,A--;for(C+=(o-(C-m)-(y-D)-I)/2;T<=A;)we(t,e,_=b[T],n,M,v,C+_.width/2,"center"),C+=_.width,T++;v+=M}}(o,a,u,l,h)):function(t,e,i,n,r){var o=Te(e,"font",n.font||td),a=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=de(i,o,a,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Ie(l,n,r),d=c.baseX,f=c.baseY,p=c.textAlign,g=c.textVerticalAlign;_e(e,n,r,d,f);var m=oe(f,l,g),v=d,y=m,x=be(n);if(x||a){var _=ie(i,o);a&&(_+=a[1]+a[3]);var w=re(d,_,p);x&&Se(t,e,n,w,m,_,l),a&&(v=ke(d,p,a),y+=a[0])}Te(e,"textAlign",p||"left"),Te(e,"textBaseline","middle"),Te(e,"shadowBlur",n.textShadowBlur||0),Te(e,"shadowColor",n.textShadowColor||"transparent"),Te(e,"shadowOffsetX",n.textShadowOffsetX||0),Te(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var b=n.textStrokeWidth,S=Ce(n.textStroke,b),M=De(n.textFill);S&&(Te(e,"lineWidth",b),Te(e,"strokeStyle",S)),M&&Te(e,"fillStyle",M);for(var I=0;I<h.length;I++)S&&e.strokeText(h[I],v,y),M&&e.fillText(h[I],v,y),y+=u}(t,e,i,n,r)}function _e(t,e,i,n,r){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,r=i.height/2+i.y):o&&(n=o[0]+i.x,r=o[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function we(t,e,i,n,r,o,a,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=o+r/2;"top"===h?u=o+i.height/2:"bottom"===h&&(u=o+r-i.height/2),!i.isLineHolder&&be(l)&&Se(t,e,l,"right"===s?a-i.width:"center"===s?a-i.width/2:a,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(a=ke(a,s,c),u-=i.height/2-c[2]-i.textHeight/2),Te(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),Te(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Te(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),Te(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),Te(e,"textAlign",s),Te(e,"textBaseline","middle"),Te(e,"font",i.font||td);var d=Ce(l.textStroke||n.textStroke,p),f=De(l.textFill||n.textFill),p=C(l.textStrokeWidth,n.textStrokeWidth);d&&(Te(e,"lineWidth",p),Te(e,"strokeStyle",d),e.strokeText(i.text,a,u)),f&&(Te(e,"fillStyle",f),e.fillText(i.text,a,u))}function be(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Se(t,e,i,n,r,o,a){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=_(s);if(Te(e,"shadowBlur",i.textBoxShadowBlur||0),Te(e,"shadowColor",i.textBoxShadowColor||"transparent"),Te(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Te(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?me(e,{x:n,y:r,width:o,height:a,r:c}):e.rect(n,r,o,a),e.closePath()}if(u)Te(e,"fillStyle",s),e.fill();else if(w(s)){var d=s.image;(d=Jt(d,null,t,Me,s))&&ee(d)&&e.drawImage(d,n,r,o,a)}l&&h&&(Te(e,"lineWidth",l),Te(e,"strokeStyle",h),e.stroke())}function Me(t,e){e.image=t}function Ie(t,e,i){var n=e.x||0,r=e.y||0,o=e.textAlign,a=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+Ae(s[0],i.width),r=i.y+Ae(s[1],i.height);else{var l=ae(s,i,e.textDistance);n=l.x,r=l.y,o=o||l.textAlign,a=a||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],r+=h[1])}return{baseX:n,baseY:r,textAlign:o,textVerticalAlign:a}}function Te(t,e,i){return t[e]=Fc(t,e,i),t[e]}function Ce(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function De(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ae(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function ke(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Pe(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Le(t){for(var e in t=t||{},Cc.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Gc(t.style,this),this._rect=null,this.__clipPaths=[]}function Oe(t){Le.call(this,t)}function ze(t){return parseInt(t,10)}function Ee(t,e,i,n){return i=i||{},n||!ku.canvasSupported?Ne(t,e,i):ku.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Ne(t,e,i),i}function Ne(t,e,i){var n,r=(n=t).getBoundingClientRect?n.getBoundingClientRect():{left:0,top:0};i.zrX=e.clientX-r.left,i.zrY=e.clientY-r.top}function Re(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];r&&Ee(t,r,e,i)}else Ee(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&ud.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Be(t,e,i){hd?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function Ve(t){return t.which>1}function Fe(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function He(t){return"mousewheel"===t&&ku.browser.firefox?"DOMMouseScroll":t}function Ge(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var r=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),r){var o=r.type;e.gestureEvent=o,t.handler.dispatchToElement({target:r.target},o,r.event)}}function We(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function Ze(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ue(t){function e(e,i){d(e,function(e){Be(t,He(e),i._handlers[e])},i)}var i;Qu.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new fd,this._handlers={},i=this,d(md,function(t){i._handlers[t]=m(xd[t],i)}),d(yd,function(t){i._handlers[t]=m(xd[t],i)}),d(gd,function(t){var e,n;i._handlers[t]=(e=xd[t],n=i,function(){if(!n._touching)return e.apply(n,arguments)})}),ku.pointerEventsSupported?e(yd,this):(ku.touchEventsSupported&&e(md,this),e(gd,this))}function Xe(t,e){var i=new Md(Au(),t,e);return Sd[i.id]=i,i}function je(t,e){bd[t]=e}function Ye(t){return t instanceof Array?t:null==t?[]:[t]}function qe(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;n<r;n++){var o=i[n];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}function $e(t){return!Cd(t)||Dd(t)||t instanceof Date?t:t.value}function Ke(t,e){e=(e||[]).slice();var i=f(t||[],function(t,e){return{exist:t}});return Td(e,function(t,n){if(Cd(t)){for(r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(var r=0;r<i.length;r++){var o=i[r].exist;if(!(i[r].option||null!=o.id&&null!=t.id||null==t.name||ti(t)||ti(o)||o.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}}),Td(e,function(t,e){if(Cd(t)){for(var n=0;n<i.length;n++){var r=i[n].exist;if(!i[n].option&&!ti(r)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}}),i}function Qe(t){var e=N();Td(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Td(t,function(t,i){var n=t.option;P(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Td(t,function(t,i){var n=t.exist,r=t.option,o=t.keyInfo;if(Cd(r)){if(o.name=null!=r.name?r.name+"":n?n.name:Ad+i,n)o.id=n.id;else if(null!=r.id)o.id=r.id+"";else{var a=0;do{o.id="\0"+o.name+"\0"+a++}while(e.get(o.id))}e.set(o.id,t)}})}function Je(t){var e=t.name;return!(!e||!e.indexOf(Ad))}function ti(t){return Cd(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function ei(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?y(e.dataIndex)?f(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?y(e.name)?f(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function ii(){var t="__\0ec_inner_"+Pd+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}function ni(t,e,i){if(_(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||ri(e,r+"Index")||ri(e,r+"Id")||ri(e,r+"Name")||(e[r+"Index"]=0);var o={};return Td(e,function(n,r){n=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var a=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=a[1],h=(a[2]||"").toLowerCase();if(!(!s||!h||null==n||"index"===h&&"none"===n||i&&i.includeMainTypes&&l(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===h&&"all"===n||(u[h]=n);var c=t.queryComponents(u);o[s+"Models"]=c,o[s+"Model"]=c[0]}}else o[r]=n}),o}function ri(t,e){return t&&t.hasOwnProperty(e)}function oi(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function ai(t){var e={main:"",sub:""};return t&&(t=t.split(Ld),e.main=t[0]||"",e.sub=t[1]||""),e}function si(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return o(i.prototype,t),i.extend=this.extend,i.superCall=hi,i.superApply=ui,h(i,this),i.superClass=e,i}}function li(t){var e=["__\0is_clz",zd++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function hi(t,e){var i=A(arguments,2);return this.superClass.prototype[e].apply(t,i)}function ui(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ci(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){return e&&(P(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(o=e),'componentType "'+o+'" illegal'),(e=ai(e)).sub?e.sub!==Od&&((n=e,r=i[n.main],r&&r[Od]||((r=i[n.main]={})[Od]=!0),r)[e.sub]=t):i[e.main]=t),t;var n,r,o},t.getClass=function(t,e,n){var r=i[t];if(r&&r[Od]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=ai(t);var e=[],n=i[t.main];return n&&n[Od]?d(n,function(t,i){i!==Od&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=ai(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return d(i,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=ai(t);var e=i[t.main];return e&&e[Od]},t.parseClassType=ai,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t}function di(t){return t>-Gd&&t<Gd}function fi(t){return t>Gd||t<-Gd}function pi(t,e,i,n,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*n+3*o*i)}function gi(t,e,i,n,r){var o=1-r;return 3*(((e-t)*o+2*(i-e)*r)*o+(n-i)*r*r)}function mi(t,e,i,n,r){var o=6*i-12*e+6*t,a=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(di(a))fi(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var h=o*o-4*a*s;if(di(h))r[0]=-o/(2*a);else if(h>0){var u=Hd(h),c=(-o+u)/(2*a),d=(-o-u)/(2*a);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function vi(t,e,i,n,r,o){var a=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-a)*r+a,u=(l-s)*r+s,c=(u-h)*r+h;o[0]=t,o[1]=a,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n}function yi(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function xi(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function _i(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function wi(t,e,i,n,r){var o=(e-t)*n+t,a=(i-e)*n+e,s=(a-o)*n+o;r[0]=t,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=i}function bi(t,e,i){if(0!==t.length){var n,r=t[0],o=r[0],a=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],o=qd(o,r[0]),a=$d(a,r[0]),s=qd(s,r[1]),l=$d(l,r[1]);e[0]=o,e[1]=s,i[0]=a,i[1]=l}}function Si(t,e,i,n,r,o){r[0]=qd(t,i),r[1]=qd(e,n),o[0]=$d(t,i),o[1]=$d(e,n)}function Mi(t,e,i,n,r,o,a,s,l,h){var u,c=mi,d=pi,f=c(t,i,r,a,rf);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;u<f;u++){var p=d(t,i,r,a,rf[u]);l[0]=qd(p,l[0]),h[0]=$d(p,h[0])}for(f=c(e,n,o,s,of),u=0;u<f;u++){var g=d(e,n,o,s,of[u]);l[1]=qd(g,l[1]),h[1]=$d(g,h[1])}l[0]=qd(t,l[0]),h[0]=$d(t,h[0]),l[0]=qd(a,l[0]),h[0]=$d(a,h[0]),l[1]=qd(e,l[1]),h[1]=$d(e,h[1]),l[1]=qd(s,l[1]),h[1]=$d(s,h[1])}function Ii(t,e,i,n,r,o,a,s,l){var h=K,u=Q,c=Math.abs(r-o);if(c%Jd<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(tf[0]=Qd(r)*i+t,tf[1]=Kd(r)*n+e,ef[0]=Qd(o)*i+t,ef[1]=Kd(o)*n+e,h(s,tf,ef),u(l,tf,ef),(r%=Jd)<0&&(r+=Jd),(o%=Jd)<0&&(o+=Jd),r>o&&!a?o+=Jd:r<o&&a&&(r+=Jd),a){var d=o;o=r,r=d}for(var f=0;f<o;f+=Math.PI/2)f>r&&(nf[0]=Qd(f)*i+t,nf[1]=Kd(f)*n+e,h(s,nf,s),u(l,nf,l))}function Ti(t,e,i,n,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>n+l||a<e-l&&a<n-l||o>t+l&&o>i+l||o<t-l&&o<i-l)return!1;if(t===i)return Math.abs(o-t)<=l/2;var h=(s=(e-n)/(t-i))*o-a+(t*n-i*e)/(t-i);return h*h/(s*s+1)<=l/2*l/2}function Ci(t,e,i,n,r,o,a,s,l,h,u){if(0===l)return!1;var c=l;return!(u>e+c&&u>n+c&&u>o+c&&u>s+c||u<e-c&&u<n-c&&u<o-c&&u<s-c||h>t+c&&h>i+c&&h>r+c&&h>a+c||h<t-c&&h<i-c&&h<r-c&&h<a-c)&&function(t,e,i,n,r,o,a,s,l,h,u){var c,d,f,p,g,m=.005,v=1/0;Xd[0]=l,Xd[1]=h;for(var y=0;y<1;y+=.05)jd[0]=pi(t,i,r,a,y),jd[1]=pi(e,n,o,s,y),(p=qu(Xd,jd))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<Wd);x++)d=c-m,f=c+m,jd[0]=pi(t,i,r,a,d),jd[1]=pi(e,n,o,s,d),p=qu(jd,Xd),d>=0&&p<v?(c=d,v=p):(Yd[0]=pi(t,i,r,a,f),Yd[1]=pi(e,n,o,s,f),g=qu(Yd,Xd),f<=1&&g<v?(c=f,v=g):m*=.5);return u&&(u[0]=pi(t,i,r,a,c),u[1]=pi(e,n,o,s,c)),Hd(v)}(t,e,i,n,r,o,a,s,h,u,null)<=c/2}function Di(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var h=a;return!(l>e+h&&l>n+h&&l>o+h||l<e-h&&l<n-h&&l<o-h||s>t+h&&s>i+h&&s>r+h||s<t-h&&s<i-h&&s<r-h)&&function(t,e,i,n,r,o,a,s,l){var h,u=.005,c=1/0;Xd[0]=a,Xd[1]=s;for(var d=0;d<1;d+=.05)jd[0]=yi(t,i,r,d),jd[1]=yi(e,n,o,d),(m=qu(Xd,jd))<c&&(h=d,c=m);c=1/0;for(var f=0;f<32&&!(u<Wd);f++){var p=h-u,g=h+u;jd[0]=yi(t,i,r,p),jd[1]=yi(e,n,o,p);var m=qu(jd,Xd);if(p>=0&&m<c)h=p,c=m;else{Yd[0]=yi(t,i,r,g),Yd[1]=yi(e,n,o,g);var v=qu(Yd,Xd);g<=1&&v<c?(h=g,c=v):u*=.5}}return l&&(l[0]=yi(t,i,r,h),l[1]=yi(e,n,o,h)),Hd(c)}(t,e,i,n,r,o,s,l,null)<=h/2}function Ai(t){return(t%=xf)<0&&(t+=xf),t}function ki(t,e,i,n,r,o,a,s,l){if(0===a)return!1;var h=a;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||u+h<i)return!1;if(Math.abs(n-r)%_f<1e-4)return!0;if(o){var c=n;n=Ai(r),r=Ai(c)}else n=Ai(n),r=Ai(r);n>r&&(r+=_f);var d=Math.atan2(l,s);return d<0&&(d+=_f),d>=n&&d<=r||d+_f>=n&&d+_f<=r}function Pi(t,e,i,n,r,o){if(o>e&&o>n||o<e&&o<n)return 0;if(n===e)return 0;var a=n<e?1:-1,s=(o-e)/(n-e);return 1!==s&&0!==s||(a=n<e?.5:-.5),s*(i-t)+t>r?a:0}function Li(t,e,i,n,r,o,a,s,l,h){if(h>e&&h>n&&h>o&&h>s||h<e&&h<n&&h<o&&h<s)return 0;var u,c=function(t,e,i,n,r,o){var a=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*a*l,c=s*l-9*a*h,d=l*l-3*s*h,f=0;if(di(u)&&di(c))di(s)?o[0]=0:(M=-l/s)>=0&&M<=1&&(o[f++]=M);else{var p=c*c-4*u*d;if(di(p)){var g=c/u,m=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m)}else if(p>0){var v=Hd(p),y=u*s+1.5*a*(-c+v),x=u*s+1.5*a*(-c-v);(M=(-s-((y=y<0?-Fd(-y,Ud):Fd(y,Ud))+(x=x<0?-Fd(-x,Ud):Fd(x,Ud))))/(3*a))>=0&&M<=1&&(o[f++]=M)}else{var _=(2*u*s-3*a*c)/(2*Hd(u*u*u)),w=Math.acos(_)/3,b=Hd(u),S=Math.cos(w),M=(-s-2*b*S)/(3*a),I=(m=(-s+b*(S+Zd*Math.sin(w)))/(3*a),(-s+b*(S-Zd*Math.sin(w)))/(3*a));M>=0&&M<=1&&(o[f++]=M),m>=0&&m<=1&&(o[f++]=m),I>=0&&I<=1&&(o[f++]=I)}}return f}(e,n,o,s,h,Mf);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=Mf[m],y=0===v||1===v?.5:1;pi(t,i,r,a,v)<l||(g<0&&(g=mi(e,n,o,s,If),If[1]<If[0]&&g>1&&(void 0,u=If[0],If[0]=If[1],If[1]=u),d=pi(e,n,o,s,If[0]),g>1&&(f=pi(e,n,o,s,If[1]))),2==g?v<If[0]?p+=d<e?y:-y:v<If[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<If[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function Oi(t,e,i,n,r,o,a,s){if(s>e&&s>n&&s>o||s<e&&s<n&&s<o)return 0;var l=function(t,e,i,n,r){var o=t-2*e+i,a=2*(e-t),s=t-n,l=0;if(di(o))fi(a)&&(c=-s/a)>=0&&c<=1&&(r[l++]=c);else{var h=a*a-4*o*s;if(di(h))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(h>0){var u=Hd(h),c=(-a+u)/(2*o),d=(-a-u)/(2*o);c>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,n,o,s,Mf);if(0===l)return 0;var h=_i(e,n,o);if(h>=0&&h<=1){for(var u=0,c=yi(e,n,o,h),d=0;d<l;d++)f=0===Mf[d]||1===Mf[d]?.5:1,(p=yi(t,i,r,Mf[d]))<a||(Mf[d]<h?u+=c<e?f:-f:u+=o<c?f:-f);return u}var f=0===Mf[0]||1===Mf[0]?.5:1,p=yi(t,i,r,Mf[0]);return p<a?0:o<e?f:-f}function zi(t,e,i,n,r,o,a,s){if((s-=e)>i||s<-i)return 0;h=Math.sqrt(i*i-s*s),Mf[0]=-h,Mf[1]=h;var l=Math.abs(n-r);if(l<1e-4)return 0;if(l%bf<1e-4)return n=0,r=bf,p=o?1:-1,a>=Mf[0]+t&&a<=Mf[1]+t?p:0;if(o){var h=n;n=Ai(r),r=Ai(h)}else n=Ai(n),r=Ai(r);n>r&&(r+=bf);for(var u=0,c=0;c<2;c++){var d=Mf[c];if(d+t>a){var f=Math.atan2(s,d),p=o?1:-1;f<0&&(f=bf+f),(f>=n&&f<=r||f+bf>=n&&f+bf<=r)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),u+=p)}}return u}function Ei(t,e,i,n,r){for(var o=0,a=0,s=0,l=0,h=0,u=0;u<t.length;){var c=t[u++];switch(c===wf.M&&u>1&&(i||(o+=Pi(a,s,l,h,n,r))),1==u&&(l=a=t[u],h=s=t[u+1]),c){case wf.M:a=l=t[u++],s=h=t[u++];break;case wf.L:if(i){if(Ti(a,s,t[u],t[u+1],e,n,r))return!0}else o+=Pi(a,s,t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case wf.C:if(i){if(Ci(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Li(a,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case wf.Q:if(i){if(Di(a,s,t[u++],t[u++],t[u],t[u+1],e,n,r))return!0}else o+=Oi(a,s,t[u++],t[u++],t[u],t[u+1],n,r)||0;a=t[u++],s=t[u++];break;case wf.A:var d=t[u++],f=t[u++],p=t[u++],g=t[u++],m=t[u++],v=t[u++],y=(t[u++],1-t[u++]),x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;u>1?o+=Pi(a,s,x,_,n,r):(l=x,h=_);var w=(n-d)*g/p+d;if(i){if(ki(d,f,g,m,m+v,y,e,w,r))return!0}else o+=zi(d,f,g,m,m+v,y,w,r);a=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case wf.R:l=a=t[u++],h=s=t[u++];x=l+t[u++],_=h+t[u++];if(i){if(Ti(l,h,x,h,e,n,r)||Ti(x,h,x,_,e,n,r)||Ti(x,_,l,_,e,n,r)||Ti(l,_,l,h,e,n,r))return!0}else o+=Pi(x,h,x,_,n,r),o+=Pi(l,_,l,h,n,r);break;case wf.Z:if(i){if(Ti(a,s,l,h,e,n,r))return!0}else o+=Pi(a,s,l,h,n,r);a=l,s=h}}return i||(b=s,S=h,Math.abs(b-S)<Sf)||(o+=Pi(a,s,l,h,n,r)||0),0!==o;var b,S}function Ni(t){Le.call(this,t),this.path=null}function Ri(t,e,i,n,r,o,a,s,l,h,u){var c=l*(Bf/180),d=Rf(c)*(t-i)/2+Nf(c)*(e-n)/2,f=-1*Nf(c)*(t-i)/2+Rf(c)*(e-n)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=Ef(p),s*=Ef(p));var g=(r===o?-1:1)*Ef((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=g*-s*d/a,y=(t+i)/2+Rf(c)*m-Nf(c)*v,x=(e+n)/2+Nf(c)*m+Rf(c)*v,_=Hf([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],b=[(-1*d-m)/a,(-1*f-v)/s],S=Hf(w,b);Ff(w,b)<=-1&&(S=Bf),Ff(w,b)>=1&&(S=0),0===o&&S>0&&(S-=2*Bf),1===o&&S<0&&(S+=2*Bf),u.addData(h,y,x,a,s,_,S,c,o)}function Bi(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<zf.length;e++)i=i.replace(new RegExp(zf[e],"g"),"|"+zf[e]);var n,r=i.split("|"),o=0,a=0,s=new yf,l=yf.CMD;for(e=1;e<r.length;e++){var h,u=r[e],c=u.charAt(0),d=0,f=u.slice(1).replace(/e,-/g,"e-").split(",");f.length>0&&""===f[0]&&f.shift();for(var p=0;p<f.length;p++)f[p]=parseFloat(f[p]);for(;d<f.length&&!isNaN(f[d])&&!isNaN(f[0]);){var g,m,v,y,x,_,w,b=o,S=a;switch(c){case"l":o+=f[d++],a+=f[d++],h=l.L,s.addData(h,o,a);break;case"L":o=f[d++],a=f[d++],h=l.L,s.addData(h,o,a);break;case"m":o+=f[d++],a+=f[d++],h=l.M,s.addData(h,o,a),c="l";break;case"M":o=f[d++],a=f[d++],h=l.M,s.addData(h,o,a),c="L";break;case"h":o+=f[d++],h=l.L,s.addData(h,o,a);break;case"H":o=f[d++],h=l.L,s.addData(h,o,a);break;case"v":a+=f[d++],h=l.L,s.addData(h,o,a);break;case"V":a=f[d++],h=l.L,s.addData(h,o,a);break;case"C":h=l.C,s.addData(h,f[d++],f[d++],f[d++],f[d++],f[d++],f[d++]),o=f[d-2],a=f[d-1];break;case"c":h=l.C,s.addData(h,f[d++]+o,f[d++]+a,f[d++]+o,f[d++]+a,f[d++]+o,f[d++]+a),o+=f[d-2],a+=f[d-1];break;case"S":g=o,m=a;var M=s.len(),I=s.data;n===l.C&&(g+=o-I[M-4],m+=a-I[M-3]),h=l.C,b=f[d++],S=f[d++],o=f[d++],a=f[d++],s.addData(h,g,m,b,S,o,a);break;case"s":g=o,m=a,M=s.len(),I=s.data,n===l.C&&(g+=o-I[M-4],m+=a-I[M-3]),h=l.C,b=o+f[d++],S=a+f[d++],o+=f[d++],a+=f[d++],s.addData(h,g,m,b,S,o,a);break;case"Q":b=f[d++],S=f[d++],o=f[d++],a=f[d++],h=l.Q,s.addData(h,b,S,o,a);break;case"q":b=f[d++]+o,S=f[d++]+a,o+=f[d++],a+=f[d++],h=l.Q,s.addData(h,b,S,o,a);break;case"T":g=o,m=a,M=s.len(),I=s.data,n===l.Q&&(g+=o-I[M-4],m+=a-I[M-3]),o=f[d++],a=f[d++],h=l.Q,s.addData(h,g,m,o,a);break;case"t":g=o,m=a,M=s.len(),I=s.data,n===l.Q&&(g+=o-I[M-4],m+=a-I[M-3]),o+=f[d++],a+=f[d++],h=l.Q,s.addData(h,g,m,o,a);break;case"A":v=f[d++],y=f[d++],x=f[d++],_=f[d++],w=f[d++],Ri(b=o,S=a,o=f[d++],a=f[d++],_,w,v,y,x,h=l.A,s);break;case"a":v=f[d++],y=f[d++],x=f[d++],_=f[d++],w=f[d++],Ri(b=o,S=a,o+=f[d++],a+=f[d++],_,w,v,y,x,h=l.A,s)}}"z"!==c&&"Z"!==c||(h=l.Z,s.addData(h)),n=h}return s.toStatic(),s}(t);return(e=e||{}).buildPath=function(t){if(t.setData)t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e);else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){Of(i,t),this.dirty(!0)},e}function Vi(t,e,i,n,r,o,a){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*a+(-3*(e-i)-2*s-l)*o+s*r+e}function Fi(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var o=qf(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;s<(i?a:a-1);s++){var l=o[2*s],h=o[2*s+1],u=n[(s+1)%a];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(n=Yf(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}function Hi(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?gi:pi)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?gi:pi)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?xi:yi)(t.x1,t.cpx1,t.x2,e),(i?xi:yi)(t.y1,t.cpy1,t.y2,e)]}function Gi(t){Le.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function Wi(t){return Ni.extend(t)}function Zi(t,e,i,n){var r=new Ni(Bi(t,e)),o=r.getBoundingRect();return i&&("center"===n&&(i=Xi(i,o)),ji(r,i)),r}function Ui(t,e,i){var n=new Oe({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(Xi(e,r))}}});return n}function Xi(t,e){var i,n=e.width/e.height,r=t.height*n;return i=r<=t.width?t.height:(r=t.width)/n,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-i/2,width:r,height:i}}function ji(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function Yi(t){var e=t.shape,i=t.style.lineWidth;return lp(2*e.x1)===lp(2*e.x2)&&(e.x1=e.x2=$i(e.x1,i,!0)),lp(2*e.y1)===lp(2*e.y2)&&(e.y1=e.y2=$i(e.y1,i,!0)),t}function qi(t){var e=t.shape,i=t.style.lineWidth,n=e.x,r=e.y,o=e.width,a=e.height;return e.x=$i(e.x,i,!0),e.y=$i(e.y,i,!0),e.width=Math.max($i(n+o,i,!1)-e.x,0===o?0:1),e.height=Math.max($i(r+a,i,!1)-e.y,0===a?0:1),t}function $i(t,e,i){var n=lp(2*t);return(n+lp(e))%2==0?n/2:(n+(i?1:-1))/2}function Ki(t){return null!=t&&"none"!=t}function Qi(t){return"string"==typeof t?Mt(t,-.1):t}function Ji(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(Ki(i)?Qi(i):null),n.stroke=n.stroke||(Ki(e)?Qi(e):null);var r={};for(var o in n)null!=n[o]&&(r[o]=t.style[o]);t.__normalStl=r,t.__hoverStlDirty=!1}}function tn(t){if(!t.__isHover){if(Ji(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&((r=(n=e).insideRollback)&&(n.textFill=r.textFill,n.textStroke=r.textStroke,n.textStrokeWidth=r.textStrokeWidth)),e.extendFrom(t.__hoverStl),i&&(mn(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}var n,r}function en(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function nn(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&tn(t)}):tn(t)}function rn(t){"group"===t.type?t.traverse(function(t){"group"!==t.type&&en(t)}):en(t)}function on(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&Ji(t)}function an(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&nn(this)}function sn(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&rn(this)}function ln(){this.__isEmphasis=!0,nn(this)}function hn(){this.__isEmphasis=!1,rn(this)}function un(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&on(t,e)}):on(t,e),t.on("mouseover",an).on("mouseout",sn),t.on("emphasis",ln).on("normal",hn)}function cn(t,e,i,n,r,o,a){var s,l=(r=r||cp).labelFetcher,h=r.labelDataIndex,u=r.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=x(r.defaultText)?r.defaultText(h,r):r.defaultText));var f=c?s:null,p=d?C(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;null==f&&null==p||(dn(t,i,o,r),dn(e,n,a,r,!0)),t.text=f,e.text=p}function dn(t,e,i,n,r){return fn(t,e,n,r),i&&o(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function fn(t,e,i,n){if((i=i||cp).isRectText){var r=e.getShallow("position")||(n?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=C(e.getShallow("distance"),n?null:5)}var a,s=e.ecModel,l=s&&s.option.textStyle,h=function(t){for(var e;t&&t!==t.ecModel;){var i=(t.option||cp).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(h)for(var u in a={},h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);pn(a[u]={},c,l,i,n)}return t.rich=a,pn(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function pn(t,e,i,n,r,o){if(i=!r&&i||cp,t.textFill=gn(e.getShallow("color"),n)||i.color,t.textStroke=gn(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=C(e.getShallow("textBorderWidth"),i.textBorderWidth),!r){if(o){var a=t.textPosition;t.insideRollback=mn(t,a,n),t.insideOriginalTextPosition=a,t.insideRollbackOpt=n}null==t.textFill&&(t.textFill=n.autoColor)}t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&n.disableBox||(t.textBackgroundColor=gn(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=gn(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function gn(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function mn(t,e,i){var n,r=i.useInsideStyle;return null==t.textFill&&!1!==r&&(!0===r||i.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function vn(t,e){var i=e||e.getModel("textStyle");return L([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function yn(t,e,i,n,r,o){if("function"==typeof r&&(o=r,r=null),n&&n.isAnimationEnabled()){var a=t?"Update":"",s=n.getShallow("animationDuration"+a),l=n.getShallow("animationEasing"+a),h=n.getShallow("animationDelay"+a);"function"==typeof h&&(h=h(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(i,s,h||0,l,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function xn(t,e,i,n,r){yn(!0,t,e,i,n,r)}function _n(t,e,i,n,r){yn(!1,t,e,i,n,r)}function wn(t,e){for(var i=rt([]);t&&t!==e;)at(i,t.getLocalTransform(),i),t=t.parent;return i}function bn(t,e,i){return e&&!c(e)&&(e=ac.getLocalTransform(e)),i&&(e=ut([],e)),$([],t,e)}function Sn(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return o=bn(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Mn(t,e,i,n){function r(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=o({},t.shape)),e}if(t&&e){var a=(s={},t.traverse(function(t){!t.isGroup&&t.anid&&(s[t.anid]=t)}),s);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=r(t);t.attr(r(e)),xn(t,n,i,t.dataIndex)}}})}var s}function In(t,e){return f(t,function(t){var i=t[0];i=hp(i,e.x),i=up(i,e.x+e.width);var n=t[1];return n=hp(n,e.y),[i,n=up(n,e.y+e.height)]})}function Tn(t,e,i){var n=(e=o({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),a(n,i),new Oe(e)):Zi(t.replace("path://",""),e,i,"center")}function Cn(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Dn(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==(void 0===t?"undefined":_typeof(t))?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function An(t,e){var i=yp(t).getParent;return i?i.call(t,e):t.parentModel}function kn(t){return[t||"",wp++,Math.random().toFixed(5)].join("_")}function Pn(t,e,i,n){var r=e[1]-e[0],o=i[1]-i[0];if(0===r)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*o+i[0]}function Ln(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i}function On(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function zn(t){return t.sort(function(t,e){return t-e}),t}function En(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Nn(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Rn(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Bn(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var r=Math.pow(10,i),o=f(t,function(t){return(isNaN(t)?0:t)/n*r*100}),a=100*r,s=f(o,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),h=f(o,function(t,e){return t-s[e]});l<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,g=h.length;d<g;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r}function Vn(t){var e=2*Math.PI;return(t%e+e)%e}function Fn(t){return t>-bp&&t<bp}function Hn(t){if(t instanceof Date)return t;if("string"==typeof t){var e=Sp.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function Gn(t){return Math.pow(10,Wn(t))}function Wn(t){return Math.floor(Math.log(t)/Math.LN10)}function Zn(t,e){var i=Wn(t),n=Math.pow(10,i),r=t/n;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t}function Un(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Xn(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function jn(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Yn(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var a=Tp[o];t=t.replace(Cp(a),Cp(a,0))}for(var s=0;s<n;s++)for(var l=0;l<r.length;l++){var h=e[s][r[l]];t=t.replace(Cp(Tp[l],s),i?jn(h):h)}return t}function qn(t,e){var i=(t=_(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type;e=t.extraCssText;return i?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+jn(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+jn(i)+";"+(e||"")+'"></span>':""}function $n(t,e){return"0000".substr(0,e-(t+="").length)+t}function Kn(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Hn(e),r=i?"UTC":"",o=n["get"+r+"FullYear"](),a=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),u=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t.replace("MM",$n(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",$n(s,2)).replace("d",s).replace("hh",$n(l,2)).replace("h",l).replace("mm",$n(h,2)).replace("m",h).replace("ss",$n(u,2)).replace("s",u).replace("SSS",$n(c,3))}function Qn(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Jn(t,e,i,n,r){var o=0,a=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(u=o+m)>n||l.newline?(o=0,u=m,a+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=a+v)>r||l.newline?(o+=s+i,a=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=o,d[1]=a,"horizontal"===t?o=u+i:a=c+i)})}function tr(t,e,i){i=Ip(i||0);var n=e.width,r=e.height,o=Ln(t.left,n),a=Ln(t.top,r),s=Ln(t.right,n),l=Ln(t.bottom,r),h=Ln(t.width,n),u=Ln(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-o),isNaN(u)&&(u=r-l-c-a),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/r?h=.8*n:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(o)&&(o=n-s-h-d),isNaN(a)&&(a=r-l-u-c),t.left||t.right){case"center":o=n/2-h/2-i[3];break;case"right":o=n-h-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-u/2-i[0];break;case"bottom":a=r-u-c}o=o||0,a=a||0,isNaN(h)&&(h=n-d-o-(s||0)),isNaN(u)&&(u=r-c-a-(l||0));var p=new Gt(o+i[3],a+i[0],h,u);return p.margin=i,p}function er(t,e,i,n,r){var o=!r||!r.hv||r.hv[0],s=!r||!r.hv||r.hv[1],l=r&&r.boundingMode||"all";if(o||s){var h;if("raw"===l)h="group"===t.type?new Gt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(h=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(h=h.clone()).applyTransform(u)}e=tr(a({width:h.width,height:h.height},e),i,n);var c=t.position,d=o?e.x-h.x:0,f=s?e.y-h.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function ir(t,e,i){function n(i,n){var a={},l=0,h={},u=0;if(Pp(i,function(e){h[e]=t[e]}),Pp(i,function(t){r(e,t)&&(a[t]=h[t]=e[t]),o(a,t)&&l++,o(h,t)&&u++}),s[n])return o(e,i[1])?h[i[2]]=null:o(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&l){if(l>=2)return a;for(var c=0;c<i.length;c++){var d=i[c];if(!r(a,d)&&r(t,d)){a[d]=t[d];break}}return a}return h}function r(t,e){return t.hasOwnProperty(e)}function o(t,e){return null!=t[e]&&"auto"!==t[e]}function a(t,e,i){Pp(t,function(t){e[t]=i[t]})}!w(i)&&(i={});var s=i.ignoreSize;!y(s)&&(s=[s,s]);var l=n(Op[0],0),h=n(Op[1],1);a(Op[0],t,l),a(Op[1],t,h)}function nr(t){return rr({},t)}function rr(t,e){return e&&t&&Pp(Lp,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}function or(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:N(),categoryAxisMap:N()},n=Gp[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function ar(t){return"category"===t.get("type")}function sr(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Xp?{}:[]),this.sourceFormat=t.sourceFormat||jp,this.seriesLayoutBy=t.seriesLayoutBy||qp,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&N(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function lr(t){var e=t.option,i=e.data,n=S(i)?Yp:Wp,r=!1,o=e.seriesLayoutBy,a=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(l){var h=l.option;i=h.source,n=Kp(l).sourceFormat,r=!0,o=o||h.seriesLayoutBy,null==a&&(a=h.sourceHeader),s=s||h.dimensions}var u=function(t,e,i,n,r){if(!t)return{dimensionsDefine:hr(r)};var o,a,s,l;if(e===Zp)"auto"===n||null==n?ur(function(t){null!=t&&"-"!==t&&(_(t)?null==a&&(a=1):a=0)},i,t,10):a=n?1:0,r||1!==a||(r=[],ur(function(t,e){r[e]=null!=t?t:""},i,t)),o=r?r.length:i===$p?t.length:t[0]?t[0].length:null;else if(e===Up)r||(r=function(t){for(var e,i=0;i<t.length&&!(e=t[i++]););if(e){var n=[];return d(e,function(t,e){n.push(e)}),n}}(t),s=!0);else if(e===Xp)r||(r=[],s=!0,d(t,function(t,e){r.push(e)}));else if(e===Wp){var h=$e(t[0]);o=y(h)&&h.length||1}return s&&d(r,function(t,e){"name"===(w(t)?t.name:t)&&(l=e)}),{startIndex:a,dimensionsDefine:hr(r),dimensionsDetectCount:o,potentialNameDimIndex:l}}(i,n,o,a,s),c=e.encode;!c&&l&&(c=function(t,e,i,n,r,o){var a=or(t),s={},l=[],h=[],u=t.subType,c=N(["pie","map","funnel"]),f=N(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(a&&null!=f.get(u)){var p=t.ecModel,g=Kp(p).datasetMap,m=e.uid+"_"+r,v=g.get(m)||g.set(m,{categoryWayDim:1,valueWayDim:0});d(a.coordSysDims,function(t){if(null==a.firstCategoryDimIndex)e=v.valueWayDim++,s[t]=e,h.push(e);else if(a.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=v.categoryWayDim++;s[t]=e,h.push(e)}})}else if(null!=c.get(u)){for(var y,x=0;x<5&&null==y;x++)cr(i,n,r,o.dimensionsDefine,o.startIndex,x)||(y=x);if(null!=y){s.value=y;var _=o.potentialNameDimIndex||Math.max(y-1,0);h.push(_),l.push(_)}}return l.length&&(s.itemName=l),h.length&&(s.seriesName=h),s}(t,l,i,n,o,u)),Kp(t).source=new sr({data:i,fromDataset:r,seriesLayoutBy:o,sourceFormat:n,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectCount:u.dimensionsDetectCount,encodeDefine:c})}function hr(t){if(t){var e=N();return f(t,function(t,i){if(null==(t=o({},w(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function ur(t,e,i,n){if(null==n&&(n=1/0),e===$p)for(o=0;o<i.length&&o<n;o++)t(i[o]?i[o][0]:null,o);else for(var r=i[0]||[],o=0;o<r.length&&o<n;o++)t(r[o],o)}function cr(t,e,i,n,r,o){function a(t){return(null==t||!isFinite(t)||""===t)&&(!(!_(t)||"-"===t)||void 0)}var s,l;if(S(t))return!1;if(n&&(l=w(l=n[o])?l.name:l),e===Zp)if(i===$p){for(var h=t[o],u=0;u<(h||[]).length&&u<5;u++)if(null!=(s=a(h[r+u])))return s}else for(u=0;u<t.length&&u<5;u++){var c=t[r+u];if(c&&null!=(s=a(c[o])))return s}else if(e===Up){if(!l)return;for(u=0;u<t.length&&u<5;u++)if((d=t[u])&&null!=(s=a(d[l])))return s}else if(e===Xp){if(!l)return;if(!(h=t[l])||S(h))return!1;for(u=0;u<h.length&&u<5;u++)if(null!=(s=a(h[u])))return s}else if(e===Wp)for(u=0;u<t.length&&u<5;u++){var d=t[u],f=$e(d);if(!y(f))return!1;if(null!=(s=a(f[o])))return s}return!1}function dr(t){var e,r,o;t=t,this.option={},this.option[Qp]=1,this._componentsMap=N({series:[]}),this._seriesIndices,this._seriesIndicesMap,e=t,r=this._theme.option,o=e.color&&!e.colorLayer,d(r,function(t,r){"colorLayer"===r&&o||Rp.hasClass(r)||("object"==(void 0===t?"undefined":_typeof(t))?e[r]=e[r]?n(e[r],t,!1):i(t):null==e[r]&&(e[r]=t))}),n(t,Vp,!1),this.mergeOption(t)}function fr(t,e){t._seriesIndicesMap=N(t._seriesIndices=f(e,function(t){return t.componentIndex})||[])}function pr(t,e){return e.hasOwnProperty("subType")?g(t,function(t){return t.subType===e.subType}):t}function gr(t){d(tg,function(e){this[e]=m(t[e],t)},this)}function mr(){this._coordinateSystems=[]}function vr(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function yr(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return d(t,function(t,e){var i,o,a,s=e.match(ag);if(s&&s[1]&&s[2]){var l=s[1],h=s[2].toLowerCase();i=n[h],o=t,("min"===(a=l)?i>=o:"max"===a?i<=o:i===o)||(r=!1)}}),r}function xr(t){var e=t&&t.itemStyle;if(e)for(var i=0,r=hg.length;i<r;i++){var o=hg[i],a=e.normal,s=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?n(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),s&&s[o]&&(t[o]=t[o]||{},t[o].emphasis?n(t[o].emphasis,s[o]):t[o].emphasis=s[o],s[o]=null)}}function _r(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,r=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,a(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function wr(t){_r(t,"itemStyle"),_r(t,"lineStyle"),_r(t,"areaStyle"),_r(t,"label"),_r(t,"labelLine"),_r(t,"upperLabel"),_r(t,"edgeLabel")}function br(t,e){var i=lg(t)&&t[e],n=lg(i)&&i.textStyle;if(n)for(var r=0,o=kd.length;r<o;r++){e=kd[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Sr(t){t&&(wr(t),br(t,"label"),t.emphasis&&br(t.emphasis,"label"))}function Mr(t){return y(t)?t:t?[t]:[]}function Ir(t){return(y(t)?t[0]:t)||{}}function Tr(t){d(cg,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}function Cr(t){d(t,function(e,i){var n=[],r=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=a.map(o,function(o,l,h){var u,c,d=a.get(e.stackedDimension,h);if(isNaN(d))return r;s?c=a.getRawIndex(h):u=a.get(e.stackedByDimension,h);for(var f=NaN,p=i-1;p>=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,u)),c>=0){var m=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return n[0]=d,n[1]=f,n});a.hostModel.setData(l),e.data=l})}function Dr(t,e){sr.isInstance(t)||(t=sr.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Yp&&(this._offset=0,this._dimSize=e,this._data=i),o(this,gg[n===Zp?n+"_"+t.seriesLayoutBy:n])}function Ar(){return this._data.length}function kr(t){return this._data[t]}function Pr(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function Lr(t,e,i,n){return null!=i?t[i]:t}function Or(t,e,i,n){return zr(t[n],this._dimensionInfos[e])}function zr(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Hn(t)),null==t||""===t?NaN:+t}function Er(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var r,o,a=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(r=s.name,o=s.index),mg[a](n,e,o,r)}}}function Nr(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===Wp||n===Up){var r=t.getRawDataItem(e);return n!==Wp||w(r)||(r=null),r?r[i]:void 0}}}function Rr(t){return new Br(t)}function Br(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 Vr(t){var e,i,n=t.name;Je(t)||(t.name=(e=t.getRawData(),i=[],d(e.mapDimension("seriesName",!0),function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")||n))}function Fr(t){return t.model.getRawData().count()}function Hr(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Gr}function Gr(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Wr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(Zr,e))})}function Zr(t){var e=Ur(t);e&&e.setOutputEnd(this.count())}function Ur(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}function Xr(){this.group=new Ec,this.uid=kn("viewChart"),this.renderTask=Rr({plan:qr,reset:$r}),this.renderTask.context={view:this}}function jr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)jr(t.childAt(i),e)}function Yr(t,e,i){var n=ei(t,e);null!=n?d(Ye(n),function(e){jr(t.getItemGraphicEl(e),i)}):t.eachItemGraphicEl(function(t){jr(t,i)})}function qr(t){return Cg(t.model)}function $r(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,o=e.pipelineContext.canProgressiveRender,a=t.view,s=r&&Tg(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,i,n,r),Ag[l]}function Kr(t,e,i){function n(){u=(new Date).getTime(),c=null,t.apply(a,s||[])}var r,o,a,s,l,h=0,u=0,c=null;e=e||0;var d=function(){r=(new Date).getTime(),a=this,s=arguments;var t=l||e,d=l||i;l=null,o=r-(d?h:u)-t,clearTimeout(c),d?c=setTimeout(n,t):o>=0?n():c=setTimeout(n,-o),h=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Qr(t,e,i,n){var r=t[e];if(r){var o=r[kg]||r,a=r[Lg];if(r[Pg]!==i||a!==n){if(null==i||!n)return t[e]=o;(r=t[e]=Kr(o,i,"debounce"===n))[kg]=o,r[Lg]=n,r[Pg]=i}return r}}function Jr(t,e){var i=t[e];i&&i[kg]&&(t[e]=i[kg])}function to(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished,this._dataProcessorHandlers=i.slice(),this._visualHandlers=n.slice(),this._stageTaskMap=N()}function eo(t,e,i,n,r){function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}var a;r=r||{},d(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each(function(t){o(r,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),Bg(u,n);var f=t.getPerformArgs(u,r.block);d.each(function(t){t.perform(f)}),a|=u.perform(f)}else h&&h.each(function(s,l){o(r,s)&&s.dirty();var h=t.getPerformArgs(s,r.block);h.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),Bg(s,n),a|=s.perform(h)})}}),t.unfinished|=a}function io(t){t.overallReset(t.ecModel,t.api,t.payload)}function no(t,e){return t.overallProgress&&ro}function ro(){this.agent.dirty(),this.getDownstream().dirty()}function oo(){this.agent&&this.agent.dirty()}function ao(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function so(t){if(t.useClearVisual&&t.data.clearAllVisual(),(t.resetDefines=Ye(t.reset(t.model,t.ecModel,t.api,t.payload))).length)return lo}function lo(t,e){for(var i=e.data,n=e.resetDefines,r=0;r<n.length;r++){var o=n[r];if(o&&o.dataEach)for(var a=t.start;a<t.end;a++)o.dataEach(i,a);else o&&o.progress&&o.progress(t,i)}}function ho(t){return t.data.count()}function uo(t,e,i){var n=e.uid,r=t._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function co(t,e){for(var i in e.prototype)t[i]=R}function fo(t){return function(e,i,n){e=e&&e.toLowerCase(),Qu.prototype[t].call(this,e,i,n)}}function po(){Qu.call(this)}function go(t,e,n){function r(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=fm[e]),this.id,this.group,this._dom=t;var a=this._zr=Xe(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Kr(m(a.flush,a),17),(e=i(e))&&fg(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new mr;var s,l,h,u,c=this._api=(l=(s=this)._coordSysMgr,o(new gr(s),{getCoordinateSystems:m(l.getCoordinateSystems,l),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return s._model.getComponent(e.mainType,e.index);t=t.parent}}}));Yt(dm,r),Yt(hm,r),this._scheduler=new to(this,c,hm,dm),Qu.call(this),this._messageCenter=new po,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),u=this,(h=a).on("rendered",function(){u.trigger("rendered"),!h.animation.isFinished()||u[im]||u._scheduler.unfinished||u._pendingActions.length||u.trigger("finished")}),O(this)}function mo(t,e,i){var n,r=this._model,o=this._coordSysMgr.getCoordinateSystems();e=ni(r,e);for(var a=0;a<o.length;a++){var s=o[a];if(s[t]&&null!=(n=s[t](r,e,i)))return n}}function vo(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),So(t,"component",e,i),So(t,"chart",e,i),i.plan()}function yo(t,e,i,n,r){function o(n){n&&n.__alive&&n[e]&&n[e](n.__model,a,t._api,i)}var a=t._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};r&&(l.subType=r),a&&a.eachComponent(l,function(e,i){o(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}else jg(t._componentsViews.concat(t._chartsViews),o)}function xo(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function _o(t,e){var i=t.type,n=t.escapeConnect,r=sm[i],s=r.actionInfo,l=(s.update||"update").split(":"),h=l.pop();l=null!=l[0]&&$g(l[0]),this[em]=!0;var u=[t],c=!1;t.batch&&(c=!0,u=f(t.batch,function(e){return(e=a(o({},e),t)).batch=null,e}));var d,p=[],g="highlight"===i||"downplay"===i;jg(u,function(t){(d=(d=r.action(t,this._model,this._api))||o({},t)).type=s.event||d.type,p.push(d),g?yo(this,h,t,"series"):l&&yo(this,h,t,l.main,l.sub)},this),"none"===h||g||l||(this[im]?(vo(this),om.update.call(this,t),this[im]=!1):om[h].call(this,t)),d=c?{type:s.event||i,escapeConnect:n,batch:p}:p[0],this[em]=!1,!e&&this._messageCenter.trigger(d.type,d)}function wo(t){for(var e=this._pendingActions;e.length;){var i=e.shift();_o.call(this,i,t)}}function bo(t){!t&&this.trigger("updated")}function So(t,e,i,n){function r(t){var e="_ec_"+t.id+"_"+t.type,r=s[e];if(!r){var u=$g(t.type);(r=new(o?Sg.getClass(u.main,u.sub):Xr.getClass(u.sub))).init(i,h),s[e]=r,a.push(r),l.add(r.group)}t.__viewId=r.__id=e,r.__alive=!0,r.__model=t,r.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!o&&n.prepareView(r,t,i,h)}for(var o="component"===e,a=o?t._componentsViews:t._chartsViews,s=o?t._componentsMap:t._chartsMap,l=t._zr,h=t._api,u=0;u<a.length;u++)a[u].__alive=!1;for(o?i.eachComponent(function(t,e){"series"!==t&&r(e)}):i.eachSeries(r),u=0;u<a.length;){var c=a[u];c.__alive?u++:(!o&&c.renderTask.dispose(),l.remove(c.group),c.dispose(i,h),a.splice(u,1),delete s[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Mo(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Io(t,e,i,n){var r,o,a,s;r=e,o=i,a=n,jg(s||t._componentsViews,function(t){var e=t.__model;t.render(e,r,o,a),Do(e,t)}),jg(t._chartsViews,function(t){t.__alive=!1}),To(t,e,i,n),jg(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function To(t,e,i,n,r){var o,a,s,l,h,u=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var a,s,l=i.renderTask;u.updatePayload(l,n),r&&r.get(e.uid)&&l.dirty(),o|=l.perform(u.getPerformArgs(l)),i.group.silent=!!e.get("silent"),Do(e,i),a=i,s=e.get("blendMode")||null,a.group.traverse(function(t){t.isGroup||t.style.blend!==s&&t.setStyle("blend",s),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",s)})})}),u.unfinished|=o,a=t._zr,s=e,l=a.storage,h=0,l.traverse(function(t){t.isGroup||h++}),h>s.get("hoverLayerThreshold")&&!ku.node&&l.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),Eg(t._zr.dom,e)}function Co(t,e){jg(cm,function(i){i(t,e)})}function Do(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Ao(t){mm[t]=!1}function ko(t){return gm[(e=t,i=xm,e.getAttribute?e.getAttribute(i):e[i])];var e,i}function Po(t,e){fm[t]=e}function Lo(t){um.push(t)}function Oo(t,e){Ro(hm,t,e,Kg)}function zo(t,e,i){"function"==typeof e&&(i=e,e="");var n=qg(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Xg(nm.test(n)&&nm.test(e)),sm[n]||(sm[n]={action:i,actionInfo:t}),lm[e]=n}function Eo(t,e){Ro(dm,t,e,Qg,"layout")}function No(t,e){Ro(dm,t,e,Jg,"visual")}function Ro(t,e,i,n,r){(Yg(e)||qg(e))&&(i=e,e=n);var o=to.wrapStageHandler(i,r);return o.__prio=e,o.__raw=i,t.push(o),o}function Bo(t,e){pm[t]=e}function Vo(t){return Rp.extend(t)}function Fo(t){return Sg.extend(t)}function Ho(t){return bg.extend(t)}function Go(t){return Xr.extend(t)}function Wo(t){return t}function Zo(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||Wo,this._newKeyGetter=n||Wo,this.context=r}function Uo(t,e,i,n,r){for(var o=0;o<t.length;o++){var a="_ec_"+r[n](t[o],o),s=e[a];null==s?(i.push(a),e[a]=o):(s.length||(e[a]=s=[s]),s.push(o))}}function Xo(t){return t._rawCount>65535?Cm:Dm}function jo(t,e){d(Am.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods}function Yo(t){return t}function qo(t){return t<this._count&&t>=0?this._indices[t]:-1}function $o(t,e){var i=t._idList[e];return null==i&&(i=t._getIdFromStore(e)),null==i&&(i=Im+e),i}function Ko(t){return y(t)||(t=[t]),t}function Qo(t,e){var i=t.dimensions,n=new km(f(i,t.getDimensionInfo,t),t.hostModel);jo(n,t);for(var r=n._storage={},a=t._storage,s=o({},t._rawExtent),h=0;h<i.length;h++){var u=i[h];a[u]&&(l(e,u)>=0?(r[u]=Jo(a[u]),s[u]=[1/0,-1/0]):r[u]=a[u])}return n}function Jo(t){for(var e=new Array(t.length),i=0;i<t.length;i++)e[i]=(n=t[i],r=void 0,(r=n.constructor)===Array?n.slice():new r(n));var n,r;return e}function ta(t,e,n){function r(t,e,i){null!=bm.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,u.set(e,!0))}sr.isInstance(e)||(e=sr.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var s=(n.dimsDef||[]).slice(),l=N(n.encodeDef),h=N(),u=N(),c=[],f=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return d(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,s,n.dimCount),p=0;p<f;p++){var g=s[p]=o({},w(s[p])?s[p]:{name:s[p]}),m=g.name,v=c[p]={otherDims:{}};null!=m&&null==h.get(m)&&(v.name=v.displayName=m,h.set(m,p)),null!=g.type&&(v.type=g.type),null!=g.displayName&&(v.displayName=g.displayName)}l.each(function(t,e){t=Ye(t).slice();var i=l.set(e,[]);d(t,function(t,n){_(t)&&(t=h.get(t)),null!=t&&t<f&&(i[n]=t,r(c[t],e,n))})});var y=0;d(t,function(t,e){var n,o,s;if(_(t))n=t,t={};else{n=t.name;var h=t.ordinalMeta;t.ordinalMeta=null,(t=i(t)).ordinalMeta=h,o=t.dimsDef,s=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}var u=Ye(l.get(n));if(!u.length)for(var f=0;f<(o&&o.length||1);f++){for(;y<c.length&&null!=c[y].coordDim;)y++;y<c.length&&u.push(y++)}d(u,function(e,i){var l=c[e];r(a(l,t),n,i),null==l.name&&o&&(l.name=l.displayName=o[i]),s&&a(l.otherDims,s)})});var x,b,S=n.generateCoord,M=n.generateCoordCount,I=null!=M;M=S?M||1:0;for(var T=S||"value",C=0;C<f;C++)null==(v=c[C]=c[C]||{}).coordDim&&(v.coordDim=ea(T,u,I),v.coordDimIndex=0,(!S||M<=0)&&(v.isExtraCoord=!0),M--),null==v.name&&(v.name=ea(v.coordDim,h)),null==v.type&&(x=e,b=C,v.name,cr(x.data,x.sourceFormat,x.seriesLayoutBy,x.dimensionsDefine,x.startIndex,b))&&(v.type="ordinal");return c}function ea(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}function ia(t,e,i){var n,r,o,a,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,h=!(!t||!t.get("stack"));if(d(e,function(t,i){_(t)&&(e[i]=t={name:t}),h&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),r&&(s||n)){o="__\0ecstackresult",a="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var u=r.coordDim,c=r.type,f=0;d(e,function(t){t.coordDim===u&&f++}),e.push({name:o,coordDim:u,coordDimIndex:f,type:c,isExtraCoord:!0,isCalculationCoord:!0}),f++,e.push({name:a,coordDim:a,coordDimIndex:f,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:a,stackResultDimension:o}}function na(t,e,i){return e&&e===t.getCalculationInfo("stackedDimension")&&(null!=i?i===t.getCalculationInfo("stackedByDimension"):t.getCalculationInfo("isStackedByIndex"))}function ra(t,e,i){i=i||{},sr.isInstance(t)||(t=sr.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),o=mr.get(r),a=or(e);a&&(n=f(a.coordSysDims,function(t){var e,i={name:t},n=a.axisMap.get(t);if(n){var r=n.get("type");i.type="category"===(e=r)?"ordinal":"time"===e?"time":"float"}return i})),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]);var s,l,h=Om(t,{coordDimensions:n,generateCoord:i.generateCoord});a&&d(h,function(t,e){var i=t.coordDim,n=a.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(h[s].otherDims.itemName=0);var u=ia(e,h),c=new km(h,e);c.setCalculationInfo(u);var p=null!=s&&function(t){if(t.sourceFormat===Wp){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!y($e(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,p),c}function oa(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function aa(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}function sa(t){return t._map||(t._map=N(t.categories))}function la(t){return w(t)&&null!=t.value?t.value:t+""}function ha(t){return Nn(t)+2}function ua(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function ca(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),ua(t,0,e),ua(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function da(t){return t.get("stack")||Fm+t.seriesIndex}function fa(t){return t.dim+t.index}function pa(t,e){return function(t,e){var i={};d(t,function(t,e){var n=t.axisKey,r=t.bandWidth,o=i[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;i[n]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var h=t.barMaxWidth;h&&(a[s].maxWidth=h);var u=t.barGap;null!=u&&(o.gap=u);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=Ln(t.categoryGap,r),a=Ln(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-o)/(l+(l-1)*a);h=Math.max(h,0),d(i,function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)}),h=(s-o)/(l+(l-1)*a),h=Math.max(h,0);var u,c=0;d(i,function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+a)}),u&&(c-=u.width*a);var f=-c/2;d(i,function(t,i){n[e][i]=n[e][i]||{offset:f,width:t.width},f+=t.width*(1+a)})}),n}(f(t,function(t){var e=t.getData(),i=t.coordinateSystem.getBaseAxis(),n=i.getExtent(),r="category"===i.type?i.getBandWidth():Math.abs(n[1]-n[0])/e.count();return{bandWidth:r,barWidth:Ln(t.get("barWidth"),r),barMaxWidth:Ln(t.get("barMaxWidth"),r),barGap:t.get("barGap"),barCategoryGap:t.get("barCategoryGap"),axisKey:fa(i),stackId:da(t)}}))}function ga(t,e){return qm(t,Ym(e))}function ma(t,e){var i,n,r,o=t.type,a=e.getMin(),s=e.getMax(),l=null!=a,h=null!=s,u=t.getExtent();"ordinal"===o?i=e.getCategories().length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ln(n[0],1),n[1]=Ln(n[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==a&&(a="ordinal"===o?i?0:NaN:u[0]-n[0]*r),null==s&&(s="ordinal"===o?i?i-1:NaN:u[1]+n[1]*r),"dataMin"===a?a=u[0]:"function"==typeof a&&(a=a({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(a)||I(s)),e.getNeedCrossZero()&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===o){var f,p=[];if(c.eachSeriesByType("bar",function(t){t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type&&(p.push(t),f|=t.getBaseAxis()===e.axis)}),f){var g=function(t,e,i,n){var r=i.axis.getExtent(),o=r[1]-r[0],a=pa(n)[i.axis.dim+i.axis.index];if(void 0===a)return{min:t,max:e};var s=1/0;d(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(a,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var h=s+l,u=e-t,c=u/(1-(s+l)/o)-u;return{min:t-=c*(s/h),max:e+=c*(l/h)}}(a,s,e,p);a=g.min,s=g.max}}return[a,s]}function va(t,e){var i=ma(t,e),n=null!=e.getMin(),r=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:r,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function ya(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Nm(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Vm;default:return(oa.getClass(e)||Vm).create(t)}}function xa(t,e){return"category"===t.type?t.scale.getLabel(e):e}function _a(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function wa(t,e,i,n,r,o,a){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Ui(t.slice(8),new Gt(e,i,n,r),a?"center":"cover"):0===t.indexOf("path://")?Zi(t.slice(7),{},new Gt(e,i,n,r),a?"center":"cover"):new lv({shape:{symbolType:t,x:e,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=_a,s.setColor(o),s}function ba(t,e){return Math.abs(t-e)<cv}function Sa(t,e,i){var n=0,r=t[0];if(!r)return!1;for(var o=1;o<t.length;o++){var a=t[o];n+=Pi(r[0],r[1],a[0],a[1],e,i),r=a}var s=t[0];return ba(r[0],s[0])&&ba(r[1],s[1])||(n+=Pi(r[0],r[1],s[0],s[1],e,i)),0!==n}function Ma(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function Ia(t,e,i){for(var n=[],r=e[0],o=e[1],a=0;a<t.length;a+=2){var s=t.charCodeAt(a)-64,l=t.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,n.push([s/i,l/i])}return n}function Ta(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function Ca(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Er(t,e,i[0]);if(n){for(var r=[],o=0;o<i.length;o++){var a=Er(t,e,i[o]);r.push(a)}return r.join(" ")}}function Da(t){return[t[0]/2,t[1]/2]}function Aa(t,e,i){Ec.call(this),this.updateData(t,e,i)}function ka(t,e){this.parent.drift(t,e)}function Pa(t){this.group=new Ec,this._symbolCtor=t||Aa}function La(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function Oa(t){return null==t||w(t)||(t={isIgnore:t}),t||{}}function za(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 Ea(t,e,i){var n,r,o,a=t.getBaseAxis(),s=t.getOtherAxis(a),l=(n=i,r=0,o=s.scale.getExtent(),"start"===n?r=o[0]:"end"===n?r=o[1]:o[0]>0?r=o[0]:o[1]<0&&(r=o[1]),r),h=a.dim,u=s.dim,c=e.mapDimension(u),d=e.mapDimension(h),p="x"===u||"radius"===u?1:0,g=na(e,c,d);return{dataDimsForPoint:f(t.dimensions,function(t){return e.mapDimension(t)}),valueStart:l,valueAxisDim:u,baseAxisDim:h,stacked:g,valueDim:c,baseDim:d,baseDataOffset:p,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Na(t,e,i,n){var r=NaN;t.stacked&&(r=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=i.get(t.baseDim,n),a[1-o]=r,e.dataToPoint(a)}function Ra(t){return isNaN(t[0])||isNaN(t[1])}function Ba(t,e,i,n,r,o,a,s,l,h,u){return null==h?Va(e,"x")?Fa(t,e,i,n,r,o,a,s,l,"x",u):Va(e,"y")?Fa(t,e,i,n,r,o,a,s,l,"y",u):Ha.apply(this,arguments):"none"!==h&&Va(e,h)?Fa.apply(this,arguments):Ha.apply(this,arguments)}function Va(t,e){if(t.length<=1)return!0;for(var i="x"===e?0:1,n=t[0][i],r=0,o=1;o<t.length;++o){var a=t[o][i]-n;if(!isNaN(a)&&!isNaN(r)&&0!==a&&0!==r&&a>=0!=r>=0)return!1;isNaN(a)||0===a||(r=a,n=t[o][i])}return!0}function Fa(t,e,i,n,r,o,a,s,l,h,u){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(d>=r||d<0)break;if(Ra(p)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===h?1:0,v=(p[m]-g[m])*l;Cv(Av,g),Av[m]=g[m]+v,Cv(kv,p),kv[m]=p[m]-v,t.bezierCurveTo(Av[0],Av[1],kv[0],kv[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Ha(t,e,i,n,r,o,a,s,l,h,u){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(d>=r||d<0)break;if(Ra(p)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](p[0],p[1]),Cv(Av,p);else if(l>0){var g=d+o,m=e[g];if(u)for(;m&&Ra(e[g]);)m=e[g+=o];var v=.5,y=e[c];if(!(m=e[g])||Ra(m))Cv(kv,p);else{var x,_;if(Ra(m)&&!u&&(m=p),W(Dv,m,y),"x"===h||"y"===h){var w="x"===h?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=Yu(p,y),_=Yu(p,m);Tv(kv,p,Dv,-l*(1-(v=_/(_+x))))}Mv(Av,Av,s),Iv(Av,Av,a),Mv(kv,kv,s),Iv(kv,kv,a),t.bezierCurveTo(Av[0],Av[1],kv[0],kv[1],p[0],p[1]),Tv(Av,p,Dv,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=o}return f}function Ga(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var r=0;r<t.length;r++){var o=t[r];o[0]<i[0]&&(i[0]=o[0]),o[1]<i[1]&&(i[1]=o[1]),o[0]>n[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}function Wa(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],r=e[i];if(n[0]!==r[0]||n[1]!==r[1])return}return!0}}function Za(t){return"number"==typeof t?t:t?.5:0}function Ua(t){var e=t.getGlobalExtent();if(t.onBand){var i=t.getBandWidth()/2-1,n=e[1]>e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Xa(t,e,i){return"polar"===t.type?(r=e,o=i,a=(n=t).getAngleAxis(),s=n.getRadiusAxis().getExtent(),l=a.getExtent(),h=Math.PI/180,u=new Xf({shape:{cx:n.cx,cy:n.cy,r0:s[0],r:s[1],startAngle:-l[0]*h,endAngle:-l[1]*h,clockwise:a.inverse}}),r&&(u.shape.endAngle=-l[0]*h,_n(u,{shape:{endAngle:-l[1]*h}},o)),u):function(t,e,i){var n=Ua(t.getAxis("x")),r=Ua(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),a=Math.min(n[0],n[1]),s=Math.min(r[0],r[1]),l=Math.max(n[0],n[1])-a,h=Math.max(r[0],r[1])-s,u=i.get("lineStyle.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);o?(s-=c,h+=2*c):(a-=c,l+=2*c);var d=new Qf({shape:{x:a,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,_n(d,{shape:{width:l,height:h}},i)),d}(t,e,i);var n,r,o,a,s,l,h,u}function ja(t,e,i){for(var n=e.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,o=[],a=0;a<t.length-1;a++){var s=t[a+1],l=t[a];o.push(l);var h=[];switch(i){case"end":h[r]=s[r],h[1-r]=l[1-r],o.push(h);break;case"middle":var u=(l[r]+s[r])/2,c=[];h[r]=c[r]=u,h[1-r]=l[1-r],c[1-r]=s[1-r],o.push(h),o.push(c);break;default:h[r]=l[r],h[1-r]=s[1-r],o.push(h)}}return t[a]&&o.push(t[a]),o}function Ya(t){return this._axes[t]}function qa(t){Rv.call(this,t)}function $a(t,e){return e.type||(e.data?"category":"value")}function Ka(t,e,i){return t.getCoordSysModel()===e}function Qa(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function Ja(t,e,i){var n=t[e];if(i.onZero){var r=i.onZeroAxisIndex;if(null==r){for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];if(a&&!ts(a)){r=+o;break}}null==r&&(i.onZero=!1),i.onZeroAxisIndex=r}else(a=n[r])&&ts(a)&&(i.onZero=!1)}}function ts(t){return"category"===t.type||"time"===t.type||!Xv(t)}function es(t,e){return f(qv,function(e){return t.getReferringComponents(e)[0]})}function is(t){return"cartesian2d"===t.get("coordinateSystem")}function ns(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}function rs(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function os(t){t&&(t.ignore=!0)}function as(t,e,i){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var o=rt([]);return lt(o,o,-t.rotation),n.applyTransform(at([],o,t.getLocalTransform())),r.applyTransform(at([],o,e.getLocalTransform())),n.intersect(r)}}function ss(t){return"middle"===t||"center"===t}function ls(t,e){var n,r,o,s,l,h,u,c={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return n=c,o=e,s=(r=t).getComponent("tooltip"),l=r.getComponent("axisPointer"),h=l.get("link",!0)||[],u=[],iy(o.getCoordinateSystems(),function(t){function e(e,o,s){var f=s.model.getModel("axisPointer",l),p=f.get("show");if(p&&("auto"!==p||e||cs(f))){null==o&&(o=f.get("triggerTooltip"));var g=(f=e?function(t,e,n,r,o,s){var l=e.getModel("axisPointer"),h={};iy(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){h[t]=i(l.get(t))}),h.snap="category"!==t.type&&!!s,"cross"===l.get("type")&&(h.type="line");var u=h.label||(h.label={});if(null==u.show&&(u.show=!1),"cross"===o){var c=l.get("label.show");if(u.show=null==c||c,!s){var d=h.lineStyle=l.get("crossStyle");d&&a(u,d.textStyle)}}return t.model.getModel("axisPointer",new Cn(h,n,r))}(s,d,l,r,e,o):f).get("snap"),m=ds(s.model),v=o||g||"category"===s.type,y=n.axesInfo[m]={key:m,axis:s,coordSys:t,axisPointerModel:f,triggerTooltip:o,involveSeries:v,snap:g,useHandle:cs(f),seriesModels:[]};c[m]=y,n.seriesInvolved|=v;var x=function(t,e){for(var i=e.model,n=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(hs(o[n+"AxisId"],i.id)||hs(o[n+"AxisIndex"],i.componentIndex)||hs(o[n+"AxisName"],i.name))return r}}(h,s);if(null!=x){var _=u[x]||(u[x]={axesInfo:{}});_.axesInfo[m]=y,_.mapper=h[x].mapper,y.linkGroup=_}}}if(t.axisPointerEnabled){var o=ds(t.model),c=n.coordSysAxesInfo[o]={};n.coordSysMap[o]=t;var d=t.model.getModel("tooltip",s);if(iy(t.getAxes(),ny(e,!1,null)),t.getTooltipAxes&&s&&d.get("show")){var f="axis"===d.get("trigger"),p="cross"===d.get("axisPointer.type"),g=t.getTooltipAxes(d.get("axisPointer.axis"));(f||p)&&iy(g.baseAxes,ny(e,!p||"cross",f)),p&&iy(g.otherAxes,ny(e,"cross",!1))}}}),c.seriesInvolved&&function(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==e.get("axisPointer.show",!0)&&iy(t.coordSysAxesInfo[ds(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}(c,t),c}function hs(t,e){return"all"===t||y(t)&&l(t,e)>=0||t===e}function us(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ds(t)]}function cs(t){return!!t.get("handle.show")}function ds(t){return t.type+"||"+t.id}function fs(t,e,i,n,r,o){var a,s=ry.getAxisPointerClass(t.axisPointerClass);if(s){var l=(a=us(e))&&a.axisPointerModel;l?(t._axisPointer||(t._axisPointer=new s)).render(e,l,n,o):ps(t,n)}}function ps(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}function gs(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,o={},a=r.position,s=r.onZero?"onZero":a,l=r.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(r.onZero){var p=n.getAxis("x"===l?"y":"x",r.onZeroAxisIndex),g=p.toGlobalCoord(p.dataToCoord(0));f[c.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===l?f[c[s]]:u[0],"x"===l?f[c[s]]:u[3]],o.rotation=Math.PI/2*("x"===l?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r.onZero?f[c[a]]-f[c.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(i.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var m=e.get("axisLabel.rotate");return o.labelRotate="top"===s?-m:m,o.labelInterval=r.getLabelInterval(),o.z2=1,o}function ms(t,e){"outside"===t.textPosition&&(t.textPosition=e)}function vs(t,e,i){i.style.text=null,xn(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function ys(t,e,i){i.style.text=null,xn(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}function xs(t,e,i,n,r,o,s,l){var h=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();l||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(a({fill:h,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);var p,g,m,v,y,x;s?r.height:r.width;l||(p=t.style,v=h,y=o,x=i,cn(p,g=d,(m=n).getModel("label"),m.getModel("emphasis.label"),{labelFetcher:y,labelDataIndex:x,defaultText:Ca(y.getData(),x),isRectText:!0,autoColor:v}),ms(p),ms(g)),un(t,d)}function _s(t,e,i,n){var r=e.getData(),o=this.dataIndex,a=r.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:a,seriesId:e.id}),r.each(function(t){ws(r.getItemGraphicEl(t),r.getItemLayout(t),e.isSelected(r.getName(t)),s,i)})}function ws(t,e,i,n,r){var o=(e.startAngle+e.endAngle)/2,a=Math.cos(o),s=Math.sin(o),l=i?n:0,h=[a*l,s*l];r?t.animate().when(200,{position:h}).start("bounceOut"):t.attr("position",h)}function bs(t,e){function i(){o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore}function n(){o.ignore=o.normalIgnore,a.ignore=a.normalIgnore}Ec.call(this);var r=new Xf({z2:2}),o=new Kf,a=new Gf;this.add(r),this.add(o),this.add(a),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Ss(t,e,i,n,r,o,a){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=h<r+u?Math.sqrt((r+u+c)*(r+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=a&&(d=a-10),!e&&d<=a&&(d=a+10),t[s].x=i+d*o,a=d}}t.sort(function(t,e){return t.y-e.y});for(var h,u=0,c=t.length,d=[],f=[],p=0;p<c;p++)(h=t[p].y-u)<0&&function(e,i,n,r){for(var o=e;o<i;o++)if(t[o].y+=n,o>e&&o+1<i&&t[o+1].y>t[o].y+t[o].height)return void s(o,n/2);s(i-1,n/2)}(p,c,-h),u=t[p].y+t[p].height;for(a-u<0&&s(c-1,u-a),p=0;p<c;p++)t[p].y>=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,r),l(f,!0,e,i,n,r)}function Ms(){this.group=new Ec}function Is(t,e,i,n){var r=i.type,o=new(0,dp[r.charAt(0).toUpperCase()+r.slice(1)])(i);e.add(o),n.set(t,o),o.__ecGraphicId=t}function Ts(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Ts(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Cs(t,e){var i;return d(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Ds(t,e,i,n,r){var a,s,l,h,u,c,d,f,p=t.axis;if(!p.scale.isBlank()&&p.containData(e))if(t.involveSeries){var g=(a=e,l=(s=t).axis,h=l.dim,u=a,c=[],d=Number.MAX_VALUE,f=-1,Ty(s.seriesModels,function(t,e){var i,n,r=t.getData().mapDimension(h,!0);if(t.getAxisTooltipData){var o=t.getAxisTooltipData(r,a,l);n=o.dataIndices,i=o.nestestValue}else{if(!(n=t.getData().indicesOfNearest(r[0],a,"category"===l.type?.5:null)).length)return;i=t.getData().get(r[0],n[0])}if(null!=i&&isFinite(i)){var s=a-i,p=Math.abs(s);p<=d&&((p<d||s>=0&&f<0)&&(d=p,f=s,u=i,c.length=0),Ty(n,function(e){c.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:c,snapToValue:u}),m=g.payloadBatch,v=g.snapToValue;m[0]&&null==r.seriesIndex&&o(r,m[0]),!n&&t.snap&&p.containData(v)&&null!=v&&(e=v),i.showPointer(t,e,m,r),i.showTooltip(t,g,v)}else i.showPointer(t,e)}function As(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function ks(t,e,i,n){var r=i.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=ds(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Ps(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function Ls(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Os(t,e,i){if(!ku.node){var n=e.getZr();Ay(n).records||(Ay(n).records={}),function(t,e){function i(i,n){t.on(i,function(i){var r,o,a,s,l,h,u,c=(r=e,{dispatchAction:function t(e){var i=o[e.type];i?i.push(e):(e.dispatchAction=t,r.dispatchAction(e))},pendings:o={showTip:[],hideTip:[]}});ky(Ay(t).records,function(t){t&&n(t,i,c.dispatchAction)}),a=c.pendings,s=e,h=a.showTip.length,u=a.hideTip.length,h?l=a.showTip[h-1]:u&&(l=a.hideTip[u-1]),l&&(l.dispatchAction=null,s.dispatchAction(l))})}Ay(t).initialized||(Ay(t).initialized=!0,i("click",v(Es,"click")),i("mousemove",v(Es,"mousemove")),i("globalout",zs))}(n,e),(Ay(n).records[t]||(Ay(n).records[t]={})).handler=i}}function zs(t,e,i){t.handler("leave",null,i)}function Es(t,e,i,n){e.handler(t,i,n)}function Ns(t,e){if(!ku.node){var i=e.getZr();(Ay(i).records||{})[t]&&(Ay(i).records[t]=null)}}function Rs(){}function Bs(t,e,i,n){(function t(e,i){if(w(e)&&w(i)){var n=!0;return d(i,function(i,r){n=n&&t(e[r],i)}),!!n}return e===i})(Ly(i).lastProp,n)||(Ly(i).lastProp=n,e?xn(i,n,t):(i.stopAnimation(),i.attr(n)))}function Vs(t,e){t[e.get("label.show")?"show":"hide"]()}function Fs(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Hs(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)})}function Gs(t,e,i,n,r){var o=Ws(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),a=i.getModel("label"),s=Ip(a.get("padding")||0),l=a.getFont(),h=ne(o,l),u=r.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],f=r.align;"right"===f&&(u[0]-=c),"center"===f&&(u[0]-=c/2);var p,g,m,v,y,x,_=r.verticalAlign;"bottom"===_&&(u[1]-=d),"middle"===_&&(u[1]-=d/2),p=u,g=c,m=d,y=(v=n).getWidth(),x=v.getHeight(),p[0]=Math.min(p[0]+g,y)-g,p[1]=Math.min(p[1]+m,x)-m,p[0]=Math.max(p[0],0),p[1]=Math.max(p[1],0);var w=a.get("backgroundColor");w&&"auto"!==w||(w=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:a.get("borderRadius")},position:u.slice(),style:{text:o,textFont:l,textFill:a.getTextColor(),textPosition:"inside",fill:w,stroke:a.get("borderColor")||"transparent",lineWidth:a.get("borderWidth")||0,shadowBlur:a.get("shadowBlur"),shadowColor:a.get("shadowColor"),shadowOffsetX:a.get("shadowOffsetX"),shadowOffsetY:a.get("shadowOffsetY")},z2:10}}function Ws(t,e,i,n,r){var o=e.scale.getLabel(t,{precision:r.precision}),a=r.formatter;if(a){var s={value:xa(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),_(a)?o=a.replace("{value}",o):x(a)&&(o=a(s))}return o}function Zs(t,e,i){var n=nt();return lt(n,n,i.rotation),st(n,n,i.position),bn([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Us(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Xs(t){return"x"===t.dim?0:1}function js(t){var e,i,n,r,o,a,s=[],l=t.get("transitionDuration"),h=t.get("backgroundColor"),u=t.getModel("textStyle"),c=t.get("padding");return l&&s.push((a="left "+(o=l)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+o+"s cubic-bezier(0.23, 1, 0.32, 1)",f(Vy,function(t){return t+"transition:"+a}).join(";"))),h&&(ku.canvasSupported?s.push("background-Color:"+h):(s.push("background-Color:#"+It(h)),s.push("filter:alpha(opacity=70)"))),Ry(["width","color","radius"],function(e){var i="border-"+e,n=By(i),r=t.get(n);null!=r&&s.push(i+":"+r+("color"===e?"":"px"))}),s.push((i=[],n=(e=u).get("fontSize"),(r=e.getTextColor())&&i.push("color:"+r),i.push("font:"+e.getFont()),n&&i.push("line-height:"+Math.round(3*n/2)+"px"),Ry(["decoration","align"],function(t){var n=e.get(t);n&&i.push("text-"+t+":"+n)}),i.join(";"))),null!=c&&s.push("padding:"+Ip(c).join("px ")+"px"),s.join(";")+";"}function Ys(t,e){if(ku.wxa)return null;var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!r._enterable){var i=n.handler;Re(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function qs(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(Cn.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Cn(i,e,e.ecModel))}return e}function $s(t,e){return t.dispatchAction||m(e.dispatchAction,e)}function Ks(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function Qs(t){return"center"===t||"middle"===t}function Js(t,e,i){var n,r={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name)),d(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}function tl(t,e){var i=Ip(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),new Qf({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}function el(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function il(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function nl(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}function rl(t,e,i){var n=[1,1];n[t.getOrient().index]=0,ir(e,i,{type:"box",ignoreSize:n})}function ol(t){qe(t,"label",["show"])}function al(t,e,i,n,r,o){var a=[],s=na(e,n,i)?e.getCalculationInfo("stackResultDimension"):n,l=cl(e,s,t),h=e.indicesOfNearest(s,l)[0];a[r]=e.get(i,h),a[o]=e.get(n,h);var u=En(e.get(n,h));return(u=Math.min(u,20))>=0&&(a[o]=+a[o].toFixed(u)),a}function sl(t,e){var n,r=t.getData(),o=t.coordinateSystem;if(e&&(n=e,isNaN(parseFloat(n.x))||isNaN(parseFloat(n.y)))&&!y(e.coord)&&o){var a=o.dimensions,s=ll(e,r,o,t);if((e=i(e)).type&&ox[e.type]&&s.baseAxis&&s.valueAxis){var l=nx(a,s.baseAxis.dim),h=nx(a,s.valueAxis.dim);e.coord=ox[e.type](r,s.baseDataDim,s.valueDataDim,l,h),e.value=e.coord[h]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;c<2;c++)ox[u[c]]&&(u[c]=cl(r,r.mapDimension(a[c]),u[c]));e.coord=u}}return e}function ll(t,e,i,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var r=0;r<n.length;r++){var o=i.getDimensionInfo(n[r]);if(o.name===e)return o.coordDim}}(n,r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function hl(t,e){return!(t&&t.containData&&e.coord&&(i=e,isNaN(parseFloat(i.x))&&isNaN(parseFloat(i.y))))||t.containData(e.coord);var i}function ul(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function cl(t,e,i){if("average"===i){var n=0,r=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,r++)}),n/r}return t.getDataExtent(e,!0)["max"===i?1:0]}function dl(t,e,i){var n=e.coordinateSystem;t.each(function(r){var o,a=t.getItemModel(r),s=Ln(a.get("x"),i.getWidth()),l=Ln(a.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(n){var h=t.get(n.dimensions[0],r),u=t.get(n.dimensions[1],r);o=n.dataToPoint([h,u])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)})}function fl(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}function pl(t){return"_"+t+"Type"}function gl(t,e,i){var n=e.getItemVisual(i,"color"),r=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(r&&"none"!==r){y(o)||(o=[o,o]);var a=wa(r,-o[0]/2,-o[1]/2,o[0],o[1],n);return a.name=t,a}}function ml(t,e){var i=e[0],n=e[1],r=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,r?(t.cpx1=r[0],t.cpy1=r[1]):(t.cpx1=NaN,t.cpy1=NaN)}function vl(t,e,i){Ec.call(this),this._createLine(t,e,i)}function yl(t){this._ctor=t||vl,this.group=new Ec}function xl(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 _l(t){return isNaN(t[0])||isNaN(t[1])}function wl(t){return!_l(t[0])&&!_l(t[1])}function bl(t){return!isNaN(t)&&!isFinite(t)}function Sl(t,e,i,n){var r=1-t,o=n.dimensions[t];return bl(e[r])&&bl(i[r])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function Ml(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(Sl(1,i,n,t)||Sl(0,i,n,t)))return!0}return hl(t,e[0])&&hl(t,e[1])}function Il(t,e,i,n,r){var o,a=n.coordinateSystem,s=t.getItemModel(e),l=Ln(s.get("x"),r.getWidth()),h=Ln(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=a.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);o=a.dataToPoint([c,d])}if("cartesian2d"===a.type){var f=a.getAxis("x"),p=a.getAxis("y");u=a.dimensions;bl(t.get(u[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):bl(t.get(u[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];t.setItemLayout(e,o)}function Tl(t){return!isNaN(t)&&!isFinite(t)}function Cl(t,e,i,n){var r=1-t;return Tl(e[r])&&Tl(i[r])}function Dl(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!Cl(1,i,n)&&!Cl(0,i,n))||hl(t,{coord:i,x:e.x0,y:e.y0})||hl(t,{coord:n,x:e.x1,y:e.y1})}function Al(t,e,i,n,r){var o,a=n.coordinateSystem,s=t.getItemModel(e),l=Ln(s.get(i[0]),r.getWidth()),h=Ln(s.get(i[1]),r.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var u=[f=t.get(i[0],e),p=t.get(i[1],e)];a.clampData&&a.clampData(u,u),o=a.dataToPoint(u,!0)}if("cartesian2d"===a.type){var c=a.getAxis("x"),d=a.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);Tl(f)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):Tl(p)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];return o}function kl(t,e,i){var n=[1/0,-1/0];return Sx(i,function(t){var i=t.getData();i&&Sx(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]),function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),r="category"===i.get("type"),o=r&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:r&&(e[0]=o>0?0:NaN);var a=i.getMax(!0);null!=a&&"dataMax"!==a&&"function"!=typeof a?e[1]=a:r&&(e[1]=o>0?o-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}function Pl(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var o=Rn(r,[0,500]);o=Math.min(o,20);var a=e||0===n[0]&&100===n[1];i.setRange(a?null:+r[0].toFixed(o),a?null:+r[1].toFixed(o))}}function Ll(t){var e={};return Tx(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Ol(t,e){var i=t._rangePropMode,n=t.get("rangeMode");Tx([["start","startValue"],["end","endValue"]],function(t,r){var o=null!=e[t[0]],a=null!=e[t[1]];o&&!a?i[r]="percent":!o&&a?i[r]="value":n?i[r]=n[r]:o&&(i[r]="percent")})}function zl(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function El(t,e){return Math.min(e[1],Math.max(e[0],t))}function Nl(t){return"vertical"===t?"ns-resize":"ew-resize"}function Rl(t,e){return!!Bl(t)[e]}function Bl(t){return t[Fx]||(t[Fx]={})}function Vl(t){this.pointerChecker,this._zr=t,this._opt={};var e=m,n=e(Fl,this),r=e(Hl,this),o=e(Gl,this),s=e(Wl,this),l=e(Zl,this);Qu.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,h){this.disable(),this._opt=a(i(h)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",r),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Fl(t){if(!(Ve(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Hl(t){if(!Ve(t)&&Xl(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!Rl(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,o=e-n,a=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&cd(t.event),this.trigger("pan",o,a,n,r,e,i)}}function Gl(t){Ve(t)||(this._dragging=!1)}function Wl(t){if(Xl(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;Ul.call(this,t,e,t.offsetX,t.offsetY)}}function Zl(t){if(!Rl(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;Ul.call(this,t,e,t.pinchX,t.pinchY)}}function Ul(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(cd(t.event),this.trigger("zoom",e,i,n))}function Xl(t,e,i){var n=t._opt[e];return n&&(!_(n)||i.event[n+"Key"])}function jl(t,e){var i=ql(t),n=e.dataZoomId,r=e.coordId;d(i,function(t,i){var o=t.dataZoomInfos;o[n]&&l(e.allCoordIds,r)<0&&(delete o[n],t.count--)}),$l(i);var a,s,h=i[r];h||((h=i[r]={coordId:r,dataZoomInfos:{},count:0}).controller=(a=h,(s=new Vl(t.getZr())).on("pan",Hx(Kl,a)),s.on("zoom",Hx(Ql,a)),s),h.dispatchAction=v(th,t)),!h.dataZoomInfos[n]&&h.count++,h.dataZoomInfos[n]=e;var u,c,f,p,g=(u=h.dataZoomInfos,f={},p={type_true:2,type_move:1,type_false:0,type_undefined:-1},d(u,function(t){var e=!t.disabled&&(!t.zoomLock||"move");p["type_"+e]>p["type_"+c]&&(c=e),o(f,t.roamControllerOpt)}),{controlType:c,opt:f});h.controller.enable(g.controlType,g.opt),h.controller.setPointerChecker(e.containsPoint),Qr(h,"dispatchAction",e.throttleRate,"fixRate")}function Yl(t){return t.type+"\0_"+t.id}function ql(t){var e=t.getZr();return e[Gx]||(e[Gx]={})}function $l(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Kl(t,e,i,n,r,o,a){Jl(t,function(s){return s.panGetRange(t.controller,e,i,n,r,o,a)})}function Ql(t,e,i,n){Jl(t,function(r){return r.zoomGetRange(t.controller,e,i,n)})}function Jl(t,e){var i=[];d(t.dataZoomInfos,function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})}),t.dispatchAction(i)}function th(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function eh(t,e){Xx[t]=e}function ih(t){return Xx[t]}function nh(t){this.model=t}function rh(t){this.model=t}function oh(t){var e,i,n,r,o,a,s=(e={},i=[],n=[],t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n});return{value:g([(o=s.seriesGroupByCategoryAxis,a=[],d(o,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,r=[" "].concat(f(t.series,function(t){return t.name})),o=[i.model.getCategories()];d(t.series,function(t){o.push(t.getRawData().mapArray(n,function(t){return t}))});for(var s=[r.join(e_)],l=0;l<o[0].length;l++){for(var h=[],u=0;u<o.length;u++)h.push(o[u][l]);s.push(h.join(e_))}a.push(s.join("\n"))}),a.join("\n\n"+t_+"\n\n")),(r=s.other,f(r,function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,function(){for(var t=arguments.length,r=arguments[t-1],o=e.getName(r),a=0;a<t-1;a++)n[a]=arguments[a];i.push((o?o+e_:"")+n.join(e_))}),i.join("\n")}).join("\n\n"+t_+"\n\n"))],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+t_+"\n\n"),meta:s.meta}}function ah(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function sh(t,e){var i={series:[]};return d(t.split(new RegExp("\n*"+t_+"\n*","g")),function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(e_)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),i=[],n=f(ah(e.shift()).split(i_),function(t){return{name:t,data:[]}}),r=0;r<e.length;r++){var o=ah(e[r]).split(i_);i.push(o.shift());for(var a=0;a<o.length;a++)n[a]&&(n[a].data[r]=o[a])}return{series:n,categories:i}}(t),o=e[n],a=o.axisDim+"Axis";o&&(i[a]=i[a]||[],i[a][o.axisIndex]={data:r.categories},i.series=i.series.concat(r.series))}else r=function(t){for(var e=t.split(/\n+/g),i=ah(e.shift()),n=[],r=0;r<e.length;r++){var o,a=ah(e[r]).split(i_),s="",l=!1;isNaN(a[0])?(l=!0,s=a[0],a=a.slice(1),n[r]={name:s,value:[]},o=n[r].value):o=n[r]=[];for(var h=0;h<a.length;h++)o.push(+a[h]);1===o.length&&(l?n[r].value=o[0]:n[r]=o[0])}return{name:i,data:n}}(t),i.series.push(r)}),i}function lh(t){this._dom=null,this.model=t}function hh(t){Qu.call(this),this._zr=t,this.group=new Ec,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+m_++,this._handlers={},r_(v_,function(t,e){this._handlers[e]=m(t,this)},this)}function uh(t,e){var r,o,a,s=t._zr;t._enableGlobalPan||(r=s,o=d_,a=t._uid,Bl(r)[o]=a),r_(t._handlers,function(t,e){s.on(e,t)}),t._brushType=e.brushType,t._brushOption=n(i(g_),e,!0)}function ch(t){var e,i,n,r,o=t._zr;e=o,i=d_,n=t._uid,(r=Bl(e))[i]===n&&(r[i]=null),r_(t._handlers,function(t,e){o.off(e,t)}),t._brushType=t._brushOption=null}function dh(t,e){var i=y_[e.brushType].createCover(t,e);return i.__brushOption=e,gh(i,e),t.group.add(i),i}function fh(t,e){var i=vh(e);return i.endCreating&&(i.endCreating(t,e),gh(e,e.__brushOption)),e}function ph(t,e){var i=e.__brushOption;vh(e).updateCoverShape(t,e,i.range,i)}function gh(t,e){var i=e.z;null==i&&(i=h_),t.traverse(function(t){t.z=i,t.z2=i})}function mh(t,e){vh(e).updateCommon(t,e),ph(t,e)}function vh(t){return y_[t.__brushOption.brushType]}function yh(t,e,i){var n=t._panels;if(!n)return!0;var r,o=t._transform;return r_(n,function(t){t.isTargetByCursor(e,i,o)&&(r=t)}),r}function xh(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function _h(t){var e=t._covers,i=e.length;return r_(e,function(e){t.group.remove(e)},t),e.length=0,!!i}function wh(t,e){var n=o_(t._covers,function(t){var e=t.__brushOption,n=i(e.range);return{brushType:e.brushType,panelId:e.panelId,range:n}});t.trigger("brush",n,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function bh(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Sh(t,e,i,n){var r=new Ec;return r.add(new Qf({name:"main",style:Ch(i),silent:!0,draggable:!0,cursor:"move",drift:n_(t,e,r,"nswe"),ondragend:n_(wh,e,{isEnd:!0})})),r_(n,function(i){r.add(new Qf({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:n_(t,e,r,i),ondragend:n_(wh,e,{isEnd:!0})}))}),r}function Mh(t,e,i,n){var r=n.brushStyle.lineWidth||0,o=s_(r,c_),a=i[0][0],s=i[1][0],l=a-r/2,h=s-r/2,u=i[0][1],c=i[1][1],d=u-o+r/2,f=c-o+r/2,p=u-a,g=c-s,m=p+r,v=g+r;Th(t,e,"main",a,s,p,g),n.transformable&&(Th(t,e,"w",l,h,o,v),Th(t,e,"e",d,h,o,v),Th(t,e,"n",l,h,m,o),Th(t,e,"s",l,f,m,o),Th(t,e,"nw",l,h,o,o),Th(t,e,"ne",d,h,o,o),Th(t,e,"sw",l,f,o,o),Th(t,e,"se",d,f,o,o))}function Ih(t,e){var i=e.__brushOption,n=i.transformable,r=e.childAt(0);r.useStyle(Ch(i)),r.attr({silent:!n,cursor:n?"move":"default"}),r_(["w","e","n","s","se","sw","ne","nw"],function(i){var r=e.childOfName(i),o=function t(e,i){if(i.length>1)return("e"===(n=[t(e,(i=i.split(""))[0]),t(e,i[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n=Sn({w:"left",e:"right",n:"top",s:"bottom"}[i],(r=e,wn(r.group)));var r;return{left:"w",right:"e",top:"n",bottom:"s"}[n]}(t,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?p_[o]+"-resize":null})})}function Th(t,e,i,n,r,o,a){var s,l,h,u=e.childOfName(i);u&&u.setShape((s=Lh(t,e,[[n,r],[n+o,r+a]]),l=a_(s[0][0],s[1][0]),h=a_(s[0][1],s[1][1]),{x:l,y:h,width:s_(s[0][0],s[1][0])-l,height:s_(s[0][1],s[1][1])-h}))}function Ch(t){return a({strokeNoScale:!0},t.brushStyle)}function Dh(t,e,i,n){var r=[a_(t,i),a_(e,n)],o=[s_(t,i),s_(e,n)];return[[r[0],o[0]],[r[1],o[1]]]}function Ah(t,e,i,n,r,o,a,s){var l=n.__brushOption,h=t(l.range),u=Ph(i,o,a);r_(r.split(""),function(t){var e=f_[t];h[e[0]][e[1]]+=u[e[0]]}),l.range=e(Dh(h[0][0],h[1][0],h[0][1],h[1][1])),mh(i,n),wh(i,{isEnd:!1})}function kh(t,e,i,n,r){var o=e.__brushOption.range,a=Ph(t,i,n);r_(o,function(t){t[0]+=a[0],t[1]+=a[1]}),mh(t,e),wh(t,{isEnd:!1})}function Ph(t,e,i){var n=t.group,r=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function Lh(t,e,n){var r=xh(t,e);return r&&!0!==r?r.clipPath(n,t._transform):i(n)}function Oh(t){var e=t.event;e.preventDefault&&e.preventDefault()}function zh(t,e,i){return t.childOfName("main").contain(e,i)}function Eh(t,e,n,r){var o,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;if(t._track.push(n.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],r=i[0]-n[0],o=i[1]-n[1];return l_(r*r+o*o,.5)>u_}(t)||a){if(s&&!a){"single"===l.brushMode&&_h(t);var h=i(l);h.brushType=Nh(h.brushType,s),h.panelId=!0===s?null:s.panelId,a=t._creatingCover=dh(t,h),t._covers.push(a)}if(a){var u=y_[Nh(t._brushType,s)];a.__brushOption.range=u.getCreatingRange(Lh(t,a,t._track)),r&&(fh(t,a),u.updateCommon(t,a)),ph(t,a),o={isEnd:r}}}else r&&"single"===l.brushMode&&l.removeOnClick&&yh(t,e,n)&&_h(t)&&(o={isEnd:r,removeOnClick:!0});return o}function Nh(t,e){return"auto"===t?e.defaultBrushType:t}function Rh(t){if(this._dragging){Oh(t);var e=Eh(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&wh(this,e)}}function Bh(t){return{createCover:function(e,i){return Sh(n_(Ah,function(e){var i=[e,[0,100]];return t&&i.reverse(),i},function(e){return e[t]}),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=bh(e);return[a_(i[0][t],i[1][t]),s_(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,r){var o,a=xh(e,i);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,o];t&&l.reverse(),Mh(e,i,l,r)},updateCommon:Ih,contain:zh}}function Vh(t,e,i){return t=Fh(t),function(n,r,o){return t.contain(r[0],r[1])&&(a=n,s=i,l=e.getComponentByElement(a.topTarget),h=l&&l.coordinateSystem,!(l&&l!==s&&!x_[l.mainType]&&h&&h.model!==s));var a,s,l,h}}function Fh(t){return Gt.create(t)}function Hh(t,e,i){var n=this._targetInfoList=[],r={},o=Wh(e,t);__(T_,function(t,e){(!i||!i.include||w_(i.include,e)>=0)&&t(o,n,r)})}function Gh(t){return t[0]>t[1]&&t.reverse(),t}function Wh(t,e){return ni(t,e,{includeMainTypes:M_})}function Zh(t,e,i,n){var r=i.getAxis(["x","y"][t]),o=Gh(f([0,1],function(t){return e?r.coordToData(r.toLocalCoord(n[t])):r.toGlobalCoord(r.dataToCoord(n[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}function Uh(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Xh(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function jh(t){var e=t[L_];return e||(e=t[L_]=[{}]),e}function Yh(t,e,i){(this._brushController=new hh(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function qh(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function $h(t,e){t.setIconStatus("back",jh(e).length>1?"emphasis":"normal")}function Kh(t){this.model=t}function Qh(t){return V_(t)}function Jh(t){return parseInt(t,10)}function tu(t,e){(function(){if(!G_&&W_){G_=!0;var t=W_.styleSheets;t.length<31?W_.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}})(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var r=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){r.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}function eu(t){return document.createElementNS(vw,t)}function iu(t){return ww(1e4*t)/1e4}function nu(t){return t<Cw&&t>-Cw}function ru(t,e){e&&ou(t,"transform","matrix("+xw.call(e,",")+")")}function ou(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function au(t,e,i){if(r=e,null!=(o=i?r.textFill:r.fill)&&o!==_w){var n=i?e.textFill:e.fill;n="transparent"===n?_w:n,"none"!==t.getAttribute("clip-path")&&n===_w&&(n="rgba(0, 0, 0, 0.002)"),ou(t,"fill",n),ou(t,"fill-opacity",e.opacity)}else ou(t,"fill",_w);var r,o,a,s;if(a=e,null!=(s=i?a.textStroke:a.stroke)&&s!==_w){var l=i?e.textStroke:e.stroke;ou(t,"stroke",l="transparent"===l?_w:l),ou(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?e.host.getLineScale():1)),ou(t,"paint-order",i?"stroke":"fill"),ou(t,"stroke-opacity",e.opacity),e.lineDash?(ou(t,"stroke-dasharray",e.lineDash.join(",")),ou(t,"stroke-dashoffset",ww(e.lineDashOffset||0))):ou(t,"stroke-dasharray",""),e.lineCap&&ou(t,"stroke-linecap",e.lineCap),e.lineJoin&&ou(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&ou(t,"stroke-miterlimit",e.miterLimit)}else ou(t,"stroke",_w)}function su(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function lu(){}function hu(t,e,i,n){for(var r=0,o=e.length,a=0,s=0;r<o;r++){var l=e[r];if(l.removed){for(var h=[],u=s;u<s+l.count;u++)h.push(u);l.indices=h,s+=l.count}else{for(h=[],u=a;u<a+l.count;u++)h.push(u);l.indices=h,a+=l.count,l.added||(s+=l.count)}}return e}function uu(t,e,i,n,r){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=r||"_dom",this.nextId=0}function cu(t,e){uu.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function du(t,e){uu.call(this,t,e,"clipPath","__clippath_in_use__")}function fu(t,e){uu.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function pu(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function gu(t){return parseInt(t,10)}function mu(t,e){return e&&t&&e.parentNode!==t}function vu(t,e,i){if(mu(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function yu(t,e){if(mu(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function xu(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function _u(t){return t.__textSvgEl}function wu(t){return t.__svgEl}var bu,Su,Mu,Iu,Tu,Cu,Du=2311,Au=function(){return Du++},ku="undefined"!=typeof wx?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0}:(bu=navigator.userAgent,Su={},Mu=bu.match(/Firefox\/([\d.]+)/),Iu=bu.match(/MSIE\s([\d.]+)/)||bu.match(/Trident\/.+?rv:(([\d.]+))/),Tu=bu.match(/Edge\/([\d.]+)/),Cu=/micromessenger/i.test(bu),Mu&&(Su.firefox=!0,Su.version=Mu[1]),Iu&&(Su.ie=!0,Su.version=Iu[1]),Tu&&(Su.edge=!0,Su.version=Tu[1]),Cu&&(Su.weChat=!0),{browser:Su,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!Su.ie&&!Su.edge,pointerEventsSupported:"onpointerdown"in window&&(Su.edge||Su.ie&&Su.version>=11)}),Pu={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Lu={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Ou=Object.prototype.toString,zu=Array.prototype,Eu=zu.forEach,Nu=zu.filter,Ru=zu.slice,Bu=zu.map,Vu=zu.reduce,Fu={},Hu=function(){return Fu.createCanvas()};Fu.createCanvas=function(){return document.createElement("canvas")};var Gu,Wu="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.hasOwnProperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=m(t,e)),this)this.hasOwnProperty(i)&&t(this[i],i)},removeKey:function(t){delete this[t]}};var Zu=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:r,extend:o,defaults:a,createCanvas:Hu,getContext:s,indexOf:l,inherits:h,mixin:u,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,r=t.length;n<r;n++)if(e.call(i,t[n],n,t))return t[n]},bind:m,curry:v,isArray:y,isFunction:x,isString:_,isObject:w,isBuiltInObject:b,isTypedArray:S,isDom:M,eqNaN:I,retrieve:T,retrieve2:C,retrieve3:D,slice:A,normalizeCssArray:k,assert:P,trim:L,setAsPrimitive:O,isPrimitive:z,createHashMap:N,concatArray:function(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i},noop:R}),Uu="undefined"==typeof Float32Array?Array:Float32Array,Xu=Z,ju=U,Yu=Y,qu=q,$u=(Object.freeze||Object)({create:B,copy:V,clone:F,set:function(t,e,i){return t[0]=e,t[1]=i,t},add:H,scaleAndAdd:G,sub:W,len:Z,length:Xu,lenSquare:U,lengthSquare:ju,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:X,normalize:j,distance:Y,dist:Yu,distanceSquare:q,distSquare:qu,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:$,min:K,max:Q});J.prototype={constructor:J,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(tt(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(r,o,t),this.dispatchToElement(tt(e,t),"drag",t.event);var a=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=a,e!==a&&(s&&a!==s&&this.dispatchToElement(tt(s,t),"dragleave",t.event),a&&a!==s&&this.dispatchToElement(tt(a,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(tt(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(tt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Ku=Array.prototype.slice,Qu=function(){this._$handlers={}};Qu.prototype={constructor:Qu,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;r<n[t].length;r++)if(n[t][r].h===e)return this;return n[t].push({h:e,one:!0,ctx:i||this}),this},on:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var r=0;r<n[t].length;r++)if(n[t][r].h===e)return this;return n[t].push({h:e,one:!1,ctx:i||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,o=i[t].length;r<o;r++)i[t][r].h!=e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=Ku.call(e,1));for(var n=this._$handlers[t],r=n.length,o=0;o<r;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,e[1]);break;case 3:n[o].h.call(n[o].ctx,e[1],e[2]);break;default:n[o].h.apply(n[o].ctx,e)}n[o].one?(n.splice(o,1),r--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=Ku.call(e,1,e.length-1));for(var n=e[e.length-1],r=this._$handlers[t],o=r.length,a=0;a<o;){switch(i){case 1:r[a].h.call(n);break;case 2:r[a].h.call(n,e[1]);break;case 3:r[a].h.call(n,e[1],e[2]);break;default:r[a].h.apply(n,e)}r[a].one?(r.splice(a,1),o--):a++}}return this}};var Ju="silent";et.prototype.dispose=function(){};var tc=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ec=function(t,e,i,n){Qu.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new et,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,J.call(this),this.setHandlerProxy(i)};ec.prototype={constructor:ec,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(d(tc,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,r=n.target;r&&!r.__zr&&(r=(n=this.findHover(n.x,n.y)).target);var o=this._hovered=this.findHover(e,i),a=o.target,s=this.proxy;s.setCursor&&s.setCursor(a?a.cursor:"default"),r&&a!==r&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(o,"mousemove",t),a&&a!==r&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!=i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n,r,o=(t=t||{}).target;if(!o||!o.silent){for(var a="on"+e,s={type:e,event:r=i,target:(n=t).target,topTarget:n.topTarget,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which};o&&(o[a]&&(s.cancelBubble=o[a].call(o,s)),o.trigger(e,s),o=o.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,s),t.trigger&&t.trigger(e,s)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},o=n.length-1;o>=0;o--){var a;if(n[o]!==i&&!n[o].ignore&&(a=it(n[o],t,e))&&(!r.topTarget&&(r.topTarget=n[o]),a!==Ju)){r.target=n[o];break}}return r}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ec.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Yu(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),u(ec,Qu),u(ec,J);var ic="undefined"==typeof Float32Array?Array:Float32Array,nc=(Object.freeze||Object)({create:nt,identity:rt,copy:ot,mul:at,translate:st,rotate:lt,scale:ht,invert:ut,clone:function(t){var e=nt();return ot(e,t),e}}),rc=rt,oc=5e-5,ac=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},sc=ac.prototype;sc.transform=null,sc.needLocalTransform=function(){return ct(this.rotation)||ct(this.position[0])||ct(this.position[1])||ct(this.scale[0]-1)||ct(this.scale[1]-1)},sc.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||nt(),i?this.getLocalTransform(n):rc(n),e&&(i?at(n,t.transform,n):ot(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||nt(),ut(this.invTransform,n)):n&&rc(n)},sc.getLocalTransform=function(t){return ac.getLocalTransform(this,t)},sc.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},sc.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var lc=[];sc.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(at(lc,t.invTransform,e),e=lc);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=this.position,o=this.scale;ct(i-1)&&(i=Math.sqrt(i)),ct(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),r[0]=e[4],r[1]=e[5],o[0]=i,o[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},sc.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},sc.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&$(i,i,n),i},sc.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&$(i,i,n),i},ac.getLocalTransform=function(t,e){rc(e=e||[]);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ht(e,e,n),r&<(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var hc={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-hc.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*hc.bounceIn(2*t):.5*hc.bounceOut(2*t-1)+.5}};dt.prototype={constructor:dt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?hc[n]:n,o="function"==typeof r?r(i):i;return this.fire("frame",o),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var uc=function(){this.head=null,this.tail=null,this._len=0},cc=uc.prototype;cc.insert=function(t){var e=new dc(t);return this.insertEntry(e),e},cc.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},cc.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},cc.len=function(){return this._len},cc.clear=function(){this.head=this.tail=null,this._len=0};var dc=function(t){this.value=t,this.next,this.prev},fc=function(t){this._list=new uc,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},pc=fc.prototype;pc.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new dc(e),a.key=t,i.insertEntry(a),n[t]=a}return r},pc.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},pc.clear=function(){this._list.clear(),this._map={}};var gc={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},mc=new fc(20),vc=null,yc=Tt,xc=Ct,_c=(Object.freeze||Object)({parse:bt,lift:Mt,toHex:It,fastLerp:Tt,fastMapToColor:yc,lerp:Ct,mapToColor:xc,modifyHSL:function(t,e,i,n){if(t=bt(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(n,r,o),s=Math.max(n,r,o),l=s-a,h=(s+a)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+a):l/(2-s-a);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:o===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(t[1]=mt(i)),null!=n&&(t[2]=mt(n)),At(St(t),"rgba");var r},modifyAlpha:Dt,stringify:At}),wc=Array.prototype.slice,bc=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||kt,this._setter=n||Pt,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};bc.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:Vt(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;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,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0;for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var a=Ht(this,t,function(){--r||n._doneCallback()},this._tracks[o],o,e);a&&(this._clipList.push(a),r++,this.animation&&this.animation.addClip(a),i=a)}if(i){var s=i.onframe;i.onframe=function(t,e){s(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var r=e[n];t&&r.onframe(this._target,1),i&&i.removeClip(r)}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 Sc=1;"undefined"!=typeof window&&(Sc=Math.max(window.devicePixelRatio||1,1));var Mc=Sc,Ic=function(){},Tc=function(){this.animators=[]};Tc.prototype={constructor:Tc,animate:function(t,e){var i,n=!1,r=this,o=this.__zr;if(t){var a=t.split("."),s=r;n="shape"===a[0];for(var h=0,u=a.length;h<u;h++)s&&(s=s[a[h]]);s&&(i=s)}else i=r;if(i){var c=r.animators,d=new bc(i,e);return d.during(function(t){r.dirty(n)}).done(function(){c.splice(l(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d}Ic('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,o){_(i)?(r=n,n=i,i=0):x(n)?(r=n,n="linear",i=0):x(i)?(r=i,i=0):x(e)?(r=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var a=this.animators.slice(),s=a.length;s||r&&r();for(var l=0;l<a.length;l++)a[l].done(function(){--s||r&&r()}).start(n,o)},_animateToShallow:function(t,e,i,n,r){var o={},a=0;for(var s in i)if(i.hasOwnProperty(s))if(null!=e[s])w(i[s])&&!c(i[s])?this._animateToShallow(t?t+"."+s:s,e[s],i[s],n,r):(o[s]=i[s],a++);else if(null!=i[s])if(t){var l={};l[t]={},l[t][s]=i[s],this.attr(l)}else this.attr(s,i[s]);return a>0&&this.animate(t,!1).when(null==n?500:n,o).delay(r||0),this}};var Cc=function(t){ac.call(this,t),Qu.call(this,t),Tc.call(this,t),this.id=t.id||Au()};Cc.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(w(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},u(Cc,Tc),u(Cc,ac),u(Cc,Qu);var Dc,Ac,kc,Pc,Lc=$,Oc=Math.min,zc=Math.max;Gt.prototype={constructor:Gt,union:function(t){var e=Oc(t.x,this.x),i=Oc(t.y,this.y);this.width=zc(t.x+t.width,this.x+this.width)-e,this.height=zc(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(Dc=[],Ac=[],kc=[],Pc=[],function(t){if(t){Dc[0]=kc[0]=this.x,Dc[1]=Pc[1]=this.y,Ac[0]=Pc[0]=this.x+this.width,Ac[1]=kc[1]=this.y+this.height,Lc(Dc,Dc,t),Lc(Ac,Ac,t),Lc(kc,kc,t),Lc(Pc,Pc,t),this.x=Oc(Dc[0],Ac[0],kc[0],Pc[0]),this.y=Oc(Dc[1],Ac[1],kc[1],Pc[1]);var e=zc(Dc[0],Ac[0],kc[0],Pc[0]),i=zc(Dc[1],Ac[1],kc[1],Pc[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=nt();return st(n,n,[-this.x,-this.y]),ht(n,n,[e,i]),st(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Gt||(t=Gt.create(t));var e=this.x,i=this.x+this.width,n=this.y,r=this.y+this.height,o=t.x,a=t.x+t.width,s=t.y,l=t.y+t.height;return!(i<o||a<e||r<s||l<n)},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 Gt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Gt.create=function(t){return new Gt(t.x,t.y,t.width,t.height)};var Ec=function(t){for(var e in t=t||{},Cc.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ec.prototype={constructor:Ec,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},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){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ec&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=l(n,t);return r<0?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ec&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof Ec&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var r=i[n];t.call(e,r,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof Ec&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof Ec&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Gt(0,0,0,0),n=t||this._children,r=[],o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},h(Ec,Cc);var Nc=32,Rc=7,Bc=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Bc.prototype={constructor:Bc,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].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,i=this._displayList,n=0,r=e.length;n<r;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,ku.canvasSupported&&Yt(i,qt)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),o=r,r=r.clipPath}if(t.isGroup){for(var a=t._children,s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Ec&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(i=0;i<this._roots.length;i++){var e=this._roots[i];e instanceof Ec&&e.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array)for(var i=0,n=t.length;i<n;i++)this.delRoot(t[i]);else{var r=l(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof Ec&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:qt};var Vc={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Fc=function(t,e,i){return Vc.hasOwnProperty(e)?i*=t.dpr:i},Hc=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Gc=function(t,e){this.extendFrom(t,!1),this.host=e};Gc.prototype={constructor:Gc,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,r=i&&i.style,o=!r,a=0;a<Hc.length;a++){var s=Hc[a],l=s[0];(o||n[l]!==r[l])&&(t[l]=Fc(t,l,n[l]||s[1]))}if((o||n.fill!==r.fill)&&(t.fillStyle=n.fill),(o||n.stroke!==r.stroke)&&(t.strokeStyle=n.stroke),(o||n.opacity!==r.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(o||n.blend!==r.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var h=n.lineWidth;t.lineWidth=h/(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&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?function(t,e,i){var n=i.width,r=i.height,o=Math.min(n,r),a=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(a=a*n+i.x,s=s*r+i.y,l*=o),t.createRadialGradient(a,s,0,a,s,l)}:function(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,r=r*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,o=isNaN(o)?0:o,a=isNaN(a)?0:a,t.createLinearGradient(n,o,r,a)})(t,e,i),r=e.colorStops,o=0;o<r.length;o++)n.addColorStop(r[o].offset,r[o].color);return n}};for(var Wc=Gc.prototype,Zc=0;Zc<Hc.length;Zc++){var Uc=Hc[Zc];Uc[0]in Wc||(Wc[Uc[0]]=Uc[1])}Gc.getGradient=Wc.getGradient;var Xc=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Xc.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var jc=function(t,e,i){var n;i=i||Mc,"string"==typeof t?n=Kt(t,e,i):w(t)&&(t=(n=t).id),this.id=t,this.dom=n;var r=n.style;r&&(n.onselectstart=$t,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["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=i};jc.prototype={constructor:jc,__dirty:!0,__used:!1,__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=Kt("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),n.width=t*i,n.height=e*i,o&&(o.width=t*i,o.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,r=this.ctx,o=n.width,a=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,h=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,o/h,a/h)),r.clearRect(0,0,o,a),e&&"transparent"!==e)&&(e.colorStops?(i=e.__canvasGradient||Gc.getGradient(r,e,{x:0,y:0,width:o,height:a}),e.__canvasGradient=i):e.image&&(i=Xc.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=i||e,r.fillRect(0,0,o,a),r.restore());if(s){var u=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(u,0,0,o,a),r.restore()}}};var Yc="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},qc=new fc(50),$c={},Kc=0,Qc=5e3,Jc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,td="12px sans-serif",ed={measureText:function(t,e){var i=s();return i.font=e||td,i.measureText(t)}},id={left:1,right:1,center:1},nd={top:1,bottom:1,middle:1},rd=new Gt,od=function(){};od.prototype={constructor:od,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&ve(i);var n=i.text;if(null!=n&&(n+=""),Pe(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(rd.copy(e),rd.applyTransform(r),e=rd),xe(this,t,n,i,e),t.restore()}}},Le.prototype={constructor:Le,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,inplace:!1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Cc.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 Gc(t,this),this.dirty(!1),this}},h(Le,Cc),u(Le,od),Oe.prototype={constructor:Oe,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=Jt(n,this._image,this,this.onload);if(r&&ee(r)){var o=i.x||0,a=i.y||0,s=i.width,l=i.height,h=r.width/r.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(r,u,c,i.sWidth,i.sHeight,o,a,s,l)}else if(i.sx&&i.sy){var d=s-(u=i.sx),f=l-(c=i.sy);t.drawImage(r,u,c,d,f,o,a,s,l)}else t.drawImage(r,o,a,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Gt(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},h(Oe,Le);var ad=new Gt(0,0,0,0),sd=new Gt(0,0,0,0),ld=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=o({},i||{}),this.dpr=i.devicePixelRatio||Mc,this._singleCanvas=n,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a,s,l,h=this._zlevelList=[],u=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var c=t.width,d=t.height;null!=i.width&&(c=i.width),null!=i.height&&(d=i.height),this.dpr=i.devicePixelRatio||1,t.width=c*this.dpr,t.height=d*this.dpr,this._width=c,this._height=d;var f=new jc(t,this,this.dpr);f.__builtin__=!0,f.initContext(),u[314159]=f,h.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var p=this._domRoot=(a=this._width,s=this._height,(l=document.createElement("div")).style.cssText=["position:relative","overflow:hidden","width:"+a+"px","height:"+s+"px","padding:0","margin:0","border-width:0"].join(";")+";",l);t.appendChild(p)}this._hoverlayer=null,this._hoverElements=[]};ld.prototype={constructor:ld,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),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var r=i[n],o=this._layers[r];if(!o.__builtin__&&o.refresh){var a=0===n?this._backgroundColor:null;o.refresh(a)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape});i.__from=t,t.__hoverMir=i,i.setStyle(e),this._hoverElements.push(i)}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=l(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Yt(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var r=0;r<e;){var o=t[r],a=o.__from;a&&a.__zr?(r++,a.invisible||(o.transform=a.transform,o.invTransform=a.invTransform,o.__clipPaths=a.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(r,1),a.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var r=this;Yc(function(){r._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var o=!0,a=0;a<i.length;a++){var s=i[a],l=s.ctx,h={};l.save();var u=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,f=c&&Date.now(),p=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,p);else if(u===s.__startIndex){var g=t[u];g.incremental&&g.notClear&&!e||s.clear(!1,p)}-1===u&&(console.error("For some unknown reason. drawIndex is -1"),u=s.__startIndex);for(var m=u;m<s.__endIndex;m++){var v=t[m];if(this._doPaintEl(v,s,e,h),v.__dirty=!1,c&&Date.now()-f>15)break}s.__drawIndex=m,s.__drawIndex<s.__endIndex&&(o=!1),h.prevElClipPaths&&l.restore(),l.restore()}return ku.wxa&&d(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,i,n){var r,o,a,s=e.ctx,l=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!l||l[0]||l[3])&&(!t.culling||(r=t,o=this._width,a=this._height,ad.copy(r.getBoundingRect()),r.transform&&ad.applyTransform(r.transform),sd.width=o,sd.height=a,ad.intersect(sd)))){var h=t.__clipPaths;n.prevElClipPaths&&!function(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}(h,n.prevElClipPaths)||(n.prevElClipPaths&&(e.ctx.restore(),n.prevElClipPaths=null,n.prevEl=null),h&&(s.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(h,s),n.prevElClipPaths=h)),t.beforeBrush&&t.beforeBrush(s),t.brush(s,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(s)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new jc("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&n(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i,n=this._layers,r=this._zlevelList,o=r.length,a=null,s=-1,l=this._domRoot;if(n[t])Ic("ZLevel "+t+" has been used already");else if((i=e)&&(i.__builtin__||"function"==typeof i.resize&&"function"==typeof i.refresh)){if(o>0&&t>r[0]){for(s=0;s<o-1&&!(r[s]<t&&r[s+1]>t);s++);a=n[r[s]]}if(r.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var h=a.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom)}else Ic("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,r,o=this._zlevelList;for(r=0;r<o.length;r++)n=o[r],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,r,o=this._zlevelList;for(r=0;r<o.length;r++)n=o[r],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(r=1;r<t.length;r++)if((a=t[r]).zlevel!==t[r-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}for(var i=null,n=0,r=0;r<t.length;r++){var o,a=t[r],s=a.zlevel;a.incremental?((o=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,n=1):o=this.getLayer(s+(n>0?.01:0),this._needsManuallyCompositing),o.__builtin__||Ic("ZLevel "+s+" has been used by unkown layer "+o.id),o!==i&&(o.__used=!0,o.__startIndex!==r&&(o.__dirty=!0),o.__startIndex=r,o.incremental?o.__drawIndex=-1:o.__drawIndex=r,e(r),i=o),a.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var r=0;r<this._zlevelList.length;r++){var o=this._zlevelList[r];o!==t&&o!==t+.01||n(this._layers[o],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(l(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!=t||e!=this._height){for(var r in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);d(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}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 jc("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var o={},a=this.storage.getDisplayList(!0),s=0;s<a.length;s++){var l=a[s];this._doPaintEl(l,e,!0,o)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||ze(s[i])||ze(a.style[i]))-(ze(s[r])||0)-(ze(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),r=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,l=o.shadowOffsetY*e,h=o.hasStroke()?o.lineWidth:0,u=Math.max(h/2,-s+a),c=Math.max(h/2,s+a),d=Math.max(h/2,-l+a),f=Math.max(h/2,l+a),p=r.width+u+c,g=r.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new Oe({style:{x:0,y:0,image:i}});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}};var hd="undefined"!=typeof window&&!!window.addEventListener,ud=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,cd=hd?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},dd=function(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,Qu.call(this)};dd.prototype={constructor:dd,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=l(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,r=[],o=[],a=0;a<n;a++){var s=i[a],l=s.step(t,e);l&&(r.push(l),o.push(s))}for(a=0;a<n;)i[a]._needsRemove?(i[a]=i[n-1],i.pop(),n--):a++;for(n=r.length,a=0;a<n;a++)o[a].fire(r[a]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,Yc(function e(){t._running&&(Yc(e),!t._paused&&t._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 i=new bc(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},u(dd,Qu);var fd=function(){this._track=[]};fd.prototype={constructor:fd,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},o=0,a=n.length;o<a;o++){var s=n[o],l=Ee(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in pd)if(pd.hasOwnProperty(e)){var i=pd[e](this._track,t);if(i)return i}}};var pd={pinch:function(t,e){var i,n=t.length;if(n){var r=(t[n-1]||{}).points,o=(t[n-2]||{}).points||r;if(o&&o.length>1&&r&&r.length>1){var a=Fe(r)/Fe(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},gd=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],md=["touchstart","touchend","touchmove"],vd={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},yd=f(gd,function(t){var e=t.replace("mouse","pointer");return vd[e]?e:t}),xd={mousemove:function(t){t=Re(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Re(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Re(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Ge(this,t,"start"),xd.mousemove.call(this,t),xd.mousedown.call(this,t),We(this)},touchmove:function(t){(t=Re(this.dom,t)).zrByTouch=!0,Ge(this,t,"change"),xd.mousemove.call(this,t),We(this)},touchend:function(t){(t=Re(this.dom,t)).zrByTouch=!0,Ge(this,t,"end"),xd.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&xd.click.call(this,t),We(this)},pointerdown:function(t){xd.mousedown.call(this,t)},pointermove:function(t){Ze(t)||xd.mousemove.call(this,t)},pointerup:function(t){xd.mouseup.call(this,t)},pointerout:function(t){Ze(t)||xd.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){xd[t]=function(e){e=Re(this.dom,e),this.trigger(t,e)}});var _d=Ue.prototype;_d.dispose=function(){for(var t=gd.concat(md),e=0;e<t.length;e++){var i=t[e];n=this.dom,r=He(i),o=this._handlers[i],hd?n.removeEventListener(r,o):n.detachEvent("on"+r,o)}var n,r,o},_d.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},u(Ue,Qu);var wd=!ku.canvasSupported,bd={canvas:ld},Sd={},Md=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,r=new Bc,o=i.renderer;if(wd){if(!bd.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&bd[o]||(o="canvas");var a=new bd[o](e,r,i,t);this.storage=r,this.painter=a;var s=ku.node||ku.worker?null:new Ue(a.getViewportRoot());this.handler=new ec(r,a,s,a.root),this.animation=new dd({stage:{update:m(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,h=r.addToStorage;r.delFromStorage=function(t){l.call(r,t),t&&t.removeSelfFromZr(n)},r.addToStorage=function(t){h.call(r,t),t.addSelfToZr(n)}};Md.prototype={constructor:Md,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){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},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,i){this.handler.on(t,e,i)},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 Sd[t]}};var Id=(Object.freeze||Object)({version:"4.0.3",init:Xe,dispose:function(t){if(t)t.dispose();else{for(var e in Sd)Sd.hasOwnProperty(e)&&Sd[e].dispose();Sd={}}return this},getInstance:function(t){return Sd[t]},registerPainter:je}),Td=d,Cd=w,Dd=y,Ad="series\0",kd=["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"],Pd=0,Ld=".",Od="___EC__COMPONENT__CONTAINER___",zd=0,Ed=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var r={},o=0;o<t.length;o++){var a=t[o][1];if(!(i&&l(i,a)>=0||n&&l(n,a)<0)){var s=e.getShallow(a);null!=s&&(r[t[o][0]]=s)}}return r}},Nd=Ed([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Rd={getLineStyle:function(t){var e=Nd(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},Bd=Ed([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Vd={getAreaStyle:function(t,e){return Bd(this,t,e)}},Fd=Math.pow,Hd=Math.sqrt,Gd=1e-8,Wd=1e-4,Zd=Hd(3),Ud=1/3,Xd=B(),jd=B(),Yd=B(),qd=Math.min,$d=Math.max,Kd=Math.sin,Qd=Math.cos,Jd=2*Math.PI,tf=B(),ef=B(),nf=B(),rf=[],of=[],af={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},sf=[],lf=[],hf=[],uf=[],cf=Math.min,df=Math.max,ff=Math.cos,pf=Math.sin,gf=Math.sqrt,mf=Math.abs,vf="undefined"!=typeof Float32Array,yf=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};yf.prototype={constructor:yf,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=mf(1/Mc/t)||0,this._uy=mf(1/Mc/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(af.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=mf(t-this._xi)>this._ux||mf(e-this._yi)>this._uy||this._len<5;return this.addData(af.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,o){return this.addData(af.C,t,e,i,n,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,o):this._ctx.bezierCurveTo(t,e,i,n,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(af.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,o){return this.addData(af.A,t,e,i,i,n,r-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,o),this._xi=ff(r)*i+t,this._yi=pf(r)*i+t,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(af.R,t,e,i,n),this},closePath:function(){this.addData(af.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];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||!vf||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;r<e;r++)i+=t[r].len();for(vf&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i)),r=0;r<e;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[n++]=o[a];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];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 i,n,r=this._dashSum,o=this._dashOffset,a=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=gf(u*u+c*c),f=l,p=h,g=a.length;for(u/=d,c/=d,o<0&&(o=r+o),f-=(o%=r)*u,p-=o*c;u>0&&f<=t||u<0&&f>=t||0==u&&(c>0&&p<=e||c<0&&p>=e);)f+=u*(i=a[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,u>0&&f<l||u<0&&f>l||c>0&&p<h||c<0&&p>h||s[n%2?"moveTo":"lineTo"](u>=0?cf(f,t):df(f,t),c>=0?cf(p,e):df(p,e));u=f-t,c=p-e,this._dashOffset=-gf(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,r,o){var a,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=pi,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,a=0;a<1;a+=.1)s=v(g,t,i,r,a+.1)-v(g,t,i,r,a),l=v(m,e,n,o,a+.1)-v(m,e,n,o,a),y+=gf(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(a=(w-d)/y;a<=1;)h=v(g,t,i,r,a),u=v(m,e,n,o,a),x%2?p.moveTo(h,u):p.lineTo(h,u),a+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,o),s=r-h,l=o-u,this._dashOffset=-gf(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,vf&&(this.data=new Float32Array(t)))},getBoundingRect:function(){sf[0]=sf[1]=hf[0]=hf[1]=Number.MAX_VALUE,lf[0]=lf[1]=uf[0]=uf[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,o=0;o<t.length;){var a=t[o++];switch(1==o&&(n=e=t[o],r=i=t[o+1]),a){case af.M:e=n=t[o++],i=r=t[o++],hf[0]=n,hf[1]=r,uf[0]=n,uf[1]=r;break;case af.L:Si(e,i,t[o],t[o+1],hf,uf),e=t[o++],i=t[o++];break;case af.C:Mi(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],hf,uf),e=t[o++],i=t[o++];break;case af.Q:p=e,g=i,m=t[o++],v=t[o++],y=t[o],x=t[o+1],_=hf,w=uf,b=void 0,S=void 0,void 0,void 0,void 0,void 0,S=yi,M=$d(qd((b=_i)(p,m,y),1),0),I=$d(qd(b(g,v,x),1),0),T=S(p,m,y,M),C=S(g,v,x,I),_[0]=qd(p,y,T),_[1]=qd(g,x,C),w[0]=$d(p,y,T),w[1]=$d(g,x,C),e=t[o++],i=t[o++];break;case af.A:var s=t[o++],l=t[o++],h=t[o++],u=t[o++],c=t[o++],d=t[o++]+c,f=(t[o++],1-t[o++]);1==o&&(n=ff(c)*h+s,r=pf(c)*u+l),Ii(s,l,h,u,c,d,f,hf,uf),e=ff(d)*h+s,i=pf(d)*u+l;break;case af.R:Si(n=e=t[o++],r=i=t[o++],n+t[o++],r+t[o++],hf,uf);break;case af.Z:e=n,i=r}K(sf,sf,hf),Q(lf,lf,uf)}var p,g,m,v,y,x,_,w,b,S,M,I,T,C;return 0===o&&(sf[0]=sf[1]=lf[0]=lf[1]=0),new Gt(sf[0],sf[1],lf[0]-sf[0],lf[1]-sf[1])},rebuildPath:function(t){for(var e,i,n,r,o,a,s=this.data,l=this._ux,h=this._uy,u=this._len,c=0;c<u;){var d=s[c++];switch(1==c&&(e=n=s[c],i=r=s[c+1]),d){case af.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case af.L:o=s[c++],a=s[c++],(mf(o-n)>l||mf(a-r)>h||c===u-1)&&(t.lineTo(o,a),n=o,r=a);break;case af.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case af.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case af.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1==c&&(e=ff(v)*g+f,i=pf(v)*m+p),n=ff(M)*g+f,r=pf(M)*m+p;break;case af.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case af.Z:t.closePath(),n=e,r=i}}}},yf.CMD=af;var xf=2*Math.PI,_f=2*Math.PI,wf=yf.CMD,bf=2*Math.PI,Sf=1e-4,Mf=[-1,-1,-1],If=[-1,-1],Tf=Xc.prototype.getCanvasPattern,Cf=Math.abs,Df=new yf(!0);Ni.prototype={constructor:Ni,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,r=this.path||Df,o=n.hasStroke(),a=n.hasFill(),s=n.fill,l=n.stroke,h=a&&!!s.colorStops,u=o&&!!l.colorStops,c=a&&!!s.image,d=o&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Tf.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Tf.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();r.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&r.fill(t),f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o&&r.stroke(t),f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new yf},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new yf),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var o=e.lineWidth,a=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),a>1e-10&&(r.width+=o/a,r.height+=o/a,r.x-=o/a/2,r.y-=o/a/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(r.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),Ei(o,a/s,!0,t,e)))return!0}if(r.hasFill())return Ei(o,0,!1,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Le.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Cf(t[0]-1)>1e-10&&Cf(t[3]-1)>1e-10?Math.sqrt(Cf(t[0]*t[3]-t[2]*t[1])):1}},Ni.extend=function(t){var e=function(e){Ni.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};for(var i in h(e,Ni),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(Ni,Le);var Af=yf.CMD,kf=[[],[],[]],Pf=Math.sqrt,Lf=Math.atan2,Of=function(t,e){var i,n,r,o,a,s,l=t.data,h=Af.M,u=Af.C,c=Af.L,d=Af.R,f=Af.A,p=Af.Q;for(r=0,o=0;r<l.length;){switch(i=l[r++],o=r,n=0,i){case h:case c:n=1;break;case u:n=3;break;case p:n=2;break;case f:var g=e[4],m=e[5],v=Pf(e[0]*e[0]+e[1]*e[1]),y=Pf(e[2]*e[2]+e[3]*e[3]),x=Lf(-e[1]/y,e[0]/v);l[r]*=v,l[r++]+=g,l[r]*=y,l[r++]+=m,l[r++]*=v,l[r++]*=y,l[r++]+=x,l[r++]+=x,o=r+=2;break;case d:s[0]=l[r++],s[1]=l[r++],$(s,s,e),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],$(s,s,e),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<n;a++)(s=kf[a])[0]=l[r++],s[1]=l[r++],$(s,s,e),l[o++]=s[0],l[o++]=s[1]}},zf=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],Ef=Math.sqrt,Nf=Math.sin,Rf=Math.cos,Bf=Math.PI,Vf=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Ff=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Vf(t)*Vf(e))},Hf=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Ff(t,e))},Gf=function(t){Le.call(this,t)};Gf.prototype={constructor:Gf,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&ve(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),i.bind(t,this,e),Pe(n,i)&&(this.setTransform(t),xe(this,t,n,i),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&ve(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=ne(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Ce(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},h(Gf,Le);var Wf=Ni.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Zf=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Uf=function(t){return ku.browser.ie&&ku.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var r=0;r<i.length;r++){var o=i[r],a=o&&o.shape,s=o&&o.type;if(a&&("sector"===s&&a.startAngle===a.endAngle||"rect"===s&&(!a.width||!a.height))){for(l=0;l<Zf.length;l++)Zf[l][2]=n[Zf[l][0]],n[Zf[l][0]]=Zf[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(var l=0;l<Zf.length;l++)n[Zf[l][0]]=Zf[l][2]}:t},Xf=Ni.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Uf(Ni.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(a),u=Math.sin(a);t.moveTo(h*r+i,u*r+n),t.lineTo(h*o+i,u*o+n),t.arc(i,n,o,a,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,a,l),t.closePath()}}),jf=Ni.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}}),Yf=function(t,e){for(var i=t.length,n=[],r=0,o=1;o<i;o++)r+=Y(t[o-1],t[o]);var a=r/2;for(a=a<i?i:a,o=0;o<a;o++){var s,l,h,u=o/(a-1)*(e?i:i-1),c=Math.floor(u),d=u-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Vi(s[0],f[0],l[0],h[0],d,p,g),Vi(s[1],f[1],l[1],h[1],d,p,g)])}return n},qf=function(t,e,i,n){var r,o,a,s,l=[],h=[],u=[],c=[];if(n){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)K(a,a,t[d]),Q(s,s,t[d]);K(a,a,n[0]),Q(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)r=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(F(t[d]));continue}r=t[d-1],o=t[d+1]}W(h,o,r),X(h,h,e);var g=Y(p,r),m=Y(p,o),v=g+m;0!==v&&(g/=v,m/=v),X(u,h,-g),X(c,h,m);var y=H([],p,u),x=H([],p,c);n&&(Q(y,y,a),K(y,y,s),Q(x,x,a),K(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},$f=Ni.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Fi(t,e,!0)}}),Kf=Ni.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Fi(t,e,!1)}}),Qf=Ni.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width,o=e.height;e.r?me(t,e):t.rect(i,n,r,o),t.closePath()}}),Jf=Ni.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.percent;0!==a&&(t.moveTo(i,n),a<1&&(r=i*(1-a)+r*a,o=n*(1-a)+o*a),t.lineTo(r,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),tp=[],ep=Ni.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(u<1&&(wi(i,a,r,u,tp),a=tp[1],r=tp[2],wi(n,s,o,u,tp),s=tp[1],o=tp[2]),t.quadraticCurveTo(a,s,r,o)):(u<1&&(vi(i,a,l,r,u,tp),a=tp[1],l=tp[2],r=tp[3],vi(n,s,h,o,u,tp),s=tp[1],h=tp[2],o=tp[3]),t.bezierCurveTo(a,s,l,h,r,o)))},pointAt:function(t){return Hi(this.shape,t,!1)},tangentAt:function(t){var e=Hi(this.shape,t,!0);return j(e,e)}}),ip=Ni.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,o,a,!s)}}),np=Ni.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].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(),Ni.prototype.getBoundingRect.call(this)}}),rp=function(t){this.colorStops=t||[]};rp.prototype={constructor:rp,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var op=function(t,e,i,n,r,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,rp.call(this,r)};op.prototype={constructor:op},h(op,rp);var ap=function(t,e,i,n,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,rp.call(this,n)};ap.prototype={constructor:ap},h(ap,rp),Gi.prototype.incremental=!0,Gi.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Gi.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Gi.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Gi.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])},Gi.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}},Gi.prototype.brush=function(t,e){for(i=this._cursor;i<this._displayables.length;i++)(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t);this._cursor=i;for(var i=0;i<this._temporaryDisplayables.length;i++){var n=this._temporaryDisplayables[i];n.beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var sp=[];Gi.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Gt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(sp)),t.union(n)}this._rect=t}return this._rect},Gi.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(t,e))return!0;return!1},h(Gi,Le);var lp=Math.round,hp=Math.max,up=Math.min,cp={},dp=(Object.freeze||Object)({extendShape:Wi,extendPath:function(t,e){return i=t,n=e,Ni.extend(Bi(i,n));var i,n},makePath:Zi,makeImage:Ui,mergePath:function(t,e){for(var i=[],n=t.length,r=0;r<n;r++){var o=t[r];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var a=new Ni(e);return a.createPathProxy(),a.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},a},resizePath:ji,subPixelOptimizeLine:Yi,subPixelOptimizeRect:qi,subPixelOptimize:$i,setHoverStyle:un,setLabelStyle:cn,setTextStyle:dn,setText:function(t,e,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,fn(t,e,r,n),t.host&&t.host.dirty&&t.host.dirty(!1)},getFont:vn,updateProps:xn,initProps:_n,getTransform:wn,applyTransform:bn,transformDirection:Sn,groupTransition:Mn,clipPointsByRect:In,clipRectByRect:function(t,e){var i=hp(t.x,e.x),n=up(t.x+t.width,e.x+e.width),r=hp(t.y,e.y),o=up(t.y+t.height,e.y+e.height);if(n>=i&&o>=r)return{x:i,y:r,width:n-i,height:o-r}},createIcon:Tn,Group:Ec,Image:Oe,Text:Gf,Circle:Wf,Sector:Xf,Ring:jf,Polygon:$f,Polyline:Kf,Rect:Qf,Line:Jf,BezierCurve:ep,Arc:ip,IncrementalDisplayable:Gi,CompoundPath:np,LinearGradient:op,RadialGradient:ap,BoundingRect:Gt}),fp=["textStyle","color"],pp={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(fp):null)},getFont:function(){return vn({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ne(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},gp=Ed([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),mp={getItemStyle:function(t,e){var i=gp(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},vp=u,yp=ii();Cn.prototype={constructor:Cn,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:Dn(this.option,this.parsePath(t),!e&&An(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&An(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i;return new Cn(null==t?this.option:Dn(this.option,t=this.parsePath(t)),e=e||(i=An(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){yp(this).getParent=t},isAnimationEnabled:function(){if(!ku.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},si(Cn),li(Cn),vp(Cn,Rd),vp(Cn,Vd),vp(Cn,pp),vp(Cn,mp);var xp,_p,wp=0,bp=1e-4,Sp=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,Mp=(Object.freeze||Object)({linearMap:Pn,parsePercent:Ln,round:On,asc:zn,getPrecision:En,getPrecisionSafe:Nn,getPixelPrecision:Rn,getPercentWithPrecision:Bn,MAX_SAFE_INTEGER:9007199254740991,remRadian:Vn,isRadianAroundZero:Fn,parseDate:Hn,quantity:Gn,nice:Zn,reformIntervals:function(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1});for(var e=-1/0,i=1,n=0;n<t.length;){for(var r=t[n].interval,o=t[n].close,a=0;a<2;a++)r[a]<=e&&(r[a]=e,o[a]=a?1:1-i),e=r[a],i=o[a];r[0]===r[1]&&o[0]*o[1]!=1?t.splice(n,1):n++}return t},isNumeric:function(t){return t-parseFloat(t)>=0}}),Ip=k,Tp=["a","b","c","d","e","f","g"],Cp=function(t,e){return"{"+t+(null==e?"":e)+"}"},Dp=se,Ap=ne,kp=(Object.freeze||Object)({addCommas:Un,toCamelCase:Xn,normalizeCssArray:Ip,encodeHTML:jn,formatTpl:Yn,formatTplSimple:function(t,e,i){return d(e,function(e,n){t=t.replace("{"+n+"}",i?jn(e):e)}),t},getTooltipMarker:qn,formatTime:Kn,capitalFirst:Qn,truncateText:Dp,getTextRect:Ap}),Pp=d,Lp=["left","right","top","bottom","width","height"],Op=[["width","left","right"],["height","top","bottom"]],zp=Jn,Ep=(v(Jn,"vertical"),v(Jn,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),Np=ii(),Rp=Cn.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Cn.call(this,t,e,i,n),this.uid=kn("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,r=i?nr(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&ir(t,r,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&ir(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Np(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var r=i.prototype.defaultOption;r&&e.push(r),i=i.superClass}for(var o={},a=e.length-1;a>=0;a--)o=n(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});ci(Rp,{registerWhenExtend:!0}),_p={},(xp=Rp).registerSubTypeDefaulter=function(t,e){t=ai(t),_p[t.main]=e},xp.determineSubType=function(t,e){var i=e.type;if(!i){var n=ai(t).main;xp.hasSubTypes(t)&&_p[n]&&(i=_p[n](e))}return i},function(t,e){function i(t){var i={},r=[];return d(t,function(o){var a,s,h,u=n(i,o),c=(a=u.originalDeps=e(o),s=t,h=[],d(a,function(t){l(s,t)>=0&&h.push(t)}),h);u.entryCount=c.length,0===u.entryCount&&r.push(o),d(c,function(t){l(u.predecessor,t)<0&&u.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(o)})}),{graph:i,noEntryList:r}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Rp.topologicalTravel=function(t,e,n,r){function o(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var a=i(e),s=a.graph,l=a.noEntryList,h={};for(d(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],f=!!h[u];f&&(n.call(r,u,c.originalDeps.slice()),delete h[u]),d(c.successor,f?function(t){h[t]=!0,o(t)}:o)}d(h,function(){throw new Error("Circle dependency may exists")})}}}(0,function(t){var e=[];return d(Rp.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return ai(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),u(Rp,Ep);var Bp="";"undefined"!=typeof navigator&&(Bp=navigator.platform||"");var Vp={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Bp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Fp=ii(),Hp={clearColorPalette:function(){Fp(this).colorIdx=0,Fp(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Fp(e=e||this),r=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var a=Ye(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):a;if((l=l||a)&&l.length){var h=l[r];return t&&(o[t]=h),n.colorIdx=(r+1)%l.length,h}}},Gp={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",o),ar(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),ar(o)&&(n.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),ar(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",a),ar(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),ar(a)&&(n.set("angle",a),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();d(o.parallelAxisIndex,function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];i.set(l,s),ar(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}},Wp="original",Zp="arrayRows",Up="objectRows",Xp="keyedColumns",jp="unknown",Yp="typedArray",qp="column",$p="row";sr.seriesDataToSource=function(t){return new sr({data:t,sourceFormat:S(t)?Yp:Wp,fromDataset:!1})},li(sr);var Kp=ii(),Qp="\0_ec_inner",Jp=Cn.extend({constructor:Jp,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Cn(i),this._optionManager=n},setOption:function(t,e){P(!(Qp in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):dr.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&d(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,r=this._componentsMap,a=[];Kp(this).datasetMap=N(),d(t,function(t,r){null!=t&&(Rp.hasClass(r)?r&&a.push(r):e[r]=null==e[r]?i(t):n(e[r],t,!0))}),Rp.topologicalTravel(a,Rp.getAllClassMainTypes(),function(i,n){var a=Ye(t[i]),s=Ke(r.get(i),a);Qe(s),d(s,function(t,e){var n,r,o,a=t.option;w(a)&&(t.keyInfo.mainType=i,t.keyInfo.subType=(n=i,r=a,o=t.exist,r.type?r.type:o?o.subType:Rp.determineSubType(n,r)))});var l=function(t,e){y(e)||(e=e?[e]:[]);var i={};return d(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}(r,n);e[i]=[],r.set(i,[]),d(s,function(t,n){var a=t.exist,s=t.option;if(P(w(s)||a,"Empty component definition"),s){var h=Rp.getClass(i,t.keyInfo.subType,!0);if(a&&a instanceof h)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var u=o({dependentModels:l,componentIndex:n},t.keyInfo);o(a=new h(s,this,this,u),u),a.init(s,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);r.get(i)[n]=a,e[i][n]=a.option},this),"series"===i&&fr(this,r.get("series"))},this),this._seriesIndicesMap=N(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(Rp.hasClass(i)){for(var n=(e=Ye(e)).length-1;n>=0;n--)ti(e[n])&&e.splice(n,1);t[i]=e}}),delete t[Qp],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,r=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];if(null!=n)y(n)||(n=[n]),i=g(f(n,function(t){return a[t]}),function(t){return!!t});else if(null!=r){var s=y(r);i=g(a,function(t){return s&&l(r,t.id)>=0||!s&&t.id===r})}else if(null!=o){var h=y(o);i=g(a,function(t){return h&&l(o,t.name)>=0||!h&&t.name===o})}else i=a.slice();return pr(i,t)},findComponents:function(t){var e,i,n,r,o,a=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",r=s+"Name",!(e=a)||null==e[i]&&null==e[n]&&null==e[r]?null:{mainType:s,index:e[i],id:e[n],name:e[r]});return o=pr(l?this.queryComponents(l):this._componentsMap.get(s),t),t.filter?g(o,t.filter):o},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,r){e.call(i,n,t,r)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){fr(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;fr(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),Rp.topologicalTravel(i,Rp.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}(e,t))&&e.restoreData()})})}});u(Jp,Hp);var tg=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],eg={};mr.prototype={constructor:mr,create:function(t,e){var i=[];d(eg,function(n,r){var o=n.create(t,e);i=i.concat(o||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},mr.register=function(t,e){eg[t]=e},mr.get=function(t){return eg[t]};var ig=d,ng=i,rg=f,og=n,ag=/^(min|max)?(.+)$/;vr.prototype={constructor:vr,setOption:function(t,e){t&&d(Ye(t.series),function(t){t&&t.data&&S(t.data)&&O(t.data)}),t=ng(t,!0);var i,n,r=this._optionBackup,o=function(t,e,i){var n,r,o=[],a=[],s=t.timeline;if(t.baseOption&&(r=t.baseOption),(s||t.options)&&(r=r||{},o=(t.options||[]).slice()),t.media){r=r||{};var l=t.media;ig(l,function(t){t&&t.option&&(t.query?a.push(t):n||(n=t))})}return r||(r=t),r.timeline||(r.timeline=s),ig([r].concat(o).concat(f(a,function(t){return t.option})),function(t){ig(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:o,mediaDefault:n,mediaList:a}}.call(this,t,e,!r);this._newBaseOption=o.baseOption,r?(i=r.baseOption,n=o.baseOption,ig(n=n||{},function(t,e){if(null!=t){var n=i[e];if(Rp.hasClass(e)){t=Ye(t);var r=Ke(n=Ye(n),t);i[e]=rg(r,function(t){return t.option&&t.exist?og(t.exist,t.option,!0):t.exist||t.option})}else i[e]=og(n,t,!0)}}),o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=rg(e.timelineOptions,ng),this._mediaList=rg(e.mediaList,ng),this._mediaDefault=ng(e.mediaDefault),this._currentMediaIndices=[],ng(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=ng(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),r=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var h=0,u=o.length;h<u;h++)yr(o[h].query,n,r)&&s.push(h);return!s.length&&a&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,!(e.join(",")===i.join(",")))&&(l=rg(s,function(t){return ng(-1===t?a.option:o[t].option)})),this._currentMediaIndices=s,l}};var sg=d,lg=w,hg=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],ug=function(t,e){sg(Mr(t.series),function(t){lg(t)&&function(t){if(lg(t)){xr(t),wr(t),br(t,"label"),br(t,"upperLabel"),br(t,"edgeLabel"),t.emphasis&&(br(t.emphasis,"label"),br(t.emphasis,"upperLabel"),br(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(xr(e),Sr(e));var i=t.markLine;i&&(xr(i),Sr(i));var n=t.markArea;n&&Sr(n);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!S(o))for(s=0;s<o.length;s++)Sr(o[s]);d(t.categories,function(t){wr(t)})}if(r&&!S(r))for(s=0;s<r.length;s++)Sr(r[s]);if((e=t.markPoint)&&e.data)for(var a=e.data,s=0;s<a.length;s++)Sr(a[s]);if((i=t.markLine)&&i.data){var l=i.data;for(s=0;s<l.length;s++)y(l[s])?(Sr(l[s][0]),Sr(l[s][1])):Sr(l[s])}"gauge"===t.type?(br(t,"axisLabel"),br(t,"title"),br(t,"detail")):"treemap"===t.type&&(_r(t.breadcrumb,"itemStyle"),d(t.levels,function(t){wr(t)}))}}(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),sg(i,function(e){sg(Mr(t[e]),function(t){t&&(br(t,"axisLabel"),br(t.axisPointer,"label"))})}),sg(Mr(t.parallel),function(t){var e=t&&t.parallelAxisDefault;br(e,"axisLabel"),br(e&&e.axisPointer,"label")}),sg(Mr(t.calendar),function(t){_r(t,"itemStyle"),br(t,"dayLabel"),br(t,"monthLabel"),br(t,"yearLabel")}),sg(Mr(t.radar),function(t){br(t,"name")}),sg(Mr(t.geo),function(t){lg(t)&&(Sr(t),sg(Mr(t.regions),function(t){Sr(t)}))}),sg(Mr(t.timeline),function(t){Sr(t),_r(t,"label"),_r(t,"itemStyle"),_r(t,"controlStyle",!0);var e=t.data;y(e)&&d(e,function(t){w(t)&&(_r(t,"label"),_r(t,"itemStyle"))})}),sg(Mr(t.toolbox),function(t){_r(t,"iconStyle"),sg(t.feature,function(t){_r(t,"iconStyle")})}),br(Ir(t.axisPointer),"label"),br(Ir(t.tooltip).axisPointer,"label")},cg=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],dg=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],fg=function(t,e){ug(t,e),t.series=Ye(t.series),d(t.series,function(t){if(w(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var r,o=t,a=0;a<e.length-1;a++)null==o[r=e[a]]&&(o[r]={}),o=o[r];(n||null==o[e[a]])&&(o[e[a]]=i)}(t,"itemStyle.normal.color",i)}Tr(t)}}),t.dataRange&&(t.visualMap=t.dataRange),d(dg,function(e){var i=t[e];i&&(y(i)||(i=[i]),d(i,function(t){Tr(t)}))})},pg=Dr.prototype;pg.pure=!1,pg.persistent=!0,pg.getSource=function(){return this._source};var gg={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Pr},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var r=i[n];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Ar,getItem:kr,appendData:Pr},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=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var r=this._data[i[n].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;d(t,function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])})}},original:{count:Ar,getItem:kr,appendData:Pr},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t){t-=this._offset;for(var e=[],i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}},mg={arrayRows:Lr,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Lr,original:function(t,e,i,n){var r=$e(t);return null!=i&&r instanceof Array?r[i]:r},typedArray:Lr},vg={arrayRows:Or,objectRows:function(t,e,i,n){return zr(t[e],this._dimensionInfos[e])},keyedColumns:Or,original:function(t,e,i,n){var r,o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&(Cd(r=t)&&!(r instanceof Array))&&(this.hasItemOption=!0),zr(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}},yg=/\{@(.+?)\}/g,xg={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),r=i.getRawIndex(t),o=i.getName(t,!0),a=i.getRawDataItem(t),s=i.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:o,dataIndex:r,data:a,dataType:e,value:n,color:s,marker:qn(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,r){e=e||"normal";var o=this.getData(i),a=o.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=a.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?Yn(l,s).replace(yg,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),Er(o,t,i)}):void 0},getRawValue:function(t,e){return Er(this.getData(e),t)},formatTooltip:function(){}},_g=Br.prototype;_g.perform=function(t){var e,i,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context)),(this._dirty||"reset"===e)&&(this._dirty=!1,i=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&(i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),t._progress=i;var r=t._downstream;return r&&r.dirty(),n}(this,r));var a=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var s=this._dueIndex,l=Math.min(null!=a?this._dueIndex+a:1/0,this._dueEnd);!r&&(i||s<l)&&this._progress({start:s,end:l},this.context),this._dueIndex=l;var h=null!=this._settedOutputEnd?this._settedOutputEnd:l;this._outputDueEnd=h}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},_g.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},_g.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},_g.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},_g.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},_g.getUpstream=function(){return this._upstream},_g.getDownstream=function(){return this._downstream},_g.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var wg=ii(),bg=Rp.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Rr({count:Fr,reset:Hr}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),lr(this);var r=this.getInitialData(t,i);Wr(r,this),this.dataTask.context.data=r,wg(this).dataBeforeProcessed=r,Vr(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,r=i?nr(t):{},o=this.subType;Rp.hasClass(o)&&(o+="Series"),n(t,e.getTheme().get(this.subType)),n(t,this.getDefaultOption()),qe(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&ir(t,r,i)},mergeOption:function(t,e){t=n(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&ir(this.option,t,i),lr(this);var r=this.getInitialData(t,e);Wr(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,wg(this).dataBeforeProcessed=r,Vr(this)},fillDataTextStyle:function(t){if(t)for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&qe(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Ur(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return wg(this).data},setData:function(t){var e=Ur(this);if(e){var i=e.context;i.data!==t&&e.isOverallFilter&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}wg(this).data=t},getSource:function(){return Kp(this).source},getRawData:function(){return wg(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i){var n=this.getData(),r=n.mapDimension("defaultedTooltip",!0),o=r.length,a=this.getRawValue(t),s=y(a),l=n.getItemVisual(t,"color");w(l)&&l.colorStops&&(l=(l.colorStops[0]||{}).color),l=l||"transparent";var h=o>1||s&&!o?function(i){function o(t,i){var r=n.getDimensionInfo(i);if(r&&!1!==r.otherDims.tooltip){var o=r.type,h=qn({color:l,type:"subItem"}),u=(a?h+jn(r.displayName||"-")+": ":"")+jn("ordinal"===o?t+"":"time"===o?e?"":Kn("yyyy/MM/dd hh:mm:ss",t):Un(t));u&&s.push(u)}}var a=p(i,function(t,e,i){var r=n.getDimensionInfo(i);return t|(r&&!1!==r.tooltip&&null!=r.displayName)},0),s=[];return r.length?d(r,function(e){o(Er(n,t,e),e)}):d(i,o),(a?"<br/>":"")+s.join(a?"<br/>":", ")}(a):jn(Un(o?Er(n,t,r[0]):s?a[0]:a)),u=qn(l),c=n.getName(t),f=this.name;return Je(this)||(f=""),f=f?jn(f)+(e?": ":"<br/>"):"",e?u+f+h:f+u+(c?jn(c)+": "+h:h)},isAnimationEnabled:function(){if(ku.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=Hp.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});u(bg,xg),u(bg,Hp);var Sg=function(){this.group=new Ec,this.uid=kn("viewComponent")};Sg.prototype={constructor:Sg,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var Mg=Sg.prototype;Mg.updateView=Mg.updateLayout=Mg.updateVisual=function(t,e,i,n){},si(Sg),ci(Sg,{registerWhenExtend:!0});var Ig=function(){var t=ii();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,o=i.canProgressiveRender,a=i.large=n.large,s=i.canProgressiveRender=n.canProgressiveRender;return!!(r^a||o^s)&&"reset"}},Tg=ii(),Cg=Ig();Xr.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Yr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Yr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null};var Dg=Xr.prototype;Dg.updateView=Dg.updateLayout=Dg.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},si(Xr),ci(Xr,{registerWhenExtend:!0}),Xr.markUpdateMethod=function(t,e){Tg(t).updateMethod=e};var Ag={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},kg="\0__throttleOriginMethod",Pg="\0__throttleRate",Lg="\0__throttleType",Og={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",r),!e.isSeriesFiltered(t))return"function"!=typeof r||r instanceof rp||i.each(function(e){i.setItemVisual(e,"color",r(t.getDataParams(e)))}),{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}},zg={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},Eg=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=o.get(t);if(null==e){for(var i=t.split("."),n=zg.aria,r=0;r<i.length;++r)n=n[i[r]];return n}return e}var r,o=e.getModel("aria");if(o.get("show"))if(o.get("description"))t.setAttribute("aria-label",o.get("description"));else{var a=0;e.eachSeries(function(t,e){++a},this);var s,l=o.get("data.maxCount")||10,h=o.get("series.maxCount")||10,u=Math.min(a,h);if(!(a<1)){var c=((r=e.getModel("title").option)&&r.length&&(r=r[0]),r&&r.text);s=c?i(n("general.withTitle"),{title:c}):n("general.withoutTitle");var f=[];s+=i(n(a>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:a}),e.eachSeries(function(t,e){if(e<u){var r,o=t.get("name"),s="series."+(a>1?"multiple":"single")+".";r=i(r=n(o?s+"withName":s+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(m=t.subType,zg.series.typeNames[m]||"自定义图")});var h=t.getData();window.data=h,h.count()>l?r+=i(n("data.partialData"),{displayCnt:l}):r+=n("data.allData");for(var c=[],d=0;d<h.count();d++)if(d<l){var p=h.getName(d),g=Er(h,d);c.push(i(n(p?"data.withName":"data.withoutName"),{name:p,value:g}))}r+=c.join(n("data.separator.middle"))+n("data.separator.end"),f.push(r)}var m}),s+=f.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",s)}}},Ng=Math.PI,Rg=to.prototype;Rg.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context;return{step:!e&&i.progressiveEnabled&&(!n||n.canProgressiveRender)&&t.__idxInPipeline>i.bockIndex?i.step:null}}},Rg.getPipeline=function(t){return this._pipelineMap.get(t)},Rg.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largeThreshold");t.pipelineContext=i.context={canProgressiveRender:r,large:o}},Rg.restorePipelines=function(t){var e=this,i=e._pipelineMap=N();t.eachSeries(function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),bockIndex:-1,step:n||700,count:0}),uo(e,t,t.dataTask)})},Rg.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d([this._dataProcessorHandlers,this._visualHandlers],function(n){d(n,function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){function o(i){var o=i.uid,s=a.get(o)||a.set(o,Rr({plan:ao,reset:so,count:ho}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},uo(t,i,s)}var a=i.seriesTaskMap||(i.seriesTaskMap=N()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(o):s?n.eachRawSeriesByType(s,o):l&&l(n,r).each(o);var h=t._pipelineMap;a.each(function(t,e){h.get(e)||(t.dispose(),a.removeKey(e))})}(this,n,r,e,i),n.overallReset&&function(t,e,i,n,r){function o(e){var i=e.uid,n=s.get(i)||s.set(i,Rr({reset:no,onDirty:oo}));n.context={model:e,overallProgress:u,isOverallFilter:c},n.agent=a,n.__block=u,uo(t,e,n)}var a=i.overallTask=i.overallTask||Rr({reset:io});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var s=a.agentStubMap=a.agentStubMap||N(),l=e.seriesType,h=e.getTargetSeries,u=!0,c=e.isOverallFilter;l?n.eachRawSeriesByType(l,o):h?h(n,r).each(o):(u=!1,d(n.getSeries(),o));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),s.removeKey(e))})}(this,n,r,e,i)},this)},this)},Rg.prepareView=function(t,e,i,n){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=i,o.api=n,r.__block=!t.incrementalPrepareRender,uo(this,e,r)},Rg.performDataProcessorTasks=function(t,e){eo(this,this._dataProcessorHandlers,t,e,{block:!0})},Rg.performVisualTasks=function(t,e,i){eo(this,this._visualHandlers,t,e,i)},Rg.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Rg.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.bockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Bg=Rg.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};to.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:function(t){Vg=null;try{t(Fg,Hg)}catch(t){}return Vg}(t)}),t.uid=kn("stageHandler"),e&&(t.visualType=e),t};var Vg,Fg={},Hg={};co(Fg,Jp),co(Hg,gr),Fg.eachSeriesByType=Fg.eachRawSeriesByType=function(t){Vg=t},Fg.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Vg=t.subType)};var Gg=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Wg={color:Gg,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Gg]},Zg=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Ug={color:Zg,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Zg[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Zg},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Ug.categoryAxis.splitLine.show=!1;var Xg=P,jg=d,Yg=x,qg=w,$g=Rp.parseClassType,Kg=1e3,Qg=1e3,Jg=3e3,tm={PROCESSOR:{FILTER:Kg,STATISTIC:5e3},VISUAL:{LAYOUT:Qg,GLOBAL:2e3,CHART:Jg,COMPONENT:4e3,BRUSH:5e3}},em="__flagInMainProcess",im="__optionUpdated",nm=/^[a-zA-Z0-9_]+$/;po.prototype.on=fo("on"),po.prototype.off=fo("off"),po.prototype.one=fo("one"),u(po,Qu);var rm=go.prototype;rm._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[im]){var e=this[im].silent;this[em]=!0,vo(this),om.update.call(this),this[em]=!1,this[im]=!1,wo.call(this,e),bo.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api,t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),xo(this,n),t.performVisualTasks(n),To(this,this._model,0,"remain"),i-=+new Date-r}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},rm.getDom=function(){return this._dom},rm.getZr=function(){return this._zr},rm.setOption=function(t,e,i){var n;if(qg(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[em]=!0,!this._model||e){var r=new vr(this._api),o=this._theme,a=this._model=new Jp(null,null,o,r);a.scheduler=this._scheduler,a.init(null,null,o,r)}this._model.setOption(t,um),i?(this[im]={silent:n},this[em]=!1):(vo(this),om.update.call(this),this._zr.flush(),this[im]=!1,this[em]=!1,wo.call(this,n),bo.call(this,n))},rm.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},rm.getModel=function(){return this._model},rm.getOption=function(){return this._model&&this._model.getOption()},rm.getWidth=function(){return this._zr.getWidth()},rm.getHeight=function(){return this._zr.getHeight()},rm.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},rm.getRenderedCanvas=function(t){if(ku.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},rm.getSvgDataUrl=function(){if(ku.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},rm.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],r=this;jg(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return jg(n,function(t){t.group.ignore=!1}),o},rm.getConnectedDataURL=function(t){if(ku.canvasSupported){var e=this.group,n=Math.min,r=Math.max;if(mm[e]){var o=1/0,a=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelRatio||1;d(gm,function(u,c){if(u.group===e){var d=u.getRenderedCanvas(i(t)),f=u.getDom().getBoundingClientRect();o=n(f.left,o),a=n(f.top,a),s=r(f.right,s),l=r(f.bottom,l),h.push({dom:d,left:f.left,top:f.top})}});var c=(s*=u)-(o*=u),f=(l*=u)-(a*=u),p=Hu();p.width=c,p.height=f;var g=Xe(p);return jg(h,function(t){var e=new Oe({style:{x:t.left*u-o,y:t.top*u-a,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},rm.convertToPixel=v(mo,"convertToPixel"),rm.convertFromPixel=v(mo,"convertFromPixel"),rm.containPixel=function(t,e){var i;return d(t=ni(this._model,t),function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i},rm.getVisual=function(t,e){var i=(t=ni(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},rm.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},rm.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var om={prepareAndUpdate:function(t){vo(this),om.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,o=this._scheduler;if(e){e.restoreData(t),o.performSeriesTasks(e),r.create(e,i),o.performDataProcessorTasks(e,t),xo(this,e),r.update(e,i),Mo(e),o.performVisualTasks(e,t),Io(this,e,i,t);var a=e.get("backgroundColor")||"transparent";if(ku.canvasSupported)n.setBackgroundColor(a);else{var s=bt(a);a=At(s,"rgb"),0===s[3]&&(a="transparent")}Co(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent(function(o,a){var s=i.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,e,n,t);l&&l.update&&r.push(s)}else r.push(s)});var o=N();e.eachSeries(function(r){var a=i._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,n,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)}),Mo(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),To(i,e,0,t,o),Co(e,this._api)}},updateView:function(t){var e=this._model;e&&(Xr.markUpdateMethod(t,"updateView"),Mo(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Io(this,this._model,this._api,t),Co(e,this._api))},updateVisual:function(t){om.update.call(this,t)},updateLayout:function(t){om.update.call(this,t)}};rm.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[em]=!0,i&&vo(this),om.update.call(this),this[em]=!1,wo.call(this,n),bo.call(this,n)}},rm.showLoading=function(t,e){if(qg(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pm[t]){var i=pm[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},rm.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},rm.makeActionFromEvent=function(t){var e=o({},t);return e.type=lm[t.type],e},rm.dispatchAction=function(t,e){qg(e)||(e={silent:!!e}),sm[t.type]&&this._model&&(this[em]?this._pendingActions.push(t):(_o.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&ku.browser.weChat&&this._throttledZrFlush(),wo.call(this,e.silent),bo.call(this,e.silent)))},rm.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},rm.on=fo("on"),rm.off=fo("off"),rm.one=fo("one");var am=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];rm._initEvents=function(){jg(am,function(t){this._zr.on(t,function(e){var i,n=this.getModel(),r=e.target;if("globalout"===t)i={};else if(r&&null!=r.dataIndex){var a=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(i=o({},r.eventData));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),jg(lm,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},rm.isDisposed=function(){return this._disposed},rm.clear=function(){this.setOption({series:[]},!0)},rm.dispose=function(){if(!this._disposed){this._disposed=!0,oi(this.getDom(),xm,"");var t=this._api,e=this._model;jg(this._componentsViews,function(i){i.dispose(e,t)}),jg(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete gm[this.id]}},u(go,Qu);var sm={},lm={},hm=[],um=[],cm=[],dm=[],fm={},pm={},gm={},mm={},vm=new Date-0,ym=new Date-0,xm="_echarts_instance_",_m={},wm=Ao;No(2e3,Og),Lo(fg),Oo(5e3,function(t){var e=N();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(Cr)}),Bo("default",function(t,e){a(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Qf({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new ip({shape:{startAngle:-Ng/2,endAngle:-Ng/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new Qf({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*Ng/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Ng/2}).delay(300).start("circularInOut");var o=new Ec;return o.add(n),o.add(r),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var a=n.shape.r;r.setShape({x:e-a,y:o-a,width:2*a,height:2*a}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o}),zo({type:"highlight",event:"highlight",update:"highlight"},R),zo({type:"downplay",event:"downplay",update:"downplay"},R),Po("light",Wg),Po("dark",Ug);Zo.prototype={constructor:Zo,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],r=[];for(Uo(t,{},n,"_oldKeyGetter",this),Uo(e,i,r,"_newKeyGetter",this),o=0;o<t.length;o++)null!=(s=i[a=n[o]])?((h=s.length)?(1===h&&(i[a]=null),s=s.unshift()):i[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o);for(var o=0;o<r.length;o++){var a=r[o];if(i.hasOwnProperty(a)){var s=i[a];if(null==s)continue;if(s.length)for(var l=0,h=s.length;l<h;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var bm=N(["tooltip","label","itemName","itemId","seriesName"]),Sm=w,Mm="undefined"==typeof window?global:window,Im="e\0\0",Tm={float:void 0===Mm.Float64Array?Array:Mm.Float64Array,int:void 0===Mm.Int32Array?Array:Mm.Int32Array,ordinal:Array,number:Array,time:Array},Cm=void 0===Mm.Uint32Array?Array:Mm.Uint32Array,Dm=void 0===Mm.Uint16Array?Array:Mm.Uint16Array,Am=["hasItemOption","_nameList","_idList","_calculationInfo","_invertedIndicesMap","_rawData","_rawExtent","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],km=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},o=0;o<t.length;o++){var a=t[o];_(a)&&(a={name:a});var s=a.name;a.type=a.type||"float",a.coordDim||(a.coordDim=s,a.coordDimIndex=0),a.otherDims=a.otherDims||{},n.push(s),i[s]=a,a.index=o,a.createInvertedIndices&&(r[s]=[])}this.dimensions=n,this._dimensionInfos=i,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=function(t){var e={},i=e.encode={},n=N(),r=[];d(t.dimensions,function(e){var o,a=t.getDimensionInfo(e),s=a.coordDim;if(s){var l=i[s];i.hasOwnProperty(s)||(l=i[s]=[]),l[a.coordDimIndex]=e,a.isExtraCoord||(n.set(s,1),"ordinal"!==(o=a.type)&&"time"!==o&&(r[0]=e))}bm.each(function(t,e){var n=i[e];i.hasOwnProperty(e)||(n=i[e]=[]);var r=a.otherDims[e];null!=r&&!1!==r&&(n[r]=a.name)})});var o=[],a={};n.each(function(t,e){var n=i[e];a[e]=n[0],o=o.concat(n)}),e.dataDimsOnCoord=o,e.encodeFirstDimNotExtra=a;var s=i.label;s&&s.length&&(r=s.slice());var l=r.slice(),h=i.tooltip;return h&&h.length&&(l=h.slice()),i.defaultedLabel=r,i.defaultedTooltip=l,e}(this),this._invertedIndicesMap=r,this._calculationInfo={}},Pm=km.prototype;Pm.type="list",Pm.hasItemOption=!0,Pm.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},Pm.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Pm.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Pm.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},Pm.initData=function(t,e,i){(sr.isInstance(t)||c(t))&&(t=new Dr(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=vg[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Pm.getProvider=function(){return this._rawData},Pm.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},Pm._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=this._dimensionInfos,l=this._nameList,h=this._idList,u=this._rawExtent,c=this._nameRepeatCount={},f=this._chunkCount,p=f-1,g=0;g<a.length;g++){u[T=a[g]]||(u[T]=[1/0,-1/0]);var m=s[T];0===m.otherDims.itemName&&(i=this._nameDimIdx=g),0===m.otherDims.itemId&&(this._idDimIdx=g);var v=Tm[m.type];o[T]||(o[T]=[]);var y=o[T][p];if(y&&y.length<n){for(var x=new v(Math.min(e-p*n,n)),_=0;_<y.length;_++)x[_]=y[_];o[T][p]=x}for(I=f*n;I<e;I+=n)o[T].push(new v(Math.min(e-I,n)));this._chunkCount=o[T].length}for(var w=t;w<e;w++){for(var b=r.getItem(w),S=Math.floor(w/n),M=w%n,I=0;I<a.length;I++){var T=a[I],C=o[T][S],D=this._dimValueGetter(b,T,w,I);C[M]=D,D<u[T][0]&&(u[T][0]=D),D>u[T][1]&&(u[T][1]=D)}if(!r.pure){var A=l[w];b&&!A&&(null!=i?A=this._getNameFromStore(w):null!=b.name&&(l[w]=A=b.name));var k=null==b?null:b.id;null==k&&null!=A&&(c[A]=c[A]||0,k=A,c[A]>0&&(k+="__ec__"+c[A]),c[A]++),null!=k&&(h[w]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},d(L=(P=this)._invertedIndicesMap,function(t,e){var i=P._dimensionInfos[e].ordinalMeta;if(i){for(t=L[e]=new Cm(i.categories.length),n=0;n<t.length;n++)t[n]=NaN;for(var n=0;n<P._count;n++)t[P.get(e,n)]=n}})}var P,L},Pm._getNameFromStore=function(t){var e=this._nameDimIdx;if(null!=e){var i=this._chunkSize,n=Math.floor(t/i),r=t%i,o=this.dimensions[e],a=this._dimensionInfos[o].ordinalMeta;if(a)return a.categories[t];var s=this._storage[o][n];return s&&s[r]}},Pm._getIdFromStore=function(t){var e=this._idDimIdx;if(null!=e){var i=this._chunkSize,n=Math.floor(t/i),r=t%i,o=this.dimensions[e],a=this._dimensionInfos[o].ordinalMeta;if(a)return a.categories[t];var s=this._storage[o][n];return s&&s[r]}},Pm.count=function(){return this._count},Pm.getIndices=function(){if(this._indices)return new(t=this._indices.constructor)(this._indices.buffer,0,this._count);for(var t=Xo(this),e=new t(this.count()),i=0;i<e.length;i++)e[i]=i;return e},Pm.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[t][n][r]},Pm.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[n][r]},Pm._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},Pm.getValues=function(t,e){var i=[];y(t)||(e=t,t=this.dimensions);for(var n=0,r=t.length;n<r;n++)i.push(this.get(t[n],e));return i},Pm.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=this._dimensionInfos,n=0,r=e.length;n<r;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},Pm.getDataExtent=function(t){t=this.getDimension(t);var e=[1/0,-1/0];if(!this._storage[t])return e;var i,n=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var r=(i=e)[0],o=i[1],a=0;a<n;a++){var s=this._getFast(t,this.getRawIndex(a));s<r&&(r=s),s>o&&(o=s)}return i=[r,o],this._extent[t]=i,i},Pm.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Pm.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Pm.getCalculationInfo=function(t){return this._calculationInfo[t]},Pm.setCalculationInfo=function(t,e){Sm(t)?o(this._calculationInfo,t):this._calculationInfo[t]=e},Pm.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var r=this.get(t,i);isNaN(r)||(e+=r)}return e},Pm.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},Pm.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},Pm.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,r=this._count-1;n<=r;){var o=(n+r)/2|0;if(e[o]<t)n=o+1;else{if(!(e[o]>t))return o;r=o-1}}return-1},Pm.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=Number.MAX_VALUE,o=-1,a=0,s=this.count();a<s;a++){var l=e-this.get(t,a),h=Math.abs(l);l<=i&&h<=r&&((h<r||l>=0&&o<0)&&(r=h,o=l,n.length=0),n.push(a))}return n},Pm.getRawIndex=Yo,Pm.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},Pm.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||this._getNameFromStore(e)||""},Pm.getId=function(t){return $o(this,this.getRawIndex(t))},Pm.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var r=(t=f(Ko(t),this.getDimension,this)).length,o=0;o<this.count();o++)switch(r){case 0:e.call(i,o);break;case 1:e.call(i,this.get(t[0],o),o);break;case 2:e.call(i,this.get(t[0],o),this.get(t[1],o),o);break;default:for(var a=0,s=[];a<r;a++)s[a]=this.get(t[a],o);s[a]=o,e.apply(i,s)}}},Pm.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=f(Ko(t),this.getDimension,this);for(var r=this.count(),o=new(Xo(this))(r),a=[],s=t.length,l=0,h=t[0],u=0;u<r;u++){var c,d=this.getRawIndex(u);if(0===s)c=e.call(i,u);else if(1===s){var p=this._getFast(h,d);c=e.call(i,p,u)}else{for(var g=0;g<s;g++)a[g]=this._getFast(h,d);a[g]=u,c=e.apply(i,a)}c&&(o[l++]=d)}return l<r&&(this._indices=o),this._count=l,this._extent={},this.getRawIndex=this._indices?qo:Yo,this}},Pm.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var r=this.count(),o=new(Xo(this))(r),a=0,s=e[0],l=t[s][0],h=t[s][1],u=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++)(w=p[m])>=l&&w<=h&&(o[a++]=c),c++;u=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];w>=l&&w<=h&&b>=y&&b<=x&&(o[a++]=c),c++}}u=!0}}if(!u)if(1===n)for(m=0;m<r;m++)M=this.getRawIndex(m),(w=this._getFast(s,M))>=l&&w<=h&&(o[a++]=M);else for(m=0;m<r;m++){var S=!0,M=this.getRawIndex(m);for(f=0;f<n;f++){var I=e[f];((w=this._getFast(i,M))<t[I][0]||w>t[I][1])&&(S=!1)}S&&(o[a++]=this.getRawIndex(m))}return a<r&&(this._indices=o),this._count=a,this._extent={},this.getRawIndex=this._indices?qo:Yo,this}}},Pm.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i),r},Pm.map=function(t,e,i,n){i=i||n||this;var r=Qo(this,t=f(Ko(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?qo:Yo;for(var o=r._storage,a=[],s=this._chunkSize,l=t.length,h=this.count(),u=[],c=r._rawExtent,d=0;d<h;d++){for(var p=0;p<l;p++)u[p]=this.get(t[p],d);u[l]=d;var g=e&&e.apply(i,u);if(null!=g){"object"!=(void 0===g?"undefined":_typeof(g))&&(a[0]=g,g=a);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;x<g.length;x++){var _=t[x],w=g[x],b=c[_],S=o[_];S&&(S[v][y]=w),w<b[0]&&(b[0]=w),w>b[1]&&(b[1]=w)}}}return r},Pm.downSample=function(t,e,i,n){for(var r=Qo(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(Xo(this))(h),f=0,p=0;p<h;p+=s){s>h-p&&(s=h-p,a.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/u),y=m%u;a[g]=l[v][y]}var x=i(a),_=this.getRawIndex(Math.min(p+n(a,x)||0,h-1)),w=_%u;l[Math.floor(_/u)][w]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=qo,r},Pm.getItemModel=function(t){var e=this.hostModel;return new Cn(this.getRawDataItem(t),e,e&&e.ecModel)},Pm.diff=function(t){var e=this;return new Zo(t?t.getIndices():[],this.getIndices(),function(e){return $o(t,e)},function(t){return $o(e,t)})},Pm.getVisual=function(t){var e=this._visual;return e&&e[t]},Pm.setVisual=function(t,e){if(Sm(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Pm.setLayout=function(t,e){if(Sm(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Pm.getLayout=function(t){return this._layout[t]},Pm.getItemLayout=function(t){return this._itemLayouts[t]},Pm.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?o(this._itemLayouts[t]||{},e):e},Pm.clearItemLayouts=function(){this._itemLayouts.length=0},Pm.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},Pm.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,Sm(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],r[o]=!0);else n[e]=i,r[e]=!0},Pm.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Lm=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};Pm.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Lm,e)),this._graphicEls[t]=e},Pm.getItemGraphicEl=function(t){return this._graphicEls[t]},Pm.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},Pm.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new km(e,this.hostModel)}if(t._storage=this._storage,jo(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?qo:Yo,t._extent=i(this._extent),t._approximateExtent=i(this._approximateExtent),t},Pm.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(A(arguments)))})},Pm.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Pm.CHANGABLE_METHODS=["filterSelf","selectRange"];var Om=function(t,e){return ta((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};oa.prototype.parse=function(t){return t},oa.prototype.getSetting=function(t){return this._setting[t]},oa.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},oa.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},oa.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},oa.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},oa.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},oa.prototype.getExtent=function(){return this._extent.slice()},oa.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},oa.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},oa.prototype.isBlank=function(){return this._isBlank},oa.prototype.setBlank=function(t){this._isBlank=t},si(oa),ci(oa,{registerWhenExtend:!0}),aa.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&f(i,la);return new aa({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var zm=aa.prototype;zm.getOrdinal=function(t){return sa(this).get(t)},zm.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=sa(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var Em=oa.prototype,Nm=oa.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new aa({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),Em.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Em.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Em.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:R,niceExtent:R});Nm.create=function(){return new Nm};var Rm=On,Bm=On,Vm=oa.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Vm.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ha(t)},getTicks:function(){return function(t,e,i,n){var r=[];if(!t)return r;e[0]<i[0]&&r.push(e[0]);for(var o=i[0];o<=i[1]&&(r.push(o),(o=Rm(o+t,n))!==r[r.length-1]);)if(r.length>1e4)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Nn(t)||0:"auto"===i&&(i=this._intervalPrecision),Un(t=Bm(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){r<0&&(r=-r,n.reverse());var o=function(t,e,i,n){var r={},o=t[1]-t[0],a=r.interval=Zn(o/e,!0);null!=i&&a<i&&(a=r.interval=i),null!=n&&a>n&&(a=r.interval=n);var s=r.intervalPrecision=ha(a);return ca(r.niceTickExtent=[Rm(Math.ceil(t[0]/a)*a,s),Rm(Math.floor(t[1]/a)*a,s)],t),r}(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=Bm(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=Bm(Math.ceil(e[1]/r)*r))}});Vm.create=function(){return new Vm};var Fm="__ec_stack_",Hm=Vm.prototype,Gm=Math.ceil,Wm=Math.floor,Zm=Vm.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return Kn(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=On(Wm(e[0]/n)*n)),t.fixMax||(e[1]=On(Gm(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],o=r/t;null!=e&&o<e&&(o=e),null!=i&&o>i&&(o=i);var a=Um.length,s=function(t,e,i,n){for(;i<n;){var r=i+n>>>1;t[r][1]<e?i=r+1:n=r}return i}(Um,o,0,a),l=Um[Math.min(s,a-1)],h=l[1];"year"===l[0]&&(h*=Zn(r/h/t,!0));var u=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(Gm((n[0]-u)/h)*h+u),Math.round(Wm((n[1]-u)/h)*h+u)];ca(c,n),this._stepLvl=l,this._interval=h,this._niceExtent=c},parse:function(t){return+Hn(t)}});d(["contain","normalize"],function(t){Zm.prototype[t]=function(e){return Hm[t].call(this,this.parse(e))}});var Um=[["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",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];Zm.create=function(t){return new Zm({useUTC:t.ecModel.get("useUTC")})};var Xm=oa.prototype,jm=Vm.prototype,Ym=Nn,qm=On,$m=Math.floor,Km=Math.ceil,Qm=Math.pow,Jm=Math.log,tv=oa.extend({type:"log",base:10,$constructor:function(){oa.apply(this,arguments),this._originalScale=new Vm},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(jm.getTicks.call(this),function(n){var r=On(Qm(this.base,n));return r=n===e[0]&&t.__fixMin?ga(r,i[0]):r,n===e[1]&&t.__fixMax?ga(r,i[1]):r},this)},getLabel:jm.getLabel,scale:function(t){return t=Xm.scale.call(this,t),Qm(this.base,t)},setExtent:function(t,e){var i=this.base;t=Jm(t)/Jm(i),e=Jm(e)/Jm(i),jm.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Xm.getExtent.call(this);e[0]=Qm(t,e[0]),e[1]=Qm(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=ga(e[0],n[0])),i.__fixMax&&(e[1]=ga(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Jm(t[0])/Jm(e),t[1]=Jm(t[1])/Jm(e),Xm.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=Gn(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[On(Km(e[0]/n)*n),On($m(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){jm.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){tv.prototype[t]=function(e){return e=Jm(e)/Jm(this.base),Xm[t].call(this,e)}}),tv.create=function(){return new tv};var ev={getFormattedLabels:function(){return function(t,e){var i,n=t.scale,r=n.getTicksLabels(),o=n.getTicks();return"string"==typeof e?(i=e,f(r,e=function(t){return i.replace("{value}",null!=t?t:"")})):"function"==typeof e?f(o,function(i,n){return e(xa(t,i),n)},this):r}(this.axis,this.get("axisLabel.formatter"))},getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:R,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},iv=Wi({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n+o),t.lineTo(i-r,n+o),t.closePath()}}),nv=Wi({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+r,n),t.lineTo(i,n+o),t.lineTo(i-r,n),t.closePath()}}),rv=Wi({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=n-o+a+s,h=Math.asin(s/a),u=Math.cos(h)*a,c=Math.sin(h),d=Math.cos(h),f=.6*a,p=.7*a;t.moveTo(i-u,l+s),t.arc(i,l,a,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),ov=Wi({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,o=e.y,a=n/3*2;t.moveTo(r,o),t.lineTo(r+a,o+i),t.lineTo(r,o+i/4*3),t.lineTo(r-a,o+i),t.lineTo(r,o),t.closePath()}}),av={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var o=Math.min(i,n);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},sv={};d({line:Jf,rect:Qf,roundRect:Qf,square:Qf,circle:Wf,diamond:nv,pin:rv,arrow:ov,triangle:iv},function(t,e){sv[e]=new t});var lv=Wi({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,r=sv[n];"none"!==e.symbolType&&(r||(r=sv[n="rect"]),av[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i))}}),hv={isDimensionStacked:na,enableDataStack:ia},uv=(Object.freeze||Object)({createList:function(t){return ra(t.getSource(),t)},getLayoutRect:tr,dataStack:hv,createScale:function(t,e){var i=e;Cn.isInstance(e)||u(i=new Cn(e),ev);var n=ya(i);return n.setExtent(t[0],t[1]),va(n,i),n},mixinAxisModelCommonMethods:function(t){u(t,ev)},completeDimensions:ta,createDimensions:Om,createSymbol:wa}),cv=1e-8;Ma.prototype={constructor:Ma,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],o=[],a=this.geometries,s=0;s<a.length;s++)"polygon"===a[s].type&&(bi(a[s].exterior,r,o),K(i,i,r),Q(n,n,o));return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Gt(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,r=i.length;n<r;n++)if("polygon"===i[n].type){var o=i[n].exterior,a=i[n].interiors;if(Sa(o,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(Sa(a[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),o=r.width/r.height;i?n||(n=i/o):i=o*n;for(var a=new Gt(t,e,i,n),s=r.calculateTransform(a),l=this.geometries,h=0;h<l.length;h++)if("polygon"===l[h].type){for(var u=l[h].exterior,c=l[h].interiors,d=0;d<u.length;d++)$(u[d],u[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)$(c[f][d],c[f][d],s)}(r=this._rect).copy(a),this.center=[r.x+r.width/2,r.y+r.height/2]}};var dv=function(t){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var r=i[n].geometry,o=r.coordinates,a=r.encodeOffsets,s=0;s<o.length;s++){var l=o[s];if("Polygon"===r.type)o[s]=Ia(l,a[s],e);else if("MultiPolygon"===r.type)for(var h=0;h<l.length;h++){var u=l[h];l[h]=Ia(u,a[s][h],e)}}t.UTF8Encoding=!1}(t),f(g(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var o=new Ma(e.name,r,e.cp);return o.properties=e,o})},fv=Pn,pv=[0,1],gv=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};gv.prototype={constructor:gv,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Rn(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&Ta(i=i.slice(),n.count()),fv(t,pv,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Ta(i=i.slice(),n.count());var r=fv(t,i,pv,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n<e.length;n++)i.push(e[n][0]);return e[n-1]&&i.push(e[n-1][1]),i}return f(this.scale.getTicks(),this.dataToCoord,this)},getLabelsCoords:function(){return f(this.scale.getTicks(),this.dataToCoord,this)},getBands:function(){for(var t=this.getExtent(),e=[],i=this.scale.count(),n=t[0],r=t[1]-n,o=0;o<i;o++)e.push([r*o/i+n,r*(o+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=function(t,e,i,n,r){var o,a=0,s=0,l=(n-r)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u<t.length;u+=h){var c=t[u],d=ne(e[u],i,"center","top");d.x+=c*Math.cos(l),d.y+=c*Math.sin(l),d.width*=1.3,d.height*=1.3,o?o.intersect(d)?(s++,a=Math.max(a,s)):(o.union(d),s=0):o=d.clone()}return 0===a&&h>1?h:(a+1)*h-1}(f(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,i.get("rotate"))),this._labelInterval=t}return t}};var mv=dv,vv={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){vv[t]=Zu[t]}),Vo({type:"dataset",defaultOption:{seriesLayoutBy:qp,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=jp;if(S(e))i=Yp;else if(y(e))for(var n=0,r=e.length;n<r;n++){var o=e[n];if(null!=o){if(y(o)){i=Zp;break}if(w(o)){i=Up;break}}}else if(w(e)){for(var a in e)if(e.hasOwnProperty(a)&&c(e[a])){i=Xp;break}}else if(null!=e)throw new Error("Invalid data");Kp(t).sourceFormat=i}(this)}}),Fo({type:"dataset"}),bg.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return ra(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:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var yv=Aa.prototype;yv._createSymbol=function(t,e,i,n){this.removeAll();var r=wa(t,-1,-1,2,2,e.getItemVisual(i,"color"));r.attr({z2:100,culling:!0,scale:Da(n)}),r.drift=ka,this._symbolType=t,this.add(r)},yv.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},yv.getSymbolPath=function(){return this.childAt(0)},yv.getScale=function(){return this.childAt(0).scale},yv.highlight=function(){this.childAt(0).trigger("emphasis")},yv.downplay=function(){this.childAt(0).trigger("normal")},yv.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},yv.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},yv.updateData=function(t,e,i){this.silent=!1;var n,r,o=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,s=(n=e,(r=t.getItemVisual(n,"symbolSize"))instanceof Array?r.slice():[+r,+r]),l=o!==this._symbolType;if(l?this._createSymbol(o,t,e,s):((h=this.childAt(0)).silent=!1,xn(h,{scale:Da(s)},a,e)),this._updateCommon(t,e,s,i),l){var h=this.childAt(0),u=i&&i.fadeIn,c={scale:h.scale.slice()};u&&(c.style={opacity:h.style.opacity}),h.scale=[0,0],u&&(h.style.opacity=0),_n(h,c,a,e)}this._seriesModel=a};var xv=["itemStyle"],_v=["emphasis","itemStyle"],wv=["label"],bv=["emphasis","label"];yv._updateCommon=function(t,e,i,n){var r=this.childAt(0),a=t.hostModel,s=t.getItemVisual(e,"color");"image"!==r.type&&r.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,h=n&&n.hoverItemStyle,u=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,g=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel(xv).getItemStyle(["color"]),h=m.getModel(_v).getItemStyle(),u=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(wv),f=m.getModel(bv),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else h=o({},h);var v=r.style;r.attr("rotation",(u||0)*Math.PI/180||0),c&&r.attr("position",[Ln(c[0],i[0]),Ln(c[1],i[1])]),g&&r.attr("cursor",g),r.setColor(s,n&&n.symbolInnerColor),r.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=n&&n.useNameLabel;cn(v,h,d,f,{labelFetcher:a,labelDataIndex:e,defaultText:function(e,i){return x?t.getName(e):Ca(t,e)},isRectText:!0,autoColor:s}),r.off("mouseover").off("mouseout").off("emphasis").off("normal"),r.hoverStyle=h,un(r);var _=Da(i);if(p&&a.isAnimationEnabled()){var w=function(){if(!this.incremental){var t=_[1]/_[0];this.animateTo({scale:[Math.max(1.1*_[0],_[0]+3),Math.max(1.1*_[1],_[1]+3*t)]},400,"elasticOut")}},b=function(){this.incremental||this.animateTo({scale:_},400,"elasticOut")};r.on("mouseover",w).on("mouseout",b).on("emphasis",w).on("normal",b)}},yv.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),xn(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},h(Aa,Ec);var Sv=Pa.prototype;Sv.updateData=function(t,e){e=Oa(e);var i=this.group,n=t.hostModel,r=this._data,o=this._symbolCtor,a=za(t);r||i.removeAll(),t.diff(r).add(function(n){var r=t.getItemLayout(n);if(La(t,r,n,e)){var s=new o(t,n,a);s.attr("position",r),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var h=r.getItemGraphicEl(l),u=t.getItemLayout(s);La(t,u,s,e)?(h?(h.updateData(t,s,a),xn(h,{position:u},n)):(h=new o(t,s)).attr("position",u),i.add(h),t.setItemGraphicEl(s,h)):i.remove(h)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},Sv.isPersistent=function(){return!0},Sv.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},Sv.incrementalPrepareUpdate=function(t){this._seriesScope=za(t),this._data=null,this.group.removeAll()},Sv.incrementalUpdate=function(t,e,i){i=Oa(i);for(var n=t.start;n<t.end;n++){var r=e.getItemLayout(n);if(La(e,r,n,i)){var o=new this._symbolCtor(e,n,this._seriesScope);o.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),o.attr("position",r),this.group.add(o),e.setItemGraphicEl(n,o)}}},Sv.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var Mv=K,Iv=Q,Tv=G,Cv=V,Dv=[],Av=[],kv=[],Pv=Ni.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Uf(Ni.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,r=i.length,o=Ga(i,e.smoothConstraint);if(e.connectNulls){for(;r>0&&Ra(i[r-1]);r--);for(;n<r&&Ra(i[n]);n++);}for(;n<r;)n+=Ba(t,i,n,r,r,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),Lv=Ni.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Uf(Ni.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,r=0,o=i.length,a=e.smoothMonotone,s=Ga(i,e.smoothConstraint),l=Ga(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Ra(i[o-1]);o--);for(;r<o&&Ra(i[r]);r++);}for(;r<o;){var h=Ba(t,i,r,o,o,1,s.min,s.max,e.smooth,a,e.connectNulls);Ba(t,n,r+h-1,h,o,-1,l.min,l.max,e.stackedOnSmooth,a,e.connectNulls),r+=h+1,t.closePath()}}});Xr.extend({type:"line",init:function(){var t=new Ec,e=new Pa;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,r=this.group,o=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),h=o.mapArray(o.getItemLayout),u="polar"===n.type,c=this._coordSys,p=this._symbolDraw,g=this._polyline,m=this._polygon,v=this._lineGroup,y=t.get("animation"),x=!l.isEmpty(),_=l.get("origin"),w=function(t,e,i){if(!i.valueDim)return[];for(var n=[],r=0,o=e.count();r<o;r++)n.push(Na(i,t,e,r));return n}(n,o,Ea(n,o,_)),b=t.get("showSymbol"),S=b&&!u&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(o,n),M=this._data;M&&M.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),M.setItemGraphicEl(e,null))}),b||p.remove(),r.add(v);var I=!u&&t.get("step");if(g&&c.type===n.type&&I===this._step){x&&!m?m=this._newPolygon(h,w,n,y):m&&!x&&(v.remove(m),m=this._polygon=null);var T=Xa(n,!1,t);v.setClipPath(T),b&&p.updateData(o,{isIgnore:S,clipShape:T}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Wa(this._stackedOnPoints,w)&&Wa(this._points,h)||(y?this._updateAnimation(o,w,n,i,I,_):(I&&(h=ja(h,n,I),w=ja(w,n,I)),g.setShape({points:h}),m&&m.setShape({points:h,stackedOnPoints:w})))}else b&&p.updateData(o,{isIgnore:S,clipShape:Xa(n,!1,t)}),I&&(h=ja(h,n,I),w=ja(w,n,I)),g=this._newPolyline(h,n,y),x&&(m=this._newPolygon(h,w,n,y)),v.setClipPath(Xa(n,!0,t));var C=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,r,o=i.length-1;o>=0;o--){var a=i[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){r=i[o];break}}if(r){var h=e.getAxis(n),u=f(r.stops,function(t){return{coord:h.toGlobalCoord(h.dataToCoord(t.value)),color:t.color}}),c=u.length,p=r.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),p.reverse());var g=u[0].coord-10,m=u[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(u,function(t){t.offset=(t.coord-g)/v}),u.push({offset:c?u[c-1].offset:.5,color:p[1]||"transparent"}),u.unshift({offset:c?u[0].offset:.5,color:p[0]||"transparent"});var y=new op(0,0,0,0,u,!0);return y[n]=g,y[n+"2"]=m,y}}}(o,n)||o.getVisual("color");g.useStyle(a(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"}));var D=t.get("smooth");if(D=Za(t.get("smooth")),g.setShape({smooth:D,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),m){var A=o.getCalculationInfo("stackedOnSeries"),k=0;m.useStyle(a(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel"})),A&&(k=Za(A.get("smooth"))),m.setShape({smooth:D,stackedOnSmooth:k,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=w,this._points=h,this._step=I,this._valueOrigin=_},dispose:function(){},highlight:function(t,e,i,n){var r=t.getData(),o=ei(r,n);if(!(o instanceof Array)&&null!=o&&o>=0){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;(a=new Aa(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else Xr.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var r=t.getData(),o=ei(r,n);if(null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Xr.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Pv({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Lv({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return m(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,h=function(t,e,i,n,r,o,a,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),h=[],u=[],c=[],d=[],f=[],p=[],g=[],m=Ea(r,e,a),v=Ea(o,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),h.push(w),u.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":S=x.idx,h.push(r.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),u.push(e.getItemLayout(S).slice()),c.push(Na(m,r,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":var S=x.idx,M=t.getRawIndex(S);M!==S?(h.push(t.getItemLayout(S)),u.push(o.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(Na(v,o,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});var I=[],T=[],C=[],D=[],A=[];for(y=0;y<p.length;y++)S=p[y],I[y]=h[S],T[y]=u[S],C[y]=c[S],D[y]=d[S],A[y]=f[S];return{current:I,next:T,stackedOnCurrent:C,stackedOnNext:D,status:A}}(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,o),u=h.current,c=h.stackedOnCurrent,d=h.next,f=h.stackedOnNext;r&&(u=ja(h.current,i,r),c=ja(h.stackedOnCurrent,i,r),d=ja(h.next,i,r),f=ja(h.stackedOnNext,i,r)),a.shape.__points=h.current,a.shape.points=u,xn(a,{shape:{points:d}},l),s&&(s.setShape({points:u,stackedOnPoints:c}),xn(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=h.status,m=0;m<g.length;m++)if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}a.animators&&a.animators.length&&a.animators[0].during(function(){for(var t=0;t<p.length;t++)p[t].el.attr("position",a.shape.__points[p[t].ptIdx])})},remove:function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Ov=function(t,e,i){return{seriesType:t,performRawSeries:!0,reset:function(t,n,r){var o=t.getData(),a=t.get("symbol")||e,s=t.get("symbolSize");if(o.setVisual({legendSymbol:i||a,symbol:a,symbolSize:s}),!n.isSeriesFiltered(t)){var l="function"==typeof s;return{dataEach:o.hasItemOption||l?function(e,i){if("function"==typeof s){var n=t.getRawValue(i),r=t.getDataParams(i);e.setItemVisual(i,"symbolSize",s(n,r))}if(e.hasItemOption){var o=e.getItemModel(i),a=o.getShallow("symbol",!0),l=o.getShallow("symbolSize",!0);null!=a&&e.setItemVisual(i,"symbol",a),null!=l&&e.setItemVisual(i,"symbolSize",l)}}:null}}}}},zv=function(t){return{seriesType:t,plan:Ig(),reset:function(t){var e=t.getData(),i=t.coordinateSystem,n=t.pipelineContext.large;if(i){var r=f(i.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),o=r.length;return na(e,r[0],r[1])&&(r[0]=e.getCalculationInfo("stackResultDimension")),na(e,r[1],r[0])&&(r[1]=e.getCalculationInfo("stackResultDimension")),o&&{progress:function(t,e){for(var a=t.end-t.start,s=n&&new Float32Array(a*o),l=t.start,h=0,u=[],c=[];l<t.end;l++){var d;if(1===o)f=e.get(r[0],l,!0),d=!isNaN(f)&&i.dataToPoint(f,null,c);else{var f=u[0]=e.get(r[0],l,!0),p=u[1]=e.get(r[1],l,!0);d=!isNaN(f)&&!isNaN(p)&&i.dataToPoint(u,null,c)}n?(s[h++]=d?d[0]:NaN,s[h++]=d?d[1]:NaN):e.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&e.setLayout("symbolPoints",s)}}}}}},Ev={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return e},nearest:function(t){return t[0]}},Nv=function(t,e){return Math.round(t.length/2)},Rv=function(t){this._axes={},this._dimList=[],this.name=t||""};Rv.prototype={constructor:Rv,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return f(this._dimList,Ya,this)},getAxesByScale:function(t){return t=t.toLowerCase(),g(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;r<i.length;r++){var o=i[r],a=this._axes[o];n[o]=a[e](t[o])}return n}},qa.prototype={constructor:qa,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"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale.getExtent(),n=this.getAxis("y").scale.getExtent();return(e=e||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),t[0]),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(n[0],n[1]),t[1]),Math.max(n[0],n[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},h(qa,Rv);var Bv=function(t,e,i,n,r){gv.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};Bv.prototype={constructor:Bv,index:0,onZero:!1,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()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(Bv,gv);var Vv={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Fv={};Fv.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Vv),Fv.valueAxis=n({boundaryGap:[0,0],splitNumber:5},Vv),Fv.timeAxis=a({scale:!0,min:"dataMin",max:"dataMax"},Fv.valueAxis),Fv.logAxis=a({scale:!0,logBase:10},Fv.valueAxis);var Hv=["value","category","time","log"],Gv=function(t,e,i,o){d(Hv,function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,r){var o=this.layoutMode,s=o?nr(e):{};n(e,r.getTheme().get(a+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),o&&ir(e,s,o)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=aa.createByAxisModel(this))},getCategories:function(){if("category"===this.option.type)return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:r([{},Fv[a+"Axis"],o],!0)})}),Rp.registerSubTypeDefaulter(t+"Axis",v(i,t))},Wv=Rp.extend({type:"cartesian2dAxis",axis:null,init:function(){Wv.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Wv.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Wv.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(Wv.prototype,ev);var Zv={offset:0};Gv("x",Wv,$a,Zv),Gv("y",Wv,$a,Zv),Rp.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Uv=d,Xv=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},jv=va,Yv=Qa.prototype;Yv.type="grid",Yv.axisPointerEnabled=!0,Yv.getRect=function(){return this._rect},Yv.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Uv(i.x,function(t){jv(t.scale,t.model)}),Uv(i.y,function(t){jv(t.scale,t.model)}),Uv(i.x,function(t){Ja(i,"y",t)}),Uv(i.y,function(t){Ja(i,"x",t)}),this.resize(this.model,e)},Yv.resize=function(t,e,i){function n(){Uv(o,function(t){var e,i,n,o,a=t.isHorizontal(),s=a?[0,r.width]:[0,r.height],l=t.inverse?1:0;t.setExtent(s[l],s[1-l]),e=t,i=a?r.x:r.y,n=e.getExtent(),o=n[0]+n[1],e.toGlobalCoord="x"===e.dim?function(t){return t+i}:function(t){return o-t+i},e.toLocalCoord="x"===e.dim?function(t){return t-i}:function(t){return o-t+i}})}var r=tr(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=r;var o=this._axesList;n(),!i&&t.get("containLabel")&&(Uv(o,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,r,o,a,s,l,h,u=t.model,c=u.get("axisLabel.show")?u.getFormattedLabels():[],d=u.getModel("axisLabel"),f=1,p=c.length;p>40&&(f=Math.ceil(p/40));for(var g=0;g<p;g+=f)if(!t.isLabelIgnored(g)){var m=(i=d.getTextRect(c[g]),n=d.get("rotate")||0,r=n*Math.PI/180,o=i.plain(),a=o.width,s=o.height,l=a*Math.cos(r)+s*Math.sin(r),h=a*Math.sin(r)+s*Math.cos(r),new Gt(o.x,o.y,l,h));e?e.union(m):e=m}return e}(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");r[i]-=e[i]+n,"top"===t.position?r.y+=e.height+n:"left"===t.position&&(r.x+=e.width+n)}}}),n())},Yv.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},Yv.getAxes=function(){return this._axesList.slice()},Yv.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===t||r[n].getAxis("y").index===e)return r[n]},Yv.getCartesians=function(){return this._coordsList.slice()},Yv.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Yv.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Yv._findConvertTarget=function(t,e){var i,n,r=e.seriesModel,o=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],a=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,h=this._coordsList;return r?l(h,i=r.coordinateSystem)<0&&(i=null):o&&a?i=this.getCartesian(o.componentIndex,a.componentIndex):o?n=this.getAxis("x",o.componentIndex):a?n=this.getAxis("y",a.componentIndex):s&&s.coordinateSystem===this&&(i=this._coordsList[0]),{cartesian:i,axis:n}},Yv.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Yv._initCartesian=function(t,e,i){function n(e){return function(i,n){if(Ka(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&r[s="bottom"]&&(s="top"===s?"bottom":"top"):"left"!==s&&"right"!==s&&r[s="left"]&&(s="left"===s?"right":"left"),r[s]=!0;var l=new Bv(e,ya(i),[0,0],i.get("type"),s),h="category"===l.type;l.onBand=h&&i.get("boundaryGap"),l.inverse=i.get("inverse"),l.onZero=i.get("axisLine.onZero"),l.onZeroAxisIndex=i.get("axisLine.onZeroAxisIndex"),i.axis=l,l.model=i,l.grid=this,l.index=n,this._axesList.push(l),o[e][n]=l,a[e]++}}}var r={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},a={x:0,y:0};if(e.eachComponent("xAxis",n("x"),this),e.eachComponent("yAxis",n("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);this._axesMap=o,Uv(o.x,function(e,i){Uv(o.y,function(n,r){var o="x"+i+"y"+r,a=new qa(o);a.grid=this,a.model=t,this._coordsMap[o]=a,this._coordsList.push(a),a.addAxis(e),a.addAxis(n)},this)},this)},Yv._updateScale=function(t,e){function i(t,e,i){Uv(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,i)})}d(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(t){if(is(t)){var n=es(t),r=n[0],o=n[1];if(!Ka(r,e)||!Ka(o,e))return;var a=this.getCartesian(r.componentIndex,o.componentIndex),s=t.getData(),l=a.getAxis("x"),h=a.getAxis("y");"list"===s.type&&(i(s,l),i(s,h))}},this)},Yv.getTooltipAxes=function(t){var e=[],i=[];return Uv(this.getCartesians(),function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(r);l(e,r)<0&&e.push(r),l(i,o)<0&&i.push(o)}),{baseAxes:e,otherAxes:i}};var qv=["xAxis","yAxis"];Qa.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var o=new Qa(n,t,e);o.name="grid_"+r,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(t){if(is(t)){var e=es(t),i=e[0],n=e[1],r=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(i.componentIndex,n.componentIndex)}}),i},Qa.dimensions=Qa.prototype.dimensions=qa.prototype.dimensions,mr.register("cartesian2d",Qa);var $v=Math.PI,Kv=function(t,e){this.opt=e,this.axisModel=t,a(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Ec;var i=new Ec({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Kv.prototype={constructor:Kv,hasBuilder:function(t){return!!Qv[t]},add:function(t){Qv[t].call(this)},getGroup:function(){return this.group}};var Qv={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&($(r,r,n),$(a,a,n));var s=o({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Jf(Yi({anid:"line",shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var l=e.get("axisLine.symbol"),h=e.get("axisLine.symbolSize"),u=e.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof h&&"number"!=typeof h||(h=[h,h]);var c=h[0],f=h[1];d([{rotate:t.rotation+Math.PI/2,offset:u[0],r:0},{rotate:t.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=wa(l[i],-c/2,-f/2,c,f,s.stroke,!0),o=e.r+e.offset,a=[r[0]+o*Math.cos(t.rotation),r[1]-o*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:a,silent:!0}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var r=e.getModel("axisTick"),o=r.getModel("lineStyle"),s=r.get("length"),l=ey(r,i.labelInterval),h=n.getTicksCoords(r.get("alignWithLabel")),u=n.scale.getTicks(),c=e.get("axisLabel.showMinLabel"),d=e.get("axisLabel.showMaxLabel"),f=[],p=[],g=t._transform,m=[],v=h.length,y=0;y<v;y++)if(!ty(n,y,l,v,c,d)){var x=h[y];f[0]=x,f[1]=0,p[0]=x,p[1]=i.tickDirection*s,g&&($(f,f,g),$(p,p,g));var _=new Jf(Yi({anid:"tick_"+u[y],shape:{x1:f[0],y1:f[1],x2:p[0],y2:p[1]},style:a(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(_),m.push(_)}return m}}(this,t,e);!function(t,e,i){var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var o=e[0],a=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(os(o),os(h)):as(o,a)&&(n?(os(a),os(u)):(os(o),os(h))),!1===r?(os(s),os(c)):as(l,s)&&(r?(os(l),os(d)):(os(s),os(c)))}(t,function(t,e,i){var n=e.axis;if(T(i.axisLabelShow,e.get("axisLabel.show"))&&!n.scale.isBlank()){var r=e.getModel("axisLabel"),o=r.get("margin"),a=n.scale.getTicks(),s=e.getFormattedLabels(),l=(T(i.labelRotate,r.get("rotate"))||0)*$v/180,h=Jv(i.rotation,l,i.labelDirection),u=e.getCategories(),c=[],f=rs(e),p=e.get("triggerEvent"),g=e.get("axisLabel.showMinLabel"),m=e.get("axisLabel.showMaxLabel");return d(a,function(l,d){if(!ty(n,d,i.labelInterval,a.length,g,m)){var v=r;u&&u[l]&&u[l].textStyle&&(v=new Cn(u[l].textStyle,r,e.ecModel));var y=v.getTextColor()||e.get("axisLine.lineStyle.color"),x=[n.dataToCoord(l),i.labelOffset+i.labelDirection*o],_=n.scale.getLabel(l),w=new Gf({anid:"label_"+l,position:x,rotation:h.rotation,silent:f,z2:10});dn(w.style,v,{text:s[d],textAlign:v.getShallow("align",!0)||h.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||h.textVerticalAlign,textFill:"function"==typeof y?y("category"===n.type?_:"value"===n.type?l+"":l,d):y}),p&&(w.eventData=ns(e),w.eventData.targetType="axisLabel",w.eventData.value=_),t._dumbGroup.add(w),w.updateTransform(),c.push(w),t.group.add(w),w.decomposeTransform()}}),c}}(this,t,e),i)},axisName:function(){var t,e,i,n,r,a,s,l=this.opt,h=this.axisModel,u=T(l.axisName,h.get("name"));if(u){var c,d,f=h.get("nameLocation"),p=l.nameDirection,g=h.getModel("nameTextStyle"),m=h.get("nameGap")||0,v=this.axisModel.axis.getExtent(),y=v[0]>v[1]?-1:1,x=["start"===f?v[0]-y*m:"end"===f?v[1]+y*m:(v[0]+v[1])/2,ss(f)?l.labelOffset+p*m:0],_=h.get("nameRotate");null!=_&&(_=_*$v/180),ss(f)?c=Jv(l.rotation,null!=_?_:l.rotation,p):(t=f,e=v,r=Vn((_||0)-l.rotation),a=e[0]>e[1],s="start"===t&&!a||"start"!==t&&a,Fn(r-$v/2)?(n=s?"bottom":"top",i="center"):Fn(r-1.5*$v)?(n=s?"top":"bottom",i="center"):(n="middle",i=r<1.5*$v&&r>$v/2?s?"left":"right":s?"right":"left"),c={rotation:r,textAlign:i,textVerticalAlign:n},null!=(d=l.axisNameAvailableWidth)&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var w=g.getFont(),b=h.get("nameTruncate",!0)||{},S=b.ellipsis,M=T(l.nameTruncateMaxWidth,b.maxWidth,d),I=null!=S&&null!=M?Dp(u,M,w,S,{minChar:2,placeholder:b.placeholder}):u,C=h.get("tooltip",!0),D=h.mainType,A={componentType:D,name:u,$vars:["name"]};A[D+"Index"]=h.componentIndex;var k=new Gf({anid:"name",__fullText:u,__truncatedText:I,position:x,rotation:c.rotation,silent:rs(h),z2:1,tooltip:C&&C.show?o({content:u,formatter:function(){return u},formatterParams:A},C):null});dn(k.style,g,{text:I,textFont:w,textFill:g.getTextColor()||h.get("axisLine.lineStyle.color"),textAlign:c.textAlign,textVerticalAlign:c.textVerticalAlign}),h.get("triggerEvent")&&(k.eventData=ns(h),k.eventData.targetType="axisName",k.eventData.name=u),this._dumbGroup.add(k),k.updateTransform(),this.group.add(k),k.decomposeTransform()}}},Jv=Kv.innerTextLayout=function(t,e,i){var n,r,o=Vn(e-t);return Fn(o)?(r=i>0?"top":"bottom",n="center"):Fn(o-$v)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=o>0&&o<$v?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:r}},ty=Kv.ifIgnoreOnTick=function(t,e,i,n,r,o){if(0===e&&r||e===n-1&&o)return!1;var a,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?!i(a=s.getTicks()[e],s.getLabel(a)):e%(i+1))},ey=Kv.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i},iy=d,ny=v,ry=Fo({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=us(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=n.parse(a));var s=cs(i);null==o&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),r.value=a,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}(t),ry.superApply(this,"render",arguments),fs(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,r){fs(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),ry.superApply(this,"remove",arguments)},dispose:function(t,e){ps(this,e),ry.superApply(this,"dispose",arguments)}}),oy=[];ry.registerAxisPointerClass=function(t,e){oy[t]=e},ry.getAxisPointerClass=function(t){return t&&oy[t]};var ay=Kv.ifIgnoreOnTick,sy=Kv.getInterval,ly=["axisLine","axisTickLabel","axisName"],hy=["splitArea","splitLine"],uy=ry.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Ec,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),a=gs(o,t),s=new Kv(t,a);d(ly,s.add,s),this._axisGroup.add(s.getGroup()),d(hy,function(e){t.get(e+".show")&&this["_"+e](t,o,a.labelInterval)},this),Mn(r,this._axisGroup,t),uy.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var r=t.getModel("splitLine"),o=r.getModel("lineStyle"),s=o.get("color"),l=sy(r,i);s=y(s)?s:[s];for(var h=e.coordinateSystem.getRect(),u=n.isHorizontal(),c=0,d=n.getTicksCoords(),f=n.scale.getTicks(),p=t.get("axisLabel.showMinLabel"),g=t.get("axisLabel.showMaxLabel"),m=[],v=[],x=o.getLineStyle(),_=0;_<d.length;_++)if(!ay(n,_,l,d.length,p,g)){var w=n.toGlobalCoord(d[_]);u?(m[0]=w,m[1]=h.y,v[0]=w,v[1]=h.y+h.height):(m[0]=h.x,m[1]=w,v[0]=h.x+h.width,v[1]=w);var b=c++%s.length;this._axisGroup.add(new Jf(Yi({anid:"line_"+f[_],shape:{x1:m[0],y1:m[1],x2:v[0],y2:v[1]},style:a({stroke:s[b]},x),silent:!0})))}}},_splitArea:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var r=t.getModel("splitArea"),o=r.getModel("areaStyle"),s=o.get("color"),l=e.coordinateSystem.getRect(),h=n.getTicksCoords(),u=n.scale.getTicks(),c=n.toGlobalCoord(h[0]),d=n.toGlobalCoord(h[0]),f=0,p=sy(r,i),g=o.getAreaStyle();s=y(s)?s:[s];for(var m=t.get("axisLabel.showMinLabel"),v=t.get("axisLabel.showMaxLabel"),x=1;x<h.length;x++)if(!(ay(n,x,p,h.length,m,v)&&x<h.length-1)){var _,w,b,S,M=n.toGlobalCoord(h[x]);n.isHorizontal()?(_=c,w=l.y,b=M-_,S=l.height):(_=l.x,w=d,b=l.width,S=M-w);var I=f++%s.length;this._axisGroup.add(new Qf({anid:"area_"+u[x],shape:{x:_,y:w,width:b,height:S},style:a({fill:s[I]},g),silent:!0})),c=_+b,d=w+S}}}});uy.extend({type:"xAxis"}),uy.extend({type:"yAxis"}),Fo({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Qf({shape:t.coordinateSystem.getRect(),style:a({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Lo(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),No(Ov("line","circle","line")),Eo(zv("line")),Oo(tm.PROCESSOR.STATISTIC,{seriesType:"line",reset:function(t,e,i){var n=t.getData(),r=t.get("sampling"),o=t.coordinateSystem;if("cartesian2d"===o.type&&r){var a,s=o.getBaseAxis(),l=o.getOtherAxis(s),h=s.getExtent(),u=h[1]-h[0],c=Math.round(n.count()/u);c>1&&("string"==typeof r?a=Ev[r]:"function"==typeof r&&(a=r),a&&t.setData(n.downSample(l.dim,1/c,a,Nv)))}}}),bg.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ra(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),r=n.getLayout("offset"),o=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var cy=Ed([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),dy={getBarItemStyle:function(t){var e=cy(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},fy=["itemStyle","barBorderWidth"];o(Cn.prototype,dy),Go({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||this._render(t,e,i),this.group},dispose:R,_render:function(t,e,i){var n,r=this.group,o=t.getData(),a=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var h=t.isAnimationEnabled()?t:null;o.diff(a).add(function(e){if(o.hasValue(e)){var i=o.getItemModel(e),a=gy[s.type](o,e,i),l=py[s.type](o,e,i,a,n,h);o.setItemGraphicEl(e,l),r.add(l),xs(l,o,e,i,a,t,n,"polar"===s.type)}}).update(function(e,i){var l=a.getItemGraphicEl(i);if(o.hasValue(e)){var u=o.getItemModel(e),c=gy[s.type](o,e,u);l?xn(l,{shape:c},h,e):l=py[s.type](o,e,u,c,n,h,!0),o.setItemGraphicEl(e,l),r.add(l),xs(l,o,e,u,c,t,n,"polar"===s.type)}else r.remove(l)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===s.type?e&&vs(t,h,e):e&&ys(t,h,e)}).execute(),this._data=o},remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl(function(e){"sector"===e.type?ys(e.dataIndex,t,e):vs(e.dataIndex,t,e)}):i.removeAll()}});var py={cartesian2d:function(t,e,i,n,r,a,s){var l=new Qf({shape:o({},n)});if(a){var h=l.shape,u=r?"height":"width",c={};h[u]=0,c[u]=n[u],dp[s?"updateProps":"initProps"](l,{shape:c},a,e)}return l},polar:function(t,e,i,n,r,o,s){var l=n.startAngle<n.endAngle,h=new Xf({shape:a({clockwise:l},n)});if(o){var u=h.shape,c=r?"r":"endAngle",d={};u[c]=r?0:n.startAngle,d[c]=n[c],dp[s?"updateProps":"initProps"](h,{shape:d},o,e)}return h}},gy={cartesian2d:function(t,e,i){var n,r,o=t.getItemLayout(e),a=(n=o,r=i.get(fy)||0,Math.min(r,Math.abs(n.width),Math.abs(n.height))),s=o.width>0?1:-1,l=o.height>0?1:-1;return{x:o.x+s*a/2,y:o.y+l*a/2,width:o.width-s*a,height:o.height-l*a}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};Eo(v(function(t,e,i){var n=[];e.eachSeriesByType(t,function(t){t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type&&n.push(t)});var r=pa(n),o={};d(n,function(t){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=da(t),s=r[fa(n)][a],l=s.offset,h=s.width,u=i.getOtherAxis(n),c=t.get("barMinHeight")||0;o[a]=o[a]||[],e.setLayout({offset:l,size:h});for(var d=e.mapDimension(u.dim),f=e.mapDimension(n.dim),p=na(e,d,f),g=u.isHorizontal(),m=n.onZero||p?u.toGlobalCoord(u.dataToCoord(0)):u.getGlobalExtent()[0],v=0,y=e.count();v<y;v++){var x=e.get(d,v),_=e.get(f,v);if(!isNaN(x)){var w,b,S,M,I=x>=0?"p":"n",T=m;if(p&&(o[a][_]||(o[a][_]={p:m,n:m}),T=o[a][_][I]),g)w=T,b=(C=i.dataToPoint([x,_]))[1]+l,S=C[0]-m,M=h,Math.abs(S)<c&&(S=(S<0?-1:1)*c),p&&(o[a][_][I]+=S);else{var C=i.dataToPoint([_,x]);w=C[0]+l,b=T,S=h,M=C[1]-m,Math.abs(M)<c&&(M=(M<=0?-1:1)*c),p&&(o[a][_][I]+=M)}e.setItemLayout(v,{x:w,y:b,width:S,height:M})}}},this)},"bar")),No(function(t){t.eachSeriesByType("bar",function(t){t.getData().setVisual("legendSymbol","roundRect")})});var my={updateSelectedMap:function(t){this._targetList=y(t)?t.slice():[],this._selectTargetMap=p(t||[],function(t,e){return t.set(e.name,e),t},N())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},vy=Ho({type:"series.pie",init:function(t){vy.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){vy.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return function(t,e,i){e=y(e)&&{coordDimensions:e}||o({},e);var n=t.getSource(),r=Om(n,e),a=new km(r,t);return a.initData(n,i),a}(this,["value"])},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,r=t.count();n<r;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:Nr(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=vy.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Bn(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){qe(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,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"}});u(vy,my);var yy=bs.prototype;yy.updateData=function(t,e,i){function n(){s.stopAnimation(!0),s.animateTo({shape:{r:u.r+l.get("hoverOffset")}},300,"elasticOut")}function r(){s.stopAnimation(!0),s.animateTo({shape:{r:u.r}},300,"elasticOut")}var s=this.childAt(0),l=t.hostModel,h=t.getItemModel(e),u=t.getItemLayout(e),c=o({},u);c.label=null,i?(s.setShape(c),"scale"===l.getShallow("animationType")?(s.shape.r=u.r0,_n(s,{shape:{r:u.r}},l,e)):(s.shape.endAngle=u.startAngle,xn(s,{shape:{endAngle:u.endAngle}},l,e))):xn(s,{shape:c},l,e);var d=t.getItemVisual(e,"color");s.useStyle(a({lineJoin:"bevel",fill:d},h.getModel("itemStyle").getItemStyle())),s.hoverStyle=h.getModel("emphasis.itemStyle").getItemStyle();var f=h.getShallow("cursor");f&&s.attr("cursor",f),ws(this,t.getItemLayout(e),l.isSelected(null,e),l.get("selectedOffset"),l.get("animation")),s.off("mouseover").off("mouseout").off("emphasis").off("normal"),h.get("hoverAnimation")&&l.isAnimationEnabled()&&s.on("mouseover",n).on("mouseout",r).on("emphasis",n).on("normal",r),this._updateLabel(t,e),un(this)},yy._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");xn(i,{shape:{points:a.linePoints||[[a.x,a.y],[a.x,a.y],[a.x,a.y]]}},r,e),xn(n,{style:{x:a.x,y:a.y}},r,e),n.attr({rotation:a.rotation,origin:[a.x,a.y],z2:10});var l=o.getModel("label"),h=o.getModel("emphasis.label"),u=o.getModel("labelLine"),c=o.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");cn(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!a.inside},{textAlign:a.textAlign,textVerticalAlign:a.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},h(bs,Ec),Xr.extend({type:"pie",init:function(){var t=new Ec;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var r=t.getData(),o=this._data,a=this.group,s=e.get("animation"),l=!o,h=t.get("animationType"),u=v(_s,this.uid,t,s,i),c=t.get("selectedMode");if(r.diff(o).add(function(t){var e=new bs(r,t);l&&"scale"!==h&&e.eachChild(function(t){t.stopAnimation(!0)}),c&&e.on("click",u),r.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(r,t),i.off("click"),c&&i.on("click",u),a.add(i),r.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),s&&l&&r.count()>0&&"scale"!==h){var d=r.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(a.removeClipPath,a);a.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}this._data=r}},dispose:function(){},_createClipPath:function(t,e,i,n,r,o,a){var s=new Xf({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return _n(s,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},a,o),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,r=t[1]-i.cy,o=Math.sqrt(n*n+r*r);return o<=i.r&&o>=i.r0}}});var xy=function(t,e,i,n){var r,o,a=t.getData(),s=[],l=!1;a.each(function(i){var n,h,u,c,d=a.getItemLayout(i),f=a.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);r=d.cx,o=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+r,M=(b?(d.r+d.r0)/2*w:d.r*w)+o;if(n=S+3*_,h=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),C=I+(_<0?-1:1)*y;n=C+(_<0?-5:5),h=T,u=[[S,M],[I,T],[C,T]]}c=b?"center":_>0?"left":"right"}var D=p.getFont(),A=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=ne(t.getFormattedLabel(i,"normal")||a.getName(i),D,c,"top");l=!!A,d.label={x:n,y:h,position:g,height:k.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:A,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&function(t,e,i,n,r,o){for(var a=[],s=[],l=0;l<t.length;l++)t[l].x<e?a.push(t[l]):s.push(t[l]);for(Ss(s,e,i,n,1,0,o),Ss(a,e,i,n,-1,0,o),l=0;l<t.length;l++){var h=t[l].linePoints;if(h){var u=h[1][0]-h[2][0];t[l].x<e?h[2][0]=t[l].x+3:h[2][0]=t[l].x-3,h[1][1]=h[2][1]=t[l].y,h[1][0]=h[2][0]+u}}}(s,r,o,e,0,n)},_y=2*Math.PI,wy=Math.PI/180;d([{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}],function(t){t.update="updateView",zo(t,function(e,i){var n={};return i.eachComponent({mainType:"series",subType:"pie",query:e},function(i){i[t.method]&&i[t.method](e.name,e.dataIndex);var r=i.getData();r.each(function(t){var e=r.getName(t);n[e]=i.isSelected(e)||!1})}),{name:e.name,selected:n}})}),No({getTargetSeries:function(t){var e={},i=N();return t.eachSeriesByType("pie",function(t){t.__paletteScope=e,i.set(t.uid,t)}),i},reset:function(t,e){var i=t.getRawData(),n={},r=t.getData();r.each(function(t){var e=r.getRawIndex(t);n[e]=t}),i.each(function(e){var o=n[e],a=null!=o&&r.getItemVisual(o,"color",!0);if(a)i.setItemVisual(e,"color",a);else{var s=i.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());i.setItemVisual(e,"color",s),null!=o&&r.setItemVisual(o,"color",s)}})}}),Eo(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),r=t.get("center"),o=t.get("radius");y(o)||(o=[0,o]),y(r)||(r=[r,r]);var a=i.getWidth(),s=i.getHeight(),l=Math.min(a,s),h=Ln(r[0],a),u=Ln(r[1],s),c=Ln(o[0],l/2),d=Ln(o[1],l/2),f=-t.get("startAngle")*wy,p=t.get("minAngle")*wy,g=0;e.each(n,function(t){!isNaN(t)&&g++});var m=e.getSum(n),v=Math.PI/(m||g)*2,x=t.get("clockwise"),_=t.get("roseType"),w=t.get("stillShowZeroSum"),b=e.getDataExtent(n);b[0]=0;var S=_y,M=0,I=f,T=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))e.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:h,cy:u,r0:c,r:_?NaN:d});else{(n="area"!==_?0===m&&w?v:t*v:_y/g)<p?(n=p,S-=p):M+=t;var r=I+T*n;e.setItemLayout(i,{angle:n,startAngle:I,endAngle:r,clockwise:x,cx:h,cy:u,r0:c,r:_?Pn(t,b,[c,d]):d}),I=r}}),S<_y&&g)if(S<=.001){var C=_y/g;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=C,n.startAngle=f+T*i*C,n.endAngle=f+T*(i+1)*C}})}else v=S/M,I=f,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),r=n.angle===p?p:t*v;n.startAngle=I,n.endAngle=I+T*r,I+=T*r}});xy(t,d,0,s)})},"pie")),Oo({seriesType:"pie",reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),r=0;r<i.length;r++)if(!i[r].isSelected(e))return!1;return!0})}}}),bg.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return ra(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},progressive:null}});var by=Wi({shape:{points:null},symbolProxy:null,buildPath:function(t,e){var i=e.points,n=e.size,r=this.symbolProxy,o=r.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var a=0;a<i.length;){var s=i[a++],l=i[a++];isNaN(s)||isNaN(l)||(o.x=s-n[0]/2,o.y=l-n[1]/2,o.width=n[0],o.height=n[1],r.buildPath(t,o,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var r=0;r<i.length;){var o=i[r++],a=i[r++];isNaN(o)||isNaN(a)||t.fillRect(o-n[0]/2,a-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,r=i.size,o=Math.max(r[0],4),a=Math.max(r[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,h=n[l]-o/2,u=n[l+1]-a/2;if(t>=h&&e>=u&&t<=h+o&&e<=u+a)return s}return-1}}),Sy=Ms.prototype;Sy.isPersistent=function(){return!this._incremental},Sy.updateData=function(t){this.group.removeAll();var e=new by({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},Sy.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},Sy.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Gi({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Sy.incrementalUpdate=function(t,e){var i;this._incremental?(i=new by,this._incremental.addDisplayable(i,!0)):((i=new by({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},Sy._setCommon=function(t,e,i){var n=e.hostModel,r=e.getVisual("symbolSize");t.setShape("size",r instanceof Array?r:[r,r]),t.symbolProxy=wa(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=e.getVisual("color");a&&t.setColor(a),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},Sy.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Sy._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Go({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=zv().reset(t);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Ms:new Pa,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),No(Ov("scatter","circle")),Eo(zv("scatter")),Lo(function(t){var e=t.graphic;y(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var My=Vo({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,My.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,r=(e?i:t).elements,a=i.elements=e?[]:i.elements,s=[];this._flatten(r,s);var l=Ke(a,s);Qe(l);var h=this._elOptionsToUpdate=[];d(l,function(t,e){var i,r,s,l,u,c,d,f,p=t.option;p&&(h.push(p),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,p),s=a,l=e,c=o({},u=p),d=s[l],"merge"===(f=u.$action||"merge")?d?(n(d,c,!0),ir(d,c,{ignoreSize:!0}),rr(u,d)):s[l]=c:"replace"===f?s[l]=c:"remove"===f&&d&&(s[l]=null),i=a[e],r=p,i&&(i.hv=r.hv=[Cs(r,["left","right"]),Cs(r,["top","bottom"])],"group"===i.type&&(null==i.width&&(i.width=r.width=0),null==i.height&&(i.height=r.height=0))))},this);for(var u=a.length-1;u>=0;u--)null==a[u]?a.splice(u,1):delete a[u].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Fo({type:"graphic",init:function(t,e){this._elMap=N(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,r=this.group;d(i,function(t){var e=t.$action,i=t.id,a=n.get(i),s=t.parentId,l=null!=s?n.get(s):r;if("text"===t.type){var h=t.style;t.hv&&t.hv[1]&&(h.textVerticalAlign=h.textBaseline=null),!h.hasOwnProperty("textFill")&&h.fill&&(h.textFill=h.fill),!h.hasOwnProperty("textStroke")&&h.stroke&&(h.textStroke=h.stroke)}var u,c=(u=o({},u=t),d(["id","parentId","$action","hv","bounding"].concat(Lp),function(t){delete u[t]}),u);e&&"merge"!==e?"replace"===e?(Ts(a,n),Is(i,l,c,n)):"remove"===e&&Ts(a,n):a?a.attr(c):Is(i,l,c,n);var f=n.get(i);f&&(f.__ecGraphicWidth=t.width,f.__ecGraphicHeight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,r=this._elMap,o=i.length-1;o>=0;o--){var a=i[o],s=r.get(a.id);if(s){var l=s.parent;er(s,a,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:a.hv,boundingMode:a.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Ts(e,t)}),this._elMap=N()},dispose:function(){this._clear()}});var Iy=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var o=i.getData(),a=ei(o,t);if(null==a||a<0||y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(f(l.dimensions,function(t){return o.mapDimension(t)}),a,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},Ty=d,Cy=v,Dy=ii(),Ay=(Vo({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),ii()),ky=d,Py=Fo({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Os("axisPointer",i,function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Ns(e.getZr(),"axisPointer"),Py.superApply(this._model,"remove",arguments)},dispose:function(t,e){Ns("axisPointer",e),Py.superApply(this._model,"dispose",arguments)}}),Ly=ii(),Oy=i,zy=m;(Rs.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=v(Bs,e,u);this.updatePointerEl(a,l,c,e),this.updateLabelEl(a,l,c,e)}else a=this._group=new Ec,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),i.getZr().add(a);Hs(a,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(r&&n.getBandWidth()>a)return!0;if(o){var s=us(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===i},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var o=Ly(t).pointerEl=new dp[r.type](Oy(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var r=Ly(t).labelEl=new Qf(Oy(e.label));t.add(r),Vs(r,n)}},updatePointerEl:function(t,e,i){var n=Ly(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=Ly(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),Vs(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,o=i.getModel("handle"),a=i.get("status");if(!o.get("show")||!a||"hide"===a)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Tn(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){cd(t.event)},onmousedown:zy(this._onHandleDragMove,this,0,0),drift:zy(this._onHandleDragMove,this),ondragend:zy(this._onHandleDragEnd,this)}),n.add(r)),Hs(r,i,!1);r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");y(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),Qr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){Bs(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Fs(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Fs(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Fs(n)),Ly(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=Rs,si(Rs);var Ey=Rs.extend({makeElOption:function(t,e,i,n,r){var o,a,s,l,h,u,c,d,f,p,g,m=i.axis,v=m.grid,y=n.get("type"),x=Us(v,m).getOtherAxis(m).getGlobalExtent(),_=m.toGlobalCoord(m.dataToCoord(e,!0));if(y&&"none"!==y){var w=(s=(o=n).get("type"),l=o.getModel(s+"Style"),"line"===s?(a=l.getLineStyle()).fill=null:"shadow"===s&&((a=l.getAreaStyle()).stroke=null),a),b=Ny[y](m,_,x,w);b.style=w,t.graphicKey=b.type,t.pointer=b}h=e,u=t,c=gs(v.model,i),d=i,f=n,p=r,g=Kv.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=f.get("label.margin"),Gs(u,d,f,p,{position:Zs(d.axis,h,c),align:g.textAlign,verticalAlign:g.textVerticalAlign})},getHandleTransform:function(t,e,i){var n=gs(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Zs(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,o=r.grid,a=r.getGlobalExtent(!0),s=Us(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(a[1],h[l]),h[l]=Math.max(a[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}}),Ny={line:function(t,e,i,n){var r,o,a,s=(r=[e,i[0]],o=[e,i[1]],a=Xs(t),{x1:r[a=a||0],y1:r[1-a],x2:o[a],y2:o[1-a]});return Yi({shape:s,style:n}),{type:"Line",shape:s}},shadow:function(t,e,i,n){var r,o,a,s=t.getBandWidth(),l=i[1]-i[0];return{type:"Rect",shape:(r=[e-s/2,i[0]],o=[s,l],a=Xs(t),{x:r[a=a||0],y:r[1-a],width:o[a],height:o[1-a]})}}};ry.registerAxisPointerClass("CartesianAxisPointer",Ey),Lo(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Oo(tm.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ls(t,e)}),zo({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n,r,o,a=t.currTrigger,s=[t.x,t.y],l=t,h=t.dispatchAction||m(i.dispatchAction,i),u=e.getComponent("axisPointer").coordSysAxesInfo;if(u){Ls(s)&&(s=Iy({seriesIndex:l.seriesIndex,dataIndex:l.dataIndex},e).point);var c=Ls(s),f=l.axesInfo,p=u.axesInfo,g="leave"===a||Ls(s),v={},y={},x={list:[],map:{}},_={showPointer:Cy(As,y),showTooltip:Cy(ks,x)};Ty(u.coordSysMap,function(t,e){var i=c||t.containPoint(s);Ty(u.coordSysAxesInfo[e],function(t,e){var n=t.axis,r=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(f,t);if(!g&&i&&(!f||r)){var o=r&&r.value;null!=o||c||(o=n.pointToData(s)),null!=o&&Ds(t,o,_,!1,v)}})});var w={};return Ty(p,function(t,e){var i=t.linkGroup;i&&!y[e]&&Ty(i.axesInfo,function(e,n){var r=y[n];if(e!==t&&r){var o=r.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Ps(e),Ps(t)))),w[t.key]=o}})}),Ty(w,function(t,e){Ds(p[e],t,_,!0,v)}),n=y,r=p,o=v.axesInfo=[],Ty(r,function(t,e){var i=t.axisPointerModel.option,r=n[e];r?(!t.useHandle&&(i.status="show"),i.value=r.value,i.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}),function(t,e,i,n){if(!Ls(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}(x,s,t,h),function(t,e,i){var n=i.getZr(),r=Dy(n).axisPointerLastHighlights||{},o=Dy(n).axisPointerLastHighlights={};Ty(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Ty(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t})});var a=[],s=[];d(r,function(t,e){!o[e]&&s.push(t)}),d(o,function(t,e){!r[e]&&a.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),a.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:a})}(p,0,i),v}}),Vo({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var Ry=d,By=Xn,Vy=["","-webkit-","-moz-","-o-"];Ys.prototype={constructor:Ys,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+js(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var Fy=m,Hy=d,Gy=Ln,Wy=new Qf({shape:{x:-1,y:-1,width:2,height:2}});Fo({type:"tooltip",init:function(t,e){if(!ku.node){var i=new Ys(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!ku.node&&!ku.wxa){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");Os("itemTooltip",this._api,Fy(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!ku.node){var r=$s(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var a=Wy;a.position=[n.x,n.y],a.update(),a.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:a},r)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=Iy(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},r))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide($s(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,o=n.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===(t=qs([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,r=[e.offsetX,e.offsetY],o=[],a=[],s=qs([e.tooltipOption,n]);Hy(t,function(t){Hy(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=Ws(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(o){var l=i.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=xa(e.axis,n),u.axisValueLabel=s,u&&(a.push(u),r.push(l.formatTooltip(h,!0)))});var l=s;o.push((l?jn(l)+"<br />":"")+r.join("<br />"))}})},this),o.reverse(),o=o.join("<br /><br />");var l=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,r[0],r[1],this._tooltipContent,a):this._showTooltipContent(s,o,a,Math.random(),r[0],r[1],l)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,o=n.getSeriesByIndex(r),a=e.dataModel||o,s=e.dataIndex,l=e.dataType,h=a.getData(),u=qs([h.getItemModel(s),a,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=a.getDataParams(s,l),f=a.formatTooltip(s,!1,l),p="item_"+a.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,f,d,p,t.offsetX,t.offsetY,t.position,t.target)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new Cn(n,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random();this._showOrMove(r,function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,o,a,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var u=e;if(h&&"string"==typeof h)u=Yn(h,i,!0);else if("function"==typeof h){var c=Fy(function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,a,r,o,l,i,s))},this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,a,r,o,l,i,s)}},_updatePosition:function(t,e,i,n,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h,u,c,d,f,p,g,m,v,x,_,b,S,M,I,T,C,D,A=r.getSize(),k=t.get("align"),P=t.get("verticalAlign"),L=a&&a.getBoundingRect().clone();if(a&&L.applyTransform(a.transform),"function"==typeof e&&(e=e([i,n],o,r.el,L,{viewSize:[s,l],contentSize:A.slice()})),y(e))i=Gy(e[0],s),n=Gy(e[1],l);else if(w(e)){e.width=A[0],e.height=A[1];var O=tr(e,{width:s,height:l});i=O.x,n=O.y,k=null,P=null}else"string"==typeof e&&a?(i=(z=function(t,e,i){var n=i[0],r=i[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-n/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-n/2,a=e.y-r-5;break;case"bottom":o=e.x+s/2-n/2,a=e.y+l+5;break;case"left":o=e.x-n-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+5,a=e.y+l/2-r/2}return[o,a]}(e,L,A))[0],n=z[1]):(i=(h=i,u=n,c=r.el,d=s,f=l,p=k?null:20,g=P?null:20,m=Ks(c),v=m.width,x=m.height,null!=p&&(h+v+p>d?h-=v+p:h+=p),null!=g&&(u+x+g>f?u-=x+g:u+=g),z=[h,u])[0],n=z[1]);if(k&&(i-=Qs(k)?A[0]/2:"right"===k?A[0]:0),P&&(n-=Qs(P)?A[1]/2:"bottom"===P?A[1]:0),t.get("confine")){var z=(_=i,b=n,S=r.el,M=s,I=l,T=Ks(S),C=T.width,D=T.height,_=Math.min(_+C,M)-C,b=Math.min(b+D,I)-D,[_=Math.max(_,0),b=Math.max(b,0)]);i=z[0],n=z[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&Hy(e,function(e,n){var r=e.dataByAxis||{},o=(t[n]||{}).dataByAxis||[];(i&=r.length===o.length)&&Hy(r,function(t,e){var n=o[e]||{},r=t.seriesDataIndices||[],a=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===a.length)&&Hy(r,function(t,e){var n=a[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){ku.node||(this._tooltipContent.hide(),Ns("itemTooltip",e))}}),zo({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),zo({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var Zy=Vo({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){Zy.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var r,o=n.name;if(i.push(o),n.legendDataProvider){var a=n.legendDataProvider(),s=a.mapArray(a.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):r=!0}else r=!0;r&&Je(n)&&e.push(n.name)}),this._availableNames=i;var n=f(this.get("data")||e,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Cn(t,this,this.ecModel)},this);this._data=n},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&d(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])&&l(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});zo("legendToggleSelect","legendselectchanged",v(Js,"toggleSelected")),zo("legendSelect","legendselected",v(Js,"select")),zo("legendUnSelect","legendunselected",v(Js,"unSelect"));var Uy=v,Xy=d,jy=Ec,Yy=Fo({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new jy),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var r=t.getBoxLayoutParams(),o={width:i.getWidth(),height:i.getHeight()},s=t.get("padding"),l=tr(r,o,s),h=this.layoutInner(t,n,l),u=tr(a({width:h.width,height:h.height},r),o,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=tl(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var r=this.getContentGroup(),o=N(),a=e.get("selectedMode");Xy(e.getData(),function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!o.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var f=c.getVisual("legendSymbol")||"roundRect",p=c.getVisual("symbol");this._createItem(h,l,s,e,f,p,t,d,a).on("click",Uy(el,h,n)).on("mouseover",Uy(il,u,null,n)).on("mouseout",Uy(nl,u,null,n)),o.set(h,!0)}else i.eachRawSeries(function(i){if(!o.get(h)&&i.legendDataProvider){var r=i.legendDataProvider(),u=r.indexOfName(h);if(u<0)return;var c=r.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,a).on("click",Uy(el,h,n)).on("mouseover",Uy(il,i,h,n)).on("mouseout",Uy(nl,i,h,n)),o.set(h,!0)}},this)}else r.add(new jy({newline:!0}))},this)},_createItem:function(t,e,i,n,r,a,s,l,h){var u=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.isSelected(t),p=new jy,g=i.getModel("textStyle"),m=i.get("icon"),v=i.getModel("tooltip"),y=v.parentModel;if(r=m||r,p.add(wa(r,0,0,u,c,f?l:d,!0)),!m&&a&&(a!==r||"none"==a)){var x=.8*c;"none"===a&&(a="circle"),p.add(wa(a,(u-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?u+5:-5,w=s,b=n.get("formatter"),S=t;"string"==typeof b&&b?S=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(S=b(t)),p.add(new Gf({style:dn({},g,{text:S,x:_,y:c/2,textFill:f?g.getTextColor():d,textAlign:w,textVerticalAlign:"middle"})}));var M=new Qf({shape:p.getBoundingRect(),invisible:!0,tooltip:v.get("show")?o({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},v.option):null});return p.add(M),p.eachChild(function(t){t.silent=!0}),M.silent=!h,this.getContentGroup().add(p),un(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();zp(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var r=n.getBoundingRect();return n.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()}});Oo(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}),Rp.registerSubTypeDefaulter("legend",function(){return"plain"});var qy=Zy.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,i,n){var r=nr(t);qy.superCall(this,"init",t,e,i,n),rl(this,t,r)},mergeOption:function(t,e){qy.superCall(this,"mergeOption",t,e),rl(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}}),$y=Ec,Ky=["width","height"],Qy=["x","y"],Jy=Yy.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){Jy.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new $y),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new $y),this._showController},resetInner:function(){Jy.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n){function r(t,i){var r=t+"DataIndex",l=Tn(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:m(o._pageGo,o,r,e,n)},{x:-s[0]/2,y:-s[1]/2,width:s[0],height:s[1]});l.name=t,a.add(l)}var o=this;Jy.superCall(this,"renderInner",t,e,i,n);var a=this._controllerGroup,s=e.get("pageIconSize",!0);y(s)||(s=[s,s]),r("pagePrev",0);var l=e.getModel("pageTextStyle");a.add(new Gf({name:"pageText",style:{textFill:l.getTextColor(),font:l.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),r("pageNext",1)},layoutInner:function(t,e,i){var n=this.getContentGroup(),r=this._containerGroup,o=this._controllerGroup,a=t.getOrient().index,s=Ky[a],l=Ky[1-a],h=Qy[1-a];zp(t.get("orient"),n,t.get("itemGap"),a?i.width:null,a?null:i.height),zp("horizontal",o,t.get("pageButtonItemGap",!0));var u=n.getBoundingRect(),c=o.getBoundingRect(),d=this._showController=u[s]>i[s],f=[-u.x,-u.y];f[a]=n.position[a];var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[a]+=i[s]-c[s]:p[a]+=c[s]+m),g[1-a]+=u[l]/2-c[l]/2,n.attr("position",f),r.attr("position",p),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-a]),r.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],r.setClipPath(new Qf({shape:y})),r.__rectSize=y[s]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&xn(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var r=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var n=i.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;n&&r&&n.setStyle("text",_(r)?r.replace("{current}",a).replace("{total}",s):r({current:a,total:s}))},_getPageInfo:function(t){function e(t){var e=t.getBoundingRect().clone();return e[f]+=t.position[u],e}var i,n,r,o,a=t.get("scrollDataIndex",!0),s=this.getContentGroup(),l=s.getBoundingRect(),h=this._containerGroup.__rectSize,u=t.getOrient().index,c=Ky[u],d=Ky[1-u],f=Qy[u],p=s.position.slice();this._showController?s.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=s.childAt(0);var g=h?Math.ceil(l[c]/h):0;if(o){var m=o.getBoundingRect(),v=o.position[u]+m[f];p[u]=-v-l[f],i=Math.floor(g*(v+m[f]+h/2)/l[c]),i=l[c]&&g?Math.max(0,Math.min(g-1,i)):-1;var y={x:0,y:0};y[c]=h,y[d]=l[d],y[f]=-p[u]-l[f];var x,_=s.children();if(s.eachChild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),r=t.__legendDataIndex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(r=null)}),null!=x){var w=e(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legendDataIndex}}}return{contentPosition:p,pageIndex:i,pageCount:g,pagePrevDataIndex:n,pageNextDataIndex:r}}});zo("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})}),Vo({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Fo({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=t.get("textBaseline"),l=new Gf({style:dn({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new Gf({style:dn({},o,{text:u,textFill:o.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink");l.silent=!d,c.silent=!f,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),n.add(l),u&&n.add(c);var p=n.getBoundingRect(),g=t.getBoxLayoutParams();g.width=p.width,g.height=p.height;var m=tr(g,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var v={textAlign:a,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),p=n.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new Qf({shape:{x:p.x-y[3],y:p.y-y[0],width:p.width+y[1]+y[3],height:p.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});qi(_),n.add(_)}}});var tx=Un,ex=jn,ix=Vo({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(ku.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var r=this.constructor,a=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType),s=t[a];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ol(i),d(i.data,function(t){t instanceof Array?(ol(t[0]),ol(t[1])):ol(t)}),o(s=new r(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[a]=s):t[a]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,tx).join(", "):tx(i),r=e.getName(t),o=ex(this.name);return(null!=i||r)&&(o+="<br />"),r&&(o+=ex(r),null!=i&&(o+=" : ")),null!=i&&(o+=ex(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});u(ix,xg),ix.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var nx=l,rx=v,ox={min:rx(al,"min"),max:rx(al,"max"),average:rx(al,"average")},ax=Fo({type:"marker",init:function(){this.markerGroupMap=N()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var r=this.type+"Model";e.eachSeries(function(t){var n=t[r];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});ax.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(dl(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.id,s=t.getData(),l=this.markerGroupMap,h=l.get(o)||l.set(o,new Pa),u=function(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return a({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new km(n,i),o=f(i.get("data"),v(sl,e));return t&&(o=g(o,v(hl,t))),r.initData(o,null,t?ul:function(t){return t.value}),r}(r,t,e);e.setData(u),dl(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||s.getVisual("color"),symbol:i.getShallow("symbol")})}),h.updateData(u),this.group.add(h.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),h.__keep=!0,h.group.silent=e.get("silent")||t.get("silent")}}),Lo(function(t){t.markPoint=t.markPoint||{}}),ix.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var sx=Jf.prototype,lx=ep.prototype,hx=Wi({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(fl(e)?sx:lx).buildPath(t,e)},pointAt:function(t){return fl(this.shape)?sx.pointAt.call(this,t):lx.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=fl(e)?[e.x2-e.x1,e.y2-e.y1]:lx.tangentAt.call(this,t);return j(i,i)}}),ux=["fromSymbol","toSymbol"],cx=vl.prototype;cx.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,r=this.parent;r;)r.scale&&(n/=r.scale[0]),r=r.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var a=o.shape.percent,s=o.pointAt(0),l=o.pointAt(a),h=W([],l,s);if(j(h,h),t&&(t.attr("position",s),u=o.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(u[1],u[0])),t.attr("scale",[n*a,n*a])),e){e.attr("position",l);var u=o.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(u[1],u[0])),e.attr("scale",[n*a,n*a])}if(!i.ignore){i.attr("position",l);var c,d,f,p=5*n;if("end"===i.__position)c=[h[0]*p+l[0],h[1]*p+l[1]],d=h[0]>.8?"left":h[0]<-.8?"right":"center",f=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===i.__position){var g=a/2,m=[(u=o.tangentAt(g))[1],-u[0]],v=o.pointAt(g);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]),c=[v[0]+m[0]*p,v[1]+m[1]*p],d="center",f="bottom";var y=-Math.atan2(u[1],u[0]);l[0]<s[0]&&(y=Math.PI+y),i.attr("rotation",y)}else c=[-h[0]*p+s[0],-h[1]*p+s[1]],d=h[0]>.8?"right":h[0]<-.8?"left":"center",f=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n]})}}}},cx._createLine=function(t,e,i){var n,r,o=t.hostModel,a=(n=t.getItemLayout(e),ml((r=new hx({name:"line"})).shape,n),r);a.shape.percent=0,_n(a,{shape:{percent:1}},o,e),this.add(a);var s=new Gf({name:"label"});this.add(s),d(ux,function(i){var n=gl(i,t,e);this.add(n),this[pl(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},cx.updateData=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=t.getItemLayout(e),a={shape:{}};ml(a.shape,o),xn(r,a,n,e),d(ux,function(i){var n=t.getItemVisual(e,i),r=pl(i);if(this[r]!==n){this.remove(this.childOfName(i));var o=gl(i,t,e);this.add(o)}this[r]=n},this),this._updateCommonStl(t,e,i)},cx._updateCommonStl=function(t,e,i){var n=t.hostModel,r=this.childOfName("line"),o=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,h=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);o=u.getModel("lineStyle").getLineStyle(),s=u.getModel("emphasis.lineStyle").getLineStyle(),l=u.getModel("label"),h=u.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),o.opacity,1);r.useStyle(a({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},o)),r.hoverStyle=s,d(ux,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m,v=l.getShallow("show"),y=h.getShallow("show"),x=this.childOfName("label");if(v||y){if(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType))){var _=n.getRawValue(e);g=null==_?t.getName(e):isFinite(_)?On(_):_}m=C(n.getFormattedLabel(e,"emphasis",t.dataType),g)}if(v){var w=dn(x.style,l,{text:g},{autoColor:p});x.__textAlign=w.textAlign,x.__verticalAlign=w.textVerticalAlign,x.__position=l.get("position")||"middle"}else x.setStyle("text",null);x.hoverStyle=y?{text:m,textFill:h.getTextColor(!0),fontStyle:h.getShallow("fontStyle"),fontWeight:h.getShallow("fontWeight"),fontSize:h.getShallow("fontSize"),fontFamily:h.getShallow("fontFamily")}:{text:null},x.ignore=!v&&!y,un(this)},cx.highlight=function(){this.trigger("emphasis")},cx.downplay=function(){this.trigger("normal")},cx.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},cx.setLinePoints=function(t){var e=this.childOfName("line");ml(e.shape,t),e.dirty()},h(vl,Ec);var dx=yl.prototype;dx.isPersistent=function(){return!0},dx.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var r=xl(t);t.diff(n).add(function(i){!function(t,e,i,n){if(wl(e.getItemLayout(i))){var r=new t._ctor(e,i,n);e.setItemGraphicEl(i,r),t.group.add(r)}}(e,t,i,r)}).update(function(i,o){var a,s,l,h,u,c;a=e,s=t,l=o,h=i,u=r,c=n.getItemGraphicEl(l),wl(s.getItemLayout(h))?(c?c.updateData(s,h,u):c=new a._ctor(s,h,u),s.setItemGraphicEl(h,c),a.group.add(c)):a.group.remove(c)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},dx.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},dx.incrementalPrepareUpdate=function(t){this._seriesScope=xl(t),this._lineData=null,this.group.removeAll()},dx.incrementalUpdate=function(t,e){for(var i=t.start;i<t.end;i++)if(wl(e.getItemLayout(i))){var n=new this._ctor(e,i,this._seriesScope);n.traverse(function(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}),this.group.add(n)}},dx.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},dx._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var fx=function(t,e,r,a){var s=t.getData(),l=a.type;if(!y(a)&&("min"===l||"max"===l||"average"===l||null!=a.xAxis||null!=a.yAxis)){var h,u;if(null!=a.yAxis||null!=a.xAxis)h=null!=a.yAxis?"y":"x",e.getAxis(h),u=T(a.yAxis,a.xAxis);else{var c=ll(a,s,e,t);h=c.valueDataDim,c.valueAxis,u=cl(s,h,l)}var d="x"===h?0:1,f=1-d,p=i(a),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=r.get("precision");m>=0&&"number"==typeof u&&(u=+u.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=u,a=[p,g,{type:l,valueIndex:a.valueIndex,value:u}]}return(a=[sl(t,a[0]),sl(t,a[1]),o({},a[2])])[2].type=a[2].type||"",n(a[2],a[0]),n(a[2],a[1]),a};ax.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),r=e.__from,o=e.__to;r.each(function(e){Il(r,e,!0,t,i),Il(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function r(e,i,r){var o=e.getItemModel(i);Il(e,i,r,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||_[r?0:1],symbol:o.get("symbol",!0)||x[r?0:1],color:o.get("itemStyle.color")||l.getVisual("color")})}var o=t.coordinateSystem,s=t.id,l=t.getData(),h=this.markerGroupMap,u=h.get(s)||h.set(s,new yl);this.group.add(u.group);var c=function(t,e,i){var n;n=t?f(t&&t.dimensions,function(t){return a({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new km(n,i),o=new km(n,i),s=new km([],i),l=f(i.get("data"),v(fx,e,t,i));t&&(l=g(l,v(Ml,t)));var h=t?ul:function(t){return t.value};return r.initData(f(l,function(t){return t[0]}),null,h),o.initData(f(l,function(t){return t[1]}),null,h),s.initData(f(l,function(t){return t[2]})),s.hasItemOption=!0,{from:r,to:o,line:s}}(o,t,e),d=c.from,p=c.to,m=c.line;e.__from=d,e.__to=p,e.setData(m);var x=e.get("symbol"),_=e.get("symbolSize");y(x)||(x=[x,x]),"number"==typeof _&&(_=[_,_]),c.from.each(function(t){r(d,t,!0),r(p,t,!1)}),m.each(function(t){var e=m.getItemModel(t).get("lineStyle.color");m.setItemVisual(t,{color:e||d.getItemVisual(t,"color")}),m.setItemLayout(t,[d.getItemLayout(t),p.getItemLayout(t)]),m.setItemVisual(t,{fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolSize:p.getItemVisual(t,"symbolSize"),toSymbol:p.getItemVisual(t,"symbol")})}),u.updateData(m),c.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Lo(function(t){t.markLine=t.markLine||{}}),ix.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var px=function(t,e,i,n){var o=sl(t,n[0]),a=sl(t,n[1]),s=T,l=o.coord,h=a.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),h[0]=s(h[0],1/0),h[1]=s(h[1],1/0);var u=r([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u},gx=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];ax.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var r=f(gx,function(r){return Al(n,e,r,t,i)});n.setItemLayout(e,r),n.getItemGraphicEl(e).setShape("points",r)})}},this)},renderSeries:function(t,e,i,n){var r=t.coordinateSystem,o=t.name,s=t.getData(),l=this.markerGroupMap,h=l.get(o)||l.set(o,{group:new Ec});this.group.add(h.group),h.__keep=!0;var u=function(t,e,i){var n,r;t?(n=f(t&&t.dimensions,function(t){var i=e.getData();return a({name:t},i.getDimensionInfo(i.mapDimension(t))||{})}),r=new km(f(["x0","y0","x1","y1"],function(t,e){return{name:t,type:n[e%2].type}}),i)):r=new km(n=[{name:"value",type:"float"}],i);var o=f(i.get("data"),v(px,e,t,i));t&&(o=g(o,v(Dl,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return r.initData(o,null,s),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each(function(e){u.setItemLayout(e,f(gx,function(i){return Al(u,e,i,t,n)})),u.setItemVisual(e,{color:s.getVisual("color")})}),u.diff(h.__data).add(function(t){var e=new $f({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),h.group.add(e)}).update(function(t,i){var n=h.__data.getItemGraphicEl(i);xn(n,{shape:{points:u.getItemLayout(t)}},e,t),h.group.add(n),u.setItemGraphicEl(t,n)}).remove(function(t){var e=h.__data.getItemGraphicEl(t);h.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,i){var n=u.getItemModel(i),r=n.getModel("label"),o=n.getModel("emphasis.label"),s=u.getItemVisual(i,"color");t.useStyle(a(n.getModel("itemStyle").getItemStyle(),{fill:Dt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),cn(t.style,t.hoverStyle,r,o,{labelFetcher:e,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:s}),un(t,{}),t.dataModel=e}),h.__data=u,h.group.silent=e.get("silent")||t.get("silent")}}),Lo(function(t){t.markArea=t.markArea||{}}),Rp.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var mx,vx,yx,xx,_x=["cartesian2d","polar","singleAxis"],bx=(vx=["axisIndex","axis","index","id"],yx=f(mx=(mx=["x","y","z","radius","angle","single"]).slice(),Qn),xx=f(vx=(vx||[]).slice(),Qn),function(t,e){d(mx,function(i,n){for(var r={name:i,capital:yx[n]},o=0;o<vx.length;o++)r[vx[o]]=i+xx[o];t.call(e,r)})}),Sx=d,Mx=zn,Ix=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};Ix.prototype={constructor:Ix,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(o=i.get("coordinateSystem"),l(_x,o)>=0){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}var o},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,r=this.ecModel,o=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),r.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(o.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return i(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[t.start,t.end],a=[];return Sx(["startValue","endValue"],function(e){a.push(null!=t[e]?i.parse(t[e]):null)}),Sx([0,1],function(t){var s=a[t],l=o[t];"percent"===n[t]?(null==l&&(l=r[t]),s=i.parse(Pn(l,r,e,!0))):l=Pn(s,e,r,!0),a[t]=s,o[t]=l}),{valueWindow:Mx(a),percentWindow:Mx(o)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=kl(this,this._dimName,e);var i=this.calculateDataWindow(t.option);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,r=(n=this)._minMaxSpan={},o=n._dataZoomModel,Sx(["min","max"],function(t){r[t+"Span"]=o.get(t+"Span");var e=o.get(t+"ValueSpan");if(null!=e&&(r[t+"ValueSpan"]=e,null!=(e=n.getAxisModel().axis.scale.parse(e)))){var i=n._dataExtent;r[t+"Span"]=Pn(i[0]+e,i,[0,100],!0)}}),Pl(this)}var n,r,o},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Pl(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&Sx(n,function(t){var e=t.getData(),n=e.mapDimension(i,!0);"weakFilter"===r?e.filterSelf(function(t){for(var i,r,a,s=0;s<n.length;s++){var l=e.get(n[s],t),h=!isNaN(l),u=l<o[0],c=l>o[1];if(h&&!u&&!c)return!0;h&&(a=!0),u&&(i=!0),c&&(r=!0)}return a&&i&&r}):Sx(n,function(i){if("empty"===r)t.setData(e.map(i,function(t){return(e=t)>=o[0]&&e<=o[1]?t:NaN;var e}));else{var n={};n[i]=o,e.selectRange(n)}}),Sx(n,function(t){e.setApproximateExtent(o,t)})})}}};var Tx=d,Cx=bx,Dx=Vo({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=Ll(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Ll(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;ku.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Ol(this,t),Tx([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var o=this.dependentModels[e.axis][i],a=o.__dzAxisProxy||(o.__dzAxisProxy=new Ix(e.name,i,this,r));t[e.name+"_"+i]=a},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Cx(function(e){var i=e.axisIndex;t[i]=Ye(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Cx(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var r="vertical"===e?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],t=!1):Tx(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Cx(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var o=0,a=r.length;o<a;o++)"category"===r[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&Cx(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex),o=t.get(e.axisId);l(n,r=t.ecModel.queryComponents({mainType:e.axis,index:r,id:o})[0].componentIndex)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return Cx(function(n){var r=t.get(n.axisIndex),o=this.dependentModels[n.axis][r];o&&o.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Cx(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;Cx(function(n){Tx(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;Tx([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Ol(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),Ax=Sg.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis(function(t,n){var r=e.getComponent(t.axis,n);if(r){var o=r.getCoordSysModel();o&&function(t,e,i,n){for(var r,o=0;o<i.length;o++)if(i[o].model===t){r=i[o];break}r||i.push(r={model:t,axisModels:[],coordIndex:n}),r.axisModels.push(e)}(o,r,i[o.mainType]||(i[o.mainType]=[]),o.componentIndex)}},this),i}}),kx=(Dx.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"}}}),function(t,e,i,n,r,o){e[0]=El(e[0],i),e[1]=El(e[1],i),t=t||0;var a=i[1]-i[0];null!=r&&(r=El(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===n&&(r=o=Math.abs(e[1]-e[0]),n=0);var s=zl(e,n);e[n]+=t;var l=r||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=El(e[n],h),u=zl(e,n),null!=r&&(u.sign!==s.sign||u.span<r)&&(e[1-n]=e[n]+s.sign*r);var u=zl(e,n);return null!=o&&u.span>o&&(e[1-n]=e[n]+u.sign*o),e}),Px=Qf,Lx=Pn,Ox=zn,zx=m,Ex=d,Nx="horizontal",Rx=5,Bx=["line","bar","candlestick","scatter"],Vx=Ax.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){Vx.superApply(this,"render",arguments),Qr(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){Vx.superApply(this,"remove",arguments),Jr(this,"_dispatchZoomAction")},dispose:function(){Vx.superApply(this,"dispose",arguments),Jr(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ec;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},r=this._orient===Nx?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=nr(t.option);d(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=r[t])});var a=tr(o,n,t.padding);this._location={x:a.x,y:a.y},this._size=[a.width,a.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),o=this._displayables.barGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==Nx||r?i===Nx&&r?{scale:a?[-1,1]:[-1,-1]}:"vertical"!==i||r?{scale:a?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:a?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:a?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new Px({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new Px({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:m(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=r){var o=n.getDataExtent(r),s=.3*(o[1]-o[0]);o=[o[0]-s,o[1]+s];var l,h=[0,e[1]],u=[0,e[0]],c=[[e[0],0],[0,0]],d=[],f=u[1]/(n.count()-1),p=0,g=Math.round(n.count()/e[0]);n.each([r],function(t,e){if(g>0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:Lx(t,o,h,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new $f({shape:{points:c},style:a({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Kf({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(r,o){d(t.getAxisProxy(r.name,o).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(Bx,t.get("type"))<0)){var a,s=n.getComponent(r.axis,o).axis,h={x:"y",y:"x",radius:"angle",angle:"radius"}[r.name],u=t.coordinateSystem;null!=h&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),h=t.getData().mapDimension(h),i={thisAxis:s,series:t,thisDim:r.name,otherDim:h,otherAxisInverse:a}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,o=this.dataZoomModel;n.add(t.filler=new Px({draggable:!0,cursor:Nl(this._orient),drift:zx(this._onDragMove,this,"all"),onmousemove:function(t){cd(t.event)},ondragstart:zx(this._showDataInfo,this,!0),ondragend:zx(this._onDragEnd,this),onmouseover:zx(this._showDataInfo,this,!0),onmouseout:zx(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new Px(qi({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),Ex([0,1],function(t){var r=Tn(o.get("handleIcon"),{cursor:Nl(this._orient),draggable:!0,drift:zx(this._onDragMove,this,t),onmousemove:function(t){cd(t.event)},ondragend:zx(this._onDragEnd,this),onmouseover:zx(this._showDataInfo,this,!0),onmouseout:zx(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),a=r.getBoundingRect();this._handleHeight=Ln(o.get("handleSize"),this._size[1]),this._handleWidth=a.width/a.height*this._handleHeight,r.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=o.textStyleModel;this.group.add(i[t]=new Gf({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Lx(t[0],[0,100],e,!0),Lx(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];kx(e,n,r,i.get("zoomLock")?"all":t,null!=o.minSpan?Lx(o.minSpan,a,r,!0):null,null!=o.maxSpan?Lx(o.maxSpan,a,r,!0):null),this._range=Ox([Lx(n[0],r,a,!0),Lx(n[1],r,a,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=Ox(i.slice()),r=this._size;Ex([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],r[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=wn(n.handles[t].parent,this.group),i=Sn(0===t?"right":"left",e),s=this._handleWidth/2+Rx,l=bn([c[t]+(0===t?-s:s),this._size[1]/2],e);r[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===Nx?"middle":i,textAlign:o===Nx?i:"center",text:a[t]})}var i=this.dataZoomModel,n=this._displayables,r=n.handleLabels,o=this._orient,a=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,h=this._range,u=t?s.calculateDataWindow({start:h[0],end:h[1]}).valueWindow:s.getDataValueWindow();a=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=Ox(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");null!=r&&"auto"!==r||(r=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return x(n)?n(t,o):_(n)?n.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=bn([e,i],this._displayables.barGroup.getLocalTransform(),!0);this._updateInterval(t,n[0]);var r=this.dataZoomModel.get("realtime");this._updateView(!r),r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2;this._updateInterval("all",i[0]-r),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(Ex(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});Dx.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var Fx="\0_ec_interaction_mutex";zo({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),u(Vl,Qu);var Hx=v,Gx="\0_ec_dataZoom_roams",Wx=m,Zx=Ax.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){Zx.superApply(this,"render",arguments),function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i<n;i++)if(t.batch[i].dataZoomId===e)return!1;return!0}(n,t.id)&&(this._range=t.getPercentRange()),d(this.getTargetCoordInfo(),function(e,n){var r=f(e,function(t){return Yl(t.model)});d(e,function(e){var o=e.model,a=t.option;jl(i,{coordId:Yl(o),allCoordIds:r,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:Wx(this._onPan,this,e,n),zoomGetRange:Wx(this._onZoom,this,e,n),zoomLock:a.zoomLock,disabled:a.disabled,roamControllerOpt:{zoomOnMouseWheel:a.zoomOnMouseWheel,moveOnMouseMove:a.moveOnMouseMove,preventDefaultMouseMove:a.preventDefaultMouseMove}})},this)},this)},dispose:function(){var t,e,i;t=this.api,e=this.dataZoomModel.id,d(i=ql(t),function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),$l(i),Zx.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,r,o,a,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=Ux[e]([o,a],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return kx(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,r,o){var a=this._range.slice(),s=t.axisModels[0];if(s){var l=Ux[e](null,[r,o],s,i,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(a[1]-a[0])+a[0];n=Math.max(1/n,0),a[0]=(a[0]-h)*n+h,a[1]=(a[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return kx(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a}}}),Ux={grid:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,i,n,r){var o=i.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=h[1]-h[0],a.pixelStart=h[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,i,n,r){var o=i.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};Oo({getTargetSeries:function(t){var e=N();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},isOverallFilter:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),zo("dataZoom",function(t,e){var i=function(t,e,i){function n(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(r){var o,a={nodes:[],records:{}};if(e(function(t){a.records[t.name]={}}),!r)return a;n(r,a);do{o=!1,t(function(t){var r,s,h,u;u=t,!(l(a.nodes,u)>=0)&&(r=t,s=a,h=!1,e(function(t){d(i(r,t)||[],function(e){s.records[t.name][e]&&(h=!0)})}),h)&&(n(t,a),o=!0)})}while(o);return a}}(m(e.eachComponent,e,"dataZoom"),bx,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var Xx={},jx=Vo({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){jx.superApply(this,"mergeDefaultAndTheme",arguments),d(this.option.feature,function(t,e){var i=ih(e);i&&n(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}}}});Fo({type:"toolbox",render:function(t,e,i,n){function r(r,o){var a,s=x[r],l=x[o],h=new Cn(g[s],t,t.ecModel);if(s&&!l){if(0===s.indexOf("my"))a={model:h,onclick:h.option.onclick,featureName:s};else{var u=ih(s);if(!u)return;a=new u(h,e,i)}y[s]=a}else{if(!(a=y[l]))return;a.model=h,a.ecModel=e,a.api=i}s||!l?h.get("show")&&!a.unusable?(function(n,r,o){var a=n.getModel("iconStyle"),s=n.getModel("emphasis.iconStyle"),l=r.getIcons?r.getIcons():n.get("icon"),h=n.get("title")||{};if("string"==typeof l){var u=l,c=h;h={},(l={})[o]=u,h[o]=c}var g=n.iconPaths={};d(l,function(o,l){var u=Tn(o,{},{x:-p/2,y:-p/2,width:p,height:p});u.setStyle(a.getItemStyle()),u.hoverStyle=s.getItemStyle(),un(u),t.get("showTitle")&&(u.__title=h[l],u.on("mouseover",function(){var t=s.getItemStyle();u.setStyle({text:h[l],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})}).on("mouseout",function(){u.setStyle({textFill:null})})),u.trigger(n.get("iconStatus."+l)||"normal"),f.add(u),u.on("click",m(r.onclick,r,e,i,l)),g[l]=u})}(h,a,s),h.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},a.render&&a.render(h,e,i,n)):a.remove&&a.remove(e,i):a.dispose&&a.dispose(e,i)}var o,a,s,l,h,u,c,f=this.group;if(f.removeAll(),t.get("show")){var p=+t.get("itemSize"),g=t.get("feature")||{},y=this._features||(this._features={}),x=[];d(g,function(t,e){x.push(e)}),new Zo(this._featureNames||[],x).add(r).update(r).remove(v(r,null)).execute(),this._featureNames=x,o=f,s=i,l=(a=t).getBoxLayoutParams(),h=a.get("padding"),u={width:s.getWidth(),height:s.getHeight()},c=tr(l,u,h),zp(a.get("orient"),o,a.get("itemGap"),c.width,c.height),er(o,l,u,h),f.add(tl(f.getBoundingRect(),t)),f.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=ne(e,ge(n)),o=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+r.height>i.getHeight()&&(n.textPosition="top",a=!0);var s=a?-5-r.height:p+8;o+r.width/2>i.getWidth()?(n.textPosition=["100%",s],n.textAlign="right"):o-r.width/2<0&&(n.textPosition=[0,s],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var Yx=zg.toolbox.saveAsImage;nh.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:Yx.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:Yx.lang.slice()},nh.prototype.unusable=!ku.canvasSupported,nh.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",r=document.createElement("a"),o=i.get("type",!0)||"png";r.download=n+"."+o,r.target="_blank";var a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(r.href=a,"function"!=typeof MouseEvent||ku.browser.ie||ku.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(a.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});r.dispatchEvent(f)}},eh("saveAsImage",nh);var qx=zg.toolbox.magicType;rh.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(qx.title),option:{},seriesIndex:{}};var $x=rh.prototype;$x.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var Kx={line:function(t,e,i,r){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.line")||{},!0)},bar:function(t,e,i,r){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},r.get("option.bar")||{},!0)},stack:function(t,e,i,r){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},r.get("option.stack")||{},!0)},tiled:function(t,e,i,r){if("line"===t||"bar"===t)return n({id:e,stack:""},r.get("option.tiled")||{},!0)}},Qx=[["line","bar"],["stack","tiled"]];$x.onclick=function(t,e,i){var n=this.model,r=n.get("seriesIndex."+i);if(Kx[i]){var o={series:[]};d(Qx,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(e){var r=e.subType,s=e.id,l=Kx[i](r,s,e,n);l&&(a(l,e.option),o.series.push(l));var h=e.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===i||"bar"===i)){var u=h.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var f=0;f<=d;f++)o[c][d]=o[c][d]||{};o[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:o})}},zo({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),eh("magicType",rh);var Jx=zg.toolbox.dataView,t_=new Array(60).join("-"),e_="\t",i_=new RegExp("["+e_+"]+","g");lh.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(Jx.title),lang:i(Jx.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},lh.prototype.onclick=function(t,e){function i(){n.removeChild(o),x._dom=null}var n=e.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var a=document.createElement("h4"),s=r.get("lang")||[];a.innerHTML=s[0]||r.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=r.get("textColor");var l=document.createElement("div"),h=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var u=r.get("optionToContent"),c=r.get("contentToOption"),d=oh(t);if("function"==typeof u){var f=u(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(h),h.readOnly=r.get("readOnly"),h.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",h.style.color=r.get("textColor"),h.style.borderColor=r.get("textareaBorderColor"),h.style.backgroundColor=r.get("textareaColor"),h.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;Be(v,"click",i),Be(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):sh(h.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),Be(h,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+e_+e.substring(n),this.selectionStart=this.selectionEnd=i+1,cd(t)}}),o.appendChild(a),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},lh.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},lh.prototype.dispose=function(t,e){this.remove(t,e)},eh("dataView",lh),zo({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n,r,s=e.getSeriesByName(t.name)[0];if(s){var l=s.get("data");i.push({name:t.name,data:(n=t.data,r=l,f(n,function(t,e){var i=r&&r[e];return w(i)&&!y(i)?(w(t)&&!y(t)&&(t=t.value),a({value:t},i)):t}))})}else i.push(o({type:"scatter"},t))}),e.mergeOption(a({series:i},t.newOption))});var n_=v,r_=d,o_=f,a_=Math.min,s_=Math.max,l_=Math.pow,h_=1e4,u_=6,c_=6,d_="globalPan",f_={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},p_={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},g_={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},m_=0;hh.prototype={constructor:hh,enableBrush:function(t){return this._brushType&&ch(this),t.brushType&&uh(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};d(t,function(t){e[t.panelId]=i(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){r_(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:o+e)+"-"+t.brushType}function r(e,i){var n=t[e];if(null!=i&&a[i]===h)s[e]=a[i];else{var r=s[e]=null!=i?(a[i].__brushOption=n,a[i]):fh(l,dh(l,n));mh(l,r)}}t=f(t,function(t){return n(i(g_),t,!0)});var o="\0-brush-index-",a=this._covers,s=this._covers=[],l=this,h=this._creatingCover;return new Zo(a,t,function(t,i){return e(t.__brushOption,i)},e).add(r).update(r).remove(function(t){a[t]!==h&&l.group.remove(a[t])}).execute(),this},unmount:function(){return this.enableBrush(!1),_h(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},u(hh,Qu);var v_={mousedown:function(t){if(this._dragging)Rh.call(this,t);else if(!t.target||!t.target.draggable){Oh(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=yh(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,r=t._covers,o=yh(t,e,i);if(!t._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(!0===o||s.panelId===o.panelId)&&y_[s.brushType].contain(r[a],i[0],i[1]))return}o&&n.setCursorStyle("crosshair")}}(this,t,e),this._dragging){Oh(t);var i=Eh(this,t,e,!1);i&&wh(this,i)}},mouseup:Rh},y_={lineX:Bh(0),lineY:Bh(1),rect:{createCover:function(t,e){return Sh(n_(Ah,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=bh(t);return Dh(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Mh(t,e,i,n)},updateCommon:Ih,contain:zh},polygon:{createCover:function(t,e){var i=new Ec;return i.add(new Kf({name:"main",style:Ch(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new $f({name:"main",draggable:!0,drift:n_(kh,t,e),ondragend:n_(wh,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:Lh(t,e,i)})},updateCommon:Ih,contain:zh}},x_={axisPointer:1,tooltip:1,brush:1},__=d,w_=l,b_=v,S_=["dataToPoint","pointToData"],M_=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],I_=Hh.prototype;I_.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=A_[t.brushType](0,i,e);t.__rangeOffset={offset:k_[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},I_.matchOutputRanges=function(t,e,i){__(t,function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&d(n.coordSyses,function(n){var r=A_[t.brushType](1,n,t.range);i(t,r.values,n,e)})},this)},I_.setInputRanges=function(t,e){__(t,function(t){var i,n,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=A_[t.brushType](0,s.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?k_[t.brushType](l.values,h.offset,(i=l.xyMinMax,n=h.xyMinMax,r=Xh(i),o=Xh(n),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}},this)},I_.makePanelOpts=function(t,e){return f(this._targetInfoList,function(i){var n,r,o,a=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:(o=a,o=Fh(o),function(t,e){return In(t,o)}),isTargetByCursor:Vh(a,t,i.coordSysModel),getLinearBrushOtherExtent:(n=a,n=Fh(n),function(t){var e=null!=r?r:t,i=e?n.width:n.height,o=e?n.x:n.y;return[o,o+(i||0)]})}})},I_.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&w_(n.coordSyses,e.coordinateSystem)>=0},I_.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Wh(e,t),r=0;r<i.length;r++){var o=i[r],a=t.panelId;if(a){if(o.panelId===a)return o}else for(r=0;r<C_.length;r++)if(C_[r](n,o))return o}return!0};var T_={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,r=t.gridModels,o=N(),a={},s={};(i||n||r)&&(__(i,function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0}),__(n,function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0}),__(r,function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),o.each(function(t){var r=t.coordinateSystem,o=[];__(r.getCartesians(),function(t,e){(w_(i,t.getAxis("x").model)>=0||w_(n,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:D_.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){__(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:D_.geo})})}},C_=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,r=t.gridModel;return!r&&i&&(r=i.axis.grid.model),!r&&n&&(r=n.axis.grid.model),r&&r===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],D_={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(wn(t)),e}},A_={lineX:b_(Zh,0),lineY:b_(Zh,1),rect:function(t,e,i){var n=e[S_[t]]([i[0][0],i[1][0]]),r=e[S_[t]]([i[0][1],i[1][1]]),o=[Gh([n[0],r[0]]),Gh([n[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var r=e[S_[t]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r}),xyMinMax:n}}},k_={lineX:b_(Uh,0),lineY:b_(Uh,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},P_=d,L_="\0_ec_hist_store";Dx.extend({type:"dataZoom.select"}),Ax.extend({type:"dataZoom.select"});var O_=zg.toolbox.dataZoom,z_=d,E_="\0_ec_\0toolbox-dataZoom_";Yh.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(O_.title)};var N_=Yh.prototype;N_.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,r){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Hh(qh(t.option),e,{include:["grid"]});i._brushController.setPanels(a.makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!o&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),$h(t,e)},N_.onclick=function(t,e,i){R_[i].call(this)},N_.remove=function(t,e){this._brushController.unmount()},N_.dispose=function(t,e){this._brushController.dispose()};var R_={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=jh(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return P_(i,function(t,i){for(var r=e.length-1;r>=0;r--)if(t=e[r][i]){n[i]=t;break}}),n}(this.ecModel))}};N_._onBrush=function(t,e){function i(t,e,i){var o,a,s,l=e.getAxis(t),h=l.model,u=(o=t,a=h,r.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(o,a.componentIndex)&&(s=t)}),s),c=u.findRepresentativeAxisProxy(h).getMinMaxSpan();null==c.minValueSpan&&null==c.maxValueSpan||(i=kx(0,i.slice(),l.scale.getExtent(),0,c.minValueSpan,c.maxValueSpan)),u&&(n[u.id]={dataZoomId:u.id,startValue:i[0],endValue:i[1]})}if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new Hh(qh(this.model.option),r,{include:["grid"]}).matchOutputRanges(t,r,function(t,e,n){if("cartesian2d"===n.type){var r=t.brushType;"rect"===r?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[r],n,e)}}),a=n,s=jh(o=r),P_(a,function(t,e){for(var i=s.length-1;i>=0&&!s[i][e];i--);if(i<0){var n=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(n){var r=n.getPercentRange();s[0][e]={dataZoomId:e,start:r[0],end:r[1]}}}}),s.push(a),this._dispatchZoomAction(n)}var o,a,s},N_._dispatchZoomAction=function(t){var e=[];z_(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},eh("dataZoom",Yh),Lo(function(t){function e(e,n){if(n){var r=e+"Index",o=n[r];null==o||"all"==o||y(o)||(o=!1===o||"none"===o?[]:[o]),a=function(t,n){if(null==o||"all"==o||-1!==l(o,n)){var a={type:"select",$fromToolbox:!0,id:E_+e+n};a[r]=n,i.push(a)}},y(s=t[e])||(s=s?[s]:[]),z_(s,a)}var a,s}if(t){var i=t.dataZoom||(t.dataZoom=[]);y(i)||(t.dataZoom=i=[i]);var n=t.toolbox;if(n&&(y(n)&&(n=n[0]),n&&n.feature)){var r=n.feature.dataZoom;e("xAxis",r),e("yAxis",r)}}});var B_=zg.toolbox.restore;Kh.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:B_.title},Kh.prototype.onclick=function(t,e,i){t[L_]=null,e.dispatchAction({type:"restore",from:this.uid})},eh("restore",Kh),zo({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var V_,F_="urn:schemas-microsoft-com:vml",H_="undefined"==typeof window?null:window,G_=!1,W_=H_&&H_.document;if(W_&&!ku.canvasSupported)try{!W_.namespaces.zrvml&&W_.namespaces.add("zrvml",F_),V_=function(t){return W_.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){V_=function(t){return W_.createElement("<"+t+' xmlns="'+F_+'" class="zrvml">')}}var Z_=yf.CMD,U_=Math.round,X_=Math.sqrt,j_=Math.abs,Y_=Math.cos,q_=Math.sin,$_=Math.max;if(!ku.canvasSupported){var K_=21600,Q_=K_/2,J_=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=K_+","+K_,t.coordorigin="0,0"},tw=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},ew=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},iw=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},nw=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},rw=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ow=function(t,e,i){var n=bt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=tw(n[0],n[1],n[2]),t.opacity=i*n[3])},aw=function(t,e,i,n){var r,o,a="fill"==e,s=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof rp&&iw(t,s),s||(s=Qh(e)),a?function(t,e,i){var n,r,o=e.fill;if(null!=o)if(o instanceof rp){var a,s=0,l=[0,0],h=0,u=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===o.type){a="gradient";var p=i.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&($(g,g,p),$(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{a="gradientradial",g=[o.x*d,o.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&$(g,g,p),_/=x[0]*K_,w/=x[1]*K_;var b=$_(_,w);h=0/b,u=2*o.r/b-h}var S=o.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],C=0;C<M;C++){var D=S[C],A=(n=D.color,r=bt(n),[tw(r[0],r[1],r[2]),r[3]]);T.push(D.offset*u+h+" "+A[0]),0!==C&&C!==M-1||I.push(A)}if(M>=2){var k=I[0][0],P=I[1][0],L=I[0][1]*e.opacity,O=I[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=s,t.color=k,t.color2=P,t.colors=T.join(","),t.opacity=O,t.opacity2=L}"radial"===a&&(t.focusposition=l.join(","))}else ow(t,o,e.opacity)}(s,i,n):(r=s,null!=(o=i).lineDash&&(r.dashstyle=o.lineDash.join(" ")),null==o.stroke||o.stroke instanceof rp||ow(r,o.stroke,o.opacity)),ew(t,s)):(t[a?"filled":"stroked"]="false",iw(t,s))},sw=[[],[],[]];Ni.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=Qh("shape"),J_(i),this._vmlEl=i),aw(i,"fill",e,this),aw(i,"stroke",e,this);var n=this.transform,r=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var a=e.lineWidth;if(r&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];a*=X_(j_(s))}o.weight=a+"px"}var l=this.path||(this.path=new yf);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,r,o,a,s,l=Z_.M,h=Z_.C,u=Z_.L,c=Z_.A,d=Z_.Q,f=[],p=t.data,g=t.len();for(o=0;o<g;){switch(n="",i=0,r=p[o++]){case l:n=" m ",i=1,a=p[o++],s=p[o++],sw[0][0]=a,sw[0][1]=s;break;case u:n=" l ",i=1,a=p[o++],s=p[o++],sw[0][0]=a,sw[0][1]=s;break;case d:case h:n=" c ",i=3;var m,v,y=p[o++],x=p[o++],_=p[o++],w=p[o++];r===d?(m=_,v=w,_=(_+2*y)/3,w=(w+2*x)/3,y=(a+2*y)/3,x=(s+2*x)/3):(m=p[o++],v=p[o++]),sw[0][0]=y,sw[0][1]=x,sw[1][0]=_,sw[1][1]=w,sw[2][0]=m,sw[2][1]=v,a=m,s=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=X_(e[0]*e[0]+e[1]*e[1]),I=X_(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var C=p[o++],D=p[o++],A=p[o++],k=p[o++],P=p[o++]+T,L=p[o++]+P+T;o++;var O=p[o++],z=C+Y_(P)*A,E=D+q_(P)*k,N=(y=C+Y_(L)*A,x=D+q_(L)*k,O?" wa ":" at ");Math.abs(z-y)<1e-4&&(Math.abs(L-P)>.01?O&&(z+=.0125):Math.abs(E-D)<1e-4?O&&z<C||!O&&z>C?x-=.0125:x+=.0125:O&&E<D||!O&&E>D?y+=.0125:y-=.0125),f.push(N,U_(((C-A)*M+b)*K_-Q_),",",U_(((D-k)*I+S)*K_-Q_),",",U_(((C+A)*M+b)*K_-Q_),",",U_(((D+k)*I+S)*K_-Q_),",",U_((z*M+b)*K_-Q_),",",U_((E*I+S)*K_-Q_),",",U_((y*M+b)*K_-Q_),",",U_((x*I+S)*K_-Q_)),a=y,s=x;break;case Z_.R:var R=sw[0],B=sw[1];R[0]=p[o++],R[1]=p[o++],B[0]=R[0]+p[o++],B[1]=R[1]+p[o++],e&&($(R,R,e),$(B,B,e)),R[0]=U_(R[0]*K_-Q_),B[0]=U_(B[0]*K_-Q_),R[1]=U_(R[1]*K_-Q_),B[1]=U_(B[1]*K_-Q_),f.push(" m ",R[0],",",R[1]," l ",B[0],",",R[1]," l ",B[0],",",B[1]," l ",R[0],",",B[1]);break;case Z_.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V<i;V++){var F=sw[V];e&&$(F,F,e),f.push(U_(F[0]*K_-Q_),",",U_(F[1]*K_-Q_),V<i-1?",":"")}}}return f.join("")}(l,this.transform),i.style.zIndex=nw(this.zlevel,this.z,this.z2),ew(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Ni.prototype.onRemove=function(t){iw(t,this._vmlEl),this.removeRectText(t)},Ni.prototype.onAdd=function(t){ew(t,this._vmlEl),this.appendRectText(t)};Oe.prototype.brushVML=function(t){var e,i,n,r=this.style,o=r.image;if("object"==(void 0===(n=o)?"undefined":_typeof(n))&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var s=o.runtimeStyle,l=s.width,h=s.height;s.width="auto",s.height="auto",e=o.width,i=o.height,s.width=l,s.height=h,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}o=a}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=r.x||0,c=r.y||0,d=r.width,f=r.height,p=r.sWidth,g=r.sHeight,m=r.sx||0,v=r.sy||0,y=p&&g,x=this._vmlEl;x||(x=W_.createElement("div"),J_(x),this._vmlEl=x);var _,w=x.style,b=!1,S=1,M=1;if(this.transform&&(_=this.transform,S=X_(_[0]*_[0]+_[1]*_[1]),M=X_(_[2]*_[2]+_[3]*_[3]),b=_[1]||_[2]),b){var I=[u,c],T=[u+d,c],C=[u,c+f],D=[u+d,c+f];$(I,I,_),$(T,T,_),$(C,C,_),$(D,D,_);var A=$_(I[0],T[0],C[0],D[0]),k=$_(I[1],T[1],C[1],D[1]),P=[];P.push("M11=",_[0]/S,",","M12=",_[2]/M,",","M21=",_[1]/S,",","M22=",_[3]/M,",","Dx=",U_(u*S+_[4]),",","Dy=",U_(c*M+_[5])),w.padding="0 "+U_(A)+"px "+U_(k)+"px 0",w.filter="progid:DXImageTransform.Microsoft.Matrix("+P.join("")+", SizingMethod=clip)"}else _&&(u=u*S+_[4],c=c*M+_[5]),w.filter="",w.left=U_(u)+"px",w.top=U_(c)+"px";var L=this._imageEl,O=this._cropEl;L||(L=W_.createElement("div"),this._imageEl=L);var z=L.style;if(y){if(e&&i)z.width=U_(S*e*d/p)+"px",z.height=U_(M*i*f/g)+"px";else{var E=new Image,N=this;E.onload=function(){E.onload=null,e=E.width,i=E.height,z.width=U_(S*e*d/p)+"px",z.height=U_(M*i*f/g)+"px",N._imageWidth=e,N._imageHeight=i,N._imageSrc=o},E.src=o}O||((O=W_.createElement("div")).style.overflow="hidden",this._cropEl=O);var R=O.style;R.width=U_((d+m*d/p)*S),R.height=U_((f+v*f/g)*M),R.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/p*S+",Dy="+-v*f/g*M+")",O.parentNode||x.appendChild(O),L.parentNode!=O&&O.appendChild(L)}else z.width=U_(S*d)+"px",z.height=U_(M*f)+"px",x.appendChild(L),O&&O.parentNode&&(x.removeChild(O),this._cropEl=null);var B="",V=r.opacity;V<1&&(B+=".Alpha(opacity="+U_(100*V)+") "),B+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",z.filter=B,x.style.zIndex=nw(this.zlevel,this.z,this.z2),ew(t,x),null!=r.text&&this.drawRectText(t,this.getBoundingRect())}},Oe.prototype.onRemove=function(t){iw(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Oe.prototype.onAdd=function(t){ew(t,this._vmlEl),this.appendRectText(t)};var lw,hw={},uw=0,cw=document.createElement("div"),dw=function(t){var e=hw[t];if(!e){uw>100&&(uw=0,hw={});var i,n=cw.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},hw[t]=e,uw++}return e};ed.measureText=function(t,e){var i=W_;lw||((lw=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",W_.body.appendChild(lw));try{lw.style.font=e}catch(t){}return lw.innerHTML="",lw.appendChild(i.createTextNode(t)),{width:lw.offsetWidth}};for(var fw=new Gt,pw=[od,Le,Oe,Ni,Gf],gw=0;gw<pw.length;gw++){var mw=pw[gw].prototype;mw.drawRectText=function(t,e,i,n){var r=this.style;this.__dirty&&ve(r);var o=r.text;if(null!=o&&(o+=""),o){if(r.rich){var a=fe(o,r);o=[];for(var s=0;s<a.lines.length;s++){for(var l=a.lines[s].tokens,h=[],u=0;u<l.length;u++)h.push(l[u].text);o.push(h.join(""))}o=o.join("\n")}var c,d,f=r.textAlign,p=r.textVerticalAlign,g=dw(r.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||ne(o,m,f,p);var v=this.transform;if(v&&!n&&(fw.copy(e),fw.applyTransform(v),e=fw),n)c=e.x,d=e.y;else{var y=r.textPosition,x=r.textDistance;if(y instanceof Array)c=e.x+rw(y[0],e.width),d=e.y+rw(y[1],e.height),f=f||"left";else{var _=ae(y,e,x);c=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}c=re(c,i.width,f),d=oe(d,i.height,p),d+=i.height/2;var w,b,S,M=Qh,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",J_(I),w.textpathok=!0,b.on=!0,I.from="0 0",I.to="1000 0.05",ew(I,S),ew(I,w),ew(I,b),this._textVmlEl=I);var T=[c,d],C=I.style;v&&n?($(T,T,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(U_(T[0])||0)+","+(U_(T[1])||0),S.origin="0 0",C.left="0px",C.top="0px"):(S.on=!1,C.left=U_(c)+"px",C.top=U_(d)+"px"),b.string=String(o).replace(/&/g,"&").replace(/"/g,""");try{b.style.font=m}catch(t){}aw(I,"fill",{fill:r.textFill,opacity:r.opacity},this),aw(I,"stroke",{stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash},this),I.style.zIndex=nw(this.zlevel,this.z,this.z2),ew(t,I)}},mw.removeRectText=function(t){iw(t,this._textVmlEl),this._textVmlEl=null},mw.appendRectText=function(t){ew(t,this._textVmlEl)}}Gf.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)},Gf.prototype.onRemove=function(t){this.removeRectText(t)},Gf.prototype.onAdd=function(t){this.appendRectText(t)}}tu.prototype={constructor:tu,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,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.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||Jh(e.width))-Jh(e.paddingLeft)-Jh(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Jh(e.height))-Jh(e.paddingTop)-Jh(e.paddingBottom)|0}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;tu.prototype[t]=(e=t,function(){Ic('In IE8.0 VML mode painter not support method "'+e+'"')})}),je("vml",tu);var vw="http://www.w3.org/2000/svg",yw=yf.CMD,xw=Array.prototype.join,_w="none",ww=Math.round,bw=Math.sin,Sw=Math.cos,Mw=Math.PI,Iw=2*Math.PI,Tw=180/Mw,Cw=1e-4,Dw={};Dw.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=eu("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),t.buildPath(n,t.shape),t.__dirtyPath=!1;var r=function(t){for(var e=[],i=t.data,n=t.len(),r=0;r<n;){var o="",a=0;switch(i[r++]){case yw.M:o="M",a=2;break;case yw.L:o="L",a=2;break;case yw.Q:o="Q",a=4;break;case yw.C:o="C",a=6;break;case yw.A:var s=i[r++],l=i[r++],h=i[r++],u=i[r++],c=i[r++],d=i[r++],f=i[r++],p=i[r++],g=Math.abs(d),m=nu(g-Iw)&&!nu(g),v=!1;v=g>=Iw||!nu(g)&&(d>-Mw&&d<0||d>Mw)==!!p;var y=iu(s+h*Sw(c)),x=iu(l+u*bw(c));m&&(d=p?Iw-1e-4:1e-4-Iw,v=!0,9===r&&e.push("M",y,x));var _=iu(s+h*Sw(c+d)),w=iu(l+u*bw(c+d));e.push("A",iu(h),iu(u),ww(f*Tw),+v,+p,_,w);break;case yw.Z:o="Z";break;case yw.R:_=iu(i[r++]),w=iu(i[r++]);var b=iu(i[r++]),S=iu(i[r++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}o&&e.push(o);for(var M=0;M<a;M++)e.push(iu(i[r++]))}return e.join(" ")}(n);r.indexOf("NaN")<0&&ou(i,"d",r)}au(i,e),ru(i,t.transform),null!=e.text&&Lw(t,t.getBoundingRect())};var Aw={brush:function(t){var e,i,n=t.style,r=n.image;if(r instanceof HTMLImageElement&&(r=r.src),r){var o=n.x||0,a=n.y||0,s=n.width,l=n.height,h=t.__svgEl;h||(h=eu("image"),t.__svgEl=h),r!==t.__imageSrc&&(e="href",i=r,h.setAttributeNS("http://www.w3.org/1999/xlink",e,i),t.__imageSrc=r),ou(h,"width",s),ou(h,"height",l),ou(h,"x",o),ou(h,"y",a),ru(h,t.transform),null!=n.text&&Lw(t,t.getBoundingRect())}}},kw={},Pw=new Gt,Lw=function(t,e,i){var n=t.style;t.__dirty&&ve(n);var r=n.text;if(null!=r){r+="";var o=t.__textSvgEl;o||(o=eu("text"),t.__textSvgEl=o);var a,s,l=n.textPosition,h=n.textDistance,u=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var c=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||td,d=su(n.textVerticalAlign),f=(i=ne(r,c,u,d)).lineHeight;if(l instanceof Array)a=e.x+l[0],s=e.y+l[1];else{var p=ae(l,e,h);a=p.x,s=p.y,d=su(p.textVerticalAlign),u=p.textAlign}ou(o,"alignment-baseline",d),c&&(o.style.font=c);var g=n.textPadding;if(ou(o,"x",a),ou(o,"y",s),au(o,n,!0),t instanceof Gf||t.style.transformText)ru(o,t.transform);else{if(t.transform)Pw.copy(e),Pw.applyTransform(t.transform),e=Pw;else{var m=t.transformCoordToGlobal(e.x,e.y);e.x=m[0],e.y=m[1]}var v=n.textOrigin;"center"===v?(a=i.width/2+a,s=i.height/2+s):v&&(a=v[0]+a,s=v[1]+s),ou(o,"transform","rotate("+180*-n.textRotation/Math.PI+","+a+","+s+")")}var y=r.split("\n"),x=y.length,_=u;"left"===_?(_="start",g&&(a+=g[3])):"right"===_?(_="end",g&&(a-=g[1])):"center"===_&&(_="middle",g&&(a+=(g[3]-g[1])/2));var w=0;if("baseline"===d?(w=-i.height+f,g&&(w-=g[2])):"middle"===d?(w=(-i.height+f)/2,g&&(s+=(g[0]-g[2])/2)):g&&(w+=g[0]),t.__text!==r||t.__textFont!==c){var b=t.__tspanList||[];for(t.__tspanList=b,M=0;M<x;M++)(I=b[M])?I.innerHTML="":(I=b[M]=eu("tspan"),o.appendChild(I),ou(I,"alignment-baseline",d),ou(I,"text-anchor",_)),ou(I,"x",a),ou(I,"y",s+M*f+w),I.appendChild(document.createTextNode(y[M]));for(;M<b.length;M++)o.removeChild(b[M]);b.length=x,t.__text=r,t.__textFont=c}else if(t.__tspanList.length)for(var S=t.__tspanList.length,M=0;M<S;++M){var I=t.__tspanList[M];I&&(ou(I,"x",a),ou(I,"y",s+M*f+w))}}};kw.drawRectText=Lw,kw.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],Lw(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},lu.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var n=this;t=t.slice();var r=(e=e.slice()).length,o=t.length,a=1,s=r+o,l=[{newPos:-1,components:[]}],h=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=r&&h+1>=o){for(var u=[],c=0;c<e.length;c++)u.push(c);return[{indices:u,count:e.length}]}for(;a<=s;){var d=function(){for(var i=-1*a;i<=a;i+=2){var s,h=l[i-1],u=l[i+1],c=(u?u.newPos:0)-i;h&&(l[i-1]=void 0);var d=h&&h.newPos+1<r,f=u&&0<=c&&c<o;if(d||f){if(!d||f&&h.newPos<u.newPos?(s={newPos:(p=u).newPos,components:p.components.slice(0)},n.pushComponent(s.components,void 0,!0)):((s=h).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,e,t,i),s.newPos+1>=r&&c+1>=o)return hu(0,s.components);l[i]=s}else l[i]=void 0}var p;a++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var r=e.length,o=i.length,a=t.newPos,s=a-n,l=0;a+1<r&&s+1<o&&this.equals(e[a+1],i[s+1]);)a++,s++,l++;return l&&t.components.push({count:l}),t.newPos=a,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var Ow=new lu;uu.prototype.createElement=eu,uu.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;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},uu.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},uu.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},uu.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},uu.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},uu.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},uu.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},uu.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},uu.prototype.getSvgProxy=function(t){return t instanceof Ni?Dw:t instanceof Oe?Aw:t instanceof Gf?kw:Dw},uu.prototype.getTextSvgElement=function(t){return t.__textSvgEl},uu.prototype.getSvgElement=function(t){return t.__svgEl},h(cu,uu),cu.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var r,o=e.style[n],a=i.getDefs(!0);o._dom?(r=o._dom,a.contains(o._dom)||i.addDom(r)):r=i.add(o),i.markUsed(e);var s=r.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},cu.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Ic("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},cu.prototype.update=function(t){var e=this;uu.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},cu.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Ic("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,r=i.length;n<r;++n){var o=this.createElement("stop");o.setAttribute("offset",100*i[n].offset+"%"),o.setAttribute("stop-color",i[n].color),e.appendChild(o)}t._dom=e},cu.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&uu.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&uu.prototype.markUsed.call(this,e._dom)}},h(du,uu),du.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},du.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,r,o=this.getDefs(!0),a=e[0],s=i?"_textDom":"_dom";a[s]?(r=a[s].getAttribute("id"),n=a[s],o.contains(n)||o.appendChild(n)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",r),o.appendChild(n),a[s]=n);var l=this.getSvgProxy(a);if(a.transform&&a.parent.invTransform&&!i){var h=Array.prototype.slice.call(a.transform);at(a.transform,a.parent.invTransform,a.transform),l.brush(a),a.transform=h}else l.brush(a);var u=this.getSvgElement(a);n.innerHTML="",n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+r+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},du.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&uu.prototype.markUsed.call(e,t._dom),t._textDom&&uu.prototype.markUsed.call(e,t._textDom)})},h(fu,uu),fu.prototype.addWithoutUpdate=function(t,e){if(e&&pu(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var r=i.getAttribute("id");t.style.filter="url(#"+r+")"}},fu.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},fu.prototype.update=function(t,e){var i=e.style;if(pu(i)){var n=this;uu.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},fu.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},fu.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,r,o,a,s=t.style,l=t.scale&&t.scale[0]||1,h=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,r=s.shadowOffsetY||0,o=s.shadowBlur,a=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,o=s.textShadowBlur,a=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",r/h),i.setAttribute("flood-color",a);var u=o/2/l+" "+o/2/h;i.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(o/2*200)+"%"),e.setAttribute("height",Math.ceil(o/2*200)+"%"),e.appendChild(i),s._shadowDom=e},fu.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&uu.prototype.markUsed.call(this,e._shadowDom)};var zw=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=o({},i||{});var r=eu("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new cu(n,r),this.clipPathManager=new du(n,r),this.shadowManager=new fu(n,r);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=r,this._viewport=a,t.appendChild(a),a.appendChild(r),this.resize(i.width,i.height),this._visibleList=[]};zw.prototype={constructor:zw,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,r=this._visibleList,o=t.length,a=[];for(e=0;e<o;e++){var s=(i=v=t[e])instanceof Ni?Dw:i instanceof Oe?Aw:i instanceof Gf?kw:Dw,l=wu(v)||_u(v);v.invisible||(v.__dirty&&(s&&s.brush(v),this.clipPathManager.update(v),v.style&&(this.gradientManager.update(v.style.fill),this.gradientManager.update(v.style.stroke),this.shadowManager.update(l,v)),v.__dirty=!1),a.push(v))}var h,u,c,d,f=(u=r,c=a,Ow.diff(u,c,d));for(e=0;e<f.length;e++)if((g=f[e]).removed)for(m=0;m<g.count;m++){l=wu(v=r[g.indices[m]]);var p=_u(v);xu(n,l),xu(n,p)}for(e=0;e<f.length;e++){var g=f[e];if(g.added)for(m=0;m<g.count;m++){l=wu(v=a[g.indices[m]]),p=_u(v);h?vu(n,l,h):yu(n,l),l?vu(n,p,l):h?vu(n,p,h):yu(n,p),vu(n,p,l),h=p||l||h,this.gradientManager.addWithoutUpdate(l,v),this.shadowManager.addWithoutUpdate(h,v),this.clipPathManager.markUsed(v)}else if(!g.removed)for(var m=0;m<g.count;m++){var v=a[g.indices[m]];h=l=_u(v)||wu(v)||h,this.gradientManager.markUsed(v),this.gradientManager.addWithoutUpdate(l,v),this.shadowManager.markUsed(v),this.shadowManager.addWithoutUpdate(l,v),this.clipPathManager.markUsed(v)}}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(eu("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=i.style;r.width=t+"px",r.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[n]||gu(s[i])||gu(a.style[i]))-(gu(s[r])||0)-(gu(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){var e;zw.prototype[t]=(e=t,function(){Ic('In SVG mode painter not support method "'+e+'"')})}),je("svg",zw),t.version="4.0.4",t.dependencies={zrender:"4.0.3"},t.PRIORITY=tm,t.init=function(t,e,i){var n=ko(t);if(n)return n;var r=new go(t,e,i);return r.id="ec_"+vm++,gm[r.id]=r,oi(t,xm,r.id),function(t){function e(t,e){for(var n=0;n<t.length;n++)t[n][i]=e}var i="__connectUpdateStatus";jg(lm,function(n,r){t._messageCenter.on(r,function(n){if(mm[t.group]&&0!==t[i]){if(n&&n.escapeConnect)return;var r=t.makeActionFromEvent(n),o=[];jg(gm,function(e){e!==t&&e.group===t.group&&o.push(e)}),e(o,0),jg(o,function(t){1!==t[i]&&t.dispatchAction(r)}),e(o,2)}})})}(r),r},t.connect=function(t){if(y(t)){var e=t;t=null,jg(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+ym++,jg(e,function(e){e.group=t})}return mm[t]=!0,t},t.disConnect=Ao,t.disconnect=wm,t.dispose=function(t){"string"==typeof t?t=gm[t]:t instanceof go||(t=ko(t)),t instanceof go&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ko,t.getInstanceById=function(t){return gm[t]},t.registerTheme=Po,t.registerPreprocessor=Lo,t.registerProcessor=Oo,t.registerPostUpdate=function(t){cm.push(t)},t.registerAction=zo,t.registerCoordinateSystem=function(t,e){mr.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=mr.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=Eo,t.registerVisual=No,t.registerLoading=Bo,t.extendComponentModel=Vo,t.extendComponentView=Fo,t.extendSeriesModel=Ho,t.extendChartView=Go,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),_m[t]={geoJson:e,specialAreas:i}},t.getMap=function(t){return _m[t]},t.dataTool={},t.zrender=Id,t.graphic=dp,t.number=Mp,t.format=kp,t.throttle=Kr,t.helper=uv,t.matrix=nc,t.vector=$u,t.color=_c,t.parseGeoJSON=dv,t.parseGeoJson=mv,t.util=vv,t.List=km,t.Model=Cn,t.Axis=gv,t.env=ku},"object"==(void 0===t?"undefined":_typeof(t))&&"undefined"!=typeof module?i(t):"function"==typeof define&&define.amd?define(["exports"],i):i(e.echarts={}),t("echarts",{})});
|
||
//# sourceMappingURL=echarts.js.map
|